"use strict";var Vz=Object.create;var nh=Object.defineProperty;var ZT=Object.getOwnPropertyDescriptor;var Gz=Object.getOwnPropertyNames;var Kz=Object.getPrototypeOf,zz=Object.prototype.hasOwnProperty;var Xz=(t,e)=>()=>(t&&(e=t(t=0)),e);var v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Jz=(t,e)=>{for(var r in e)nh(t,r,{get:e[r],enumerable:!0})},e$=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Gz(e))!zz.call(t,n)&&n!==r&&nh(t,n,{get:()=>e[n],enumerable:!(i=ZT(e,n))||i.enumerable});return t};var S=(t,e,r)=>(r=t!=null?Vz(Kz(t)):{},e$(e||!t||!t.__esModule?nh(r,"default",{value:t,enumerable:!0}):r,t)),Yz=t=>e$(nh({},"__esModule",{value:!0}),t),$=(t,e,r,i)=>{for(var n=i>1?void 0:i?ZT(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&&nh(e,r,n),n},A=(t,e)=>(r,i)=>e(r,i,t);var Se=v((u_e,o$)=>{"use strict";var Qz=Object.create,yH=Object.defineProperty,Zz=Object.getOwnPropertyDescriptor,i$=Object.getOwnPropertyNames,eX=Object.getPrototypeOf,tX=Object.prototype.hasOwnProperty,rX=(t,e)=>function(){return e||(0,t[i$(t)[0]])((e={exports:{}}).exports,e),e.exports},iX=(t,e)=>{for(var r in e)yH(t,r,{get:e[r],enumerable:!0})},n$=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of i$(e))!tX.call(t,n)&&n!==r&&yH(t,n,{get:()=>e[n],enumerable:!(i=Zz(e,n))||i.enumerable});return t},nX=(t,e,r)=>(r=t!=null?Qz(eX(t)):{},n$(e||!t||!t.__esModule?yH(r,"default",{value:t,enumerable:!0}):r,t)),sX=t=>n$(yH({},"__esModule",{value:!0}),t),oX=rX({"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 m(){l==null||l.removeEventListener("abort",m),u.removeListener(c,g),u.removeListener("error",H)}function g(...b){m(),p(b)}function H(b){m(),f(b)}l==null||l.addEventListener("abort",m),u.on(c,g),u.on("error",H)})}},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)),m=p.default("agent-base");function g(){let{stack:b}=new Error;return typeof b=="string"&&b.split(`
`).some(w=>w.indexOf("(https.js:")!==-1||w.indexOf("node:https:")!==-1)}function H(b,w){return new H.Agent(b,w)}(function(b){class w extends l.EventEmitter{constructor(U,x){super();let L=x;typeof U=="function"?this.callback=U:U&&(L=U),this.timeout=null,L&&typeof L.timeout=="number"&&(this.timeout=L.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:g()?443:80}set defaultPort(U){this.explicitDefaultPort=U}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:g()?"https:":"http:"}set protocol(U){this.explicitProtocol=U}callback(U,x,L){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(U,x){let L=Object.assign({},x);typeof L.secureEndpoint!="boolean"&&(L.secureEndpoint=g()),L.host==null&&(L.host="localhost"),L.port==null&&(L.port=L.secureEndpoint?443:80),L.protocol==null&&(L.protocol=L.secureEndpoint?"https:":"http:"),L.host&&L.path&&delete L.path,delete L.agent,delete L.hostname,delete L._defaultAgent,delete L.defaultPort,delete L.createConnection,U._last=!0,U.shouldKeepAlive=!1;let q=!1,j=null,F=L.timeout||this.timeout,T=N=>{U._hadError||(U.emit("error",N),U._hadError=!0)},O=()=>{j=null,q=!0;let N=new Error(`A "socket" was not created for HTTP request before ${F}ms`);N.code="ETIMEOUT",T(N)},E=N=>{q||(j!==null&&(clearTimeout(j),j=null),T(N))},M=N=>{if(q)return;if(j!=null&&(clearTimeout(j),j=null),z=N,Boolean(z)&&typeof z.addRequest=="function")return m("Callback returned another Agent instance %o",N.constructor.name),void N.addRequest(U,L);var z;if(N)return N.once("free",()=>{this.freeSocket(N,L)}),void U.onSocket(N);let D=new Error(`no Duplex stream was returned to agent-base for \`${U.method} ${U.path}\``);T(D)};if(typeof this.callback=="function"){this.promisifiedCallback||(this.callback.length>=3?(m("Converting legacy callback function to promise"),this.promisifiedCallback=f.default(this.callback)):this.promisifiedCallback=this.callback),typeof F=="number"&&F>0&&(j=setTimeout(O,F)),"port"in L&&typeof L.port!="number"&&(L.port=Number(L.port));try{m("Resolving socket for %o request: %o",L.protocol,`${U.method} ${U.path}`),Promise.resolve(this.promisifiedCallback(U,L)).then(M,E)}catch(N){Promise.reject(N).catch(E)}}else T(new Error("`callback` is not defined"))}freeSocket(U,x){m("Freeing socket %o %o",U.constructor.name,x),U.destroy()}destroy(){m("Destroying agent %o",this.constructor.name)}}b.Agent=w,b.prototype=b.Agent.prototype})(H||(H={})),o.exports=H},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,(m,g)=>{m?f(m):p(g)})})}}},370:function(o,a,u){"use strict";var c=this&&this.__awaiter||function(U,x,L,q){return new(L||(L=Promise))(function(j,F){function T(M){try{E(q.next(M))}catch(N){F(N)}}function O(M){try{E(q.throw(M))}catch(N){F(N)}}function E(M){var N;M.done?j(M.value):(N=M.value,N instanceof L?N:new L(function(z){z(N)})).then(T,O)}E((q=q.apply(U,x||[])).next())})},l=this&&this.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(a,"__esModule",{value:!0});let p=l(u(808)),f=l(u(404)),m=l(u(310)),g=l(u(374)),H=l(u(46)),b=u(54),w=(0,g.default)("http-proxy-agent");class k extends b.Agent{constructor(x){let L;if(L=typeof x=="string"?m.default.parse(x):x,!L)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");w("Creating new HttpProxyAgent instance: %o",L),super(L);let q=Object.assign({},L);var j;this.secureProxy=L.secureProxy||typeof(j=q.protocol)=="string"&&/^https:?$/i.test(j),q.host=q.hostname||q.host,typeof q.port=="string"&&(q.port=parseInt(q.port,10)),!q.port&&q.host&&(q.port=this.secureProxy?443:80),q.host&&q.path&&(delete q.path,delete q.pathname),this.proxy=q}callback(x,L){return c(this,void 0,void 0,function*(){let{proxy:q,secureProxy:j}=this,F=m.default.parse(x.path),T;if(F.protocol||(F.protocol="http:"),F.hostname||(F.hostname=L.hostname||L.host||null),F.port==null&&(L.port,1)&&(F.port=String(L.port)),F.port==="80"&&(F.port=""),x.path=m.default.format(F),q.auth&&x.setHeader("Proxy-Authorization",`Basic ${Buffer.from(q.auth).toString("base64")}`),j?(w("Creating `tls.Socket`: %o",q),T=f.default.connect(q)):(w("Creating `net.Socket`: %o",q),T=p.default.connect(q)),x._header){let O,E;w("Regenerating stored HTTP header string for request"),x._header=null,x._implicitHeader(),x.output&&x.output.length>0?(w("Patching connection write() output buffer with updated header"),O=x.output[0],E=O.indexOf(`\r
\r
`)+4,x.output[0]=x._header+O.substring(E),w("Output buffer: %o",x.output)):x.outputData&&x.outputData.length>0&&(w("Patching connection write() output buffer with updated header"),O=x.outputData[0].data,E=O.indexOf(`\r
\r
`)+4,x.outputData[0].data=x._header+O.substring(E),w("Output buffer: %o",x.outputData[0].data))}return yield(0,H.default)(T,"connect"),T})}}a.default=k},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(L,q,j,F){return new(j||(j=Promise))(function(T,O){function E(z){try{N(F.next(z))}catch(D){O(D)}}function M(z){try{N(F.throw(z))}catch(D){O(D)}}function N(z){var D;z.done?T(z.value):(D=z.value,D instanceof j?D:new j(function(P){P(D)})).then(E,M)}N((F=F.apply(L,q||[])).next())})},l=this&&this.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(a,"__esModule",{value:!0});let p=l(u(808)),f=l(u(404)),m=l(u(310)),g=l(u(491)),H=l(u(374)),b=u(54),w=l(u(829)),k=H.default("https-proxy-agent:agent");class U extends b.Agent{constructor(q){let j;if(j=typeof q=="string"?m.default.parse(q):q,!j)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");k("creating new HttpsProxyAgent instance: %o",j),super(j);let F=Object.assign({},j);var T;this.secureProxy=j.secureProxy||typeof(T=F.protocol)=="string"&&/^https:?$/i.test(T),F.host=F.hostname||F.host,typeof F.port=="string"&&(F.port=parseInt(F.port,10)),!F.port&&F.host&&(F.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in F)&&(F.ALPNProtocols=["http 1.1"]),F.host&&F.path&&(delete F.path,delete F.pathname),this.proxy=F}callback(q,j){return c(this,void 0,void 0,function*(){let{proxy:F,secureProxy:T}=this,O;T?(k("Creating `tls.Socket`: %o",F),O=f.default.connect(F)):(k("Creating `net.Socket`: %o",F),O=p.default.connect(F));let E=Object.assign({},F.headers),M=`CONNECT ${j.host}:${j.port} HTTP/1.1\r
`;F.auth&&(E["Proxy-Authorization"]=`Basic ${Buffer.from(F.auth).toString("base64")}`);let{host:N,port:z,secureEndpoint:D}=j;(function(J,te){return Boolean(!te&&J===80||te&&J===443)})(z,D)||(N+=`:${z}`),E.Host=N,E.Connection="close";for(let J of Object.keys(E))M+=`${J}: ${E[J]}\r
`;let P=w.default(O);O.write(`${M}\r
`);let{statusCode:ee,buffered:re}=yield P;if(ee===200){if(q.once("socket",x),j.secureEndpoint){k("Upgrading socket connection to TLS");let J=j.servername||j.host;return f.default.connect(Object.assign(Object.assign({},function(te,...ce){let ae={},he;for(he in te)ce.includes(he)||(ae[he]=te[he]);return ae}(j,"host","hostname","path","port")),{socket:O,servername:J}))}return O}O.destroy();let ie=new p.default.Socket({writable:!1});return ie.readable=!0,q.once("socket",J=>{k("replaying proxy buffer for failed request"),g.default(J.listenerCount("data")>0),J.push(re),J.push(null)}),ie})}}function x(L){L.resume()}a.default=U},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,m)=>{let g=0,H=[];function b(){let U=p.read();U?function(x){H.push(x),g+=x.length;let L=Buffer.concat(H,g);if(L.indexOf(`\r
\r
`)===-1)return l("have not received end of HTTP headers yet..."),void b();let q=L.toString("ascii",0,L.indexOf(`\r
`)),j=+q.split(" ")[1];l("got proxy server response: %o",q),f({statusCode:j,buffered:L})}(U):p.once("readable",b)}function w(U){l("onclose had error %o",U)}function k(){l("onend")}p.on("error",function U(x){p.removeListener("end",k),p.removeListener("error",U),p.removeListener("close",w),p.removeListener("readable",b),l("onerror %o",x),m(x)}),p.on("close",w),p.on("end",k),b()})}},539:function(o,a,u){"use strict";var c,l=this&&this.__extends||(c=function(T,O){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,M){E.__proto__=M}||function(E,M){for(var N in M)Object.prototype.hasOwnProperty.call(M,N)&&(E[N]=M[N])},c(T,O)},function(T,O){if(typeof O!="function"&&O!==null)throw new TypeError("Class extends value "+String(O)+" is not a constructor or null");function E(){this.constructor=T}c(T,O),T.prototype=O===null?Object.create(O):(E.prototype=O.prototype,new E)}),p=this&&this.__assign||function(){return p=Object.assign||function(T){for(var O,E=1,M=arguments.length;E<M;E++)for(var N in O=arguments[E])Object.prototype.hasOwnProperty.call(O,N)&&(T[N]=O[N]);return T},p.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.getErrorStatusDescription=a.xhr=a.configure=void 0;var f=u(685),m=u(687),g=u(310),H=u(472),b=u(796),w=u(201),k=u(18);if(process.env.VSCODE_NLS_CONFIG){var U=process.env.VSCODE_NLS_CONFIG;H.config(JSON.parse(U))}var x=H.loadMessageBundle(),L=void 0,q=!0;function j(T){var O;return new Promise(function(E,M){var N=(0,g.parse)(T.url),z={hostname:N.hostname,agent:!!T.agent&&T.agent,port:N.port?parseInt(N.port):N.protocol==="https:"?443:80,path:N.path,method:T.type||"GET",headers:T.headers,rejectUnauthorized:typeof T.strictSSL!="boolean"||T.strictSSL};T.user&&T.password&&(z.auth=T.user+":"+T.password);var D=function(P){if(P.statusCode>=300&&P.statusCode<400&&T.followRedirects&&T.followRedirects>0&&P.headers.location){var ee=P.headers.location;ee.startsWith("/")&&(ee=(0,g.format)({protocol:N.protocol,hostname:N.hostname,port:N.port,pathname:ee})),E(j(function(re){for(var ie=[],J=1;J<arguments.length;J++)ie[J-1]=arguments[J];return ie.forEach(function(te){return Object.keys(te).forEach(function(ce){return re[ce]=te[ce]})}),re}({},T,{url:ee,followRedirects:T.followRedirects-1})))}else E({req:O,res:P})};(O=N.protocol==="https:"?m.request(z,D):f.request(z,D)).on("error",M),T.timeout&&O.setTimeout(T.timeout),T.data&&O.write(T.data),O.end(),T.token&&(T.token.isCancellationRequested&&O.destroy(new F),T.token.onCancellationRequested(function(){O.destroy(new F)}))})}a.configure=function(T,O){L=T,q=O},a.xhr=function(T){return typeof(T=p({},T)).strictSSL!="boolean"&&(T.strictSSL=q),T.agent||(T.agent=function(O,E){E===void 0&&(E={});var M=(0,g.parse)(O),N=E.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}(M);if(!N)return null;var z=(0,g.parse)(N);if(!/^https?:$/.test(z.protocol))return null;var D={host:z.hostname,port:Number(z.port),auth:z.auth,rejectUnauthorized:typeof E.strictSSL!="boolean"||E.strictSSL,protocol:z.protocol};return M.protocol==="http:"?w(D):k(D)}(T.url,{proxyUrl:L,strictSSL:q})),typeof T.followRedirects!="number"&&(T.followRedirects=5),j(T).then(function(O){return new Promise(function(E,M){var N,z,D=O.res,P=D,ee=!1,re=D.headers&&D.headers["content-encoding"];if(re&&(N=T.type,z=O.res.statusCode,!(N==="HEAD"||z>=100&&z<200||z===204||z===304))){var ie={flush:b.constants.Z_SYNC_FLUSH,finishFlush:b.constants.Z_SYNC_FLUSH};if(re==="gzip"){var J=b.createGunzip(ie);D.pipe(J),P=J}else if(re==="deflate"){var te=b.createInflate(ie);D.pipe(te),P=te}}var ce=[];P.on("data",function(ae){return ce.push(ae)}),P.on("end",function(){if(!ee){if(ee=!0,T.followRedirects>0&&(D.statusCode>=300&&D.statusCode<=303||D.statusCode===307)){var ae=D.headers.location;if(ae.startsWith("/")){var he=(0,g.parse)(T.url);ae=(0,g.format)({protocol:he.protocol,hostname:he.hostname,port:he.port,pathname:ae})}if(ae){var dt={type:T.type,url:ae,user:T.user,password:T.password,headers:T.headers,timeout:T.timeout,followRedirects:T.followRedirects-1,data:T.data,token:T.token};return void(0,a.xhr)(dt).then(E,M)}}var ge=Buffer.concat(ce),Gt={responseText:ge.toString(),body:ge,status:D.statusCode,headers:D.headers||{}};D.statusCode>=200&&D.statusCode<300||D.statusCode===1223?E(Gt):M(Gt)}}),P.on("error",function(ae){var he;he=F.is(ae)?ae:{responseText:x("error","Unable to access {0}. Error: {1}",T.url,ae.message),body:Buffer.concat(ce),status:500,headers:{}},ee=!0,M(he)}),T.token&&(T.token.isCancellationRequested&&P.destroy(new F),T.token.onCancellationRequested(function(){P.destroy(new F)}))})},function(O){var E;return E=F.is(O)?O:{responseText:T.agent?x("error.cannot.connect.proxy","Unable to connect to {0} through a proxy. Error: {1}",T.url,O.message):x("error.cannot.connect","Unable to connect to {0}. Error: {1}",T.url,O.message),body:Buffer.concat([]),status:404,headers:{}},Promise.reject(E)})},a.getErrorStatusDescription=function(T){if(!(T<400))switch(T){case 400:return x("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return x("status.401","Unauthorized. The server is refusing to respond.");case 403:return x("status.403","Forbidden. The server is refusing to respond.");case 404:return x("status.404","Not Found. The requested location could not be found.");case 405:return x("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return x("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return x("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return x("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return x("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return x("status.410","Gone. The requested page is no longer available.");case 411:return x("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return x("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return x("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return x("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return x("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return x("status.500","Internal Server Error.");case 501:return x("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 x("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return x("status.416","HTTP status code {0}",T)}};var F=function(T){function O(){var E=T.call(this,"The user aborted a request")||this;return E.name="AbortError",Object.setPrototypeOf(E,O.prototype),E}return l(O,T),O.is=function(E){return E instanceof O},O}(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 m(H){return H!==void 0}function g(H,b){return a.isPseudo&&(H="\uFF3B"+H.replace(/[aouei]/g,"$&$&")+"\uFF3D"),b.length===0?H:H.replace(/\{(\d+)\}/g,function(w,k){var U=k[0],x=b[U],L=w;return typeof x=="string"?L=x:typeof x!="number"&&typeof x!="boolean"&&x!=null||(L=String(x)),L})}(p=a.MessageFormat||(a.MessageFormat={})).file="file",p.bundle="bundle",p.both="both",(l=a.BundleFormat||(a.BundleFormat={})).standalone="standalone",l.languagePack="languagePack",function(H){H.is=function(b){var w=b;return w&&m(w.key)&&m(w.comment)}}(c||(c={})),a.isDefined=m,a.isPseudo=!1,a.setPseudo=function(H){a.isPseudo=H},a.format=g,a.localize=function(H,b){for(var w=[],k=2;k<arguments.length;k++)w[k-2]=arguments[k];return g(b,w)},a.loadMessageBundle=function(H){return(0,f.default)().loadMessageBundle(H)},a.config=function(H){return(0,f.default)().config(H)}},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),m=u(800);Object.defineProperty(a,"MessageFormat",{enumerable:!0,get:function(){return m.MessageFormat}}),Object.defineProperty(a,"BundleFormat",{enumerable:!0,get:function(){return m.BundleFormat}});var g,H,b=Object.prototype.toString;function w(O){return b.call(O)==="[object Number]"}function k(O){return b.call(O)==="[object String]"}function U(O){return JSON.parse(l.readFileSync(O,"utf8"))}function x(O){return function(E,M){for(var N=[],z=2;z<arguments.length;z++)N[z-2]=arguments[z];return w(E)?E>=O.length?void console.error(`Broken localize call found. Index out of bounds. Stacktrace is
: `.concat(new Error("").stack)):(0,f.format)(O[E],N):k(M)?(console.warn("Message ".concat(M," didn't get externalized correctly.")),(0,f.format)(M,N)):void console.error(`Broken localize call found. Stacktrace is
: `.concat(new Error("").stack))}}function L(O,E){return g[O]=E,E}function q(O){try{return function(E){var M=U(c.join(E,"nls.metadata.json")),N=Object.create(null);for(var z in M){var D=M[z];N[z]=D.messages}return N}(O)}catch(E){return void console.log("Generating default bundle from meta data failed.",E)}}function j(O,E){var M;if(H.languagePackSupport===!0&&H.cacheRoot!==void 0&&H.languagePackId!==void 0&&H.translationsConfigFile!==void 0&&H.translationsConfig!==void 0)try{M=function(z,D){var P,ee,re,ie=c.join(H.cacheRoot,"".concat(z.id,"-").concat(z.hash,".json")),J=!1,te=!1;try{return P=JSON.parse(l.readFileSync(ie,{encoding:"utf8",flag:"r"})),ee=ie,re=new Date,l.utimes(ee,re,re,function(){}),P}catch(ce){if(ce.code==="ENOENT")te=!0;else{if(!(ce instanceof SyntaxError))throw ce;console.log("Syntax error parsing message bundle: ".concat(ce.message,".")),l.unlink(ie,function(ae){ae&&console.error("Deleting corrupted bundle ".concat(ie," failed."))}),J=!0}}if(P=function(ce,ae){var he=H.translationsConfig[ce.id];if(he){var dt=U(he).contents,ge=U(c.join(ae,"nls.metadata.json")),Gt=Object.create(null);for(var kr in ge){var Z=ge[kr],Ae=dt["".concat(ce.outDir,"/").concat(kr)];if(Ae){for(var Q=[],be=0;be<Z.keys.length;be++){var Ge=Z.keys[be],wt=Ae[k(Ge)?Ge:Ge.key];wt===void 0&&(wt=Z.messages[be]),Q.push(wt)}Gt[kr]=Q}else Gt[kr]=Z.messages}return Gt}}(z,D),!P||J)return P;if(te)try{l.writeFileSync(ie,JSON.stringify(P),{encoding:"utf8",flag:"wx"})}catch(ce){if(ce.code==="EEXIST")return P;throw ce}return P}(O,E)}catch(z){console.log("Load or create bundle failed ",z)}if(!M){if(H.languagePackSupport)return q(E);var N=function(z){for(var D=H.language;D;){var P=c.join(z,"nls.bundle.".concat(D,".json"));if(l.existsSync(P))return P;var ee=D.lastIndexOf("-");D=ee>0?D.substring(0,ee):void 0}if(D===void 0&&(P=c.join(z,"nls.bundle.json"),l.existsSync(P)))return P}(E);if(N)try{return U(N)}catch(z){console.log("Loading in the box message bundle failed.",z)}M=q(E)}return M}function F(O){if(!O)return f.localize;var E=c.extname(O);if(E&&(O=O.substr(0,O.length-E.length)),H.messageFormat===f.MessageFormat.both||H.messageFormat===f.MessageFormat.bundle){var M=function(J){for(var te,ce=c.dirname(J);te=c.join(ce,"nls.metadata.header.json"),!l.existsSync(te);){var ae=c.dirname(ce);if(ae===ce){te=void 0;break}ce=ae}return te}(O);if(M){var N=c.dirname(M),z=g[N];if(z===void 0)try{var D=JSON.parse(l.readFileSync(M,"utf8"));try{var P=j(D,N);z=L(N,P?{header:D,nlsBundle:P}:null)}catch(J){console.error("Failed to load nls bundle",J),z=L(N,null)}}catch(J){console.error("Failed to read header file",J),z=L(N,null)}if(z){var ee=O.substr(N.length+1).replace(/\\/g,"/"),re=z.nlsBundle[ee];return re===void 0?(console.error("Messages for file ".concat(O," not found. See console for details.")),function(){return"Messages not found."}):x(re)}}}if(H.messageFormat===f.MessageFormat.both||H.messageFormat===f.MessageFormat.file)try{var ie=U(function(J){var te;if(!(H.cacheLanguageResolution&&te)){if(f.isPseudo||!H.language)te=".nls.json";else for(var ce=H.language;ce;){var ae=".nls."+ce+".json";if(l.existsSync(J+ae)){te=ae;break}var he=ce.lastIndexOf("-");he>0?ce=ce.substring(0,he):(te=".nls.json",ce=null)}H.cacheLanguageResolution}return J+te}(O));return Array.isArray(ie)?x(ie):(0,f.isDefined)(ie.messages)&&(0,f.isDefined)(ie.keys)?x(ie.messages):(console.error("String bundle '".concat(O,"' uses an unsupported format.")),function(){return"File bundle has unsupported format. See console for details"})}catch(J){J.code!=="ENOENT"&&console.error("Failed to load single file bundle",J)}return console.error("Failed to load message bundle for file ".concat(O)),function(){return"Failed to load message bundle. See console for details."}}function T(O){return O&&(k(O.locale)&&(H.locale=O.locale.toLowerCase(),H.language=H.locale,g=Object.create(null)),O.messageFormat!==void 0&&(H.messageFormat=O.messageFormat),O.bundleFormat===f.BundleFormat.standalone&&H.languagePackSupport===!0&&(H.languagePackSupport=!1)),(0,f.setPseudo)(H.locale==="pseudo"),F}(function(){if(H={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:f.MessageFormat.bundle},k(process.env.VSCODE_NLS_CONFIG))try{var O=JSON.parse(process.env.VSCODE_NLS_CONFIG),E=void 0;if(O.availableLanguages){var M=O.availableLanguages["*"];k(M)&&(E=M)}if(k(O.locale)&&(H.locale=O.locale.toLowerCase()),E===void 0?H.language=H.locale:E!=="en"&&(H.language=E),function(z){return z===!0||z===!1}(O._languagePackSupport)&&(H.languagePackSupport=O._languagePackSupport),k(O._cacheRoot)&&(H.cacheRoot=O._cacheRoot),k(O._languagePackId)&&(H.languagePackId=O._languagePackId),k(O._translationsConfigFile)){H.translationsConfigFile=O._translationsConfigFile;try{H.translationsConfig=U(H.translationsConfigFile)}catch{if(O._corruptedFile){var N=c.dirname(O._corruptedFile);l.exists(N,function(D){D&&l.writeFile(O._corruptedFile,"corrupted","utf8",function(P){console.error(P)})})}}}}catch{}(0,f.setPseudo)(H.locale==="pseudo"),g=Object.create(null)})(),a.loadMessageBundle=F,a.config=T,p.default.install(Object.freeze({loadMessageBundle:F,config:T}))},374:(o,a)=>{function u(){}Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(c){return u}},491:o=>{"use strict";o.exports=require("assert")},361:o=>{"use strict";o.exports=require("events")},147:o=>{"use strict";o.exports=require("fs")},685:o=>{"use strict";o.exports=require("http")},687:o=>{"use strict";o.exports=require("https")},808:o=>{"use strict";o.exports=require("net")},17:o=>{"use strict";o.exports=require("path")},404:o=>{"use strict";o.exports=require("tls")},310:o=>{"use strict";o.exports=require("url")},796:o=>{"use strict";o.exports=require("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})})()}}),s$={};iX(s$,{config:()=>pX,t:()=>fX});o$.exports=sX(s$);var aX=require("fs"),uX=require("fs/promises"),t$=nX(oX());async function cX(t){if(t.protocol==="file:")return await(0,uX.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:")try{let e=await(0,t$.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,t$.getErrorStatusDescription)(e.status)??e.toString())}throw new Error("Unsupported protocol")}function lX(t){return(0,aX.readFileSync)(t,"utf8")}var Hl;function pX(t){if("contents"in t){typeof t.contents=="string"?Hl=JSON.parse(t.contents):Hl=t.contents;return}if("fsPath"in t){let e=lX(t.fsPath),r=JSON.parse(e);Hl=r$(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=cX(e).then(s=>{try{let o=JSON.parse(s);Hl=r$(o)?o.contents.bundle:o}catch(o){i(o)}}).catch(s=>{i(s)});r(n)})}}function fX(...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??{}),!Hl)return sh(i,n);let s=Hl[r];return s?typeof s=="string"?sh(s,n):s.comment?sh(s.message,n):sh(i,n):sh(i,n)}var dX=/{([^}]+)}/g;function sh(t,e){return t.replace(dX,(r,i)=>e[i]??r)}function r$(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 Gu=v(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.findWindowsCandidates=ci.sort=ci.preferredEdgePath=ci.preferredChromePath=ci.escapeRegexSpecialChars=ci.canAccess=void 0;var IX=require("path");async function LH({access:t},e){if(!e)return!1;try{return await t(e),!0}catch{return!1}}ci.canAccess=LH;var EX="/\\.?*()^${}|[]+";function SX(t,e){let r=EX.split("").filter(n=>!e||e.indexOf(n)<0).join("").replace(/[\\\]]/g,"\\$&"),i=new RegExp(`[${r}]`,"g");return t.replace(i,"\\$&")}ci.escapeRegexSpecialChars=SX;async function CX(t,e){if(await LH(t,e.CHROME_PATH))return e.CHROME_PATH}ci.preferredChromePath=CX;async function xX(t,e){if(await LH(t,e.EDGE_PATH))return e.EDGE_PATH}ci.preferredEdgePath=xX;function DX(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}))}ci.sort=DX;async function PX(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=IX.win32.join(s,o.name);n.push(LH(e,a).then(u=>u?{path:a,quality:o.type}:void 0))}return(await Promise.all(n)).filter(s=>!!s)}ci.findWindowsCandidates=PX});var FA=v(TH=>{"use strict";Object.defineProperty(TH,"__esModule",{value:!0});TH.DarwinFinderBase=void 0;var LX=require("path"),OA=Gu(),g$=/( \(0x[a-f0-9]+\))/,NA=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,OA.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()}${g$.source}?$/ { $1=""; print $0 }'`,{shell:!0,stdio:"pipe"}),s=[...r,...n.split(`
`).map(u=>u.trim().replace(g$,""))].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=LX.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,OA.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,OA.escapeRegexSpecialChars)(i)),weight:151,quality:"custom"}),n}};TH.DarwinFinderBase=NA});var H$=v($H=>{"use strict";Object.defineProperty($H,"__esModule",{value:!0});$H.DarwinChromeBrowserFinder=void 0;var TX=Gu(),$X=FA(),BA=class extends $X.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,TX.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}};$H.DarwinChromeBrowserFinder=BA});var y$=v(kH=>{"use strict";Object.defineProperty(kH,"__esModule",{value:!0});kH.DarwinEdgeBrowserFinder=void 0;var kX=Gu(),RX=FA(),UA=class extends RX.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,kX.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}};kH.DarwinEdgeBrowserFinder=UA});var WA=v(RH=>{"use strict";Object.defineProperty(RH,"__esModule",{value:!0});RH.LinuxChromeBrowserFinder=void 0;var MX=require("path"),bl=Gu(),jA=require("child_process"),OX=require("os"),v$=/\r?\n/,qA=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,bl.canAccess)(this.fs,r)&&e.add(r),[MX.posix.join((0,OX.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,jA.execFileSync)("which",[o],{stdio:"pipe"}).toString().split(v$)[0];await(0,bl.canAccess)(this.fs,a)&&e.add(a)}catch{}}));let s=r?[{regex:new RegExp((0,bl.escapeRegexSpecialChars)(r)),weight:101,quality:"custom"}].concat(this.priorities):this.priorities;return(0,bl.sort)(e,s)}async findChromeExecutables(e){let r=/(^[^ ]+).*/,i=`^Exec=/.*/(${this.executablesOnPath.join("|")})-.*`,n=[];if(await(0,bl.canAccess)(this.fs,e)){let s;try{s=(0,jA.execSync)(`grep -ER "${i}" ${e} | awk -F '=' '{print $2}'`)}catch{s=(0,jA.execSync)(`grep -Er "${i}" ${e} | awk -F '=' '{print $2}'`)}let o=s.toString().split(v$).map(a=>a.replace(r,"$1"));await Promise.all(o.map(async a=>{await(0,bl.canAccess)(this.fs,a)&&n.push(a)}))}return n}};RH.LinuxChromeBrowserFinder=qA});var b$=v(MH=>{"use strict";Object.defineProperty(MH,"__esModule",{value:!0});MH.LinuxEdgeBrowserFinder=void 0;var NX=WA(),VA=class extends NX.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"}]}};MH.LinuxEdgeBrowserFinder=VA});var _$=v(OH=>{"use strict";Object.defineProperty(OH,"__esModule",{value:!0});OH.WindowsChromeBrowserFinder=void 0;var FX=require("path"),w$=Gu(),GA=class{constructor(e,r){this.env=e,this.fs=r}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=FX.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,w$.findWindowsCandidates)(this.env,this.fs,r),n=await(0,w$.preferredChromePath)(this.fs,this.env);return n&&i.unshift({path:n,quality:"custom"}),i}};OH.WindowsChromeBrowserFinder=GA});var I$=v(NH=>{"use strict";Object.defineProperty(NH,"__esModule",{value:!0});NH.WindowsEdgeBrowserFinder=void 0;var Rr=require("path"),A$=Gu(),KA=class{constructor(e,r){this.env=e,this.fs=r}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=[{name:`${Rr.sep}Microsoft${Rr.sep}Edge SxS${Rr.sep}Application${Rr.sep}msedge.exe`,type:"canary"},{name:`${Rr.sep}Microsoft${Rr.sep}Edge Dev${Rr.sep}Application${Rr.sep}msedge.exe`,type:"dev"},{name:`${Rr.sep}Microsoft${Rr.sep}Edge Beta${Rr.sep}Application${Rr.sep}msedge.exe`,type:"beta"},{name:`${Rr.sep}Microsoft${Rr.sep}Edge${Rr.sep}Application${Rr.sep}msedge.exe`,type:"stable"}],r=await(0,A$.findWindowsCandidates)(this.env,this.fs,e),i=await(0,A$.preferredEdgePath)(this.fs,this.env);return i&&r.unshift({path:i,quality:"custom"}),r}};NH.WindowsEdgeBrowserFinder=KA});var zA=v(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.EdgeBrowserFinder=Pn.ChromeBrowserFinder=Pn.isQuality=Pn.allQualities=void 0;var BX=H$(),UX=y$(),jX=WA(),qX=b$(),WX=_$(),VX=I$(),GX={canary:null,stable:null,beta:null,dev:null,custom:null};Pn.allQualities=new Set(Object.keys(GX));var KX=t=>Pn.allQualities.has(t);Pn.isQuality=KX;Pn.ChromeBrowserFinder=process.platform==="win32"?WX.WindowsChromeBrowserFinder:process.platform==="darwin"?BX.DarwinChromeBrowserFinder:jX.LinuxChromeBrowserFinder;Pn.EdgeBrowserFinder=process.platform==="win32"?VX.WindowsEdgeBrowserFinder:process.platform==="darwin"?UX.DarwinEdgeBrowserFinder:qX.LinuxEdgeBrowserFinder});var D$=v((S_e,x$)=>{x$.exports=C$;C$.sync=XX;var E$=require("fs");function zX(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 S$(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:zX(e,r)}function C$(t,e,r){E$.stat(t,function(i,n){r(i,i?!1:S$(n,t,e))})}function XX(t,e){return S$(E$.statSync(t),t,e)}});var k$=v((C_e,$$)=>{$$.exports=L$;L$.sync=JX;var P$=require("fs");function L$(t,e,r){P$.stat(t,function(i,n){r(i,i?!1:T$(n,e))})}function JX(t,e){return T$(P$.statSync(t),e)}function T$(t,e){return t.isFile()&&YX(t,e)}function YX(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 JA=v((D_e,R$)=>{var x_e=require("fs"),FH;process.platform==="win32"||global.TESTING_WINDOWS?FH=D$():FH=k$();R$.exports=XA;XA.sync=QX;function XA(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){XA(t,e||{},function(s,o){s?n(s):i(o)})})}FH(t,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),r(i,n)})}function QX(t,e){try{return FH.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var j$=v((P_e,U$)=>{var wl=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",M$=require("path"),ZX=wl?";":":",O$=JA(),N$=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),F$=(t,e)=>{let r=e.colon||ZX,i=t.match(/\//)||wl&&t.match(/\\/)?[""]:[...wl?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],n=wl?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=wl?n.split(r):[""];return wl&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},B$=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=F$(t,e),o=[],a=c=>new Promise((l,p)=>{if(c===i.length)return e.all&&o.length?l(o):p(N$(t));let f=i[c],m=/^".*"$/.test(f)?f.slice(1,-1):f,g=M$.join(m,t),H=!m&&/^\.[\\\/]/.test(t)?t.slice(0,2)+g:g;l(u(H,c,0))}),u=(c,l,p)=>new Promise((f,m)=>{if(p===n.length)return f(a(l+1));let g=n[p];O$(c+g,{pathExt:s},(H,b)=>{if(!H&&b)if(e.all)o.push(c+g);else return f(c+g);return f(u(c,l,p+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},eJ=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:i,pathExtExe:n}=F$(t,e),s=[];for(let o=0;o<r.length;o++){let a=r[o],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=M$.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(O$.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 N$(t)};U$.exports=B$;B$.sync=eJ});var W$=v((L_e,YA)=>{"use strict";var q$=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};YA.exports=q$;YA.exports.default=q$});var z$=v((T_e,K$)=>{"use strict";var V$=require("path"),tJ=j$(),rJ=W$();function G$(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=tJ.sync(t.command,{path:r[rJ({env:r})],pathExt:e?V$.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=V$.resolve(n?t.options.cwd:"",o)),o}function iJ(t){return G$(t)||G$(t,!0)}K$.exports=iJ});var X$=v(($_e,ZA)=>{"use strict";var QA=/([()\][%!^"`<>&|;, *?])/g;function nJ(t){return t=t.replace(QA,"^$1"),t}function sJ(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(QA,"^$1"),e&&(t=t.replace(QA,"^$1")),t}ZA.exports.command=nJ;ZA.exports.argument=sJ});var Y$=v((k_e,J$)=>{"use strict";J$.exports=/^#!(.*)/});var Z$=v((R_e,Q$)=>{"use strict";var oJ=Y$();Q$.exports=(t="")=>{let e=t.match(oJ);if(!e)return null;let[r,i]=e[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var t1=v((M_e,e1)=>{"use strict";var eI=require("fs"),aJ=Z$();function uJ(t){let r=Buffer.alloc(150),i;try{i=eI.openSync(t,"r"),eI.readSync(i,r,0,150,0),eI.closeSync(i)}catch{}return aJ(r.toString())}e1.exports=uJ});var s1=v((O_e,n1)=>{"use strict";var cJ=require("path"),r1=z$(),i1=X$(),lJ=t1(),pJ=process.platform==="win32",fJ=/\.(?:com|exe)$/i,dJ=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function hJ(t){t.file=r1(t);let e=t.file&&lJ(t.file);return e?(t.args.unshift(t.file),t.command=e,r1(t)):t.file}function mJ(t){if(!pJ)return t;let e=hJ(t),r=!fJ.test(e);if(t.options.forceShell||r){let i=dJ.test(e);t.command=cJ.normalize(t.command),t.command=i1.command(t.command),t.args=t.args.map(s=>i1.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 gJ(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:mJ(i)}n1.exports=gJ});var u1=v((N_e,a1)=>{"use strict";var tI=process.platform==="win32";function rI(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 HJ(t,e){if(!tI)return;let r=t.emit;t.emit=function(i,n){if(i==="exit"){let s=o1(n,e,"spawn");if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function o1(t,e){return tI&&t===1&&!e.file?rI(e.original,"spawn"):null}function yJ(t,e){return tI&&t===1&&!e.file?rI(e.original,"spawnSync"):null}a1.exports={hookChildProcess:HJ,verifyENOENT:o1,verifyENOENTSync:yJ,notFoundError:rI}});var p1=v((F_e,_l)=>{"use strict";var c1=require("child_process"),iI=s1(),nI=u1();function l1(t,e,r){let i=iI(t,e,r),n=c1.spawn(i.command,i.args,i.options);return nI.hookChildProcess(n,i),n}function vJ(t,e,r){let i=iI(t,e,r),n=c1.spawnSync(i.command,i.args,i.options);return n.error=n.error||nI.verifyENOENTSync(n.status,i),n}_l.exports=l1;_l.exports.spawn=l1;_l.exports.sync=vJ;_l.exports._parse=iI;_l.exports._enoent=nI});var d1=v((B_e,f1)=>{"use strict";f1.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 m1=v((U_e,sI)=>{"use strict";var h1=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};sI.exports=h1;sI.exports.default=h1});var y1=v((j_e,ph)=>{"use strict";var lh=require("path"),g1=m1(),H1=t=>{t={cwd:process.cwd(),path:process.env[g1()],execPath:process.execPath,...t};let e,r=lh.resolve(t.cwd),i=[];for(;e!==r;)i.push(lh.join(r,"node_modules/.bin")),e=r,r=lh.resolve(r,"..");let n=lh.resolve(t.cwd,t.execPath,"..");return i.push(n),i.concat(t.path).join(lh.delimiter)};ph.exports=H1;ph.exports.default=H1;ph.exports.env=t=>{t={env:process.env,...t};let e={...t.env},r=g1({env:e});return t.path=e[r],e[r]=ph.exports(t),e}});var b1=v((q_e,oI)=>{"use strict";var v1=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};oI.exports=v1;oI.exports.default=v1});var _1=v((W_e,UH)=>{"use strict";var bJ=b1(),BH=new WeakMap,w1=(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(BH.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 bJ(s,t),BH.set(s,i),s};UH.exports=w1;UH.exports.default=w1;UH.exports.callCount=t=>{if(!BH.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return BH.get(t)}});var A1=v(jH=>{"use strict";Object.defineProperty(jH,"__esModule",{value:!0});jH.SIGNALS=void 0;var wJ=[{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"}];jH.SIGNALS=wJ});var aI=v(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.SIGRTMAX=Al.getRealtimeSignals=void 0;var _J=function(){let t=E1-I1+1;return Array.from({length:t},AJ)};Al.getRealtimeSignals=_J;var AJ=function(t,e){return{name:`SIGRT${e+1}`,number:I1+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},I1=34,E1=64;Al.SIGRTMAX=E1});var S1=v(qH=>{"use strict";Object.defineProperty(qH,"__esModule",{value:!0});qH.getSignals=void 0;var IJ=require("os"),EJ=A1(),SJ=aI(),CJ=function(){let t=(0,SJ.getRealtimeSignals)();return[...EJ.SIGNALS,...t].map(xJ)};qH.getSignals=CJ;var xJ=function({name:t,number:e,description:r,action:i,forced:n=!1,standard:s}){let{signals:{[t]:o}}=IJ.constants,a=o!==void 0;return{name:t,number:a?o:e,description:r,supported:a,action:i,forced:n,standard:s}}});var x1=v(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.signalsByNumber=Il.signalsByName=void 0;var DJ=require("os"),C1=S1(),PJ=aI(),LJ=function(){return(0,C1.getSignals)().reduce(TJ,{})},TJ=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}}},$J=LJ();Il.signalsByName=$J;var kJ=function(){let t=(0,C1.getSignals)(),e=PJ.SIGRTMAX+1,r=Array.from({length:e},(i,n)=>RJ(n,t));return Object.assign({},...r)},RJ=function(t,e){let r=MJ(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}}},MJ=function(t,e){let r=e.find(({name:i})=>DJ.constants.signals[i]===t);return r!==void 0?r:e.find(i=>i.number===t)},OJ=kJ();Il.signalsByNumber=OJ});var P1=v((X_e,D1)=>{"use strict";var{signalsByName:NJ}=x1(),FJ=({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",BJ=({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:NJ[n].description,m=i&&i.code,H=`Command ${FJ({timedOut:u,timeout:p,errorCode:m,signal:n,signalDescription:f,exitCode:s,isCanceled:c})}: ${o}`,b=Object.prototype.toString.call(i)==="[object Error]",w=b?`${H}
${i.message}`:H,k=[w,e,t].filter(Boolean).join(`
`);return b?(i.originalMessage=i.message,i.message=k):i=new Error(k),i.shortMessage=w,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};D1.exports=BJ});var T1=v((J_e,uI)=>{"use strict";var WH=["stdin","stdout","stderr"],UJ=t=>WH.some(e=>t[e]!==void 0),L1=t=>{if(!t)return;let{stdio:e}=t;if(e===void 0)return WH.map(i=>t[i]);if(UJ(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${WH.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,WH.length);return Array.from({length:r},(i,n)=>e[n])};uI.exports=L1;uI.exports.node=t=>{let e=L1(t);return e==="ipc"?"ipc":e===void 0||typeof e=="string"?[e,e,e,"ipc"]:e.includes("ipc")?e:[...e,"ipc"]}});var $1=v((Y_e,VH)=>{VH.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&VH.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&VH.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var M1=v((Q_e,hh)=>{var jJ=require("assert"),fh=$1(),qJ=/^win/i.test(process.platform),GH=require("events");typeof GH!="function"&&(GH=GH.EventEmitter);var br;process.__signal_exit_emitter__?br=process.__signal_exit_emitter__:(br=process.__signal_exit_emitter__=new GH,br.count=0,br.emitted={});br.infinite||(br.setMaxListeners(1/0),br.infinite=!0);hh.exports=function(t,e){jJ.equal(typeof t,"function","a callback must be provided for exit handler"),dh===!1&&k1();var r="exit";e&&e.alwaysLast&&(r="afterexit");var i=function(){br.removeListener(r,t),br.listeners("exit").length===0&&br.listeners("afterexit").length===0&&lI()};return br.on(r,t),i};hh.exports.unload=lI;function lI(){dh&&(dh=!1,fh.forEach(function(t){try{process.removeListener(t,pI[t])}catch{}}),process.emit=cI,process.reallyExit=R1,br.count-=1)}function El(t,e,r){br.emitted[t]||(br.emitted[t]=!0,br.emit(t,e,r))}var pI={};fh.forEach(function(t){pI[t]=function(){var r=process.listeners(t);r.length===br.count&&(lI(),El("exit",null,t),El("afterexit",null,t),qJ&&t==="SIGHUP"&&(t="SIGINT"),process.kill(process.pid,t))}});hh.exports.signals=function(){return fh};hh.exports.load=k1;var dh=!1;function k1(){dh||(dh=!0,br.count+=1,fh=fh.filter(function(t){try{return process.on(t,pI[t]),!0}catch{return!1}}),process.emit=VJ,process.reallyExit=WJ)}var R1=process.reallyExit;function WJ(t){process.exitCode=t||0,El("exit",process.exitCode,null),El("afterexit",process.exitCode,null),R1.call(process,process.exitCode)}var cI=process.emit;function VJ(t,e){if(t==="exit"){e!==void 0&&(process.exitCode=e);var r=cI.apply(this,arguments);return El("exit",process.exitCode,null),El("afterexit",process.exitCode,null),r}else return cI.apply(this,arguments)}});var N1=v((Z_e,O1)=>{"use strict";var GJ=require("os"),KJ=M1(),zJ=1e3*5,XJ=(t,e="SIGTERM",r={})=>{let i=t(e);return JJ(t,e,r,i),i},JJ=(t,e,r,i)=>{if(!YJ(e,r,i))return;let n=ZJ(r),s=setTimeout(()=>{t("SIGKILL")},n);s.unref&&s.unref()},YJ=(t,{forceKillAfterTimeout:e},r)=>QJ(t)&&e!==!1&&r,QJ=t=>t===GJ.constants.signals.SIGTERM||typeof t=="string"&&t.toUpperCase()==="SIGTERM",ZJ=({forceKillAfterTimeout:t=!0})=>{if(t===!0)return zJ;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},eY=(t,e)=>{t.kill()&&(e.isCanceled=!0)},tY=(t,e,r)=>{t.kill(e),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},rY=(t,{timeout:e,killSignal:r="SIGTERM"},i)=>{if(e===0||e===void 0)return i;let n,s=new Promise((a,u)=>{n=setTimeout(()=>{tY(t,r,u)},e)}),o=i.finally(()=>{clearTimeout(n)});return Promise.race([s,o])},iY=({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})`)},nY=async(t,{cleanup:e,detached:r},i)=>{if(!e||r)return i;let n=KJ(()=>{t.kill()});return i.finally(()=>{n()})};O1.exports={spawnedKill:XJ,spawnedCancel:eY,setupTimeout:rY,validateTimeout:iY,setExitHandler:nY}});var B1=v((eAe,F1)=>{"use strict";var ns=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";ns.writable=t=>ns(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";ns.readable=t=>ns(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";ns.duplex=t=>ns.writable(t)&&ns.readable(t);ns.transform=t=>ns.duplex(t)&&typeof t._transform=="function"&&typeof t._transformState=="object";F1.exports=ns});var j1=v((tAe,U1)=>{"use strict";var{PassThrough:sY}=require("stream");U1.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 sY({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 q1=v((rAe,mh)=>{"use strict";var{constants:oY}=require("buffer"),aY=require("stream"),{promisify:uY}=require("util"),cY=j1(),lY=uY(aY.pipeline),KH=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function fI(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,i=cY(e);return await new Promise((n,s)=>{let o=a=>{a&&i.getBufferedLength()<=oY.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),s(a)};(async()=>{try{await lY(t,i),n()}catch(a){o(a)}})(),i.on("data",()=>{i.getBufferedLength()>r&&o(new KH)})}),i.getBufferedValue()}mh.exports=fI;mh.exports.buffer=(t,e)=>fI(t,{...e,encoding:"buffer"});mh.exports.array=(t,e)=>fI(t,{...e,array:!0});mh.exports.MaxBufferError=KH});var V1=v((iAe,W1)=>{"use strict";var{PassThrough:pY}=require("stream");W1.exports=function(){var t=[],e=new pY({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 X1=v((nAe,z1)=>{"use strict";var K1=B1(),G1=q1(),fY=V1(),dY=(t,e)=>{e===void 0||t.stdin===void 0||(K1(e)?e.pipe(t.stdin):t.stdin.end(e))},hY=(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;let r=fY();return t.stdout&&r.add(t.stdout),t.stderr&&r.add(t.stderr),r},dI=async(t,e)=>{if(t){t.destroy();try{return await e}catch(r){return r.bufferedData}}},hI=(t,{encoding:e,buffer:r,maxBuffer:i})=>{if(!(!t||!r))return e?G1(t,{encoding:e,maxBuffer:i}):G1.buffer(t,{maxBuffer:i})},mY=async({stdout:t,stderr:e,all:r},{encoding:i,buffer:n,maxBuffer:s},o)=>{let a=hI(t,{encoding:i,buffer:n,maxBuffer:s}),u=hI(e,{encoding:i,buffer:n,maxBuffer:s}),c=hI(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},dI(t,a),dI(e,u),dI(r,c)])}},gY=({input:t})=>{if(K1(t))throw new TypeError("The `input` option cannot be a stream in sync mode")};z1.exports={handleInput:dY,makeAllStream:hY,getSpawnedResult:mY,validateInputSync:gY}});var Y1=v((sAe,J1)=>{"use strict";var HY=(async()=>{})().constructor.prototype,yY=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(HY,t)]),vY=(t,e)=>{for(let[r,i]of yY){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},bY=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)})});J1.exports={mergePromise:vY,getSpawnedPromise:bY}});var ek=v((oAe,Z1)=>{"use strict";var Q1=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],wY=/^[\w.-]+$/,_Y=/"/g,AY=t=>typeof t!="string"||wY.test(t)?t:`"${t.replace(_Y,'\\"')}"`,IY=(t,e)=>Q1(t,e).join(" "),EY=(t,e)=>Q1(t,e).map(r=>AY(r)).join(" "),SY=/ +/g,CY=t=>{let e=[];for(let r of t.trim().split(SY)){let i=e[e.length-1];i&&i.endsWith("\\")?e[e.length-1]=`${i.slice(0,-1)} ${r}`:e.push(r)}return e};Z1.exports={joinCommand:IY,getEscapedCommand:EY,parseCommand:CY}});var gI=v((aAe,Sl)=>{"use strict";var xY=require("path"),mI=require("child_process"),DY=p1(),PY=d1(),LY=y1(),TY=_1(),zH=P1(),rk=T1(),{spawnedKill:$Y,spawnedCancel:kY,setupTimeout:RY,validateTimeout:MY,setExitHandler:OY}=N1(),{handleInput:NY,getSpawnedResult:FY,makeAllStream:BY,validateInputSync:UY}=X1(),{mergePromise:tk,getSpawnedPromise:jY}=Y1(),{joinCommand:ik,parseCommand:nk,getEscapedCommand:sk}=ek(),qY=1e3*1e3*100,WY=({env:t,extendEnv:e,preferLocal:r,localDir:i,execPath:n})=>{let s=e?{...process.env,...t}:t;return r?LY.env({env:s,cwd:i,execPath:n}):s},ok=(t,e,r={})=>{let i=DY._parse(t,e,r);return t=i.command,e=i.args,r=i.options,r={maxBuffer:qY,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=WY(r),r.stdio=rk(r),process.platform==="win32"&&xY.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:r,parsed:i}},gh=(t,e,r)=>typeof e!="string"&&!Buffer.isBuffer(e)?r===void 0?void 0:"":t.stripFinalNewline?PY(e):e,XH=(t,e,r)=>{let i=ok(t,e,r),n=ik(t,e),s=sk(t,e);MY(i.options);let o;try{o=mI.spawn(i.file,i.args,i.options)}catch(m){let g=new mI.ChildProcess,H=Promise.reject(zH({error:m,stdout:"",stderr:"",all:"",command:n,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1}));return tk(g,H)}let a=jY(o),u=RY(o,i.options,a),c=OY(o,i.options,u),l={isCanceled:!1};o.kill=$Y.bind(null,o.kill.bind(o)),o.cancel=kY.bind(null,o,l);let f=TY(async()=>{let[{error:m,exitCode:g,signal:H,timedOut:b},w,k,U]=await FY(o,i.options,c),x=gh(i.options,w),L=gh(i.options,k),q=gh(i.options,U);if(m||g!==0||H!==null){let j=zH({error:m,exitCode:g,signal:H,stdout:x,stderr:L,all:q,command:n,escapedCommand:s,parsed:i,timedOut:b,isCanceled:l.isCanceled,killed:o.killed});if(!i.options.reject)return j;throw j}return{command:n,escapedCommand:s,exitCode:0,stdout:x,stderr:L,all:q,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return NY(o,i.options.input),o.all=BY(o,i.options),tk(o,f)};Sl.exports=XH;Sl.exports.sync=(t,e,r)=>{let i=ok(t,e,r),n=ik(t,e),s=sk(t,e);UY(i.options);let o;try{o=mI.spawnSync(i.file,i.args,i.options)}catch(c){throw zH({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1})}let a=gh(i.options,o.stdout,o.error),u=gh(i.options,o.stderr,o.error);if(o.error||o.status!==0||o.signal!==null){let c=zH({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}};Sl.exports.command=(t,e)=>{let[r,...i]=nk(t);return XH(r,i,e)};Sl.exports.commandSync=(t,e)=>{let[r,...i]=nk(t);return XH.sync(r,i,e)};Sl.exports.node=(t,e,r={})=>{e&&!Array.isArray(e)&&typeof e=="object"&&(r=e,e=[]);let i=rk.node(r),n=process.execArgv.filter(a=>!a.startsWith("--inspect")),{nodePath:s=process.execPath,nodeOptions:o=n}=r;return XH(s,[...o,t,...Array.isArray(e)?e:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:i,shell:!1})}});var Kt=v(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.NON_CUSTOM_TAG_KEYS=Me.PRE_DESTROY=Me.POST_CONSTRUCT=Me.DESIGN_PARAM_TYPES=Me.PARAM_TYPES=Me.TAGGED_PROP=Me.TAGGED=Me.MULTI_INJECT_TAG=Me.INJECT_TAG=Me.OPTIONAL_TAG=Me.UNMANAGED_TAG=Me.NAME_TAG=Me.NAMED_TAG=void 0;Me.NAMED_TAG="named";Me.NAME_TAG="name";Me.UNMANAGED_TAG="unmanaged";Me.OPTIONAL_TAG="optional";Me.INJECT_TAG="inject";Me.MULTI_INJECT_TAG="multi_inject";Me.TAGGED="inversify:tagged";Me.TAGGED_PROP="inversify:tagged_props";Me.PARAM_TYPES="inversify:paramtypes";Me.DESIGN_PARAM_TYPES="design:paramtypes";Me.POST_CONSTRUCT="post_construct";Me.PRE_DESTROY="pre_destroy";function VY(){return[Me.INJECT_TAG,Me.MULTI_INJECT_TAG,Me.NAME_TAG,Me.UNMANAGED_TAG,Me.NAMED_TAG,Me.OPTIONAL_TAG]}Me.NON_CUSTOM_TAG_KEYS=VY()});var Ln=v(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.TargetTypeEnum=ca.BindingTypeEnum=ca.BindingScopeEnum=void 0;var GY={Request:"Request",Singleton:"Singleton",Transient:"Transient"};ca.BindingScopeEnum=GY;var KY={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};ca.BindingTypeEnum=KY;var zY={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"};ca.TargetTypeEnum=zY});var la=v(JH=>{"use strict";Object.defineProperty(JH,"__esModule",{value:!0});JH.id=void 0;var XY=0;function JY(){return XY++}JH.id=JY});var uk=v(YH=>{"use strict";Object.defineProperty(YH,"__esModule",{value:!0});YH.Binding=void 0;var ak=Ln(),YY=la(),QY=function(){function t(e,r){this.id=(0,YY.id)(),this.activated=!1,this.serviceIdentifier=e,this.scope=r,this.type=ak.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===ak.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}();YH.Binding=QY});var Mr=v(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.STACK_OVERFLOW=le.CIRCULAR_DEPENDENCY_IN_FACTORY=le.ON_DEACTIVATION_ERROR=le.PRE_DESTROY_ERROR=le.POST_CONSTRUCT_ERROR=le.ASYNC_UNBIND_REQUIRED=le.MULTIPLE_POST_CONSTRUCT_METHODS=le.MULTIPLE_PRE_DESTROY_METHODS=le.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=le.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=le.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=le.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=le.ARGUMENTS_LENGTH_MISMATCH=le.INVALID_DECORATOR_OPERATION=le.INVALID_TO_SELF_VALUE=le.LAZY_IN_SYNC=le.INVALID_FUNCTION_BINDING=le.INVALID_MIDDLEWARE_RETURN=le.NO_MORE_SNAPSHOTS_AVAILABLE=le.INVALID_BINDING_TYPE=le.NOT_IMPLEMENTED=le.CIRCULAR_DEPENDENCY=le.UNDEFINED_INJECT_ANNOTATION=le.MISSING_INJECT_ANNOTATION=le.MISSING_INJECTABLE_ANNOTATION=le.NOT_REGISTERED=le.CANNOT_UNBIND=le.AMBIGUOUS_MATCH=le.KEY_NOT_FOUND=le.NULL_ARGUMENT=le.DUPLICATED_METADATA=le.DUPLICATED_INJECTABLE_DECORATOR=void 0;le.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.";le.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:";le.NULL_ARGUMENT="NULL argument";le.KEY_NOT_FOUND="Key Not Found";le.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:";le.CANNOT_UNBIND="Could not unbind serviceIdentifier:";le.NOT_REGISTERED="No matching bindings found for serviceIdentifier:";le.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:";le.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";var ZY=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."};le.UNDEFINED_INJECT_ANNOTATION=ZY;le.CIRCULAR_DEPENDENCY="Circular dependency found:";le.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.";le.INVALID_BINDING_TYPE="Invalid binding type:";le.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.";le.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!";le.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!";var eQ=function(t){return"You are attempting to construct '"+t+`' in a synchronous way
 but it has asynchronous dependencies.`};le.LAZY_IN_SYNC=eQ;le.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier";le.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 tQ=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.")};le.ARGUMENTS_LENGTH_MISMATCH=tQ;le.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.";le.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').";le.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean";le.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean";le.MULTIPLE_PRE_DESTROY_METHODS="Cannot apply @preDestroy decorator multiple times in the same class";le.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";le.ASYNC_UNBIND_REQUIRED="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)";var rQ=function(t,e){return"@postConstruct error in class "+t+": "+e};le.POST_CONSTRUCT_ERROR=rQ;var iQ=function(t,e){return"@preDestroy error in class "+t+": "+e};le.PRE_DESTROY_ERROR=iQ;var nQ=function(t,e){return"onDeactivation() error in class "+t+": "+e};le.ON_DEACTIVATION_ERROR=nQ;var sQ=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+"'.")};le.CIRCULAR_DEPENDENCY_IN_FACTORY=sQ;le.STACK_OVERFLOW="Maximum call stack size exceeded"});var yI=v(ss=>{"use strict";var oQ=ss&&ss.__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]}),aQ=ss&&ss.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uQ=ss&&ss.__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)&&oQ(e,t,r);return aQ(e,t),e};Object.defineProperty(ss,"__esModule",{value:!0});ss.MetadataReader=void 0;var HI=uQ(Kt()),cQ=function(){function t(){}return t.prototype.getConstructorMetadata=function(e){var r=Reflect.getMetadata(HI.PARAM_TYPES,e),i=Reflect.getMetadata(HI.TAGGED,e);return{compilerGeneratedMetadata:r,userGeneratedMetadata:i||{}}},t.prototype.getPropertiesMetadata=function(e){var r=Reflect.getMetadata(HI.TAGGED_PROP,e)||[];return r},t}();ss.MetadataReader=cQ});var ck=v(QH=>{"use strict";Object.defineProperty(QH,"__esModule",{value:!0});QH.BindingCount=void 0;var lQ={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1};QH.BindingCount=lQ});var vI=v(Zi=>{"use strict";var pQ=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]}),fQ=Zi&&Zi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dQ=Zi&&Zi.__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)&&pQ(e,t,r);return fQ(e,t),e};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.tryAndThrowErrorIfStackOverflow=Zi.isStackOverflowExeption=void 0;var hQ=dQ(Mr());function lk(t){return t instanceof RangeError||t.message===hQ.STACK_OVERFLOW}Zi.isStackOverflowExeption=lk;var mQ=function(t,e){try{return t()}catch(r){throw lk(r)&&(r=e()),r}};Zi.tryAndThrowErrorIfStackOverflow=mQ});var Cl=v(zt=>{"use strict";var gQ=zt&&zt.__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]}),HQ=zt&&zt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yQ=zt&&zt.__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)&&gQ(e,t,r);return HQ(e,t),e};Object.defineProperty(zt,"__esModule",{value:!0});zt.getSymbolDescription=zt.circularDependencyToException=zt.listMetadataForTarget=zt.listRegisteredBindingsForServiceIdentifier=zt.getServiceIdentifierAsString=zt.getFunctionName=void 0;var vQ=yQ(Mr());function pk(t){if(typeof t=="function"){var e=t;return e.name}else{if(typeof t=="symbol")return t.toString();var e=t;return e}}zt.getServiceIdentifierAsString=pk;function bQ(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=hk(s.implementationType)),i=i+`
 `+o,s.constraint.metaData&&(i=i+" - "+s.constraint.metaData)})),i}zt.listRegisteredBindingsForServiceIdentifier=bQ;function fk(t,e){return t.parentRequest===null?!1:t.parentRequest.serviceIdentifier===e?!0:fk(t.parentRequest,e)}function wQ(t){function e(i,n){n===void 0&&(n=[]);var s=pk(i.serviceIdentifier);return n.push(s),i.parentRequest!==null?e(i.parentRequest,n):n}var r=e(t);return r.reverse().join(" --> ")}function dk(t){t.childRequests.forEach(function(e){if(fk(e,e.serviceIdentifier)){var r=wQ(e);throw new Error(vQ.CIRCULAR_DEPENDENCY+" "+r)}else dk(e)})}zt.circularDependencyToException=dk;function _Q(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}zt.listMetadataForTarget=_Q;function hk(t){if(t.name)return t.name;var e=t.toString(),r=e.match(/^function\s*([^\s(]+)/);return r?r[1]:"Anonymous function: "+e}zt.getFunctionName=hk;function AQ(t){return t.toString().slice(7,-1)}zt.getSymbolDescription=AQ});var mk=v(ZH=>{"use strict";Object.defineProperty(ZH,"__esModule",{value:!0});ZH.Context=void 0;var IQ=la(),EQ=function(){function t(e){this.id=(0,IQ.id)(),this.container=e}return t.prototype.addPlan=function(e){this.plan=e},t.prototype.setCurrentRequest=function(e){this.currentRequest=e},t}();ZH.Context=EQ});var Tn=v(os=>{"use strict";var SQ=os&&os.__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]}),CQ=os&&os.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xQ=os&&os.__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)&&SQ(e,t,r);return CQ(e,t),e};Object.defineProperty(os,"__esModule",{value:!0});os.Metadata=void 0;var DQ=xQ(Kt()),PQ=function(){function t(e,r){this.key=e,this.value=r}return t.prototype.toString=function(){return this.key===DQ.NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},t}();os.Metadata=PQ});var gk=v(ey=>{"use strict";Object.defineProperty(ey,"__esModule",{value:!0});ey.Plan=void 0;var LQ=function(){function t(e,r){this.parentContext=e,this.rootRequest=r}return t}();ey.Plan=LQ});var bI=v(ty=>{"use strict";Object.defineProperty(ty,"__esModule",{value:!0});ty.LazyServiceIdentifer=void 0;var TQ=function(){function t(e){this._cb=e}return t.prototype.unwrap=function(){return this._cb()},t}();ty.LazyServiceIdentifer=TQ});var Hk=v(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});ry.QueryableString=void 0;var $Q=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}();ry.QueryableString=$Q});var wI=v(as=>{"use strict";var kQ=as&&as.__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]}),RQ=as&&as.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),MQ=as&&as.__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)&&kQ(e,t,r);return RQ(e,t),e};Object.defineProperty(as,"__esModule",{value:!0});as.Target=void 0;var lo=MQ(Kt()),OQ=la(),NQ=Cl(),yk=Tn(),FQ=Hk(),BQ=function(){function t(e,r,i,n){this.id=(0,OQ.id)(),this.type=e,this.serviceIdentifier=i;var s=typeof r=="symbol"?(0,NQ.getSymbolDescription)(r):r;this.name=new FQ.QueryableString(s||""),this.identifier=r,this.metadata=new Array;var o=null;typeof n=="string"?o=new yk.Metadata(lo.NAMED_TAG,n):n instanceof yk.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(lo.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(e){return this.matchesTag(lo.MULTI_INJECT_TAG)(e)},t.prototype.isNamed=function(){return this.hasTag(lo.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some(function(e){return lo.NON_CUSTOM_TAG_KEYS.every(function(r){return e.key!==r})})},t.prototype.isOptional=function(){return this.matchesTag(lo.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(e){return e.key===lo.NAMED_TAG})[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(e){return lo.NON_CUSTOM_TAG_KEYS.every(function(r){return e.key!==r})}):null},t.prototype.matchesNamedTag=function(e){return this.matchesTag(lo.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}();as.Target=BQ});var Sk=v(Or=>{"use strict";var UQ=Or&&Or.__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]}),jQ=Or&&Or.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vk=Or&&Or.__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)&&UQ(e,t,r);return jQ(e,t),e},iy=Or&&Or.__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(Or,"__esModule",{value:!0});Or.getFunctionName=Or.getBaseClassDependencyCount=Or.getDependencies=void 0;var qQ=bI(),_I=vk(Mr()),bk=Ln(),Hh=vk(Kt()),AI=Cl();Object.defineProperty(Or,"getFunctionName",{enumerable:!0,get:function(){return AI.getFunctionName}});var wk=wI();function WQ(t,e){var r=(0,AI.getFunctionName)(e);return _k(t,r,e,!1)}Or.getDependencies=WQ;function _k(t,e,r,i){var n=t.getConstructorMetadata(r),s=n.compilerGeneratedMetadata;if(s===void 0){var o=_I.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=GQ(i,e,s,a,p),m=Ak(t,r,e),g=iy(iy([],f,!0),m,!0);return g}function VQ(t,e,r,i,n){var s=n[t.toString()]||[],o=Ek(s),a=o.unmanaged!==!0,u=i[t],c=o.inject||o.multiInject;if(u=c||u,u instanceof qQ.LazyServiceIdentifer&&(u=u.unwrap()),a){var l=u===Object,p=u===Function,f=u===void 0,m=l||p||f;if(!e&&m){var g=_I.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+r+".";throw new Error(g)}var H=new wk.Target(bk.TargetTypeEnum.ConstructorArgument,o.targetName,u);return H.metadata=s,H}return null}function GQ(t,e,r,i,n){for(var s=[],o=0;o<n;o++){var a=o,u=VQ(a,t,e,r,i);u!==null&&s.push(u)}return s}function KQ(t,e,r,i){var n=t||e;if(n===void 0){var s=_I.MISSING_INJECTABLE_ANNOTATION+" for property "+String(r)+" in class "+i+".";throw new Error(s)}return n}function Ak(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=Ek(p),m=f.targetName||l,g=KQ(f.inject,f.multiInject,l,r),H=new wk.Target(bk.TargetTypeEnum.ClassProperty,m,g);H.metadata=p,n.push(H)}var b=Object.getPrototypeOf(e.prototype).constructor;if(b!==Object){var w=Ak(t,b,r);n=iy(iy([],n,!0),w,!0)}return n}function Ik(t,e){var r=Object.getPrototypeOf(e.prototype).constructor;if(r!==Object){var i=(0,AI.getFunctionName)(r),n=_k(t,i,r,!0),s=n.map(function(u){return u.metadata.filter(function(c){return c.key===Hh.UNMANAGED_TAG})}),o=[].concat.apply([],s).length,a=n.length-o;return a>0?a:Ik(t,r)}else return 0}Or.getBaseClassDependencyCount=Ik;function Ek(t){var e={};return t.forEach(function(r){e[r.key.toString()]=r.value}),{inject:e[Hh.INJECT_TAG],multiInject:e[Hh.MULTI_INJECT_TAG],targetName:e[Hh.NAME_TAG],unmanaged:e[Hh.UNMANAGED_TAG]}}});var Ck=v(ny=>{"use strict";Object.defineProperty(ny,"__esModule",{value:!0});ny.Request=void 0;var zQ=la(),XQ=function(){function t(e,r,i,n,s){this.id=(0,zQ.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}();ny.Request=XQ});var xI=v(li=>{"use strict";var JQ=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]}),YQ=li&&li.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Pk=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)&&JQ(e,t,r);return YQ(e,t),e};Object.defineProperty(li,"__esModule",{value:!0});li.getBindingDictionary=li.createMockRequest=li.plan=void 0;var sy=ck(),EI=Pk(Mr()),Lk=Ln(),xk=Pk(Kt()),QQ=vI(),xl=Cl(),Tk=mk(),SI=Tn(),ZQ=gk(),II=Sk(),CI=Ck(),$k=wI();function kk(t){return t._bindingDictionary}li.getBindingDictionary=kk;function eZ(t,e,r,i,n,s){var o=t?xk.MULTI_INJECT_TAG:xk.INJECT_TAG,a=new SI.Metadata(o,r),u=new $k.Target(e,i,r,a);if(n!==void 0){var c=new SI.Metadata(n,s);u.metadata.push(c)}return u}function Dk(t,e,r,i,n){var s=yh(r.container,n.serviceIdentifier),o=[];return s.length===sy.BindingCount.NoBindingsAvailable&&r.container.options.autoBindInjectable&&typeof n.serviceIdentifier=="function"&&t.getConstructorMetadata(n.serviceIdentifier).compilerGeneratedMetadata&&(r.container.bind(n.serviceIdentifier).toSelf(),s=yh(r.container,n.serviceIdentifier)),e?o=s:o=s.filter(function(a){var u=new CI.Request(a.serviceIdentifier,r,i,a,n);return a.constraint(u)}),tZ(n.serviceIdentifier,o,n,r.container),o}function tZ(t,e,r,i){switch(e.length){case sy.BindingCount.NoBindingsAvailable:if(r.isOptional())return e;var n=(0,xl.getServiceIdentifierAsString)(t),s=EI.NOT_REGISTERED;throw s+=(0,xl.listMetadataForTarget)(n,r),s+=(0,xl.listRegisteredBindingsForServiceIdentifier)(i,n,yh),new Error(s);case sy.BindingCount.OnlyOneBindingAvailable:return e;case sy.BindingCount.MultipleBindingsAvailable:default:if(r.isArray())return e;var n=(0,xl.getServiceIdentifierAsString)(t),s=EI.AMBIGUOUS_MATCH+" "+n;throw s+=(0,xl.listRegisteredBindingsForServiceIdentifier)(i,n,yh),new Error(s)}}function Rk(t,e,r,i,n,s){var o,a;if(n===null){o=Dk(t,e,i,null,s),a=new CI.Request(r,i,null,o,s);var u=new ZQ.Plan(i,a);i.addPlan(u)}else o=Dk(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===Lk.BindingTypeEnum.Instance&&c.implementationType!==null){var p=(0,II.getDependencies)(t,c.implementationType);if(!i.container.options.skipBaseClassChecks){var f=(0,II.getBaseClassDependencyCount)(t,c.implementationType);if(p.length<f){var m=EI.ARGUMENTS_LENGTH_MISMATCH((0,II.getFunctionName)(c.implementationType));throw new Error(m)}}p.forEach(function(g){Rk(t,!1,g.serviceIdentifier,i,l,g)})}})}function yh(t,e){var r=[],i=kk(t);return i.hasKey(e)?r=i.get(e):t.parent!==null&&(r=yh(t.parent,e)),r}function rZ(t,e,r,i,n,s,o,a){a===void 0&&(a=!1);var u=new Tk.Context(e),c=eZ(r,i,n,"",s,o);try{return Rk(t,a,n,u,null,c),u}catch(l){throw(0,QQ.isStackOverflowExeption)(l)&&(0,xl.circularDependencyToException)(u.plan.rootRequest),l}}li.plan=rZ;function iZ(t,e,r,i){var n=new $k.Target(Lk.TargetTypeEnum.Variable,"",e,new SI.Metadata(r,i)),s=new Tk.Context(t),o=new CI.Request(e,s,null,[],n);return o}li.createMockRequest=iZ});var vh=v(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.isPromiseOrContainsPromise=Dl.isPromise=void 0;function DI(t){var e=typeof t=="object"&&t!==null||typeof t=="function";return e&&typeof t.then=="function"}Dl.isPromise=DI;function nZ(t){return DI(t)?!0:Array.isArray(t)&&t.some(DI)}Dl.isPromiseOrContainsPromise=nZ});var Mk=v(us=>{"use strict";var sZ=us&&us.__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())})},oZ=us&&us.__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(us,"__esModule",{value:!0});us.saveToScope=us.tryGetFromScope=void 0;var oy=Y(),aZ=vh(),uZ=function(t,e){return e.scope===oy.BindingScopeEnum.Singleton&&e.activated?e.cache:e.scope===oy.BindingScopeEnum.Request&&t.has(e.id)?t.get(e.id):null};us.tryGetFromScope=uZ;var cZ=function(t,e,r){e.scope===oy.BindingScopeEnum.Singleton&&pZ(e,r),e.scope===oy.BindingScopeEnum.Request&&lZ(t,e,r)};us.saveToScope=cZ;var lZ=function(t,e,r){t.has(e.id)||t.set(e.id,r)},pZ=function(t,e){t.cache=e,t.activated=!0,(0,aZ.isPromise)(e)&&fZ(t,e)},fZ=function(t,e){return sZ(void 0,void 0,void 0,function(){var r,i;return oZ(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 Ok=v(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});bh.FactoryType=void 0;var dZ;(function(t){t.DynamicValue="toDynamicValue",t.Factory="toFactory",t.Provider="toProvider"})(dZ=bh.FactoryType||(bh.FactoryType={}))});var LI=v(pi=>{"use strict";var hZ=pi&&pi.__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]}),mZ=pi&&pi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gZ=pi&&pi.__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)&&hZ(e,t,r);return mZ(e,t),e};Object.defineProperty(pi,"__esModule",{value:!0});pi.getFactoryDetails=pi.ensureFullyBound=pi.multiBindToService=void 0;var HZ=Y(),yZ=gZ(Mr()),cs=Ln(),PI=Ok(),vZ=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)})}}};pi.multiBindToService=vZ;var bZ=function(t){var e=null;switch(t.type){case cs.BindingTypeEnum.ConstantValue:case cs.BindingTypeEnum.Function:e=t.cache;break;case cs.BindingTypeEnum.Constructor:case cs.BindingTypeEnum.Instance:e=t.implementationType;break;case cs.BindingTypeEnum.DynamicValue:e=t.dynamicValue;break;case cs.BindingTypeEnum.Provider:e=t.provider;break;case cs.BindingTypeEnum.Factory:e=t.factory;break}if(e===null){var r=(0,HZ.getServiceIdentifierAsString)(t.serviceIdentifier);throw new Error(yZ.INVALID_BINDING_TYPE+" "+r)}};pi.ensureFullyBound=bZ;var wZ=function(t){switch(t.type){case cs.BindingTypeEnum.Factory:return{factory:t.factory,factoryType:PI.FactoryType.Factory};case cs.BindingTypeEnum.Provider:return{factory:t.provider,factoryType:PI.FactoryType.Provider};case cs.BindingTypeEnum.DynamicValue:return{factory:t.dynamicValue,factoryType:PI.FactoryType.DynamicValue};default:throw new Error("Unexpected factory type "+t.type)}};pi.getFactoryDetails=wZ});var qk=v(lr=>{"use strict";var Pl=lr&&lr.__assign||function(){return Pl=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},Pl.apply(this,arguments)},_Z=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]}),AZ=lr&&lr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),IZ=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)&&_Z(e,t,r);return AZ(e,t),e},Bk=lr&&lr.__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())})},Uk=lr&&lr.__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}}},EZ=lr&&lr.__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(lr,"__esModule",{value:!0});lr.resolveInstance=void 0;var TI=Mr(),kI=Ln(),$I=IZ(Kt()),RI=vh();function SZ(t,e){return t.reduce(function(r,i){var n=e(i),s=i.target.type;return s===kI.TargetTypeEnum.ConstructorArgument?r.constructorInjections.push(n):(r.propertyRequests.push(i),r.propertyInjections.push(n)),r.isAsync||(r.isAsync=(0,RI.isPromiseOrContainsPromise)(n)),r},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function CZ(t,e,r){var i;if(e.length>0){var n=SZ(e,r),s=Pl(Pl({},n),{constr:t});n.isAsync?i=xZ(s):i=jk(s)}else i=new t;return i}function jk(t){var e,r=new((e=t.constr).bind.apply(e,EZ([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 xZ(t){return Bk(this,void 0,void 0,function(){var e,r;return Uk(this,function(i){switch(i.label){case 0:return[4,Nk(t.constructorInjections)];case 1:return e=i.sent(),[4,Nk(t.propertyInjections)];case 2:return r=i.sent(),[2,jk(Pl(Pl({},t),{constructorInjections:e,propertyInjections:r}))]}})})}function Nk(t){return Bk(this,void 0,void 0,function(){var e,r,i,n;return Uk(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 Fk(t,e){var r=DZ(t,e);return(0,RI.isPromise)(r)?r.then(function(){return e}):e}function DZ(t,e){var r,i;if(Reflect.hasMetadata($I.POST_CONSTRUCT,t)){var n=Reflect.getMetadata($I.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,TI.POST_CONSTRUCT_ERROR)(t.name,s.message))}}}function PZ(t,e){t.scope!==kI.BindingScopeEnum.Singleton&&LZ(t,e)}function LZ(t,e){var r="Class cannot be instantiated in "+(t.scope===kI.BindingScopeEnum.Request?"request":"transient")+" scope.";if(typeof t.onDeactivation=="function")throw new Error((0,TI.ON_DEACTIVATION_ERROR)(e.name,r));if(Reflect.hasMetadata($I.PRE_DESTROY,e))throw new Error((0,TI.PRE_DESTROY_ERROR)(e.name,r))}function TZ(t,e,r,i){PZ(t,e);var n=CZ(e,r,i);return(0,RI.isPromise)(n)?n.then(function(s){return Fk(e,s)}):Fk(e,n)}lr.resolveInstance=TZ});var zk=v(fi=>{"use strict";var $Z=fi&&fi.__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]}),kZ=fi&&fi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),RZ=fi&&fi.__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)&&$Z(e,t,r);return kZ(e,t),e},MZ=fi&&fi.__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())})},OZ=fi&&fi.__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(fi,"__esModule",{value:!0});fi.resolve=void 0;var NZ=RZ(Mr()),ay=Ln(),FZ=xI(),Wk=Mk(),MI=vh(),Gk=LI(),BZ=vI(),UZ=qk(),OI=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=OI(t);return u(a)});if(e.target.isOptional()&&r.length===0)return;var o=r[0];return VZ(t,e,o)}},jZ=function(t,e){var r=(0,Gk.getFactoryDetails)(t);return(0,BZ.tryAndThrowErrorIfStackOverflow)(function(){return r.factory.bind(t)(e)},function(){return new Error(NZ.CIRCULAR_DEPENDENCY_IN_FACTORY(r.factoryType,e.currentRequest.serviceIdentifier.toString()))})},qZ=function(t,e,r){var i,n=e.childRequests;switch((0,Gk.ensureFullyBound)(r),r.type){case ay.BindingTypeEnum.ConstantValue:case ay.BindingTypeEnum.Function:i=r.cache;break;case ay.BindingTypeEnum.Constructor:i=r.implementationType;break;case ay.BindingTypeEnum.Instance:i=(0,UZ.resolveInstance)(r,r.implementationType,n,OI(t));break;default:i=jZ(r,e.parentContext)}return i},WZ=function(t,e,r){var i=(0,Wk.tryGetFromScope)(t,e);return i!==null||(i=r(),(0,Wk.saveToScope)(t,e,i)),i},VZ=function(t,e,r){return WZ(t,r,function(){var i=qZ(t,e,r);return(0,MI.isPromise)(i)?i=i.then(function(n){return Vk(e,r,n)}):i=Vk(e,r,i),i})};function Vk(t,e,r){var i=GZ(t.parentContext,e,r),n=XZ(t.parentContext.container),s,o=n.next();do{s=o.value;var a=t.parentContext,u=t.serviceIdentifier,c=zZ(s,u);(0,MI.isPromise)(i)?i=Kk(c,a,i):i=KZ(c,a,i),o=n.next()}while(o.done!==!0&&!(0,FZ.getBindingDictionary)(s).hasKey(t.serviceIdentifier));return i}var GZ=function(t,e,r){var i;return typeof e.onActivation=="function"?i=e.onActivation(t,r):i=r,i},KZ=function(t,e,r){for(var i=t.next();!i.done;){if(r=i.value(e,r),(0,MI.isPromise)(r))return Kk(t,e,r);i=t.next()}return r},Kk=function(t,e,r){return MZ(void 0,void 0,void 0,function(){var i,n;return OZ(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]}})})},zZ=function(t,e){var r=t._activations;return r.hasKey(e)?r.get(e).values():[].values()},XZ=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 JZ(t){var e=OI(t.plan.rootRequest.requestScope);return e(t.plan.rootRequest)}fi.resolve=JZ});var NI=v(Nr=>{"use strict";var YZ=Nr&&Nr.__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]}),QZ=Nr&&Nr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ZZ=Nr&&Nr.__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)&&YZ(e,t,r);return QZ(e,t),e};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.typeConstraint=Nr.namedConstraint=Nr.taggedConstraint=Nr.traverseAncerstors=void 0;var eee=ZZ(Kt()),tee=Tn(),Xk=function(t,e){var r=t.parentRequest;return r!==null?e(r)?!0:Xk(r,e):!1};Nr.traverseAncerstors=Xk;var Jk=function(t){return function(e){var r=function(i){return i!==null&&i.target!==null&&i.target.matchesTag(t)(e)};return r.metaData=new tee.Metadata(t,e),r}};Nr.taggedConstraint=Jk;var ree=Jk(eee.NAMED_TAG);Nr.namedConstraint=ree;var iee=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}};Nr.typeConstraint=iee});var cy=v(uy=>{"use strict";Object.defineProperty(uy,"__esModule",{value:!0});uy.BindingWhenSyntax=void 0;var Xr=ly(),tr=NI(),nee=function(){function t(e){this._binding=e}return t.prototype.when=function(e){return this._binding.constraint=e,new Xr.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(e){return this._binding.constraint=(0,tr.namedConstraint)(e),new Xr.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 Xr.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(e,r){return this._binding.constraint=(0,tr.taggedConstraint)(e)(r),new Xr.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(r){return r!==null&&(0,tr.typeConstraint)(e)(r.parentRequest)},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(e){return this._binding.constraint=function(r){return r!==null&&(0,tr.namedConstraint)(e)(r.parentRequest)},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(e,r){return this._binding.constraint=function(i){return i!==null&&(0,tr.taggedConstraint)(e)(r)(i.parentRequest)},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(r){return r!==null&&(0,tr.traverseAncerstors)(r,(0,tr.typeConstraint)(e))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(r){return r!==null&&!(0,tr.traverseAncerstors)(r,(0,tr.typeConstraint)(e))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(r){return r!==null&&(0,tr.traverseAncerstors)(r,(0,tr.namedConstraint)(e))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(r){return r!==null&&!(0,tr.traverseAncerstors)(r,(0,tr.namedConstraint)(e))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(e,r){return this._binding.constraint=function(i){return i!==null&&(0,tr.traverseAncerstors)(i,(0,tr.taggedConstraint)(e)(r))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(e,r){return this._binding.constraint=function(i){return i!==null&&!(0,tr.traverseAncerstors)(i,(0,tr.taggedConstraint)(e)(r))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(r){return r!==null&&(0,tr.traverseAncerstors)(r,e)},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(r){return r!==null&&!(0,tr.traverseAncerstors)(r,e)},new Xr.BindingOnSyntax(this._binding)},t}();uy.BindingWhenSyntax=nee});var ly=v(py=>{"use strict";Object.defineProperty(py,"__esModule",{value:!0});py.BindingOnSyntax=void 0;var Yk=cy(),see=function(){function t(e){this._binding=e}return t.prototype.onActivation=function(e){return this._binding.onActivation=e,new Yk.BindingWhenSyntax(this._binding)},t.prototype.onDeactivation=function(e){return this._binding.onDeactivation=e,new Yk.BindingWhenSyntax(this._binding)},t}();py.BindingOnSyntax=see});var FI=v(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.BindingWhenOnSyntax=void 0;var oee=ly(),aee=cy(),uee=function(){function t(e){this._binding=e,this._bindingWhenSyntax=new aee.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new oee.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}();fy.BindingWhenOnSyntax=uee});var Qk=v(dy=>{"use strict";Object.defineProperty(dy,"__esModule",{value:!0});dy.BindingInSyntax=void 0;var BI=Ln(),UI=FI(),cee=function(){function t(e){this._binding=e}return t.prototype.inRequestScope=function(){return this._binding.scope=BI.BindingScopeEnum.Request,new UI.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=BI.BindingScopeEnum.Singleton,new UI.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=BI.BindingScopeEnum.Transient,new UI.BindingWhenOnSyntax(this._binding)},t}();dy.BindingInSyntax=cee});var Zk=v(hy=>{"use strict";Object.defineProperty(hy,"__esModule",{value:!0});hy.BindingInWhenOnSyntax=void 0;var lee=Qk(),pee=ly(),fee=cy(),dee=function(){function t(e){this._binding=e,this._bindingWhenSyntax=new fee.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new pee.BindingOnSyntax(this._binding),this._bindingInSyntax=new lee.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}();hy.BindingInWhenOnSyntax=dee});var rR=v(ls=>{"use strict";var hee=ls&&ls.__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]}),mee=ls&&ls.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gee=ls&&ls.__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)&&hee(e,t,r);return mee(e,t),e};Object.defineProperty(ls,"__esModule",{value:!0});ls.BindingToSyntax=void 0;var eR=gee(Mr()),Jr=Ln(),tR=Zk(),Ll=FI(),Hee=function(){function t(e){this._binding=e}return t.prototype.to=function(e){return this._binding.type=Jr.BindingTypeEnum.Instance,this._binding.implementationType=e,new tR.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+eR.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},t.prototype.toConstantValue=function(e){return this._binding.type=Jr.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=Jr.BindingScopeEnum.Singleton,new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(e){return this._binding.type=Jr.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new tR.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(e){return this._binding.type=Jr.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=Jr.BindingScopeEnum.Singleton,new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(e){return this._binding.type=Jr.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=Jr.BindingScopeEnum.Singleton,new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(e){if(typeof e!="function")throw new Error(eR.INVALID_FUNCTION_BINDING);var r=this.toConstantValue(e);return this._binding.type=Jr.BindingTypeEnum.Function,this._binding.scope=Jr.BindingScopeEnum.Singleton,r},t.prototype.toAutoFactory=function(e){return this._binding.type=Jr.BindingTypeEnum.Factory,this._binding.factory=function(r){var i=function(){return r.container.get(e)};return i},this._binding.scope=Jr.BindingScopeEnum.Singleton,new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toAutoNamedFactory=function(e){return this._binding.type=Jr.BindingTypeEnum.Factory,this._binding.factory=function(r){return function(i){return r.container.getNamed(e,i)}},new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(e){return this._binding.type=Jr.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=Jr.BindingScopeEnum.Singleton,new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(e){this.toDynamicValue(function(r){return r.container.get(e)})},t}();ls.BindingToSyntax=Hee});var iR=v(my=>{"use strict";Object.defineProperty(my,"__esModule",{value:!0});my.ContainerSnapshot=void 0;var yee=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}();my.ContainerSnapshot=yee});var nR=v(gy=>{"use strict";Object.defineProperty(gy,"__esModule",{value:!0});gy.isClonable=void 0;function vee(t){return typeof t=="object"&&t!==null&&"clone"in t&&typeof t.clone=="function"}gy.isClonable=vee});var jI=v(ps=>{"use strict";var bee=ps&&ps.__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]}),wee=ps&&ps.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_ee=ps&&ps.__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)&&bee(e,t,r);return wee(e,t),e};Object.defineProperty(ps,"__esModule",{value:!0});ps.Lookup=void 0;var Ku=_ee(Mr()),Aee=nR(),Iee=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(Ku.NULL_ARGUMENT);if(r==null)throw new Error(Ku.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(Ku.NULL_ARGUMENT);var r=this._map.get(e);if(r!==void 0)return r;throw new Error(Ku.KEY_NOT_FOUND)},t.prototype.remove=function(e){if(e==null)throw new Error(Ku.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(Ku.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(Ku.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,Aee.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}();ps.Lookup=Iee});var oR=v(Hy=>{"use strict";Object.defineProperty(Hy,"__esModule",{value:!0});Hy.ModuleActivationStore=void 0;var sR=jI(),Eee=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 sR.Lookup,onDeactivations:new sR.Lookup};return e},t}();Hy.ModuleActivationStore=Eee});var uR=v(pr=>{"use strict";var vy=pr&&pr.__assign||function(){return vy=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},vy.apply(this,arguments)},See=pr&&pr.__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]}),Cee=pr&&pr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),aR=pr&&pr.__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)&&See(e,t,r);return Cee(e,t),e},en=pr&&pr.__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())})},tn=pr&&pr.__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}}},xee=pr&&pr.__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(pr,"__esModule",{value:!0});pr.Container=void 0;var Dee=uk(),$n=aR(Mr()),Tl=Ln(),zu=aR(Kt()),Pee=yI(),yy=xI(),Lee=zk(),Tee=rR(),Xu=vh(),$ee=la(),kee=Cl(),Ree=iR(),wh=jI(),Mee=oR(),Oee=function(){function t(e){var r=e||{};if(typeof r!="object")throw new Error(""+$n.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(r.defaultScope===void 0)r.defaultScope=Tl.BindingScopeEnum.Transient;else if(r.defaultScope!==Tl.BindingScopeEnum.Singleton&&r.defaultScope!==Tl.BindingScopeEnum.Transient&&r.defaultScope!==Tl.BindingScopeEnum.Request)throw new Error(""+$n.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(r.autoBindInjectable===void 0)r.autoBindInjectable=!1;else if(typeof r.autoBindInjectable!="boolean")throw new Error(""+$n.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(r.skipBaseClassChecks===void 0)r.skipBaseClassChecks=!1;else if(typeof r.skipBaseClassChecks!="boolean")throw new Error(""+$n.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:r.autoBindInjectable,defaultScope:r.defaultScope,skipBaseClassChecks:r.skipBaseClassChecks},this.id=(0,$ee.id)(),this._bindingDictionary=new wh.Lookup,this._snapshots=[],this._middleware=null,this._activations=new wh.Lookup,this._deactivations=new wh.Lookup,this.parent=null,this._metadataReader=new Pee.MetadataReader,this._moduleActivationStore=new Mee.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=xee([e,r],i,!0).map(function(c){return(0,yy.getBindingDictionary)(c)}),a=(0,yy.getBindingDictionary)(s);function u(c,l){c.traverse(function(p,f){f.forEach(function(m){l.add(m.serviceIdentifier,m.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 en(this,void 0,void 0,function(){var i,n,s,o,a;return tn(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 en(this,void 0,void 0,function(){var i,n,s,o;return tn(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||Tl.BindingScopeEnum.Transient,i=new Dee.Binding(e,r);return this._bindingDictionary.add(e,i),new Tee.BindingToSyntax(i)},t.prototype.rebind=function(e){return this.unbind(e),this.bind(e)},t.prototype.rebindAsync=function(e){return en(this,void 0,void 0,function(){return tn(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 en(this,void 0,void 0,function(){var r;return tn(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 wh.Lookup},t.prototype.unbindAllAsync=function(){return en(this,void 0,void 0,function(){var e,r=this;return tn(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 wh.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,zu.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,yy.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(Ree.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($n.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 en(this,void 0,void 0,function(){var r;return tn(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 en(this,void 0,void 0,function(){var n;return tn(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,zu.NAMED_TAG,r)},t.prototype.getNamedAsync=function(e,r){return this.getTaggedAsync(e,zu.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,zu.NAMED_TAG,r)},t.prototype.getAllNamedAsync=function(e,r){return this.getAllTaggedAsync(e,zu.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(zu.PRE_DESTROY,e)){var i=Reflect.getMetadata(zu.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,Xu.isPromise)(s))return this._handleDeactivationError(s.then(function(){return i._propagateContainerDeactivationThenBindingAndPreDestroyAsync(e,r,n)}),n)}var o=this._propagateContainerDeactivationThenBindingAndPreDestroy(e,r,n);if((0,Xu.isPromise)(o))return this._handleDeactivationError(o,n)}catch(a){throw new Error($n.ON_DEACTIVATION_ERROR(n.name,a.message))}},t.prototype._handleDeactivationError=function(e,r){return en(this,void 0,void 0,function(){var i;return tn(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($n.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,Xu.isPromise)(s))return s.then(function(){return i._deactivateContainerAsync(e,r)});n=r.next()}},t.prototype._deactivateContainerAsync=function(e,r){return en(this,void 0,void 0,function(){var i;return tn(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=vy(vy({},e),{contextInterceptor:function(n){return n},targetType:Tl.TargetTypeEnum.Variable});if(this._middleware){var i=this._middleware(r);if(i==null)throw new Error($n.INVALID_MIDDLEWARE_RETURN);return i}return this._planAndResolve()(r)},t.prototype._getButThrowIfAsync=function(e){var r=this._get(e);if((0,Xu.isPromiseOrContainsPromise)(r))throw new Error($n.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,yy.plan)(e._metadataReader,e,r.isMultiInject,r.targetType,r.serviceIdentifier,r.key,r.value,r.avoidConstraints);i=r.contextInterceptor(i);var n=(0,Lee.resolve)(i);return n}},t.prototype._deactivateIfSingleton=function(e){var r=this;if(e.activated)return(0,Xu.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,Xu.isPromise)(s))throw new Error($n.ASYNC_UNBIND_REQUIRED)}},t.prototype._deactivateSingletonsAsync=function(e){return en(this,void 0,void 0,function(){var r=this;return tn(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 en(this,void 0,void 0,function(){return tn(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($n.CANNOT_UNBIND+" "+(0,kee.getServiceIdentifierAsString)(e))}},t.prototype._bindingDeactivationAndPreDestroy=function(e,r,i){var n=this;if(typeof e.onDeactivation=="function"){var s=e.onDeactivation(r);if((0,Xu.isPromise)(s))return s.then(function(){return n._preDestroy(i,r)})}return this._preDestroy(i,r)},t.prototype._bindingDeactivationAndPreDestroyAsync=function(e,r,i){return en(this,void 0,void 0,function(){return tn(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}();pr.Container=Oee});var lR=v($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.AsyncContainerModule=$l.ContainerModule=void 0;var cR=la(),Nee=function(){function t(e){this.id=(0,cR.id)(),this.registry=e}return t}();$l.ContainerModule=Nee;var Fee=function(){function t(e){this.id=(0,cR.id)(),this.registry=e}return t}();$l.AsyncContainerModule=Fee});var pR=v(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});by.getFirstArrayDuplicate=void 0;function Bee(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)}}by.getFirstArrayDuplicate=Bee});var po=v(Fr=>{"use strict";var Uee=Fr&&Fr.__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]}),jee=Fr&&Fr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dR=Fr&&Fr.__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)&&Uee(e,t,r);return jee(e,t),e};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.createTaggedDecorator=Fr.tagProperty=Fr.tagParameter=Fr.decorate=void 0;var wy=dR(Mr()),hR=dR(Kt()),qee=pR();function Wee(t){return t.prototype!==void 0}function Vee(t){if(t!==void 0)throw new Error(wy.INVALID_DECORATOR_OPERATION)}function mR(t,e,r,i){Vee(e),HR(hR.TAGGED,t,r.toString(),i)}Fr.tagParameter=mR;function gR(t,e,r){if(Wee(t))throw new Error(wy.INVALID_DECORATOR_OPERATION);HR(hR.TAGGED_PROP,t.constructor,e,r)}Fr.tagProperty=gR;function Gee(t){var e=[];if(Array.isArray(t)){e=t;var r=(0,qee.getFirstArrayDuplicate)(e.map(function(i){return i.key}));if(r!==void 0)throw new Error(wy.DUPLICATED_METADATA+" "+r.toString())}else e=[t];return e}function HR(t,e,r,i){var n=Gee(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(wy.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 Kee(t){return function(e,r,i){typeof i=="number"?mR(e,r,i,t):gR(e,r,t)}}Fr.createTaggedDecorator=Kee;function fR(t,e){Reflect.decorate(t,e)}function zee(t,e){return function(r,i){e(r,i,t)}}function Xee(t,e,r){typeof r=="number"?fR([zee(r,t)],e):typeof r=="string"?Reflect.decorate([t],e,r):fR([t],e)}Fr.decorate=Xee});var vR=v(fs=>{"use strict";var Jee=fs&&fs.__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]}),Yee=fs&&fs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yR=fs&&fs.__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)&&Jee(e,t,r);return Yee(e,t),e};Object.defineProperty(fs,"__esModule",{value:!0});fs.injectable=void 0;var Qee=yR(Mr()),qI=yR(Kt());function Zee(){return function(t){if(Reflect.hasOwnMetadata(qI.PARAM_TYPES,t))throw new Error(Qee.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(qI.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(qI.PARAM_TYPES,e,t),t}}fs.injectable=Zee});var bR=v(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});_y.tagged=void 0;var ete=Tn(),tte=po();function rte(t,e){return(0,tte.createTaggedDecorator)(new ete.Metadata(t,e))}_y.tagged=rte});var wR=v(ds=>{"use strict";var ite=ds&&ds.__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]}),nte=ds&&ds.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ste=ds&&ds.__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)&&ite(e,t,r);return nte(e,t),e};Object.defineProperty(ds,"__esModule",{value:!0});ds.named=void 0;var ote=ste(Kt()),ate=Tn(),ute=po();function cte(t){return(0,ute.createTaggedDecorator)(new ate.Metadata(ote.NAMED_TAG,t))}ds.named=cte});var WI=v(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});Ay.injectBase=void 0;var lte=Mr(),pte=Tn(),fte=po();function dte(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,lte.UNDEFINED_INJECT_ANNOTATION)(s))}return(0,fte.createTaggedDecorator)(new pte.Metadata(t,e))(r,i,n)}}}Ay.injectBase=dte});var _R=v(hs=>{"use strict";var hte=hs&&hs.__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]}),mte=hs&&hs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gte=hs&&hs.__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)&&hte(e,t,r);return mte(e,t),e};Object.defineProperty(hs,"__esModule",{value:!0});hs.inject=void 0;var Hte=gte(Kt()),yte=WI(),vte=(0,yte.injectBase)(Hte.INJECT_TAG);hs.inject=vte});var AR=v(ms=>{"use strict";var bte=ms&&ms.__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=ms&&ms.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_te=ms&&ms.__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)&&bte(e,t,r);return wte(e,t),e};Object.defineProperty(ms,"__esModule",{value:!0});ms.optional=void 0;var Ate=_te(Kt()),Ite=Tn(),Ete=po();function Ste(){return(0,Ete.createTaggedDecorator)(new Ite.Metadata(Ate.OPTIONAL_TAG,!0))}ms.optional=Ste});var IR=v(gs=>{"use strict";var Cte=gs&&gs.__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]}),xte=gs&&gs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Dte=gs&&gs.__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)&&Cte(e,t,r);return xte(e,t),e};Object.defineProperty(gs,"__esModule",{value:!0});gs.unmanaged=void 0;var Pte=Dte(Kt()),Lte=Tn(),Tte=po();function $te(){return function(t,e,r){var i=new Lte.Metadata(Pte.UNMANAGED_TAG,!0);(0,Tte.tagParameter)(t,e,r,i)}}gs.unmanaged=$te});var ER=v(Hs=>{"use strict";var kte=Hs&&Hs.__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]}),Rte=Hs&&Hs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Mte=Hs&&Hs.__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)&&kte(e,t,r);return Rte(e,t),e};Object.defineProperty(Hs,"__esModule",{value:!0});Hs.multiInject=void 0;var Ote=Mte(Kt()),Nte=WI(),Fte=(0,Nte.injectBase)(Ote.MULTI_INJECT_TAG);Hs.multiInject=Fte});var SR=v(ys=>{"use strict";var Bte=ys&&ys.__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]}),Ute=ys&&ys.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jte=ys&&ys.__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)&&Bte(e,t,r);return Ute(e,t),e};Object.defineProperty(ys,"__esModule",{value:!0});ys.targetName=void 0;var qte=jte(Kt()),Wte=Tn(),Vte=po();function Gte(t){return function(e,r,i){var n=new Wte.Metadata(qte.NAME_TAG,t);(0,Vte.tagParameter)(e,r,i,n)}}ys.targetName=Gte});var VI=v(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});Iy.propertyEventDecorator=void 0;var Kte=Tn();function zte(t,e){return function(){return function(r,i){var n=new Kte.Metadata(t,i);if(Reflect.hasOwnMetadata(t,r.constructor))throw new Error(e);Reflect.defineMetadata(t,n,r.constructor)}}}Iy.propertyEventDecorator=zte});var xR=v(vs=>{"use strict";var Xte=vs&&vs.__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]}),Jte=vs&&vs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CR=vs&&vs.__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)&&Xte(e,t,r);return Jte(e,t),e};Object.defineProperty(vs,"__esModule",{value:!0});vs.postConstruct=void 0;var Yte=CR(Mr()),Qte=CR(Kt()),Zte=VI(),ere=(0,Zte.propertyEventDecorator)(Qte.POST_CONSTRUCT,Yte.MULTIPLE_POST_CONSTRUCT_METHODS);vs.postConstruct=ere});var PR=v(bs=>{"use strict";var tre=bs&&bs.__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]}),rre=bs&&bs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),DR=bs&&bs.__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)&&tre(e,t,r);return rre(e,t),e};Object.defineProperty(bs,"__esModule",{value:!0});bs.preDestroy=void 0;var ire=DR(Mr()),nre=DR(Kt()),sre=VI(),ore=(0,sre.propertyEventDecorator)(nre.PRE_DESTROY,ire.MULTIPLE_PRE_DESTROY_METHODS);bs.preDestroy=ore});var LR=v(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});Ey.interfaces=void 0;var GI;(function(t){})(GI||(GI={}));Ey.interfaces=GI});var Y=v(pe=>{"use strict";var are=pe&&pe.__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]}),ure=pe&&pe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cre=pe&&pe.__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)&&are(e,t,r);return ure(e,t),e};Object.defineProperty(pe,"__esModule",{value:!0});pe.multiBindToService=pe.getServiceIdentifierAsString=pe.typeConstraint=pe.namedConstraint=pe.taggedConstraint=pe.traverseAncerstors=pe.decorate=pe.interfaces=pe.id=pe.MetadataReader=pe.preDestroy=pe.postConstruct=pe.targetName=pe.multiInject=pe.unmanaged=pe.optional=pe.LazyServiceIdentifer=pe.inject=pe.named=pe.tagged=pe.injectable=pe.createTaggedDecorator=pe.ContainerModule=pe.AsyncContainerModule=pe.TargetTypeEnum=pe.BindingTypeEnum=pe.BindingScopeEnum=pe.Container=pe.METADATA_KEY=void 0;var lre=cre(Kt());pe.METADATA_KEY=lre;var pre=uR();Object.defineProperty(pe,"Container",{enumerable:!0,get:function(){return pre.Container}});var KI=Ln();Object.defineProperty(pe,"BindingScopeEnum",{enumerable:!0,get:function(){return KI.BindingScopeEnum}});Object.defineProperty(pe,"BindingTypeEnum",{enumerable:!0,get:function(){return KI.BindingTypeEnum}});Object.defineProperty(pe,"TargetTypeEnum",{enumerable:!0,get:function(){return KI.TargetTypeEnum}});var TR=lR();Object.defineProperty(pe,"AsyncContainerModule",{enumerable:!0,get:function(){return TR.AsyncContainerModule}});Object.defineProperty(pe,"ContainerModule",{enumerable:!0,get:function(){return TR.ContainerModule}});var fre=po();Object.defineProperty(pe,"createTaggedDecorator",{enumerable:!0,get:function(){return fre.createTaggedDecorator}});var dre=vR();Object.defineProperty(pe,"injectable",{enumerable:!0,get:function(){return dre.injectable}});var hre=bR();Object.defineProperty(pe,"tagged",{enumerable:!0,get:function(){return hre.tagged}});var mre=wR();Object.defineProperty(pe,"named",{enumerable:!0,get:function(){return mre.named}});var gre=_R();Object.defineProperty(pe,"inject",{enumerable:!0,get:function(){return gre.inject}});var Hre=bI();Object.defineProperty(pe,"LazyServiceIdentifer",{enumerable:!0,get:function(){return Hre.LazyServiceIdentifer}});var yre=AR();Object.defineProperty(pe,"optional",{enumerable:!0,get:function(){return yre.optional}});var vre=IR();Object.defineProperty(pe,"unmanaged",{enumerable:!0,get:function(){return vre.unmanaged}});var bre=ER();Object.defineProperty(pe,"multiInject",{enumerable:!0,get:function(){return bre.multiInject}});var wre=SR();Object.defineProperty(pe,"targetName",{enumerable:!0,get:function(){return wre.targetName}});var _re=xR();Object.defineProperty(pe,"postConstruct",{enumerable:!0,get:function(){return _re.postConstruct}});var Are=PR();Object.defineProperty(pe,"preDestroy",{enumerable:!0,get:function(){return Are.preDestroy}});var Ire=yI();Object.defineProperty(pe,"MetadataReader",{enumerable:!0,get:function(){return Ire.MetadataReader}});var Ere=la();Object.defineProperty(pe,"id",{enumerable:!0,get:function(){return Ere.id}});var Sre=LR();Object.defineProperty(pe,"interfaces",{enumerable:!0,get:function(){return Sre.interfaces}});var Cre=po();Object.defineProperty(pe,"decorate",{enumerable:!0,get:function(){return Cre.decorate}});var Sy=NI();Object.defineProperty(pe,"traverseAncerstors",{enumerable:!0,get:function(){return Sy.traverseAncerstors}});Object.defineProperty(pe,"taggedConstraint",{enumerable:!0,get:function(){return Sy.taggedConstraint}});Object.defineProperty(pe,"namedConstraint",{enumerable:!0,get:function(){return Sy.namedConstraint}});Object.defineProperty(pe,"typeConstraint",{enumerable:!0,get:function(){return Sy.typeConstraint}});var xre=Cl();Object.defineProperty(pe,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return xre.getServiceIdentifierAsString}});var Dre=LI();Object.defineProperty(pe,"multiBindToService",{enumerable:!0,get:function(){return Dre.multiBindToService}})});var JR=v(XR=>{var zR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");XR.encode=function(t){if(0<=t&&t<zR.length)return zR[t];throw new TypeError("Must be between 0 and 63: "+t)}});var eE=v(ZR=>{var Mre=JR(),YR=5,QR=1<<YR,Ore=QR-1,Nre=QR;function Fre(t){return t<0?(-t<<1)+1:(t<<1)+0}ZR.encode=function(e){let r="",i,n=Fre(e);do i=n&Ore,n>>>=YR,n>0&&(i|=Nre),r+=Mre.encode(i);while(n>0);return r}});var tM=v((IIe,eM)=>{"use strict";eM.exports=typeof URL=="function"?URL:require("url").URL});var xh=v(As=>{var da=tM();function Bre(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}As.getArg=Bre;var iM=function(){return!("__proto__"in Object.create(null))}();function nM(t){return t}function Ure(t){return sM(t)?"$"+t:t}As.toSetString=iM?nM:Ure;function jre(t){return sM(t)?t.slice(1):t}As.fromSetString=iM?nM:jre;function sM(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 rM(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function qre(t,e){let r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=rM(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:rM(t.name,e.name)}As.compareByGeneratedPositionsInflated=qre;function Wre(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}As.parseSourceMapInput=Wre;var rE="http:",Sh=`${rE}//host`;function iE(t){return e=>{let r=Rl(e),i=nE(e),n=new da(e,i);t(n);let s=n.toString();return r==="absolute"?s:r==="scheme-relative"?s.slice(rE.length):r==="path-absolute"?s.slice(Sh.length):sE(i,s)}}function fa(t,e){return new da(t,e).toString()}function Vre(t,e){let r=0;do{let i=t+r++;if(e.indexOf(i)===-1)return i}while(!0)}function nE(t){let e=t.split("..").length-1,r=Vre("p",t),i=`${Sh}/`;for(let n=0;n<e;n++)i+=`${r}/`;return i}var Gre=/^[A-Za-z0-9\+\-\.]+:/;function Rl(t){return t[0]==="/"?t[1]==="/"?"scheme-relative":"path-absolute":Gre.test(t)?"absolute":"path-relative"}function sE(t,e){typeof t=="string"&&(t=new da(t)),typeof e=="string"&&(e=new da(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 Kre=iE(t=>{t.pathname=t.pathname.replace(/\/?$/,"/")}),zre=iE(t=>{t.href=new da(".",t.toString()).toString()}),Ch=iE(t=>{});As.normalize=Ch;function tE(t,e){let r=Rl(e),i=Rl(t);if(t=Kre(t),r==="absolute")return fa(e,void 0);if(i==="absolute")return fa(e,t);if(r==="scheme-relative")return Ch(e);if(i==="scheme-relative")return fa(e,fa(t,Sh)).slice(rE.length);if(r==="path-absolute")return Ch(e);if(i==="path-absolute")return fa(e,fa(t,Sh)).slice(Sh.length);let n=nE(e+t),s=fa(e,fa(t,n));return sE(n,s)}As.join=tE;function Xre(t,e){let r=Jre(t,e);return typeof r=="string"?r:Ch(e)}As.relative=Xre;function Jre(t,e){if(Rl(t)!==Rl(e))return null;let i=nE(t+e),n=new da(t,i),s=new da(e,i);try{new da("",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:sE(n,s)}function Yre(t,e,r){t&&Rl(e)==="path-absolute"&&(e=e.replace(/^\//,""));let i=Ch(e||"");return t&&(i=tE(t,i)),r&&(i=tE(zre(r),i)),i}As.computeSourceURL=Yre});var oE=v(oM=>{var Dh=class{constructor(){this._array=[],this._set=new Map}static fromArray(e,r){let i=new Dh;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()}};oM.ArraySet=Dh});var cM=v(uM=>{var aM=xh();function Qre(t,e){let r=t.generatedLine,i=e.generatedLine,n=t.generatedColumn,s=e.generatedColumn;return i>r||i==r&&s>=n||aM.compareByGeneratedPositionsInflated(t,e)<=0}var aE=class{constructor(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}unsortedForEach(e,r){this._array.forEach(e,r)}add(e){Qre(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))}toArray(){return this._sorted||(this._array.sort(aM.compareByGeneratedPositionsInflated),this._sorted=!0),this._array}};uM.MappingList=aE});var uE=v(lM=>{var Ph=eE(),Xt=xh(),My=oE().ArraySet,Zre=cM().MappingList,Ml=class{constructor(e){e||(e={}),this._file=Xt.getArg(e,"file",null),this._sourceRoot=Xt.getArg(e,"sourceRoot",null),this._skipValidation=Xt.getArg(e,"skipValidation",!1),this._sources=new My,this._names=new My,this._mappings=new Zre,this._sourcesContents=null}static fromSourceMap(e){let r=e.sourceRoot,i=new Ml({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=Xt.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=Xt.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=Xt.getArg(e,"generated"),i=Xt.getArg(e,"original",null),n=Xt.getArg(e,"source",null),s=Xt.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=Xt.relative(this._sourceRoot,i)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Xt.toSetString(i)]=r):this._sourcesContents&&(delete this._sourcesContents[Xt.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=Xt.relative(s,n));let o=this._mappings.toArray().length>0?new My:this._sources,a=new My;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=Xt.join(i,u.source)),s!=null&&(u.source=Xt.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=Xt.join(i,u)),s!=null&&(u=Xt.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 m=0,g=f.length;m<g;m++){if(c=f[m],u="",c.generatedLine!==r)for(e=0;c.generatedLine!==r;)u+=";",r++;else if(m>0){if(!Xt.compareByGeneratedPositionsInflated(c,f[m-1]))continue;u+=","}u+=Ph.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(p=this._sources.indexOf(c.source),u+=Ph.encode(p-o),o=p,u+=Ph.encode(c.originalLine-1-n),n=c.originalLine-1,u+=Ph.encode(c.originalColumn-i),i=c.originalColumn,c.name!=null&&(l=this._names.indexOf(c.name),u+=Ph.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=Xt.relative(r,i));let n=Xt.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())}};Ml.prototype._version=3;lM.SourceMapGenerator=Ml});var pM=v(Qu=>{Qu.GREATEST_LOWER_BOUND=1;Qu.LEAST_UPPER_BOUND=2;function cE(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?cE(o,e,r,i,n,s):s==Qu.LEAST_UPPER_BOUND?e<i.length?e:-1:o:o-t>1?cE(t,o,r,i,n,s):s==Qu.LEAST_UPPER_BOUND?o:t<0?-1:t}Qu.search=function(e,r,i,n){if(r.length===0)return-1;let s=cE(-1,r.length,e,r,i,n||Qu.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&i(r[s],r[s-1],!0)===0;)--s;return s}});var pE=v((PIe,lE)=>{"use strict";var eie=require("fs"),tie=require("path");lE.exports=function(){return new Promise((e,r)=>{let i=tie.join(__dirname,"mappings.wasm");eie.readFile(i,null,(n,s)=>{if(n){r(n);return}e(s.buffer)})})};lE.exports.initialize=t=>{console.debug("SourceMapConsumer.initialize is a no-op when running in node.js")}});var dM=v((LIe,fM)=>{var rie=pE();function iie(){this.generatedLine=0,this.generatedColumn=0,this.lastGeneratedColumn=null,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Lh=null;fM.exports=function(){if(Lh)return Lh;let e=[];return Lh=rie().then(r=>WebAssembly.instantiate(r,{env:{mapping_callback(i,n,s,o,a,u,c,l,p,f){let m=new iie;m.generatedLine=i+1,m.generatedColumn=n,s&&(m.lastGeneratedColumn=o-1),a&&(m.source=u,m.originalLine=c+1,m.originalColumn=l,p&&(m.name=f)),e[e.length-1](m)},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 Lh=null,r}),Lh}});var hM=v(Ny=>{var xe=xh(),nie=pM(),fE=oE().ArraySet,TIe=eE(),sie=pE(),oie=dM(),dE=Symbol("smcInternal"),Bt=class{constructor(e,r){return e==dE?Promise.resolve(this):aie(e,r)}static initialize(e){sie.initialize(e["lib/mappings.wasm"])}static fromSourceMap(e,r){return uie(e,r)}static async with(e,r,i){let n=await new Bt(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")}};Bt.prototype._version=3;Bt.GENERATED_ORDER=1;Bt.ORIGINAL_ORDER=2;Bt.GREATEST_LOWER_BOUND=1;Bt.LEAST_UPPER_BOUND=2;Ny.SourceMapConsumer=Bt;var ha=class extends Bt{constructor(e,r){return super(dE).then(i=>{let n=e;typeof e=="string"&&(n=xe.parseSourceMapInput(e));let s=xe.getArg(n,"version"),o=xe.getArg(n,"sources").map(String),a=xe.getArg(n,"names",[]),u=xe.getArg(n,"sourceRoot",null),c=xe.getArg(n,"sourcesContent",null),l=xe.getArg(n,"mappings"),p=xe.getArg(n,"file",null);if(s!=i._version)throw new Error("Unsupported version: "+s);return i._sourceLookupCache=new Map,i._names=fE.fromArray(a.map(String),!0),i._sources=fE.fromArray(o,!0),i._absoluteSources=fE.fromArray(i._sources.toArray().map(function(f){return xe.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,oie().then(f=>(i._wasm=f,i))})}_findSourceIndex(e){let r=this._sourceLookupCache.get(e);if(typeof r=="number")return r;let i=xe.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=xe.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 ha(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||Bt.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 Bt.GENERATED_ORDER:this._wasm.exports.by_generated_location(this._getMappingsPtr());break;case Bt.ORIGINAL_ORDER:this._wasm.exports.by_original_location(this._getMappingsPtr());break;default:throw new Error("Unknown order of iteration.")}})}allGeneratedPositionsFor(e){let r=xe.getArg(e,"source"),i=xe.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:xe.getArg(e,"line"),generatedColumn:xe.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=xe.getArg(e,"bias",Bt.GREATEST_LOWER_BOUND);i==null&&(i=Bt.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=xe.getArg(n,"source",null);s!==null&&(s=this._absoluteSources.at(s));let o=xe.getArg(n,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:xe.getArg(n,"originalLine",null),column:xe.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=xe.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};let i={source:r,originalLine:xe.getArg(e,"line"),originalColumn:xe.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=xe.getArg(e,"bias",Bt.GREATEST_LOWER_BOUND);n==null&&(n=Bt.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:xe.getArg(s,"generatedLine",null),column:xe.getArg(s,"generatedColumn",null),lastColumn:o}}return{line:null,column:null,lastColumn:null}}};ha.prototype.consumer=Bt;Ny.BasicSourceMapConsumer=ha;var Oy=class extends Bt{constructor(e,r){return super(dE).then(i=>{let n=e;typeof e=="string"&&(n=xe.parseSourceMapInput(e));let s=xe.getArg(n,"version"),o=xe.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=xe.getArg(u,"offset"),l=xe.getArg(c,"line"),p=xe.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 Bt(xe.getArg(u,"map"),r).then(m=>({generatedOffset:{generatedLine:l+1,generatedColumn:p+1},consumer:m}))})).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:xe.getArg(e,"line"),generatedColumn:xe.getArg(e,"column")},i=nie.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(xe.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(xe.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()}};Ny.IndexedSourceMapConsumer=Oy;function aie(t,e){let r=t;typeof t=="string"&&(r=xe.parseSourceMapInput(t));let i=r.sections!=null?new Oy(r,e):new ha(r,e);return Promise.resolve(i)}function uie(t,e){return ha.fromSourceMap(t,e)}});var gM=v(mM=>{var cie=uE().SourceMapGenerator,Fy=xh(),lie=/(\r?\n)/,pie=10,Ol="$$$isSourceNode$$$",Nl=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[Ol]=!0,n!=null&&this.add(n)}static fromStringWithSourceMap(e,r,i){let n=new Nl,s=e.split(lie),o=0,a=function(){let m=H(),g=H()||"";return m+g;function H(){return o<s.length?s[o++]:void 0}},u=1,c=0,l=null,p;return r.eachMapping(function(m){if(l!==null)if(u<m.generatedLine)f(l,a()),u++,c=0;else{p=s[o]||"";let g=p.substr(0,m.generatedColumn-c);s[o]=p.substr(m.generatedColumn-c),c=m.generatedColumn,f(l,g),l=m;return}for(;u<m.generatedLine;)n.add(a()),u++;c<m.generatedColumn&&(p=s[o]||"",n.add(p.substr(0,m.generatedColumn)),s[o]=p.substr(m.generatedColumn),c=m.generatedColumn),l=m},this),o<s.length&&(l&&f(l,a()),n.add(s.splice(o).join(""))),r.sources.forEach(function(m){let g=r.sourceContentFor(m);g!=null&&(i!=null&&(m=Fy.join(i,m)),n.setSourceContent(m,g))}),n;function f(m,g){if(m===null||m.source===void 0)n.add(g);else{let H=i?Fy.join(i,m.source):m.source;n.add(new Nl(m.originalLine,m.originalColumn,H,g,m.name))}}}add(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Ol]||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[Ol]||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[Ol]?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[Ol]?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[Fy.toSetString(e)]=r}walkSourceContents(e){for(let i=0,n=this.children.length;i<n;i++)this.children[i][Ol]&&this.children[i].walkSourceContents(e);let r=Object.keys(this.sourceContents);for(let i=0,n=r.length;i<n;i++)e(Fy.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 cie(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)===pie?(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}}};mM.SourceNode=Nl});var Uy=v(By=>{By.SourceMapGenerator=uE().SourceMapGenerator;By.SourceMapConsumer=hM().SourceMapConsumer;By.SourceNode=gM().SourceNode});var sv=v(EO=>{(function t(e){"use strict";var r,i,n,s,o,a;function u(x){var L={},q,j;for(q in x)x.hasOwnProperty(q)&&(j=x[q],typeof j=="object"&&j!==null?L[q]=u(j):L[q]=j);return L}function c(x,L){var q,j,F,T;for(j=x.length,F=0;j;)q=j>>>1,T=F+q,L(x[T])?j=q:(F=T+1,j-=q+1);return F}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(x,L){this.parent=x,this.key=L}l.prototype.replace=function(L){this.parent[this.key]=L},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function p(x,L,q,j){this.node=x,this.path=L,this.wrap=q,this.ref=j}function f(){}f.prototype.path=function(){var L,q,j,F,T,O;function E(M,N){if(Array.isArray(N))for(j=0,F=N.length;j<F;++j)M.push(N[j]);else M.push(N)}if(!this.__current.path)return null;for(T=[],L=2,q=this.__leavelist.length;L<q;++L)O=this.__leavelist[L],E(T,O.path);return E(T,this.__current.path),T},f.prototype.type=function(){var x=this.current();return x.type||this.__current.wrap},f.prototype.parents=function(){var L,q,j;for(j=[],L=1,q=this.__leavelist.length;L<q;++L)j.push(this.__leavelist[L].node);return j},f.prototype.current=function(){return this.__current.node},f.prototype.__execute=function(L,q){var j,F;return F=void 0,j=this.__current,this.__current=q,this.__state=null,L&&(F=L.call(this,q.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=j,F},f.prototype.notify=function(L){this.__state=L},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(x,L){this.visitor=L,this.root=x,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,L.fallback==="iteration"?this.__fallback=Object.keys:typeof L.fallback=="function"&&(this.__fallback=L.fallback),this.__keys=n,L.keys&&(this.__keys=Object.assign(Object.create(this.__keys),L.keys))};function m(x){return x==null?!1:typeof x=="object"&&typeof x.type=="string"}function g(x,L){return(x===r.ObjectExpression||x===r.ObjectPattern)&&L==="properties"}function H(x,L){for(var q=x.length-1;q>=0;--q)if(x[q].node===L)return!0;return!1}f.prototype.traverse=function(L,q){var j,F,T,O,E,M,N,z,D,P,ee,re;for(this.__initialize(L,q),re={},j=this.__worklist,F=this.__leavelist,j.push(new p(L,null,null,null)),F.push(new p(null,null,null,null));j.length;){if(T=j.pop(),T===re){if(T=F.pop(),M=this.__execute(q.leave,T),this.__state===s||M===s)return;continue}if(T.node){if(M=this.__execute(q.enter,T),this.__state===s||M===s)return;if(j.push(re),F.push(T),this.__state===o||M===o)continue;if(O=T.node,E=O.type||T.wrap,P=this.__keys[E],!P)if(this.__fallback)P=this.__fallback(O);else throw new Error("Unknown node type "+E+".");for(z=P.length;(z-=1)>=0;)if(N=P[z],ee=O[N],!!ee){if(Array.isArray(ee)){for(D=ee.length;(D-=1)>=0;)if(ee[D]&&!H(F,ee[D])){if(g(E,P[z]))T=new p(ee[D],[N,D],"Property",null);else if(m(ee[D]))T=new p(ee[D],[N,D],null,null);else continue;j.push(T)}}else if(m(ee)){if(H(F,ee))continue;j.push(new p(ee,N,null,null))}}}}},f.prototype.replace=function(L,q){var j,F,T,O,E,M,N,z,D,P,ee,re,ie;function J(te){var ce,ae,he,dt;if(te.ref.remove()){for(ae=te.ref.key,dt=te.ref.parent,ce=j.length;ce--;)if(he=j[ce],he.ref&&he.ref.parent===dt){if(he.ref.key<ae)break;--he.ref.key}}}for(this.__initialize(L,q),ee={},j=this.__worklist,F=this.__leavelist,re={root:L},M=new p(L,null,null,new l(re,"root")),j.push(M),F.push(M);j.length;){if(M=j.pop(),M===ee){if(M=F.pop(),E=this.__execute(q.leave,M),E!==void 0&&E!==s&&E!==o&&E!==a&&M.ref.replace(E),(this.__state===a||E===a)&&J(M),this.__state===s||E===s)return re.root;continue}if(E=this.__execute(q.enter,M),E!==void 0&&E!==s&&E!==o&&E!==a&&(M.ref.replace(E),M.node=E),(this.__state===a||E===a)&&(J(M),M.node=null),this.__state===s||E===s)return re.root;if(T=M.node,!!T&&(j.push(ee),F.push(M),!(this.__state===o||E===o))){if(O=T.type||M.wrap,D=this.__keys[O],!D)if(this.__fallback)D=this.__fallback(T);else throw new Error("Unknown node type "+O+".");for(N=D.length;(N-=1)>=0;)if(ie=D[N],P=T[ie],!!P)if(Array.isArray(P)){for(z=P.length;(z-=1)>=0;)if(P[z]){if(g(O,D[N]))M=new p(P[z],[ie,z],"Property",new l(P,z));else if(m(P[z]))M=new p(P[z],[ie,z],null,new l(P,z));else continue;j.push(M)}}else m(P)&&j.push(new p(P,ie,null,new l(T,ie)))}}return re.root};function b(x,L){var q=new f;return q.traverse(x,L)}function w(x,L){var q=new f;return q.replace(x,L)}function k(x,L){var q;return q=c(L,function(F){return F.range[0]>x.range[0]}),x.extendedRange=[x.range[0],x.range[1]],q!==L.length&&(x.extendedRange[1]=L[q].range[0]),q-=1,q>=0&&(x.extendedRange[0]=L[q].range[1]),x}function U(x,L,q){var j=[],F,T,O,E;if(!x.range)throw new Error("attachComments needs range information");if(!q.length){if(L.length){for(O=0,T=L.length;O<T;O+=1)F=u(L[O]),F.extendedRange=[0,x.range[0]],j.push(F);x.leadingComments=j}return x}for(O=0,T=L.length;O<T;O+=1)j.push(k(u(L[O]),q));return E=0,b(x,{enter:function(M){for(var N;E<j.length&&(N=j[E],!(N.extendedRange[1]>M.range[0]));)N.extendedRange[1]===M.range[0]?(M.leadingComments||(M.leadingComments=[]),M.leadingComments.push(N),j.splice(E,1)):E+=1;if(E===j.length)return i.Break;if(j[E].extendedRange[0]>M.range[1])return i.Skip}}),E=0,b(x,{leave:function(M){for(var N;E<j.length&&(N=j[E],!(M.range[1]<N.extendedRange[0]));)M.range[1]===N.extendedRange[0]?(M.trailingComments||(M.trailingComments=[]),M.trailingComments.push(N),j.splice(E,1)):E+=1;if(E===j.length)return i.Break;if(j[E].extendedRange[0]>M.range[1])return i.Skip}}),x}return e.Syntax=r,e.traverse=b,e.replace=w,e.attachComments=U,e.VisitorKeys=n,e.VisitorOption=i,e.Controller=f,e.cloneEnvironment=function(){return t({})},e})(EO)});var QO=v(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});function une(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)}Ca.toUtf8_1=une;function cne(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)}Ca.toUtf8_2=cne;function YO(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)}Ca.toUtf8_3=YO;Ca.toUtf8=YO;Ca.default=Ca.toUtf8});var tN=v(KE=>{"use strict";Object.defineProperty(KE,"__esModule",{value:!0});var lne=QO(),ep=2654435761,tp=2246822519,Hv=3266489917,ZO=668265263,eN=374761393;function pne(t,e=0){t=typeof t=="string"?lne.default(t):t;let r=t,i=e+eN&4294967295,n=0;if(r.length>=16){let o=[e+ep+tp&4294967295,e+tp&4294967295,e+0&4294967295,e-ep&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),m=p*tp+(f*tp<<16),g=o[c]+m&4294967295;g=g<<13|g>>>19;let H=g&65535,b=g>>>16;o[c]=H*ep+(b*ep<<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*Hv+(u*Hv<<16);i=i+c&4294967295,i=i<<17|i>>>15,i=(i&65535)*ZO+((i>>>16)*ZO<<16)&4294967295}for(;n<r.length;++n){let o=r[n];i=i+o*eN,i=i<<11|i>>>21,i=(i&65535)*ep+((i>>>16)*ep<<16)&4294967295}return i=i^i>>>15,i=((i&65535)*tp&4294967295)+((i>>>16)*tp<<16),i=i^i>>>13,i=((i&65535)*Hv&4294967295)+((i>>>16)*Hv<<16),i=i^i>>>16,i<0?i+4294967296:i}KE.xxHash32=pne});var zE=v(yv=>{"use strict";function fne(t){for(var e in t)yv.hasOwnProperty(e)||(yv[e]=t[e])}Object.defineProperty(yv,"__esModule",{value:!0});fne(tN())});var aN=v((_Se,Jh)=>{var sN={};sN.__wbindgen_placeholder__=Jh.exports;var Nn,{TextDecoder:gne}=require("util"),oN=new gne("utf-8",{ignoreBOM:!0,fatal:!0});oN.decode();var Ev=null;function YE(){return(Ev===null||Ev.buffer!==Nn.memory.buffer)&&(Ev=new Uint8Array(Nn.memory.buffer)),Ev}function Hne(t,e){return oN.decode(YE().subarray(t,t+e))}var JE=0;function nN(t,e){let r=e(t.length*1);return YE().set(t,r/1),JE=t.length,r}var op=class{static __wrap(e){let r=Object.create(op.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();Nn.__wbg_hasher_free(e)}constructor(){var e=Nn.hasher_new();return op.__wrap(e)}update(e){var r=nN(e,Nn.__wbindgen_malloc),i=JE;Nn.hasher_update(this.ptr,r,i)}digest(e){try{var r=nN(e,Nn.__wbindgen_malloc),i=JE;Nn.hasher_digest(this.ptr,r,i)}finally{e.set(YE().subarray(r/1,r/1+i)),Nn.__wbindgen_free(r,i*1)}}};Jh.exports.Hasher=op;Jh.exports.__wbindgen_throw=function(t,e){throw new Error(Hne(t,e))};var yne=require("path").join(__dirname,"chromehash_bg.wasm"),vne=require("fs").readFileSync(yne),bne=new WebAssembly.Module(vne),wne=new WebAssembly.Instance(bne,sN);Nn=wne.exports;Jh.exports.__wasm=Nn});var dN=v(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.shaHashFile=Ps.hashFile=Ps.shaHash=Ps.hash=void 0;var lN=aN(),pN=require("fs"),uN=require("string_decoder"),fN=require("crypto"),Cv=Buffer.alloc(4*5),_ne=t=>{let e=new lN.Hasher;return e.update(Sne(t)),e.digest(Cv),e.free(),Cv.toString("hex")};Ps.hash=_ne;var Ane=t=>{let e=(0,fN.createHash)("sha256");return e.update(Cne(t)),e.digest("hex")};Ps.shaHash=Ane;var Ine=async(t,e=4096)=>{e%2===1&&e++;let r=Buffer.alloc(e),i=new lN.Hasher,n;try{n=await pN.promises.open(t,"r");let s=await n.read(r,0,r.length,null),o=r.slice(0,s.bytesRead);if(Dv(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(Pv(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(xv(o)){let a=new uN.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 uN.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(Cv),Cv.toString("hex")}finally{i.free(),n!==void 0&&await n.close()}};Ps.hashFile=Ine;var Sv={stream:!0},Ene=async(t,e=4096)=>{e%2===1&&e++;let r=Buffer.alloc(e),i=(0,fN.createHash)("sha256"),n;try{n=await pN.promises.open(t,"r");let s=await n.read(r,0,r.length,null),o=r.slice(0,s.bytesRead);if(Dv(o)){let a=new TextDecoder("utf-16le");for(i.update(a.decode(o.slice(2),Sv));s.bytesRead>0;)s=await n.read(r,0,r.length,null),i.update(a.decode(r.slice(0,s.bytesRead),Sv))}else if(Pv(o)){let a=new TextDecoder("utf-16be");for(i.update(a.decode(o.slice(2),Sv));s.bytesRead>0;)s=await n.read(r,0,r.length,null),i.update(a.decode(r.slice(0,s.bytesRead),Sv))}else if(xv(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())}};Ps.shaHashFile=Ene;var xv=t=>t.length>=3&&t[0]===239&&t[1]===187&&t[2]===191,Dv=t=>t.length>=2&&t[0]===255&&t[1]===254,Pv=t=>t.length>=2&&t[0]===254&&t[1]===255,Sne=t=>xv(t)?cN(t.slice(3)):Dv(t)?t.slice(2):Pv(t)?t.slice(2).swap16():cN(t),Cne=t=>xv(t)?t.slice(3):Dv(t)?new TextEncoder().encode(new TextDecoder("utf-16le").decode(t.slice(2))):Pv(t)?new TextEncoder().encode(new TextDecoder("utf-16be").decode(t.slice(2))):t,cN=t=>Buffer.from(t.toString("utf8"),"utf16le")});var jv=v(ln=>{"use strict";ln.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;ln.find=(t,e)=>t.nodes.find(r=>r.type===e);ln.exceedsLimit=(t,e,r=1,i)=>i===!1||!ln.isInteger(t)||!ln.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=i;ln.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)};ln.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);ln.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;ln.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;ln.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);ln.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 qv=v((Rxe,qN)=>{"use strict";var jN=jv();qN.exports=(t,e={})=>{let r=(i,n={})=>{let s=e.escapeInvalid&&jN.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a="";if(i.value)return(s||o)&&jN.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 VN=v((Mxe,WN)=>{"use strict";WN.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var eF=v((Oxe,ZN)=>{"use strict";var GN=VN(),fc=(t,e,r)=>{if(GN(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(GN(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(fc.cache.hasOwnProperty(u))return fc.cache[u].result;let c=Math.min(t,e),l=Math.max(t,e);if(Math.abs(c-l)===1){let H=t+"|"+e;return i.capture?`(${H})`:i.wrap===!1?H:`(?:${H})`}let p=QN(t)||QN(e),f={min:t,max:e,a:c,b:l},m=[],g=[];if(p&&(f.isPadded=p,f.maxLen=String(f.max).length),c<0){let H=l<0?Math.abs(l):1;g=KN(H,Math.abs(c),f,i),c=f.a=0}return l>=0&&(m=KN(c,l,f,i)),f.negatives=g,f.positives=m,f.result=Vne(g,m,i),i.capture===!0?f.result=`(${f.result})`:i.wrap!==!1&&m.length+g.length>1&&(f.result=`(?:${f.result})`),fc.cache[u]=f,f.result};function Vne(t,e,r){let i=aS(t,e,"-",!1,r)||[],n=aS(e,t,"",!1,r)||[],s=aS(t,e,"-?",!0,r)||[];return i.concat(s).concat(n).join("|")}function Gne(t,e){let r=1,i=1,n=XN(t,r),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),r+=1,n=XN(t,r);for(n=JN(e+1,i)-1;t<n&&n<=e;)s.add(n),i+=1,n=JN(e+1,i)-1;return s=[...s],s.sort(Xne),s}function Kne(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let i=zne(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+=Jne(u,c,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:n}}function KN(t,e,r,i){let n=Gne(t,e),s=[],o=t,a;for(let u=0;u<n.length;u++){let c=n[u],l=Kne(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+YN(a.count),o=c+1;continue}r.isPadded&&(p=Yne(c,r,i)),l.string=p+l.pattern+YN(l.count),s.push(l),o=c+1,a=l}return s}function aS(t,e,r,i,n){let s=[];for(let o of t){let{string:a}=o;!i&&!zN(e,"string",a)&&s.push(r+a),i&&zN(e,"string",a)&&s.push(r+a)}return s}function zne(t,e){let r=[];for(let i=0;i<t.length;i++)r.push([t[i],e[i]]);return r}function Xne(t,e){return t>e?1:e>t?-1:0}function zN(t,e,r){return t.some(i=>i[e]===r)}function XN(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function JN(t,e){return t-t%Math.pow(10,e)}function YN(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Jne(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function QN(t){return/^-?(0+)\d/.test(t)}function Yne(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}}`}}fc.cache={};fc.clearCache=()=>fc.cache={};ZN.exports=fc});var lS=v((Nxe,uF)=>{"use strict";var Qne=require("util"),iF=eF(),tF=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Zne=t=>e=>t===!0?Number(e):String(e),uS=t=>typeof t=="number"||typeof t=="string"&&t!=="",rm=t=>Number.isInteger(+t),cS=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},ese=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,tse=(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},rF=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},rse=(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},nF=(t,e,r,i)=>{if(r)return iF(t,e,{wrap:!1,...i});let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},sF=(t,e,r)=>{if(Array.isArray(t)){let i=r.wrap===!0,n=r.capture?"":"?:";return i?`(${n}${t.join("|")})`:t.join("|")}return iF(t,e,r)},oF=(...t)=>new RangeError("Invalid range arguments: "+Qne.inspect(...t)),aF=(t,e,r)=>{if(r.strictRanges===!0)throw oF([t,e]);return[]},ise=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},nse=(t,e,r=1,i={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(i.strictRanges===!0)throw oF([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=cS(a)||cS(u)||cS(c),p=l?Math.max(a.length,u.length,c.length):0,f=l===!1&&ese(t,e,i)===!1,m=i.transform||Zne(f);if(i.toRegex&&r===1)return nF(rF(t,p),rF(e,p),!0,i);let g={negatives:[],positives:[]},H=k=>g[k<0?"negatives":"positives"].push(Math.abs(k)),b=[],w=0;for(;o?n>=s:n<=s;)i.toRegex===!0&&r>1?H(n):b.push(tse(m(n,w),p,f)),n=o?n-r:n+r,w++;return i.toRegex===!0?r>1?rse(g,i):sF(b,null,{wrap:!1,...i}):b},sse=(t,e,r=1,i={})=>{if(!rm(t)&&t.length>1||!rm(e)&&e.length>1)return aF(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 nF(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?sF(l,null,{wrap:!1,options:i}):l},Wv=(t,e,r,i={})=>{if(e==null&&uS(t))return[t];if(!uS(t)||!uS(e))return aF(t,e,i);if(typeof r=="function")return Wv(t,e,1,{transform:r});if(tF(r))return Wv(t,e,0,r);let n={...i};return n.capture===!0&&(n.wrap=!0),r=r||n.step||1,rm(r)?rm(t)&&rm(e)?nse(t,e,r,n):sse(t,e,Math.max(Math.abs(r),1),n):r!=null&&!tF(r)?ise(r,n):Wv(t,e,1,r)};uF.exports=Wv});var pF=v((Fxe,lF)=>{"use strict";var ose=lS(),cF=jv(),ase=(t,e={})=>{let r=(i,n={})=>{let s=cF.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=cF.reduce(i.nodes),p=ose(...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)};lF.exports=ase});var hF=v((Bxe,dF)=>{"use strict";var use=lS(),fF=qv(),vp=jv(),dc=(t="",e="",r=!1)=>{let i=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?vp.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)i.push(dc(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),i.push(Array.isArray(s)?dc(n,s,r):n+s);return vp.flatten(i)},cse=(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(dc(a.pop(),fF(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){a.push(dc(a.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let p=vp.reduce(n.nodes);if(vp.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=use(...p,e);f.length===0&&(f=fF(n,e)),a.push(dc(a.pop(),f)),n.nodes=[];return}let u=vp.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(dc(a.pop(),c,u));continue}if(f.value&&f.type!=="open"){c.push(dc(c.pop(),f.value));continue}f.nodes&&i(f,n)}return c};return vp.flatten(i(t))};dF.exports=cse});var gF=v((Uxe,mF)=>{"use strict";mF.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 wF=v((jxe,bF)=>{"use strict";var lse=qv(),{MAX_LENGTH:HF,CHAR_BACKSLASH:pS,CHAR_BACKTICK:pse,CHAR_COMMA:fse,CHAR_DOT:dse,CHAR_LEFT_PARENTHESES:hse,CHAR_RIGHT_PARENTHESES:mse,CHAR_LEFT_CURLY_BRACE:gse,CHAR_RIGHT_CURLY_BRACE:Hse,CHAR_LEFT_SQUARE_BRACKET:yF,CHAR_RIGHT_SQUARE_BRACKET:vF,CHAR_DOUBLE_QUOTE:yse,CHAR_SINGLE_QUOTE:vse,CHAR_NO_BREAK_SPACE:bse,CHAR_ZERO_WIDTH_NOBREAK_SPACE:wse}=gF(),_se=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},i=typeof r.maxLength=="number"?Math.min(HF,r.maxLength):HF;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,m={},g=()=>t[l++],H=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(H({type:"bos"});l<c;)if(o=s[s.length-1],f=g(),!(f===wse||f===bse)){if(f===pS){H({type:"text",value:(e.keepEscaping?f:"")+g()});continue}if(f===vF){H({type:"text",value:"\\"+f});continue}if(f===yF){u++;let b=!0,w;for(;l<c&&(w=g());){if(f+=w,w===yF){u++;continue}if(w===pS){f+=g();continue}if(w===vF&&(u--,u===0))break}H({type:"text",value:f});continue}if(f===hse){o=H({type:"paren",nodes:[]}),s.push(o),H({type:"text",value:f});continue}if(f===mse){if(o.type!=="paren"){H({type:"text",value:f});continue}o=s.pop(),H({type:"text",value:f}),o=s[s.length-1];continue}if(f===yse||f===vse||f===pse){let b=f,w;for(e.keepQuotes!==!0&&(f="");l<c&&(w=g());){if(w===pS){f+=w+g();continue}if(w===b){e.keepQuotes===!0&&(f+=w);break}f+=w}H({type:"text",value:f});continue}if(f===gse){p++;let w={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=H(w),s.push(o),H({type:"open",value:f});continue}if(f===Hse){if(o.type!=="brace"){H({type:"text",value:f});continue}let b="close";o=s.pop(),o.close=!0,H({type:b,value:f}),p--,o=s[s.length-1];continue}if(f===fse&&p>0){if(o.ranges>0){o.ranges=0;let b=o.nodes.shift();o.nodes=[b,{type:"text",value:lse(o)}]}H({type:"comma",value:f}),o.commas++;continue}if(f===dse&&p>0&&o.commas===0){let b=o.nodes;if(p===0||b.length===0){H({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 w=b[b.length-1];w.value+=a.value+f,a=w,o.ranges--;continue}H({type:"dot",value:f});continue}H({type:"text",value:f})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(k=>{k.nodes||(k.type==="open"&&(k.isOpen=!0),k.type==="close"&&(k.isClose=!0),k.nodes||(k.type="text"),k.invalid=!0)});let b=s[s.length-1],w=b.nodes.indexOf(o);b.nodes.splice(w,1,...o.nodes)}while(s.length>0);return H({type:"eos"}),n};bF.exports=_se});var IF=v((qxe,AF)=>{"use strict";var _F=qv(),Ase=pF(),Ise=hF(),Ese=wF(),Mi=(t,e={})=>{let r=[];if(Array.isArray(t))for(let i of t){let n=Mi.create(i,e);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(Mi.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Mi.parse=(t,e={})=>Ese(t,e);Mi.stringify=(t,e={})=>_F(typeof t=="string"?Mi.parse(t,e):t,e);Mi.compile=(t,e={})=>(typeof t=="string"&&(t=Mi.parse(t,e)),Ase(t,e));Mi.expand=(t,e={})=>{typeof t=="string"&&(t=Mi.parse(t,e));let r=Ise(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};Mi.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Mi.compile(t,e):Mi.expand(t,e);AF.exports=Mi});var im=v((Wxe,DF)=>{"use strict";var Sse=require("path"),$s="\\\\/",EF=`[^${$s}]`,wo="\\.",Cse="\\+",xse="\\?",Vv="\\/",Dse="(?=.)",SF="[^/]",fS=`(?:${Vv}|$)`,CF=`(?:^|${Vv})`,dS=`${wo}{1,2}${fS}`,Pse=`(?!${wo})`,Lse=`(?!${CF}${dS})`,Tse=`(?!${wo}{0,1}${fS})`,$se=`(?!${dS})`,kse=`[^.${Vv}]`,Rse=`${SF}*?`,xF={DOT_LITERAL:wo,PLUS_LITERAL:Cse,QMARK_LITERAL:xse,SLASH_LITERAL:Vv,ONE_CHAR:Dse,QMARK:SF,END_ANCHOR:fS,DOTS_SLASH:dS,NO_DOT:Pse,NO_DOTS:Lse,NO_DOT_SLASH:Tse,NO_DOTS_SLASH:$se,QMARK_NO_DOT:kse,STAR:Rse,START_ANCHOR:CF},Mse={...xF,SLASH_LITERAL:`[${$s}]`,QMARK:EF,STAR:`${EF}*?`,DOTS_SLASH:`${wo}{1,2}(?:[${$s}]|$)`,NO_DOT:`(?!${wo})`,NO_DOTS:`(?!(?:^|[${$s}])${wo}{1,2}(?:[${$s}]|$))`,NO_DOT_SLASH:`(?!${wo}{0,1}(?:[${$s}]|$))`,NO_DOTS_SLASH:`(?!${wo}{1,2}(?:[${$s}]|$))`,QMARK_NO_DOT:`[^.${$s}]`,START_ANCHOR:`(?:^|[${$s}])`,END_ANCHOR:`(?:[${$s}]|$)`},Ose={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"};DF.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Ose,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:Sse.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?Mse:xF}}});var nm=v(vi=>{"use strict";var Nse=require("path"),Fse=process.platform==="win32",{REGEX_BACKSLASH:Bse,REGEX_REMOVE_BACKSLASH:Use,REGEX_SPECIAL_CHARS:jse,REGEX_SPECIAL_CHARS_GLOBAL:qse}=im();vi.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);vi.hasRegexChars=t=>jse.test(t);vi.isRegexChar=t=>t.length===1&&vi.hasRegexChars(t);vi.escapeRegex=t=>t.replace(qse,"\\$1");vi.toPosixSlashes=t=>t.replace(Bse,"/");vi.removeBackslashes=t=>t.replace(Use,e=>e==="\\"?"":e);vi.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};vi.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:Fse===!0||Nse.sep==="\\";vi.escapeLast=(t,e,r)=>{let i=t.lastIndexOf(e,r);return i===-1?t:t[i-1]==="\\"?vi.escapeLast(t,e,i-1):`${t.slice(0,i)}\\${t.slice(i)}`};vi.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};vi.wrapOutput=(t,e={},r={})=>{let i=r.contains?"":"^",n=r.contains?"":"$",s=`${i}(?:${t})${n}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var OF=v((Gxe,MF)=>{"use strict";var PF=nm(),{CHAR_ASTERISK:hS,CHAR_AT:Wse,CHAR_BACKWARD_SLASH:sm,CHAR_COMMA:Vse,CHAR_DOT:mS,CHAR_EXCLAMATION_MARK:gS,CHAR_FORWARD_SLASH:RF,CHAR_LEFT_CURLY_BRACE:HS,CHAR_LEFT_PARENTHESES:yS,CHAR_LEFT_SQUARE_BRACKET:Gse,CHAR_PLUS:Kse,CHAR_QUESTION_MARK:LF,CHAR_RIGHT_CURLY_BRACE:zse,CHAR_RIGHT_PARENTHESES:TF,CHAR_RIGHT_SQUARE_BRACKET:Xse}=im(),$F=t=>t===RF||t===sm,kF=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Jse=(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,m=!1,g=!1,H=!1,b=!1,w=!1,k=!1,U=!1,x=!1,L=!1,q=0,j,F,T={value:"",depth:0,isGlob:!1},O=()=>c>=i,E=()=>u.charCodeAt(c+1),M=()=>(j=F,u.charCodeAt(++c));for(;c<i;){F=M();let ee;if(F===sm){k=T.backslashes=!0,F=M(),F===HS&&(w=!0);continue}if(w===!0||F===HS){for(q++;O()!==!0&&(F=M());){if(F===sm){k=T.backslashes=!0,M();continue}if(F===HS){q++;continue}if(w!==!0&&F===mS&&(F=M())===mS){if(f=T.isBrace=!0,g=T.isGlob=!0,L=!0,n===!0)continue;break}if(w!==!0&&F===Vse){if(f=T.isBrace=!0,g=T.isGlob=!0,L=!0,n===!0)continue;break}if(F===zse&&(q--,q===0)){w=!1,f=T.isBrace=!0,L=!0;break}}if(n===!0)continue;break}if(F===RF){if(s.push(c),o.push(T),T={value:"",depth:0,isGlob:!1},L===!0)continue;if(j===mS&&c===l+1){l+=2;continue}p=c+1;continue}if(r.noext!==!0&&(F===Kse||F===Wse||F===hS||F===LF||F===gS)===!0&&E()===yS){if(g=T.isGlob=!0,H=T.isExtglob=!0,L=!0,F===gS&&c===l&&(x=!0),n===!0){for(;O()!==!0&&(F=M());){if(F===sm){k=T.backslashes=!0,F=M();continue}if(F===TF){g=T.isGlob=!0,L=!0;break}}continue}break}if(F===hS){if(j===hS&&(b=T.isGlobstar=!0),g=T.isGlob=!0,L=!0,n===!0)continue;break}if(F===LF){if(g=T.isGlob=!0,L=!0,n===!0)continue;break}if(F===Gse){for(;O()!==!0&&(ee=M());){if(ee===sm){k=T.backslashes=!0,M();continue}if(ee===Xse){m=T.isBracket=!0,g=T.isGlob=!0,L=!0;break}}if(n===!0)continue;break}if(r.nonegate!==!0&&F===gS&&c===l){U=T.negated=!0,l++;continue}if(r.noparen!==!0&&F===yS){if(g=T.isGlob=!0,n===!0){for(;O()!==!0&&(F=M());){if(F===yS){k=T.backslashes=!0,F=M();continue}if(F===TF){L=!0;break}}continue}break}if(g===!0){if(L=!0,n===!0)continue;break}}r.noext===!0&&(H=!1,g=!1);let N=u,z="",D="";l>0&&(z=u.slice(0,l),u=u.slice(l),p-=l),N&&g===!0&&p>0?(N=u.slice(0,p),D=u.slice(p)):g===!0?(N="",D=u):N=u,N&&N!==""&&N!=="/"&&N!==u&&$F(N.charCodeAt(N.length-1))&&(N=N.slice(0,-1)),r.unescape===!0&&(D&&(D=PF.removeBackslashes(D)),N&&k===!0&&(N=PF.removeBackslashes(N)));let P={prefix:z,input:t,start:l,base:N,glob:D,isBrace:f,isBracket:m,isGlob:g,isExtglob:H,isGlobstar:b,negated:U,negatedExtglob:x};if(r.tokens===!0&&(P.maxDepth=0,$F(F)||o.push(T),P.tokens=o),r.parts===!0||r.tokens===!0){let ee;for(let re=0;re<s.length;re++){let ie=ee?ee+1:l,J=s[re],te=t.slice(ie,J);r.tokens&&(re===0&&l!==0?(o[re].isPrefix=!0,o[re].value=z):o[re].value=te,kF(o[re]),P.maxDepth+=o[re].depth),(re!==0||te!=="")&&a.push(te),ee=J}if(ee&&ee+1<t.length){let re=t.slice(ee+1);a.push(re),r.tokens&&(o[o.length-1].value=re,kF(o[o.length-1]),P.maxDepth+=o[o.length-1].depth)}P.slashes=s,P.parts=a}return P};MF.exports=Jse});var BF=v((Kxe,FF)=>{"use strict";var Gv=im(),Oi=nm(),{MAX_LENGTH:Kv,POSIX_REGEX_SOURCE:Yse,REGEX_NON_SPECIAL_CHARS:Qse,REGEX_SPECIAL_CHARS_BACKREF:Zse,REPLACEMENTS:NF}=Gv,eoe=(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=>Oi.escapeRegex(n)).join("..")}return r},bp=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,vS=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=NF[t]||t;let r={...e},i=typeof r.maxLength=="number"?Math.min(Kv,r.maxLength):Kv,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=Oi.isWindows(e),c=Gv.globChars(u),l=Gv.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:f,SLASH_LITERAL:m,ONE_CHAR:g,DOTS_SLASH:H,NO_DOT:b,NO_DOT_SLASH:w,NO_DOTS_SLASH:k,QMARK:U,QMARK_NO_DOT:x,STAR:L,START_ANCHOR:q}=c,j=Z=>`(${a}(?:(?!${q}${Z.dot?H:p}).)*?)`,F=r.dot?"":b,T=r.dot?U:x,O=r.bash===!0?j(r):L;r.capture&&(O=`(${O})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let E={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=Oi.removePrefix(t,E),n=t.length;let M=[],N=[],z=[],D=s,P,ee=()=>E.index===n-1,re=E.peek=(Z=1)=>t[E.index+Z],ie=E.advance=()=>t[++E.index]||"",J=()=>t.slice(E.index+1),te=(Z="",Ae=0)=>{E.consumed+=Z,E.index+=Ae},ce=Z=>{E.output+=Z.output!=null?Z.output:Z.value,te(Z.value)},ae=()=>{let Z=1;for(;re()==="!"&&(re(2)!=="("||re(3)==="?");)ie(),E.start++,Z++;return Z%2===0?!1:(E.negated=!0,E.start++,!0)},he=Z=>{E[Z]++,z.push(Z)},dt=Z=>{E[Z]--,z.pop()},ge=Z=>{if(D.type==="globstar"){let Ae=E.braces>0&&(Z.type==="comma"||Z.type==="brace"),Q=Z.extglob===!0||M.length&&(Z.type==="pipe"||Z.type==="paren");Z.type!=="slash"&&Z.type!=="paren"&&!Ae&&!Q&&(E.output=E.output.slice(0,-D.output.length),D.type="star",D.value="*",D.output=O,E.output+=D.output)}if(M.length&&Z.type!=="paren"&&(M[M.length-1].inner+=Z.value),(Z.value||Z.output)&&ce(Z),D&&D.type==="text"&&Z.type==="text"){D.value+=Z.value,D.output=(D.output||"")+Z.value;return}Z.prev=D,o.push(Z),D=Z},Gt=(Z,Ae)=>{let Q={...l[Ae],conditions:1,inner:""};Q.prev=D,Q.parens=E.parens,Q.output=E.output;let be=(r.capture?"(":"")+Q.open;he("parens"),ge({type:Z,value:Ae,output:E.output?"":g}),ge({type:"paren",extglob:!0,value:ie(),output:be}),M.push(Q)},kr=Z=>{let Ae=Z.close+(r.capture?")":""),Q;if(Z.type==="negate"){let be=O;if(Z.inner&&Z.inner.length>1&&Z.inner.includes("/")&&(be=j(r)),(be!==O||ee()||/^\)+$/.test(J()))&&(Ae=Z.close=`)$))${be}`),Z.inner.includes("*")&&(Q=J())&&/^\.[^\\/.]+$/.test(Q)){let Ge=vS(Q,{...e,fastpaths:!1}).output;Ae=Z.close=`)${Ge})${be})`}Z.prev.type==="bos"&&(E.negatedExtglob=!0)}ge({type:"paren",extglob:!0,value:P,output:Ae}),dt("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let Z=!1,Ae=t.replace(Zse,(Q,be,Ge,wt,Ct,oa)=>wt==="\\"?(Z=!0,Q):wt==="?"?be?be+wt+(Ct?U.repeat(Ct.length):""):oa===0?T+(Ct?U.repeat(Ct.length):""):U.repeat(Ge.length):wt==="."?p.repeat(Ge.length):wt==="*"?be?be+wt+(Ct?O:""):O:be?Q:`\\${Q}`);return Z===!0&&(r.unescape===!0?Ae=Ae.replace(/\\/g,""):Ae=Ae.replace(/\\+/g,Q=>Q.length%2===0?"\\\\":Q?"\\":"")),Ae===t&&r.contains===!0?(E.output=t,E):(E.output=Oi.wrapOutput(Ae,E,e),E)}for(;!ee();){if(P=ie(),P==="\0")continue;if(P==="\\"){let Q=re();if(Q==="/"&&r.bash!==!0||Q==="."||Q===";")continue;if(!Q){P+="\\",ge({type:"text",value:P});continue}let be=/^\\+/.exec(J()),Ge=0;if(be&&be[0].length>2&&(Ge=be[0].length,E.index+=Ge,Ge%2!==0&&(P+="\\")),r.unescape===!0?P=ie():P+=ie(),E.brackets===0){ge({type:"text",value:P});continue}}if(E.brackets>0&&(P!=="]"||D.value==="["||D.value==="[^")){if(r.posix!==!1&&P===":"){let Q=D.value.slice(1);if(Q.includes("[")&&(D.posix=!0,Q.includes(":"))){let be=D.value.lastIndexOf("["),Ge=D.value.slice(0,be),wt=D.value.slice(be+2),Ct=Yse[wt];if(Ct){D.value=Ge+Ct,E.backtrack=!0,ie(),!s.output&&o.indexOf(D)===1&&(s.output=g);continue}}}(P==="["&&re()!==":"||P==="-"&&re()==="]")&&(P=`\\${P}`),P==="]"&&(D.value==="["||D.value==="[^")&&(P=`\\${P}`),r.posix===!0&&P==="!"&&D.value==="["&&(P="^"),D.value+=P,ce({value:P});continue}if(E.quotes===1&&P!=='"'){P=Oi.escapeRegex(P),D.value+=P,ce({value:P});continue}if(P==='"'){E.quotes=E.quotes===1?0:1,r.keepQuotes===!0&&ge({type:"text",value:P});continue}if(P==="("){he("parens"),ge({type:"paren",value:P});continue}if(P===")"){if(E.parens===0&&r.strictBrackets===!0)throw new SyntaxError(bp("opening","("));let Q=M[M.length-1];if(Q&&E.parens===Q.parens+1){kr(M.pop());continue}ge({type:"paren",value:P,output:E.parens?")":"\\)"}),dt("parens");continue}if(P==="["){if(r.nobracket===!0||!J().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(bp("closing","]"));P=`\\${P}`}else he("brackets");ge({type:"bracket",value:P});continue}if(P==="]"){if(r.nobracket===!0||D&&D.type==="bracket"&&D.value.length===1){ge({type:"text",value:P,output:`\\${P}`});continue}if(E.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(bp("opening","["));ge({type:"text",value:P,output:`\\${P}`});continue}dt("brackets");let Q=D.value.slice(1);if(D.posix!==!0&&Q[0]==="^"&&!Q.includes("/")&&(P=`/${P}`),D.value+=P,ce({value:P}),r.literalBrackets===!1||Oi.hasRegexChars(Q))continue;let be=Oi.escapeRegex(D.value);if(E.output=E.output.slice(0,-D.value.length),r.literalBrackets===!0){E.output+=be,D.value=be;continue}D.value=`(${a}${be}|${D.value})`,E.output+=D.value;continue}if(P==="{"&&r.nobrace!==!0){he("braces");let Q={type:"brace",value:P,output:"(",outputIndex:E.output.length,tokensIndex:E.tokens.length};N.push(Q),ge(Q);continue}if(P==="}"){let Q=N[N.length-1];if(r.nobrace===!0||!Q){ge({type:"text",value:P,output:P});continue}let be=")";if(Q.dots===!0){let Ge=o.slice(),wt=[];for(let Ct=Ge.length-1;Ct>=0&&(o.pop(),Ge[Ct].type!=="brace");Ct--)Ge[Ct].type!=="dots"&&wt.unshift(Ge[Ct].value);be=eoe(wt,r),E.backtrack=!0}if(Q.comma!==!0&&Q.dots!==!0){let Ge=E.output.slice(0,Q.outputIndex),wt=E.tokens.slice(Q.tokensIndex);Q.value=Q.output="\\{",P=be="\\}",E.output=Ge;for(let Ct of wt)E.output+=Ct.output||Ct.value}ge({type:"brace",value:P,output:be}),dt("braces"),N.pop();continue}if(P==="|"){M.length>0&&M[M.length-1].conditions++,ge({type:"text",value:P});continue}if(P===","){let Q=P,be=N[N.length-1];be&&z[z.length-1]==="braces"&&(be.comma=!0,Q="|"),ge({type:"comma",value:P,output:Q});continue}if(P==="/"){if(D.type==="dot"&&E.index===E.start+1){E.start=E.index+1,E.consumed="",E.output="",o.pop(),D=s;continue}ge({type:"slash",value:P,output:m});continue}if(P==="."){if(E.braces>0&&D.type==="dot"){D.value==="."&&(D.output=p);let Q=N[N.length-1];D.type="dots",D.output+=P,D.value+=P,Q.dots=!0;continue}if(E.braces+E.parens===0&&D.type!=="bos"&&D.type!=="slash"){ge({type:"text",value:P,output:p});continue}ge({type:"dot",value:P,output:p});continue}if(P==="?"){if(!(D&&D.value==="(")&&r.noextglob!==!0&&re()==="("&&re(2)!=="?"){Gt("qmark",P);continue}if(D&&D.type==="paren"){let be=re(),Ge=P;if(be==="<"&&!Oi.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(D.value==="("&&!/[!=<:]/.test(be)||be==="<"&&!/<([!=]|\w+>)/.test(J()))&&(Ge=`\\${P}`),ge({type:"text",value:P,output:Ge});continue}if(r.dot!==!0&&(D.type==="slash"||D.type==="bos")){ge({type:"qmark",value:P,output:x});continue}ge({type:"qmark",value:P,output:U});continue}if(P==="!"){if(r.noextglob!==!0&&re()==="("&&(re(2)!=="?"||!/[!=<:]/.test(re(3)))){Gt("negate",P);continue}if(r.nonegate!==!0&&E.index===0){ae();continue}}if(P==="+"){if(r.noextglob!==!0&&re()==="("&&re(2)!=="?"){Gt("plus",P);continue}if(D&&D.value==="("||r.regex===!1){ge({type:"plus",value:P,output:f});continue}if(D&&(D.type==="bracket"||D.type==="paren"||D.type==="brace")||E.parens>0){ge({type:"plus",value:P});continue}ge({type:"plus",value:f});continue}if(P==="@"){if(r.noextglob!==!0&&re()==="("&&re(2)!=="?"){ge({type:"at",extglob:!0,value:P,output:""});continue}ge({type:"text",value:P});continue}if(P!=="*"){(P==="$"||P==="^")&&(P=`\\${P}`);let Q=Qse.exec(J());Q&&(P+=Q[0],E.index+=Q[0].length),ge({type:"text",value:P});continue}if(D&&(D.type==="globstar"||D.star===!0)){D.type="star",D.star=!0,D.value+=P,D.output=O,E.backtrack=!0,E.globstar=!0,te(P);continue}let Z=J();if(r.noextglob!==!0&&/^\([^?]/.test(Z)){Gt("star",P);continue}if(D.type==="star"){if(r.noglobstar===!0){te(P);continue}let Q=D.prev,be=Q.prev,Ge=Q.type==="slash"||Q.type==="bos",wt=be&&(be.type==="star"||be.type==="globstar");if(r.bash===!0&&(!Ge||Z[0]&&Z[0]!=="/")){ge({type:"star",value:P,output:""});continue}let Ct=E.braces>0&&(Q.type==="comma"||Q.type==="brace"),oa=M.length&&(Q.type==="pipe"||Q.type==="paren");if(!Ge&&Q.type!=="paren"&&!Ct&&!oa){ge({type:"star",value:P,output:""});continue}for(;Z.slice(0,3)==="/**";){let aa=t[E.index+4];if(aa&&aa!=="/")break;Z=Z.slice(3),te("/**",3)}if(Q.type==="bos"&&ee()){D.type="globstar",D.value+=P,D.output=j(r),E.output=D.output,E.globstar=!0,te(P);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&!wt&&ee()){E.output=E.output.slice(0,-(Q.output+D.output).length),Q.output=`(?:${Q.output}`,D.type="globstar",D.output=j(r)+(r.strictSlashes?")":"|$)"),D.value+=P,E.globstar=!0,E.output+=Q.output+D.output,te(P);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&Z[0]==="/"){let aa=Z[1]!==void 0?"|$":"";E.output=E.output.slice(0,-(Q.output+D.output).length),Q.output=`(?:${Q.output}`,D.type="globstar",D.output=`${j(r)}${m}|${m}${aa})`,D.value+=P,E.output+=Q.output+D.output,E.globstar=!0,te(P+ie()),ge({type:"slash",value:"/",output:""});continue}if(Q.type==="bos"&&Z[0]==="/"){D.type="globstar",D.value+=P,D.output=`(?:^|${m}|${j(r)}${m})`,E.output=D.output,E.globstar=!0,te(P+ie()),ge({type:"slash",value:"/",output:""});continue}E.output=E.output.slice(0,-D.output.length),D.type="globstar",D.output=j(r),D.value+=P,E.output+=D.output,E.globstar=!0,te(P);continue}let Ae={type:"star",value:P,output:O};if(r.bash===!0){Ae.output=".*?",(D.type==="bos"||D.type==="slash")&&(Ae.output=F+Ae.output),ge(Ae);continue}if(D&&(D.type==="bracket"||D.type==="paren")&&r.regex===!0){Ae.output=P,ge(Ae);continue}(E.index===E.start||D.type==="slash"||D.type==="dot")&&(D.type==="dot"?(E.output+=w,D.output+=w):r.dot===!0?(E.output+=k,D.output+=k):(E.output+=F,D.output+=F),re()!=="*"&&(E.output+=g,D.output+=g)),ge(Ae)}for(;E.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(bp("closing","]"));E.output=Oi.escapeLast(E.output,"["),dt("brackets")}for(;E.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(bp("closing",")"));E.output=Oi.escapeLast(E.output,"("),dt("parens")}for(;E.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(bp("closing","}"));E.output=Oi.escapeLast(E.output,"{"),dt("braces")}if(r.strictSlashes!==!0&&(D.type==="star"||D.type==="bracket")&&ge({type:"maybe_slash",value:"",output:`${m}?`}),E.backtrack===!0){E.output="";for(let Z of E.tokens)E.output+=Z.output!=null?Z.output:Z.value,Z.suffix&&(E.output+=Z.suffix)}return E};vS.fastpaths=(t,e)=>{let r={...e},i=typeof r.maxLength=="number"?Math.min(Kv,r.maxLength):Kv,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);t=NF[t]||t;let s=Oi.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:m,START_ANCHOR:g}=Gv.globChars(s),H=r.dot?p:l,b=r.dot?f:l,w=r.capture?"":"?:",k={negated:!1,prefix:""},U=r.bash===!0?".*?":m;r.capture&&(U=`(${U})`);let x=F=>F.noglobstar===!0?U:`(${w}(?:(?!${g}${F.dot?c:o}).)*?)`,L=F=>{switch(F){case"*":return`${H}${u}${U}`;case".*":return`${o}${u}${U}`;case"*.*":return`${H}${U}${o}${u}${U}`;case"*/*":return`${H}${U}${a}${u}${b}${U}`;case"**":return H+x(r);case"**/*":return`(?:${H}${x(r)}${a})?${b}${u}${U}`;case"**/*.*":return`(?:${H}${x(r)}${a})?${b}${U}${o}${u}${U}`;case"**/.*":return`(?:${H}${x(r)}${a})?${o}${u}${U}`;default:{let T=/^(.*?)\.(\w+)$/.exec(F);if(!T)return;let O=L(T[1]);return O?O+o+T[2]:void 0}}},q=Oi.removePrefix(t,k),j=L(q);return j&&r.strictSlashes!==!0&&(j+=`${a}?`),j};FF.exports=vS});var jF=v((zxe,UF)=>{"use strict";var toe=require("path"),roe=OF(),bS=BF(),wS=nm(),ioe=im(),noe=t=>t&&typeof t=="object"&&!Array.isArray(t),Ut=(t,e,r=!1)=>{if(Array.isArray(t)){let l=t.map(f=>Ut(f,e,r));return f=>{for(let m of l){let g=m(f);if(g)return g}return!1}}let i=noe(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=wS.isWindows(e),o=i?Ut.compileRe(t,e):Ut.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=Ut(n.ignore,l,r)}let c=(l,p=!1)=>{let{isMatch:f,match:m,output:g}=Ut.test(l,o,e,{glob:t,posix:s}),H={glob:t,state:a,regex:o,posix:s,input:l,output:g,match:m,isMatch:f};return typeof n.onResult=="function"&&n.onResult(H),f===!1?(H.isMatch=!1,p?H:!1):u(l)?(typeof n.onIgnore=="function"&&n.onIgnore(H),H.isMatch=!1,p?H:!1):(typeof n.onMatch=="function"&&n.onMatch(H),p?H:!0)};return r&&(c.state=a),c};Ut.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?wS.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=Ut.matchBase(t,e,r,n):a=e.exec(u)),{isMatch:Boolean(a),match:a,output:u}};Ut.matchBase=(t,e,r,i=wS.isWindows(r))=>(e instanceof RegExp?e:Ut.makeRe(e,r)).test(toe.basename(t));Ut.isMatch=(t,e,r)=>Ut(e,r)(t);Ut.parse=(t,e)=>Array.isArray(t)?t.map(r=>Ut.parse(r,e)):bS(t,{...e,fastpaths:!1});Ut.scan=(t,e)=>roe(t,e);Ut.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=Ut.toRegex(a,e);return i===!0&&(u.state=t),u};Ut.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=bS.fastpaths(t,e)),n.output||(n=bS(t,e)),Ut.compileRe(n,e,r,i)};Ut.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/$^/}};Ut.constants=ioe;UF.exports=Ut});var WF=v((Xxe,qF)=>{"use strict";qF.exports=jF()});var om=v((Jxe,zF)=>{"use strict";var GF=require("util"),KF=IF(),ks=WF(),_S=nm(),VF=t=>t===""||t==="./",Et=(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=ks(String(e[l]),{...r,onResult:a},!0),f=p.state.negated||p.state.negatedExtglob;f&&o++;for(let m of t){let g=p(m,!0);(f?!g.isMatch:g.isMatch)&&(f?i.add(g.output):(i.delete(g.output),n.add(g.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};Et.match=Et;Et.matcher=(t,e)=>ks(t,e);Et.isMatch=(t,e,r)=>ks(e,r)(t);Et.any=Et.isMatch;Et.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(Et(t,e,{...r,onResult:s}));for(let a of n)o.has(a)||i.add(a);return[...i]};Et.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${GF.inspect(t)}"`);if(Array.isArray(e))return e.some(i=>Et.contains(t,i,r));if(typeof e=="string"){if(VF(t)||VF(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return Et.isMatch(t,e,{...r,contains:!0})};Et.matchKeys=(t,e,r)=>{if(!_S.isObject(t))throw new TypeError("Expected the first argument to be an object");let i=Et(Object.keys(t),e,r),n={};for(let s of i)n[s]=t[s];return n};Et.some=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=ks(String(n),r);if(i.some(o=>s(o)))return!0}return!1};Et.every=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=ks(String(n),r);if(!i.every(o=>s(o)))return!1}return!0};Et.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${GF.inspect(t)}"`);return[].concat(e).every(i=>ks(i,r)(t))};Et.capture=(t,e,r)=>{let i=_S.isWindows(r),s=ks.makeRe(String(t),{...r,capture:!0}).exec(i?_S.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};Et.makeRe=(...t)=>ks.makeRe(...t);Et.scan=(...t)=>ks.scan(...t);Et.parse=(t,e)=>{let r=[];for(let i of[].concat(t||[]))for(let n of KF(String(i),e))r.push(ks.parse(n,e));return r};Et.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:KF(t,e)};Et.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return Et.braces(t,{...e,expand:!0})};zF.exports=Et});var sB=v((qDe,nB)=>{"use strict";var{Duplex:coe}=require("stream");function rB(t){t.emit("close")}function loe(){!this.destroyed&&this._writableState.finished&&this.destroy()}function iB(t){this.removeListener("error",iB),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function poe(t,e){let r=!0,i=new coe({...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(rB,i);return}let o=!1;t.once("error",function(u){o=!0,s(u)}),t.once("close",function(){o||s(n),process.nextTick(rB,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",loe),i.on("error",iB),i}nB.exports=poe});var ka=v((WDe,oB)=>{"use strict";oB.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 cm=v((VDe,IS)=>{"use strict";var{EMPTY_BUFFER:foe}=ka();function aB(t,e){if(t.length===0)return foe;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 uB(t,e,r,i,n){for(let s=0;s<n;s++)r[i+s]=t[s]^e[s&3]}function cB(t,e){for(let r=0;r<t.length;r++)t[r]^=e[r&3]}function lB(t){return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}function zv(t){if(zv.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),zv.readOnly=!1),e}try{let t=require("bufferutil");IS.exports={concat:aB,mask(e,r,i,n,s){s<48?uB(e,r,i,n,s):t.mask(e,r,i,n,s)},toArrayBuffer:lB,toBuffer:zv,unmask(e,r){e.length<32?cB(e,r):t.unmask(e,r)}}}catch{IS.exports={concat:aB,mask:uB,toArrayBuffer:lB,toBuffer:zv,unmask:cB}}});var dB=v((GDe,fB)=>{"use strict";var pB=Symbol("kDone"),ES=Symbol("kRun"),SS=class{constructor(e){this[pB]=()=>{this.pending--,this[ES]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ES]()}[ES](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[pB])}}};fB.exports=SS});var fm=v((KDe,HB)=>{"use strict";var lm=require("zlib"),hB=cm(),doe=dB(),{kStatusCode:mB}=ka(),hoe=Buffer.from([0,0,255,255]),Yv=Symbol("permessage-deflate"),_o=Symbol("total-length"),pm=Symbol("callback"),Ra=Symbol("buffers"),Jv=Symbol("error"),Xv,CS=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,!Xv){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Xv=new doe(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[pm];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){Xv.add(n=>{this._decompress(e,r,(s,o)=>{n(),i(s,o)})})}compress(e,r,i){Xv.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"?lm.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=lm.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[Yv]=this,this._inflate[_o]=0,this._inflate[Ra]=[],this._inflate.on("error",goe),this._inflate.on("data",gB)}this._inflate[pm]=i,this._inflate.write(e),r&&this._inflate.write(hoe),this._inflate.flush(()=>{let s=this._inflate[Jv];if(s){this._inflate.close(),this._inflate=null,i(s);return}let o=hB.concat(this._inflate[Ra],this._inflate[_o]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[_o]=0,this._inflate[Ra]=[],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"?lm.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=lm.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[_o]=0,this._deflate[Ra]=[],this._deflate.on("data",moe)}this._deflate[pm]=i,this._deflate.write(e),this._deflate.flush(lm.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=hB.concat(this._deflate[Ra],this._deflate[_o]);r&&(s=s.slice(0,s.length-4)),this._deflate[pm]=null,this._deflate[_o]=0,this._deflate[Ra]=[],r&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),i(null,s)})}};HB.exports=CS;function moe(t){this[Ra].push(t),this[_o]+=t.length}function gB(t){if(this[_o]+=t.length,this[Yv]._maxPayload<1||this[_o]<=this[Yv]._maxPayload){this[Ra].push(t);return}this[Jv]=new RangeError("Max payload size exceeded"),this[Jv].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Jv][mB]=1009,this.removeListener("data",gB),this.reset()}function goe(t){this[Yv]._inflate=null,t[mB]=1007,this[pm](t)}});var dm=v((zDe,xS)=>{"use strict";var yB=[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 vB(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function bB(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=require("utf-8-validate");xS.exports={isValidStatusCode:vB,isValidUTF8(e){return e.length<150?bB(e):t(e)},tokenChars:yB}}catch{xS.exports={isValidStatusCode:vB,isValidUTF8:bB,tokenChars:yB}}});var TS=v((XDe,CB)=>{"use strict";var{Writable:Hoe}=require("stream"),wB=fm(),{BINARY_TYPES:yoe,EMPTY_BUFFER:_B,kStatusCode:voe,kWebSocket:boe}=ka(),{concat:DS,toArrayBuffer:woe,unmask:_oe}=cm(),{isValidStatusCode:Aoe,isValidUTF8:AB}=dm(),hm=0,IB=1,EB=2,SB=3,PS=4,Ioe=5,LS=class extends Hoe{constructor(e={}){super(),this._binaryType=e.binaryType||yoe[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[boe]=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=hm,this._loop=!1}_write(e,r,i){if(this._opcode===8&&this._state==hm)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 hm:r=this.getInfo();break;case IB:r=this.getPayloadLength16();break;case EB:r=this.getPayloadLength64();break;case SB:this.getMask();break;case PS: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,ir(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[wB.extensionName])return this._loop=!1,ir(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,ir(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,ir(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,ir(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,ir(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(r)return this._loop=!1,ir(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,ir(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}else return this._loop=!1,ir(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,ir(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,ir(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(this._payloadLength===126)this._state=IB;else if(this._payloadLength===127)this._state=EB;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,ir(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,ir(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=SB:this._state=PS}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=PS}getData(e){let r=_B;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]&&_oe(r,this._mask)}if(this._opcode>7)return this.controlMessage(r);if(this._compressed){this._state=Ioe,this.decompress(r,e);return}return r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage()}decompress(e,r){this._extensions[wB.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(ir(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=DS(r,e):this._binaryType==="arraybuffer"?i=woe(DS(r,e)):i=r,this.emit("message",i,!0)}else{let i=DS(r,e);if(!this._skipUTF8Validation&&!AB(i))return this._loop=!1,ir(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",i,!1)}}this._state=hm}controlMessage(e){if(this._opcode===8)if(this._loop=!1,e.length===0)this.emit("conclude",1005,_B),this.end();else{if(e.length===1)return ir(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{let r=e.readUInt16BE(0);if(!Aoe(r))return ir(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");let i=e.slice(2);if(!this._skipUTF8Validation&&!AB(i))return ir(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=hm}};CB.exports=LS;function ir(t,e,r,i,n){let s=new t(r?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(s,ir),s.code=n,s[voe]=i,s}});var $S=v((QDe,PB)=>{"use strict";var JDe=require("net"),YDe=require("tls"),{randomFillSync:Eoe}=require("crypto"),xB=fm(),{EMPTY_BUFFER:Soe}=ka(),{isValidStatusCode:Coe}=dm(),{mask:DB,toBuffer:Sp}=cm(),jn=Symbol("kByteLength"),xoe=Buffer.alloc(4),Ns=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||xoe,r.generateMask?r.generateMask(i):Eoe(i,0,4),o=(i[0]|i[1]|i[2]|i[3])===0,s=6);let a;typeof e=="string"?(!r.mask||o)&&r[jn]!==void 0?a=r[jn]:(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?(DB(e,i,c,s,a),[c]):(DB(e,i,e,0,a),[c,e])):[c,e]}close(e,r,i,n){let s;if(e===void 0)s=Soe;else{if(typeof e!="number"||!Coe(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={[jn]: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(Ns.frame(s,o),n)}ping(e,r,i){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Sp(e),n=e.length,s=Sp.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[jn]: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(Ns.frame(e,o),i)}pong(e,r,i){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Sp(e),n=e.length,s=Sp.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[jn]: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(Ns.frame(e,o),i)}send(e,r,i){let n=this._extensions[xB.extensionName],s=r.binary?2:1,o=r.compress,a,u;if(typeof e=="string"?(a=Buffer.byteLength(e),u=!1):(e=Sp(e),a=e.length,u=Sp.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={[jn]: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(Ns.frame(e,{[jn]: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(Ns.frame(e,i),n);return}let s=this._extensions[xB.extensionName];this._bufferedBytes+=i[jn],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[jn],this._deflating=!1,i.readOnly=!1,this.sendFrame(Ns.frame(a,i),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][jn],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][jn],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)}};PB.exports=Ns});var BB=v((ZDe,FB)=>{"use strict";var{kForOnEventAttribute:kS,kListener:LB}=ka(),TB=Symbol("kCode"),$B=Symbol("kData"),kB=Symbol("kError"),RB=Symbol("kMessage"),MB=Symbol("kReason"),Cp=Symbol("kTarget"),OB=Symbol("kType"),NB=Symbol("kWasClean"),Ao=class{constructor(e){this[Cp]=null,this[OB]=e}get target(){return this[Cp]}get type(){return this[OB]}};Object.defineProperty(Ao.prototype,"target",{enumerable:!0});Object.defineProperty(Ao.prototype,"type",{enumerable:!0});var hc=class extends Ao{constructor(e,r={}){super(e),this[TB]=r.code===void 0?0:r.code,this[MB]=r.reason===void 0?"":r.reason,this[NB]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[TB]}get reason(){return this[MB]}get wasClean(){return this[NB]}};Object.defineProperty(hc.prototype,"code",{enumerable:!0});Object.defineProperty(hc.prototype,"reason",{enumerable:!0});Object.defineProperty(hc.prototype,"wasClean",{enumerable:!0});var xp=class extends Ao{constructor(e,r={}){super(e),this[kB]=r.error===void 0?null:r.error,this[RB]=r.message===void 0?"":r.message}get error(){return this[kB]}get message(){return this[RB]}};Object.defineProperty(xp.prototype,"error",{enumerable:!0});Object.defineProperty(xp.prototype,"message",{enumerable:!0});var mm=class extends Ao{constructor(e,r={}){super(e),this[$B]=r.data===void 0?null:r.data}get data(){return this[$B]}};Object.defineProperty(mm.prototype,"data",{enumerable:!0});var Doe={addEventListener(t,e,r={}){let i;if(t==="message")i=function(s,o){let a=new mm("message",{data:o?s:s.toString()});a[Cp]=this,e.call(this,a)};else if(t==="close")i=function(s,o){let a=new hc("close",{code:s,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[Cp]=this,e.call(this,a)};else if(t==="error")i=function(s){let o=new xp("error",{error:s,message:s.message});o[Cp]=this,e.call(this,o)};else if(t==="open")i=function(){let s=new Ao("open");s[Cp]=this,e.call(this,s)};else return;i[kS]=!!r[kS],i[LB]=e,r.once?this.once(t,i):this.on(t,i)},removeEventListener(t,e){for(let r of this.listeners(t))if(r[LB]===e&&!r[kS]){this.removeListener(t,r);break}}};FB.exports={CloseEvent:hc,ErrorEvent:xp,Event:Ao,EventTarget:Doe,MessageEvent:mm}});var RS=v((ePe,UB)=>{"use strict";var{tokenChars:gm}=dm();function Fs(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function Poe(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&&gm[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 m=t.slice(u,l);c===44?(Fs(e,m,r),r=Object.create(null)):o=m,u=l=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);else if(a===void 0)if(l===-1&&gm[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),Fs(r,t.slice(u,l),!0),c===44&&(Fs(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(gm[c]!==1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:i||(i=!0),n=!1}else if(s)if(gm[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&&gm[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 m=t.slice(u,l);i&&(m=m.replace(/\\/g,""),i=!1),Fs(r,a,m),c===44&&(Fs(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?Fs(e,f,r):(a===void 0?Fs(r,f,!0):i?Fs(r,a,f.replace(/\\/g,"")):Fs(r,a,f),Fs(e,o,r)),e}function Loe(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(", ")}UB.exports={format:Loe,parse:Poe}});var US=v((rPe,YB)=>{"use strict";var Toe=require("events"),$oe=require("https"),koe=require("http"),WB=require("net"),Roe=require("tls"),{randomBytes:Moe,createHash:Ooe}=require("crypto"),{Readable:tPe}=require("stream"),{URL:MS}=require("url"),Ma=fm(),Noe=TS(),Foe=$S(),{BINARY_TYPES:jB,EMPTY_BUFFER:Qv,GUID:Boe,kForOnEventAttribute:OS,kListener:Uoe,kStatusCode:joe,kWebSocket:qr,NOOP:VB}=ka(),{EventTarget:{addEventListener:qoe,removeEventListener:Woe}}=BB(),{format:Voe,parse:Goe}=RS(),{toBuffer:Koe}=cm(),Io=["CONNECTING","OPEN","CLOSING","CLOSED"],zoe=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,NS=[8,13],Xoe=30*1e3,Ee=class extends Toe{constructor(e,r,i){super(),this._binaryType=jB[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Qv,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Ee.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]),GB(this,e,r,i)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){jB.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 Noe({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation});this._sender=new Foe(e,this._extensions,i.generateMask),this._receiver=n,this._socket=e,n[qr]=this,e[qr]=this,n.on("conclude",Qoe),n.on("drain",Zoe),n.on("error",eae),n.on("message",tae),n.on("ping",rae),n.on("pong",iae),e.setTimeout(0),e.setNoDelay(),r.length>0&&e.unshift(r),e.on("close",zB),e.on("data",Zv),e.on("end",XB),e.on("error",JB),this._readyState=Ee.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=Ee.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Ma.extensionName]&&this._extensions[Ma.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Ee.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,r){if(this.readyState!==Ee.CLOSED){if(this.readyState===Ee.CONNECTING){let i="WebSocket was closed before the connection was established";return fn(this,this._req,i)}if(this.readyState===Ee.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=Ee.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),Xoe)}}pause(){this.readyState===Ee.CONNECTING||this.readyState===Ee.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,r,i){if(this.readyState===Ee.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!==Ee.OPEN){BS(this,e,i);return}r===void 0&&(r=!this._isServer),this._sender.ping(e||Qv,r,i)}pong(e,r,i){if(this.readyState===Ee.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!==Ee.OPEN){BS(this,e,i);return}r===void 0&&(r=!this._isServer),this._sender.pong(e||Qv,r,i)}resume(){this.readyState===Ee.CONNECTING||this.readyState===Ee.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,r,i){if(this.readyState===Ee.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!==Ee.OPEN){BS(this,e,i);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[Ma.extensionName]||(n.compress=!1),this._sender.send(e||Qv,n,i)}terminate(){if(this.readyState!==Ee.CLOSED){if(this.readyState===Ee.CONNECTING){let e="WebSocket was closed before the connection was established";return fn(this,this._req,e)}this._socket&&(this._readyState=Ee.CLOSING,this._socket.destroy())}}};Object.defineProperty(Ee,"CONNECTING",{enumerable:!0,value:Io.indexOf("CONNECTING")});Object.defineProperty(Ee.prototype,"CONNECTING",{enumerable:!0,value:Io.indexOf("CONNECTING")});Object.defineProperty(Ee,"OPEN",{enumerable:!0,value:Io.indexOf("OPEN")});Object.defineProperty(Ee.prototype,"OPEN",{enumerable:!0,value:Io.indexOf("OPEN")});Object.defineProperty(Ee,"CLOSING",{enumerable:!0,value:Io.indexOf("CLOSING")});Object.defineProperty(Ee.prototype,"CLOSING",{enumerable:!0,value:Io.indexOf("CLOSING")});Object.defineProperty(Ee,"CLOSED",{enumerable:!0,value:Io.indexOf("CLOSED")});Object.defineProperty(Ee.prototype,"CLOSED",{enumerable:!0,value:Io.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(Ee.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(Ee.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[OS])return e[Uoe];return null},set(e){for(let r of this.listeners(t))if(r[OS]){this.removeListener(t,r);break}typeof e=="function"&&this.addEventListener(t,e,{[OS]:!0})}})});Ee.prototype.addEventListener=qoe;Ee.prototype.removeEventListener=Woe;YB.exports=Ee;function GB(t,e,r,i){let n={protocolVersion:NS[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(!NS.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${NS.join(", ")})`);let s;if(e instanceof MS)s=e,t._url=e.href;else{try{s=new MS(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 H=new SyntaxError(u);if(t._redirects===0)throw H;FS(t,H);return}let c=o?443:80,l=Moe(16).toString("base64"),p=o?$oe.get:koe.get,f=new Set,m;if(n.createConnection=o?Yoe:Joe,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&&(m=new Ma(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=Voe({[Ma.extensionName]:m.offer()})),r.length){for(let H of r){if(typeof H!="string"||!zoe.test(H)||f.has(H))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(H)}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 H=n.path.split(":");n.socketPath=H[0],n.path=H[1]}if(n.followRedirects){if(t._redirects===0){t._originalHost=s.host;let H=i&&i.headers;if(i={...i,headers:{}},H)for(let[b,w]of Object.entries(H))i.headers[b.toLowerCase()]=w}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 g=t._req=p(n);n.timeout&&g.on("timeout",()=>{fn(t,g,"Opening handshake has timed out")}),g.on("error",H=>{g===null||g.aborted||(g=t._req=null,FS(t,H))}),g.on("response",H=>{let b=H.headers.location,w=H.statusCode;if(b&&n.followRedirects&&w>=300&&w<400){if(++t._redirects>n.maxRedirects){fn(t,g,"Maximum redirects exceeded");return}g.abort();let k;try{k=new MS(b,e)}catch{let x=new SyntaxError(`Invalid URL: ${b}`);FS(t,x);return}GB(t,k,r,i)}else t.emit("unexpected-response",g,H)||fn(t,g,`Unexpected server response: ${H.statusCode}`)}),g.on("upgrade",(H,b,w)=>{if(t.emit("upgrade",H),t.readyState!==Ee.CONNECTING)return;g=t._req=null;let k=Ooe("sha1").update(l+Boe).digest("base64");if(H.headers["sec-websocket-accept"]!==k){fn(t,b,"Invalid Sec-WebSocket-Accept header");return}let U=H.headers["sec-websocket-protocol"],x;if(U!==void 0?f.size?f.has(U)||(x="Server sent an invalid subprotocol"):x="Server sent a subprotocol but none was requested":f.size&&(x="Server sent no subprotocol"),x){fn(t,b,x);return}U&&(t._protocol=U);let L=H.headers["sec-websocket-extensions"];if(L!==void 0){if(!m){fn(t,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let q;try{q=Goe(L)}catch{fn(t,b,"Invalid Sec-WebSocket-Extensions header");return}let j=Object.keys(q);if(j.length!==1||j[0]!==Ma.extensionName){fn(t,b,"Server indicated an extension that was not requested");return}try{m.accept(q[Ma.extensionName])}catch{fn(t,b,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Ma.extensionName]=m}t.setSocket(b,w,{generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})})}function FS(t,e){t._readyState=Ee.CLOSING,t.emit("error",e),t.emitClose()}function Joe(t){return t.path=t.socketPath,WB.connect(t)}function Yoe(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=WB.isIP(t.host)?"":t.host),Roe.connect(t)}function fn(t,e,r){t._readyState=Ee.CLOSING;let i=new Error(r);Error.captureStackTrace(i,fn),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 BS(t,e,r){if(e){let i=Koe(e).length;t._socket?t._sender._bufferedBytes+=i:t._bufferedAmount+=i}if(r){let i=new Error(`WebSocket is not open: readyState ${t.readyState} (${Io[t.readyState]})`);r(i)}}function Qoe(t,e){let r=this[qr];r._closeFrameReceived=!0,r._closeMessage=e,r._closeCode=t,r._socket[qr]!==void 0&&(r._socket.removeListener("data",Zv),process.nextTick(KB,r._socket),t===1005?r.close():r.close(t,e))}function Zoe(){let t=this[qr];t.isPaused||t._socket.resume()}function eae(t){let e=this[qr];e._socket[qr]!==void 0&&(e._socket.removeListener("data",Zv),process.nextTick(KB,e._socket),e.close(t[joe])),e.emit("error",t)}function qB(){this[qr].emitClose()}function tae(t,e){this[qr].emit("message",t,e)}function rae(t){let e=this[qr];e.pong(t,!e._isServer,VB),e.emit("ping",t)}function iae(t){this[qr].emit("pong",t)}function KB(t){t.resume()}function zB(){let t=this[qr];this.removeListener("close",zB),this.removeListener("data",Zv),this.removeListener("end",XB),t._readyState=Ee.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[qr]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",qB),t._receiver.on("finish",qB))}function Zv(t){this[qr]._receiver.write(t)||this.pause()}function XB(){let t=this[qr];t._readyState=Ee.CLOSING,t._receiver.end(),this.end()}function JB(){let t=this[qr];this.removeListener("error",JB),this.on("error",VB),t&&(t._readyState=Ee.CLOSING,this.destroy())}});var ZB=v((iPe,QB)=>{"use strict";var{tokenChars:nae}=dm();function sae(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&&nae[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}QB.exports={parse:sae}});var s2=v((aPe,n2)=>{"use strict";var oae=require("events"),eb=require("http"),nPe=require("https"),sPe=require("net"),oPe=require("tls"),{createHash:aae}=require("crypto"),e2=RS(),mc=fm(),uae=ZB(),cae=US(),{GUID:lae,kWebSocket:pae}=ka(),fae=/^[+/0-9A-Za-z]{22}==$/,t2=0,r2=1,i2=2,jS=class extends oae{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:cae,...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=eb.createServer((i,n)=>{let s=eb.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=dae(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=t2}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===i2){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Hm,this);return}if(e&&this.once("close",e),this._state!==r2)if(this._state=r2,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(Hm,this):process.nextTick(Hm,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{Hm(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",qS);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||!fae.test(s)||o!==8&&o!==13||!this.shouldHandle(e))return Dp(r,400);let a=e.headers["sec-websocket-protocol"],u=new Set;if(a!==void 0)try{u=uae.parse(a)}catch{return Dp(r,400)}let c=e.headers["sec-websocket-extensions"],l={};if(this.options.perMessageDeflate&&c!==void 0){let p=new mc(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let f=e2.parse(c);f[mc.extensionName]&&(p.accept(f[mc.extensionName]),l[mc.extensionName]=p)}catch{return Dp(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,m,g,H)=>{if(!f)return Dp(r,m||401,g,H);this.completeUpgrade(l,s,u,e,r,i,n)});return}if(!this.options.verifyClient(p))return Dp(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[pae])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>t2)return Dp(s,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${aae("sha1").update(r+lae).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[mc.extensionName]){let p=e[mc.extensionName].params,f=e2.format({[mc.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",qS),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(Hm,this)})),a(l,n)}};n2.exports=jS;function dae(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 Hm(t){t._state=i2,t.emit("close")}function qS(){this.destroy()}function Dp(t,e,r,i){t.writable&&(r=r||eb.STATUS_CODES[e],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...i},t.write(`HTTP/1.1 ${e} ${eb.STATUS_CODES[e]}\r
`+Object.keys(i).map(n=>`${n}: ${i[n]}`).join(`\r
`)+`\r
\r
`+r)),t.removeListener("error",qS),t.destroy()}});var b2=v((UPe,v2)=>{"use strict";v2.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 _2=v((jPe,w2)=>{w2.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 E2=v((qPe,I2)=>{"use strict";var _ae=_2(),Aae=Array.prototype.concat,Iae=Array.prototype.slice,A2=I2.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];_ae(s)?r=Aae.call(r,Iae.call(s)):r.push(s)}return r};A2.wrap=function(t){return function(){return t(A2(arguments))}}});var D2=v((WPe,x2)=>{var vm=b2(),bm=E2(),S2=Object.hasOwnProperty,C2={};for(ob in vm)S2.call(vm,ob)&&(C2[vm[ob]]=ob);var ob,Ni=x2.exports={to:{},get:{}};Ni.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Ni.get.hsl(t),i="hsl";break;case"hwb":r=Ni.get.hwb(t),i="hwb";break;default:r=Ni.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Ni.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]:S2.call(vm,a[1])?(o=vm[a[1]],o[3]=1,o):null:null;for(u=0;u<3;u++)o[u]=Na(o[u],0,255);return o[3]=Na(o[3],0,1),o};Ni.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=Na(parseFloat(r[2]),0,100),o=Na(parseFloat(r[3]),0,100),a=Na(isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};Ni.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=Na(parseFloat(r[2]),0,100),o=Na(parseFloat(r[3]),0,100),a=Na(isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};Ni.to.hex=function(){var t=bm(arguments);return"#"+ab(t[0])+ab(t[1])+ab(t[2])+(t[3]<1?ab(Math.round(t[3]*255)):"")};Ni.to.rgb=function(){var t=bm(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]+")"};Ni.to.rgb.percent=function(){var t=bm(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]+")"};Ni.to.hsl=function(){var t=bm(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Ni.to.hwb=function(){var t=bm(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Ni.to.keyword=function(t){return C2[t.slice(0,3)]};function Na(t,e,r){return Math.min(Math.max(e,t),r)}function ab(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var L2=v((VPe,P2)=>{"use strict";P2.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 XS=v((GPe,$2)=>{var wm=L2(),T2={};for(let t of Object.keys(wm))T2[wm[t]]=t;var me={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"]}};$2.exports=me;for(let t of Object.keys(me)){if(!("channels"in me[t]))throw new Error("missing channels property: "+t);if(!("labels"in me[t]))throw new Error("missing channel labels property: "+t);if(me[t].labels.length!==me[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=me[t];delete me[t].channels,delete me[t].labels,Object.defineProperty(me[t],"channels",{value:e}),Object.defineProperty(me[t],"labels",{value:r})}me.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]};me.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]};me.rgb.hwb=function(t){let e=t[0],r=t[1],i=t[2],n=me.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]};me.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 Eae(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}me.rgb.keyword=function(t){let e=T2[t];if(e)return e;let r=1/0,i;for(let n of Object.keys(wm)){let s=wm[n],o=Eae(t,s);o<r&&(r=o,i=n)}return i};me.keyword.rgb=function(t){return wm[t]};me.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]};me.rgb.lab=function(t){let e=me.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]};me.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};me.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]};me.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]}};me.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]};me.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]};me.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]};me.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]};me.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]};me.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]};me.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]};me.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]};me.rgb.ansi16=function(t,e=null){let[r,i,n]=t,s=e===null?me.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};me.hsv.ansi16=function(t){return me.rgb.ansi16(me.hsv.rgb(t),t[2])};me.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)};me.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]};me.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]};me.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};me.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]};me.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]};me.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]};me.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]};me.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]};me.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]};me.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]};me.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]};me.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]};me.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};me.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};me.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};me.gray.hsl=function(t){return[0,0,t[0]]};me.gray.hsv=me.gray.hsl;me.gray.hwb=function(t){return[0,100,t[0]]};me.gray.cmyk=function(t){return[0,0,0,t[0]]};me.gray.lab=function(t){return[t[0],0,0]};me.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};me.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var R2=v((KPe,k2)=>{var ub=XS();function Sae(){let t={},e=Object.keys(ub);for(let r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function Cae(t){let e=Sae(),r=[t];for(e[t].distance=0;r.length;){let i=r.pop(),n=Object.keys(ub[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 xae(t,e){return function(r){return e(t(r))}}function Dae(t,e){let r=[e[t].parent,t],i=ub[e[t].parent][t],n=e[t].parent;for(;e[n].parent;)r.unshift(e[n].parent),i=xae(ub[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}k2.exports=function(t){let e=Cae(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]=Dae(o,e))}return r}});var O2=v((zPe,M2)=>{var JS=XS(),Pae=R2(),Rp={},Lae=Object.keys(JS);function Tae(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 $ae(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}Lae.forEach(t=>{Rp[t]={},Object.defineProperty(Rp[t],"channels",{value:JS[t].channels}),Object.defineProperty(Rp[t],"labels",{value:JS[t].labels});let e=Pae(t);Object.keys(e).forEach(i=>{let n=e[i];Rp[t][i]=$ae(n),Rp[t][i].raw=Tae(n)})});M2.exports=Rp});var B2=v((XPe,F2)=>{var Mp=D2(),Fi=O2(),ZS=[].slice,N2=["keyword","gray","hex"],YS={};for(let t of Object.keys(Fi))YS[ZS.call(Fi[t].labels).sort().join("")]=t;var cb={};function mr(t,e){if(!(this instanceof mr))return new mr(t,e);if(e&&e in N2&&(e=null),e&&!(e in Fi))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 mr)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){let n=Mp.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Fi[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=Fi[this.model].channels;let n=ZS.call(t,0,i);this.color=QS(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 YS))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=YS[s];let o=Fi[this.model].labels,a=[];for(r=0;r<o.length;r++)a.push(t[o[r]]);this.color=QS(a)}if(cb[this.model])for(i=Fi[this.model].channels,r=0;r<i;r++){let n=cb[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)}mr.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in Mp.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 Mp.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 Mp.to.rgb.percent(r)},array(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object(){let t={},e=Fi[this.model].channels,r=Fi[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 mr(this.color.map(Rae(t)).concat(this.valpha),this.model)},alpha(t){return arguments.length>0?new mr(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:Ot("rgb",0,nr(255)),green:Ot("rgb",1,nr(255)),blue:Ot("rgb",2,nr(255)),hue:Ot(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:Ot("hsl",1,nr(100)),lightness:Ot("hsl",2,nr(100)),saturationv:Ot("hsv",1,nr(100)),value:Ot("hsv",2,nr(100)),chroma:Ot("hcg",1,nr(100)),gray:Ot("hcg",2,nr(100)),white:Ot("hwb",1,nr(100)),wblack:Ot("hwb",2,nr(100)),cyan:Ot("cmyk",0,nr(100)),magenta:Ot("cmyk",1,nr(100)),yellow:Ot("cmyk",2,nr(100)),black:Ot("cmyk",3,nr(100)),x:Ot("xyz",0,nr(100)),y:Ot("xyz",1,nr(100)),z:Ot("xyz",2,nr(100)),l:Ot("lab",0,nr(100)),a:Ot("lab",1),b:Ot("lab",2),keyword(t){return arguments.length>0?new mr(t):Fi[this.model].keyword(this.color)},hex(t){return arguments.length>0?new mr(t):Mp.to.hex(this.rgb().round().color)},hexa(t){if(arguments.length>0)return new mr(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Mp.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 mr.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 mr.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(Fi)){if(N2.includes(t))continue;let e=Fi[t].channels;mr.prototype[t]=function(){if(this.model===t)return new mr(this);if(arguments.length>0)return new mr(arguments,t);let r=typeof arguments[e]=="number"?e:this.valpha;return new mr(Mae(Fi[this.model][t].raw(this.color)).concat(r),t)},mr[t]=function(r){return typeof r=="number"&&(r=QS(ZS.call(arguments),e)),new mr(r,t)}}function kae(t,e){return Number(t.toFixed(e))}function Rae(t){return function(e){return kae(e,t)}}function Ot(t,e,r){t=Array.isArray(t)?t:[t];for(let i of t)(cb[i]||(cb[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 nr(t){return function(e){return Math.max(0,Math.min(t,e))}}function Mae(t){return Array.isArray(t)?t:[t]}function QS(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}F2.exports=mr});var M3=v((uke,R3)=>{"use strict";function pue(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}R3.exports=pue});var So=v((Eo,Nb)=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var O3=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function fue(t){return O3.includes(t)}var due=["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",...O3];function hue(t){return due.includes(t)}var mue=["null","undefined","string","number","bigint","boolean","symbol"];function gue(t){return mue.includes(t)}function Gp(t){return e=>typeof e===t}var{toString:N3}=Object.prototype,Pm=t=>{let e=N3.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&C.domElement(t))return"HTMLElement";if(hue(e))return e},pt=t=>e=>Pm(e)===t;function C(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(C.observable(t))return"Observable";if(C.array(t))return"Array";if(C.buffer(t))return"Buffer";let e=Pm(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"}C.undefined=Gp("undefined");C.string=Gp("string");var Hue=Gp("number");C.number=t=>Hue(t)&&!C.nan(t);C.bigint=Gp("bigint");C.function_=Gp("function");C.null_=t=>t===null;C.class_=t=>C.function_(t)&&t.toString().startsWith("class ");C.boolean=t=>t===!0||t===!1;C.symbol=Gp("symbol");C.numericString=t=>C.string(t)&&!C.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));C.array=(t,e)=>Array.isArray(t)?C.function_(e)?t.every(e):!0:!1;C.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};C.blob=t=>pt("Blob")(t);C.nullOrUndefined=t=>C.null_(t)||C.undefined(t);C.object=t=>!C.null_(t)&&(typeof t=="object"||C.function_(t));C.iterable=t=>{var e;return C.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};C.asyncIterable=t=>{var e;return C.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};C.generator=t=>{var e,r;return C.iterable(t)&&C.function_((e=t)===null||e===void 0?void 0:e.next)&&C.function_((r=t)===null||r===void 0?void 0:r.throw)};C.asyncGenerator=t=>C.asyncIterable(t)&&C.function_(t.next)&&C.function_(t.throw);C.nativePromise=t=>pt("Promise")(t);var yue=t=>{var e,r;return C.function_((e=t)===null||e===void 0?void 0:e.then)&&C.function_((r=t)===null||r===void 0?void 0:r.catch)};C.promise=t=>C.nativePromise(t)||yue(t);C.generatorFunction=pt("GeneratorFunction");C.asyncGeneratorFunction=t=>Pm(t)==="AsyncGeneratorFunction";C.asyncFunction=t=>Pm(t)==="AsyncFunction";C.boundFunction=t=>C.function_(t)&&!t.hasOwnProperty("prototype");C.regExp=pt("RegExp");C.date=pt("Date");C.error=pt("Error");C.map=t=>pt("Map")(t);C.set=t=>pt("Set")(t);C.weakMap=t=>pt("WeakMap")(t);C.weakSet=t=>pt("WeakSet")(t);C.int8Array=pt("Int8Array");C.uint8Array=pt("Uint8Array");C.uint8ClampedArray=pt("Uint8ClampedArray");C.int16Array=pt("Int16Array");C.uint16Array=pt("Uint16Array");C.int32Array=pt("Int32Array");C.uint32Array=pt("Uint32Array");C.float32Array=pt("Float32Array");C.float64Array=pt("Float64Array");C.bigInt64Array=pt("BigInt64Array");C.bigUint64Array=pt("BigUint64Array");C.arrayBuffer=pt("ArrayBuffer");C.sharedArrayBuffer=pt("SharedArrayBuffer");C.dataView=pt("DataView");C.enumCase=(t,e)=>Object.values(e).includes(t);C.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;C.urlInstance=t=>pt("URL")(t);C.urlString=t=>{if(!C.string(t))return!1;try{return new URL(t),!0}catch{return!1}};C.truthy=t=>Boolean(t);C.falsy=t=>!t;C.nan=t=>Number.isNaN(t);C.primitive=t=>C.null_(t)||gue(typeof t);C.integer=t=>Number.isInteger(t);C.safeInteger=t=>Number.isSafeInteger(t);C.plainObject=t=>{if(N3.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};C.typedArray=t=>fue(Pm(t));var vue=t=>C.safeInteger(t)&&t>=0;C.arrayLike=t=>!C.nullOrUndefined(t)&&!C.function_(t)&&vue(t.length);C.inRange=(t,e)=>{if(C.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(C.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var bue=1,wue=["innerHTML","ownerDocument","style","attributes","nodeValue"];C.domElement=t=>C.object(t)&&t.nodeType===bue&&C.string(t.nodeName)&&!C.plainObject(t)&&wue.every(e=>e in t);C.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};C.nodeStream=t=>C.object(t)&&C.function_(t.pipe)&&!C.observable(t);C.infinite=t=>t===1/0||t===-1/0;var F3=t=>e=>C.integer(e)&&Math.abs(e%2)===t;C.evenInteger=F3(0);C.oddInteger=F3(1);C.emptyArray=t=>C.array(t)&&t.length===0;C.nonEmptyArray=t=>C.array(t)&&t.length>0;C.emptyString=t=>C.string(t)&&t.length===0;var _ue=t=>C.string(t)&&!/\S/.test(t);C.emptyStringOrWhitespace=t=>C.emptyString(t)||_ue(t);C.nonEmptyString=t=>C.string(t)&&t.length>0;C.nonEmptyStringAndNotWhitespace=t=>C.string(t)&&!C.emptyStringOrWhitespace(t);C.emptyObject=t=>C.object(t)&&!C.map(t)&&!C.set(t)&&Object.keys(t).length===0;C.nonEmptyObject=t=>C.object(t)&&!C.map(t)&&!C.set(t)&&Object.keys(t).length>0;C.emptySet=t=>C.set(t)&&t.size===0;C.nonEmptySet=t=>C.set(t)&&t.size>0;C.emptyMap=t=>C.map(t)&&t.size===0;C.nonEmptyMap=t=>C.map(t)&&t.size>0;C.propertyKey=t=>C.any([C.string,C.number,C.symbol],t);C.formData=t=>pt("FormData")(t);C.urlSearchParams=t=>pt("URLSearchParams")(t);var B3=(t,e,r)=>{if(!C.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)};C.any=(t,...e)=>(C.array(t)?t:[t]).some(i=>B3(Array.prototype.some,i,e));C.all=(t,...e)=>B3(Array.prototype.every,t,e);var se=(t,e,r,i={})=>{if(!t){let{multipleValues:n}=i,s=n?`received values of types ${[...new Set(r.map(o=>`\`${C(o)}\``))].join(", ")}`:`received value of type \`${C(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${s}.`)}};Eo.assert={undefined:t=>se(C.undefined(t),"undefined",t),string:t=>se(C.string(t),"string",t),number:t=>se(C.number(t),"number",t),bigint:t=>se(C.bigint(t),"bigint",t),function_:t=>se(C.function_(t),"Function",t),null_:t=>se(C.null_(t),"null",t),class_:t=>se(C.class_(t),"Class",t),boolean:t=>se(C.boolean(t),"boolean",t),symbol:t=>se(C.symbol(t),"symbol",t),numericString:t=>se(C.numericString(t),"string with a number",t),array:(t,e)=>{se(C.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>se(C.buffer(t),"Buffer",t),blob:t=>se(C.blob(t),"Blob",t),nullOrUndefined:t=>se(C.nullOrUndefined(t),"null or undefined",t),object:t=>se(C.object(t),"Object",t),iterable:t=>se(C.iterable(t),"Iterable",t),asyncIterable:t=>se(C.asyncIterable(t),"AsyncIterable",t),generator:t=>se(C.generator(t),"Generator",t),asyncGenerator:t=>se(C.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>se(C.nativePromise(t),"native Promise",t),promise:t=>se(C.promise(t),"Promise",t),generatorFunction:t=>se(C.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>se(C.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>se(C.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>se(C.boundFunction(t),"Function",t),regExp:t=>se(C.regExp(t),"RegExp",t),date:t=>se(C.date(t),"Date",t),error:t=>se(C.error(t),"Error",t),map:t=>se(C.map(t),"Map",t),set:t=>se(C.set(t),"Set",t),weakMap:t=>se(C.weakMap(t),"WeakMap",t),weakSet:t=>se(C.weakSet(t),"WeakSet",t),int8Array:t=>se(C.int8Array(t),"Int8Array",t),uint8Array:t=>se(C.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>se(C.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>se(C.int16Array(t),"Int16Array",t),uint16Array:t=>se(C.uint16Array(t),"Uint16Array",t),int32Array:t=>se(C.int32Array(t),"Int32Array",t),uint32Array:t=>se(C.uint32Array(t),"Uint32Array",t),float32Array:t=>se(C.float32Array(t),"Float32Array",t),float64Array:t=>se(C.float64Array(t),"Float64Array",t),bigInt64Array:t=>se(C.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>se(C.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>se(C.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>se(C.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>se(C.dataView(t),"DataView",t),enumCase:(t,e)=>se(C.enumCase(t,e),"EnumCase",t),urlInstance:t=>se(C.urlInstance(t),"URL",t),urlString:t=>se(C.urlString(t),"string with a URL",t),truthy:t=>se(C.truthy(t),"truthy",t),falsy:t=>se(C.falsy(t),"falsy",t),nan:t=>se(C.nan(t),"NaN",t),primitive:t=>se(C.primitive(t),"primitive",t),integer:t=>se(C.integer(t),"integer",t),safeInteger:t=>se(C.safeInteger(t),"integer",t),plainObject:t=>se(C.plainObject(t),"plain object",t),typedArray:t=>se(C.typedArray(t),"TypedArray",t),arrayLike:t=>se(C.arrayLike(t),"array-like",t),domElement:t=>se(C.domElement(t),"HTMLElement",t),observable:t=>se(C.observable(t),"Observable",t),nodeStream:t=>se(C.nodeStream(t),"Node.js Stream",t),infinite:t=>se(C.infinite(t),"infinite number",t),emptyArray:t=>se(C.emptyArray(t),"empty array",t),nonEmptyArray:t=>se(C.nonEmptyArray(t),"non-empty array",t),emptyString:t=>se(C.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>se(C.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>se(C.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>se(C.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>se(C.emptyObject(t),"empty object",t),nonEmptyObject:t=>se(C.nonEmptyObject(t),"non-empty object",t),emptySet:t=>se(C.emptySet(t),"empty set",t),nonEmptySet:t=>se(C.nonEmptySet(t),"non-empty set",t),emptyMap:t=>se(C.emptyMap(t),"empty map",t),nonEmptyMap:t=>se(C.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>se(C.propertyKey(t),"PropertyKey",t),formData:t=>se(C.formData(t),"FormData",t),urlSearchParams:t=>se(C.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>se(C.evenInteger(t),"even integer",t),oddInteger:t=>se(C.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>se(C.directInstanceOf(t,e),"T",t),inRange:(t,e)=>se(C.inRange(t,e),"in range",t),any:(t,...e)=>se(C.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>se(C.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(C,{class:{value:C.class_},function:{value:C.function_},null:{value:C.null_}});Object.defineProperties(Eo.assert,{class:{value:Eo.assert.class_},function:{value:Eo.assert.function_},null:{value:Eo.assert.null_}});Eo.default=C;Nb.exports=C;Nb.exports.default=C;Nb.exports.assert=Eo.assert});var U3=v((cke,LC)=>{"use strict";var Fb=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},Kp=class{static fn(e){return(...r)=>new Kp((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 Fb(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(Kp.prototype,Promise.prototype);LC.exports=Kp;LC.exports.CancelError=Fb});var j3=v(($C,kC)=>{"use strict";Object.defineProperty($C,"__esModule",{value:!0});function Aue(t){return t.encrypted}var TC=(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(),Aue(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)};$C.default=TC;kC.exports=TC;kC.exports.default=TC});var q3=v((MC,OC)=>{"use strict";Object.defineProperty(MC,"__esModule",{value:!0});var Iue=j3(),Eue=require("util"),Sue=Number(process.versions.node.split(".")[0]),RC=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||Sue>=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,Eue.types.isProxy(a))return;let u=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};a.prependOnceListener("lookup",u),Iue.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};MC.default=RC;OC.exports=RC;OC.exports.default=RC});var J3=v((lke,BC)=>{"use strict";var{V4MAPPED:Cue,ADDRCONFIG:xue,ALL:X3,promises:{Resolver:W3},lookup:Due}=require("dns"),{promisify:NC}=require("util"),Pue=require("os"),zp=Symbol("cacheableLookupCreateConnection"),FC=Symbol("cacheableLookupInstance"),V3=Symbol("expires"),Lue=typeof X3=="number",G3=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},Tue=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},K3=()=>{let t=!1,e=!1;for(let r of Object.values(Pue.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}},$ue=t=>Symbol.iterator in t,z3={ttl:!0},kue={all:!0},Bb=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:i=3600,errorTtl:n=.15,resolver:s=new W3,lookup:o=Due}={}){if(this.maxTtl=r,this.errorTtl=n,this._cache=e,this._resolver=s,this._dnsLookup=NC(o),this._resolver instanceof W3?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=NC(this._resolver.resolve4.bind(this._resolver)),this._resolve6=NC(this._resolver.resolve6.bind(this._resolver))),this._iface=K3(),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&Cue&&(Lue&&r.hints&X3||n.length===0)?Tue(i):i=n}else r.family===4&&(i=i.filter(n=>n.family===4));if(r.hints&xue){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,z3),this._resolve6(e,z3)].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[V3]=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}}$ue(this._cache)&&this._tick(i)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,kue);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[V3];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(G3(e),zp in e)throw new Error("CacheableLookup has been already installed");e[zp]=e.createConnection,e[FC]=this,e.createConnection=(r,i)=>("lookup"in r||(r.lookup=this.lookup),e[zp](r,i))}uninstall(e){if(G3(e),e[zp]){if(e[FC]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[zp],delete e[zp],delete e[FC]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=K3(),(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()}};BC.exports=Bb;BC.exports.default=Bb});var Z3=v((pke,Q3)=>{"use strict";var Rue="text/plain",Mue="us-ascii",Y3=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),Oue=(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,m=""]=p.split("=").map(g=>g.trim());return f==="charset"&&(m=m.toLowerCase(),m===Mue)?"":`${f}${m?`=${m}`:""}`}).filter(Boolean)];return a&&l.push("base64"),(l.length!==0||u&&u!==Rue)&&l.unshift(u),`data:${l.join(";")},${a?n.trim():n}${s?`#${s}`:""}`},Nue=(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 Oue(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];Y3(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()])Y3(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};Q3.exports=Nue});var UC=v((fke,tU)=>{tU.exports=eU;function eU(t,e){if(t&&e)return eU(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 Xp=v((dke,jC)=>{var rU=UC();jC.exports=rU(Ub);jC.exports.strict=rU(iU);Ub.proto=Ub(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Ub(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return iU(this)},configurable:!0})});function Ub(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function iU(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 jb=v((hke,sU)=>{var Fue=Xp(),Bue=function(){},Uue=function(t){return t.setHeader&&typeof t.abort=="function"},jue=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},nU=function(t,e,r){if(typeof e=="function")return nU(t,null,e);e||(e={}),r=Fue(r||Bue);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)},m=function(){process.nextTick(g)},g=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"))}},H=function(){t.req.on("finish",c)};return Uue(t)?(t.on("complete",c),t.on("abort",m),t.req?H():t.on("request",H)):o&&!i&&(t.on("end",u),t.on("close",u)),jue(t)&&t.on("exit",p),t.on("end",l),t.on("finish",c),e.error!==!1&&t.on("error",f),t.on("close",m),function(){a=!0,t.removeListener("complete",c),t.removeListener("abort",m),t.removeListener("request",H),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",m)}};sU.exports=nU});var uU=v((mke,aU)=>{var que=Xp(),Wue=jb(),qC=require("fs"),Lm=function(){},Vue=/^v?\.0/.test(process.version),qb=function(t){return typeof t=="function"},Gue=function(t){return!Vue||!qC?!1:(t instanceof(qC.ReadStream||Lm)||t instanceof(qC.WriteStream||Lm))&&qb(t.close)},Kue=function(t){return t.setHeader&&qb(t.abort)},zue=function(t,e,r,i){i=que(i);var n=!1;t.on("close",function(){n=!0}),Wue(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,Gue(t))return t.close(Lm);if(Kue(t))return t.abort();if(qb(t.destroy))return t.destroy();i(o||new Error("stream was destroyed"))}}},oU=function(t){t()},Xue=function(t,e){return t.pipe(e)},Jue=function(){var t=Array.prototype.slice.call(arguments),e=qb(t[t.length-1]||Lm)&&t.pop()||Lm;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 zue(n,o,a,function(u){r||(r=u),u&&i.forEach(oU),!o&&(i.forEach(oU),e(r))})});return t.reduce(Xue)};aU.exports=Jue});var lU=v((gke,cU)=>{"use strict";var{PassThrough:Yue}=require("stream");cU.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 Yue({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 pU=v((Hke,Jp)=>{"use strict";var{constants:Que}=require("buffer"),Zue=uU(),ece=lU(),Wb=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Vb(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()<=Que.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),s(a)};i=Zue(t,ece(e),a=>{if(a){o(a);return}n()}),i.on("data",()=>{i.getBufferedLength()>r&&o(new Wb)})}),i.getBufferedValue()}Jp.exports=Vb;Jp.exports.default=Vb;Jp.exports.buffer=(t,e)=>Vb(t,{...e,encoding:"buffer"});Jp.exports.array=(t,e)=>Vb(t,{...e,array:!0});Jp.exports.MaxBufferError=Wb});var dU=v((vke,fU)=>{"use strict";var tce=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),rce=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),ice=new Set([500,502,503,504]),nce={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},sce={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Cc(t){let e=parseInt(t,10);return isFinite(e)?e:0}function oce(t){return t?ice.has(t.status):!0}function WC(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 ace(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(", ")}fU.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=WC(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=WC(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":ace(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())&&rce.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||tce.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=WC(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)nce[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 Cc(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 Cc(this._rescc["s-maxage"])}if(this._rescc["max-age"])return Cc(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+Cc(this._rescc["stale-if-error"]),i=e+Cc(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,i)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+Cc(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+Cc(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()&&oce(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&&!sce[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 Gb=v((bke,hU)=>{"use strict";hU.exports=t=>{let e={};for(let[r,i]of Object.entries(t))e[r.toLowerCase()]=i;return e}});var gU=v((wke,mU)=>{"use strict";var uce=require("stream").Readable,cce=Gb(),VC=class extends uce{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=cce(r),this.body=i,this.url=n}_read(){this.push(this.body),this.push(null)}};mU.exports=VC});var yU=v((_ke,HU)=>{"use strict";var lce=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];HU.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(lce));for(let i of r)i in e||(e[i]=typeof t[i]=="function"?t[i].bind(t):t[i])}});var bU=v((Ake,vU)=>{"use strict";var pce=require("stream").PassThrough,fce=yU(),dce=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");let e=new pce;return fce(t,e),t.pipe(e)};vU.exports=dce});var wU=v(GC=>{GC.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)};GC.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 EU=v((Eke,IU)=>{"use strict";var hce=require("events"),_U=wU(),mce=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(require(e[r]))(t)}return new Map},AU=["sqlite","postgres","mysql","mongo","redis","tiered"],KC=class extends hce{constructor(e,{emitErrors:r=!0,...i}={}){if(super(),this.opts={namespace:"keyv",serialize:_U.stringify,deserialize:_U.parse,...typeof e=="string"?{uri:e}:e,...i},!this.opts.store){let s={...this.opts};this.opts.store=mce(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 AU.includes(this.opts.store.opts.dialect)||AU.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()}};IU.exports=KC});var xU=v((Ske,CU)=>{"use strict";var gce=require("events"),Kb=require("url"),Hce=Z3(),yce=pU(),zC=dU(),SU=gU(),vce=Gb(),bce=bU(),wce=EU(),qn=class{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new wce({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=XC(Kb.parse(r)),r={};else if(r instanceof Kb.URL)n=XC(Kb.parse(r.toString())),r={};else{let[p,...f]=(r.path||"").split("?"),m=f.length>0?`?${f.join("?")}`:"";n=XC({...r,pathname:p,search:m})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,..._ce(n)},r.headers=vce(r.headers);let s=new gce,o=Hce(Kb.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),a=`${r.method}:${o}`,u=!1,c=!1,l=p=>{c=!0;let f=!1,m,g=new Promise(b=>{m=()=>{f||(f=!0,b())}}),H=b=>{if(u&&!p.forceRefresh){b.status=b.statusCode;let k=zC.fromObject(u.cachePolicy).revalidatedPolicy(p,b);if(!k.modified){let U=k.policy.responseHeaders();b=new SU(u.statusCode,U,u.body,u.url),b.cachePolicy=k.policy,b.fromCache=!0}}b.fromCache||(b.cachePolicy=new zC(p,b,p),b.fromCache=!1);let w;p.cache&&b.cachePolicy.storable()?(w=bce(b),(async()=>{try{let k=yce.buffer(b);if(await Promise.race([g,new Promise(q=>b.once("end",q))]),f)return;let U=await k,x={cachePolicy:b.cachePolicy.toObject(),url:b.url,statusCode:b.fromCache?u.statusCode:b.statusCode,body:U},L=p.strictTtl?b.cachePolicy.timeToLive():void 0;p.maxTtl&&(L=L?Math.min(L,p.maxTtl):p.maxTtl),await this.cache.set(a,x,L)}catch(k){s.emit("error",new qn.CacheError(k))}})()):p.cache&&u&&(async()=>{try{await this.cache.delete(a)}catch(k){s.emit("error",new qn.CacheError(k))}})(),s.emit("response",w||b),typeof i=="function"&&i(w||b)};try{let b=e(p,H);b.once("error",m),b.once("abort",m),s.emit("request",b)}catch(b){s.emit("error",new qn.RequestError(b))}};return(async()=>{let p=async m=>{await Promise.resolve();let g=m.cache?await this.cache.get(a):void 0;if(typeof g>"u")return l(m);let H=zC.fromObject(g.cachePolicy);if(H.satisfiesWithoutRevalidation(m)&&!m.forceRefresh){let b=H.responseHeaders(),w=new SU(g.statusCode,b,g.body,g.url);w.cachePolicy=H,w.fromCache=!0,s.emit("response",w),typeof i=="function"&&i(w)}else u=g,m.headers=H.revalidationHeaders(m),l(m)},f=m=>s.emit("error",new qn.CacheError(m));this.cache.once("error",f),s.on("response",()=>this.cache.removeListener("error",f));try{await p(r)}catch(m){r.automaticFailover&&!c&&l(r),s.emit("error",new qn.CacheError(m))}})(),s}}};function _ce(t){let e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function XC(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}qn.RequestError=class extends Error{constructor(t){super(t.message),this.name="RequestError",Object.assign(this,t)}};qn.CacheError=class extends Error{constructor(t){super(t.message),this.name="CacheError",Object.assign(this,t)}};CU.exports=qn});var PU=v((Dke,DU)=>{"use strict";var Ace=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];DU.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(Ace)),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 TU=v((Pke,LU)=>{"use strict";var{Transform:Ice,PassThrough:Ece}=require("stream"),JC=require("zlib"),Sce=PU();LU.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof JC.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let i=!0,n=new Ice({transform(a,u,c){i=!1,c(null,a)},flush(a){a()}}),s=new Ece({autoDestroy:!1,destroy(a,u){t.destroy(),u(a)}}),o=r?JC.createBrotliDecompress():JC.createUnzip();return o.once("error",a=>{if(i&&!t.readable){s.end();return}s.destroy(a)}),Sce(t,s),t.pipe(n).pipe(o).pipe(s),s}});var QC=v((Lke,$U)=>{"use strict";var YC=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)}};$U.exports=YC});var ex=v((Tke,OU)=>{"use strict";var Cce=require("events"),xce=require("tls"),Dce=require("http2"),Pce=QC(),ri=Symbol("currentStreamsCount"),kU=Symbol("request"),hn=Symbol("cachedOriginSet"),Yp=Symbol("gracefullyClosing"),Lce=["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"],Tce=(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},$ce=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,ZC=(t,e)=>{for(let r of t)r[hn].length<e[hn].length&&r[hn].every(i=>e[hn].includes(i))&&r[ri]+e[ri]<=e.remoteSettings.maxConcurrentStreams&&MU(r)},kce=(t,e)=>{for(let r of t)e[hn].length<r[hn].length&&e[hn].every(i=>r[hn].includes(i))&&e[ri]+r[ri]<=r.remoteSettings.maxConcurrentStreams&&MU(e)},RU=({agent:t,isFree:e})=>{let r={};for(let i in t.sessions){let s=t.sessions[i].filter(o=>{let a=o[Us.kCurrentStreamsCount]<o.remoteSettings.maxConcurrentStreams;return e?a:!a});s.length!==0&&(r[i]=s)}return r},MU=t=>{t[Yp]=!0,t[ri]===0&&t.close()},Us=class extends Cce{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 Pce({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 Lce)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=Us.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,m;for(let g of l){let H=g.remoteSettings.maxConcurrentStreams;if(H<p)break;if(g[hn].includes(a)){let b=g[ri];if(b>=H||g[Yp]||g.destroyed)continue;m||(p=H),b>f&&(m=g,f=b)}}if(m){if(i.length!==1){for(let{reject:g}of i){let H=new Error(`Expected the length of listeners to be 1, got ${i.length}.
Please report this to https://github.com/szmarczak/http2-wrapper/`);g(H)}return}i[0].resolve(m);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=Dce.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(l),...r});f[ri]=0,f[Yp]=!1;let m=()=>f[ri]<f.remoteSettings.maxConcurrentStreams,g=!0;f.socket.once("session",b=>{this.tlsSessionCache.set(l,b)}),f.once("error",b=>{for(let{reject:w}of i)w(b);this.tlsSessionCache.delete(l)}),f.setTimeout(this.timeout,()=>{f.destroy()}),f.once("close",()=>{if(p){g&&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:w}of i)w(b);u()}this._tryToCreateNewSession(o,a)});let H=()=>{if(!(!(o in this.queue)||!m())){for(let b of f[hn])if(b in this.queue[o]){let{listeners:w}=this.queue[o][b];for(;w.length!==0&&m();)w.shift().resolve(f);let k=this.queue[o];if(k[b].listeners.length===0&&(delete k[b],Object.keys(k).length===0)){delete this.queue[o];break}if(!m())break}}};f.on("origin",()=>{f[hn]=f.originSet,m()&&(H(),ZC(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 w of i)w.reject(b);f.destroy();return}f[hn]=f.originSet;{let b=this.sessions;if(o in b){let w=b[o];w.splice(Tce(w,f,$ce),0,f)}else b[o]=[f]}this._freeSessionsCount+=1,p=!0,this.emit("session",f),H(),u(),f[ri]===0&&this._freeSessionsCount>this.maxFreeSessions&&f.close(),i.length!==0&&(this.getSession(a,r,i),i.length=0),f.on("remoteSettings",()=>{H(),ZC(this.sessions[o],f)})}),f[kU]=f.request,f.request=(b,w)=>{if(f[Yp])throw new Error("The session is gracefully closing. No new streams are allowed.");let k=f[kU](b,w);return f.ref(),++f[ri],f[ri]===f.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,k.once("close",()=>{if(g=m(),--f[ri],!f.destroyed&&!f.closed&&(kce(this.sessions[o],f),m()&&!f.closed)){g||(this._freeSessionsCount++,g=!0);let U=f[ri]===0;U&&f.unref(),U&&(this._freeSessionsCount>this.maxFreeSessions||f[Yp])?f.close():(ZC(this.sessions[o],f),H())}}),k}}catch(f){for(let m of i)m.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 Us.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),xce.connect(i,n,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[ri]===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 RU({agent:this,isFree:!0})}get busySessions(){return RU({agent:this,isFree:!1})}};Us.kCurrentStreamsCount=ri;Us.kGracefullyClosing=Yp;OU.exports={Agent:Us,globalAgent:new Us}});var rx=v(($ke,NU)=>{"use strict";var{Readable:Rce}=require("stream"),tx=class extends Rce{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()}};NU.exports=tx});var ix=v((kke,FU)=>{"use strict";FU.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 UU=v((Rke,BU)=>{"use strict";BU.exports=(t,e,r)=>{for(let i of r)t.on(i,(...n)=>e.emit(i,...n))}});var qU=v((Mke,jU)=>{"use strict";jU.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var VU=v((Nke,WU)=>{"use strict";var Qp=(t,e,r)=>{WU.exports[e]=class extends t{constructor(...n){super(typeof r=="string"?r:r(n)),this.name=`${super.name} [${e}]`,this.code=e}}};Qp(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]}`});Qp(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);Qp(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);Qp(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);Qp(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);Qp(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var ux=v((Fke,QU)=>{"use strict";var Mce=require("http2"),{Writable:Oce}=require("stream"),{Agent:GU,globalAgent:Nce}=ex(),Fce=rx(),Bce=ix(),Uce=UU(),jce=qU(),{ERR_INVALID_ARG_TYPE:nx,ERR_INVALID_PROTOCOL:qce,ERR_HTTP_HEADERS_SENT:KU,ERR_INVALID_HTTP_TOKEN:Wce,ERR_HTTP_INVALID_HEADER_VALUE:Vce,ERR_INVALID_CHAR:Gce}=VU(),{HTTP2_HEADER_STATUS:zU,HTTP2_HEADER_METHOD:XU,HTTP2_HEADER_PATH:JU,HTTP2_METHOD_CONNECT:Kce}=Mce.constants,Wr=Symbol("headers"),sx=Symbol("origin"),ox=Symbol("session"),YU=Symbol("options"),zb=Symbol("flushedHeaders"),Tm=Symbol("jobs"),zce=/^[\^`\-\w!#$%&*+.|~]+$/,Xce=/[^\t\u0020-\u007E\u0080-\u00FF]/,ax=class extends Oce{constructor(e,r,i){super({autoDestroy:!1});let n=typeof e=="string"||e instanceof URL;if(n&&(e=Bce(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[ox]=r.h2session;else if(r.agent===!1)this.agent=new GU({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new GU({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=Nce;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new nx("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new qce(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[Wr]=Object.create(null),this[Tm]=[],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[Wr])&&(this[Wr].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[YU]=r,s===443?(this[sx]=`https://${o}`,":authority"in this[Wr]||(this[Wr][":authority"]=o)):(this[sx]=`https://${o}:${s}`,":authority"in this[Wr]||(this[Wr][":authority"]=`${o}:${s}`)),a&&this.setTimeout(a),i&&this.once("response",i),this[zb]=!1}get method(){return this[Wr][XU]}set method(e){e&&(this[Wr][XU]=e.toUpperCase())}get path(){return this[Wr][JU]}set path(e){e&&(this[Wr][JU]=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[Tm].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[Tm].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[zb]||this.destroyed)return;this[zb]=!0;let e=this.method===Kce,r=i=>{if(this._request=i,this.destroyed){i.destroy();return}e||Uce(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 Fce(this.socket,i.readableHighWaterMark);this.res=c,c.req=this,c.statusCode=o[zU],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[zU]}))),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[Tm])o();this.emit("socket",this.socket)};if(this[ox])try{r(this[ox].request(this[Wr]))}catch(i){this.emit("error",i)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[sx],this[YU],this[Wr]))}catch(i){this.emit("error",i)}}}getHeader(e){if(typeof e!="string")throw new nx("name","string",e);return this[Wr][e.toLowerCase()]}get headersSent(){return this[zb]}removeHeader(e){if(typeof e!="string")throw new nx("name","string",e);if(this.headersSent)throw new KU("remove");delete this[Wr][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new KU("set");if(typeof e!="string"||!zce.test(e)&&!jce(e))throw new Wce("Header name",e);if(typeof r>"u")throw new Vce(r,e);if(Xce.test(r))throw new Gce("header content",e);this[Wr][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let i=()=>this._request.setTimeout(e,r);return this._request?i():this[Tm].push(i),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};QU.exports=ax});var ej=v((Bke,ZU)=>{"use strict";var Jce=require("tls");ZU.exports=(t={},e=Jce.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 rj=v((Uke,tj)=>{"use strict";var Yce=require("net");tj.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]),Yce.isIP(e)?"":e}});var sj=v((jke,lx)=>{"use strict";var ij=require("http"),cx=require("https"),Qce=ej(),Zce=QC(),ele=ux(),tle=rj(),rle=ix(),Xb=new Zce({maxSize:100}),$m=new Map,nj=(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)},ile=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!Xb.has(e)){if($m.has(e))return(await $m.get(e)).alpnProtocol;let{path:r,agent:i}=t;t.path=t.socketPath;let n=Qce(t);$m.set(e,n);try{let{socket:s,alpnProtocol:o}=await n;if(Xb.set(e,o),t.path=r,o==="h2")s.destroy();else{let{globalAgent:a}=cx,u=cx.Agent.prototype.createConnection;i?i.createConnection===u?nj(i,s,t):s.destroy():a.createConnection===u?nj(a,s,t):s.destroy()}return $m.delete(e),o}catch(s){throw $m.delete(e),s}}return Xb.get(e)};lx.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=rle(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||tle(e),e.port=e.port||(i?443:80),e._defaultAgent=i?cx.globalAgent:ij.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 ile(e)==="h2"?(n&&(e.agent=n.http2),new ele(e,r)):ij.request(e,r)};lx.exports.protocolCache=Xb});var aj=v((qke,oj)=>{"use strict";var nle=require("http2"),sle=ex(),px=ux(),ole=rx(),ale=sj(),ule=(t,e,r)=>new px(t,e,r),cle=(t,e,r)=>{let i=new px(t,e,r);return i.end(),i};oj.exports={...nle,ClientRequest:px,IncomingMessage:ole,...sle,request:ule,get:cle,auto:ale}});var dx=v(fx=>{"use strict";Object.defineProperty(fx,"__esModule",{value:!0});var uj=So();fx.default=t=>uj.default.nodeStream(t)&&uj.default.function_(t.getBoundary)});var fj=v(hx=>{"use strict";Object.defineProperty(hx,"__esModule",{value:!0});var lj=require("fs"),pj=require("util"),cj=So(),lle=dx(),ple=pj.promisify(lj.stat);hx.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(cj.default.string(t))return Buffer.byteLength(t);if(cj.default.buffer(t))return t.length;if(lle.default(t))return pj.promisify(t.getLength.bind(t))();if(t instanceof lj.ReadStream){let{size:r}=await ple(t.path);return r===0?void 0:r}}});var gx=v(mx=>{"use strict";Object.defineProperty(mx,"__esModule",{value:!0});function fle(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])}}mx.default=fle});var dj=v(Hx=>{"use strict";Object.defineProperty(Hx,"__esModule",{value:!0});Hx.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 mj=v(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.TimeoutError=void 0;var dle=require("net"),hle=dj(),hj=Symbol("reentry"),mle=()=>{},Jb=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}};km.TimeoutError=Jb;km.default=(t,e,r)=>{if(hj in t)return mle;t[hj]=!0;let i=[],{once:n,unhandleAll:s}=hle.default(),o=(p,f,m)=>{var g;let H=setTimeout(f,p,p,m);(g=H.unref)===null||g===void 0||g.call(H);let b=()=>{clearTimeout(H)};return i.push(b),b},{host:a,hostname:u}=r,c=(p,f)=>{t.destroy(new Jb(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:m}=t;if(p.connecting){let g=Boolean(m??dle.isIP((f=u??a)!==null&&f!==void 0?f:"")!==0);if(typeof e.lookup<"u"&&!g&&typeof p.address().address>"u"){let H=o(e.lookup,c,"lookup");n(p,"lookup",H)}if(typeof e.connect<"u"){let H=()=>o(e.connect,c,"connect");g?n(p,"connect",H()):n(p,"lookup",b=>{b===null&&n(p,"connect",H())})}typeof e.secureConnect<"u"&&r.protocol==="https:"&&n(p,"connect",()=>{let H=o(e.secureConnect,c,"secureConnect");n(p,"secureConnect",H)})}if(typeof e.send<"u"){let g=()=>o(e.send,c,"send");p.connecting?n(p,"connect",()=>{n(t,"upload-complete",g())}):n(t,"upload-complete",g())}}),typeof e.response<"u"&&n(t,"upload-complete",()=>{let p=o(e.response,c,"response");n(t,"response",p)}),l}});var Hj=v(yx=>{"use strict";Object.defineProperty(yx,"__esModule",{value:!0});var gj=So();yx.default=t=>{t=t;let e={protocol:t.protocol,hostname:gj.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 gj.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 yj=v(vx=>{"use strict";Object.defineProperty(vx,"__esModule",{value:!0});var gle=require("url"),Hle=["protocol","host","hostname","port","pathname","search"];vx.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 gle.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 Hle)e[s]&&(n[s]=e[s].toString());return n}});var vj=v(wx=>{"use strict";Object.defineProperty(wx,"__esModule",{value:!0});var bx=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)}};wx.default=bx});var Ax=v(_x=>{"use strict";Object.defineProperty(_x,"__esModule",{value:!0});var yle=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(""))};_x.default=yle});var wj=v(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.dnsLookupIpVersionToFamily=xc.isDnsLookupIpVersion=void 0;var bj={auto:0,ipv4:4,ipv6:6};xc.isDnsLookupIpVersion=t=>t in bj;xc.dnsLookupIpVersionToFamily=t=>{if(xc.isDnsLookupIpVersion(t))return bj[t];throw new Error("Invalid DNS lookup IP version")}});var Ix=v(Yb=>{"use strict";Object.defineProperty(Yb,"__esModule",{value:!0});Yb.isResponseOk=void 0;Yb.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var Aj=v(Ex=>{"use strict";Object.defineProperty(Ex,"__esModule",{value:!0});var _j=new Set;Ex.default=t=>{_j.has(t)||(_j.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))}});var Ij=v(Sx=>{"use strict";Object.defineProperty(Sx,"__esModule",{value:!0});var Ht=So(),vle=(t,e)=>{if(Ht.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");Ht.assert.any([Ht.default.string,Ht.default.undefined],t.encoding),Ht.assert.any([Ht.default.boolean,Ht.default.undefined],t.resolveBodyOnly),Ht.assert.any([Ht.default.boolean,Ht.default.undefined],t.methodRewriting),Ht.assert.any([Ht.default.boolean,Ht.default.undefined],t.isStream),Ht.assert.any([Ht.default.string,Ht.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},Ht.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)]):Ht.default.number(r)&&(t.retry.limit=r),Ht.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(Ht.default.number))),Ht.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});let{pagination:i}=t;if(!Ht.default.function_(i.transform))throw new Error("`options.pagination.transform` must be implemented");if(!Ht.default.function_(i.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!Ht.default.function_(i.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!Ht.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};Sx.default=vle});var Ej=v(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.retryAfterStatusCodes=void 0;Rm.retryAfterStatusCodes=new Set([413,429,503]);var ble=({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};Rm.default=ble});var Nm=v(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.UnsupportedProtocolError=Ve.ReadError=Ve.TimeoutError=Ve.UploadError=Ve.CacheError=Ve.HTTPError=Ve.MaxRedirectsError=Ve.RequestError=Ve.setNonEnumerableProperties=Ve.knownHookEvents=Ve.withoutBody=Ve.kIsNormalizedAlready=void 0;var Sj=require("util"),Cj=require("stream"),wle=require("fs"),Qa=require("url"),xj=require("http"),Cx=require("http"),_le=require("https"),Ale=q3(),Ile=J3(),Dj=xU(),Ele=TU(),Sle=aj(),Cle=Gb(),K=So(),xle=fj(),Pj=dx(),Dle=gx(),Lj=mj(),Ple=Hj(),Tj=yj(),Lle=vj(),Tle=Ax(),$j=wj(),$le=Ix(),Za=Aj(),kle=Ij(),Rle=Ej(),xx,Ir=Symbol("request"),e0=Symbol("response"),Zp=Symbol("responseSize"),ef=Symbol("downloadedSize"),tf=Symbol("bodySize"),rf=Symbol("uploadedSize"),Qb=Symbol("serverResponsesPiped"),kj=Symbol("unproxyEvents"),Rj=Symbol("isFromCache"),Dx=Symbol("cancelTimeouts"),Mj=Symbol("startedReading"),nf=Symbol("stopReading"),Zb=Symbol("triggerRead"),eu=Symbol("body"),Mm=Symbol("jobs"),Oj=Symbol("originalResponse"),Nj=Symbol("retryTimeout");Ve.kIsNormalizedAlready=Symbol("isNormalizedAlready");var Mle=K.default.string(process.versions.brotli);Ve.withoutBody=new Set(["GET","HEAD"]);Ve.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function Ole(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 Nle(t){return K.default.object(t)&&!("statusCode"in t)}var Px=new Lle.default,Fle=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()})}),Ble=new Set([300,301,302,303,304,307,308]),Ule=["context","body","json","form"];Ve.setNonEnumerableProperties=(t,e)=>{let r={};for(let i of t)if(i)for(let n of Ule)n in i&&(r[n]={writable:!0,configurable:!0,enumerable:!1,value:i[n]});Object.defineProperties(e,r)};var Vt=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 a0?(Object.defineProperty(this,"request",{enumerable:!1,value:i}),Object.defineProperty(this,"response",{enumerable:!1,value:i[e0]}),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(`
`)}`}}};Ve.RequestError=Vt;var t0=class extends Vt{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}};Ve.MaxRedirectsError=t0;var r0=class extends Vt{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}};Ve.HTTPError=r0;var i0=class extends Vt{constructor(e,r){super(e.message,e,r),this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}};Ve.CacheError=i0;var n0=class extends Vt{constructor(e,r){super(e.message,e,r),this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}};Ve.UploadError=n0;var s0=class extends Vt{constructor(e,r,i){super(e.message,e,i),this.name="TimeoutError",this.event=e.event,this.timings=r}};Ve.TimeoutError=s0;var Om=class extends Vt{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}};Ve.ReadError=Om;var o0=class extends Vt{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError",this.code="ERR_UNSUPPORTED_PROTOCOL"}};Ve.UnsupportedProtocolError=o0;var jle=["socket","connect","continue","information","upgrade","timeout"],a0=class extends Cj.Duplex{constructor(e,r={},i){super({autoDestroy:!1,highWaterMark:0}),this[ef]=0,this[rf]=0,this.requestInitialized=!1,this[Qb]=new Set,this.redirects=[],this[nf]=!1,this[Zb]=!1,this[Mm]=[],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 Cx.IncomingMessage&&(this.options.headers={...c.headers,...this.options.headers})});let{json:o,body:a,form:u}=r;if((o||a||u)&&this._lockWrite(),Ve.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 wle.ReadStream&&await Fle(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[Ir])===null||c===void 0||c.destroy();return}for(let p of this[Mm])p();this[Mm].length=0,this.requestInitialized=!0}catch(l){if(l instanceof Vt){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 Qa.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([$j.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=Cle({...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 m;if(K.default.string(r.searchParams)||r.searchParams instanceof Qa.URLSearchParams)m=new Qa.URLSearchParams(r.searchParams);else{Ole(r.searchParams),m=new Qa.URLSearchParams;for(let g in r.searchParams){let H=r.searchParams[g];H===null?m.append(g,""):H!==void 0&&m.append(g,H)}}(n=i==null?void 0:i.searchParams)===null||n===void 0||n.forEach((g,H)=>{m.has(H)||m.append(H,g)}),r.searchParams=m}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=Tj.default(r.prefixUrl+r.url,r)}else(K.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol)&&(r.url=Tj.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:m}=r;Object.defineProperty(r,"prefixUrl",{set:H=>{let b=r.url;if(!b.href.startsWith(H))throw new Error(`Cannot change \`prefixUrl\` from ${m} to ${H}: ${b.href}`);r.url=new Qa.URL(H+b.href.slice(m.length)),m=H},get:()=>m});let{protocol:g}=r.url;if(g==="unix:"&&(g="http:",r.url=new Qa.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),g!=="http:"&&g!=="https:")throw new o0(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:m,getCookieString:g}=l;K.assert.function_(m),K.assert.function_(g),m.length===4&&g.length===0&&(m=Sj.promisify(m.bind(r.cookieJar)),g=Sj.promisify(g.bind(r.cookieJar)),r.cookieJar={setCookie:m,getCookieString:g})}let{cache:p}=r;if(p&&(Px.has(p)||Px.set(p,new Dj((m,g)=>{let H=m[Ir](m,g);return K.default.promise(H)&&(H.once=(b,w)=>{if(b==="error")H.catch(w);else if(b==="abort")(async()=>{try{(await H).once("abort",w)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${b}`);return H}),H},p))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)xx||(xx=new Ile.default),r.dnsCache=xx;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 m of Ve.knownHookEvents)if(m in r.hooks)if(K.default.array(r.hooks[m]))r.hooks[m]=[...r.hooks[m]];else throw new TypeError(`Parameter \`${m}\` must be an Array, got ${K.default(r.hooks[m])}`);else r.hooks[m]=[];if(i&&!f)for(let m of Ve.knownHookEvents)i.hooks[m].length>0&&(r.hooks[m]=[...i.hooks[m],...r.hooks[m]]);if("family"in r&&Za.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),i!=null&&i.https&&(r.https={...i.https,...r.https}),"rejectUnauthorized"in r&&Za.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&Za.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&Za.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&Za.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&Za.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&Za.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&Za.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 m in r.agent)if(m!=="http"&&m!=="https"&&m!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${m}\``)}return r.maxRedirects=(u=r.maxRedirects)!==null&&u!==void 0?u:0,Ve.setNonEnumerableProperties([i,c],r),kle.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=Ve.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 Cj.Readable)&&!K.default.string(e.body)&&!K.default.buffer(e.body)&&!Pj.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?(Pj.default(e.body)&&u&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[eu]=e.body):i?(u&&(r["content-type"]="application/x-www-form-urlencoded"),this[eu]=new Qa.URLSearchParams(e.form).toString()):(u&&(r["content-type"]="application/json"),this[eu]=e.stringifyJson(e.json));let c=await xle.default(this[eu],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[tf]=Number(r["content-length"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:i}=r;this[Oj]=e,r.decompress&&(e=Ele(e));let n=e.statusCode,s=e;s.statusMessage=s.statusMessage?s.statusMessage:xj.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[Rj]=s.isFromCache,this[Zp]=Number(e.headers["content-length"])||void 0,this[e0]=e,e.once("end",()=>{this[Zp]=this[ef],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",a=>{e.destroy(),this._beforeError(new Om(a,this))}),e.once("aborted",()=>{this._beforeError(new Om({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&&Ble.has(n)){if(e.resume(),this[Ir]&&(this[Dx](),delete this[Ir],this[kj]()),(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[eu]=void 0,delete r.headers["content-length"]),this.redirects.length>=r.maxRedirects){this._beforeError(new t0(this));return}try{let p=function(f){return f.protocol==="unix:"||f.hostname==="unix"},u=Buffer.from(e.headers.location,"binary").toString(),c=new Qa.URL(u,i),l=c.toString();if(decodeURI(l),!p(i)&&p(c)){this._beforeError(new Vt("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&&!$le.isResponseOk(s)){this._beforeError(new r0(s));return}e.on("readable",()=>{this[Zb]&&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[Qb])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;Ale.default(e),this[Dx]=Lj.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 Lj.TimeoutError?new s0(u,this.timings,this):new Vt(u.message,u,this),this._beforeError(u)}),this[kj]=Dle.default(e,this,jle),this[Ir]=e,this.emit("uploadProgress",this.uploadProgress);let o=this[eu],a=this.redirects.length===0?this:e;K.default.nodeStream(o)?(o.pipe(a),o.once("error",u=>{this._beforeError(new n0(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,Ple.default(e)),delete r.url;let s,o=Px.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 w in a)if(K.default.undefined(a[w]))delete a[w];else if(K.default.null_(a[w]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${w}\` header`);if(o.decompress&&K.default.undefined(a["accept-encoding"])&&(a["accept-encoding"]=Mle?"gzip, deflate, br":"gzip, deflate"),o.cookieJar){let w=await o.cookieJar.getCookieString(o.url.toString());K.default.nonEmptyString(w)&&(o.headers.cookie=w)}for(let w of o.hooks.beforeRequest){let k=await w(o);if(!K.default.undefined(k)){o.request=()=>k;break}}o.body&&this[eu]!==o.body&&(this[eu]=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 w=/(?<socketPath>.+?):(?<path>.+)/.exec(`${p.pathname}${p.search}`);if(w!=null&&w.groups){let{socketPath:k,path:U}=w.groups;Object.assign(o,{socketPath:k,path:U,host:""})}}let f=p.protocol==="https:",m;o.http2?m=Sle.auto:m=f?_le.request:xj.request;let g=(e=o.request)!==null&&e!==void 0?e:m,H=o.cache?this._createCacheableRequest:g;u&&!o.http2&&(o.agent=u[f?"https":"http"]),o[Ir]=g,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=$j.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 w=await H(p,b);K.default.undefined(w)&&(w=m(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),Nle(w)?this._onRequest(w):this.writable?(this.once("finish",()=>{this._onResponse(w)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(w)}catch(w){throw w instanceof Dj.CacheError?new i0(w,this):new Vt(w.message,w,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new Vt(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[nf])return;let{options:r}=this,i=this.retryCount+1;this[nf]=!0,e instanceof Vt||(e=new Vt(e.message,e,this));let n=e,{response:s}=n;(async()=>{if(s&&!s.body){s.setEncoding(this._readableState.encoding);try{s.rawBody=await Tle.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:Rle.default({attemptCount:i,retryOptions:r.retry,error:n,retryAfter:a,computedValue:0})})}catch(a){this._error(new Vt(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 Vt(u.message,e,this));return}this.destroyed||(this.destroy(),this.emit("retry",i,e))};this[Nj]=setTimeout(a,o);return}}this._error(n)})()}_read(){this[Zb]=!0;let e=this[e0];if(e&&!this[nf]){e.readableLength&&(this[Zb]=!1);let r;for(;(r=e.read())!==null;){this[ef]+=r.length,this[Mj]=!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[Mm].push(n)}_writeRequest(e,r,i){this[Ir].destroyed||(this._progressCallbacks.push(()=>{this[rf]+=Buffer.byteLength(e,r);let n=this.uploadProgress;n.percent<1&&this.emit("uploadProgress",n)}),this[Ir].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(!(Ir in this)){e();return}if(this[Ir].destroyed){e();return}this[Ir].end(i=>{i||(this[tf]=this[rf],this.emit("uploadProgress",this.uploadProgress),this[Ir].emit("upload-complete")),e(i)})};this.requestInitialized?r():this[Mm].push(r)}_destroy(e,r){var i;this[nf]=!0,clearTimeout(this[Nj]),Ir in this&&(this[Dx](),!((i=this[e0])===null||i===void 0)&&i.complete||this[Ir].destroy()),e!==null&&!K.default.undefined(e)&&!(e instanceof Vt)&&(e=new Vt(e.message,e,this)),r(e)}get _isAboutToError(){return this[nf]}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[Ir])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((i=this[Oj])===null||i===void 0)&&i.complete)}get socket(){var e,r;return(r=(e=this[Ir])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[Zp]?e=this[ef]/this[Zp]:this[Zp]===this[ef]?e=1:e=0,{percent:e,transferred:this[ef],total:this[Zp]}}get uploadProgress(){let e;return this[tf]?e=this[rf]/this[tf]:this[tf]===this[rf]?e=1:e=0,{percent:e,transferred:this[rf],total:this[tf]}}get timings(){var e;return(e=this[Ir])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[Rj]}pipe(e,r){if(this[Mj])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof Cx.ServerResponse&&this[Qb].add(e),super.pipe(e,r)}unpipe(e){return e instanceof Cx.ServerResponse&&this[Qb].delete(e),super.unpipe(e),this}};Ve.default=a0});var Fm=v(Wn=>{"use strict";var qle=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]}),Wle=Wn&&Wn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&qle(e,t,r)};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.CancelError=Wn.ParseError=void 0;var Fj=Nm(),Lx=class extends Fj.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}};Wn.ParseError=Lx;var Tx=class extends Fj.RequestError{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}};Wn.CancelError=Tx;Wle(Nm(),Wn)});var Uj=v($x=>{"use strict";Object.defineProperty($x,"__esModule",{value:!0});var Bj=Fm(),Vle=(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 Bj.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(s){throw new Bj.ParseError(s,t)}};$x.default=Vle});var kx=v(tu=>{"use strict";var Gle=tu&&tu.__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]}),Kle=tu&&tu.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Gle(e,t,r)};Object.defineProperty(tu,"__esModule",{value:!0});var zle=require("events"),Xle=So(),Jle=U3(),u0=Fm(),jj=Uj(),qj=Nm(),Yle=gx(),Qle=Ax(),Wj=Ix(),Zle=["request","response","redirect","uploadProgress","downloadProgress"];function Vj(t){let e,r,i=new zle.EventEmitter,n=new Jle((o,a,u)=>{let c=l=>{let p=new qj.default(void 0,t);p.retryCount=l,p._noPipe=!0,u(()=>p.destroy()),u.shouldReject=!1,u(()=>a(new u0.CancelError(p))),e=p,p.once("response",async g=>{var H;if(g.retryCount=l,g.request.aborted)return;let b;try{b=await Qle.default(p),g.rawBody=b}catch{return}if(p._isAboutToError)return;let w=((H=g.headers["content-encoding"])!==null&&H!==void 0?H:"").toLowerCase(),k=["gzip","deflate","br"].includes(w),{options:U}=p;if(k&&!U.decompress)g.body=b;else try{g.body=jj.default(g,U.responseType,U.parseJson,U.encoding)}catch(x){if(g.body=b.toString(),Wj.isResponseOk(g)){p._beforeError(x);return}}try{for(let[x,L]of U.hooks.afterResponse.entries())g=await L(g,async q=>{let j=qj.default.normalizeArguments(void 0,{...q,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},U);j.hooks.afterResponse=j.hooks.afterResponse.slice(0,x);for(let T of j.hooks.beforeRetry)await T(j);let F=Vj(j);return u(()=>{F.catch(()=>{}),F.cancel()}),F})}catch(x){p._beforeError(new u0.RequestError(x.message,x,p));return}if(r=g,!Wj.isResponseOk(g)){p._beforeError(new u0.HTTPError(g));return}p.destroy(),o(p.options.resolveBodyOnly?g.body:g)});let f=g=>{if(n.isCanceled)return;let{options:H}=p;if(g instanceof u0.HTTPError&&!H.throwHttpErrors){let{response:b}=g;o(p.options.resolveBodyOnly?b.body:b);return}a(g)};p.once("error",f);let m=p.options.body;p.once("retry",(g,H)=>{var b,w;if(m===((b=H.request)===null||b===void 0?void 0:b.options.body)&&Xle.default.nodeStream((w=H.request)===null||w===void 0?void 0:w.options.body)){f(H);return}c(g)}),Yle.default(p,i,Zle)};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 jj.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}tu.default=Vj;Kle(Fm(),tu)});var Gj=v(Rx=>{"use strict";Object.defineProperty(Rx,"__esModule",{value:!0});var epe=Fm();function tpe(t,...e){let r=(async()=>{if(t instanceof epe.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}Rx.default=tpe});var Xj=v(Mx=>{"use strict";Object.defineProperty(Mx,"__esModule",{value:!0});var Kj=So();function zj(t){for(let e of Object.values(t))(Kj.default.plainObject(e)||Kj.default.array(e))&&zj(e);return Object.freeze(t)}Mx.default=zj});var Yj=v(Jj=>{"use strict";Object.defineProperty(Jj,"__esModule",{value:!0})});var Ox=v(gn=>{"use strict";var rpe=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]}),ipe=gn&&gn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&rpe(e,t,r)};Object.defineProperty(gn,"__esModule",{value:!0});gn.defaultHandler=void 0;var Qj=So(),mn=kx(),npe=Gj(),l0=Nm(),spe=Xj(),ope={RequestError:mn.RequestError,CacheError:mn.CacheError,ReadError:mn.ReadError,HTTPError:mn.HTTPError,MaxRedirectsError:mn.MaxRedirectsError,TimeoutError:mn.TimeoutError,ParseError:mn.ParseError,CancelError:mn.CancelError,UnsupportedProtocolError:mn.UnsupportedProtocolError,UploadError:mn.UploadError},ape=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:c0}=l0.default,Zj=(...t)=>{let e;for(let r of t)e=c0(void 0,r,e);return e},upe=t=>t.isStream?new l0.default(void 0,t):mn.default(t),cpe=t=>"defaults"in t&&"options"in t.defaults,lpe=["get","post","put","patch","head","delete"];gn.defaultHandler=(t,e)=>e(t);var e8=(t,e)=>{if(t)for(let r of t)r(e)},t8=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?upe:c);if(Qj.default.plainObject(i)){let l={...i,...n};l0.setNonEnumerableProperties([i,n],l),n=l,i=void 0}try{let l;try{e8(t.options.hooks.init,n),e8((o=n.hooks)===null||o===void 0?void 0:o.init,n)}catch(f){l=f}let p=c0(i,n,s??t.options);if(p[l0.kIsNormalizedAlready]=!0,l)throw new mn.RequestError(l.message,l,p);return c(p)}catch(l){if(n.isStream)throw l;return npe.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)cpe(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!==gn.defaultHandler),s.length===0&&s.push(gn.defaultHandler),t8({options:Zj(...n),handlers:s,mutableDefaults:Boolean(o)})};let r=async function*(i,n){let s=c0(i,n,t.options);s.resolveBodyOnly=!1;let o=s.pagination;if(!Qj.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 ape(o.backoff);let l=await e(void 0,void 0,s),p=await o.transform(l),f=[];for(let g of p)if(o.filter(g,a,f)&&(!o.shouldContinue(g,a,f)||(yield g,o.stackAllItems&&a.push(g),f.push(g),--u<=0)))return;let m=o.paginate(l,a,f);if(m===!1)return;m===l.request.options?s=l.request.options:m!==void 0&&(s=c0(void 0,m,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 lpe)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,ope),Object.defineProperty(e,"defaults",{value:t.mutableDefaults?t:spe.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=Zj,e};gn.default=t8;ipe(Yj(),gn)});var n8=v((Co,p0)=>{"use strict";var ppe=Co&&Co.__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]}),r8=Co&&Co.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ppe(e,t,r)};Object.defineProperty(Co,"__esModule",{value:!0});var fpe=require("url"),i8=Ox(),dpe={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 fpe.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:[i8.defaultHandler],mutableDefaults:!1},Nx=i8.default(dpe);Co.default=Nx;p0.exports=Nx;p0.exports.default=Nx;p0.exports.__esModule=!0;r8(Ox(),Co);r8(kx(),Co)});var d8=v((mMe,d0)=>{var sr=function(t){"use strict";var e=1e7,r=7,i=9007199254740992,n=f(i),s="0123456789abcdefghijklmnopqrstuvwxyz",o=typeof BigInt=="function";function a(d,y,_,I){return typeof d>"u"?a[0]:typeof y<"u"?+y==10&&!_?_e(d):Ct(d,y,_,I):_e(d)}function u(d,y){this.value=d,this.sign=y,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 m(d){g(d);var y=d.length;if(y<4&&re(d,n)<0)switch(y){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 g(d){for(var y=d.length;d[--y]===0;);d.length=y+1}function H(d){for(var y=new Array(d),_=-1;++_<d;)y[_]=0;return y}function b(d){return d>0?Math.floor(d):Math.ceil(d)}function w(d,y){var _=d.length,I=y.length,R=new Array(_),B=0,V=e,G,W;for(W=0;W<I;W++)G=d[W]+y[W]+B,B=G>=V?1:0,R[W]=G-B*V;for(;W<_;)G=d[W]+B,B=G===V?1:0,R[W++]=G-B*V;return B>0&&R.push(B),R}function k(d,y){return d.length>=y.length?w(d,y):w(y,d)}function U(d,y){var _=d.length,I=new Array(_),R=e,B,V;for(V=0;V<_;V++)B=d[V]-R+y,y=Math.floor(B/R),I[V]=B-y*R,y+=1;for(;y>0;)I[V++]=y%R,y=Math.floor(y/R);return I}u.prototype.add=function(d){var y=_e(d);if(this.sign!==y.sign)return this.subtract(y.negate());var _=this.value,I=y.value;return y.isSmall?new u(U(_,Math.abs(I)),this.sign):new u(k(_,I),this.sign)},u.prototype.plus=u.prototype.add,c.prototype.add=function(d){var y=_e(d),_=this.value;if(_<0!==y.sign)return this.subtract(y.negate());var I=y.value;if(y.isSmall){if(p(_+I))return new c(_+I);I=f(Math.abs(I))}return new u(U(I,Math.abs(_)),_<0)},c.prototype.plus=c.prototype.add,l.prototype.add=function(d){return new l(this.value+_e(d).value)},l.prototype.plus=l.prototype.add;function x(d,y){var _=d.length,I=y.length,R=new Array(_),B=0,V=e,G,W;for(G=0;G<I;G++)W=d[G]-B-y[G],W<0?(W+=V,B=1):B=0,R[G]=W;for(G=I;G<_;G++){if(W=d[G]-B,W<0)W+=V;else{R[G++]=W;break}R[G]=W}for(;G<_;G++)R[G]=d[G];return g(R),R}function L(d,y,_){var I;return re(d,y)>=0?I=x(d,y):(I=x(y,d),_=!_),I=m(I),typeof I=="number"?(_&&(I=-I),new c(I)):new u(I,_)}function q(d,y,_){var I=d.length,R=new Array(I),B=-y,V=e,G,W;for(G=0;G<I;G++)W=d[G]+B,B=Math.floor(W/V),W%=V,R[G]=W<0?W+V:W;return R=m(R),typeof R=="number"?(_&&(R=-R),new c(R)):new u(R,_)}u.prototype.subtract=function(d){var y=_e(d);if(this.sign!==y.sign)return this.add(y.negate());var _=this.value,I=y.value;return y.isSmall?q(_,Math.abs(I),this.sign):L(_,I,this.sign)},u.prototype.minus=u.prototype.subtract,c.prototype.subtract=function(d){var y=_e(d),_=this.value;if(_<0!==y.sign)return this.add(y.negate());var I=y.value;return y.isSmall?new c(_-I):q(I,Math.abs(_),_>=0)},c.prototype.minus=c.prototype.subtract,l.prototype.subtract=function(d){return new l(this.value-_e(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,y=new c(-this.value);return y.sign=!d,y},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 j(d,y){var _=d.length,I=y.length,R=_+I,B=H(R),V=e,G,W,ue,de,ye;for(ue=0;ue<_;++ue){de=d[ue];for(var Ne=0;Ne<I;++Ne)ye=y[Ne],G=de*ye+B[ue+Ne],W=Math.floor(G/V),B[ue+Ne]=G-W*V,B[ue+Ne+1]+=W}return g(B),B}function F(d,y){var _=d.length,I=new Array(_),R=e,B=0,V,G;for(G=0;G<_;G++)V=d[G]*y+B,B=Math.floor(V/R),I[G]=V-B*R;for(;B>0;)I[G++]=B%R,B=Math.floor(B/R);return I}function T(d,y){for(var _=[];y-- >0;)_.push(0);return _.concat(d)}function O(d,y){var _=Math.max(d.length,y.length);if(_<=30)return j(d,y);_=Math.ceil(_/2);var I=d.slice(_),R=d.slice(0,_),B=y.slice(_),V=y.slice(0,_),G=O(R,V),W=O(I,B),ue=O(k(R,I),k(V,B)),de=k(k(G,T(x(x(ue,G),W),_)),T(W,2*_));return g(de),de}function E(d,y){return-.012*d-.012*y+15e-6*d*y>0}u.prototype.multiply=function(d){var y=_e(d),_=this.value,I=y.value,R=this.sign!==y.sign,B;if(y.isSmall){if(I===0)return a[0];if(I===1)return this;if(I===-1)return this.negate();if(B=Math.abs(I),B<e)return new u(F(_,B),R);I=f(B)}return E(_.length,I.length)?new u(O(_,I),R):new u(j(_,I),R)},u.prototype.times=u.prototype.multiply;function M(d,y,_){return d<e?new u(F(y,d),_):new u(j(y,f(d)),_)}c.prototype._multiplyBySmall=function(d){return p(d.value*this.value)?new c(d.value*this.value):M(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():M(Math.abs(d.value),this.value,this.sign!==d.sign)},c.prototype.multiply=function(d){return _e(d)._multiplyBySmall(this)},c.prototype.times=c.prototype.multiply,l.prototype.multiply=function(d){return new l(this.value*_e(d).value)},l.prototype.times=l.prototype.multiply;function N(d){var y=d.length,_=H(y+y),I=e,R,B,V,G,W;for(V=0;V<y;V++){G=d[V],B=0-G*G;for(var ue=V;ue<y;ue++)W=d[ue],R=2*(G*W)+_[V+ue]+B,B=Math.floor(R/I),_[V+ue]=R-B*I;_[V+y]=B}return g(_),_}u.prototype.square=function(){return new u(N(this.value),!1)},c.prototype.square=function(){var d=this.value*this.value;return p(d)?new c(d):new u(N(f(Math.abs(this.value))),!1)},l.prototype.square=function(d){return new l(this.value*this.value)};function z(d,y){var _=d.length,I=y.length,R=e,B=H(y.length),V=y[I-1],G=Math.ceil(R/(2*V)),W=F(d,G),ue=F(y,G),de,ye,Ne,Ci,ui,AA,IA;for(W.length<=_&&W.push(0),ue.push(0),V=ue[I-1],ye=_-I;ye>=0;ye--){for(de=R-1,W[ye+I]!==V&&(de=Math.floor((W[ye+I]*R+W[ye+I-1])/V)),Ne=0,Ci=0,AA=ue.length,ui=0;ui<AA;ui++)Ne+=de*ue[ui],IA=Math.floor(Ne/R),Ci+=W[ye+ui]-(Ne-IA*R),Ne=IA,Ci<0?(W[ye+ui]=Ci+R,Ci=-1):(W[ye+ui]=Ci,Ci=0);for(;Ci!==0;){for(de-=1,Ne=0,ui=0;ui<AA;ui++)Ne+=W[ye+ui]-R+ue[ui],Ne<0?(W[ye+ui]=Ne+R,Ne=0):(W[ye+ui]=Ne,Ne=1);Ci+=Ne}B[ye]=de}return W=P(W,G)[0],[m(B),m(W)]}function D(d,y){for(var _=d.length,I=y.length,R=[],B=[],V=e,G,W,ue,de,ye;_;){if(B.unshift(d[--_]),g(B),re(B,y)<0){R.push(0);continue}W=B.length,ue=B[W-1]*V+B[W-2],de=y[I-1]*V+y[I-2],W>I&&(ue=(ue+1)*V),G=Math.ceil(ue/de);do{if(ye=F(y,G),re(ye,B)<=0)break;G--}while(G);R.push(G),B=x(B,ye)}return R.reverse(),[m(R),m(B)]}function P(d,y){var _=d.length,I=H(_),R=e,B,V,G,W;for(G=0,B=_-1;B>=0;--B)W=G*R+d[B],V=b(W/y),G=W-V*y,I[B]=V|0;return[I,G|0]}function ee(d,y){var _,I=_e(y);if(o)return[new l(d.value/I.value),new l(d.value%I.value)];var R=d.value,B=I.value,V;if(B===0)throw new Error("Cannot divide by zero");if(d.isSmall)return I.isSmall?[new c(b(R/B)),new c(R%B)]:[a[0],d];if(I.isSmall){if(B===1)return[d,a[0]];if(B==-1)return[d.negate(),a[0]];var G=Math.abs(B);if(G<e){_=P(R,G),V=m(_[0]);var W=_[1];return d.sign&&(W=-W),typeof V=="number"?(d.sign!==I.sign&&(V=-V),[new c(V),new c(W)]):[new u(V,d.sign!==I.sign),new c(W)]}B=f(G)}var ue=re(R,B);if(ue===-1)return[a[0],d];if(ue===0)return[a[d.sign===I.sign?1:-1],a[0]];R.length+B.length<=200?_=z(R,B):_=D(R,B),V=_[0];var de=d.sign!==I.sign,ye=_[1],Ne=d.sign;return typeof V=="number"?(de&&(V=-V),V=new c(V)):V=new u(V,de),typeof ye=="number"?(Ne&&(ye=-ye),ye=new c(ye)):ye=new u(ye,Ne),[V,ye]}u.prototype.divmod=function(d){var y=ee(this,d);return{quotient:y[0],remainder:y[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/_e(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%_e(d).value)},c.prototype.remainder=c.prototype.mod=u.prototype.remainder=u.prototype.mod,u.prototype.pow=function(d){var y=_e(d),_=this.value,I=y.value,R,B,V;if(I===0)return a[1];if(_===0)return a[0];if(_===1)return a[1];if(_===-1)return y.isEven()?a[1]:a[-1];if(y.sign)return a[0];if(!y.isSmall)throw new Error("The exponent "+y.toString()+" is too large.");if(this.isSmall&&p(R=Math.pow(_,I)))return new c(b(R));for(B=this,V=a[1];I&!0&&(V=V.times(B),--I),I!==0;)I/=2,B=B.square();return V},c.prototype.pow=u.prototype.pow,l.prototype.pow=function(d){var y=_e(d),_=this.value,I=y.value,R=BigInt(0),B=BigInt(1),V=BigInt(2);if(I===R)return a[1];if(_===R)return a[0];if(_===B)return a[1];if(_===BigInt(-1))return y.isEven()?a[1]:a[-1];if(y.isNegative())return new l(R);for(var G=this,W=a[1];(I&B)===B&&(W=W.times(G),--I),I!==R;)I/=V,G=G.square();return W},u.prototype.modPow=function(d,y){if(d=_e(d),y=_e(y),y.isZero())throw new Error("Cannot take modPow with modulus 0");var _=a[1],I=this.mod(y);for(d.isNegative()&&(d=d.multiply(a[-1]),I=I.modInv(y));d.isPositive();){if(I.isZero())return a[0];d.isOdd()&&(_=_.multiply(I).mod(y)),d=d.divide(2),I=I.square().mod(y)}return _},l.prototype.modPow=c.prototype.modPow=u.prototype.modPow;function re(d,y){if(d.length!==y.length)return d.length>y.length?1:-1;for(var _=d.length-1;_>=0;_--)if(d[_]!==y[_])return d[_]>y[_]?1:-1;return 0}u.prototype.compareAbs=function(d){var y=_e(d),_=this.value,I=y.value;return y.isSmall?1:re(_,I)},c.prototype.compareAbs=function(d){var y=_e(d),_=Math.abs(this.value),I=y.value;return y.isSmall?(I=Math.abs(I),_===I?0:_>I?1:-1):-1},l.prototype.compareAbs=function(d){var y=this.value,_=_e(d).value;return y=y>=0?y:-y,_=_>=0?_:-_,y===_?0:y>_?1:-1},u.prototype.compare=function(d){if(d===1/0)return-1;if(d===-1/0)return 1;var y=_e(d),_=this.value,I=y.value;return this.sign!==y.sign?y.sign?1:-1:y.isSmall?this.sign?-1:1:re(_,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 y=_e(d),_=this.value,I=y.value;return y.isSmall?_==I?0:_>I?1:-1:_<0!==y.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 y=this.value,_=_e(d).value;return y===_?0:y>_?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 y=_e(d);return y.isZero()?!1:y.isUnit()?!0:y.compareAbs(2)===0?this.isEven():this.mod(y).isZero()},l.prototype.isDivisibleBy=c.prototype.isDivisibleBy=u.prototype.isDivisibleBy;function ie(d){var y=d.abs();if(y.isUnit())return!1;if(y.equals(2)||y.equals(3)||y.equals(5))return!0;if(y.isEven()||y.isDivisibleBy(3)||y.isDivisibleBy(5))return!1;if(y.lesser(49))return!0}function J(d,y){for(var _=d.prev(),I=_,R=0,B,V,G,W;I.isEven();)I=I.divide(2),R++;e:for(G=0;G<y.length;G++)if(!d.lesser(y[G])&&(W=sr(y[G]).modPow(I,d),!(W.isUnit()||W.equals(_)))){for(B=R-1;B!=0;B--){if(W=W.square().mod(d),W.isUnit())return!1;if(W.equals(_))continue e}return!1}return!0}u.prototype.isPrime=function(d){var y=ie(this);if(y!==t)return y;var _=this.abs(),I=_.bitLength();if(I<=64)return J(_,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var R=Math.log(2)*I.toJSNumber(),B=Math.ceil(d===!0?2*Math.pow(R,2):R),V=[],G=0;G<B;G++)V.push(sr(G+2));return J(_,V)},l.prototype.isPrime=c.prototype.isPrime=u.prototype.isPrime,u.prototype.isProbablePrime=function(d,y){var _=ie(this);if(_!==t)return _;for(var I=this.abs(),R=d===t?5:d,B=[],V=0;V<R;V++)B.push(sr.randBetween(2,I.minus(2),y));return J(I,B)},l.prototype.isProbablePrime=c.prototype.isProbablePrime=u.prototype.isProbablePrime,u.prototype.modInv=function(d){for(var y=sr.zero,_=sr.one,I=_e(d),R=this.abs(),B,V,G;!R.isZero();)B=I.divide(R),V=y,G=I,y=_,I=R,_=V.subtract(B.multiply(_)),R=G.subtract(B.multiply(R));if(!I.isUnit())throw new Error(this.toString()+" and "+d.toString()+" are not co-prime");return y.compare(0)===-1&&(y=y.add(d)),this.isNegative()?y.negate():y},l.prototype.modInv=c.prototype.modInv=u.prototype.modInv,u.prototype.next=function(){var d=this.value;return this.sign?q(d,1,this.sign):new u(U(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(U(d,1),!0):q(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 te=[1];2*te[te.length-1]<=e;)te.push(2*te[te.length-1]);var ce=te.length,ae=te[ce-1];function he(d){return Math.abs(d)<=e}u.prototype.shiftLeft=function(d){var y=_e(d).toJSNumber();if(!he(y))throw new Error(String(y)+" is too large for shifting.");if(y<0)return this.shiftRight(-y);var _=this;if(_.isZero())return _;for(;y>=ce;)_=_.multiply(ae),y-=ce-1;return _.multiply(te[y])},l.prototype.shiftLeft=c.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(d){var y,_=_e(d).toJSNumber();if(!he(_))throw new Error(String(_)+" is too large for shifting.");if(_<0)return this.shiftLeft(-_);for(var I=this;_>=ce;){if(I.isZero()||I.isNegative()&&I.isUnit())return I;y=ee(I,ae),I=y[1].isNegative()?y[0].prev():y[0],_-=ce-1}return y=ee(I,te[_]),y[1].isNegative()?y[0].prev():y[0]},l.prototype.shiftRight=c.prototype.shiftRight=u.prototype.shiftRight;function dt(d,y,_){y=_e(y);for(var I=d.isNegative(),R=y.isNegative(),B=I?d.not():d,V=R?y.not():y,G=0,W=0,ue=null,de=null,ye=[];!B.isZero()||!V.isZero();)ue=ee(B,ae),G=ue[1].toJSNumber(),I&&(G=ae-1-G),de=ee(V,ae),W=de[1].toJSNumber(),R&&(W=ae-1-W),B=ue[0],V=de[0],ye.push(_(G,W));for(var Ne=_(I?1:0,R?1:0)!==0?sr(-1):sr(0),Ci=ye.length-1;Ci>=0;Ci-=1)Ne=Ne.multiply(ae).add(sr(ye[Ci]));return Ne}u.prototype.not=function(){return this.negate().prev()},l.prototype.not=c.prototype.not=u.prototype.not,u.prototype.and=function(d){return dt(this,d,function(y,_){return y&_})},l.prototype.and=c.prototype.and=u.prototype.and,u.prototype.or=function(d){return dt(this,d,function(y,_){return y|_})},l.prototype.or=c.prototype.or=u.prototype.or,u.prototype.xor=function(d){return dt(this,d,function(y,_){return y^_})},l.prototype.xor=c.prototype.xor=u.prototype.xor;var ge=1<<30,Gt=(e&-e)*(e&-e)|ge;function kr(d){var y=d.value,_=typeof y=="number"?y|ge:typeof y=="bigint"?y|BigInt(ge):y[0]+y[1]*e|Gt;return _&-_}function Z(d,y){if(y.compareTo(d)<=0){var _=Z(d,y.square(y)),I=_.p,R=_.e,B=I.multiply(y);return B.compareTo(d)<=0?{p:B,e:R*2+1}:{p:I,e:R*2}}return{p:sr(1),e:0}}u.prototype.bitLength=function(){var d=this;return d.compareTo(sr(0))<0&&(d=d.negate().subtract(sr(1))),d.compareTo(sr(0))===0?sr(0):sr(Z(d,sr(2)).e).add(sr(1))},l.prototype.bitLength=c.prototype.bitLength=u.prototype.bitLength;function Ae(d,y){return d=_e(d),y=_e(y),d.greater(y)?d:y}function Q(d,y){return d=_e(d),y=_e(y),d.lesser(y)?d:y}function be(d,y){if(d=_e(d).abs(),y=_e(y).abs(),d.equals(y))return d;if(d.isZero())return y;if(y.isZero())return d;for(var _=a[1],I,R;d.isEven()&&y.isEven();)I=Q(kr(d),kr(y)),d=d.divide(I),y=y.divide(I),_=_.multiply(I);for(;d.isEven();)d=d.divide(kr(d));do{for(;y.isEven();)y=y.divide(kr(y));d.greater(y)&&(R=y,y=d,d=R),y=y.subtract(d)}while(!y.isZero());return _.isUnit()?d:d.multiply(_)}function Ge(d,y){return d=_e(d).abs(),y=_e(y).abs(),d.divide(be(d,y)).multiply(y)}function wt(d,y,_){d=_e(d),y=_e(y);var I=_||Math.random,R=Q(d,y),B=Ae(d,y),V=B.subtract(R).add(1);if(V.isSmall)return R.add(Math.floor(I()*V));for(var G=ju(V,e).value,W=[],ue=!0,de=0;de<G.length;de++){var ye=ue?G[de]:e,Ne=b(I()*ye);W.push(Ne),Ne<ye&&(ue=!1)}return R.add(a.fromArray(W,e,!1))}var Ct=function(d,y,_,I){_=_||s,d=String(d),I||(d=d.toLowerCase(),_=_.toLowerCase());var R=d.length,B,V=Math.abs(y),G={};for(B=0;B<_.length;B++)G[_[B]]=B;for(B=0;B<R;B++){var W=d[B];if(W!=="-"&&W in G&&G[W]>=V){if(W==="1"&&V===1)continue;throw new Error(W+" is not a valid digit in base "+y+".")}}y=_e(y);var ue=[],de=d[0]==="-";for(B=de?1:0;B<d.length;B++){var W=d[B];if(W in G)ue.push(_e(G[W]));else if(W==="<"){var ye=B;do B++;while(d[B]!==">"&&B<d.length);ue.push(_e(d.slice(ye+1,B)))}else throw new Error(W+" is not a valid character")}return oa(ue,y,de)};function oa(d,y,_){var I=a[0],R=a[1],B;for(B=d.length-1;B>=0;B--)I=I.add(d[B].times(R)),R=R.times(y);return _?I.negate():I}function aa(d,y){return y=y||s,d<y.length?y[d]:"<"+d+">"}function ju(d,y){if(y=sr(y),y.isZero()){if(d.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(y.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()&&y.isPositive()&&(I=!0,d=d.abs()),y.isUnit())return d.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(d.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:I};for(var R=[],B=d,V;B.isNegative()||B.compareAbs(y)>=0;){V=B.divmod(y),B=V.quotient;var G=V.remainder;G.isNegative()&&(G=y.minus(G).abs(),B=B.next()),R.push(G.toJSNumber())}return R.push(B.toJSNumber()),{value:R.reverse(),isNegative:I}}function gl(d,y,_){var I=ju(d,y);return(I.isNegative?"-":"")+I.value.map(function(R){return aa(R,_)}).join("")}u.prototype.toArray=function(d){return ju(this,d)},c.prototype.toArray=function(d){return ju(this,d)},l.prototype.toArray=function(d){return ju(this,d)},u.prototype.toString=function(d,y){if(d===t&&(d=10),d!==10)return gl(this,d,y);for(var _=this.value,I=_.length,R=String(_[--I]),B="0000000",V;--I>=0;)V=String(_[I]),R+=B.slice(V.length)+V;var G=this.sign?"-":"";return G+R},c.prototype.toString=function(d,y){return d===t&&(d=10),d!=10?gl(this,d,y):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 HH(d){if(p(+d)){var y=+d;if(y===b(y))return o?new l(BigInt(y)):new c(y);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 R=I[1];if(R[0]==="+"&&(R=R.slice(1)),R=+R,R!==b(R)||!p(R))throw new Error("Invalid integer: "+R+" is not a valid exponent.");var B=I[0],V=B.indexOf(".");if(V>=0&&(R-=B.length-V-1,B=B.slice(0,V)+B.slice(V+1)),R<0)throw new Error("Cannot include negative exponent part for integers");B+=new Array(R+1).join("0"),d=B}var G=/^([0-9][0-9]*)$/.test(d);if(!G)throw new Error("Invalid integer: "+d);if(o)return new l(BigInt(_?"-"+d:d));for(var W=[],ue=d.length,de=r,ye=ue-de;ue>0;)W.push(+d.slice(ye,ue)),ye-=de,ye<0&&(ye=0),ue-=de;return g(W),new u(W,_)}function _A(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 HH(d.toString())}function _e(d){return typeof d=="number"?_A(d):typeof d=="string"?HH(d):typeof d=="bigint"?new l(d):d}for(var Dn=0;Dn<1e3;Dn++)a[Dn]=_e(Dn),Dn>0&&(a[-Dn]=_e(-Dn));return a.one=a[1],a.zero=a[0],a.minusOne=a[-1],a.max=Ae,a.min=Q,a.gcd=be,a.lcm=Ge,a.isInstance=function(d){return d instanceof u||d instanceof c||d instanceof l},a.randBetween=wt,a.fromArray=function(d,y,_){return oa(d.map(_e),_e(y||10),_)},a}();typeof d0<"u"&&d0.hasOwnProperty("exports")&&(d0.exports=sr);typeof define=="function"&&define.amd&&define(function(){return sr})});var h8=v(or=>{"use strict";var Hpe=require("fs"),ype=d8(),su=!1;or.maxObjectSize=100*1e3*1e3;or.maxObjectCount=32768;var vpe=9783072e5,bpe=or.UID=function(t){this.UID=t},gMe=or.parseFile=function(t,e){function r(i){var n=null,s;try{s=wpe(i)}catch(o){n=o}e(n,s)}if(Buffer.isBuffer(t))return r(t);Hpe.readFile(t,function(i,n){if(i)return e(i);r(n)})},wpe=or.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);su&&console.log("offsetSize: "+n);var s=i.readUInt8(7);su&&console.log("objectRefSize: "+s);var o=Fx(i,8);su&&console.log("numObjects: "+o);var a=Fx(i,16);su&&console.log("topObject: "+a);var u=Fx(i,24);if(su&&console.log("offsetTableOffset: "+u),o>or.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]=_i(p,0),su&&console.log("Offset for Object #"+l+" is "+c[l]+" ["+c[l].toString(16)+"]")}function f(m){var g=c[m],H=t[g],b=(H&240)>>4,w=H&15;switch(b){case 0:return k();case 1:return x();case 8:return L();case 2:return q();case 3:return j();case 4:return F();case 5:return T();case 6:return T(!0);case 10:return O();case 13:return E();default:throw new Error("Unhandled type 0x"+b.toString(16))}function k(){switch(w){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 U(M){var N="",z;for(z=0;z<M.length&&M[z]==0;z++);for(;z<M.length;z++){var D="00"+M[z].toString(16);N+=D.substr(D.length-2)}return N}function x(){var M=Math.pow(2,w);if(M>4){var N=t.slice(g+1,g+1+M),z=U(N);return ype(z,16)}if(M<or.maxObjectSize)return _i(t.slice(g+1,g+1+M));throw new Error("To little heap space available! Wanted to read "+M+" bytes, but only "+or.maxObjectSize+" are available.")}function L(){var M=w+1;if(M<or.maxObjectSize)return new bpe(_i(t.slice(g+1,g+1+M)));throw new Error("To little heap space available! Wanted to read "+M+" bytes, but only "+or.maxObjectSize+" are available.")}function q(){var M=Math.pow(2,w);if(M<or.maxObjectSize){var N=t.slice(g+1,g+1+M);if(M===4)return N.readFloatBE(0);if(M===8)return N.readDoubleBE(0)}else throw new Error("To little heap space available! Wanted to read "+M+" bytes, but only "+or.maxObjectSize+" are available.")}function j(){w!=3&&console.error("Unknown date type :"+w+". Parsing anyway...");var M=t.slice(g+1,g+9);return new Date(vpe+1e3*M.readDoubleBE(0))}function F(){var M=1,N=w;if(w==15){var z=t[g+1],D=(z&240)/16;D!=1&&console.error("0x4: UNEXPECTED LENGTH-INT TYPE! "+D);var P=z&15,ee=Math.pow(2,P);M=2+ee,ee<3,N=_i(t.slice(g+2,g+2+ee))}if(N<or.maxObjectSize)return t.slice(g+M,g+M+N);throw new Error("To little heap space available! Wanted to read "+N+" bytes, but only "+or.maxObjectSize+" are available.")}function T(M){M=M||0;var N="utf8",z=w,D=1;if(w==15){var P=t[g+1],ee=(P&240)/16;ee!=1&&console.err("UNEXPECTED LENGTH-INT TYPE! "+ee);var re=P&15,ie=Math.pow(2,re),D=2+ie;ie<3,z=_i(t.slice(g+2,g+2+ie))}if(z*=M+1,z<or.maxObjectSize){var J=new Buffer(t.slice(g+D,g+D+z));return M&&(J=_pe(J),N="ucs2"),J.toString(N)}else throw new Error("To little heap space available! Wanted to read "+z+" bytes, but only "+or.maxObjectSize+" are available.")}function O(){var M=w,N=1;if(w==15){var z=t[g+1],D=(z&240)/16;D!=1&&console.error("0xa: UNEXPECTED LENGTH-INT TYPE! "+D);var P=z&15,ee=Math.pow(2,P);N=2+ee,ee<3,M=_i(t.slice(g+2,g+2+ee))}if(M*s>or.maxObjectSize)throw new Error("To little heap space available!");for(var re=[],ie=0;ie<M;ie++){var J=_i(t.slice(g+N+ie*s,g+N+(ie+1)*s));re[ie]=f(J)}return re}function E(){var M=w,N=1;if(w==15){var z=t[g+1],D=(z&240)/16;D!=1&&console.error("0xD: UNEXPECTED LENGTH-INT TYPE! "+D);var P=z&15,ee=Math.pow(2,P);N=2+ee,ee<3,M=_i(t.slice(g+2,g+2+ee))}if(M*2*s>or.maxObjectSize)throw new Error("To little heap space available!");su&&console.log("Parsing dictionary #"+m);for(var re={},ie=0;ie<M;ie++){var J=_i(t.slice(g+N+ie*s,g+N+(ie+1)*s)),te=_i(t.slice(g+N+M*s+ie*s,g+N+M*s+(ie+1)*s)),ce=f(J),ae=f(te);su&&console.log("  DICT #"+m+": Mapped "+ce+" to "+ae),re[ce]=ae}return re}}return[f(a)]};function _i(t,e){e=e||0;for(var r=0,i=e;i<t.length;i++)r<<=8,r|=t[i]&255;return r}function Fx(t,e){var r=t.slice(e,e+8);return r.readUInt32BE(4,8)}function _pe(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 H8=v((yMe,g8)=>{"use strict";var m8=require("os");function Ape(){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}g8.exports=typeof m8.homedir=="function"?m8.homedir:Ape});var b8=v((vMe,v8)=>{"use strict";var Ipe=H8(),y8=Ipe();v8.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return y8?t.replace(/^~($|\/|\\)/,y8+"$1"):t}});var Bx=v((bMe,A8)=>{"use strict";var w8=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)})}},_8=A8.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):w8(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)?w8(a,e,r):a,s},n)};_8.all=_8});var E8=v((wMe,I8)=>{"use strict";var Epe=require("os"),Spe=h8(),Cpe=b8(),xpe=Bx(),Dpe=Number(Epe.release().split(".")[0]),Ppe=Cpe(Dpe>=14?"~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist":"~/Library/Preferences/com.apple.LaunchServices.plist");I8.exports=()=>{if(process.platform!=="darwin")return Promise.reject(new Error("Only OS X is supported"));let t="com.apple.Safari";return xpe(Spe.parseFile)(Ppe).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 $8=v((_Me,T8)=>{"use strict";var jx="pending",S8="settled",h0="fulfilled",m0="rejected",Lpe=function(){},C8=typeof global<"u"&&typeof global.process<"u"&&typeof global.process.emit=="function",Tpe=typeof setImmediate>"u"?setTimeout:setImmediate,Um=[],Ux;function $pe(){for(var t=0;t<Um.length;t++)Um[t][0](Um[t][1]);Um=[],Ux=!1}function g0(t,e){Um.push([t,e]),Ux||(Ux=!0,Tpe($pe,0))}function kpe(t,e){function r(n){qx(e,n)}function i(n){jm(e,n)}try{t(r,i)}catch(n){i(n)}}function x8(t){var e=t.owner,r=e._state,i=e._data,n=t[r],s=t.then;if(typeof n=="function"){r=h0;try{i=n(i)}catch(o){jm(s,o)}}D8(s,i)||(r===h0&&qx(s,i),r===m0&&jm(s,i))}function D8(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?P8(t,n):qx(t,n))},function(n){r||(r=!0,jm(t,n))}),!0}}catch(n){return r||jm(t,n),!0}return!1}function qx(t,e){(t===e||!D8(t,e))&&P8(t,e)}function P8(t,e){t._state===jx&&(t._state=S8,t._data=e,g0(Rpe,t))}function jm(t,e){t._state===jx&&(t._state=S8,t._data=e,g0(Mpe,t))}function L8(t){t._then=t._then.forEach(x8)}function Rpe(t){t._state=h0,L8(t)}function Mpe(t){t._state=m0,L8(t),!t._handled&&C8&&global.process.emit("unhandledRejection",t._data,t)}function Ope(t){global.process.emit("rejectionHandled",t)}function qi(t){if(typeof t!="function")throw new TypeError("Promise resolver "+t+" is not a function");if(!(this instanceof qi))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],kpe(t,this)}qi.prototype={constructor:qi,_state:jx,_then:null,_data:void 0,_handled:!1,then:function(t,e){var r={owner:this,then:new this.constructor(Lpe),fulfilled:t,rejected:e};return(e||t)&&!this._handled&&(this._handled=!0,this._state===m0&&C8&&g0(Ope,this)),this._state===h0||this._state===m0?g0(x8,r):this._then.push(r),r.then},catch:function(t){return this.then(null,t)}};qi.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new qi(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)})};qi.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new qi(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)})};qi.resolve=function(t){return t&&typeof t=="object"&&t.constructor===qi?t:new qi(function(e){e(t)})};qi.reject=function(t){return new qi(function(e,r){r(t)})};T8.exports=qi});var R8=v((AMe,k8)=>{"use strict";k8.exports=typeof Promise=="function"?Promise:$8()});var N8=v((IMe,O8)=>{"use strict";var Npe=require("child_process").execFile,M8=R8(),Fpe=Bx();O8.exports=function(t){return process.platform!=="darwin"?M8.reject(new Error("Only OS X systems are supported")):Fpe(Npe,M8)("osascript",["-e",t]).then(function(e){return e.trim()})}});var B8=v((EMe,F8)=>{"use strict";var Bpe=N8();F8.exports=t=>Bpe(`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 W8=v((SMe,q8)=>{var U8=Object.prototype.hasOwnProperty;q8.exports=Wi;function Wi(t){if(!(this instanceof Wi))throw new TypeError("Constructor PseudoMap requires 'new'");if(this.clear(),t)if(t instanceof Wi||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")}Wi.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)};Wi.prototype.has=function(t){return!!Wx(this._data,t)};Wi.prototype.get=function(t){var e=Wx(this._data,t);return e&&e.value};Wi.prototype.set=function(t,e){jpe(this._data,t,e)};Wi.prototype.delete=function(t){var e=Wx(this._data,t);e&&(delete this._data[e._index],this._data.size--)};Wi.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(Wi.prototype,"size",{get:function(){return this._data.size},set:function(t){},enumerable:!0,configurable:!0});Wi.prototype.values=Wi.prototype.keys=Wi.prototype.entries=function(){throw new Error("iterators are not implemented in this version")};function j8(t,e){return t===e||t!==t&&e!==e}function Upe(t,e,r){this.key=t,this.value=e,this._index=r}function Wx(t,e){for(var r=0,i="_"+e,n=i;U8.call(t,n);n=i+r++)if(j8(t[n].key,e))return t[n]}function jpe(t,e,r){for(var i=0,n="_"+e,s=n;U8.call(t,s);s=n+i++)if(j8(t[s].key,e)){t[s].value=r;return}t.size++,t[s]=new Upe(e,r,s)}});var V8=v((CMe,Vx)=>{process.env.npm_package_name==="pseudomap"&&process.env.npm_lifecycle_script==="test"&&(process.env.TEST_PSEUDOMAP="true");typeof Map=="function"&&!process.env.TEST_PSEUDOMAP?Vx.exports=Map:Vx.exports=W8()});var K8=v((xMe,G8)=>{G8.exports=Ze;Ze.Node=qm;Ze.create=Ze;function Ze(t){var e=this;if(e instanceof Ze||(e=new Ze),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}Ze.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};Ze.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++}};Ze.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++}};Ze.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)qpe(this,arguments[t]);return this.length};Ze.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Wpe(this,arguments[t]);return this.length};Ze.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}};Ze.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}};Ze.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};Ze.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};Ze.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};Ze.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};Ze.prototype.map=function(t,e){e=e||this;for(var r=new Ze,i=this.head;i!==null;)r.push(t.call(e,i.value,this)),i=i.next;return r};Ze.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Ze,i=this.tail;i!==null;)r.push(t.call(e,i.value,this)),i=i.prev;return r};Ze.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};Ze.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};Ze.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};Ze.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};Ze.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 Ze;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};Ze.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 Ze;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};Ze.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 qpe(t,e){t.tail=new qm(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Wpe(t,e){t.head=new qm(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function qm(t,e,r,i){if(!(this instanceof qm))return new qm(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 Kx=v((DMe,J8)=>{"use strict";J8.exports=yt;var Vpe=V8(),Wm=require("util"),Gpe=K8(),Kpe=typeof Symbol=="function"&&process.env._nodeLRUCacheForceNoSymbol!=="1",Gn;Kpe?Gn=function(t){return Symbol(t)}:Gn=function(t){return"_"+t};var Do=Gn("max"),Vs=Gn("length"),Lc=Gn("lengthCalculator"),uf=Gn("allowStale"),ou=Gn("maxAge"),xo=Gn("dispose"),z8=Gn("noDisposeOnSet"),ar=Gn("lruList"),Vn=Gn("cache");function Vm(){return 1}function yt(t){if(!(this instanceof yt))return new yt(t);typeof t=="number"&&(t={max:t}),t||(t={});var e=this[Do]=t.max;(!e||typeof e!="number"||e<=0)&&(this[Do]=1/0);var r=t.length||Vm;typeof r!="function"&&(r=Vm),this[Lc]=r,this[uf]=t.stale||!1,this[ou]=t.maxAge||0,this[xo]=t.dispose,this[z8]=t.noDisposeOnSet||!1,this.reset()}Object.defineProperty(yt.prototype,"max",{set:function(t){(!t||typeof t!="number"||t<=0)&&(t=1/0),this[Do]=t,Gm(this)},get:function(){return this[Do]},enumerable:!0});Object.defineProperty(yt.prototype,"allowStale",{set:function(t){this[uf]=!!t},get:function(){return this[uf]},enumerable:!0});Object.defineProperty(yt.prototype,"maxAge",{set:function(t){(!t||typeof t!="number"||t<0)&&(t=0),this[ou]=t,Gm(this)},get:function(){return this[ou]},enumerable:!0});Object.defineProperty(yt.prototype,"lengthCalculator",{set:function(t){typeof t!="function"&&(t=Vm),t!==this[Lc]&&(this[Lc]=t,this[Vs]=0,this[ar].forEach(function(e){e.length=this[Lc](e.value,e.key),this[Vs]+=e.length},this)),Gm(this)},get:function(){return this[Lc]},enumerable:!0});Object.defineProperty(yt.prototype,"length",{get:function(){return this[Vs]},enumerable:!0});Object.defineProperty(yt.prototype,"itemCount",{get:function(){return this[ar].length},enumerable:!0});yt.prototype.rforEach=function(t,e){e=e||this;for(var r=this[ar].tail;r!==null;){var i=r.prev;X8(this,t,r,e),r=i}};function X8(t,e,r,i){var n=r.value;Km(t,n)&&(cf(t,r),t[uf]||(n=void 0)),n&&e.call(i,n.value,n.key,t)}yt.prototype.forEach=function(t,e){e=e||this;for(var r=this[ar].head;r!==null;){var i=r.next;X8(this,t,r,e),r=i}};yt.prototype.keys=function(){return this[ar].toArray().map(function(t){return t.key},this)};yt.prototype.values=function(){return this[ar].toArray().map(function(t){return t.value},this)};yt.prototype.reset=function(){this[xo]&&this[ar]&&this[ar].length&&this[ar].forEach(function(t){this[xo](t.key,t.value)},this),this[Vn]=new Vpe,this[ar]=new Gpe,this[Vs]=0};yt.prototype.dump=function(){return this[ar].map(function(t){if(!Km(this,t))return{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}},this).toArray().filter(function(t){return t})};yt.prototype.dumpLru=function(){return this[ar]};yt.prototype.inspect=function(t,e){var r="LRUCache {",i=!1,n=this[uf];n&&(r+=`
  allowStale: true`,i=!0);var s=this[Do];s&&s!==1/0&&(i&&(r+=","),r+=`
  max: `+Wm.inspect(s,e),i=!0);var o=this[ou];o&&(i&&(r+=","),r+=`
  maxAge: `+Wm.inspect(o,e),i=!0);var a=this[Lc];a&&a!==Vm&&(i&&(r+=","),r+=`
  length: `+Wm.inspect(this[Vs],e),i=!0);var u=!1;return this[ar].forEach(function(c){u?r+=`,
  `:(i&&(r+=`,
`),u=!0,r+=`
  `);var l=Wm.inspect(c.key).split(`
`).join(`
  `),p={value:c.value};c.maxAge!==o&&(p.maxAge=c.maxAge),a!==Vm&&(p.length=c.length),Km(this,c)&&(p.stale=!0),p=Wm.inspect(p,e).split(`
`).join(`
  `),r+=l+" => "+p}),(u||i)&&(r+=`
`),r+="}",r};yt.prototype.set=function(t,e,r){r=r||this[ou];var i=r?Date.now():0,n=this[Lc](e,t);if(this[Vn].has(t)){if(n>this[Do])return cf(this,this[Vn].get(t)),!1;var s=this[Vn].get(t),o=s.value;return this[xo]&&(this[z8]||this[xo](t,o.value)),o.now=i,o.maxAge=r,o.value=e,this[Vs]+=n-o.length,o.length=n,this.get(t),Gm(this),!0}var a=new zpe(t,e,n,i,r);return a.length>this[Do]?(this[xo]&&this[xo](t,e),!1):(this[Vs]+=a.length,this[ar].unshift(a),this[Vn].set(t,this[ar].head),Gm(this),!0)};yt.prototype.has=function(t){if(!this[Vn].has(t))return!1;var e=this[Vn].get(t).value;return!Km(this,e)};yt.prototype.get=function(t){return Gx(this,t,!0)};yt.prototype.peek=function(t){return Gx(this,t,!1)};yt.prototype.pop=function(){var t=this[ar].tail;return t?(cf(this,t),t.value):null};yt.prototype.del=function(t){cf(this,this[Vn].get(t))};yt.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)}}};yt.prototype.prune=function(){var t=this;this[Vn].forEach(function(e,r){Gx(t,r,!1)})};function Gx(t,e,r){var i=t[Vn].get(e);if(i){var n=i.value;Km(t,n)?(cf(t,i),t[uf]||(n=void 0)):r&&t[ar].unshiftNode(i),n&&(n=n.value)}return n}function Km(t,e){if(!e||!e.maxAge&&!t[ou])return!1;var r=!1,i=Date.now()-e.now;return e.maxAge?r=i>e.maxAge:r=t[ou]&&i>t[ou],r}function Gm(t){if(t[Vs]>t[Do])for(var e=t[ar].tail;t[Vs]>t[Do]&&e!==null;){var r=e.prev;cf(t,e),e=r}}function cf(t,e){if(e){var r=e.value;t[xo]&&t[xo](r.key,r.value),t[Vs]-=r.length,t[Vn].delete(r.key),t[ar].removeNode(e)}}function zpe(t,e,r,i,n){this.key=t,this.value=e,this.length=r,this.now=i,this.maxAge=n||0}});var iq=v((PMe,rq)=>{rq.exports=tq;tq.sync=Jpe;var zx=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Y8=require("path"),Xpe=zx?";":":",Q8=JA();function Z8(t){var e=new Error("not found: "+t);return e.code="ENOENT",e}function eq(t,e){var r=e.colon||Xpe,i=e.path||process.env.PATH||"",n=[""];i=i.split(r);var s="";return zx&&(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(/\//)||zx&&t.match(/\\/))&&(i=[""]),{env:i,ext:n,extExe:s}}function tq(t,e,r){typeof e=="function"&&(r=e,e={});var i=eq(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(Z8(t));var p=n[c];p.charAt(0)==='"'&&p.slice(-1)==='"'&&(p=p.slice(1,-1));var f=Y8.join(p,t);!p&&/^\.[\\\/]/.test(t)&&(f=t.slice(0,2)+f),function m(g,H){if(g===H)return u(c+1,l);var b=s[g];Q8(f+b,{pathExt:o},function(w,k){if(!w&&k)if(e.all)a.push(f+b);else return r(null,f+b);return m(g+1,H)})}(0,s.length)})(0,n.length)}function Jpe(t,e){e=e||{};for(var r=eq(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=Y8.join(c,t);!c&&/^\.[\\\/]/.test(t)&&(l=t.slice(0,2)+l);for(var p=0,f=n.length;p<f;p++){var m=l+n[p],g;try{if(g=Q8.sync(m,{pathExt:s}),g)if(e.all)o.push(m);else return m}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw Z8(t)}});var aq=v((LMe,oq)=>{"use strict";var nq=require("path"),sq=iq(),Ype=Kx(),H0=new Ype({max:50,maxAge:30*1e3}),Qpe=new RegExp(process.platform==="win32"?/[\/\\]/:/\//);function Zpe(t,e){var r;if(Qpe.test(t)&&(t=nq.resolve(t)),e=!!e,r=H0.get(t+"!"+e),H0.has(t))return H0.get(t);try{r=e?sq.sync(t,{pathExt:nq.delimiter+(process.env.PATHEXT||"")}):sq.sync(t)}catch{}return H0.set(t+"!"+e,r),r}oq.exports=Zpe});var pq=v((TMe,lq)=>{"use strict";var Xx=require("fs"),efe=Kx(),uq=aq(),tfe=process.platform==="win32",Jx=new efe({max:50,maxAge:30*1e3});function rfe(t){var e,r,i,n;if(Jx.has(t))return Jx.get(t);e=new Buffer(150);try{r=Xx.openSync(t,"r"),Xx.readSync(r,e,0,150,0),Xx.closeSync(r)}catch{}return i=e.toString().trim().match(/#!(.+)/i),i&&(n=i[1].replace(/\/usr\/bin\/env\s+/i,"")),Jx.set(t,n),n}function cq(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 ife(t){return/^[a-z0-9_-]+$/i.test(t)?t:cq(t,!0)}function nfe(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,tfe&&(s=uq(t),s=s||uq(t,!0),i=s&&rfe(s),i&&(e.unshift(s),t=i),n=t!=="echo",t=ife(t),e=e.map(function(a){return cq(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}}lq.exports=nfe});var mq=v(($Me,y0)=>{"use strict";var fq=process.platform==="win32";function dq(t,e){var r;return r=new Error(e+" "+t+" ENOENT"),r.code=r.errno="ENOENT",r.syscall=e+" "+t,r}function sfe(t,e){var r;fq&&(r=t.emit,t.emit=function(i,n){var s;return i==="exit"&&(s=hq(n,e,"spawn"),s)?r.call(t,"error",s):r.apply(t,arguments)})}function hq(t,e,r){return fq&&t===1&&!e.file?dq(e.original,r):null}y0.exports.hookChildProcess=sfe;y0.exports.verifyENOENT=hq;y0.exports.notFoundError=dq});var vq=v((kMe,zm)=>{"use strict";var ofe=require("child_process"),gq=pq(),Hq=mq();function yq(t,e,r){var i,n;return i=gq(t,e,r),n=ofe.spawn(i.command,i.args,i.options),Hq.hookChildProcess(n,i),n}zm.exports=yq;zm.exports.spawn=yq;zm.exports._parse=gq;zm.exports._enoent=Hq});var wq=v((RMe,bq)=>{"use strict";bq.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 Iq=v((MMe,Aq)=>{"use strict";var _q=Object.getOwnPropertySymbols,afe=Object.prototype.hasOwnProperty,ufe=Object.prototype.propertyIsEnumerable;function cfe(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function lfe(){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}}Aq.exports=lfe()?Object.assign:function(t,e){for(var r,i=cfe(t),n,s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var o in r)afe.call(r,o)&&(i[o]=r[o]);if(_q){n=_q(r);for(var a=0;a<n.length;a++)ufe.call(r,n[a])&&(i[n[a]]=r[n[a]])}}return i}});var Yx=v((OMe,Eq)=>{"use strict";Eq.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 Cq=v((NMe,Sq)=>{"use strict";var Xm=require("path"),pfe=Yx();Sq.exports=function(t){t=t||{};for(var e,r=Xm.resolve(t.cwd||"."),i=[];e!==r;)i.push(Xm.join(r,"node_modules/.bin")),e=r,r=Xm.resolve(r,"..");return i.push(Xm.dirname(process.execPath)),i.concat(t.path||process.env[pfe()]).join(Xm.delimiter)}});var Dq=v((FMe,Jm)=>{"use strict";var ffe=require("child_process"),Qx=vq(),dfe=wq(),Zx=Iq(),hfe=Cq(),xq=Yx()(),mfe=1024*1024*10;Jm.exports=function(t,e,r){return new Promise(function(i,n){var s=Qx._parse(t,e,r);r=Zx({maxBuffer:mfe,stripEof:!0,preferLocal:!0},s.options);var o=function(u){return r.stripEof&&(u=dfe(u)),u};r.preferLocal&&(r.env=Zx({},r.env||process.env),r.env[xq]=hfe({cwd:r.cwd,path:r.env[xq]}));var a=ffe.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)})});Qx._enoent.hookChildProcess(a,s)})};Jm.exports.shell=function(t,e){var r,i;return e=Zx({},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),Jm.exports(r,i,e)};Jm.exports.spawn=Qx});var Lq=v((BMe,Pq)=>{"use strict";Pq.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 $q=v((UMe,Tq)=>{"use strict";var gfe=Dq(),Hfe=Lq();Tq.exports=function(){return process.platform!=="linux"?Promise.reject(new Error("Only Linux systems are supported")):gfe("xdg-mime",["query","default","x-scheme-handler/http"]).then(t=>{let e=t.stdout.trim();return{name:Hfe(e.replace(/.desktop$/,"").replace("-"," ")),id:e}})}});var Rq=v((jMe,kq)=>{"use strict";var yfe=E8(),vfe=B8();kq.exports=()=>process.platform==="linux"?$q()():process.platform==="darwin"?yfe().then(t=>vfe(t).then(e=>({name:e,id:t}))):Promise.reject(new Error("Only macOS and Linux are supported"))});var Lo=v((fOe,tD)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?tD.exports={nextTick:_fe}:tD.exports=process;function _fe(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 rD=v((dOe,jq)=>{var Afe={}.toString;jq.exports=Array.isArray||function(t){return Afe.call(t)=="[object Array]"}});var iD=v((hOe,qq)=>{qq.exports=require("stream")});var $o=v((nD,Vq)=>{var A0=require("buffer"),To=A0.Buffer;function Wq(t,e){for(var r in t)e[r]=t[r]}To.from&&To.alloc&&To.allocUnsafe&&To.allocUnsafeSlow?Vq.exports=A0:(Wq(A0,nD),nD.Buffer=ff);function ff(t,e,r){return To(t,e,r)}Wq(To,ff);ff.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return To(t,e,r)};ff.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=To(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};ff.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return To(t)};ff.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return A0.SlowBuffer(t)}});var Kn=v(Vr=>{function Ife(t){return Array.isArray?Array.isArray(t):I0(t)==="[object Array]"}Vr.isArray=Ife;function Efe(t){return typeof t=="boolean"}Vr.isBoolean=Efe;function Sfe(t){return t===null}Vr.isNull=Sfe;function Cfe(t){return t==null}Vr.isNullOrUndefined=Cfe;function xfe(t){return typeof t=="number"}Vr.isNumber=xfe;function Dfe(t){return typeof t=="string"}Vr.isString=Dfe;function Pfe(t){return typeof t=="symbol"}Vr.isSymbol=Pfe;function Lfe(t){return t===void 0}Vr.isUndefined=Lfe;function Tfe(t){return I0(t)==="[object RegExp]"}Vr.isRegExp=Tfe;function $fe(t){return typeof t=="object"&&t!==null}Vr.isObject=$fe;function kfe(t){return I0(t)==="[object Date]"}Vr.isDate=kfe;function Rfe(t){return I0(t)==="[object Error]"||t instanceof Error}Vr.isError=Rfe;function Mfe(t){return typeof t=="function"}Vr.isFunction=Mfe;function Ofe(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}Vr.isPrimitive=Ofe;Vr.isBuffer=Buffer.isBuffer;function I0(t){return Object.prototype.toString.call(t)}});var Gq=v((gOe,sD)=>{typeof Object.create=="function"?sD.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:sD.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 ur=v((HOe,aD)=>{try{if(oD=require("util"),typeof oD.inherits!="function")throw"";aD.exports=oD.inherits}catch{aD.exports=Gq()}var oD});var zq=v((yOe,uD)=>{"use strict";function Nfe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Kq=$o().Buffer,Qm=require("util");function Ffe(t,e,r){t.copy(e,r)}uD.exports=function(){function t(){Nfe(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 Kq.alloc(0);if(this.length===1)return this.head.data;for(var i=Kq.allocUnsafe(r>>>0),n=this.head,s=0;n;)Ffe(n.data,i,s),s+=n.data.length,n=n.next;return i},t}();Qm&&Qm.inspect&&Qm.inspect.custom&&(uD.exports.prototype[Qm.inspect.custom]=function(){var t=Qm.inspect({length:this.length});return this.constructor.name+" "+t})});var cD=v((vOe,Yq)=>{"use strict";var Xq=Lo();function Bfe(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)&&Xq.nextTick(Jq,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?(Xq.nextTick(Jq,r,s),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(s)}),this)}function Ufe(){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 Jq(t,e){t.emit("error",e)}Yq.exports={destroy:Bfe,undestroy:Ufe}});var E0=v((bOe,Qq)=>{Qq.exports=require("util").deprecate});var pD=v((wOe,oW)=>{"use strict";var Tc=Lo();oW.exports=Qt;function eW(t){var e=this;this.next=null,this.entry=null,this.finish=function(){sde(e,t)}}var jfe=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Tc.nextTick,df;Qt.WritableState=eg;var tW=Object.create(Kn());tW.inherits=ur();var qfe={deprecate:E0()},rW=iD(),C0=$o().Buffer,Wfe=global.Uint8Array||function(){};function Vfe(t){return C0.from(t)}function Gfe(t){return C0.isBuffer(t)||t instanceof Wfe}var iW=cD();tW.inherits(Qt,rW);function Kfe(){}function eg(t,e){df=df||$c(),t=t||{};var r=e instanceof df;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){ede(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 eW(this)}eg.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(eg.prototype,"buffer",{get:qfe.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var S0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S0=Function.prototype[Symbol.hasInstance],Object.defineProperty(Qt,Symbol.hasInstance,{value:function(t){return S0.call(this,t)?!0:this!==Qt?!1:t&&t._writableState instanceof eg}})):S0=function(t){return t instanceof this};function Qt(t){if(df=df||$c(),!S0.call(Qt,this)&&!(this instanceof df))return new Qt(t);this._writableState=new eg(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)),rW.call(this)}Qt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function zfe(t,e){var r=new Error("write after end");t.emit("error",r),Tc.nextTick(e,r)}function Xfe(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),Tc.nextTick(i,s),n=!1),n}Qt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Gfe(t);return s&&!C0.isBuffer(t)&&(t=Vfe(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Kfe),i.ended?zfe(this,r):(s||Xfe(this,i,t,r))&&(i.pendingcb++,n=Yfe(this,i,s,t,e,r)),n};Qt.prototype.cork=function(){var t=this._writableState;t.corked++};Qt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest&&nW(this,t))};Qt.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 Jfe(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=C0.from(e,r)),e}Object.defineProperty(Qt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Yfe(t,e,r,i,n,s){if(!r){var o=Jfe(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 lD(t,e,!1,a,i,n,s);return u}function lD(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 Qfe(t,e,r,i,n){--e.pendingcb,r?(Tc.nextTick(n,i),Tc.nextTick(Zm,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),Zm(t,e))}function Zfe(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function ede(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(Zfe(r),e)Qfe(t,r,i,e,n);else{var s=sW(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&nW(t,r),i?jfe(Zq,t,r,s,n):Zq(t,r,s,n)}}function Zq(t,e,r,i){r||tde(t,e),e.pendingcb--,i(),Zm(t,e)}function tde(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function nW(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,lD(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 eW(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,p=e.objectMode?1:u.length;if(lD(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}Qt.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Qt.prototype._writev=null;Qt.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&&nde(this,i,r)};function sW(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function rde(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Zm(t,e)})}function ide(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,Tc.nextTick(rde,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Zm(t,e){var r=sW(e);return r&&(ide(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function nde(t,e,r){e.ending=!0,Zm(t,e),r&&(e.finished?Tc.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function sde(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(Qt.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Qt.prototype.destroy=iW.destroy;Qt.prototype._undestroy=iW.undestroy;Qt.prototype._destroy=function(t,e){this.end(),e(t)}});var $c=v((_Oe,lW)=>{"use strict";var aW=Lo(),ode=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};lW.exports=ko;var uW=Object.create(Kn());uW.inherits=ur();var cW=hD(),dD=pD();uW.inherits(ko,cW);for(fD=ode(dD.prototype),x0=0;x0<fD.length;x0++)D0=fD[x0],ko.prototype[D0]||(ko.prototype[D0]=dD.prototype[D0]);var fD,D0,x0;function ko(t){if(!(this instanceof ko))return new ko(t);cW.call(this,t),dD.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",ade)}Object.defineProperty(ko.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ade(){this.allowHalfOpen||this._writableState.ended||aW.nextTick(ude,this)}function ude(t){t.end()}Object.defineProperty(ko.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)}});ko.prototype._destroy=function(t,e){this.push(null),this.end(),aW.nextTick(e,t)}});var HD=v(fW=>{"use strict";var gD=$o().Buffer,pW=gD.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 cde(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 lde(t){var e=cde(t);if(typeof e!="string"&&(gD.isEncoding===pW||!pW(t)))throw new Error("Unknown encoding: "+t);return e||t}fW.StringDecoder=tg;function tg(t){this.encoding=lde(t);var e;switch(this.encoding){case"utf16le":this.text=gde,this.end=Hde,e=4;break;case"utf8":this.fillLast=dde,e=4;break;case"base64":this.text=yde,this.end=vde,e=3;break;default:this.write=bde,this.end=wde;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=gD.allocUnsafe(e)}tg.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||""};tg.prototype.end=mde;tg.prototype.text=hde;tg.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 mD(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function pde(t,e,r){var i=e.length-1;if(i<r)return 0;var n=mD(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=mD(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=mD(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function fde(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 dde(t){var e=this.lastTotal-this.lastNeed,r=fde(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 hde(t,e){var r=pde(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 mde(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function gde(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 Hde(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 yde(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 vde(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function bde(t){return t.toString(this.encoding)}function wde(t){return t&&t.length?this.write(t):""}});var hD=v((EOe,IW)=>{"use strict";var mf=Lo();IW.exports=vt;var _de=rD(),rg;vt.ReadableState=vW;var IOe=require("events").EventEmitter,gW=function(t,e){return t.listeners(e).length},_D=iD(),ig=$o().Buffer,Ade=global.Uint8Array||function(){};function Ide(t){return ig.from(t)}function Ede(t){return ig.isBuffer(t)||t instanceof Ade}var HW=Object.create(Kn());HW.inherits=ur();var yD=require("util"),ze=void 0;yD&&yD.debuglog?ze=yD.debuglog("stream"):ze=function(){};var Sde=zq(),yW=cD(),hf;HW.inherits(vt,_D);var vD=["error","close","destroy","pause","resume"];function Cde(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):_de(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function vW(t,e){rg=rg||$c(),t=t||{};var r=e instanceof rg;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 Sde,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&&(hf||(hf=HD().StringDecoder),this.decoder=new hf(t.encoding),this.encoding=t.encoding)}function vt(t){if(rg=rg||$c(),!(this instanceof vt))return new vt(t);this._readableState=new vW(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),_D.call(this)}Object.defineProperty(vt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});vt.prototype.destroy=yW.destroy;vt.prototype._undestroy=yW.undestroy;vt.prototype._destroy=function(t,e){this.push(null),e(t)};vt.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=ig.from(t,e),e=""),i=!0),bW(this,t,e,!1,i)};vt.prototype.unshift=function(t){return bW(this,t,null,!0,!1)};function bW(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,Lde(t,s);else{var o;n||(o=xde(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==ig.prototype&&(e=Ide(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):bD(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?bD(t,s,e,!1):wW(t,s)):bD(t,s,e,!1))):i||(s.reading=!1)}return Dde(s)}function bD(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&&P0(t)),wW(t,e)}function xde(t,e){var r;return!Ede(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Dde(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}vt.prototype.isPaused=function(){return this._readableState.flowing===!1};vt.prototype.setEncoding=function(t){return hf||(hf=HD().StringDecoder),this._readableState.decoder=new hf(t),this._readableState.encoding=t,this};var dW=8388608;function Pde(t){return t>=dW?t=dW:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function hW(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=Pde(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}vt.prototype.read=function(t){ze("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 ze("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?wD(this):P0(this),null;if(t=hW(t,e),t===0&&e.ended)return e.length===0&&wD(this),null;var i=e.needReadable;ze("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,ze("length less than watermark",i)),e.ended||e.reading?(i=!1,ze("reading or ended",i)):i&&(ze("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=hW(r,e)));var n;return t>0?n=_W(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&&wD(this)),n!==null&&this.emit("data",n),n};function Lde(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,P0(t)}}function P0(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(ze("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?mf.nextTick(mW,t):mW(t))}function mW(t){ze("emit readable"),t.emit("readable"),AD(t)}function wW(t,e){e.readingMore||(e.readingMore=!0,mf.nextTick(Tde,t,e))}function Tde(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(ze("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}vt.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};vt.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,ze("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?mf.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(w,k){ze("onunpipe"),w===r&&k&&k.hasUnpiped===!1&&(k.hasUnpiped=!0,l())}function a(){ze("onend"),t.end()}var u=$de(r);t.on("drain",u);var c=!1;function l(){ze("cleanup"),t.removeListener("close",g),t.removeListener("finish",H),t.removeListener("drain",u),t.removeListener("error",m),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(w){ze("ondata"),p=!1;var k=t.write(w);k===!1&&!p&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&AW(i.pipes,t)!==-1)&&!c&&(ze("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function m(w){ze("onerror",w),b(),t.removeListener("error",m),gW(t,"error")===0&&t.emit("error",w)}Cde(t,"error",m);function g(){t.removeListener("finish",H),b()}t.once("close",g);function H(){ze("onfinish"),t.removeListener("close",g),b()}t.once("finish",H);function b(){ze("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(ze("pipe resume"),r.resume()),t};function $de(t){return function(){var e=t._readableState;ze("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&gW(t,"data")&&(e.flowing=!0,AD(t))}}vt.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=AW(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)};vt.prototype.on=function(t,e){var r=_D.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&&P0(this):mf.nextTick(kde,this))}return r};vt.prototype.addListener=vt.prototype.on;function kde(t){ze("readable nexttick read 0"),t.read(0)}vt.prototype.resume=function(){var t=this._readableState;return t.flowing||(ze("resume"),t.flowing=!0,Rde(this,t)),this};function Rde(t,e){e.resumeScheduled||(e.resumeScheduled=!0,mf.nextTick(Mde,t,e))}function Mde(t,e){e.reading||(ze("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),AD(t),e.flowing&&!e.reading&&t.read(0)}vt.prototype.pause=function(){return ze("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ze("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function AD(t){var e=t._readableState;for(ze("flow",e.flowing);e.flowing&&t.read()!==null;);}vt.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(ze("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(ze("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<vD.length;s++)t.on(vD[s],this.emit.bind(this,vD[s]));return this._read=function(o){ze("wrapped _read",o),i&&(i=!1,t.resume())},this};Object.defineProperty(vt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});vt._fromList=_W;function _W(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=Ode(t,e.buffer,e.decoder),r}function Ode(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?Nde(t,e):Fde(t,e),i}function Nde(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 Fde(t,e){var r=ig.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 wD(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,mf.nextTick(Bde,e,t))}function Bde(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function AW(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ID=v((SOe,CW)=>{"use strict";CW.exports=Ro;var L0=$c(),SW=Object.create(Kn());SW.inherits=ur();SW.inherits(Ro,L0);function Ude(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 Ro(t){if(!(this instanceof Ro))return new Ro(t);L0.call(this,t),this._transformState={afterTransform:Ude.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",jde)}function jde(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){EW(t,e,r)}):EW(this,null,null)}Ro.prototype.push=function(t,e){return this._transformState.needTransform=!1,L0.prototype.push.call(this,t,e)};Ro.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Ro.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)}};Ro.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};Ro.prototype._destroy=function(t,e){var r=this;L0.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function EW(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 LW=v((COe,PW)=>{"use strict";PW.exports=ng;var xW=ID(),DW=Object.create(Kn());DW.inherits=ur();DW.inherits(ng,xW);function ng(t){if(!(this instanceof ng))return new ng(t);xW.call(this,t)}ng.prototype._transform=function(t,e,r){r(null,t)}});var TW=v((Er,T0)=>{var Gs=require("stream");process.env.READABLE_STREAM==="disable"&&Gs?(T0.exports=Gs,Er=T0.exports=Gs.Readable,Er.Readable=Gs.Readable,Er.Writable=Gs.Writable,Er.Duplex=Gs.Duplex,Er.Transform=Gs.Transform,Er.PassThrough=Gs.PassThrough,Er.Stream=Gs):(Er=T0.exports=hD(),Er.Stream=Gs||Er,Er.Readable=Er,Er.Writable=pD(),Er.Duplex=$c(),Er.Transform=ID(),Er.PassThrough=LW())});var RW=v((xOe,kW)=>{var $W=TW(),qde=require("util");function Wde(t){return!(typeof t.pipe!="function"||!t.readable||typeof t._read!="function"||!t._readableState)}function Vde(t,e){if(!Wde(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 sg(t,e){if(!(this instanceof sg))return new sg(t,e);if(t=t||[],e=e||{},e.objectMode=!0,$W.call(this,e),Array.isArray(t)||(t=[t]),!t.length)return this.push(null);var r=Vde.bind(this,[]);t.forEach(function(i){Array.isArray(i)?i.forEach(r):r(i)})}qde.inherits(sg,$W);sg.prototype._read=function(){};kW.exports=sg});var ED=v((DOe,MW)=>{MW.exports=require("stream")});var NW=v((POe,SD)=>{"use strict";function Gde(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var OW=$o().Buffer,og=require("util");function Kde(t,e,r){t.copy(e,r)}SD.exports=function(){function t(){Gde(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 OW.alloc(0);if(this.length===1)return this.head.data;for(var i=OW.allocUnsafe(r>>>0),n=this.head,s=0;n;)Kde(n.data,i,s),s+=n.data.length,n=n.next;return i},t}();og&&og.inspect&&og.inspect.custom&&(SD.exports.prototype[og.inspect.custom]=function(){var t=og.inspect({length:this.length});return this.constructor.name+" "+t})});var CD=v((LOe,UW)=>{"use strict";var FW=Lo();function zde(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)&&FW.nextTick(BW,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?(FW.nextTick(BW,r,s),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(s)}),this)}function Xde(){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 BW(t,e){t.emit("error",e)}UW.exports={destroy:zde,undestroy:Xde}});var DD=v((TOe,XW)=>{"use strict";var kc=Lo();XW.exports=Zt;function qW(t){var e=this;this.next=null,this.entry=null,this.finish=function(){dhe(e,t)}}var Jde=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:kc.nextTick,gf;Zt.WritableState=ug;var WW=Kn();WW.inherits=ur();var Yde={deprecate:E0()},VW=ED(),k0=$o().Buffer,Qde=global.Uint8Array||function(){};function Zde(t){return k0.from(t)}function ehe(t){return k0.isBuffer(t)||t instanceof Qde}var GW=CD();WW.inherits(Zt,VW);function the(){}function ug(t,e){gf=gf||Rc(),t=t||{};var r=e instanceof gf;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){uhe(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 qW(this)}ug.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ug.prototype,"buffer",{get:Yde.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var $0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?($0=Function.prototype[Symbol.hasInstance],Object.defineProperty(Zt,Symbol.hasInstance,{value:function(t){return $0.call(this,t)?!0:this!==Zt?!1:t&&t._writableState instanceof ug}})):$0=function(t){return t instanceof this};function Zt(t){if(gf=gf||Rc(),!$0.call(Zt,this)&&!(this instanceof gf))return new Zt(t);this._writableState=new ug(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)),VW.call(this)}Zt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function rhe(t,e){var r=new Error("write after end");t.emit("error",r),kc.nextTick(e,r)}function ihe(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),kc.nextTick(i,s),n=!1),n}Zt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&ehe(t);return s&&!k0.isBuffer(t)&&(t=Zde(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=the),i.ended?rhe(this,r):(s||ihe(this,i,t,r))&&(i.pendingcb++,n=she(this,i,s,t,e,r)),n};Zt.prototype.cork=function(){var t=this._writableState;t.corked++};Zt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest&&KW(this,t))};Zt.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 nhe(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=k0.from(e,r)),e}Object.defineProperty(Zt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function she(t,e,r,i,n,s){if(!r){var o=nhe(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 xD(t,e,!1,a,i,n,s);return u}function xD(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 ohe(t,e,r,i,n){--e.pendingcb,r?(kc.nextTick(n,i),kc.nextTick(ag,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),ag(t,e))}function ahe(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function uhe(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(ahe(r),e)ohe(t,r,i,e,n);else{var s=zW(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&KW(t,r),i?Jde(jW,t,r,s,n):jW(t,r,s,n)}}function jW(t,e,r,i){r||che(t,e),e.pendingcb--,i(),ag(t,e)}function che(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function KW(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,xD(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 qW(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,p=e.objectMode?1:u.length;if(xD(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}Zt.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Zt.prototype._writev=null;Zt.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&&fhe(this,i,r)};function zW(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function lhe(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),ag(t,e)})}function phe(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,kc.nextTick(lhe,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function ag(t,e){var r=zW(e);return r&&(phe(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function fhe(t,e,r){e.ending=!0,ag(t,e),r&&(e.finished?kc.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function dhe(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(Zt.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Zt.prototype.destroy=GW.destroy;Zt.prototype._undestroy=GW.undestroy;Zt.prototype._destroy=function(t,e){this.end(),e(t)}});var Rc=v(($Oe,ZW)=>{"use strict";var JW=Lo(),hhe=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};ZW.exports=Mo;var YW=Kn();YW.inherits=ur();var QW=TD(),LD=DD();YW.inherits(Mo,QW);for(PD=hhe(LD.prototype),R0=0;R0<PD.length;R0++)M0=PD[R0],Mo.prototype[M0]||(Mo.prototype[M0]=LD.prototype[M0]);var PD,M0,R0;function Mo(t){if(!(this instanceof Mo))return new Mo(t);QW.call(this,t),LD.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",mhe)}Object.defineProperty(Mo.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function mhe(){this.allowHalfOpen||this._writableState.ended||JW.nextTick(ghe,this)}function ghe(t){t.end()}Object.defineProperty(Mo.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)}});Mo.prototype._destroy=function(t,e){this.push(null),this.end(),JW.nextTick(e,t)}});var RD=v(tV=>{"use strict";var kD=$o().Buffer,eV=kD.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 Hhe(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 yhe(t){var e=Hhe(t);if(typeof e!="string"&&(kD.isEncoding===eV||!eV(t)))throw new Error("Unknown encoding: "+t);return e||t}tV.StringDecoder=cg;function cg(t){this.encoding=yhe(t);var e;switch(this.encoding){case"utf16le":this.text=Ihe,this.end=Ehe,e=4;break;case"utf8":this.fillLast=whe,e=4;break;case"base64":this.text=She,this.end=Che,e=3;break;default:this.write=xhe,this.end=Dhe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=kD.allocUnsafe(e)}cg.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||""};cg.prototype.end=Ahe;cg.prototype.text=_he;cg.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 $D(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function vhe(t,e,r){var i=e.length-1;if(i<r)return 0;var n=$D(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=$D(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=$D(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function bhe(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 whe(t){var e=this.lastTotal-this.lastNeed,r=bhe(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 _he(t,e){var r=vhe(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 Ahe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Ihe(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 Ehe(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 She(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 Che(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function xhe(t){return t.toString(this.encoding)}function Dhe(t){return t&&t.length?this.write(t):""}});var TD=v((MOe,dV)=>{"use strict";var yf=Lo();dV.exports=bt;var Phe=rD(),lg;bt.ReadableState=uV;var ROe=require("events").EventEmitter,sV=function(t,e){return t.listeners(e).length},BD=ED(),pg=$o().Buffer,Lhe=global.Uint8Array||function(){};function The(t){return pg.from(t)}function $he(t){return pg.isBuffer(t)||t instanceof Lhe}var oV=Kn();oV.inherits=ur();var MD=require("util"),Xe=void 0;MD&&MD.debuglog?Xe=MD.debuglog("stream"):Xe=function(){};var khe=NW(),aV=CD(),Hf;oV.inherits(bt,BD);var OD=["error","close","destroy","pause","resume"];function Rhe(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Phe(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function uV(t,e){lg=lg||Rc(),t=t||{};var r=e instanceof lg;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 khe,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&&(Hf||(Hf=RD().StringDecoder),this.decoder=new Hf(t.encoding),this.encoding=t.encoding)}function bt(t){if(lg=lg||Rc(),!(this instanceof bt))return new bt(t);this._readableState=new uV(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),BD.call(this)}Object.defineProperty(bt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});bt.prototype.destroy=aV.destroy;bt.prototype._undestroy=aV.undestroy;bt.prototype._destroy=function(t,e){this.push(null),e(t)};bt.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=pg.from(t,e),e=""),i=!0),cV(this,t,e,!1,i)};bt.prototype.unshift=function(t){return cV(this,t,null,!0,!1)};function cV(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,Fhe(t,s);else{var o;n||(o=Mhe(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==pg.prototype&&(e=The(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):ND(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?ND(t,s,e,!1):lV(t,s)):ND(t,s,e,!1))):i||(s.reading=!1)}return Ohe(s)}function ND(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&&O0(t)),lV(t,e)}function Mhe(t,e){var r;return!$he(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Ohe(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}bt.prototype.isPaused=function(){return this._readableState.flowing===!1};bt.prototype.setEncoding=function(t){return Hf||(Hf=RD().StringDecoder),this._readableState.decoder=new Hf(t),this._readableState.encoding=t,this};var rV=8388608;function Nhe(t){return t>=rV?t=rV:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function iV(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=Nhe(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}bt.prototype.read=function(t){Xe("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 Xe("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?FD(this):O0(this),null;if(t=iV(t,e),t===0&&e.ended)return e.length===0&&FD(this),null;var i=e.needReadable;Xe("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Xe("length less than watermark",i)),e.ended||e.reading?(i=!1,Xe("reading or ended",i)):i&&(Xe("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=iV(r,e)));var n;return t>0?n=pV(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&&FD(this)),n!==null&&this.emit("data",n),n};function Fhe(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,O0(t)}}function O0(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Xe("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?yf.nextTick(nV,t):nV(t))}function nV(t){Xe("emit readable"),t.emit("readable"),UD(t)}function lV(t,e){e.readingMore||(e.readingMore=!0,yf.nextTick(Bhe,t,e))}function Bhe(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Xe("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}bt.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};bt.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,Xe("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?yf.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(w,k){Xe("onunpipe"),w===r&&k&&k.hasUnpiped===!1&&(k.hasUnpiped=!0,l())}function a(){Xe("onend"),t.end()}var u=Uhe(r);t.on("drain",u);var c=!1;function l(){Xe("cleanup"),t.removeListener("close",g),t.removeListener("finish",H),t.removeListener("drain",u),t.removeListener("error",m),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(w){Xe("ondata"),p=!1;var k=t.write(w);k===!1&&!p&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&fV(i.pipes,t)!==-1)&&!c&&(Xe("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function m(w){Xe("onerror",w),b(),t.removeListener("error",m),sV(t,"error")===0&&t.emit("error",w)}Rhe(t,"error",m);function g(){t.removeListener("finish",H),b()}t.once("close",g);function H(){Xe("onfinish"),t.removeListener("close",g),b()}t.once("finish",H);function b(){Xe("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Xe("pipe resume"),r.resume()),t};function Uhe(t){return function(){var e=t._readableState;Xe("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&sV(t,"data")&&(e.flowing=!0,UD(t))}}bt.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=fV(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)};bt.prototype.on=function(t,e){var r=BD.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&&O0(this):yf.nextTick(jhe,this))}return r};bt.prototype.addListener=bt.prototype.on;function jhe(t){Xe("readable nexttick read 0"),t.read(0)}bt.prototype.resume=function(){var t=this._readableState;return t.flowing||(Xe("resume"),t.flowing=!0,qhe(this,t)),this};function qhe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,yf.nextTick(Whe,t,e))}function Whe(t,e){e.reading||(Xe("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),UD(t),e.flowing&&!e.reading&&t.read(0)}bt.prototype.pause=function(){return Xe("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Xe("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function UD(t){var e=t._readableState;for(Xe("flow",e.flowing);e.flowing&&t.read()!==null;);}bt.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Xe("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(Xe("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<OD.length;s++)t.on(OD[s],this.emit.bind(this,OD[s]));return this._read=function(o){Xe("wrapped _read",o),i&&(i=!1,t.resume())},this};Object.defineProperty(bt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});bt._fromList=pV;function pV(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=Vhe(t,e.buffer,e.decoder),r}function Vhe(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?Ghe(t,e):Khe(t,e),i}function Ghe(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 Khe(t,e){var r=pg.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 FD(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,yf.nextTick(zhe,e,t))}function zhe(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function fV(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var jD=v((OOe,gV)=>{"use strict";gV.exports=Oo;var N0=Rc(),mV=Kn();mV.inherits=ur();mV.inherits(Oo,N0);function Xhe(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 Oo(t){if(!(this instanceof Oo))return new Oo(t);N0.call(this,t),this._transformState={afterTransform:Xhe.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",Jhe)}function Jhe(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){hV(t,e,r)}):hV(this,null,null)}Oo.prototype.push=function(t,e){return this._transformState.needTransform=!1,N0.prototype.push.call(this,t,e)};Oo.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Oo.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)}};Oo.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};Oo.prototype._destroy=function(t,e){var r=this;N0.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function hV(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 bV=v((NOe,vV)=>{"use strict";vV.exports=fg;var HV=jD(),yV=Kn();yV.inherits=ur();yV.inherits(fg,HV);function fg(t){if(!(this instanceof fg))return new fg(t);HV.call(this,t)}fg.prototype._transform=function(t,e,r){r(null,t)}});var wV=v((Sr,F0)=>{var Ks=require("stream");process.env.READABLE_STREAM==="disable"&&Ks?(F0.exports=Ks,Sr=F0.exports=Ks.Readable,Sr.Readable=Ks.Readable,Sr.Writable=Ks.Writable,Sr.Duplex=Ks.Duplex,Sr.Transform=Ks.Transform,Sr.PassThrough=Ks.PassThrough,Sr.Stream=Ks):(Sr=F0.exports=TD(),Sr.Stream=Ks||Sr,Sr.Readable=Sr,Sr.Writable=DD(),Sr.Duplex=Rc(),Sr.Transform=jD(),Sr.PassThrough=bV())});var qD=v((FOe,_V)=>{_V.exports=Qhe;var Yhe=Object.prototype.hasOwnProperty;function Qhe(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)Yhe.call(r,i)&&(t[i]=r[i])}return t}});var SV=v((BOe,B0)=>{var AV=wV().Transform,IV=require("util").inherits,EV=qD();function vf(t){AV.call(this,t),this._destroyed=!1}IV(vf,AV);vf.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 Zhe(t,e,r){r(null,t)}function WD(t){return function(e,r,i){return typeof e=="function"&&(i=r,r=e,e={}),typeof r!="function"&&(r=Zhe),typeof i!="function"&&(i=null),t(e,r,i)}}B0.exports=WD(function(t,e,r){var i=new vf(t);return i._transform=e,r&&(i._flush=r),i});B0.exports.ctor=WD(function(t,e,r){function i(n){if(!(this instanceof i))return new i(n);this.options=EV(t,n),vf.call(this,this.options)}return IV(i,vf),i.prototype._transform=e,r&&(i.prototype._flush=r),i});B0.exports.obj=WD(function(t,e,r){var i=new vf(EV({objectMode:!0,highWaterMark:16},t));return i._transform=e,r&&(i._flush=r),i})});var DV=v((UOe,dg)=>{"use strict";dg.exports=xV;dg.exports.ctor=VD;dg.exports.objCtor=tme;dg.exports.obj=rme;var eme=SV(),CV=qD();function VD(t,e){typeof t=="function"&&(e=t,t={});var r=eme.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 tme(t,e){return typeof t=="function"&&(e=t,t={}),t=CV({objectMode:!0,highWaterMark:16},t),VD(t,e)}function xV(t,e){return VD(t,e)()}function rme(t,e){return typeof t=="function"&&(e=t,t={}),t=CV({objectMode:!0,highWaterMark:16},t),xV(t,e)}});var LV=v((jOe,PV)=>{PV.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):"",m=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(ime(l)){for(var g=[],H=0;H<l.length;H++){var b=a(l,H,l[H],p+1)||JSON.stringify(null);g.push(f+r+b)}return"["+g.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 w=nme(l).sort(s&&s(l)),g=[],H=0;H<w.length;H++){var c=w[H],k=a(l,c,l[c],p+1);if(k){var U=JSON.stringify(c)+m+k;g.push(f+r+U)}}return o.splice(o.indexOf(l),1),"{"+g.join(",")+f+"}"}}}({"":t},"",t,0)};var ime=Array.isArray||function(t){return{}.toString.call(t)==="[object Array]"},nme=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 $V=v((qOe,TV)=>{"use strict";var sme=DV().obj,ome=LV(),GD;typeof global.Set=="function"?GD=global.Set:GD=function(){this.keys=[],this.has=function(t){return this.keys.indexOf(t)!==-1},this.add=function(t){this.keys.push(t)}};function ame(t){return function(e){return e[t]}}TV.exports=ume;function ume(t,e){e=e||new GD;var r=ome;return typeof t=="string"?r=ame(t):typeof t=="function"&&(r=t),sme(function(i){var n=r(i);return e.has(n)?!1:(e.add(n),!0)})}});var MV=v((WOe,RV)=>{var cme=Xp(),lme=jb(),KD=require("fs"),hg=function(){},pme=/^v?\.0/.test(process.version),U0=function(t){return typeof t=="function"},fme=function(t){return!pme||!KD?!1:(t instanceof(KD.ReadStream||hg)||t instanceof(KD.WriteStream||hg))&&U0(t.close)},dme=function(t){return t.setHeader&&U0(t.abort)},hme=function(t,e,r,i){i=cme(i);var n=!1;t.on("close",function(){n=!0}),lme(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,fme(t))return t.close(hg);if(dme(t))return t.abort();if(U0(t.destroy))return t.destroy();i(o||new Error("stream was destroyed"))}}},kV=function(t){t()},mme=function(t,e){return t.pipe(e)},gme=function(){var t=Array.prototype.slice.call(arguments),e=U0(t[t.length-1]||hg)&&t.pop()||hg;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 hme(n,o,a,function(u){r||(r=u),u&&i.forEach(kV),!o&&(i.forEach(kV),e(r))})});return t.reduce(mme)};RV.exports=gme});var zD=v((VOe,OV)=>{OV.exports=require("stream")});var UV=v((GOe,BV)=>{"use strict";function NV(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 Hme(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?NV(Object(r),!0).forEach(function(i){yme(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):NV(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function yme(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vme(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FV(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 bme(t,e,r){return e&&FV(t.prototype,e),r&&FV(t,r),t}var wme=require("buffer"),j0=wme.Buffer,_me=require("util"),XD=_me.inspect,Ame=XD&&XD.custom||"inspect";function Ime(t,e,r){j0.prototype.copy.call(t,e,r)}BV.exports=function(){function t(){vme(this,t),this.head=null,this.tail=null,this.length=0}return bme(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 j0.alloc(0);for(var i=j0.allocUnsafe(r>>>0),n=this.head,s=0;n;)Ime(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=j0.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:Ame,value:function(r,i){return XD(this,Hme({},i,{depth:0,customInspect:!1}))}}]),t}()});var YD=v((KOe,qV)=>{"use strict";function Eme(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(JD,this,t)):process.nextTick(JD,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(q0,r):(r._writableState.errorEmitted=!0,process.nextTick(jV,r,s)):process.nextTick(jV,r,s):e?(process.nextTick(q0,r),e(s)):process.nextTick(q0,r)}),this)}function jV(t,e){JD(t,e),q0(t)}function q0(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Sme(){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 JD(t,e){t.emit("error",e)}function Cme(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}qV.exports={destroy:Eme,undestroy:Sme,errorOrDestroy:Cme}});var au=v((zOe,GV)=>{"use strict";var VV={};function yn(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,VV[t]=n}function WV(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 xme(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Dme(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Pme(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}yn("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);yn("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&xme(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Dme(t," argument"))n=`The ${t} ${i} ${WV(e,"type")}`;else{let s=Pme(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${WV(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);yn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");yn("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});yn("ERR_STREAM_PREMATURE_CLOSE","Premature close");yn("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});yn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");yn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");yn("ERR_STREAM_WRITE_AFTER_END","write after end");yn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);yn("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);yn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");GV.exports.codes=VV});var QD=v((XOe,KV)=>{"use strict";var Lme=au().codes.ERR_INVALID_OPT_VALUE;function Tme(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function $me(t,e,r,i){var n=Tme(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Lme(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}KV.exports={getHighWaterMark:$me}});var tP=v((JOe,ZV)=>{"use strict";ZV.exports=Nt;function XV(t){var e=this;this.next=null,this.entry=null,this.finish=function(){oge(e,t)}}var bf;Nt.WritableState=gg;var kme={deprecate:E0()},JV=zD(),V0=require("buffer").Buffer,Rme=global.Uint8Array||function(){};function Mme(t){return V0.from(t)}function Ome(t){return V0.isBuffer(t)||t instanceof Rme}var eP=YD(),Nme=QD(),Fme=Nme.getHighWaterMark,uu=au().codes,Bme=uu.ERR_INVALID_ARG_TYPE,Ume=uu.ERR_METHOD_NOT_IMPLEMENTED,jme=uu.ERR_MULTIPLE_CALLBACK,qme=uu.ERR_STREAM_CANNOT_PIPE,Wme=uu.ERR_STREAM_DESTROYED,Vme=uu.ERR_STREAM_NULL_VALUES,Gme=uu.ERR_STREAM_WRITE_AFTER_END,Kme=uu.ERR_UNKNOWN_ENCODING,wf=eP.errorOrDestroy;ur()(Nt,JV);function zme(){}function gg(t,e,r){bf=bf||Mc(),t=t||{},typeof r!="boolean"&&(r=e instanceof bf),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Fme(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){tge(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 XV(this)}gg.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(gg.prototype,"buffer",{get:kme.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var W0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(W0=Function.prototype[Symbol.hasInstance],Object.defineProperty(Nt,Symbol.hasInstance,{value:function(e){return W0.call(this,e)?!0:this!==Nt?!1:e&&e._writableState instanceof gg}})):W0=function(e){return e instanceof this};function Nt(t){bf=bf||Mc();var e=this instanceof bf;if(!e&&!W0.call(Nt,this))return new Nt(t);this._writableState=new gg(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)),JV.call(this)}Nt.prototype.pipe=function(){wf(this,new qme)};function Xme(t,e){var r=new Gme;wf(t,r),process.nextTick(e,r)}function Jme(t,e,r,i){var n;return r===null?n=new Vme:typeof r!="string"&&!e.objectMode&&(n=new Bme("chunk",["string","Buffer"],r)),n?(wf(t,n),process.nextTick(i,n),!1):!0}Nt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Ome(t);return s&&!V0.isBuffer(t)&&(t=Mme(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=zme),i.ending?Xme(this,r):(s||Jme(this,i,t,r))&&(i.pendingcb++,n=Qme(this,i,s,t,e,r)),n};Nt.prototype.cork=function(){this._writableState.corked++};Nt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&YV(this,t))};Nt.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 Kme(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Nt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Yme(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=V0.from(e,r)),e}Object.defineProperty(Nt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Qme(t,e,r,i,n,s){if(!r){var o=Yme(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 ZD(t,e,!1,a,i,n,s);return u}function ZD(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Wme("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function Zme(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(mg,t,e),t._writableState.errorEmitted=!0,wf(t,i)):(n(i),t._writableState.errorEmitted=!0,wf(t,i),mg(t,e))}function ege(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function tge(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new jme;if(ege(r),e)Zme(t,r,i,e,n);else{var s=QV(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&YV(t,r),i?process.nextTick(zV,t,r,s,n):zV(t,r,s,n)}}function zV(t,e,r,i){r||rge(t,e),e.pendingcb--,i(),mg(t,e)}function rge(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function YV(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,ZD(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 XV(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,p=e.objectMode?1:u.length;if(ZD(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}Nt.prototype._write=function(t,e,r){r(new Ume("_write()"))};Nt.prototype._writev=null;Nt.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||sge(this,i,r),this};Object.defineProperty(Nt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function QV(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function ige(t,e){t._final(function(r){e.pendingcb--,r&&wf(t,r),e.prefinished=!0,t.emit("prefinish"),mg(t,e)})}function nge(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(ige,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function mg(t,e){var r=QV(e);if(r&&(nge(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 sge(t,e,r){e.ending=!0,mg(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function oge(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(Nt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Nt.prototype.destroy=eP.destroy;Nt.prototype._undestroy=eP.undestroy;Nt.prototype._destroy=function(t,e){e(t)}});var Mc=v((YOe,t4)=>{"use strict";var age=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t4.exports=zs;var e4=nP(),iP=tP();ur()(zs,e4);for(rP=age(iP.prototype),G0=0;G0<rP.length;G0++)K0=rP[G0],zs.prototype[K0]||(zs.prototype[K0]=iP.prototype[K0]);var rP,K0,G0;function zs(t){if(!(this instanceof zs))return new zs(t);e4.call(this,t),iP.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",uge)))}Object.defineProperty(zs.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(zs.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(zs.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function uge(){this._writableState.ended||process.nextTick(cge,this)}function cge(t){t.end()}Object.defineProperty(zs.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 n4=v((sP,i4)=>{var z0=require("buffer"),Xs=z0.Buffer;function r4(t,e){for(var r in t)e[r]=t[r]}Xs.from&&Xs.alloc&&Xs.allocUnsafe&&Xs.allocUnsafeSlow?i4.exports=z0:(r4(z0,sP),sP.Buffer=Oc);function Oc(t,e,r){return Xs(t,e,r)}Oc.prototype=Object.create(Xs.prototype);r4(Xs,Oc);Oc.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Xs(t,e,r)};Oc.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Xs(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Oc.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Xs(t)};Oc.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return z0.SlowBuffer(t)}});var uP=v(o4=>{"use strict";var aP=n4().Buffer,s4=aP.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 lge(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 pge(t){var e=lge(t);if(typeof e!="string"&&(aP.isEncoding===s4||!s4(t)))throw new Error("Unknown encoding: "+t);return e||t}o4.StringDecoder=Hg;function Hg(t){this.encoding=pge(t);var e;switch(this.encoding){case"utf16le":this.text=Hge,this.end=yge,e=4;break;case"utf8":this.fillLast=hge,e=4;break;case"base64":this.text=vge,this.end=bge,e=3;break;default:this.write=wge,this.end=_ge;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=aP.allocUnsafe(e)}Hg.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||""};Hg.prototype.end=gge;Hg.prototype.text=mge;Hg.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 oP(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function fge(t,e,r){var i=e.length-1;if(i<r)return 0;var n=oP(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=oP(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=oP(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function dge(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 hge(t){var e=this.lastTotal-this.lastNeed,r=dge(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 mge(t,e){var r=fge(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 gge(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Hge(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 yge(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 vge(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 bge(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function wge(t){return t.toString(this.encoding)}function _ge(t){return t&&t.length?this.write(t):""}});var X0=v((ZOe,c4)=>{"use strict";var a4=au().codes.ERR_STREAM_PREMATURE_CLOSE;function Age(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 Ige(){}function Ege(t){return t.setHeader&&typeof t.abort=="function"}function u4(t,e,r){if(typeof e=="function")return u4(t,null,e);e||(e={}),r=Age(r||Ige);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(g){r.call(t,g)},p=function(){var g;if(i&&!u)return(!t._readableState||!t._readableState.ended)&&(g=new a4),r.call(t,g);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(g=new a4),r.call(t,g)},f=function(){t.req.on("finish",a)};return Ege(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)}}c4.exports=u4});var p4=v((eNe,l4)=>{"use strict";var J0;function cu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Sge=X0(),lu=Symbol("lastResolve"),Nc=Symbol("lastReject"),yg=Symbol("error"),Y0=Symbol("ended"),Fc=Symbol("lastPromise"),cP=Symbol("handlePromise"),Bc=Symbol("stream");function pu(t,e){return{value:t,done:e}}function Cge(t){var e=t[lu];if(e!==null){var r=t[Bc].read();r!==null&&(t[Fc]=null,t[lu]=null,t[Nc]=null,e(pu(r,!1)))}}function xge(t){process.nextTick(Cge,t)}function Dge(t,e){return function(r,i){t.then(function(){if(e[Y0]){r(pu(void 0,!0));return}e[cP](r,i)},i)}}var Pge=Object.getPrototypeOf(function(){}),Lge=Object.setPrototypeOf((J0={get stream(){return this[Bc]},next:function(){var e=this,r=this[yg];if(r!==null)return Promise.reject(r);if(this[Y0])return Promise.resolve(pu(void 0,!0));if(this[Bc].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[yg]?a(e[yg]):o(pu(void 0,!0))})});var i=this[Fc],n;if(i)n=new Promise(Dge(i,this));else{var s=this[Bc].read();if(s!==null)return Promise.resolve(pu(s,!1));n=new Promise(this[cP])}return this[Fc]=n,n}},cu(J0,Symbol.asyncIterator,function(){return this}),cu(J0,"return",function(){var e=this;return new Promise(function(r,i){e[Bc].destroy(null,function(n){if(n){i(n);return}r(pu(void 0,!0))})})}),J0),Pge),Tge=function(e){var r,i=Object.create(Lge,(r={},cu(r,Bc,{value:e,writable:!0}),cu(r,lu,{value:null,writable:!0}),cu(r,Nc,{value:null,writable:!0}),cu(r,yg,{value:null,writable:!0}),cu(r,Y0,{value:e._readableState.endEmitted,writable:!0}),cu(r,cP,{value:function(s,o){var a=i[Bc].read();a?(i[Fc]=null,i[lu]=null,i[Nc]=null,s(pu(a,!1))):(i[lu]=s,i[Nc]=o)},writable:!0}),r));return i[Fc]=null,Sge(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Nc];s!==null&&(i[Fc]=null,i[lu]=null,i[Nc]=null,s(n)),i[yg]=n;return}var o=i[lu];o!==null&&(i[Fc]=null,i[lu]=null,i[Nc]=null,o(pu(void 0,!0))),i[Y0]=!0}),e.on("readable",xge.bind(null,i)),i};l4.exports=Tge});var m4=v((tNe,h4)=>{"use strict";function f4(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 $ge(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(u){f4(s,i,n,o,a,"next",u)}function a(u){f4(s,i,n,o,a,"throw",u)}o(void 0)})}}function d4(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 kge(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?d4(Object(r),!0).forEach(function(i){Rge(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d4(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Rge(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Mge=au().codes.ERR_INVALID_ARG_TYPE;function Oge(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 Mge("iterable",["Iterable"],e);var n=new t(kge({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=$ge(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}h4.exports=Oge});var nP=v((iNe,E4)=>{"use strict";E4.exports=Ue;var _f;Ue.ReadableState=v4;var rNe=require("events").EventEmitter,y4=function(e,r){return e.listeners(r).length},bg=zD(),Q0=require("buffer").Buffer,Nge=global.Uint8Array||function(){};function Fge(t){return Q0.from(t)}function Bge(t){return Q0.isBuffer(t)||t instanceof Nge}var lP=require("util"),De;lP&&lP.debuglog?De=lP.debuglog("stream"):De=function(){};var Uge=UV(),HP=YD(),jge=QD(),qge=jge.getHighWaterMark,Z0=au().codes,Wge=Z0.ERR_INVALID_ARG_TYPE,Vge=Z0.ERR_STREAM_PUSH_AFTER_EOF,Gge=Z0.ERR_METHOD_NOT_IMPLEMENTED,Kge=Z0.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Af,pP,fP;ur()(Ue,bg);var vg=HP.errorOrDestroy,dP=["error","close","destroy","pause","resume"];function zge(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 v4(t,e,r){_f=_f||Mc(),t=t||{},typeof r!="boolean"&&(r=e instanceof _f),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=qge(this,t,"readableHighWaterMark",r),this.buffer=new Uge,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&&(Af||(Af=uP().StringDecoder),this.decoder=new Af(t.encoding),this.encoding=t.encoding)}function Ue(t){if(_f=_f||Mc(),!(this instanceof Ue))return new Ue(t);var e=this instanceof _f;this._readableState=new v4(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),bg.call(this)}Object.defineProperty(Ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Ue.prototype.destroy=HP.destroy;Ue.prototype._undestroy=HP.undestroy;Ue.prototype._destroy=function(t,e){e(t)};Ue.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=Q0.from(t,e),e=""),i=!0),b4(this,t,e,!1,i)};Ue.prototype.unshift=function(t){return b4(this,t,null,!0,!1)};function b4(t,e,r,i,n){De("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Yge(t,s);else{var o;if(n||(o=Xge(s,e)),o)vg(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Q0.prototype&&(e=Fge(e)),i)s.endEmitted?vg(t,new Kge):hP(t,s,e,!0);else if(s.ended)vg(t,new Vge);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?hP(t,s,e,!1):gP(t,s)):hP(t,s,e,!1)}else i||(s.reading=!1,gP(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function hP(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&&ew(t)),gP(t,e)}function Xge(t,e){var r;return!Bge(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Wge("chunk",["string","Buffer","Uint8Array"],e)),r}Ue.prototype.isPaused=function(){return this._readableState.flowing===!1};Ue.prototype.setEncoding=function(t){Af||(Af=uP().StringDecoder);var e=new Af(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 g4=1073741824;function Jge(t){return t>=g4?t=g4:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function H4(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=Jge(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Ue.prototype.read=function(t){De("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 De("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?mP(this):ew(this),null;if(t=H4(t,e),t===0&&e.ended)return e.length===0&&mP(this),null;var i=e.needReadable;De("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,De("length less than watermark",i)),e.ended||e.reading?(i=!1,De("reading or ended",i)):i&&(De("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=H4(r,e)));var n;return t>0?n=A4(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&&mP(this)),n!==null&&this.emit("data",n),n};function Yge(t,e){if(De("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?ew(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,w4(t)))}}function ew(t){var e=t._readableState;De("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(De("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(w4,t))}function w4(t){var e=t._readableState;De("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,yP(t)}function gP(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Qge,t,e))}function Qge(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(De("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Ue.prototype._read=function(t){vg(this,new Gge("_read()"))};Ue.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,De("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:H;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(b,w){De("onunpipe"),b===r&&w&&w.hasUnpiped===!1&&(w.hasUnpiped=!0,l())}function a(){De("onend"),t.end()}var u=Zge(r);t.on("drain",u);var c=!1;function l(){De("cleanup"),t.removeListener("close",m),t.removeListener("finish",g),t.removeListener("drain",u),t.removeListener("error",f),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",H),r.removeListener("data",p),c=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",p);function p(b){De("ondata");var w=t.write(b);De("dest.write",w),w===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&I4(i.pipes,t)!==-1)&&!c&&(De("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function f(b){De("onerror",b),H(),t.removeListener("error",f),y4(t,"error")===0&&vg(t,b)}zge(t,"error",f);function m(){t.removeListener("finish",g),H()}t.once("close",m);function g(){De("onfinish"),t.removeListener("close",m),H()}t.once("finish",g);function H(){De("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(De("pipe resume"),r.resume()),t};function Zge(t){return function(){var r=t._readableState;De("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&y4(t,"data")&&(r.flowing=!0,yP(t))}}Ue.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=I4(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)};Ue.prototype.on=function(t,e){var r=bg.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,De("on readable",i.length,i.reading),i.length?ew(this):i.reading||process.nextTick(eHe,this)),r};Ue.prototype.addListener=Ue.prototype.on;Ue.prototype.removeListener=function(t,e){var r=bg.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(_4,this),r};Ue.prototype.removeAllListeners=function(t){var e=bg.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(_4,this),e};function _4(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 eHe(t){De("readable nexttick read 0"),t.read(0)}Ue.prototype.resume=function(){var t=this._readableState;return t.flowing||(De("resume"),t.flowing=!t.readableListening,tHe(this,t)),t.paused=!1,this};function tHe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(rHe,t,e))}function rHe(t,e){De("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),yP(t),e.flowing&&!e.reading&&t.read(0)}Ue.prototype.pause=function(){return De("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(De("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function yP(t){var e=t._readableState;for(De("flow",e.flowing);e.flowing&&t.read()!==null;);}Ue.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(De("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(De("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<dP.length;s++)t.on(dP[s],this.emit.bind(this,dP[s]));return this._read=function(o){De("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(Ue.prototype[Symbol.asyncIterator]=function(){return pP===void 0&&(pP=p4()),pP(this)});Object.defineProperty(Ue.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Ue.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Ue.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Ue._fromList=A4;Object.defineProperty(Ue.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function A4(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 mP(t){var e=t._readableState;De("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(iHe,e,t))}function iHe(t,e){if(De("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"&&(Ue.from=function(t,e){return fP===void 0&&(fP=m4()),fP(Ue,t,e)});function I4(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var vP=v((nNe,C4)=>{"use strict";C4.exports=No;var tw=au().codes,nHe=tw.ERR_METHOD_NOT_IMPLEMENTED,sHe=tw.ERR_MULTIPLE_CALLBACK,oHe=tw.ERR_TRANSFORM_ALREADY_TRANSFORMING,aHe=tw.ERR_TRANSFORM_WITH_LENGTH_0,rw=Mc();ur()(No,rw);function uHe(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new sHe);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 No(t){if(!(this instanceof No))return new No(t);rw.call(this,t),this._transformState={afterTransform:uHe.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",cHe)}function cHe(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){S4(t,e,r)}):S4(this,null,null)}No.prototype.push=function(t,e){return this._transformState.needTransform=!1,rw.prototype.push.call(this,t,e)};No.prototype._transform=function(t,e,r){r(new nHe("_transform()"))};No.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)}};No.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};No.prototype._destroy=function(t,e){rw.prototype._destroy.call(this,t,function(r){e(r)})};function S4(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new aHe;if(t._transformState.transforming)throw new oHe;return t.push(null)}});var P4=v((sNe,D4)=>{"use strict";D4.exports=wg;var x4=vP();ur()(wg,x4);function wg(t){if(!(this instanceof wg))return new wg(t);x4.call(this,t)}wg.prototype._transform=function(t,e,r){r(null,t)}});var R4=v((oNe,k4)=>{"use strict";var bP;function lHe(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var $4=au().codes,pHe=$4.ERR_MISSING_ARGS,fHe=$4.ERR_STREAM_DESTROYED;function L4(t){if(t)throw t}function dHe(t){return t.setHeader&&typeof t.abort=="function"}function hHe(t,e,r,i){i=lHe(i);var n=!1;t.on("close",function(){n=!0}),bP===void 0&&(bP=X0()),bP(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,dHe(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new fHe("pipe"))}}}function T4(t){t()}function mHe(t,e){return t.pipe(e)}function gHe(t){return!t.length||typeof t[t.length-1]!="function"?L4:t.pop()}function HHe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=gHe(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new pHe("streams");var n,s=e.map(function(o,a){var u=a<e.length-1,c=a>0;return hHe(o,u,c,function(l){n||(n=l),l&&s.forEach(T4),!u&&(s.forEach(T4),i(n))})});return e.reduce(mHe)}k4.exports=HHe});var wP=v((vn,Ag)=>{var _g=require("stream");process.env.READABLE_STREAM==="disable"&&_g?(Ag.exports=_g.Readable,Object.assign(Ag.exports,_g),Ag.exports.Stream=_g):(vn=Ag.exports=nP(),vn.Stream=_g||vn,vn.Readable=vn,vn.Writable=tP(),vn.Duplex=Mc(),vn.Transform=vP(),vn.PassThrough=P4(),vn.finished=X0(),vn.pipeline=R4())});var O4=v((aNe,M4)=>{M4.exports=yHe;function yHe(t){var e=t._readableState;return e?e.objectMode?t.read():t.read(vHe(e)):null}function vHe(t){return t.buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length}});var j4=v((uNe,U4)=>{var iw=wP(),N4=jb(),bHe=ur(),wHe=O4(),F4=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),_P=function(t,e){t._corked?t.once("uncork",e):e()},_He=function(t,e){t._autoDestroy&&t.destroy(e)},B4=function(t,e){return function(r){r?_He(t,r.message==="premature close"?null:r):e&&!t._ended&&t.end()}},AHe=function(t,e){if(!t||t._writableState&&t._writableState.finished)return e();if(t._writableState)return t.end(e);t.end(),e()},IHe=function(){},EHe=function(t){return new iw.Readable({objectMode:!0,highWaterMark:16}).wrap(t)},Cr=function(t,e,r){if(!(this instanceof Cr))return new Cr(t,e,r);iw.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)};bHe(Cr,iw.Duplex);Cr.obj=function(t,e,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new Cr(t,e,r)};Cr.prototype.cork=function(){++this._corked===1&&this.emit("cork")};Cr.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")};Cr.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=N4(t,{writable:!0,readable:!1},B4(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()};Cr.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=N4(t,{writable:!1,readable:!0},B4(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:EHe(t),this._readable2.on("readable",i),this._readable2.on("end",n),this._unread=s,this._forward()};Cr.prototype._read=function(){this._drained=!0,this._forward()};Cr.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var t;this._drained&&(t=wHe(this._readable2))!==null;)this.destroyed||(this._drained=this.push(t));this._forwarding=!1}};Cr.prototype.destroy=function(t,e){if(e||(e=IHe),this.destroyed)return e(null);this.destroyed=!0;var r=this;process.nextTick(function(){r._destroy(t),e(null)})};Cr.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")};Cr.prototype._write=function(t,e,r){if(!this.destroyed){if(this._corked)return _P(this,this._write.bind(this,t,e,r));if(t===F4)return this._finish(r);if(!this._writable)return r();this._writable.write(t)===!1?this._ondrain=r:this.destroyed||r()}};Cr.prototype._finish=function(t){var e=this;this.emit("preend"),_P(this,function(){AHe(e._forwardEnd&&e._writable,function(){e._writableState.prefinished===!1&&(e._writableState.prefinished=!0),e.emit("prefinish"),_P(e,t)})})};Cr.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(F4),iw.Writable.prototype.end.call(this,r))};U4.exports=Cr});var V4=v((cNe,nw)=>{var SHe=MV(),CHe=ur(),q4=j4(),W4=function(t){return t.length?Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t):[]},AP=function(t){var e=function(){var r=W4(arguments);if(!(this instanceof e))return new e(r);q4.call(this,null,null,t),r.length&&this.setPipeline(r)};return CHe(e,q4),e.prototype.setPipeline=function(){var r=W4(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()}),SHe(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};nw.exports=AP({autoDestroy:!1,destroy:!1});nw.exports.obj=AP({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});nw.exports.ctor=AP});var IP=v((lNe,G4)=>{"use strict";G4.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 EP=v((pNe,e5)=>{"use strict";var sw=Object.prototype.hasOwnProperty,Z4=Object.prototype.toString,K4=Object.defineProperty,z4=Object.getOwnPropertyDescriptor,X4=function(e){return typeof Array.isArray=="function"?Array.isArray(e):Z4.call(e)==="[object Array]"},J4=function(e){if(!e||Z4.call(e)!=="[object Object]")return!1;var r=sw.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&sw.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;var n;for(n in e);return typeof n>"u"||sw.call(e,n)},Y4=function(e,r){K4&&r.name==="__proto__"?K4(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},Q4=function(e,r){if(r==="__proto__")if(sw.call(e,r)){if(z4)return z4(e,r).value}else return;return e[r]};e5.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=Q4(a,r),n=Q4(e,r),a!==n&&(l&&n&&(J4(n)||(s=X4(n)))?(s?(s=!1,o=i&&X4(i)?i:[]):o=i&&J4(i)?i:{},Y4(a,{name:r,newValue:t(l,o,n)})):typeof n<"u"&&Y4(a,{name:r,newValue:n}));return a}});var t5=v(SP=>{var Uc=require("path"),du=process.platform==="win32",fu=require("fs"),xHe=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function DHe(){var t;if(xHe){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 PHe(t){return typeof t=="function"?t:DHe()}var fNe=Uc.normalize;du?Fo=/(.*?)(?:[\/\\]+|$)/g:Fo=/(.*?)(?:[\/]+|$)/g;var Fo;du?Ig=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:Ig=/^[\/]*/;var Ig;SP.realpathSync=function(e,r){if(e=Uc.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=Ig.exec(e);o=b[0].length,a=b[0],u=b[0],c="",du&&!s[u]&&(fu.lstatSync(u),s[u]=!0)}for(;o<e.length;){Fo.lastIndex=o;var p=Fo.exec(e);if(c=a,a+=p[0],u=c+p[1],o=Fo.lastIndex,!(s[u]||r&&r[u]===u)){var f;if(r&&Object.prototype.hasOwnProperty.call(r,u))f=r[u];else{var m=fu.lstatSync(u);if(!m.isSymbolicLink()){s[u]=!0,r&&(r[u]=u);continue}var g=null;if(!du){var H=m.dev.toString(32)+":"+m.ino.toString(32);n.hasOwnProperty(H)&&(g=n[H])}g===null&&(fu.statSync(u),g=fu.readlinkSync(u)),f=Uc.resolve(c,g),r&&(r[u]=f),du||(n[H]=g)}e=Uc.resolve(f,e.slice(o)),l()}}return r&&(r[i]=e),e};SP.realpath=function(e,r,i){if(typeof i!="function"&&(i=PHe(r),r=null),e=Uc.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=Ig.exec(e);a=b[0].length,u=b[0],c=b[0],l="",du&&!o[c]?fu.lstat(c,function(w){if(w)return i(w);o[c]=!0,f()}):process.nextTick(f)}function f(){if(a>=e.length)return r&&(r[n]=e),i(null,e);Fo.lastIndex=a;var b=Fo.exec(e);return l=u,u+=b[0],c=l+b[1],a=Fo.lastIndex,o[c]||r&&r[c]===c?process.nextTick(f):r&&Object.prototype.hasOwnProperty.call(r,c)?H(r[c]):fu.lstat(c,m)}function m(b,w){if(b)return i(b);if(!w.isSymbolicLink())return o[c]=!0,r&&(r[c]=c),process.nextTick(f);if(!du){var k=w.dev.toString(32)+":"+w.ino.toString(32);if(s.hasOwnProperty(k))return g(null,s[k],c)}fu.stat(c,function(U){if(U)return i(U);fu.readlink(c,function(x,L){du||(s[k]=L),g(x,L)})})}function g(b,w,k){if(b)return i(b);var U=Uc.resolve(l,w);r&&(r[k]=U),H(U)}function H(b){e=Uc.resolve(b,e.slice(a)),p()}}});var PP=v((hNe,s5)=>{s5.exports=hu;hu.realpath=hu;hu.sync=DP;hu.realpathSync=DP;hu.monkeypatch=THe;hu.unmonkeypatch=$He;var If=require("fs"),CP=If.realpath,xP=If.realpathSync,LHe=process.version,r5=/^v[0-5]\./.test(LHe),i5=t5();function n5(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function hu(t,e,r){if(r5)return CP(t,e,r);typeof e=="function"&&(r=e,e=null),CP(t,e,function(i,n){n5(i)?i5.realpath(t,e,r):r(i,n)})}function DP(t,e){if(r5)return xP(t,e);try{return xP(t,e)}catch(r){if(n5(r))return i5.realpathSync(t,e);throw r}}function THe(){If.realpath=hu,If.realpathSync=DP}function $He(){If.realpath=CP,If.realpathSync=xP}});var a5=v((mNe,o5)=>{o5.exports=function(t,e){for(var r=[],i=0;i<t.length;i++){var n=e(t[i],i);kHe(n)?r.push.apply(r,n):r.push(n)}return r};var kHe=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"}});var f5=v((gNe,p5)=>{"use strict";p5.exports=c5;function c5(t,e,r){t instanceof RegExp&&(t=u5(t,r)),e instanceof RegExp&&(e=u5(e,r));var i=l5(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 u5(t,e){var r=e.match(t);return r?r[0]:null}c5.range=l5;function l5(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 b5=v((HNe,v5)=>{var RHe=a5(),d5=f5();v5.exports=NHe;var h5="\0SLASH"+Math.random()+"\0",m5="\0OPEN"+Math.random()+"\0",TP="\0CLOSE"+Math.random()+"\0",g5="\0COMMA"+Math.random()+"\0",H5="\0PERIOD"+Math.random()+"\0";function LP(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function MHe(t){return t.split("\\\\").join(h5).split("\\{").join(m5).split("\\}").join(TP).split("\\,").join(g5).split("\\.").join(H5)}function OHe(t){return t.split(h5).join("\\").split(m5).join("{").split(TP).join("}").split(g5).join(",").split(H5).join(".")}function y5(t){if(!t)return[""];var e=[],r=d5("{","}",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=y5(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function NHe(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),Ef(MHe(t),!0).map(OHe)):[]}function FHe(t){return"{"+t+"}"}function BHe(t){return/^-?0\d/.test(t)}function UHe(t,e){return t<=e}function jHe(t,e){return t>=e}function Ef(t,e){var r=[],i=d5("{","}",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+TP+i.post,Ef(t)):[t];var u;if(o)u=i.body.split(/\.\./);else if(u=y5(i.body),u.length===1&&(u=Ef(u[0],!1).map(FHe),u.length===1)){var l=i.post.length?Ef(i.post,!1):[""];return l.map(function(E){return i.pre+u[0]+E})}var c=i.pre,l=i.post.length?Ef(i.post,!1):[""],p;if(o){var f=LP(u[0]),m=LP(u[1]),g=Math.max(u[0].length,u[1].length),H=u.length==3?Math.abs(LP(u[2])):1,b=UHe,w=m<f;w&&(H*=-1,b=jHe);var k=u.some(BHe);p=[];for(var U=f;b(U,m);U+=H){var x;if(s)x=String.fromCharCode(U),x==="\\"&&(x="");else if(x=String(U),k){var L=g-x.length;if(L>0){var q=new Array(L+1).join("0");U<0?x="-"+q+x.slice(1):x=q+x}}p.push(x)}}else p=RHe(u,function(O){return Ef(O,!1)});for(var j=0;j<p.length;j++)for(var F=0;F<l.length;F++){var T=c+p[j]+l[F];(!e||o||T)&&r.push(T)}return r}});var uw=v((yNe,E5)=>{E5.exports=Vi;Vi.Minimatch=xr;var Eg=function(){try{return require("path")}catch{}}()||{sep:"/"};Vi.sep=Eg.sep;var RP=Vi.GLOBSTAR=xr.GLOBSTAR={},qHe=b5(),w5={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},$P="[^/]",kP=$P+"*?",WHe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",VHe="(?:(?!(?:\\/|^)\\.).)*?",_5=GHe("().*{}+?[]^$\\!");function GHe(t){return t.split("").reduce(function(e,r){return e[r]=!0,e},{})}var A5=/\/+/;Vi.filter=KHe;function KHe(t,e){return e=e||{},function(r,i,n){return Vi(r,t,e)}}function mu(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}Vi.defaults=function(t){if(!t||typeof t!="object"||!Object.keys(t).length)return Vi;var e=Vi,r=function(n,s,o){return e(n,s,mu(t,o))};return r.Minimatch=function(n,s){return new e.Minimatch(n,mu(t,s))},r.Minimatch.defaults=function(n){return e.defaults(mu(t,n)).Minimatch},r.filter=function(n,s){return e.filter(n,mu(t,s))},r.defaults=function(n){return e.defaults(mu(t,n))},r.makeRe=function(n,s){return e.makeRe(n,mu(t,s))},r.braceExpand=function(n,s){return e.braceExpand(n,mu(t,s))},r.match=function(i,n,s){return e.match(i,n,mu(t,s))},r};xr.defaults=function(t){return Vi.defaults(t).Minimatch};function Vi(t,e,r){return aw(e),r||(r={}),!r.nocomment&&e.charAt(0)==="#"?!1:new xr(e,r).match(t)}function xr(t,e){if(!(this instanceof xr))return new xr(t,e);aw(t),e||(e={}),t=t.trim(),!e.allowWindowsEscape&&Eg.sep!=="/"&&(t=t.split(Eg.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()}xr.prototype.debug=function(){};xr.prototype.make=zHe;function zHe(){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(A5)}),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}xr.prototype.parseNegate=XHe;function XHe(){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}}Vi.braceExpand=function(t,e){return I5(t,e)};xr.prototype.braceExpand=I5;function I5(t,e){return e||(this instanceof xr?e=this.options:e={}),t=typeof t>"u"?this.pattern:t,aw(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:qHe(t)}var JHe=1024*64,aw=function(t){if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>JHe)throw new TypeError("pattern is too long")};xr.prototype.parse=YHe;var ow={};function YHe(t,e){aw(t);var r=this.options;if(t==="**")if(r.noglobstar)t="*";else return RP;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}(?:$|\\/))":"(?!\\.)",m=this;function g(){if(u){switch(u){case"*":i+=kP,n=!0;break;case"?":i+=$P,n=!0;break;default:i+="\\"+u;break}m.debug("clearStateChar %j %j",u,i),u=!1}}for(var H=0,b=t.length,w;H<b&&(w=t.charAt(H));H++){if(this.debug("%s	%s %s %j",t,H,i,w),s&&_5[w]){i+="\\"+w,s=!1;continue}switch(w){case"/":return!1;case"\\":g(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s	%s %s %j <-- stateChar",t,H,i,w),c){this.debug("  in class"),w==="!"&&H===p+1&&(w="^"),i+=w;continue}m.debug("call clearStateChar %j",u),g(),u=w,r.noext&&g();continue;case"(":if(c){i+="(";continue}if(!u){i+="\\(";continue}o.push({type:u,start:H-1,reStart:i.length,open:w5[u].open,close:w5[u].close}),i+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,i),u=!1;continue;case")":if(c||!o.length){i+="\\)";continue}g(),n=!0;var k=o.pop();i+=k.close,k.type==="!"&&a.push(k),k.reEnd=i.length;continue;case"|":if(c||!o.length||s){i+="\\|",s=!1;continue}g(),i+="|";continue;case"[":if(g(),c){i+="\\"+w;continue}c=!0,p=H,l=i.length,i+=w;continue;case"]":if(H===p+1||!c){i+="\\"+w,s=!1;continue}var U=t.substring(p+1,H);try{RegExp("["+U+"]")}catch{var x=this.parse(U,ow);i=i.substr(0,l)+"\\["+x[0]+"\\]",n=n||x[1],c=!1;continue}n=!0,c=!1,i+=w;continue;default:g(),s?s=!1:_5[w]&&!(w==="^"&&c)&&(i+="\\"),i+=w}}for(c&&(U=t.substr(p+1),x=this.parse(U,ow),i=i.substr(0,l)+"\\["+x[0],n=n||x[1]),k=o.pop();k;k=o.pop()){var L=i.slice(k.reStart+k.open.length);this.debug("setting tail",i,k),L=L.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(J,te,ce){return ce||(ce="\\"),te+te+ce+"|"}),this.debug(`tail=%j
   %s`,L,L,k,i);var q=k.type==="*"?kP:k.type==="?"?$P:"\\"+k.type;n=!0,i=i.slice(0,k.reStart)+q+"\\("+L}g(),s&&(i+="\\\\");var j=!1;switch(i.charAt(0)){case"[":case".":case"(":j=!0}for(var F=a.length-1;F>-1;F--){var T=a[F],O=i.slice(0,T.reStart),E=i.slice(T.reStart,T.reEnd-8),M=i.slice(T.reEnd-8,T.reEnd),N=i.slice(T.reEnd);M+=N;var z=O.split("(").length-1,D=N;for(H=0;H<z;H++)D=D.replace(/\)[+*?]?/,"");N=D;var P="";N===""&&e!==ow&&(P="$");var ee=O+E+N+P+M;i=ee}if(i!==""&&n&&(i="(?=.)"+i),j&&(i=f+i),e===ow)return[i,n];if(!n)return ZHe(t);var re=r.nocase?"i":"";try{var ie=new RegExp("^"+i+"$",re)}catch{return new RegExp("$.")}return ie._glob=t,ie._src=i,ie}Vi.makeRe=function(t,e){return new xr(t,e||{}).makeRe()};xr.prototype.makeRe=QHe;function QHe(){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?kP:e.dot?WHe:VHe,i=e.nocase?"i":"",n=t.map(function(s){return s.map(function(o){return o===RP?r:typeof o=="string"?eye(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}Vi.match=function(t,e,r){r=r||{};var i=new xr(e,r);return t=t.filter(function(n){return i.match(n)}),i.options.nonull&&!t.length&&t.push(e),t};xr.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;Eg.sep!=="/"&&(e=e.split(Eg.sep).join("/")),e=e.split(A5),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};xr.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===RP){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 m;if(typeof u=="string"?(m=c===u,this.debug("string match",u,c,m)):(m=c.match(u),this.debug("pattern match",u,c,m)),!m)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 ZHe(t){return t.replace(/\\(.)/g,"$1")}function eye(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var lw=v((vNe,cw)=>{"use strict";function S5(t){return t.charAt(0)==="/"}function C5(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)}cw.exports=process.platform==="win32"?C5:S5;cw.exports.posix=S5;cw.exports.win32=C5});var OP=v(gu=>{gu.setopts=oye;gu.ownProp=x5;gu.makeAbs=Sg;gu.finish=aye;gu.mark=uye;gu.isIgnored=P5;gu.childrenIgnored=cye;function x5(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var tye=require("fs"),Sf=require("path"),rye=uw(),D5=lw(),MP=rye.Minimatch;function iye(t,e){return t.localeCompare(e,"en")}function nye(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]),t.ignore.length&&(t.ignore=t.ignore.map(sye))}function sye(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new MP(r,{dot:!0})}return{matcher:new MP(t,{dot:!0}),gmatcher:e}}function oye(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||tye,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),nye(t,r),t.changedCwd=!1;var i=process.cwd();x5(r,"cwd")?(t.cwd=Sf.resolve(r.cwd),t.changedCwd=t.cwd!==i):t.cwd=i,t.root=r.root||Sf.resolve(t.cwd,"/"),t.root=Sf.resolve(t.root),process.platform==="win32"&&(t.root=t.root.replace(/\\/g,"/")),t.cwdAbs=D5(t.cwd)?t.cwd:Sg(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 MP(e,r),t.options=t.minimatch.options}function aye(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(iye)),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[Sg(t,u)];return c&&l&&(c=l!=="DIR"&&!Array.isArray(l)),c}))}t.ignore.length&&(r=r.filter(function(u){return!P5(t,u)})),t.found=r}function uye(t,e){var r=Sg(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=Sg(t,n);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return n}function Sg(t,e){var r=e;return e.charAt(0)==="/"?r=Sf.join(t.root,e):D5(e)||e===""?r=e:t.changedCwd?r=Sf.resolve(t.cwd,e):r=Sf.resolve(e),process.platform==="win32"&&(r=r.replace(/\\/g,"/")),r}function P5(t,e){return t.ignore.length?t.ignore.some(function(r){return r.matcher.match(e)||!!(r.gmatcher&&r.gmatcher.match(e))}):!1}function cye(t,e){return t.ignore.length?t.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(e))}):!1}});var R5=v((INe,k5)=>{k5.exports=$5;$5.GlobSync=cr;var lye=PP(),L5=uw(),wNe=L5.Minimatch,_Ne=BP().Glob,ANe=require("util"),NP=require("path"),T5=require("assert"),pw=lw(),jc=OP(),pye=jc.setopts,FP=jc.ownProp,fye=jc.childrenIgnored,dye=jc.isIgnored;function $5(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 cr(t,e).found}function cr(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 cr))return new cr(t,e);if(pye(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()}cr.prototype._finish=function(){if(T5(this instanceof cr),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=lye.realpathSync(n,t.realpathCache);i[s]=!0}catch(o){if(o.syscall==="stat")i[t._makeAbs(n)]=!0;else throw o}})}jc.finish(this)};cr.prototype._process=function(t,e,r){T5(this instanceof cr);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=".":((pw(n)||pw(t.join("/")))&&(!n||!pw(n))&&(n="/"+n),o=n);var a=this._makeAbs(o);if(!fye(this,o)){var u=s[0]===L5.GLOBSTAR;u?this._processGlobStar(n,o,a,s,e,r):this._processReaddir(n,o,a,s,e,r)}};cr.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 m=o[f];if(m.charAt(0)!=="."||l){var g;u&&!t?g=!m.match(a):g=m.match(a),g&&p.push(m)}}var H=p.length;if(H!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var f=0;f<H;f++){var m=p[f];t&&(t.slice(-1)!=="/"?m=t+"/"+m:m=t+m),m.charAt(0)==="/"&&!this.nomount&&(m=NP.join(this.root,m)),this._emitMatch(n,m)}return}i.shift();for(var f=0;f<H;f++){var m=p[f],b;t?b=[t,m]:b=[m],this._process(b.concat(i),n,s)}}}};cr.prototype._emitMatch=function(t,e){if(!dye(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)}}};cr.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};cr.prototype._readdir=function(t,e){var r;if(e&&!FP(this.symlinks,t))return this._readdirInGlobStar(t);if(FP(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}};cr.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};cr.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}};cr.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 m=o[f];if(!(m.charAt(0)==="."&&!this.dot)){var g=u.concat(o[f],a);this._process(g,n,!0);var H=u.concat(o[f],i);this._process(H,n,!0)}}}};cr.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!r){if(t&&pw(t)&&!this.nomount){var i=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=NP.join(this.root,t):(t=NP.resolve(this.root,t),i&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}};cr.prototype._stat=function(t){var e=this._makeAbs(t),r=t.slice(-1)==="/";if(t.length>this.maxLength)return!1;if(!this.stat&&FP(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};cr.prototype._mark=function(t){return jc.mark(this,t)};cr.prototype._makeAbs=function(t){return jc.makeAbs(this,t)}});var O5=v((ENe,M5)=>{var hye=UC(),Cg=Object.create(null),mye=Xp();M5.exports=hye(gye);function gye(t,e){return Cg[t]?(Cg[t].push(e),null):(Cg[t]=[e],Hye(t))}function Hye(t){return mye(function e(){var r=Cg[t],i=r.length,n=yye(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 Cg[t]}})}function yye(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i]=t[i];return r}});var BP=v((xNe,F5)=>{F5.exports=qc;var vye=PP(),N5=uw(),SNe=N5.Minimatch,bye=ur(),wye=require("events").EventEmitter,UP=require("path"),jP=require("assert"),xg=lw(),WP=R5(),Wc=OP(),_ye=Wc.setopts,qP=Wc.ownProp,VP=O5(),CNe=require("util"),Aye=Wc.childrenIgnored,Iye=Wc.isIgnored,Eye=Xp();function qc(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 WP(t,e)}return new et(t,e,r)}qc.sync=WP;var Sye=qc.GlobSync=WP.GlobSync;qc.glob=qc;function Cye(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}qc.hasMagic=function(t,e){var r=Cye({},e);r.noprocess=!0;var i=new et(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};qc.Glob=et;bye(et,wye);function et(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 Sye(t,e)}if(!(this instanceof et))return new et(t,e,r);_ye(this,t,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof r=="function"&&(r=Eye(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())}}et.prototype._finish=function(){if(jP(this instanceof et),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();Wc.finish(this),this.emit("end",this.found)}};et.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()}};et.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),vye.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())})})};et.prototype._mark=function(t){return Wc.mark(this,t)};et.prototype._makeAbs=function(t){return Wc.makeAbs(this,t)};et.prototype.abort=function(){this.aborted=!0,this.emit("abort")};et.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};et.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])}}}};et.prototype._process=function(t,e,r,i){if(jP(this instanceof et),jP(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=".":((xg(s)||xg(t.join("/")))&&(!s||!xg(s))&&(s="/"+s),a=s);var u=this._makeAbs(a);if(Aye(this,a))return i();var c=o[0]===N5.GLOBSTAR;c?this._processGlobStar(s,a,u,o,e,r,i):this._processReaddir(s,a,u,o,e,r,i)}};et.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)})};et.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=[],m=0;m<o.length;m++){var g=o[m];if(g.charAt(0)!=="."||p){var H;c&&!t?H=!g.match(u):H=g.match(u),H&&f.push(g)}}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 m=0;m<b;m++){var g=f[m];t&&(t!=="/"?g=t+"/"+g:g=t+g),g.charAt(0)==="/"&&!this.nomount&&(g=UP.join(this.root,g)),this._emitMatch(n,g)}return a()}i.shift();for(var m=0;m<b;m++){var g=f[m],w;t&&(t!=="/"?g=t+"/"+g:g=t+g),this._process([g].concat(i),n,s,a)}a()};et.prototype._emitMatch=function(t,e){if(!this.aborted&&!Iye(this,e)){if(this.paused){this._emitQueue.push([t,e]);return}var r=xg(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)}}};et.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=VP(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)}};et.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=VP("readdir\0"+t+"\0"+e,r),!!r)){if(e&&!qP(this.symlinks,t))return this._readdirInGlobStar(t,r);if(qP(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,xye(this,t,r))}};function xye(t,e,r){return function(i,n){i?t._readdirError(e,i,r):t._readdirEntries(e,n,r)}}et.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)}};et.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()}};et.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)})};et.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 m=0;m<f;m++){var g=o[m];if(!(g.charAt(0)==="."&&!this.dot)){var H=c.concat(o[m],u);this._process(H,n,!0,a);var b=c.concat(o[m],i);this._process(b,n,!0,a)}}a()};et.prototype._processSimple=function(t,e,r){var i=this;this._stat(t,function(n,s){i._processSimple2(t,e,n,s,r)})};et.prototype._processSimple2=function(t,e,r,i,n){if(this.matches[e]||(this.matches[e]=Object.create(null)),!i)return n();if(t&&xg(t)&&!this.nomount){var s=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=UP.join(this.root,t):(t=UP.resolve(this.root,t),s&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),n()};et.prototype._stat=function(t,e){var r=this._makeAbs(t),i=t.slice(-1)==="/";if(t.length>this.maxLength)return e();if(!this.stat&&qP(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=VP("stat\0"+r,l);c&&u.fs.lstat(r,c);function l(p,f){if(f&&f.isSymbolicLink())return u.fs.stat(r,function(m,g){m?u._stat2(t,r,null,f,e):u._stat2(t,r,m,g,e)});u._stat2(t,r,p,f,e)}};et.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 U5=v((DNe,B5)=>{B5.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 W5=v((PNe,q5)=>{var Dye=U5(),j5={"{":"}","(":")","[":"]"},Pye=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=j5[a];if(u){var c=t.indexOf(u,e);c!==-1&&(e=c+1)}if(t[e]==="!")return!0}else e++}return!1},Lye=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=j5[r];if(i){var n=t.indexOf(i,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1};q5.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(Dye(e))return!0;var i=Pye;return r&&r.strict===!1&&(i=Lye),i(e)}});var G5=v((LNe,V5)=>{"use strict";var Tye=W5(),$ye=require("path").posix.dirname,kye=require("os").platform()==="win32",fw="/",Rye=/\\/g,Mye=/\\([!*?|[\](){}])/g;V5.exports=function(e,r){var i=Object.assign({flipBackslashes:!0},r);i.flipBackslashes&&kye&&e.indexOf(fw)<0&&(e=e.replace(Rye,fw)),Oye(e)&&(e+=fw),e+="a";do e=$ye(e);while(Nye(e));return e.replace(Mye,"$1")};function Oye(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(fw)}function Nye(t){return/\([^()]+$/.test(t)||t[0]==="{"||t[0]==="["||/[^\\][{[]/.test(t)?!0:Tye(t)}});var z5=v((TNe,K5)=>{"use strict";K5.exports=function(){return/^[\\\/]{2,}[^\\\/]+[\\\/]+[^\\\/]+/}});var J5=v(($Ne,X5)=>{"use strict";var Fye=z5()();X5.exports=function(t){if(typeof t!="string")throw new TypeError("expected a string");return Fye.test(t)}});var Q5=v((kNe,Y5)=>{"use strict";var Bye=J5();Y5.exports=function(e){if(typeof e!="string")throw new TypeError("expected filepath to be a string");return!Bye(e)&&!/^([a-z]:)?[\\\/]/i.test(e)}});var Z5=v((GP,KP)=>{(function(t){GP&&typeof GP=="object"&&typeof KP<"u"?KP.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 t6=v((RNe,e6)=>{"use strict";var Uye=Q5(),jye=Z5();e6.exports=Dg;function Dg(t){if(typeof t!="string")throw new TypeError("isAbsolute expects a string.");return jye()?Dg.win32(t):Dg.posix(t)}Dg.posix=function(e){return e.charAt(0)==="/"};Dg.win32=function(e){return/[a-z]/i.test(e.charAt(0))&&e.charAt(1)===":"&&e.charAt(2)==="\\"||e.slice(0,2)==="\\\\"?!0:!Uye(e)}});var XP=v((MNe,s6)=>{"use strict";var r6=require("path"),qye=IP(),i6=t6();s6.exports=function(t,e){var r=e||{},i=r6.resolve(r.cwd?r.cwd:process.cwd());i=zP(i);var n=r.root;n&&(n=zP(n),(process.platform==="win32"||!i6(n))&&(n=zP(r6.resolve(n)))),t.slice(0,2)==="./"&&(t=t.slice(2)),t.length===1&&t==="."&&(t="");var s=t.slice(-1),o=qye(t);return t=o.pattern,n&&t.charAt(0)==="/"?t=n6(n,t):(!i6(t)||t.slice(0,1)==="\\")&&(t=n6(i,t)),s==="/"&&t.slice(-1)!=="/"&&(t+="/"),o.negated?"!"+t:t};function zP(t){return t.replace(/\\/g,"/")}function n6(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 a6=v((ONe,o6)=>{var Wye=process.platform==="win32";o6.exports=function(t){var e=t.length-1;if(e<2)return t;for(;Vye(t,e);)e--;return t.substr(0,e+1)};function Vye(t,e){var r=t[e];return e>0&&(r==="/"||Wye&&r==="\\")}});var l6=v((NNe,c6)=>{"use strict";var Gye=require("util").inherits,Kye=BP(),zye=EP(),u6=wP().Readable,Xye=G5(),JP=XP(),Jye=a6(),Yye="File not found with singular glob: ",Qye=" (if this was purposeful, use `allowEmpty` option)";function Zye(t,e){return Xye(JP(t,e))}function eve(t){var e=t.minimatch.set;return e.length!==1?!1:e[0].every(function(i){return typeof i=="string"})}function Cf(t,e,r){if(!(this instanceof Cf))return new Cf(t,e,r);var i=zye({},r);u6.call(this,{objectMode:!0,highWaterMark:i.highWaterMark||16}),delete i.highWaterMark;var n=this;function s(m){return JP(m,i)}var o=e.map(s);i.ignore=o;var a=i.cwd,u=i.allowEmpty||!1,c=i.base||Zye(t,i);t=JP(t,i),delete i.root;var l=new Kye.Glob(t,i);this._globber=l;var p=!1;l.on("match",function(m){p=!0;var g={cwd:a,base:c,path:Jye(m)};n.push(g)||l.pause()}),l.once("end",function(){if(u!==!0&&!p&&eve(l)){var m=new Error(Yye+t+Qye);return n.destroy(m)}n.push(null)});function f(m){n.destroy(m)}l.once("error",f)}Gye(Cf,u6);Cf.prototype._read=function(){this._globber.resume()};Cf.prototype.destroy=function(t){var e=this;this._globber.abort(),process.nextTick(function(){t&&e.emit("error",t),e.emit("close")})};c6.exports=Cf});var f6=v((FNe,p6)=>{"use strict";var tve=RW(),rve=$V(),ive=V4(),nve=IP(),sve=EP(),ove=l6();function ave(t,e){e||(e={});var r=sve({},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 m=nve(p),g=m.negated?s:n;g.push({index:f,glob:m.pattern})}if(n.length===0)throw new Error("Missing positive glob");var a=n.map(l),u=new tve(a),c=rve(r.uniqueBy);return ive.obj(u,c);function l(p){var f=s.filter(uve(p.index)).map(cve).concat(i);return new ove(p.glob,f,r)}}function uve(t){return function(e){return e.index>t}}function cve(t){return t.glob}p6.exports=ave});var nL=v((zFe,E6)=>{"use strict";var{Transform:hve}=require("stream"),{StringDecoder:mve}=require("string_decoder"),wu=Symbol("last"),vw=Symbol("decoder");function gve(t,e,r){let i;if(this.overflow){if(i=this[vw].write(t).split(this.matcher),i.length===1)return r();i.shift(),this.overflow=!1}else this[wu]+=this[vw].write(t),i=this[wu].split(this.matcher);this[wu]=i.pop();for(let n=0;n<i.length;n++)try{I6(this,this.mapper(i[n]))}catch(s){return r(s)}if(this.overflow=this[wu].length>this.maxLength,this.overflow&&!this.skipOverflow){r(new Error("maximum buffer reached"));return}r()}function Hve(t){if(this[wu]+=this[vw].end(),this[wu])try{I6(this,this.mapper(this[wu]))}catch(e){return t(e)}t()}function I6(t,e){e!==void 0&&t.push(e)}function A6(t){return t}function yve(t,e,r){switch(t=t||/\r?\n/,e=e||A6,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=A6)}r=Object.assign({},r),r.autoDestroy=!0,r.transform=gve,r.flush=Hve,r.readableObjectMode=!0;let i=new hve(r);return i[wu]="",i[vw]=new mve("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}E6.exports=yve});var z6,K6=Xz(()=>{z6="./w32appcontainertokens-XTRA77NA.node"});var J6=v((v3e,X6)=>{K6();try{X6.exports=require(z6)}catch{}});var Q6=v(Cw=>{"use strict";Object.defineProperty(Cw,"__esModule",{value:!0});Cw.getAppContainerProcessTokens=void 0;var Ive=require("path"),Y6,Eve=()=>{if(process.platform==="win32")return Y6??=J6(),Y6},Sve=t=>{var e;return(e=Eve())==null?void 0:e.getAppContainerProcessTokens().map(r=>(0,Ive.join)(r,t))};Cw.getAppContainerProcessTokens=Sve});var H9=v((gje,Nw)=>{var kve=require("fs"),g9=require("path"),Rve=require("os"),Mve=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Ove(t){let e={},r=t.toString();r=r.replace(/\r\n?/mg,`
`);let i;for(;(i=Mve.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 pL(t){console.log(`[dotenv][DEBUG] ${t}`)}function Nve(t){return t[0]==="~"?g9.join(Rve.homedir(),t.slice(1)):t}function Fve(t){let e=g9.resolve(process.cwd(),".env"),r="utf8",i=Boolean(t&&t.debug),n=Boolean(t&&t.override);t&&(t.path!=null&&(e=Nve(t.path)),t.encoding!=null&&(r=t.encoding));try{let s=Ow.parse(kve.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&&pL(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&&pL(`Failed to load ${e} ${s.message}`),{error:s}}}var Ow={config:Fve,parse:Ove};Nw.exports.config=Ow.config;Nw.exports.parse=Ow.parse;Nw.exports=Ow});var bL=v(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var t_=require("vscode"),id=class{constructor(e,r,i){this.extensionName=e,this.extensionVersion=r,this.targetPopulation=i}static trimVersionSuffix(e){let r=/\-[a-zA-Z0-9]+$/;return e.split(r)[0]}getFilterValue(e){switch(e){case Jo.ApplicationVersion:return id.trimVersionSuffix(t_.version);case Jo.Build:return t_.env.appName;case Jo.ClientId:return t_.env.machineId;case Jo.ExtensionName:return this.extensionName;case Jo.ExtensionVersion:return id.trimVersionSuffix(this.extensionVersion);case Jo.Language:return t_.env.language;case Jo.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){let e=new Map,r=Object.values(Jo);for(let i of r)e.set(i,this.getFilterValue(i));return e}};el.VSCodeFilterProvider=id;var Jo;(function(t){t.Market="X-MSEdge-Market",t.CorpNet="X-FD-Corpnet",t.ApplicationVersion="X-VSCode-AppVersion",t.Build="X-VSCode-Build",t.ClientId="X-MSEdge-ClientId",t.ExtensionName="X-VSCode-ExtensionName",t.ExtensionVersion="X-VSCode-ExtensionVersion",t.Language="X-VSCode-Language",t.TargetPopulation="X-VSCode-TargetPopulation"})(Jo=el.Filters||(el.Filters={}));var rbe;(function(t){t.Team="team",t.Internal="internal",t.Insiders="insider",t.Public="public"})(rbe=el.TargetPopulation||(el.TargetPopulation={}))});var eG=v(_L=>{"use strict";Object.defineProperty(_L,"__esModule",{value:!0});var wL=class{constructor(e){this.telemetry=e,this.isFetching=!1}async getFeatures(){if(this.isFetching&&this.fetchPromise)return this.fetchPromise;this.fetchPromise=this.fetch();let e=await this.fetchPromise;return this.isFetching=!1,this.fetchPromise=void 0,e}};_L.BaseFeatureProvider=wL});var tG=v(IL=>{"use strict";Object.defineProperty(IL,"__esModule",{value:!0});var ibe=eG(),AL=class extends ibe.BaseFeatureProvider{constructor(e,r){super(e),this.telemetry=e,this.filterProviders=r,this.cachedTelemetryEvents=[]}getFilters(){let e=new Map;for(let r of this.filterProviders){let i=r.getFilters();for(let n of i.keys()){let s=i.get(n);e.set(n,s)}}return e}PostEventToTelemetry(e){if(this.cachedTelemetryEvents.includes(e))return;let r=JSON.stringify(e);this.telemetry.postEvent("report-headers",new Map([["ABExp.headers",r]])),this.cachedTelemetryEvents.push(e)}};IL.FilteredFeatureProvider=AL});var rG=v(SL=>{"use strict";Object.defineProperty(SL,"__esModule",{value:!0});var nbe=tG(),EL=class extends nbe.FilteredFeatureProvider{constructor(e,r,i){super(r,i),this.httpClient=e,this.telemetry=r,this.filterProviders=i}async fetch(){let e=this.getFilters(),r={};for(let a of e.keys()){let u=e.get(a);r[a]=u}let i=await this.httpClient.get({headers:r});e.keys.length>0&&this.PostEventToTelemetry(r);let n=i.data,s=n.Configs,o=[];for(let a of s)if(a.Parameters)for(let u of Object.keys(a.Parameters)){let c=u+(a.Parameters[u]?"":"cf");o.includes(c)||o.push(c)}return{features:o,assignmentContext:n.AssignmentContext,configs:s}}};SL.TasApiFeatureProvider=EL});var CL=v((wVe,iG)=>{"use strict";iG.exports=function(e,r){return function(){for(var n=new Array(arguments.length),s=0;s<n.length;s++)n[s]=arguments[s];return e.apply(r,n)}}});var Gr=v((_Ve,aG)=>{"use strict";var sbe=CL(),Lu=Object.prototype.toString;function PL(t){return Array.isArray(t)}function xL(t){return typeof t>"u"}function obe(t){return t!==null&&!xL(t)&&t.constructor!==null&&!xL(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function nG(t){return Lu.call(t)==="[object ArrayBuffer]"}function abe(t){return Lu.call(t)==="[object FormData]"}function ube(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&nG(t.buffer),e}function cbe(t){return typeof t=="string"}function lbe(t){return typeof t=="number"}function sG(t){return t!==null&&typeof t=="object"}function r_(t){if(Lu.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function pbe(t){return Lu.call(t)==="[object Date]"}function fbe(t){return Lu.call(t)==="[object File]"}function dbe(t){return Lu.call(t)==="[object Blob]"}function oG(t){return Lu.call(t)==="[object Function]"}function hbe(t){return sG(t)&&oG(t.pipe)}function mbe(t){return Lu.call(t)==="[object URLSearchParams]"}function gbe(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Hbe(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function LL(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),PL(t))for(var r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.call(null,t[n],n,t)}function DL(){var t={};function e(n,s){r_(t[s])&&r_(n)?t[s]=DL(t[s],n):r_(n)?t[s]=DL({},n):PL(n)?t[s]=n.slice():t[s]=n}for(var r=0,i=arguments.length;r<i;r++)LL(arguments[r],e);return t}function ybe(t,e,r){return LL(e,function(n,s){r&&typeof n=="function"?t[s]=sbe(n,r):t[s]=n}),t}function vbe(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}aG.exports={isArray:PL,isArrayBuffer:nG,isBuffer:obe,isFormData:abe,isArrayBufferView:ube,isString:cbe,isNumber:lbe,isObject:sG,isPlainObject:r_,isUndefined:xL,isDate:pbe,isFile:fbe,isBlob:dbe,isFunction:oG,isStream:hbe,isURLSearchParams:mbe,isStandardBrowserEnv:Hbe,forEach:LL,merge:DL,extend:ybe,trim:gbe,stripBOM:vbe}});var i_=v((AVe,cG)=>{"use strict";var nd=Gr();function uG(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}cG.exports=function(e,r,i){if(!r)return e;var n;if(i)n=i(r);else if(nd.isURLSearchParams(r))n=r.toString();else{var s=[];nd.forEach(r,function(u,c){u===null||typeof u>"u"||(nd.isArray(u)?c=c+"[]":u=[u],nd.forEach(u,function(p){nd.isDate(p)?p=p.toISOString():nd.isObject(p)&&(p=JSON.stringify(p)),s.push(uG(c)+"="+uG(p))}))}),n=s.join("&")}if(n){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}});var pG=v((IVe,lG)=>{"use strict";var bbe=Gr();function n_(){this.handlers=[]}n_.prototype.use=function(e,r,i){return this.handlers.push({fulfilled:e,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1};n_.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};n_.prototype.forEach=function(e){bbe.forEach(this.handlers,function(i){i!==null&&e(i)})};lG.exports=n_});var dG=v((EVe,fG)=>{"use strict";var wbe=Gr();fG.exports=function(e,r){wbe.forEach(e,function(n,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(e[r]=n,delete e[s])})}});var s_=v((SVe,hG)=>{"use strict";hG.exports=function(e,r,i,n,s){return e.config=r,i&&(e.code=i),e.request=n,e.response=s,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}});var o_=v((CVe,mG)=>{"use strict";mG.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var a_=v((xVe,gG)=>{"use strict";var _be=s_();gG.exports=function(e,r,i,n,s){var o=new Error(e);return _be(o,r,i,n,s)}});var TL=v((DVe,HG)=>{"use strict";var Abe=a_();HG.exports=function(e,r,i){var n=i.config.validateStatus;!i.status||!n||n(i.status)?e(i):r(Abe("Request failed with status code "+i.status,i.config,null,i.request,i))}});var vG=v((PVe,yG)=>{"use strict";var u_=Gr();yG.exports=u_.isStandardBrowserEnv()?function(){return{write:function(r,i,n,s,o,a){var u=[];u.push(r+"="+encodeURIComponent(i)),u_.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),u_.isString(s)&&u.push("path="+s),u_.isString(o)&&u.push("domain="+o),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){var i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var wG=v((LVe,bG)=>{"use strict";bG.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}});var AG=v((TVe,_G)=>{"use strict";_G.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var $L=v(($Ve,IG)=>{"use strict";var Ibe=wG(),Ebe=AG();IG.exports=function(e,r){return e&&!Ibe(r)?Ebe(e,r):r}});var SG=v((kVe,EG)=>{"use strict";var kL=Gr(),Sbe=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];EG.exports=function(e){var r={},i,n,s;return e&&kL.forEach(e.split(`
`),function(a){if(s=a.indexOf(":"),i=kL.trim(a.substr(0,s)).toLowerCase(),n=kL.trim(a.substr(s+1)),i){if(r[i]&&Sbe.indexOf(i)>=0)return;i==="set-cookie"?r[i]=(r[i]?r[i]:[]).concat([n]):r[i]=r[i]?r[i]+", "+n:n}}),r}});var DG=v((RVe,xG)=>{"use strict";var CG=Gr();xG.exports=CG.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function n(s){var o=s;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=n(window.location.href),function(o){var a=CG.isString(o)?n(o):o;return a.protocol===i.protocol&&a.host===i.host}}():function(){return function(){return!0}}()});var sd=v((MVe,PG)=>{"use strict";function RL(t){this.message=t}RL.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};RL.prototype.__CANCEL__=!0;PG.exports=RL});var TG=v((OVe,LG)=>{"use strict";var c_=Gr(),Cbe=TL(),xbe=vG(),Dbe=i_(),Pbe=$L(),Lbe=SG(),Tbe=DG(),ML=a_(),$be=o_(),kbe=sd();LG.exports=function(e){return new Promise(function(i,n){var s=e.data,o=e.headers,a=e.responseType,u;function c(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}c_.isFormData(s)&&delete o["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(p+":"+f)}var m=Pbe(e.baseURL,e.url);l.open(e.method.toUpperCase(),Dbe(m,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function g(){if(l){var b="getAllResponseHeaders"in l?Lbe(l.getAllResponseHeaders()):null,w=!a||a==="text"||a==="json"?l.responseText:l.response,k={data:w,status:l.status,statusText:l.statusText,headers:b,config:e,request:l};Cbe(function(x){i(x),c()},function(x){n(x),c()},k),l=null}}if("onloadend"in l?l.onloadend=g:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(g)},l.onabort=function(){l&&(n(ML("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){n(ML("Network Error",e,null,l)),l=null},l.ontimeout=function(){var w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",k=e.transitional||$be;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(ML(w,e,k.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",l)),l=null},c_.isStandardBrowserEnv()){var H=(e.withCredentials||Tbe(m))&&e.xsrfCookieName?xbe.read(e.xsrfCookieName):void 0;H&&(o[e.xsrfHeaderName]=H)}"setRequestHeader"in l&&c_.forEach(o,function(w,k){typeof s>"u"&&k.toLowerCase()==="content-type"?delete o[k]:l.setRequestHeader(k,w)}),c_.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(u=function(b){l&&(n(!b||b&&b.type?new kbe("canceled"):b),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u))),s||(s=null),l.send(s)})}});var kG=v((NVe,$G)=>{var od=1e3,ad=od*60,ud=ad*60,tl=ud*24,Rbe=tl*7,Mbe=tl*365.25;$G.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Obe(t);if(r==="number"&&isFinite(t))return e.long?Fbe(t):Nbe(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Obe(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*Mbe;case"weeks":case"week":case"w":return r*Rbe;case"days":case"day":case"d":return r*tl;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ud;case"minutes":case"minute":case"mins":case"min":case"m":return r*ad;case"seconds":case"second":case"secs":case"sec":case"s":return r*od;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Nbe(t){var e=Math.abs(t);return e>=tl?Math.round(t/tl)+"d":e>=ud?Math.round(t/ud)+"h":e>=ad?Math.round(t/ad)+"m":e>=od?Math.round(t/od)+"s":t+"ms"}function Fbe(t){var e=Math.abs(t);return e>=tl?l_(t,e,tl,"day"):e>=ud?l_(t,e,ud,"hour"):e>=ad?l_(t,e,ad,"minute"):e>=od?l_(t,e,od,"second"):t+" ms"}function l_(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var OL=v((FVe,RG)=>{function Bbe(t){r.debug=r,r.default=r,r.coerce=u,r.disable=s,r.enable=n,r.enabled=o,r.humanize=kG(),r.destroy=c,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let p=0;for(let f=0;f<l.length;f++)p=(p<<5)-p+l.charCodeAt(f),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(l){let p,f=null,m,g;function H(...b){if(!H.enabled)return;let w=H,k=Number(new Date),U=k-(p||k);w.diff=U,w.prev=p,w.curr=k,p=k,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let x=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(q,j)=>{if(q==="%%")return"%";x++;let F=r.formatters[j];if(typeof F=="function"){let T=b[x];q=F.call(w,T),b.splice(x,1),x--}return q}),r.formatArgs.call(w,b),(w.log||r.log).apply(w,b)}return H.namespace=l,H.useColors=r.useColors(),H.color=r.selectColor(l),H.extend=i,H.destroy=r.destroy,Object.defineProperty(H,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==r.namespaces&&(m=r.namespaces,g=r.enabled(l)),g),set:b=>{f=b}}),typeof r.init=="function"&&r.init(H),H}function i(l,p){let f=r(this.namespace+(typeof p>"u"?":":p)+l);return f.log=this.log,f}function n(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p,f=(typeof l=="string"?l:"").split(/[\s,]+/),m=f.length;for(p=0;p<m;p++)f[p]&&(l=f[p].replace(/\*/g,".*?"),l[0]==="-"?r.skips.push(new RegExp("^"+l.slice(1)+"$")):r.names.push(new RegExp("^"+l+"$")))}function s(){let l=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),l}function o(l){if(l[l.length-1]==="*")return!0;let p,f;for(p=0,f=r.skips.length;p<f;p++)if(r.skips[p].test(l))return!1;for(p=0,f=r.names.length;p<f;p++)if(r.names[p].test(l))return!0;return!1}function a(l){return l.toString().substring(2,l.toString().length-2).replace(/\.\*\?$/,"*")}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}RG.exports=Bbe});var MG=v((zi,p_)=>{zi.formatArgs=jbe;zi.save=qbe;zi.load=Wbe;zi.useColors=Ube;zi.storage=Vbe();zi.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();zi.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ube(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function jbe(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+p_.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(i=r))}),t.splice(i,0,e)}zi.log=console.debug||console.log||(()=>{});function qbe(t){try{t?zi.storage.setItem("debug",t):zi.storage.removeItem("debug")}catch{}}function Wbe(){let t;try{t=zi.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Vbe(){try{return localStorage}catch{}}p_.exports=OL()(zi);var{formatters:Gbe}=p_.exports;Gbe.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var NG=v((BVe,OG)=>{"use strict";OG.exports=(t,e)=>{e=e||process.argv;let r=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(r+t),n=e.indexOf("--");return i!==-1&&(n===-1?!0:i<n)}});var BG=v((UVe,FG)=>{"use strict";var Kbe=require("os"),Zn=NG(),Kr=process.env,cd;Zn("no-color")||Zn("no-colors")||Zn("color=false")?cd=!1:(Zn("color")||Zn("colors")||Zn("color=true")||Zn("color=always"))&&(cd=!0);"FORCE_COLOR"in Kr&&(cd=Kr.FORCE_COLOR.length===0||parseInt(Kr.FORCE_COLOR,10)!==0);function zbe(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Xbe(t){if(cd===!1)return 0;if(Zn("color=16m")||Zn("color=full")||Zn("color=truecolor"))return 3;if(Zn("color=256"))return 2;if(t&&!t.isTTY&&cd!==!0)return 0;let e=cd?1:0;if(process.platform==="win32"){let r=Kbe.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Kr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in Kr)||Kr.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Kr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Kr.TEAMCITY_VERSION)?1:0;if(Kr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Kr){let r=parseInt((Kr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Kr.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Kr.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Kr.TERM)||"COLORTERM"in Kr?1:(Kr.TERM==="dumb",e)}function NL(t){let e=Xbe(t);return zbe(e)}FG.exports={supportsColor:NL,stdout:NL(process.stdout),stderr:NL(process.stderr)}});var jG=v((Dr,d_)=>{var Jbe=require("tty"),f_=require("util");Dr.init=i0e;Dr.log=e0e;Dr.formatArgs=Qbe;Dr.save=t0e;Dr.load=r0e;Dr.useColors=Ybe;Dr.destroy=f_.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Dr.colors=[6,2,3,4,5,1];try{let t=BG();t&&(t.stderr||t).level>=2&&(Dr.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Dr.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,s)=>s.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),t[r]=i,t},{});function Ybe(){return"colors"in Dr.inspectOpts?Boolean(Dr.inspectOpts.colors):Jbe.isatty(process.stderr.fd)}function Qbe(t){let{namespace:e,useColors:r}=this;if(r){let i=this.color,n="\x1B[3"+(i<8?i:"8;5;"+i),s=`  ${n};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
`).join(`
`+s),t.push(n+"m+"+d_.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Zbe()+e+" "+t[0]}function Zbe(){return Dr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function e0e(...t){return process.stderr.write(f_.format(...t)+`
`)}function t0e(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function r0e(){return process.env.DEBUG}function i0e(t){t.inspectOpts={};let e=Object.keys(Dr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Dr.inspectOpts[e[r]]}d_.exports=OL()(Dr);var{formatters:UG}=d_.exports;UG.o=function(t){return this.inspectOpts.colors=this.useColors,f_.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};UG.O=function(t){return this.inspectOpts.colors=this.useColors,f_.inspect(t,this.inspectOpts)}});var qG=v((jVe,FL)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?FL.exports=MG():FL.exports=jG()});var VG=v((qVe,WG)=>{var Vg;WG.exports=function(){if(!Vg){try{Vg=qG()("follow-redirects")}catch{}typeof Vg!="function"&&(Vg=function(){})}Vg.apply(null,arguments)}});var WL=v((WVe,qL)=>{var rl=require("url"),BL=rl.URL,n0e=require("http"),s0e=require("https"),zG=require("stream").Writable,o0e=require("assert"),XG=VG(),il=["abort","aborted","connect","error","socket","timeout"],jL=Object.create(null);il.forEach(function(t){jL[t]=function(e,r,i){this._redirectable.emit(t,e,r,i)}});var GG=h_("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),a0e=h_("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),u0e=h_("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),c0e=h_("ERR_STREAM_WRITE_AFTER_END","write after end");function Xi(t,e){zG.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(i){r._processResponse(i)},this._performRequest()}Xi.prototype=Object.create(zG.prototype);Xi.prototype.abort=function(){YG(this._currentRequest),this.emit("abort")};Xi.prototype.write=function(t,e,r){if(this._ending)throw new c0e;if(!(typeof t=="string"||typeof t=="object"&&"length"in t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(typeof e=="function"&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new u0e),this.abort())};Xi.prototype.end=function(t,e,r){if(typeof t=="function"?(r=t,t=e=null):typeof e=="function"&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var i=this,n=this._currentRequest;this.write(t,e,function(){i._ended=!0,n.end(null,null,r)}),this._ending=!0}};Xi.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Xi.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Xi.prototype.setTimeout=function(t,e){var r=this;function i(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function n(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},t),i(o)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",n)}return e&&this.on("timeout",e),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",s),this.on("error",s),this.on("response",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){Xi.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Xi.prototype,t,{get:function(){return this._currentRequest[t]}})});Xi.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};Xi.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e){this.emit("error",new TypeError("Unsupported protocol "+t));return}if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var i=this._currentRequest=e.request(this._options,this._onNativeResponse);this._currentUrl=rl.format(this._options),i._redirectable=this;for(var n=0;n<il.length;n++)i.on(il[n],jL[il[n]]);if(this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;(function u(c){if(i===o._currentRequest)if(c)o.emit("error",c);else if(s<a.length){var l=a[s++];i.finished||i.write(l.data,l.encoding,u)}else o._ended&&i.end()})()}};Xi.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(YG(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new a0e);return}var i,n=this._options.beforeRedirect;n&&(i=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var s=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],UL(/^content-/i,this._options.headers));var o=UL(/^host$/i,this._options.headers),a=rl.parse(this._currentUrl),u=o||a.host,c=/^\w+:/.test(r)?this._currentUrl:rl.format(Object.assign(a,{host:u})),l;try{l=rl.resolve(c,r)}catch(g){this.emit("error",new GG(g));return}XG("redirecting to",l),this._isRedirect=!0;var p=rl.parse(l);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==u&&!p0e(p.host,u))&&UL(/^(?:authorization|cookie)$/i,this._options.headers),typeof n=="function"){var f={headers:t.headers,statusCode:e},m={url:c,method:s,headers:i};try{n(this._options,f,m)}catch(g){this.emit("error",g);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(g){this.emit("error",new GG(g))}};function JG(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(i){var n=i+":",s=r[n]=t[i],o=e[i]=Object.create(s);function a(c,l,p){if(typeof c=="string"){var f=c;try{c=KG(new BL(f))}catch{c=rl.parse(f)}}else BL&&c instanceof BL?c=KG(c):(p=l,l=c,c={protocol:n});return typeof l=="function"&&(p=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},c,l),l.nativeProtocols=r,o0e.equal(l.protocol,n,"protocol mismatch"),XG("options",l),new Xi(l,p)}function u(c,l,p){var f=o.request(c,l,p);return f.end(),f}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),e}function l0e(){}function KG(t){var e={protocol:t.protocol,hostname:t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:t.pathname+t.search,href:t.href};return t.port!==""&&(e.port=Number(t.port)),e}function UL(t,e){var r;for(var i in e)t.test(i)&&(r=e[i],delete e[i]);return r===null||typeof r>"u"?void 0:String(r).trim()}function h_(t,e){function r(i){Error.captureStackTrace(this,this.constructor),i?(this.message=e+": "+i.message,this.cause=i):this.message=e}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+t+"]",r.prototype.code=t,r}function YG(t){for(var e=0;e<il.length;e++)t.removeListener(il[e],jL[il[e]]);t.on("error",l0e),t.abort()}function p0e(t,e){let r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}qL.exports=JG({http:n0e,https:s0e});qL.exports.wrap=JG});var m_=v((VVe,QG)=>{QG.exports={version:"0.26.1"}});var s7=v((GVe,n7)=>{"use strict";var Gg=Gr(),ZG=TL(),f0e=$L(),e7=i_(),d0e=require("http"),h0e=require("https"),m0e=WL().http,g0e=WL().https,t7=require("url"),H0e=require("zlib"),y0e=m_().version,ld=a_(),g_=s_(),v0e=o_(),b0e=sd(),r7=/https:?/;function i7(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var i=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+i}t.beforeRedirect=function(s){s.headers.host=s.host,i7(s,e,s.href)}}n7.exports=function(e){return new Promise(function(i,n){var s;function o(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}var a=function(ae){o(),i(ae)},u=!1,c=function(ae){o(),u=!0,n(ae)},l=e.data,p=e.headers,f={};if(Object.keys(p).forEach(function(ae){f[ae.toLowerCase()]=ae}),"user-agent"in f?p[f["user-agent"]]||delete p[f["user-agent"]]:p["User-Agent"]="axios/"+y0e,l&&!Gg.isStream(l)){if(!Buffer.isBuffer(l))if(Gg.isArrayBuffer(l))l=Buffer.from(new Uint8Array(l));else if(Gg.isString(l))l=Buffer.from(l,"utf-8");else return c(ld("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));if(e.maxBodyLength>-1&&l.length>e.maxBodyLength)return c(ld("Request body larger than maxBodyLength limit",e));f["content-length"]||(p["Content-Length"]=l.length)}var m=void 0;if(e.auth){var g=e.auth.username||"",H=e.auth.password||"";m=g+":"+H}var b=f0e(e.baseURL,e.url),w=t7.parse(b),k=w.protocol||"http:";if(!m&&w.auth){var U=w.auth.split(":"),x=U[0]||"",L=U[1]||"";m=x+":"+L}m&&f.authorization&&delete p[f.authorization];var q=r7.test(k),j=q?e.httpsAgent:e.httpAgent;try{e7(w.path,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(ce){var F=new Error(ce.message);F.config=e,F.url=e.url,F.exists=!0,c(F)}var T={path:e7(w.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:p,agent:j,agents:{http:e.httpAgent,https:e.httpsAgent},auth:m};e.socketPath?T.socketPath=e.socketPath:(T.hostname=w.hostname,T.port=w.port);var O=e.proxy;if(!O&&O!==!1){var E=k.slice(0,-1)+"_proxy",M=process.env[E]||process.env[E.toUpperCase()];if(M){var N=t7.parse(M),z=process.env.no_proxy||process.env.NO_PROXY,D=!0;if(z){var P=z.split(",").map(function(ae){return ae.trim()});D=!P.some(function(ae){return ae?ae==="*"||ae[0]==="."&&w.hostname.substr(w.hostname.length-ae.length)===ae?!0:w.hostname===ae:!1})}if(D&&(O={host:N.hostname,port:N.port,protocol:N.protocol},N.auth)){var ee=N.auth.split(":");O.auth={username:ee[0],password:ee[1]}}}}O&&(T.headers.host=w.hostname+(w.port?":"+w.port:""),i7(T,O,k+"//"+w.hostname+(w.port?":"+w.port:"")+T.path));var re,ie=q&&(O?r7.test(O.protocol):!0);e.transport?re=e.transport:e.maxRedirects===0?re=ie?h0e:d0e:(e.maxRedirects&&(T.maxRedirects=e.maxRedirects),re=ie?g0e:m0e),e.maxBodyLength>-1&&(T.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(T.insecureHTTPParser=e.insecureHTTPParser);var J=re.request(T,function(ae){if(!J.aborted){var he=ae,dt=ae.req||J;if(ae.statusCode!==204&&dt.method!=="HEAD"&&e.decompress!==!1)switch(ae.headers["content-encoding"]){case"gzip":case"compress":case"deflate":he=he.pipe(H0e.createUnzip()),delete ae.headers["content-encoding"];break}var ge={status:ae.statusCode,statusText:ae.statusMessage,headers:ae.headers,config:e,request:dt};if(e.responseType==="stream")ge.data=he,ZG(a,c,ge);else{var Gt=[],kr=0;he.on("data",function(Ae){Gt.push(Ae),kr+=Ae.length,e.maxContentLength>-1&&kr>e.maxContentLength&&(u=!0,he.destroy(),c(ld("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,dt)))}),he.on("aborted",function(){u||(he.destroy(),c(ld("error request aborted",e,"ERR_REQUEST_ABORTED",dt)))}),he.on("error",function(Ae){J.aborted||c(g_(Ae,e,null,dt))}),he.on("end",function(){try{var Ae=Gt.length===1?Gt[0]:Buffer.concat(Gt);e.responseType!=="arraybuffer"&&(Ae=Ae.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(Ae=Gg.stripBOM(Ae))),ge.data=Ae}catch(Q){c(g_(Q,e,Q.code,ge.request,ge))}ZG(a,c,ge)})}}});if(J.on("error",function(ae){J.aborted&&ae.code!=="ERR_FR_TOO_MANY_REDIRECTS"||c(g_(ae,e,null,J))}),J.on("socket",function(ae){ae.setKeepAlive(!0,1e3*60)}),e.timeout){var te=parseInt(e.timeout,10);if(isNaN(te)){c(ld("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",J));return}J.setTimeout(te,function(){J.abort();var ae="";e.timeoutErrorMessage?ae=e.timeoutErrorMessage:ae="timeout of "+e.timeout+"ms exceeded";var he=e.transitional||v0e;c(ld(ae,e,he.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",J))})}(e.cancelToken||e.signal)&&(s=function(ce){J.aborted||(J.abort(),c(!ce||ce&&ce.type?new b0e("canceled"):ce))},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s))),Gg.isStream(l)?l.on("error",function(ae){c(g_(ae,e,null,J))}).pipe(J):J.end(l)})}});var y_=v((KVe,u7)=>{"use strict";var Pr=Gr(),o7=dG(),w0e=s_(),_0e=o_(),A0e={"Content-Type":"application/x-www-form-urlencoded"};function a7(t,e){!Pr.isUndefined(t)&&Pr.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function I0e(){var t;return typeof XMLHttpRequest<"u"?t=TG():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=s7()),t}function E0e(t,e,r){if(Pr.isString(t))try{return(e||JSON.parse)(t),Pr.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(t)}var H_={transitional:_0e,adapter:I0e(),transformRequest:[function(e,r){return o7(r,"Accept"),o7(r,"Content-Type"),Pr.isFormData(e)||Pr.isArrayBuffer(e)||Pr.isBuffer(e)||Pr.isStream(e)||Pr.isFile(e)||Pr.isBlob(e)?e:Pr.isArrayBufferView(e)?e.buffer:Pr.isURLSearchParams(e)?(a7(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Pr.isObject(e)||r&&r["Content-Type"]==="application/json"?(a7(r,"application/json"),E0e(e)):e}],transformResponse:[function(e){var r=this.transitional||H_.transitional,i=r&&r.silentJSONParsing,n=r&&r.forcedJSONParsing,s=!i&&this.responseType==="json";if(s||n&&Pr.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?w0e(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Pr.forEach(["delete","get","head"],function(e){H_.headers[e]={}});Pr.forEach(["post","put","patch"],function(e){H_.headers[e]=Pr.merge(A0e)});u7.exports=H_});var l7=v((zVe,c7)=>{"use strict";var S0e=Gr(),C0e=y_();c7.exports=function(e,r,i){var n=this||C0e;return S0e.forEach(i,function(o){e=o.call(n,e,r)}),e}});var VL=v((XVe,p7)=>{"use strict";p7.exports=function(e){return!!(e&&e.__CANCEL__)}});var h7=v((JVe,d7)=>{"use strict";var f7=Gr(),GL=l7(),x0e=VL(),D0e=y_(),P0e=sd();function KL(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new P0e("canceled")}d7.exports=function(e){KL(e),e.headers=e.headers||{},e.data=GL.call(e,e.data,e.headers,e.transformRequest),e.headers=f7.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),f7.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var r=e.adapter||D0e.adapter;return r(e).then(function(n){return KL(e),n.data=GL.call(e,n.data,n.headers,e.transformResponse),n},function(n){return x0e(n)||(KL(e),n&&n.response&&(n.response.data=GL.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})}});var zL=v((YVe,m7)=>{"use strict";var Ji=Gr();m7.exports=function(e,r){r=r||{};var i={};function n(l,p){return Ji.isPlainObject(l)&&Ji.isPlainObject(p)?Ji.merge(l,p):Ji.isPlainObject(p)?Ji.merge({},p):Ji.isArray(p)?p.slice():p}function s(l){if(Ji.isUndefined(r[l])){if(!Ji.isUndefined(e[l]))return n(void 0,e[l])}else return n(e[l],r[l])}function o(l){if(!Ji.isUndefined(r[l]))return n(void 0,r[l])}function a(l){if(Ji.isUndefined(r[l])){if(!Ji.isUndefined(e[l]))return n(void 0,e[l])}else return n(void 0,r[l])}function u(l){if(l in r)return n(e[l],r[l]);if(l in e)return n(void 0,e[l])}var c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return Ji.forEach(Object.keys(e).concat(Object.keys(r)),function(p){var f=c[p]||s,m=f(p);Ji.isUndefined(m)&&f!==u||(i[p]=m)}),i}});var y7=v((QVe,H7)=>{"use strict";var L0e=m_().version,XL={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){XL[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});var g7={};XL.transitional=function(e,r,i){function n(s,o){return"[Axios v"+L0e+"] Transitional option '"+s+"'"+o+(i?". "+i:"")}return function(s,o,a){if(e===!1)throw new Error(n(o," has been removed"+(r?" in "+r:"")));return r&&!g7[o]&&(g7[o]=!0,console.warn(n(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,o,a):!0}};function T0e(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var i=Object.keys(t),n=i.length;n-- >0;){var s=i[n],o=e[s];if(o){var a=t[s],u=a===void 0||o(a,s,t);if(u!==!0)throw new TypeError("option "+s+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+s)}}H7.exports={assertOptions:T0e,validators:XL}});var I7=v((ZVe,A7)=>{"use strict";var w7=Gr(),$0e=i_(),v7=pG(),b7=h7(),v_=zL(),_7=y7(),pd=_7.validators;function Kg(t){this.defaults=t,this.interceptors={request:new v7,response:new v7}}Kg.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=v_(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var i=r.transitional;i!==void 0&&_7.assertOptions(i,{silentJSONParsing:pd.transitional(pd.boolean),forcedJSONParsing:pd.transitional(pd.boolean),clarifyTimeoutError:pd.transitional(pd.boolean)},!1);var n=[],s=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(s=s&&m.synchronous,n.unshift(m.fulfilled,m.rejected))});var o=[];this.interceptors.response.forEach(function(m){o.push(m.fulfilled,m.rejected)});var a;if(!s){var u=[b7,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(o),a=Promise.resolve(r);u.length;)a=a.then(u.shift(),u.shift());return a}for(var c=r;n.length;){var l=n.shift(),p=n.shift();try{c=l(c)}catch(f){p(f);break}}try{a=b7(c)}catch(f){return Promise.reject(f)}for(;o.length;)a=a.then(o.shift(),o.shift());return a};Kg.prototype.getUri=function(e){return e=v_(this.defaults,e),$0e(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};w7.forEach(["delete","get","head","options"],function(e){Kg.prototype[e]=function(r,i){return this.request(v_(i||{},{method:e,url:r,data:(i||{}).data}))}});w7.forEach(["post","put","patch"],function(e){Kg.prototype[e]=function(r,i,n){return this.request(v_(n||{},{method:e,url:r,data:i}))}});A7.exports=Kg});var S7=v((e4e,E7)=>{"use strict";var k0e=sd();function fd(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var r=this;this.promise.then(function(i){if(r._listeners){var n,s=r._listeners.length;for(n=0;n<s;n++)r._listeners[n](i);r._listeners=null}}),this.promise.then=function(i){var n,s=new Promise(function(o){r.subscribe(o),n=o}).then(i);return s.cancel=function(){r.unsubscribe(n)},s},t(function(n){r.reason||(r.reason=new k0e(n),e(r.reason))})}fd.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};fd.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]};fd.prototype.unsubscribe=function(e){if(this._listeners){var r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}};fd.source=function(){var e,r=new fd(function(n){e=n});return{token:r,cancel:e}};E7.exports=fd});var x7=v((t4e,C7)=>{"use strict";C7.exports=function(e){return function(i){return e.apply(null,i)}}});var P7=v((r4e,D7)=>{"use strict";var R0e=Gr();D7.exports=function(e){return R0e.isObject(e)&&e.isAxiosError===!0}});var $7=v((i4e,JL)=>{"use strict";var L7=Gr(),M0e=CL(),b_=I7(),O0e=zL(),N0e=y_();function T7(t){var e=new b_(t),r=M0e(b_.prototype.request,e);return L7.extend(r,b_.prototype,e),L7.extend(r,e),r.create=function(n){return T7(O0e(t,n))},r}var io=T7(N0e);io.Axios=b_;io.Cancel=sd();io.CancelToken=S7();io.isCancel=VL();io.VERSION=m_().version;io.all=function(e){return Promise.all(e)};io.spread=x7();io.isAxiosError=P7();JL.exports=io;JL.exports.default=io});var R7=v((n4e,k7)=>{k7.exports=$7()});var M7=v(QL=>{"use strict";Object.defineProperty(QL,"__esModule",{value:!0});var F0e=R7(),YL=class{constructor(e){this.endpoint=e}get(e){return F0e.default.get(this.endpoint,Object.assign(Object.assign({},e),{proxy:!1}))}};QL.AxiosHttpClient=YL});var O7=v(eT=>{"use strict";Object.defineProperty(eT,"__esModule",{value:!0});var ZL=class{constructor(){this.storage=new Map}async getValue(e,r){return this.storage.has(e)?await Promise.resolve(this.storage.get(e)):await Promise.resolve(r||void 0)}setValue(e,r){this.storage.set(e,r)}};eT.MemoryKeyValueStorage=ZL});var N7=v(rT=>{"use strict";Object.defineProperty(rT,"__esModule",{value:!0});var B0e=O7(),tT=class{constructor(e,r,i,n,s,o){this.telemetry=e,this.featuresTelemetryPropertyName=r,this.assignmentContextTelemetryPropertyName=i,this.telemetryEventName=n,this.storageKey=s,this.storage=o,this.featuresConsumed=!1,this.cachedTelemetryEvents=[],this._features={features:[],assignmentContext:"",configs:[]},this.storageKey||(this.storageKey="ABExp.Features"),this.storage||(o=new B0e.MemoryKeyValueStorage),this.loadCachePromise=this.loadCachedFeatureData(),this.initializePromise=this.loadCachePromise,this.initialFetch=new Promise((a,u)=>{this.resolveInitialFetchPromise=a})}get features(){return this._features}set features(e){this._features=e,this.telemetry&&(this.telemetry.setSharedProperty(this.featuresTelemetryPropertyName,this.features.features.join(";")),this.telemetry.setSharedProperty(this.assignmentContextTelemetryPropertyName,this.features.assignmentContext))}async getFeaturesAsync(e=!1){if(this.fetchPromise!=null){try{await this.fetchPromise}catch{}return this.features}if(!this.featureProviders||this.featureProviders.length===0)return Promise.resolve({features:[],assignmentContext:"",configs:[]});this.fetchPromise=Promise.all(this.featureProviders.map(async r=>await r.getFeatures()));try{let r=await this.fetchPromise;this.updateFeatures(r,e)}catch{}return this.fetchPromise=void 0,this.resolveInitialFetchPromise&&(this.resolveInitialFetchPromise(),this.resolveInitialFetchPromise=void 0),this.features}updateFeatures(e,r=!1){let i={features:[],assignmentContext:"",configs:[]};for(let n of e){for(let s of n.features)i.features.includes(s)||i.features.push(s);for(let s of n.configs){let o=i.configs.find(a=>a.Id===s.Id);o?o.Parameters=Object.assign(Object.assign({},o.Parameters),s.Parameters):i.configs.push(s)}i.assignmentContext+=n.assignmentContext}(r||!this.featuresConsumed)&&(this.features=i),this.storage&&this.storage.setValue(this.storageKey,i)}async loadCachedFeatureData(){let e;this.storage&&(e=await this.storage.getValue(this.storageKey),e!==void 0&&e.configs===void 0&&(e.configs=[])),this.features.features.length===0&&(this.features=e||{features:[],assignmentContext:"",configs:[]})}isFlightEnabled(e){return this.featuresConsumed=!0,this.PostEventToTelemetry(e),this.features.features.includes(e)}async isCachedFlightEnabled(e){return await this.loadCachePromise,this.featuresConsumed=!0,this.PostEventToTelemetry(e),this.features.features.includes(e)}async isFlightEnabledAsync(e){let r=await this.getFeaturesAsync(!0);return this.featuresConsumed=!0,this.PostEventToTelemetry(e),r.features.includes(e)}getTreatmentVariable(e,r){var i;return this.featuresConsumed=!0,this.PostEventToTelemetry(`${e}.${r}`),(i=this.features.configs.find(s=>s.Id===e))===null||i===void 0?void 0:i.Parameters[r]}async getTreatmentVariableAsync(e,r,i){if(i){let n=this.featuresConsumed,s=this.getTreatmentVariable(e,r);if(s===void 0)this.featuresConsumed=n;else return s}return await this.getFeaturesAsync(!0),this.getTreatmentVariable(e,r)}PostEventToTelemetry(e){this.cachedTelemetryEvents.includes(e)||(this.telemetry.postEvent(this.telemetryEventName,new Map([["ABExp.queriedFeature",e]])),this.cachedTelemetryEvents.push(e))}invokeInit(){this.init()}addFeatureProvider(...e){if(!(e==null||this.featureProviders==null))for(let r of e)this.featureProviders.push(r)}};rT.ExperimentationServiceBase=tT});var F7=v(nT=>{"use strict";Object.defineProperty(nT,"__esModule",{value:!0});var iT=class{constructor(e){this.fetchInterval=e}StopPolling(){clearInterval(this.intervalHandle),this.intervalHandle=void 0}OnPollTick(e){this.onTick=e}StartPolling(e=!1){this.intervalHandle&&this.StopPolling(),this.onTick!=null&&(e&&this.onTick().then(()=>{}).catch(()=>{}),this.intervalHandle=setInterval(async()=>{await this.onTick()},this.fetchInterval),this.intervalHandle.unref&&this.intervalHandle.unref())}};nT.PollingService=iT});var B7=v(oT=>{"use strict";Object.defineProperty(oT,"__esModule",{value:!0});var U0e=N7(),j0e=F7(),sT=class extends U0e.ExperimentationServiceBase{constructor(e,r,i,n,s,o,a,u){if(super(e,n,s,o,a,u),this.telemetry=e,this.filterProviders=r,this.refreshRateMs=i,this.featuresTelemetryPropertyName=n,this.assignmentContextTelemetryPropertyName=s,this.telemetryEventName=o,this.storageKey=a,this.storage=u,i<1e3&&i!==0)throw new Error("The minimum refresh rate for polling is 1000 ms (1 second). If you wish to deactivate this auto-polling use value of 0.");i>0&&(this.pollingService=new j0e.PollingService(i),this.pollingService.OnPollTick(async()=>{await super.getFeaturesAsync()}))}init(){this.pollingService?this.pollingService.StartPolling(!0):super.getFeaturesAsync()}async getFeaturesAsync(e=!1){if(this.pollingService){this.pollingService.StopPolling();let r=await super.getFeaturesAsync(e);return this.pollingService.StartPolling(),r}else return await super.getFeaturesAsync(e)}};oT.ExperimentationServiceAutoPolling=sT});var U7=v(aT=>{"use strict";Object.defineProperty(aT,"__esModule",{value:!0});var q0e=rG(),W0e=M7(),V0e=B7(),w_=class extends V0e.ExperimentationServiceAutoPolling{constructor(e){super(e.telemetry,e.filterProviders||[],e.refetchInterval!=null?e.refetchInterval:0,e.featuresTelemetryPropertyName,e.assignmentContextTelemetryPropertyName,e.telemetryEventName,e.storageKey,e.keyValueStorage),this.options=e,this.invokeInit()}init(){this.featureProviders=[],this.addFeatureProvider(new q0e.TasApiFeatureProvider(new W0e.AxiosHttpClient(this.options.endpoint),this.telemetry,this.filterProviders)),super.init()}};aT.ExperimentationService=w_;w_.REFRESH_RATE_IN_MINUTES=30});var j7=v(uT=>{"use strict";Object.defineProperty(uT,"__esModule",{value:!0});var G0e=U7();uT.ExperimentationService=G0e.ExperimentationService});var q7=v(lT=>{"use strict";Object.defineProperty(lT,"__esModule",{value:!0});var cT=class{constructor(e){this.mementoGlobalStorage=e}async getValue(e,r){return await this.mementoGlobalStorage.get(e)||r}setValue(e,r){this.mementoGlobalStorage.update(e,r)}};lT.MementoKeyValueStorage=cT});var W7=v(fT=>{"use strict";Object.defineProperty(fT,"__esModule",{value:!0});var pT=class{constructor(){this.initializePromise=Promise.resolve(),this.initialFetch=Promise.resolve()}isFlightEnabled(e){return!1}isCachedFlightEnabled(e){return Promise.resolve(!1)}isFlightEnabledAsync(e){return Promise.resolve(!1)}getTreatmentVariable(e,r){}getTreatmentVariableAsync(e,r){return Promise.resolve(void 0)}};fT.default=pT});var G7=v(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});var K0e=bL(),z0e=j7(),dT=require("vscode"),X0e=q7(),J0e=W7(),Y0e="https://default.exp-tas.com/vscode/ab",Q0e="query-expfeature",Z0e="VSCode.ABExp.Features",ewe="abexp.assignmentcontext",twe="VSCode.ABExp.FeatureData",rwe=1e3*60*30;function V7(t,e,r,i,n,...s){if(!n)throw new Error("Memento storage was not provided.");let o=dT.workspace.getConfiguration("telemetry");if(!(dT.env.isTelemetryEnabled===void 0?o.get("enableTelemetry",!0):dT.env.isTelemetryEnabled))return new J0e.default;let c=[new K0e.VSCodeFilterProvider(t,e,r),...s],l=new X0e.MementoKeyValueStorage(n);return new z0e.ExperimentationService({filterProviders:c,telemetry:i,storageKey:twe,keyValueStorage:l,featuresTelemetryPropertyName:Z0e,assignmentContextTelemetryPropertyName:ewe,telemetryEventName:Q0e,endpoint:Y0e,refetchInterval:rwe})}__.getExperimentationService=V7;async function iwe(t,e,r,i,n,...s){let o=V7(t,e,r,i,n,...s);return await o.initializePromise,o}__.getExperimentationServiceAsync=iwe});var z7=v(zg=>{"use strict";Object.defineProperty(zg,"__esModule",{value:!0});var K7=G7();zg.getExperimentationService=K7.getExperimentationService;zg.getExperimentationServiceAsync=K7.getExperimentationServiceAsync;var nwe=bL();zg.TargetPopulation=nwe.TargetPopulation});var ZK=v(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});function MT(t){this.j={},this.jr=[],this.jd=null,this.t=t}MT.prototype={accepts:function(){return!!this.t},tt:function(e,r){if(r&&r.j)return this.j[e]=r,r;var i=r,n=this.j[e];if(n)return i&&(n.t=i),n;n=st();var s=j_(this,e);return s?(Object.assign(n.j,s.j),n.jr.append(s.jr),n.jr=s.jd,n.t=i||s.t):n.t=i,this.j[e]=n,n}};var st=function(){return new MT},ve=function(e){return new MT(e)},oe=function(e,r,i){e.j[r]||(e.j[r]=i)},yr=function(e,r,i){e.jr.push([r,i])},j_=function(e,r){var i=e.j[r];if(i)return i;for(var n=0;n<e.jr.length;n++){var s=e.jr[n][0],o=e.jr[n][1];if(s.test(r))return o}return e.jd},Te=function(e,r,i){for(var n=0;n<r.length;n++)oe(e,r[n],i)},Pwe=function(e,r){for(var i=0;i<r.length;i++){var n=r[i][0],s=r[i][1];oe(e,n,s)}},pl=function(e,r,i,n){for(var s=0,o=r.length,a;s<o&&(a=e.j[r[s]]);)e=a,s++;if(s>=o)return[];for(;s<o-1;)a=n(),oe(e,r[s],a),e=a,s++;oe(e,r[o-1],i)},ts="DOMAIN",ra="LOCALHOST",oo="TLD",Cn="NUM",Zd="PROTOCOL",OT="MAILTO",XK="WS",NT="NL",zd="OPENBRACE",lH="OPENBRACKET",pH="OPENANGLEBRACKET",fH="OPENPAREN",fl="CLOSEBRACE",Xd="CLOSEBRACKET",Jd="CLOSEANGLEBRACKET",Yd="CLOSEPAREN",q_="AMPERSAND",W_="APOSTROPHE",V_="ASTERISK",Qd="AT",G_="BACKSLASH",K_="BACKTICK",z_="CARET",dH="COLON",FT="COMMA",X_="DOLLAR",Bu="DOT",J_="EQUALS",BT="EXCLAMATION",Y_="HYPHEN",Q_="PERCENT",Z_="PIPE",eA="PLUS",tA="POUND",rA="QUERY",UT="QUOTE",jT="SEMI",ia="SLASH",iA="TILDE",nA="UNDERSCORE",sA="SYM",Lwe=Object.freeze({__proto__:null,DOMAIN:ts,LOCALHOST:ra,TLD:oo,NUM:Cn,PROTOCOL:Zd,MAILTO:OT,WS:XK,NL:NT,OPENBRACE:zd,OPENBRACKET:lH,OPENANGLEBRACKET:pH,OPENPAREN:fH,CLOSEBRACE:fl,CLOSEBRACKET:Xd,CLOSEANGLEBRACKET:Jd,CLOSEPAREN:Yd,AMPERSAND:q_,APOSTROPHE:W_,ASTERISK:V_,AT:Qd,BACKSLASH:G_,BACKTICK:K_,CARET:z_,COLON:dH,COMMA:FT,DOLLAR:X_,DOT:Bu,EQUALS:J_,EXCLAMATION:BT,HYPHEN:Y_,PERCENT:Q_,PIPE:Z_,PLUS:eA,POUND:tA,QUERY:rA,QUOTE:UT,SEMI:jT,SLASH:ia,TILDE:iA,UNDERSCORE:nA,SYM:sA}),GK="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw verm\xF6gensberater-ctb verm\xF6gensberatung-pwb \u03B5\u03BB \u03B5\u03C5 \u0431\u0433 \u0431\u0435\u043B \u0434\u0435\u0442\u0438 \u0435\u044E \u043A\u0430\u0442\u043E\u043B\u0438\u043A \u043A\u043E\u043C \u049B\u0430\u0437 \u043C\u043A\u0434 \u043C\u043E\u043D \u043C\u043E\u0441\u043A\u0432\u0430 \u043E\u043D\u043B\u0430\u0439\u043D \u043E\u0440\u0433 \u0440\u0443\u0441 \u0440\u0444 \u0441\u0430\u0439\u0442 \u0441\u0440\u0431 \u0443\u043A\u0440 \u10D2\u10D4 \u0570\u0561\u0575 \u05D9\u05E9\u05E8\u05D0\u05DC \u05E7\u05D5\u05DD \u0627\u0628\u0648\u0638\u0628\u064A \u0627\u062A\u0635\u0627\u0644\u0627\u062A \u0627\u0631\u0627\u0645\u0643\u0648 \u0627\u0644\u0627\u0631\u062F\u0646 \u0627\u0644\u0628\u062D\u0631\u064A\u0646 \u0627\u0644\u062C\u0632\u0627\u0626\u0631 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629 \u0627\u0644\u0639\u0644\u064A\u0627\u0646 \u0627\u0644\u0645\u063A\u0631\u0628 \u0627\u0645\u0627\u0631\u0627\u062A \u0627\u06CC\u0631\u0627\u0646 \u0628\u0627\u0631\u062A \u0628\u0627\u0632\u0627\u0631 \u0628\u06BE\u0627\u0631\u062A \u0628\u064A\u062A\u0643 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646 \u0680\u0627\u0631\u062A \u062A\u0648\u0646\u0633 \u0633\u0648\u062F\u0627\u0646 \u0633\u0648\u0631\u064A\u0629 \u0634\u0628\u0643\u0629 \u0639\u0631\u0627\u0642 \u0639\u0631\u0628 \u0639\u0645\u0627\u0646 \u0641\u0644\u0633\u0637\u064A\u0646 \u0642\u0637\u0631 \u0643\u0627\u062B\u0648\u0644\u064A\u0643 \u0643\u0648\u0645 \u0645\u0635\u0631 \u0645\u0644\u064A\u0633\u064A\u0627 \u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627 \u0645\u0648\u0642\u0639 \u0647\u0645\u0631\u0627\u0647 \u0915\u0949\u092E \u0928\u0947\u091F \u092D\u093E\u0930\u0924 \u092D\u093E\u0930\u0924\u092E\u094D \u092D\u093E\u0930\u094B\u0924 \u0938\u0902\u0917\u0920\u0928 \u09AC\u09BE\u0982\u09B2\u09BE \u09AD\u09BE\u09B0\u09A4 \u09AD\u09BE\u09F0\u09A4 \u0A2D\u0A3E\u0A30\u0A24 \u0AAD\u0ABE\u0AB0\u0AA4 \u0B2D\u0B3E\u0B30\u0B24 \u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE \u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0C2D\u0C3E\u0C30\u0C24\u0C4D \u0CAD\u0CBE\u0CB0\u0CA4 \u0D2D\u0D3E\u0D30\u0D24\u0D02 \u0DBD\u0D82\u0D9A\u0DCF \u0E04\u0E2D\u0E21 \u0E44\u0E17\u0E22 \u0EA5\u0EB2\u0EA7 \uB2F7\uB137 \uB2F7\uCEF4 \uC0BC\uC131 \uD55C\uAD6D \u30A2\u30DE\u30BE\u30F3 \u30B0\u30FC\u30B0\u30EB \u30AF\u30E9\u30A6\u30C9 \u30B3\u30E0 \u30B9\u30C8\u30A2 \u30BB\u30FC\u30EB \u30D5\u30A1\u30C3\u30B7\u30E7\u30F3 \u30DD\u30A4\u30F3\u30C8 \u307F\u3093\u306A \u4E16\u754C \u4E2D\u4FE1 \u4E2D\u56FD \u4E2D\u570B \u4E2D\u6587\u7F51 \u4E9A\u9A6C\u900A \u4F01\u4E1A \u4F5B\u5C71 \u4FE1\u606F \u5065\u5EB7 \u516B\u5366 \u516C\u53F8 \u516C\u76CA \u53F0\u6E7E \u53F0\u7063 \u5546\u57CE \u5546\u5E97 \u5546\u6807 \u5609\u91CC \u5609\u91CC\u5927\u9152\u5E97 \u5728\u7EBF \u5927\u4F17\u6C7D\u8F66 \u5927\u62FF \u5929\u4E3B\u6559 \u5A31\u4E50 \u5BB6\u96FB \u5E7F\u4E1C \u5FAE\u535A \u6148\u5584 \u6211\u7231\u4F60 \u624B\u673A \u62DB\u8058 \u653F\u52A1 \u653F\u5E9C \u65B0\u52A0\u5761 \u65B0\u95FB \u65F6\u5C1A \u66F8\u7C4D \u673A\u6784 \u6DE1\u9A6C\u9521 \u6E38\u620F \u6FB3\u9580 \u70B9\u770B \u79FB\u52A8 \u7EC4\u7EC7\u673A\u6784 \u7F51\u5740 \u7F51\u5E97 \u7F51\u7AD9 \u7F51\u7EDC \u8054\u901A \u8BFA\u57FA\u4E9A \u8C37\u6B4C \u8D2D\u7269 \u901A\u8CA9 \u96C6\u56E2 \u96FB\u8A0A\u76C8\u79D1 \u98DE\u5229\u6D66 \u98DF\u54C1 \u9910\u5385 \u9999\u683C\u91CC\u62C9 \u9999\u6E2F".split(" "),oH=/(?:[A-Za-z\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\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\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\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\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-\uA6E5\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,aH=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,uH=/\uFE0F/,cH=/\d/,KK=/\s/;function Twe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=st(),r=ve(Cn),i=ve(ts),n=st(),s=ve(XK),o=[[cH,i],[oH,i],[aH,i],[uH,i]],a=function(){var x=ve(ts);return x.j={"-":n},x.jr=[].concat(o),x},u=function(x){var L=a();return L.t=x,L};Pwe(e,[["'",ve(W_)],["{",ve(zd)],["[",ve(lH)],["<",ve(pH)],["(",ve(fH)],["}",ve(fl)],["]",ve(Xd)],[">",ve(Jd)],[")",ve(Yd)],["&",ve(q_)],["*",ve(V_)],["@",ve(Qd)],["`",ve(K_)],["^",ve(z_)],[":",ve(dH)],[",",ve(FT)],["$",ve(X_)],[".",ve(Bu)],["=",ve(J_)],["!",ve(BT)],["-",ve(Y_)],["%",ve(Q_)],["|",ve(Z_)],["+",ve(eA)],["#",ve(tA)],["?",ve(rA)],['"',ve(UT)],["/",ve(ia)],[";",ve(jT)],["~",ve(iA)],["_",ve(nA)],["\\",ve(G_)]]),oe(e,`
`,ve(NT)),yr(e,KK,s),oe(s,`
`,st()),yr(s,KK,s);for(var c=0;c<GK.length;c++)pl(e,GK[c],u(oo),a);var l=a(),p=a(),f=a(),m=a();pl(e,"file",l,a),pl(e,"ftp",p,a),pl(e,"http",f,a),pl(e,"mailto",m,a);var g=a(),H=ve(Zd),b=ve(OT);oe(p,"s",g),oe(p,":",H),oe(f,"s",g),oe(f,":",H),oe(l,":",H),oe(g,":",H),oe(m,":",b);for(var w=a(),k=0;k<t.length;k++)pl(e,t[k],w,a);return oe(w,":",H),pl(e,"localhost",u(ra),a),yr(e,cH,r),yr(e,oH,i),yr(e,aH,i),yr(e,uH,i),yr(r,cH,r),yr(r,oH,i),yr(r,aH,i),yr(r,uH,i),oe(r,"-",n),oe(i,"-",n),oe(n,"-",n),yr(i,cH,i),yr(i,oH,i),yr(i,aH,i),yr(i,uH,i),yr(n,cH,i),yr(n,oH,i),yr(n,aH,i),yr(n,uH,i),e.jd=ve(sA),e}function $we(t,e){for(var r=kwe(e.replace(/[A-Z]/g,function(m){return m.toLowerCase()})),i=r.length,n=[],s=0,o=0;o<i;){for(var a=t,u=null,c=0,l=null,p=-1,f=-1;o<i&&(u=j_(a,r[o]));)a=u,a.accepts()?(p=0,f=0,l=a):p>=0&&(p+=r[o].length,f++),c+=r[o].length,s+=r[o].length,o++;s-=p,o-=f,c-=p,n.push({t:l.t,v:e.substr(s-c,c),s:s-c,e:s})}return n}function kwe(t){for(var e=[],r=t.length,i=0;i<r;){var n=t.charCodeAt(i),s=void 0,o=n<55296||n>56319||i+1===r||(s=t.charCodeAt(i+1))<56320||s>57343?t[i]:t.slice(i,i+2);e.push(o),i+=o.length}return e}function U_(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?U_=function(e){return typeof e}:U_=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U_(t)}var Tr={defaultProtocol:"http",events:null,format:zK,formatHref:zK,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function qT(t){t=t||{},this.defaultProtocol="defaultProtocol"in t?t.defaultProtocol:Tr.defaultProtocol,this.events="events"in t?t.events:Tr.events,this.format="format"in t?t.format:Tr.format,this.formatHref="formatHref"in t?t.formatHref:Tr.formatHref,this.nl2br="nl2br"in t?t.nl2br:Tr.nl2br,this.tagName="tagName"in t?t.tagName:Tr.tagName,this.target="target"in t?t.target:Tr.target,this.rel="rel"in t?t.rel:Tr.rel,this.validate="validate"in t?t.validate:Tr.validate,this.truncate="truncate"in t?t.truncate:Tr.truncate,this.className="className"in t?t.className:Tr.className,this.attributes=t.attributes||Tr.attributes,this.ignoreTags=[];for(var e=("ignoreTags"in t)?t.ignoreTags:Tr.ignoreTags,r=0;r<e.length;r++)this.ignoreTags.push(e[r].toUpperCase())}qT.prototype={resolve:function(e){var r=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",r,e),tagName:this.get("tagName",r,e),className:this.get("className",r,e),target:this.get("target",r,e),rel:this.get("rel",r,e),events:this.getObject("events",r,e),attributes:this.getObject("attributes",r,e),truncate:this.get("truncate",r,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,r,i){var n=this[e];if(!n)return n;var s;switch(U_(n)){case"function":return n(r,i.t);case"object":return s=i.t in n?n[i.t]:Tr[e],typeof s=="function"?s(r,i.t):s}return n},getObject:function(e,r,i){var n=this[e];return typeof n=="function"?n(r,i.t):n}};function zK(t){return t}var Rwe=Object.freeze({__proto__:null,defaults:Tr,Options:qT});function Mwe(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=Object.create(t.prototype);for(var n in r)i[n]=r[n];return i.constructor=e,e.prototype=i,e}function oA(){}oA.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tr.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};function dl(t,e){function r(i,n){this.t=t,this.v=i,this.tk=n}return Mwe(oA,r,e),r}var JK=dl("email",{isLink:!0}),$T=dl("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),kT=dl("text"),YK=dl("nl"),Fu=dl("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tr.defaultProtocol,r=this.tk,i=!1,n=!1,s=[],o=0;r[o].t===Zd;)i=!0,s.push(r[o].v),o++;for(;r[o].t===ia;)n=!0,s.push(r[o].v),o++;for(;o<r.length;o++)s.push(r[o].v);return s=s.join(""),i||n||(s="".concat(e,"://").concat(s)),s},hasProtocol:function(){return this.tk[0].t===Zd}}),Owe=Object.freeze({__proto__:null,MultiToken:oA,Base:oA,createTokenClass:dl,MailtoEmail:JK,Email:$T,Text:kT,Nl:YK,Url:Fu});function Nwe(){var t=st(),e=st(),r=st(),i=st(),n=st(),s=st(),o=st(),a=ve(Fu),u=st(),c=ve(Fu),l=ve(Fu),p=st(),f=st(),m=st(),g=st(),H=st(),b=ve(Fu),w=ve(Fu),k=ve(Fu),U=ve(Fu),x=st(),L=st(),q=st(),j=st(),F=st(),T=st(),O=ve($T),E=st(),M=ve($T),N=ve(JK),z=st(),D=st(),P=st(),ee=st(),re=ve(YK);oe(t,NT,re),oe(t,Zd,e),oe(t,OT,r),oe(e,ia,i),oe(i,ia,n),oe(t,oo,s),oe(t,ts,s),oe(t,ra,a),oe(t,Cn,s),oe(n,oo,l),oe(n,ts,l),oe(n,Cn,l),oe(n,ra,l),oe(s,Bu,o),oe(F,Bu,T),oe(o,oo,a),oe(o,ts,s),oe(o,Cn,s),oe(o,ra,s),oe(T,oo,O),oe(T,ts,F),oe(T,Cn,F),oe(T,ra,F),oe(a,Bu,o),oe(O,Bu,T),oe(a,dH,u),oe(a,ia,l),oe(u,Cn,c),oe(c,ia,l),oe(O,dH,E),oe(E,Cn,M);var ie=[q_,V_,Qd,G_,K_,z_,X_,ts,J_,Y_,ra,Cn,Q_,Z_,eA,tA,Zd,ia,sA,iA,oo,nA],J=[W_,Jd,fl,Xd,Yd,dH,FT,Bu,BT,pH,zd,lH,fH,rA,UT,jT];oe(l,zd,f),oe(l,lH,m),oe(l,pH,g),oe(l,fH,H),oe(p,zd,f),oe(p,lH,m),oe(p,pH,g),oe(p,fH,H),oe(f,fl,l),oe(m,Xd,l),oe(g,Jd,l),oe(H,Yd,l),oe(b,fl,l),oe(w,Xd,l),oe(k,Jd,l),oe(U,Yd,l),oe(x,fl,l),oe(L,Xd,l),oe(q,Jd,l),oe(j,Yd,l),Te(f,ie,b),Te(m,ie,w),Te(g,ie,k),Te(H,ie,U),Te(f,J,x),Te(m,J,L),Te(g,J,q),Te(H,J,j),Te(b,ie,b),Te(w,ie,w),Te(k,ie,k),Te(U,ie,U),Te(b,J,b),Te(w,J,w),Te(k,J,k),Te(U,J,U),Te(x,ie,b),Te(L,ie,w),Te(q,ie,k),Te(j,ie,U),Te(x,J,x),Te(L,J,L),Te(q,J,q),Te(j,J,j),Te(l,ie,l),Te(p,ie,l),Te(l,J,p),Te(p,J,p),oe(r,oo,N),oe(r,ts,N),oe(r,Cn,N),oe(r,ra,N),Te(N,ie,N),Te(N,J,z),Te(z,ie,N),Te(z,J,z);var te=[q_,W_,V_,G_,K_,z_,fl,X_,ts,J_,Y_,Cn,zd,Q_,Z_,eA,tA,rA,ia,sA,iA,oo,nA];return Te(s,te,D),oe(s,Qd,P),Te(a,te,D),oe(a,Qd,P),Te(o,te,D),Te(D,te,D),oe(D,Qd,P),oe(D,Bu,ee),Te(ee,te,D),oe(P,oo,F),oe(P,ts,F),oe(P,Cn,F),oe(P,ra,O),t}function Fwe(t,e,r){for(var i=r.length,n=0,s=[],o=[];n<i;){for(var a=t,u=null,c=null,l=0,p=null,f=-1;n<i&&!(u=j_(a,r[n].t));)o.push(r[n++]);for(;n<i&&(c=u||j_(a,r[n].t));)u=null,a=c,a.accepts()?(f=0,p=a):f>=0&&f++,n++,l++;if(f<0)for(var m=n-l;m<n;m++)o.push(r[m]);else{o.length>0&&(s.push(TT(kT,e,o)),o=[]),n-=f,l-=f;var g=p.t,H=r.slice(n-l,n);s.push(TT(g,e,H))}}return o.length>0&&s.push(TT(kT,e,o)),s}function TT(t,e,r){var i=r[0].s,n=r[r.length-1].e,s=e.substr(i,n-i);return new t(s,r)}var RT=typeof console<"u"&&console&&console.warn||function(){},Lt={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function Bwe(){Lt.scanner=null,Lt.parser=null,Lt.pluginQueue=[],Lt.customProtocols=[],Lt.initialized=!1}function Uwe(t,e){for(var r=0;r<Lt.pluginQueue.length;r++)if(t===Lt.pluginQueue[r][0]){RT('linkifyjs: plugin "'.concat(t,'" already registered - will be overwritten')),Lt.pluginQueue[r]=[t,e];return}Lt.pluginQueue.push([t,e]),Lt.initialized&&RT('linkifyjs: already initialized - will not register plugin "'.concat(t,'" until you manually call linkify.init(). To avoid this warning, please register all plugins before invoking linkify the first time.'))}function jwe(t){if(Lt.initialized&&RT('linkifyjs: already initialized - will not register custom protocol "'.concat(t,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(t))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");Lt.customProtocols.push(t)}function QK(){Lt.scanner={start:Twe(Lt.customProtocols),tokens:Lwe},Lt.parser={start:Nwe(),tokens:Owe};for(var t={createTokenClass:dl},e=0;e<Lt.pluginQueue.length;e++)Lt.pluginQueue[e][1]({scanner:Lt.scanner,parser:Lt.parser,utils:t});Lt.initialized=!0}function WT(t){return Lt.initialized||QK(),Fwe(Lt.parser.start,t,$we(Lt.scanner.start,t))}function qwe(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=WT(t),i=[],n=0;n<r.length;n++){var s=r[n];s.isLink&&(!e||s.t===e)&&i.push(s.toObject())}return i}function Wwe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=WT(t);return r.length===1&&r[0].isLink&&(!e||r[0].t===e)}rs.Options=qT;rs.find=qwe;rs.init=QK;rs.options=Rwe;rs.registerCustomProtocol=jwe;rs.registerPlugin=Uwe;rs.reset=Bwe;rs.test=Wwe;rs.tokenize=WT});var tz=v((IGe,ez)=>{ez.exports=ZK()});var o_e={};Jz(o_e,{activate:()=>n_e,deactivate:()=>s_e});module.exports=Yz(o_e);var qz=S(Se()),Wz=require("os"),er=S(require("vscode"));var oh=new Map([["pwa-node","node"],["pwa-chrome","chrome"],["pwa-extensionHost","extensionHost"],["pwa-msedge","msedge"]]),yl=t=>oh.get(t)||t,hX={["pwa-extensionHost"]:null,["node-terminal"]:null,["pwa-node"]:null,["pwa-chrome"]:null,["pwa-msedge"]:null},mX={["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},c_e=new Set(Object.keys(mX)),EA=new Set(Object.keys(hX)),ua=t=>EA.has(t);var $e=(t,e,r)=>t.registerCommand(e,r),vH=async(t,e,...r)=>await t.executeCommand(e,...r);var $t=(t,e,r)=>t.getConfiguration(void 0,r).get(e),SA=(t,e,r,i)=>t.getConfiguration().update(e,r,i);var ah=async(t,e,r)=>await t.executeCommand("setContext",e,r);var bH={name:"js-debug",displayName:"JavaScript Debugger",version:"1.77.2",publisher:"ms-vscode",author:{name:"Microsoft Corporation"},keywords:["pwa","javascript","node","chrome","debugger"],description:"An extension for debugging Node.js programs and Chrome.",license:"MIT",engines:{vscode:"^1.73.0",node:">=10"},icon:"resources/logo.png",categories:["Debuggers"],private:!0,repository:{type:"git",url:"https://github.com/Microsoft/vscode-pwa.git"},bugs:{url:"https://github.com/Microsoft/vscode-pwa/issues"},scripts:{compile:"gulp",watch:"gulp watch",fmt:"gulp format",prepare:"husky install",package:"gulp package",publish:"gulp publish",precommit:"npm-run-all --parallel test:lint test:types",updatetypes:"cd src/typings && npx vscode-dts dev && npx vscode-dts master",updatenodeapi:"python src/build/getNodePdl.py && prettier --write src/build/nodeCustom.ts",generateapis:"node dist/src/build/generateDap.js && node dist/src/build/generateCdp.js",test:"gulp && npm-run-all --parallel test:unit test:types test:golden test:lint","test:types":"tsc --noEmit","test:unit":"tsx node_modules/mocha/bin/mocha.js --config .mocharc.unit.js","test:golden":"node ./src/test/runTest.js","test:lint":"gulp lint"},dependencies:{"@c4312/chromehash":"^0.3.0","@vscode/js-debug-browsers":"^1.0.8","@vscode/l10n":"^0.0.13","@vscode/win32-app-container-tokens":"^0.1.0",acorn:"^8.7.0","acorn-loose":"^8.3.0",astring:"^1.8.1",color:"^4.2.1","data-uri-to-buffer":"^3.0.1","default-browser":"^2.0.1",dotenv:"^16.0.0",estraverse:"^5.3.0",execa:"^5.1.1","glob-stream":"^7.0.0",got:"^11.8.6",inversify:"^6.0.1","js-xxhash":"^1.0.4","jsonc-parser":"^3.0.0",linkifyjs:"^3.0.5",micromatch:"^4.0.5","path-browserify":"^1.0.1",preact:"^10.6.6","reflect-metadata":"^0.1.13",signale:"^1.4.0","source-map":"0.8.0-beta.0","source-map-support":"^0.5.21",split2:"^4.1.0","to-absolute-glob":"^2.0.2","vscode-tas-client":"^0.1.42",ws:"^8.5.0"},prettier:{trailingComma:"all",singleQuote:!0,arrowParens:"avoid",printWidth:100,tabWidth:2},devDependencies:{"@c4312/matcha":"^1.3.1","@mixer/parallel-prettier":"^2.0.1","@pptr/testrunner":"^0.8.0","@types/chai":"^4.3.0","@types/chai-as-promised":"^7.1.5","@types/chai-string":"^1.4.2","@types/chai-subset":"^1.3.3","@types/color":"^3.0.3","@types/debug":"^4.1.7","@types/del":"^4.0.0","@types/diff":"^5.0.2","@types/estraverse":"^5.1.1","@types/estree":"0.0.51","@types/express":"^4.17.13","@types/glob":"^7.2.0","@types/glob-stream":"^6.1.1","@types/gulp":"^4.0.9","@types/js-beautify":"^1.13.3","@types/json-schema":"^7.0.11","@types/linkifyjs":"^2.1.4","@types/long":"^4.0.1","@types/marked":"^4.0.3","@types/micromatch":"^4.0.2","@types/minimist":"^1.2.2","@types/mkdirp":"^1.0.2","@types/mocha":"^9.1.0","@types/node":"^17.0.23","@types/prettier":"^2.4.4","@types/signale":"^1.4.4","@types/sinon":"^10.0.11","@types/split2":"^3.2.1","@types/stream-buffers":"^3.0.4","@types/tmp":"^0.2.3","@types/to-absolute-glob":"^2.0.1","@types/ws":"^8.5.3","@typescript-eslint/eslint-plugin":"^5.17.0","@typescript-eslint/parser":"^5.17.0","@vscode/test-electron":"^2.2.3",chai:"^4.3.6","chai-as-promised":"^7.1.1","chai-string":"^1.5.0","chai-subset":"^1.6.0",deepmerge:"^4.2.2",del:"^6.0.0",diff:"^5.0.0",esbuild:"^0.17.10",eslint:"^8.12.0","eslint-plugin-header":"^3.1.1","eslint-plugin-react":"^7.29.4",express:"^4.17.3",glob:"^7.2.0",gulp:"^4.0.2","gulp-cli":"^2.3.0","gulp-filter":"^7.0.0","gulp-rename":"^2.0.0","gulp-util":"^3.0.8",husky:"^7.0.4",marked:"^4.0.12",merge2:"^1.4.1",minimist:"^1.2.6",mocha:"^10.2.0","mocha-junit-reporter":"^2.0.2","mocha-multi-reporters":"^1.5.1","npm-run-all":"^4.1.5",nyc:"^15.1.0",playwright:"^1.26.0",prettier:"^2.6.1",sinon:"^13.0.1","stream-buffers":"^3.0.2","ts-node":"^10.7.0",tsx:"^3.12.3",typescript:"^4.6.3",vsce:"^2.7.0","vscode-debugadapter-testsupport":"^1.47.0","vscode-debugprotocol":"^1.47.0"},main:"./src/extension.js",enabledApiProposals:["portsAttributes","findTextInFiles","workspaceTrust","tunnels"],extensionKind:["workspace"],contributes:{terminal:{profiles:[{id:"extension.js-debug.debugTerminal",title:"%debug.terminal.label%",icon:"$(debug)"}]}}};var kt=t=>!!t,vl=t=>_H(t,e=>e!==null),a$=t=>_H(t,e=>e!==void 0),qu=t=>e=>e instanceof t,wH=(t,e)=>{debugger;throw new Error(e.replace("{value}",JSON.stringify(t)))};function _H(t,e){let r={};for(let i of Object.keys(t)){let n=t[i];e(n,i)&&(r[i]=n)}return r}function ao(t,e){let r={};for(let i of Object.keys(t)){let n=t[i];r[i]=e(n,i)}return r}function u$(t,e){let r={};for(let i of Object.keys(t))e(i,t[i])&&(r[i]=t[i]);return r}function c$(...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 l$(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 CA=Symbol("unset");function Fe(t){let e=CA,r=(...i)=>(e===CA&&(r.value=e=t(...i)),e);return r.forget=()=>{e=CA,r.value=void 0},r.value=void 0,r}function uo(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 p$(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 f$(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 d$(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 h$(t,e){let r=[],i=[];for(let n of t)e(n)?r.push(n):i.push(n);return[r,i]}function Wu(t){let e=[];for(let r of t)e=e.concat(r);return e}var HX=2**31-1,AH=()=>{let t=0;return()=>t++&HX};var Ke=Symbol("AnyLaunchConfiguration"),IH={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:TA("${workspaceFolder}"),enableContentValidation:!0,cascadeTerminateToConfigurations:[],__workspaceFolder:"",__remoteFilePrefix:void 0,__breakOnConditionalError:!1,customDescriptionGenerator:void 0,customPropertiesGenerator:void 0},uh={...IH,cwd:"${workspaceFolder}",env:{},envFile:null,pauseForSourceMap:!1,sourceMaps:!0,localRoot:null,remoteRoot:null,resolveSourceMapLocations:["**","!**/node_modules/**"],autoAttachChildProcesses:!0,runtimeSourcemapPausePatterns:[],skipFiles:["<node_internals>/**"],enableTurboSourcemaps:!0},EH={...uh,showAsyncStacks:{onceBreakpointResolved:16},type:"node-terminal",request:"launch",name:"JavaScript Debug Terminal"},yX={...uh,type:"node-terminal",request:"attach",name:EH.name,showAsyncStacks:{onceBreakpointResolved:16},delegateId:-1},xA={...uh,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:""},vX={...uh,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"},ch={...IH,type:"pwa-chrome",request:"attach",address:"localhost",port:0,disableNetworkCache:!0,pathMapping:{},url:null,restart:!1,urlFilter:"",sourceMapPathOverrides:TA("${webRoot}"),webRoot:"${workspaceFolder}",server:null,browserAttachLocation:"workspace",targetSelection:"automatic",vueComponentPaths:["${workspaceFolder}/**/*.vue","!**/node_modules/**"],perScriptSourcemaps:"auto"},DA={...ch,type:"pwa-msedge",useWebView:!1},SH={...ch,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"},PA={...SH,type:"pwa-msedge",useWebView:!1},LA={...uh,type:"pwa-node",attachExistingChildren:!0,address:"localhost",port:9229,restart:!1,request:"attach",continueOnAttach:!1};function TA(t){return{"webpack:///./~/*":`${t}/node_modules/*`,"webpack:////*":"/*","webpack://@?:*/?:*/*":`${t}/*`,"webpack://?:*/*":`${t}/*`,"webpack:///([a-z]):/(.+)":"$1:/$2","meteor://\u{1F4BB}app/*":`${t}/*`}}var CH=t=>{!t.sourceMapPathOverrides&&t.cwd&&(t.sourceMapPathOverrides=TA(t.cwd)),t.resolveSourceMapLocations===void 0&&!t.remoteRoot&&(t.resolveSourceMapLocations=t.outFiles)};function $A({...t}){return CH(t),t.request==="attach"?{...LA,...t}:{...vX,...t}}function bX(t,e){return t.request==="attach"?{...ch,browserAttachLocation:e,...t}:{...SH,browserLaunchLocation:e,...t}}function wX(t,e){return t.request==="attach"?{...DA,browserAttachLocation:e,...t}:{...PA,browserLaunchLocation:e,...t}}function _X(t){let e={...xA,...t};return e.skipFiles=[...e.skipFiles,"**/node_modules.asar/**","**/bootstrap-fork.js"],e}function kA(t){return CH(t),t.request==="launch"?{...EH,...t}:{...yX,...t}}function co(t,e){let r,i=e==="remote"?"ui":"workspace";switch(t.type){case"pwa-node":r=$A(t);break;case"pwa-msedge":r=wX(t,i);break;case"pwa-chrome":r=bX(t,i);break;case"pwa-extensionHost":r=_X(t);break;case"node-terminal":r=kA(t);break;default:throw wH(t,"Unknown config: {value}")}return MA(r)}function RA(t){var i,n,s;let e="${workspaceFolder}",r={...t,rootPath:void 0,outFiles:t.outFiles.filter(o=>!o.includes(e)),sourceMapPathOverrides:_H(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 MA(t){return t.__workspaceFolder||(t=RA(t)),t=is(t,"workspaceFolder",t.__workspaceFolder),t=is(t,"webRoot","webRoot"in t?t.webRoot:t.__workspaceFolder),t}function is(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=>is(n,e,r));else if(typeof t=="object"&&t){let n={};for(let[s,o]of Object.entries(t))n[is(s,e,r)]=is(o,e,r);i=n}else i=t;return i}var xH=["javascript","typescript","typescriptreact","javascriptreact","fsharp","html"],DH=bH.name,Vu=bH.version,AX=bH.publisher,PH=DH.includes("nightly"),m$=`${AX}.${DH}`;var cA=S(zA()),oz=S(gI()),uA=require("fs"),lA=S(Y());var $R;(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 Dn(Object.create(null))}:a?function(){return Dn({__proto__:null})}:function(){return Dn({})},has:u?function(d,y){return r.call(d,y)}:function(d,y){return y in d},get:u?function(d,y){return r.call(d,y)?d[y]:void 0}:function(d,y){return d[y]}},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:HH(),m=!p&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:_A(),g=!p&&typeof WeakMap=="function"?WeakMap:_e(),H=new g;function b(d,y,_,I){if(te(_)){if(!Ae(d))throw new TypeError;if(!be(y))throw new TypeError;return O(d,y)}else{if(!Ae(d))throw new TypeError;if(!he(y))throw new TypeError;if(!he(I)&&!te(I)&&!ce(I))throw new TypeError;return ce(I)&&(I=void 0),_=Z(_),E(d,y,_,I)}}e("decorate",b);function w(d,y){function _(I,R){if(!he(I))throw new TypeError;if(!te(R)&&!Ge(R))throw new TypeError;ee(d,y,I,R)}return _}e("metadata",w);function k(d,y,_,I){if(!he(_))throw new TypeError;return te(I)||(I=Z(I)),ee(d,y,_,I)}e("defineMetadata",k);function U(d,y,_){if(!he(y))throw new TypeError;return te(_)||(_=Z(_)),N(d,y,_)}e("hasMetadata",U);function x(d,y,_){if(!he(y))throw new TypeError;return te(_)||(_=Z(_)),z(d,y,_)}e("hasOwnMetadata",x);function L(d,y,_){if(!he(y))throw new TypeError;return te(_)||(_=Z(_)),D(d,y,_)}e("getMetadata",L);function q(d,y,_){if(!he(y))throw new TypeError;return te(_)||(_=Z(_)),P(d,y,_)}e("getOwnMetadata",q);function j(d,y){if(!he(d))throw new TypeError;return te(y)||(y=Z(y)),re(d,y)}e("getMetadataKeys",j);function F(d,y){if(!he(d))throw new TypeError;return te(y)||(y=Z(y)),ie(d,y)}e("getOwnMetadataKeys",F);function T(d,y,_){if(!he(y))throw new TypeError;te(_)||(_=Z(_));var I=M(y,_,!1);if(te(I)||!I.delete(d))return!1;if(I.size>0)return!0;var R=H.get(y);return R.delete(_),R.size>0||H.delete(y),!0}e("deleteMetadata",T);function O(d,y){for(var _=d.length-1;_>=0;--_){var I=d[_],R=I(y);if(!te(R)&&!ce(R)){if(!be(R))throw new TypeError;y=R}}return y}function E(d,y,_,I){for(var R=d.length-1;R>=0;--R){var B=d[R],V=B(y,_,I);if(!te(V)&&!ce(V)){if(!he(V))throw new TypeError;I=V}}return I}function M(d,y,_){var I=H.get(d);if(te(I)){if(!_)return;I=new f,H.set(d,I)}var R=I.get(y);if(te(R)){if(!_)return;R=new f,I.set(y,R)}return R}function N(d,y,_){var I=z(d,y,_);if(I)return!0;var R=gl(y);return ce(R)?!1:N(d,R,_)}function z(d,y,_){var I=M(y,_,!1);return te(I)?!1:Gt(I.has(d))}function D(d,y,_){var I=z(d,y,_);if(I)return P(d,y,_);var R=gl(y);if(!ce(R))return D(d,R,_)}function P(d,y,_){var I=M(y,_,!1);if(!te(I))return I.get(d)}function ee(d,y,_,I){var R=M(_,I,!0);R.set(d,y)}function re(d,y){var _=ie(d,y),I=gl(d);if(I===null)return _;var R=re(I,y);if(R.length<=0)return _;if(_.length<=0)return R;for(var B=new m,V=[],G=0,W=_;G<W.length;G++){var ue=W[G],de=B.has(ue);de||(B.add(ue),V.push(ue))}for(var ye=0,Ne=R;ye<Ne.length;ye++){var ue=Ne[ye],de=B.has(ue);de||(B.add(ue),V.push(ue))}return V}function ie(d,y){var _=[],I=M(d,y,!1);if(te(I))return _;for(var R=I.keys(),B=Ct(R),V=0;;){var G=aa(B);if(!G)return _.length=V,_;var W=oa(G);try{_[V]=W}catch(ue){try{ju(B)}finally{throw ue}}V++}}function J(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 te(d){return d===void 0}function ce(d){return d===null}function ae(d){return typeof d=="symbol"}function he(d){return typeof d=="object"?d!==null:typeof d=="function"}function dt(d,y){switch(J(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 _=y===3?"string":y===5?"number":"default",I=wt(d,n);if(I!==void 0){var R=I.call(d,_);if(he(R))throw new TypeError;return R}return ge(d,_==="default"?"number":_)}function ge(d,y){if(y==="string"){var _=d.toString;if(Q(_)){var I=_.call(d);if(!he(I))return I}var R=d.valueOf;if(Q(R)){var I=R.call(d);if(!he(I))return I}}else{var R=d.valueOf;if(Q(R)){var I=R.call(d);if(!he(I))return I}var B=d.toString;if(Q(B)){var I=B.call(d);if(!he(I))return I}}throw new TypeError}function Gt(d){return!!d}function kr(d){return""+d}function Z(d){var y=dt(d,3);return ae(y)?y:kr(y)}function Ae(d){return Array.isArray?Array.isArray(d):d instanceof Object?d instanceof Array:Object.prototype.toString.call(d)==="[object Array]"}function Q(d){return typeof d=="function"}function be(d){return typeof d=="function"}function Ge(d){switch(J(d)){case 3:return!0;case 4:return!0;default:return!1}}function wt(d,y){var _=d[y];if(_!=null){if(!Q(_))throw new TypeError;return _}}function Ct(d){var y=wt(d,s);if(!Q(y))throw new TypeError;var _=y.call(d);if(!he(_))throw new TypeError;return _}function oa(d){return d.value}function aa(d){var y=d.next();return y.done?!1:y}function ju(d){var y=d.return;y&&y.call(d)}function gl(d){var y=Object.getPrototypeOf(d);if(typeof d!="function"||d===l||y!==l)return y;var _=d.prototype,I=_&&Object.getPrototypeOf(_);if(I==null||I===Object.prototype)return y;var R=I.constructor;return typeof R!="function"||R===d?y:R}function HH(){var d={},y=[],_=function(){function V(G,W,ue){this._index=0,this._keys=G,this._values=W,this._selector=ue}return V.prototype["@@iterator"]=function(){return this},V.prototype[s]=function(){return this},V.prototype.next=function(){var G=this._index;if(G>=0&&G<this._keys.length){var W=this._selector(this._keys[G],this._values[G]);return G+1>=this._keys.length?(this._index=-1,this._keys=y,this._values=y):this._index++,{value:W,done:!1}}return{value:void 0,done:!0}},V.prototype.throw=function(G){throw this._index>=0&&(this._index=-1,this._keys=y,this._values=y),G},V.prototype.return=function(G){return this._index>=0&&(this._index=-1,this._keys=y,this._values=y),{value:G,done:!0}},V}();return function(){function V(){this._keys=[],this._values=[],this._cacheKey=d,this._cacheIndex=-2}return Object.defineProperty(V.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),V.prototype.has=function(G){return this._find(G,!1)>=0},V.prototype.get=function(G){var W=this._find(G,!1);return W>=0?this._values[W]:void 0},V.prototype.set=function(G,W){var ue=this._find(G,!0);return this._values[ue]=W,this},V.prototype.delete=function(G){var W=this._find(G,!1);if(W>=0){for(var ue=this._keys.length,de=W+1;de<ue;de++)this._keys[de-1]=this._keys[de],this._values[de-1]=this._values[de];return this._keys.length--,this._values.length--,G===this._cacheKey&&(this._cacheKey=d,this._cacheIndex=-2),!0}return!1},V.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=d,this._cacheIndex=-2},V.prototype.keys=function(){return new _(this._keys,this._values,I)},V.prototype.values=function(){return new _(this._keys,this._values,R)},V.prototype.entries=function(){return new _(this._keys,this._values,B)},V.prototype["@@iterator"]=function(){return this.entries()},V.prototype[s]=function(){return this.entries()},V.prototype._find=function(G,W){return this._cacheKey!==G&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=G)),this._cacheIndex<0&&W&&(this._cacheIndex=this._keys.length,this._keys.push(G),this._values.push(void 0)),this._cacheIndex},V}();function I(V,G){return V}function R(V,G){return G}function B(V,G){return[V,G]}}function _A(){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(y){return this._map.has(y)},d.prototype.add=function(y){return this._map.set(y,y),this},d.prototype.delete=function(y){return this._map.delete(y)},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 _e(){var d=16,y=c.create(),_=I();return function(){function W(){this._key=I()}return W.prototype.has=function(ue){var de=R(ue,!1);return de!==void 0?c.has(de,this._key):!1},W.prototype.get=function(ue){var de=R(ue,!1);return de!==void 0?c.get(de,this._key):void 0},W.prototype.set=function(ue,de){var ye=R(ue,!0);return ye[this._key]=de,this},W.prototype.delete=function(ue){var de=R(ue,!1);return de!==void 0?delete de[this._key]:!1},W.prototype.clear=function(){this._key=I()},W}();function I(){var W;do W="@@WeakMap@@"+G();while(c.has(y,W));return y[W]=!0,W}function R(W,ue){if(!r.call(W,_)){if(!ue)return;Object.defineProperty(W,_,{value:c.create()})}return W[_]}function B(W,ue){for(var de=0;de<ue;++de)W[de]=Math.random()*255|0;return W}function V(W){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(W)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(W)):B(new Uint8Array(W),W):B(new Array(W),W)}function G(){var W=V(d);W[6]=W[6]&79|64,W[8]=W[8]&191|128;for(var ue="",de=0;de<d;++de){var ye=W[de];(de===4||de===6||de===8)&&(ue+="-"),ye<16&&(ue+="0"),ue+=ye.toString(16).toLowerCase()}return ue}}function Dn(d){return d.__=void 0,delete d.__,d}})})($R||($R={}));var Xh=require("fs"),Jt=S(Y()),wv=S(require("path"));var X=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=[])}},_h=class{constructor(){this.map=new Map;this.listeners=this.map}listen(e,r){let i=this.map.get(e);i||(i=new X,this.map.set(e,i));let n=i.event(r);return{dispose:Fe(()=>{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 Yu=S(Y()),Ih=S(require("path"));var NR=require("crypto"),FR=S(gI()),BR=require("os"),je=S(require("path"));var ws=S(require("fs")),kR=S(require("util"));async function Ju({access:t},e){if(!e)return!1;try{return await t(e),!0}catch{return!1}}async function XI(t,e,r){try{await t.copyFile(e,r)}catch(i){try{if(await Ju(t,r))await t.unlink(r),await t.copyFile(e,r);else throw i}catch{throw i}}}async function Di({stat:t},e){if(e)try{return await t(e)}catch{return}}async function RR({lstat:t},e){if(e)try{return await t(e)}catch{return}}async function MR({copyFile:t,rename:e,unlink:r},i,n){try{await e(i,n)}catch{await t(i,n),await r(i)}}function OR(t){return new Promise(e=>{ws.stat(t,(r,i)=>e(r?void 0:i))})}function xy(t){return new Promise(e=>{ws.readFile(t,"utf8",async(r,i)=>{e(r?"":i)})})}var cIe=kR.promisify(ws.writeFile);var Br=Symbol("FsUtils"),xi=class{constructor(e){this.fs=e}realPath(e){return this.fs.realpath(e)}async exists(e){try{return await this.fs.access(e,ws.constants.F_OK),!0}catch{return!1}}readFile(e){return this.fs.readFile(e)}},zI=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")}},Cy=class{constructor(e,r,i){this.remoteFilePrefix=e;this.localFsUtils=r;this.remoteFsUtils=i}static create(e,r,i){let n=new xi(r);return e!==void 0?new this(e.toLowerCase(),n,new zI(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 Pre=process.platform==="win32"?"\\\\.\\pipe\\":(0,BR.tmpdir)(),Lre=0,Dy=()=>je.join(Pre,`node-cdp.${process.pid}-${(0,NR.randomBytes)(4).toString("hex")}-${Lre++}.sock`);async function Py(t,e,r){let i;if(process.platform==="win32"){let n=r.WINDIR||"C:\\Windows";i=je.join(n,"System32","where.exe")}else i="/usr/bin/which";try{if(await Di(t,i)){let s=(await(0,FR.default)(i,[e],{env:vl(r)})).stdout.split(/\r?\n/);if(process.platform==="win32"){let o=String(r.PATHEXT||".exe").toUpperCase().split(";");for(let a of s){let u=je.extname(a).toUpperCase();if(u&&o.includes(u))return a}}else if(s.length>0)return s[0];return}return e}catch{}}async function UR(t,e,r){if(e){if(process.platform==="win32"&&!je.extname(e)){let i=r.lookup("PATHEXT");if(i){let n=i.split(";");for(let s of n){let o=e+s;if(await Di(t,o))return o}}}if(await Di(t,e))return e}}var jR=t=>t.includes(`.asar${je.sep}`);function pa(...t){return je.posix.isAbsolute(t[0])?qe(je.posix.join(...t)):je.win32.isAbsolute(t[0])?je.win32.join(...t):je.join(...t)}function Pi(...t){return je.posix.isAbsolute(t[0])?je.posix.resolve(...t):je.win32.isAbsolute(t[0])?je.win32.resolve(...t):je.resolve(...t)}function Ah(t,e){return je.posix.isAbsolute(t)?je.posix.relative(t,e):je.win32.isAbsolute(t)?je.win32.relative(t,e):je.relative(t,e)}var Tre=/\/|\\/,JI=t=>t.split(Tre);function YI(t,e=!1){return t&&(t.match(/file:\/\/\/[A-Za-z]:/)?t="file:///"+t[8].toLowerCase()+t.substr(8+1):$y(t)&&(t=(e?t[0].toUpperCase():t[0].toLowerCase())+t.substr(1)),t)}function Ft(t,e=!1){return t&&(t=YI(t,e),t.match(/file:\/\/\/[A-Za-z]:/)?t=t.substr(0,8+1)+t.substr(8+1).replace(/\//g,"\\"):$y(t)&&(t=t.replace(/\//g,"\\")),t)}function qe(t){return t.replace(/\\\//g,"/").replace(/\\/g,"/")}var Ly=(t,e)=>{let r=je.relative(t,e);return r.length&&!je.isAbsolute(r)&&!r.startsWith("..")},Ty=(t,e)=>{let r=je.relative(t,e);return!je.isAbsolute(r)&&!r.startsWith("..")},QI=t=>t.startsWith("\\\\"),$y=t=>/^[A-Za-z]:/.test(t)||QI(t);var kl=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=Ih.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(qe(l));else{let p=Ih.relative(o,Ih.resolve(this.rootPath,l));p.startsWith("..")||a.push(qe(p))}}yield{cwd:o,negations:a,pattern:n.slice(s).join("/")}}}};kl=$([(0,Yu.injectable)()],kl);var _s=class extends kl{constructor({rootPath:e,outFiles:r}){super({rootPath:e,patterns:r})}};_s=$([(0,Yu.injectable)(),A(0,(0,Yu.inject)(Ke))],_s);var fo=class extends kl{constructor(e){super({rootPath:e.rootPath,patterns:"vueComponentPaths"in e?e.vueComponentPaths:[]})}};fo=$([(0,Yu.injectable)(),A(0,(0,Yu.inject)(Ke))],fo);var WR=require("crypto"),VR=require("os"),GR=S(require("path"));var Eh=require("fs"),qR=require("path"),Ry=require("zlib"),kre=(t,e)=>e instanceof Error?{message:e.message,stack:e.stack}:typeof e=="bigint"?e.toString():e,ky=class{constructor(e,r){this.file=e;this.dap=r;try{(0,Eh.mkdirSync)((0,qR.dirname)(e),{recursive:!0})}catch{}e.endsWith(".gz")?(this.stream=(0,Ry.createGzip)(),this.stream.pipe((0,Eh.createWriteStream)(e))):this.stream=(0,Eh.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,kre)+`
`),(i=(r=this.stream).flush)==null||i.call(r,Ry.constants.Z_SYNC_FLUSH))}};var Rre={["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},bIe=Object.keys(Rre),fe=Symbol("ILogger");function ZI(t,e=(0,VR.tmpdir)()){if(t===!1)return{stdio:!1,logFile:null};let r={stdio:!0,logFile:GR.join(e,`vscode-debugadapter-${(0,WR.randomBytes)(4).toString("hex")}.json.gz`)};return t===!0?r:{...r,...t}}function KR(t,e){let r=ZI(e),i={sinks:[]};return r.logFile&&i.sinks.push(new ky(r.logFile,t)),i}var Ea=S(Y()),JO=S(Uy());var jy=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}},Zu=Symbol("IResourceProvider");var Oe=t=>isFinite(t)?new Promise(e=>setTimeout(e,t)):new Promise(()=>{}),HM=(t,e)=>{let r=setTimeout(t,e);return{dispose:()=>clearTimeout(r)}};function Is(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 Je(){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 _t=S(Se());var ne=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 yM(t,e){t.output({category:"console",output:e+`
`})}function ot(t,e=9222){return{__errorMarker:!0,error:{id:e,format:t,showUser:!1}}}function at(t,e=9223){return{__errorMarker:!0,error:{id:e,format:t,showUser:!0}}}var hE=()=>at(_t.t("Attribute 'runtimeVersion' requires Node.js version manager 'nvs' or 'nvm' to be installed."),9224),vM=()=>at(_t.t("Attribute 'runtimeVersion' with a flavor/architecture requires 'nvs' to be installed."),9225),bM=()=>at(_t.t("Attribute 'runtimeVersion' requires Node.js version manager 'nvm-windows' or 'nvs'."),9226),mE=(t,e)=>at(_t.t("Node.js version '{0}' not installed using version manager {1}.",t,e),9226),wM=t=>at(_t.t("Cannot launch debug target in terminal ({0}).",t),9227),_M=t=>at(_t.t("Can't load environment variables from file ({0}).",t),9228),AM=t=>at(_t.t("The configured `cwd` {0} does not exist.",t),9245),gE=(t,e)=>at(_t.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),IM=(t,e)=>at(_t.t('The Node version in "{0}" is outdated (version {1}), we require at least Node 8.x.',e,t),9230),EM=t=>at(_t.t('Invalid hit condition "{0}". Expected an expression like "> 42" or "== 2".',t),9231),Fl=()=>at(_t.t("An error occurred taking a profile from the target."),9235),SM=()=>at(_t.t("Please stop the running profile before starting a new one."),9236),CM=t=>ot(t,9238),qy=(t,e,r)=>at(e==="*"&&!r.length?_t.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.'):_t.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),xM=t=>at(_t.t('Unable to launch browser: "{0}"',t.message),9240),Th=t=>at(t??_t.t("Unable to attach to browser"),9242),Wy=()=>at(_t.t('Target page not found. You may need to update your "urlFilter" to match the page you want to debug.'),9241);var DM=()=>ot(_t.t("Variables not available in async stacks"),9234),ma=(t,e)=>at(_t.t("Syntax error setting breakpoint with condition {0} on line {1}: {2}",JSON.stringify(t.condition),t.line,e),9237),HE=()=>ot(_t.t("Thread not found"),9244),Vy=(t,e)=>at(_t.t("Could not read source map for {0}: {1}",t,e)),PM=()=>at(_t.t("UWP webview debugging is not available on your platform.")),LM=()=>at(_t.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.")),TM=t=>typeof t=="object"&&!!t&&"__errorMarker"in t,$M=(t,e)=>t instanceof ne&&t.cause.id===e;var kM=new WeakSet;var fie="Request",die=t=>t.endsWith("Request"),rn=Symbol("IDapApi"),Bl=Symbol("IRootDapApi"),$h=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=Je();this.closed=!1;this._sequence=1,this.disposables.push(this.transport.messageReceived(i=>this._onMessage(i.message,i.receivedTime))),this._dap=Promise.resolve(this._createApi())}get initializedBlocker(){return this._initialized.promise}attachTelemetry(e){this.telemetryReporter=e,this._dap.then(r=>e.attachDap(r))}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(die(r))return this.enqueueRequest(r.slice(0,-fie.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"||!kM.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(TM(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 ne?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 Gy=class{constructor(e,r){this.key=e;this.value=r}toString(){return`${this.key}: ${this.value}`}},Es=class{constructor(e,r){this.projection=e;this.initialContents=r;let i=Array.from(r||[]).map(n=>[this.projection(n[0]),new Gy(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 Gy(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 ut=Symbol("ISourcePathResolver");var WO=require("dns"),$i=S(require("path")),yo=require("url");var FO=require("url");var vE={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"},bE="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",hie={5:bE,"5module":bE+" export import",6:bE+" const class extends export import super"},mie=/^in(stanceof)?$/,IE="\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",FM="\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",gie=new RegExp("["+IE+"]"),Hie=new RegExp("["+IE+FM+"]");IE=FM=null;var BM=[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],yie=[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 _E(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 mo(t,e){return t<65?t===36:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&gie.test(String.fromCharCode(t)):e===!1?!1:_E(t,BM)}function Ul(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&&Hie.test(String.fromCharCode(t)):e===!1?!1:_E(t,BM)||_E(t,yie)}var Be=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 nn(t,e){return new Be(t,{beforeExpr:!0,binop:e})}var sn={beforeExpr:!0},di={startsExpr:!0},EE={};function Re(t,e){return e===void 0&&(e={}),e.keyword=t,EE[t]=new Be(t,e)}var h={num:new Be("num",di),regexp:new Be("regexp",di),string:new Be("string",di),name:new Be("name",di),privateId:new Be("privateId",di),eof:new Be("eof"),bracketL:new Be("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Be("]"),braceL:new Be("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Be("}"),parenL:new Be("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Be(")"),comma:new Be(",",sn),semi:new Be(";",sn),colon:new Be(":",sn),dot:new Be("."),question:new Be("?",sn),questionDot:new Be("?."),arrow:new Be("=>",sn),template:new Be("template"),invalidTemplate:new Be("invalidTemplate"),ellipsis:new Be("...",sn),backQuote:new Be("`",di),dollarBraceL:new Be("${",{beforeExpr:!0,startsExpr:!0}),eq:new Be("=",{beforeExpr:!0,isAssign:!0}),assign:new Be("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Be("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Be("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:nn("||",1),logicalAND:nn("&&",2),bitwiseOR:nn("|",3),bitwiseXOR:nn("^",4),bitwiseAND:nn("&",5),equality:nn("==/!=/===/!==",6),relational:nn("</>/<=/>=",7),bitShift:nn("<</>>/>>>",8),plusMin:new Be("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:nn("%",10),star:nn("*",10),slash:nn("/",10),starstar:new Be("**",{beforeExpr:!0}),coalesce:nn("??",1),_break:Re("break"),_case:Re("case",sn),_catch:Re("catch"),_continue:Re("continue"),_debugger:Re("debugger"),_default:Re("default",sn),_do:Re("do",{isLoop:!0,beforeExpr:!0}),_else:Re("else",sn),_finally:Re("finally"),_for:Re("for",{isLoop:!0}),_function:Re("function",di),_if:Re("if"),_return:Re("return",sn),_switch:Re("switch"),_throw:Re("throw",sn),_try:Re("try"),_var:Re("var"),_const:Re("const"),_while:Re("while",{isLoop:!0}),_with:Re("with"),_new:Re("new",{beforeExpr:!0,startsExpr:!0}),_this:Re("this",di),_super:Re("super",di),_class:Re("class",di),_extends:Re("extends",sn),_export:Re("export"),_import:Re("import",di),_null:Re("null",di),_true:Re("true",di),_false:Re("false",di),_in:Re("in",{beforeExpr:!0,binop:7}),_instanceof:Re("instanceof",{beforeExpr:!0,binop:7}),_typeof:Re("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Re("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Re("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},hi=/\r\n?|\n|\u2028|\u2029/,Qy=new RegExp(hi.source,"g");function Ss(t){return t===10||t===13||t===8232||t===8233}function UM(t,e,r){r===void 0&&(r=t.length);for(var i=e;i<r;i++){var n=t.charCodeAt(i);if(Ss(n))return i<r-1&&n===13&&t.charCodeAt(i+1)===10?i+2:i+1}return-1}var jM=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,on=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,qM=Object.prototype,vie=qM.hasOwnProperty,bie=qM.toString,Nh=Object.hasOwn||function(t,e){return vie.call(t,e)},RM=Array.isArray||function(t){return bie.call(t)==="[object Array]"};function ec(t){return new RegExp("^(?:"+t.replace(/ /g,"|")+")$")}var wie=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Rh=function(e,r){this.line=e,this.column=r};Rh.prototype.offset=function(e){return new Rh(this.line,this.column+e)};var tc=function(e,r,i){this.start=r,this.end=i,e.sourceFile!==null&&(this.source=e.sourceFile)};function jl(t,e){for(var r=1,i=0;;){var n=UM(t,i,e);if(n<0)return new Rh(r,e-i);++r,i=n}}var Mh={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},MM=!1;function _ie(t){var e={};for(var r in Mh)e[r]=t&&Nh(t,r)?t[r]:Mh[r];if(e.ecmaVersion==="latest"?e.ecmaVersion=1e8:e.ecmaVersion==null?(!MM&&typeof console=="object"&&console.warn&&(MM=!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),RM(e.onToken)){var i=e.onToken;e.onToken=function(n){return i.push(n)}}return RM(e.onComment)&&(e.onComment=Aie(e,e.onComment)),e}function Aie(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 tc(this,o,a)),t.ranges&&(u.range=[n,s]),e.push(u)}}var Oh=1,ql=2,SE=4,WM=8,VM=16,GM=32,CE=64,KM=128,Fh=256,xE=Oh|ql|Fh;function DE(t,e){return ql|(t?SE:0)|(e?WM:0)}var zy=0,PE=1,ho=2,zM=3,XM=4,JM=5,At=function(e,r,i){this.options=e=_ie(e),this.sourceFile=e.sourceFile,this.keywords=ec(hie[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var n="";e.allowReserved!==!0&&(n=vE[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module"&&(n+=" await")),this.reservedWords=ec(n);var s=(n?n+" ":"")+vE.strict;this.reservedWordsStrict=ec(s),this.reservedWordsStrictBind=ec(s+" "+vE.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(hi).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(Oh),this.regexpState=null,this.privateNameStack=[]},Cs={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}};At.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};Cs.inFunction.get=function(){return(this.currentVarScope().flags&ql)>0};Cs.inGenerator.get=function(){return(this.currentVarScope().flags&WM)>0&&!this.currentVarScope().inClassFieldInit};Cs.inAsync.get=function(){return(this.currentVarScope().flags&SE)>0&&!this.currentVarScope().inClassFieldInit};Cs.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t];if(e.inClassFieldInit||e.flags&Fh)return!1;if(e.flags&ql)return(e.flags&SE)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Cs.allowSuper.get=function(){var t=this.currentThisScope(),e=t.flags,r=t.inClassFieldInit;return(e&CE)>0||r||this.options.allowSuperOutsideMethod};Cs.allowDirectSuper.get=function(){return(this.currentThisScope().flags&KM)>0};Cs.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Cs.allowNewDotTarget.get=function(){var t=this.currentThisScope(),e=t.flags,r=t.inClassFieldInit;return(e&(ql|Fh))>0||r};Cs.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Fh)>0};At.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};At.parse=function(e,r){return new this(r,e).parse()};At.parseExpressionAt=function(e,r,i){var n=new this(i,e,r);return n.nextToken(),n.parseExpression()};At.tokenizer=function(e,r){return new this(r,e)};Object.defineProperties(At.prototype,Cs);var Yr=At.prototype,Iie=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;Yr.strictDirective=function(t){for(;;){on.lastIndex=t,t+=on.exec(this.input)[0].length;var e=Iie.exec(this.input.slice(t));if(!e)return!1;if((e[1]||e[2])==="use strict"){on.lastIndex=t+e[0].length;var r=on.exec(this.input),i=r.index+r[0].length,n=this.input.charAt(i);return n===";"||n==="}"||hi.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(i+1)==="=")}t+=e[0].length,on.lastIndex=t,t+=on.exec(this.input)[0].length,this.input[t]===";"&&t++}};Yr.eat=function(t){return this.type===t?(this.next(),!0):!1};Yr.isContextual=function(t){return this.type===h.name&&this.value===t&&!this.containsEsc};Yr.eatContextual=function(t){return this.isContextual(t)?(this.next(),!0):!1};Yr.expectContextual=function(t){this.eatContextual(t)||this.unexpected()};Yr.canInsertSemicolon=function(){return this.type===h.eof||this.type===h.braceR||hi.test(this.input.slice(this.lastTokEnd,this.start))};Yr.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Yr.semicolon=function(){!this.eat(h.semi)&&!this.insertSemicolon()&&this.unexpected()};Yr.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0};Yr.expect=function(t){this.eat(t)||this.unexpected()};Yr.unexpected=function(t){this.raise(t??this.start,"Unexpected token")};function Zy(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Yr.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")}};Yr.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")};Yr.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")};Yr.isSimpleAssignTarget=function(t){return t.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(t.expression):t.type==="Identifier"||t.type==="MemberExpression"};var we=At.prototype;we.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 LE={kind:"loop"},Eie={kind:"switch"};we.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;on.lastIndex=this.pos;var e=on.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(mo(i,!0)){for(var n=r+1;Ul(i=this.input.charCodeAt(n),!0);)++n;if(i===92||i>55295&&i<56320)return!0;var s=this.input.slice(r,n);if(!mie.test(s))return!0}return!1};we.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;on.lastIndex=this.pos;var t=on.exec(this.input),e=this.pos+t[0].length,r;return!hi.test(this.input.slice(this.pos,e))&&this.input.slice(e,e+8)==="function"&&(e+8===this.input.length||!(Ul(r=this.input.charCodeAt(e+8))||r>55295&&r<56320))};we.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){on.lastIndex=this.pos;var o=on.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)}};we.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")};we.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")};we.parseDoStatement=function(t){return this.next(),this.labels.push(LE),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")};we.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(LE),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 Zy,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))};we.parseFunctionStatement=function(t,e,r){return this.next(),this.parseFunction(t,kh|(r?0:AE),!1,e)};we.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")};we.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")};we.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(h.braceL),this.labels.push(Eie),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")};we.parseThrowStatement=function(t){return this.next(),hi.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 Sie=[];we.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?GM:0),this.checkLValPattern(e.param,r?XM:ho),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")};we.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")};we.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(LE),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")};we.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")};we.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")};we.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")};we.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")};we.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")};we.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")};we.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")};we.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};we.parseVarId=function(t,e){t.id=this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?PE:ho,!1)};var kh=1,AE=2,YM=4;we.parseFunction=function(t,e,r,i,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===h.star&&e&AE&&this.unexpected(),t.generator=this.eat(h.star)),this.options.ecmaVersion>=8&&(t.async=!!i),e&kh&&(t.id=e&YM&&this.type!==h.name?null:this.parseIdent(),t.id&&!(e&AE)&&this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?PE:ho:zM));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(DE(t.async,t.generator)),e&kh||(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&kh?"FunctionDeclaration":"FunctionExpression")};we.parseFunctionParams=function(t){this.expect(h.parenL),t.params=this.parseBindingList(h.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};we.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"&&Cie(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")};we.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&&Xy(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};we.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};we.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)};we.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&&Xy(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")};we.parseClassField=function(t){if(Xy(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&Xy(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")};we.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(Fh|CE);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")};we.parseClassId=function(t,e){this.type===h.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,ho,!1)):(e===!0&&this.unexpected(),t.id=null)};we.parseClassSuper=function(t){t.superClass=this.eat(h._extends)?this.parseExprSubscripts(!1):null};we.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared};we.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];Nh(e,o.name)||(n?n.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}};function Cie(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 Xy(t,e){var r=t.computed,i=t.key;return!r&&(i.type==="Identifier"&&i.name===e||i.type==="Literal"&&i.value===e)}we.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,kh|YM,!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")};we.checkExport=function(t,e,r){t&&(Nh(t,e)&&this.raiseRecoverable(r,"Duplicate export '"+e+"'"),t[e]=!0)};we.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)};we.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)}};we.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};we.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};we.parseImport=function(t){return this.next(),this.type===h.string?(t.specifiers=Sie,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")};we.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===h.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLValSimple(r.local,ho),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,ho),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,ho),t.push(this.finishNode(n,"ImportSpecifier"))}return t};we.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===h.string){var t=this.parseLiteral(this.value);return wie.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)};we.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)};we.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 Rn=At.prototype;Rn.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};Rn.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};Rn.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")};Rn.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")};Rn.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()};Rn.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};Rn.parseBindingListItem=function(t){return t};Rn.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")};Rn.checkLValSimple=function(t,e,r){e===void 0&&(e=zy);var i=e!==zy;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===ho&&t.name==="let"&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),r&&(Nh(r,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),r[t.name]=!0),e!==JM&&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")}};Rn.checkLValPattern=function(t,e,r){switch(e===void 0&&(e=zy),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)}};Rn.checkLValInnerPattern=function(t,e,r){switch(e===void 0&&(e=zy),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 kn=function(e,r,i,n,s){this.token=e,this.isExpr=!!r,this.preserveSpace=!!i,this.override=n,this.generator=!!s},ct={b_stat:new kn("{",!1),b_expr:new kn("{",!0),b_tmpl:new kn("${",!1),p_stat:new kn("(",!1),p_expr:new kn("(",!0),q_tmpl:new kn("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new kn("function",!1),f_expr:new kn("function",!0),f_expr_gen:new kn("function",!0,!1,null,!0),f_gen:new kn("function",!1,!1,null,!0)},Wl=At.prototype;Wl.initialContext=function(){return[ct.b_stat]};Wl.curContext=function(){return this.context[this.context.length-1]};Wl.braceIsBlock=function(t){var e=this.curContext();return e===ct.f_expr||e===ct.f_stat?!0:t===h.colon&&(e===ct.b_stat||e===ct.b_expr)?!e.isExpr:t===h._return||t===h.name&&this.exprAllowed?hi.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===ct.b_stat:t===h._var||t===h._const||t===h.name?!1:!this.exprAllowed};Wl.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};Wl.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};Wl.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===ct.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)?ct.b_stat:ct.b_expr),this.exprAllowed=!0};h.dollarBraceL.updateContext=function(){this.context.push(ct.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?ct.p_stat:ct.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()!==ct.p_stat)&&!(t===h._return&&hi.test(this.input.slice(this.lastTokEnd,this.start)))&&!((t===h.colon||t===h.braceL)&&this.curContext()===ct.b_stat)?this.context.push(ct.f_expr):this.context.push(ct.f_stat),this.exprAllowed=!1};h.backQuote.updateContext=function(){this.curContext()===ct.q_tmpl?this.context.pop():this.context.push(ct.q_tmpl),this.exprAllowed=!1};h.star.updateContext=function(t){if(t===h._function){var e=this.context.length-1;this.context[e]===ct.f_expr?this.context[e]=ct.f_expr_gen:this.context[e]=ct.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 Ce=At.prototype;Ce.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}};Ce.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};Ce.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 Zy,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};Ce.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};Ce.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)};Ce.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};Ce.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")};Ce.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"&&QM(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 QM(t){return t.type==="MemberExpression"&&t.property.type==="PrivateIdentifier"||t.type==="ChainExpression"&&QM(t.expression)}Ce.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};Ce.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}};Ce.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 Zy,f=this.yieldPos,m=this.awaitPos,g=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var H=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=m,this.awaitIdentPos=g,this.parseArrowExpression(this.startNodeAt(e,r),H,!0,o);this.checkExpressionErrors(p,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=m||this.awaitPos,this.awaitIdentPos=g||this.awaitIdentPos;var b=this.startNodeAt(e,r);b.callee=t,b.arguments=H,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 w=this.startNodeAt(e,r);w.tag=t,w.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(w,"TaggedTemplateExpression")}return t};Ce.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(ct.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(ct.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()}};Ce.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()}};Ce.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")};Ce.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")};Ce.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")};Ce.parseParenExpression=function(){this.expect(h.parenL);var t=this.parseExpression();return this.expect(h.parenR),t};Ce.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 Zy,f=this.yieldPos,m=this.awaitPos,g;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){g=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 H=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=m,this.parseParenArrowList(r,i,u,e);(!u.length||l)&&this.unexpected(this.lastTokStart),g&&this.unexpected(g),this.checkExpressionErrors(p,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=m||this.awaitPos,u.length>1?(n=this.startNodeAt(o,a),n.expressions=u,this.finishNodeAt(n,"SequenceExpression",H,b)):n=u[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var w=this.startNodeAt(r,i);return w.expression=n,this.finishNode(w,"ParenthesizedExpression")}else return n};Ce.parseParenItem=function(t){return t};Ce.parseParenArrowList=function(t,e,r,i){return this.parseArrowExpression(this.startNodeAt(t,e),r,!1,i)};var xie=[];Ce.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=xie,this.finishNode(t,"NewExpression")};Ce.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")};Ce.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")};Ce.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)&&!hi.test(this.input.slice(this.lastTokEnd,this.start))};Ce.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")};Ce.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")};Ce.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()};Ce.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")};Ce.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)};Ce.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(DE(e,i.generator)|CE|(r?KM: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")};Ce.parseArrowExpression=function(t,e,r,i){var n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(DE(r,!1)|VM),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")};Ce.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,JM),t.body=this.parseBlock(!1,void 0,o&&!s),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=u}this.exitScope()};Ce.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};Ce.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,PE,e?null:r)}};Ce.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};Ce.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"))}};Ce.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};Ce.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};Ce.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")};Ce.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 Jy=At.prototype;Jy.raise=function(t,e){var r=jl(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};Jy.raiseRecoverable=Jy.raise;Jy.curPosition=function(){if(this.options.locations)return new Rh(this.curLine,this.pos-this.lineStart)};var ga=At.prototype,Die=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};ga.enterScope=function(t){this.scopeStack.push(new Die(t))};ga.exitScope=function(){this.scopeStack.pop()};ga.treatFunctionsAsVarInScope=function(t){return t.flags&ql||!this.inModule&&t.flags&Oh};ga.declareName=function(t,e,r){var i=!1;if(e===ho){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&Oh&&delete this.undefinedExports[t]}else if(e===XM){var s=this.currentScope();s.lexical.push(t)}else if(e===zM){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&GM&&u.lexical[0]===t)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(t)>-1){i=!0;break}if(u.var.push(t),this.inModule&&u.flags&Oh&&delete this.undefinedExports[t],u.flags&xE)break}i&&this.raiseRecoverable(r,"Identifier '"+t+"' has already been declared")};ga.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)};ga.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ga.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&xE)return e}};ga.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&xE&&!(e.flags&VM))return e}};var Ha=function(e,r,i){this.type="",this.start=r,this.end=0,e.options.locations&&(this.loc=new tc(e,i)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[r,0])},Bh=At.prototype;Bh.startNode=function(){return new Ha(this,this.start,this.startLoc)};Bh.startNodeAt=function(t,e){return new Ha(this,t,e)};function ZM(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}Bh.finishNode=function(t,e){return ZM.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)};Bh.finishNodeAt=function(t,e,r,i){return ZM.call(this,t,e,r,i)};Bh.copyNode=function(t){var e=new Ha(this,t.start,this.startLoc);for(var r in t)e[r]=t[r];return e};var eO="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",tO=eO+" Extended_Pictographic",rO=tO,iO=rO+" EBase EComp EMod EPres ExtPict",Pie=iO,Lie={9:eO,10:tO,11:rO,12:iO,13:Pie},OM="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",nO="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",sO=nO+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",oO=sO+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",aO=oO+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Tie=aO+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",$ie={9:nO,10:sO,11:oO,12:aO,13:Tie},uO={};function kie(t){var e=uO[t]={binary:ec(Lie[t]+" "+OM),nonBinary:{General_Category:ec(OM),Script:ec($ie[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(Ky=0,wE=[9,10,11,12,13];Ky<wE.length;Ky+=1)NM=wE[Ky],kie(NM);var NM,Ky,wE,He=At.prototype,go=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=uO[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=[]};go.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};go.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};go.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};go.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};go.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)};go.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)};go.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)};go.prototype.eat=function(e,r){return r===void 0&&(r=!1),this.current(r)===e?(this.advance(r),!0):!1};function Yy(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 cO(e)?(t.lastIntValue=e,t.advance(),!0):!1};function cO(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&&!cO(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+=Yy(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=Yy(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),Rie(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)};function Rie(t){return mo(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),Mie(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)};function Mie(t){return Ul(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&&!ev(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 lO(e)?(t.lastIntValue=e%32,t.advance(),!0):!1};function lO(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)&&Oie(t.lastIntValue))return!0;i&&t.raise("Invalid unicode escape"),t.pos=r}return!1};function Oie(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(Nie(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 Nie(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){Nh(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="";pO(e=t.current());)t.lastStringValue+=Yy(e),t.advance();return t.lastStringValue!==""};function pO(t){return lO(t)||t===95}He.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Fie(e=t.current());)t.lastStringValue+=Yy(e),t.advance();return t.lastStringValue!==""};function Fie(t){return pO(t)||ev(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||hO(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 ev(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;ev(r=t.current());)t.lastIntValue=10*t.lastIntValue+(r-48),t.advance();return t.pos!==e};function ev(t){return t>=48&&t<=57}He.regexp_eatHexDigits=function(t){var e=t.pos,r=0;for(t.lastIntValue=0;fO(r=t.current());)t.lastIntValue=16*t.lastIntValue+dO(r),t.advance();return t.pos!==e};function fO(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function dO(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 hO(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)};function hO(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(!fO(n))return t.pos=r,!1;t.lastIntValue=16*t.lastIntValue+dO(n),t.advance()}return!0};var Uh=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new tc(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},ke=At.prototype;ke.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 Uh(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};ke.getToken=function(){return this.next(),new Uh(this)};typeof Symbol<"u"&&(ke[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===h.eof,value:e}}}});ke.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())};ke.readToken=function(t){return mo(t,this.options.ecmaVersion>=6)||t===92?this.readWord():this.getTokenFromCode(t)};ke.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};ke.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=UM(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())};ke.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&&!Ss(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())};ke.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&&jM.test(String.fromCharCode(t)))++this.pos;else break e}}};ke.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)};ke.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))};ke.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)};ke.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)};ke.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)};ke.readToken_caret=function(){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(h.assign,2):this.finishOp(h.bitwiseXOR,1)};ke.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||hi.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)};ke.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))};ke.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)};ke.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)};ke.readToken_numberSign=function(){var t=this.options.ecmaVersion,e=35;if(t>=13&&(++this.pos,e=this.fullCharCodeAtPos(),mo(e,!0)||e===92))return this.finishToken(h.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+tv(e)+"'")};ke.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 '"+tv(t)+"'")};ke.finishOp=function(t,e){var r=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,r)};ke.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(hi.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 go(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})};ke.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 Bie(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function mO(t){return typeof BigInt!="function"?null:BigInt(t.replace(/_/g,""))}ke.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=mO(this.input.slice(e,this.pos)),++this.pos):mo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(h.num,r)};ke.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=mO(this.input.slice(e,this.pos));return++this.pos,mo(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")),mo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Bie(this.input.slice(e,this.pos),r);return this.finishToken(h.num,s)};ke.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 tv(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}ke.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)):(Ss(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(r,this.pos++),this.finishToken(h.string,e)};var gO={};ke.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t===gO)this.readInvalidTemplateToken();else throw t}this.inTemplateElement=!1};ke.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw gO;this.raise(t,e)};ke.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(Ss(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}};ke.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")};ke.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 tv(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 Ss(e)?"":String.fromCharCode(e)}};ke.readHexChar=function(t){var e=this.pos,r=this.readInt(16,t);return r===null&&this.invalidStringToken(e,"Bad character escape sequence"),r};ke.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(Ul(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?mo:Ul)(o,i)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=tv(o),r=this.pos}else break;e=!1}return t+this.input.slice(r,this.pos)};ke.readWord=function(){var t=this.readWord1(),e=h.name;return this.keywords.test(t)&&(e=EE[t]),this.finishToken(e,t)};var Uie="8.7.0";At.acorn={Parser:At,version:Uie,defaultOptions:Mh,Position:Rh,SourceLocation:tc,getLineInfo:jl,Node:Ha,TokenType:Be,tokTypes:h,keywordTypes:EE,TokContext:kn,tokContexts:ct,isIdentifierChar:Ul,isIdentifierStart:mo,Token:Uh,isNewLine:Ss,lineBreak:hi,lineBreakG:Qy,nonASCIIwhitespace:jM};function HO(t,e){return At.parse(t,e)}function rv(t,e,r){return At.parseExpressionAt(t,e,r)}var OO=require("crypto");var{stringify:jie}=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 iv={"||":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},Mn=17,qie={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:Mn,ClassExpression:Mn,FunctionExpression:Mn,ObjectExpression:Mn,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function Vl(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 IO(t,e,r,i){let n=t.expressionsPrecedence[e.type];if(n===Mn)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?iv[e.operator]<=iv[r.operator]:iv[e.operator]<iv[r.operator]}function nv(t,e,r,i){let{generator:n}=t;IO(t,e,r,i)?(t.write("("),n[e.type](e,t),t.write(")")):n[e.type](e,t)}function Wie(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 Qr(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("/*"),Wie(t,o.value,r,i),t.write("*/"+i))}}function Vie(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 TE(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 yO,vO,bO,wO,_O,AO,Gie={Program(t,e){let r=e.indent.repeat(e.indentLevel),{lineEnd:i,writeComments:n}=e;n&&t.comments!=null&&Qr(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&&Qr(e,u.comments,r,i),e.write(r),this[u.type](u,e),e.write(i)}n&&t.trailingComments!=null&&Qr(e,t.trailingComments,r,i)},BlockStatement:AO=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&&Qr(e,t.comments,s,i);let{length:a}=o;for(let u=0;u<a;u++){let c=o[u];n&&c.comments!=null&&Qr(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),Qr(e,t.comments,s,i),e.write(r));n&&t.trailingComments!=null&&Qr(e,t.trailingComments,s,i),e.write("}"),e.indentLevel--},ClassBody:AO,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===Mn||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&&Qr(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 m=0;m<f;m++){let g=p[m];n&&g.comments!=null&&Qr(e,g.comments,o,i),e.write(o),this[g.type](g,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"?TE(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:yO=function(t,e){e.write(`for ${t.await?"await ":""}(`);let{left:r}=t;r.type[0]==="V"?TE(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:yO,DebuggerStatement(t,e){e.write("debugger;",t)},FunctionDeclaration:vO=function(t,e){e.write((t.async?"async ":"")+(t.generator?"function* ":"function ")+(t.id?t.id.name:""),t),Vl(e,t.params),e.write(" "),this[t.body.type](t.body,e)},FunctionExpression:vO,VariableDeclaration(t,e){TE(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===Mn||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),Vl(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]):Vl(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:bO=function(t,e){e.write("..."),this[t.argument.type](t.argument,e)},SpreadElement:bO,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),nv(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){nv(e,t.tag,t),this[t.quasi.type](t.quasi,e)},ArrayExpression:_O=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:_O,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&&Qr(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&&Qr(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&&Qr(e,t.trailingComments,s,i),e.write(r+"}")}else n?t.comments!=null?(e.write(i),Qr(e,t.comments,s,i),t.trailingComments!=null&&Qr(e,t.trailingComments,s,i),e.write(r+"}")):t.trailingComments!=null?(e.write(i),Qr(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){Vl(e,t.expressions)},UnaryExpression(t,e){if(t.prefix){let{operator:r,argument:i,argument:{type:n}}=t;e.write(r);let s=IO(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:wO=function(t,e){let r=t.operator==="in";r&&e.write("("),nv(e,t.left,t,!1),e.write(" "+t.operator+" "),nv(e,t.right,t,!0),r&&e.write(")")},LogicalExpression:wO,ConditionalExpression(t,e){let{test:r}=t,i=e.expressionsPrecedence[r.type];i===Mn||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===Mn||r<e.expressionsPrecedence.CallExpression||Vie(t.callee)?(e.write("("),this[t.callee.type](t.callee,e),e.write(")")):this[t.callee.type](t.callee,e),Vl(e,t.arguments)},CallExpression(t,e){let r=e.expressionsPrecedence[t.callee.type];r===Mn||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("?."),Vl(e,t.arguments)},ChainExpression(t,e){this[t.expression.type](t.expression,e)},MemberExpression(t,e){let r=e.expressionsPrecedence[t.object.type];r===Mn||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(jie(t.value),t)},RegExpLiteral(t,e){let{regex:r}=t;e.write(`/${r.pattern}/${r.flags}`,t)}},Kie={};var $E=class{constructor(e){let r=e??Kie;this.output="",r.output!=null?(this.output=r.output,this.write=this.writeToStream):this.output="",this.generator=r.generator!=null?r.generator:Gie,this.expressionsPrecedence=r.expressionsPrecedence!=null?r.expressionsPrecedence:qie,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 Ho(t,e){let r=new $E(e);return r.generator[t.type](t,r),r.output}var Gl=S(sv()),jh=S(Uy());var ov="\u2716";function Li(t){return t.name===ov}function SO(){}var nt=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=SO,this.tok.validateRegExpPattern=SO,this.options.locations){var i=this.toks.curPosition();this.tok.loc=new tc(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};nt.prototype.startNode=function(){return new Ha(this.toks,this.tok.start,this.options.locations?this.tok.loc.start:null)};nt.prototype.storeCurrentPos=function(){return this.options.locations?[this.tok.start,this.tok.loc.start]:this.tok.start};nt.prototype.startNodeAt=function(e){return this.options.locations?new Ha(this.toks,e[0],e[1]):new Ha(this.toks,e)};nt.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};nt.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};nt.prototype.dummyIdent=function(){var e=this.dummyNode("Identifier");return e.name=ov,e};nt.prototype.dummyString=function(){var e=this.dummyNode("Literal");return e.value=e.raw=ov,e};nt.prototype.eat=function(e){return this.tok.type===e?(this.next(),!0):!1};nt.prototype.isContextual=function(e){return this.tok.type===h.name&&this.tok.value===e};nt.prototype.eatContextual=function(e){return this.tok.value===e&&this.eat(h.name)};nt.prototype.canInsertSemicolon=function(){return this.tok.type===h.eof||this.tok.type===h.braceR||hi.test(this.input.slice(this.last.end,this.tok.start))};nt.prototype.semicolon=function(){return this.eat(h.semi)};nt.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}};nt.prototype.pushCx=function(){this.context.push(this.curIndent)};nt.prototype.popCx=function(){this.curIndent=this.context.pop()};nt.prototype.lineEnd=function(e){for(;e<this.input.length&&!Ss(this.input.charCodeAt(e));)++e;return e};nt.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}};nt.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)};nt.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};nt.prototype.extend=function(e,r){this[e]=r(this[e])};nt.prototype.parse=function(){return this.next(),this.parseTopLevel()};nt.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};nt.parse=function(e,r){return new this(e,r).parse()};nt.BaseParser=At;var av=nt.prototype;function zie(t){return t<14&&t>8||t===32||t===160||Ss(t)}av.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)}};av.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 Uh(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&&!zie(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||Ss(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:ov}),r)return this.options.locations&&(r.loc=new tc(this.toks,jl(this.input,r.start),jl(this.input,r.end))),r}};av.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=Qy.lastIndex=0;for(var r;(r=Qy.exec(this.input))&&r.index<t;)++this.toks.curLine,this.toks.lineStart=r.index+r[0].length}};av.lookAhead=function(t){for(;t>this.ahead.length;)this.ahead.push(this.readToken());return this.ahead[t-1]};var wr=nt.prototype;wr.parseTopLevel=function(){var t=this.startNodeAt(this.options.locations?[0,jl(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")};wr.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 m=this.lookAhead(1).type;if(m===h.parenL||m===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 g=this.parseExpression();return Li(g)?(this.next(),this.tok.type===h.eof?this.finishNode(e,"EmptyStatement"):this.parseStatement()):t===h.name&&g.type==="Identifier"&&this.eat(h.colon)?(e.body=this.parseStatement(),e.label=g,this.finishNode(e,"LabeledStatement")):(e.expression=g,this.semicolon(),this.finishNode(e,"ExpressionStatement"))}};wr.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")};wr.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")};wr.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)};wr.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")};wr.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")};wr.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),Li(s.key))return Li(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 m=this.inAsync,g=this.inGenerator;this.inAsync=!1,this.inGenerator=!1,s.value=this.parseMaybeAssign(),this.inAsync=m,this.inGenerator=g}else s.value=null;this.semicolon(),this.finishNode(s,"PropertyDefinition")}return s};wr.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")};wr.isClassElementNameStart=function(){return this.toks.isClassElementNameStart()};wr.parseClassElementName=function(t){this.toks.type===h.privateId?(t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)};wr.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")};wr.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")};wr.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")};wr.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(),Li(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};wr.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(),Li(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};wr.parseModuleExportName=function(){return this.options.ecmaVersion>=13&&this.tok.type===h.string?this.parseExprAtom():this.parseIdent()};var Ye=nt.prototype;Ye.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()}};Ye.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};Ye.parseParenExpression=function(){this.pushCx(),this.expect(h.parenL);var t=this.parseExpression();return this.popCx(),this.expect(h.parenR),t};Ye.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};Ye.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};Ye.parseExprOps=function(t){var e=this.storeCurrentPos(),r=this.curIndent,i=this.curLineStart;return this.parseExprOp(this.parseMaybeUnary(!1),e,-1,t,r,i)};Ye.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};Ye.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};Ye.parseExprSubscripts=function(){var t=this.storeCurrentPos();return this.parseSubscripts(this.parseExprAtom(),t,!1,this.curIndent,this.curLineStart)};Ye.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 m=this.startNodeAt(e);m.tag=t,m.quasi=this.parseTemplate(),t=this.finishNode(m,"TaggedTemplateExpression")}else break}if(o){var g=this.startNodeAt(e);g.expression=t,t=this.finishNode(g,"ChainExpression")}return t};Ye.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(ct.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&&Li(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(ct.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()}};Ye.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")}};Ye.parseDynamicImport=function(t){return t.source=this.parseExprList(h.parenR)[0]||this.dummyString(),this.finishNode(t,"ImportExpression")};Ye.parseImportMeta=function(t){return this.next(),t.property=this.parseIdent(!0),this.finishNode(t,"MetaProperty")};Ye.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")};Ye.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")};Ye.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")};Ye.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,Li(i.key)){Li(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")};Ye.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()};Ye.parsePropertyAccessor=function(){if(this.tok.type===h.name||this.tok.type.keyword)return this.parseIdent();if(this.tok.type===h.privateId)return this.parsePrivateIdent()};Ye.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")};Ye.parsePrivateIdent=function(){var t=this.startNode();return t.name=this.tok.value,this.next(),this.finishNode(t,"PrivateIdentifier")};Ye.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)};Ye.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};Ye.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};Ye.parseFunctionParams=function(t){return t=this.parseExprList(h.parenR),this.toAssignableList(t,!0)};Ye.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")};Ye.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")};Ye.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(Li(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};Ye.parseAwait=function(){var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(),this.finishNode(t,"AwaitExpression")};Mh.tabSize=4;function CO(t,e){return nt.parse(t,e)}var kE={ecmaVersion:"latest",locations:!0,allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0,allowReserved:!0,allowReturnOutsideFunction:!0},ya=t=>t.start,RE=t=>t.end,xO=(t,e)=>t.slice(ya(e),RE(e)),va=(t,e=!1)=>(e?HO:CO)(t,kE),uv=t=>{let e=va(t);for(let r of e.body)r.type==="FunctionDeclaration"&&r.id&&Li(r.id)&&(r.id=null);return e.body};function DO(t,e,r){return e.length>1||e[0].type!=="FunctionDeclaration"?TO(t,e,!0,r):PO(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 PO=(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}}},Xie=(t,e)=>({type:"CallExpression",arguments:t.map(r=>({type:"Identifier",name:r})),callee:e,optional:!1}),LO=(t,e,r)=>Xie(t,TO(t,e,r,!0));function TO(t,e,r,i){let n=e[e.length-1];if(n.type!=="ReturnStatement"){let s=Jie(n);s&&(e=[...e.slice(0,-1),{type:"ReturnStatement",argument:s}])}return PO(t,e,r,i)}function Jie(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 ME=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=ME.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 Ft(cv(_r(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()}},rc=ME;rc.idCounter=0;async function kO(t,e,r,i){let n=At.parse(e,{locations:!0,ecmaVersion:"latest"}),s=new jh.SourceMapGenerator({file:t}),o=Ho(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 rc(await jh.SourceMapConsumer.fromSourceMap(s),{sourceMapUrl:i,compiledPath:r},"",[t],!1)}function RO(t){let e;try{e=va(t,!0)}catch{return}let r=(u,c)=>({type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:u,right:c}}),i=!1,n=!1,s=(0,Gl.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 Gl.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 Ho(a)}function qh(t){try{let e=rv(t,0,kE);return e.end<t.length||e.type!=="ObjectExpression"?t:`(${t})`}catch{return t}}function Kl(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 lv(t,e,r){let i=r.generatedPositionFor({source:t,line:e.lineNumber,column:e.columnNumber-1,bias:jh.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 OE=(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 ba(t){try{new Function(t)}catch(e){return e}}function Yie(t,e){let r=va(t),i,n;return(0,Gl.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 $O=/^[^()]+/g;function MO(t,e){try{let i=Yie(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{}$O.lastIndex=e-1;let r=$O.exec(t);if(r)return{text:r[0],start:e,end:e+r[0].length}}var Rt=()=>`
//# sourceURL=eval-${(0,OO.randomBytes)(4).toString("hex")}${".cdp"}
`;function ic(t){return Qie(""+t)}function Qie(t){let e=rv(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)}})();
${Rt()}`,decl:(...o)=>`function(){${s(o)};
${Rt()}}`}}var zl=class extends Error{constructor(r){super(r.text);this.details=r}},Wh=class{constructor(e){this.objectId=e}};function Ur(t){let e=(""+t).replace("}",Rt()+"}"),r=async({cdp:i,args:n,...s})=>{let o=await i.Runtime.callFunctionOn({functionDeclaration:e,arguments:n.map(a=>a instanceof Wh?{objectId:a.objectId}:{value:a}),...s});if(!o)throw new zl({exceptionId:0,text:"No response from CDP",lineNumber:0,columnNumber:0});if(o.exceptionDetails)throw new zl(o.exceptionDetails);return o.result};return r.source=e,r}var NO=()=>"globalThis.__jsDebugIsReady = true; "+Rt();var Vh=new Set(["page","iframe","worker","service_worker"]),UE=new Set(["page","iframe"]),BE=new Set(["page","iframe"]),Zie=BE,Xl=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 X;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 BE.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:NO()})])}parent(){return this.parentTarget&&!Vh.has(this.parentTarget.type())?this.parentTarget.parentTarget:this.parentTarget}children(){let e=[];for(let r of this._children.values())Vh.has(r.type())?e.push(r):e.push(...r.children());return e}canStop(){return Zie.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 BE.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 UE.has(this.type())}scriptUrlToUrl(e){return wa(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 Xl&&s!==this&&s._targetInfo.title===this._targetInfo.title)))return r;try{let s=new FO.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 xs(t,e){return t.length<=e?t:t.substr(0,e-1)+"\u2026"}function Jl(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 BO="/\\.?*()^${}|[]+",UO=t=>BO.includes(t);function Zr(t,e){let r=BO.split("").filter(n=>!e||e.indexOf(n)<0).join("").replace(/[\\\]]/g,"\\$&"),i=new RegExp(`[${r}]`,"g");return t.replace(i,"\\$&")}var _a=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 fv=process.platform!=="win32";function WE(){return fv}function dv(t){return fv?t:t.toLowerCase()}function hv(t,e){return fv?t===e:t.toLowerCase()===e.toLowerCase()}function nc(){return WE()?new Map:new Es(dv)}var qO,jO=process.platform==="win32"?(qO=process.env.PATHEXT)==null?void 0:qO.toLowerCase().split(";"):void 0,mv=t=>{let e=dv($i.basename(t));if(jO){for(let r of jO)if(e.endsWith(r))return e.slice(0,-r.length)}return e},VE=async(t,e)=>{for(;;){if(await e(t))return t;let r=$i.dirname(t);if(r===t)return;t=r}},Yl=(t,e,r)=>VE(e,i=>t.exists($i.join(i,r))),tne=new Set(["localhost","127.0.0.1","::1"]),rne=new Set(["0.0.0.0","::","0000:0000:0000:0000:0000:0000:0000:0000"]),pv=t=>tne.has(t.toLowerCase()),VO=t=>{try{return new yo.URL(t).hostname.replace(/^\[|\]$/g,"")}catch{return t}},GO=t=>rne.has(VO(t)),Ql=uo(async t=>{let e=VO(t);if(pv(e))return!0;try{let r=await WO.promises.lookup(e);return pv(r.address)}catch{return!1}});function wa(t,e){try{return new yo.URL(e,t).href}catch{}}function cv(t,e){try{return new yo.URL(e),e}catch{}let r;try{r=new yo.URL(t||"")}catch{return e}let i=r.protocol+"//";return r.username&&(i+=r.username+":"+r.password+"@"),i+=r.host,i+=$i.dirname(r.pathname),i[i.length-1]!=="/"&&(i+="/"),i+=e,i}function gv(t){try{return new yo.URL(t),!0}catch{return!1}}function KO(t){return t.replace(/\/$/,"").replace(/\\$/,"")}var ine=/^https:\/\/([a-z0-9\-]+)\+\.vscode-resource\.vscode-(?:webview|cdn)\.net\/(.+)/i;function mt(t){let e=ine.exec(t);if(e)t=`${e[1]}:///${e[2]}`;else if(t.startsWith("vscode-webview-resource://"))t=new yo.URL(t).pathname.replace(/%2F/gi,"/").replace(/^\/([a-z0-9\-]+)(\/{1,2})/i,(i,n,s)=>s.length===1?`${n}:///`:`${n}://`);else if(!ki(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),Ft(t)}function zO(t){return ki(t)&&(t=t.replace("file:///","\\\\"),t=t.replace(/\//g,"\\"),t=decodeURIComponent(t)),t}function Qe(t){return GE==="win32"?"file:///"+Aa(t):"file://"+Aa(t)}function XO(t){return t.startsWith("/")?"file://"+Aa(t):"file:///"+Aa(t)}function jr(t){return $i.posix.isAbsolute(t)||$i.win32.isAbsolute(t)}function _r(t){return!!t&&t.startsWith("data:")}var jE=(t,e,r)=>{if(!r||t===":"){e.add(t);return}if(t==="/"){e.add(`\\${t}`);return}UO(t)?e.add(`\\${t}`):e.add(t);let i=encodeURIComponent(t);t!=="\\"&&i!==t&&e.add(i)},nne=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("")}]`}},Gh=new Set,qE=(t,e,r,i)=>{let n="";for(let s of t.slice(e,r))fv?jE(s,Gh,i):(jE(s.toLowerCase(),Gh,i),jE(s.toUpperCase(),Gh,i)),n+=nne(Gh),Gh.clear();return n};function mi(t,[e,r]=[0,t.length]){if(r<=e)return t;let i=[],n=qE(t,0,e,!1),s=qE(t,r,t.length,!1),o=t.slice(e,r);for(let a of[decodeURIComponent(o),mt(o)]){if(!a)continue;let u=qE(a,0,a.length,!0);i.push(sne(`${n}${u}${s}`).concat("($|\\?)"))}return i.join("|")}var sne=t=>t.replace(/^(file:\\\/\\\/\\\/)?([a-z]):/i,(e,r="",i)=>`${r}[${i.toUpperCase()}${i.toLowerCase()}]:`);function ki(t){return t.startsWith("file:///")}var GE=process.platform;function Aa(t){return t=On(t),GE==="win32"?(QI(t)&&(t=t.slice(1)),t.split(/[\\//]/g).map((e,r)=>r>0?encodeURIComponent(e):e).join("/")):t.split("/").map(encodeURIComponent).join("/")}function On(t){return t&&GE==="win32"&&t[1]===":"?t[0].toUpperCase()+t.substring(1):t}var Ia=(t,e=[])=>{let r=t.urlFilter||t.url||"file"in t&&t.file;if(!r)return()=>!0;let i=ane(r,...e);return n=>i(n.url)},Zl=t=>e=>e.type==="page"&&t(e);function one(t){return!!t&&!$i.isAbsolute(t)&&!!(0,yo.parse)(t).protocol}var ane=(...t)=>{let e=n=>{n=n.toLowerCase();let s=mt(n);s?n=s:one(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=>Zr(e(n),"/*").replace(/(\/\*$)|\*/g,".*")),i=new RegExp("^("+r.join("|")+")$","g");return n=>(i.lastIndex=0,i.test(e(n)))};var vo=Symbol("ISourceMapFactory"),zh=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 rc(await new JO.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(kt)}return r}async parsePathMappedSourceMap(e){if(_r(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=Vy(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=mt(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)}};zh=$([(0,Ea.injectable)(),A(0,(0,Ea.inject)(ut)),A(1,(0,Ea.inject)(Zu)),A(2,(0,Ea.inject)(Bl)),A(3,(0,Ea.inject)(fe))],zh);var Sa=class extends zh{constructor(){super(...arguments);this.knownMaps=new Es(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}};Sa=$([(0,Ea.injectable)()],Sa);var rN=S(zE());var rp=Symbol("ISearchStrategy"),vv=Symbol("ISearchStrategyFallback"),ip=async(t,e)=>{typeof e>"u"&&(e=await xy(t));let r=Kl(e);if(!r)return;let i=_r(r);if(i||(r=wa(Qe(t),r)),!r||!r.startsWith("data:")&&!r.startsWith("file://"))return;let n;if(i)n=(0,rN.xxHash32)(r);else{let s=await OR(mt(r)||t);if(!s)return;n=s.mtimeMs}return{compiledPath:t,sourceMapUrl:r,cacheKey:n}};var bv=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 XE=Symbol("InlineSourceMapUrl"),iN=10*1e3,sc=class{constructor(e){e.__workspaceCachePath&&(this.path=wv.join(e.__workspaceCachePath,"bp-predict.json"))}async load(){if(this.value||!this.path)return this.value;try{this.value=JSON.parse(await Xh.promises.readFile(this.path,"utf-8"))}catch{}return this.value}async store(e){this.value=e,this.path&&(await Xh.promises.mkdir(wv.dirname(this.path),{recursive:!0}),await Xh.promises.writeFile(this.path,JSON.stringify(e)))}};sc=$([(0,Jt.injectable)(),A(0,(0,Jt.inject)(Ke))],sc);var Ds=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=nc(),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}):mt(u);c&&o.push({...s,sourceMapUrl:_r(s.sourceMapUrl)?{[XE]:s.sourceMapUrl}:s.sourceMapUrl,resolvedPath:c,sourceUrl:u})}return{discovered:o,compiledPath:Ft(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}};Ds=$([(0,Jt.injectable)(),A(0,(0,Jt.inject)(Ke)),A(1,(0,Jt.inject)(_s)),A(2,(0,Jt.inject)(rp)),A(3,(0,Jt.inject)(vv)),A(4,(0,Jt.inject)(fe)),A(5,(0,Jt.inject)(vo)),A(6,(0,Jt.inject)(ut)),A(7,(0,Jt.inject)(sc))],Ds);var np=class extends Ds{async getMetadataForPaths(r){this.sourcePathToCompiled||(this.sourcePathToCompiled=this.createInitialMapping());let i=await this.sourcePathToCompiled;return r.map(n=>i.get(n))}async createInitialMapping(){return bv(this.logger,"BreakpointsPredictor.createInitialMapping",()=>this.createMapping())}};np=$([(0,Jt.injectable)()],np);var sp=class extends Ds{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=>qe(r[u]))),a=this.createMapping({filter:(u,c)=>!c||c.discovered.some(l=>o.has(qe(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])))}};sp=$([(0,Jt.injectable)()],sp);var ac=Symbol("IBreakpointsPredictor"),oc=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 X;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(XE)?a.sourceMapUrl[XE]:await Xh.promises.readFile(a.compiledPath,"utf8").then(Kl);if(!u)return[];let c=await this.sourceMapFactory.load({...a,sourceMapUrl:u}),l=this.sourceMapFactory.guardSourceMapFn(c,()=>lv(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(m=>i(l.line,l.column,m)))).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:iN,patterns:[...this.outFiles.explode()].join(", ")})},iN),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)??[]}};oc=$([(0,Jt.injectable)(),A(0,(0,Jt.inject)(Ds)),A(1,(0,Jt.inject)(_s)),A(2,(0,Jt.inject)(fe)),A(3,(0,Jt.inject)(vo))],oc);var Rs=S(Y());var _v=class{constructor(e=!1,r=!1){this.verified=e;this.hit=r}},Av=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 _v(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 _v;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 Hp=S(Y());var RN=require("crypto"),MN=S(sv()),tm=S(Y());var dne=0,Mt=Symbol("ICdpApi"),uc=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}},Yt=class{constructor(e,r,i){this.logger=r;this.telemetryReporter=i;this._connectionId=dne++;this._lastId=1e3;this._disposedSessions=new Map;this._onDisconnectedEmitter=new X;this.waitWrapper=mne();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 Iv(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&&_r(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 Iv(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()))}},hne=+process.version.substring(1).split(".")[0]<11,Iv=class{constructor(e,r,i){this.logger=i;this._queue=[];this._prefixListeners=new _h;this._directListeners=new _h;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 uc(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 uc(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(!hne&&!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 mne(){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 em=S(Y());var xN=S(Se()),Fn=S(Y()),DN=S(zE()),PN=require("path"),nS=S(Uy()),LN=require("url");var gN=require("path"),HN=require("worker_threads");var cc=S(dN()),QE=require("fs"),ZE=require("worker_threads");var xne=Buffer.from("(function (exports, require, module, __filename, __dirname) { "),Dne=Buffer.from(`
});`),Pne=Buffer.from("(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { "),Lne=Buffer.from(`
}.call(this, exports, require, module, __filename, __dirname); });`),Tne=Buffer.from("#!"),$ne=Buffer.from("\r")[0],kne=Buffer.from(`
`)[0],Rne=(t,e)=>t.slice(0,e.length).equals(e),hN=(t,e,r)=>{let i=e.length===64?cc.shaHash:cc.hash;if(i(t)===e)return!0;if(r){if(Rne(t,Tne)){let n=t.indexOf(kne);return t[n-1]===$ne&&n--,i(t.slice(n))===e}if(i(Buffer.concat([xne,t,Dne]))===e)return!0}return i(Buffer.concat([Pne,t,Lne]))===e},mN=t=>t instanceof Buffer?t:Buffer.from(t,"utf-8");async function Mne(t){switch(t.type){case 0:try{let e=await QE.promises.readFile(t.file);return{id:t.id,hash:t.mode===0?(0,cc.hash)(e):(0,cc.shaHash)(e)}}catch{return{id:t.id}}case 1:try{return{id:t.id,hash:(0,cc.hash)(mN(t.data))}}catch{return{id:t.id}}case 2:try{let e=await QE.promises.readFile(t.file);return{id:t.id,matches:hN(e,t.expected,t.checkNode)}}catch{return{id:t.id,matches:!1}}case 3:try{return{id:t.id,matches:hN(mN(t.data),t.expected,t.checkNode)}}catch{return{id:t.id,matches:!1}}}}function One(t){t.on("message",e=>{Mne(e).then(r=>t.postMessage(r))})}ZE.parentPort&&One(ZE.parentPort);var Lv=class{constructor(e=3,r=(0,gN.join)(__dirname,"hash.js")){this.maxFailures=e;this.hasherScriptPath=r;this.idCounter=0;this.failureCount=0;this.deferredMap=new Map;this.deferCleanup=f$(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=Je();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 HN.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 vN=require("fs"),yN=new Lv;async function bN(t,e,r){return!t||jR(t)?void 0:e?(typeof r=="string"?await yN.verifyBytes(r,e,!0):await yN.verifyFile(t,e,!0))?t:void 0:await new xi(vN.promises).exists(t)?t:void 0}var ap=Symbol("IContainer"),Ls=Symbol("StoragePath"),gi=Symbol("IInitializeParams"),an=Symbol("VSCodeApi"),up=Symbol("IsVSCode"),It=Symbol("ExtensionContext"),tS=Symbol("ProcessEnv"),Yh=Symbol("execa"),Ie=Symbol("FS"),Ts="ExtensionLocation",lc=Symbol("IBrowserFinder"),cp=Symbol("SessionSubStates"),eS=new WeakMap,xt=(t,e)=>{if(!(typeof e=="object"&&e&&"dispose"in e))return e;let r=e,i=eS.get(t.container);return i?i.push(r):eS.set(t.container,[r]),e},Tv=t=>{var e;(e=eS.get(t))==null||e.forEach(r=>r.dispose())},Hi=Symbol("IExtensionContribution");var kv=S(Y());var wN=S(require("fs")),$v=S(require("path")),_N=t=>{let e={};f(e);function r(g,H){return t({category:"telemetry",output:g,data:H})}let i=g=>r("js-debug/dap/operation",{...e,...g}),n=g=>r("js-debug/cdp/operation",{...e,...g}),s=g=>r("js-debug/error",{...e,...g}),o=g=>{e.browser=(g.targetProject||g.targetProject)+"/"+g.targetVersion,r("js-debug/browserVersion",{...e,...g})},a=g=>r("js-debug/breakpointStats",{...e,...g}),u=g=>r("js-debug/statistics",{...e,...g}),c=g=>{e.nodeVersion=g.version,r("js-debug/nodeRuntime",{...e,...g})},l=g=>{r("js-debug/launch",{...e,...g,parameters:JSON.stringify(g.parameters)})},p=g=>{r("js-debug/diagnosticPrompt",{...e,...g})};function f(g){try{let H=$v.resolve($v.dirname(__filename),"..","..",".gitcommit");g.jsDebugCommitId=wN.readFileSync(H,"utf8")}catch{}}return{breakpointStats:a,statistics:u,browserVersion:o,cdpOperation:n,dapOperation:i,error:s,launch:l,nodeRuntime:c,diagnosticPrompt:p,setGlobalMetric:(g,H)=>{e[g]=H}}};var Qh=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 yi=class{constructor(e=!0){this.isVsCode=e;this.target=[];this.flushEmitter=new X;this.loggers=_N(e=>this.pushOutput(e));this.batchFlushTimeout={};this.batchers={dapOperation:new Qh(this.isVsCode),cdpOperation:new Qh(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},yi.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=rS(e.data),this.target instanceof Array?this.target.push(e):this.target.output(e)}};yi.batchFlushInterval=5e3,yi=$([(0,kv.injectable)(),A(0,(0,kv.inject)(up))],yi);var rS=t=>typeof t=="number"?Number(t.toFixed(1)):typeof t!="object"||!t?t:t instanceof Error?iS(t):t instanceof Array?t.map(rS):ao(t,rS),AN=/(?:[A-z]:)?(?:[\\/][^:]*)+[\\/]([^:]*:)/g;function iS(t){let e=String(t.message),r=String(t.name);AN.lastIndex=0;let i=typeof t.stack=="string"?t.stack.replace(AN,"$1"):void 0;return{error:{message:e,name:r,stack:i}}}var xa=Symbol("IScriptSkipper");function IN(t){return typeof t.lineNumber=="number"&&typeof t.columnNumber=="number"&&!!t.source}var EN=()=>({source:null,line:null,column:null,name:null,lastColumn:null,isSourceMapLoadFailure:!0}),Nne=t=>t.endsWith(".hot-update.js"),Fne={load:0,resolveLocation:2e3,sourceMapMinPause:1e3,output:1e3,sourceMapCumulativePause:1e4},Zh=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=Fe(n),this._container=e,this.absolutePath=i||"",this._fqname=this._fullyQualifiedName(),this._name=this._humanName(),this.setSourceMapUrl(s),this._existingAbsolutePath=bN(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(ei(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 kO(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()?xN.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(jr(this._fqname)){for(let e of this._container.rootPaths)if(Ly(e,this._fqname))return qe((0,PN.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(jr(this.url))return this.url;let e=mt(this.url);if(e)return e;let r=this.url;try{let n=[],s=new LN.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)}},rr=class extends Zh{constructor(){super(...arguments);this.compiledToSourceUrl=new Map}},ei=t=>!!t&&t instanceof Zh&&!!t.sourceMap,SN=(t,e)=>e instanceof rr&&e.compiledToSourceUrl.has(t);var CN=2**31-1,fr=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 X;this.onScriptEmitter=new X;this._sourceByOriginalUrl=new Es(e=>e.toLowerCase());this._sourceByReference=new Map;this._sourceMapSourcesByUrl=new Map;this._sourceByAbsolutePath=nc();this._sourceMaps=new Map;this._sourceMapTimeouts=Fne;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,Pi(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,DN.xxHash32)(e)&CN;for(let i=0;i<65535;i++){if(!this._sourceByReference.has(r))return r;r===CN&&(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(;ei(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,Oe(this._sourceMapTimeouts.resolveLocation)]),!n.map)return{...e,isMapped:r,unmappedReason:i};let s=this._sourceMappedUiLocation(e,n.map);if(!IN(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 Sa&&this.sourceMapFactory.invalidateCache()}_uiLocations(e){return[...this.getSourceMapUiLocations(e),e,...this.getCompiledLocations(e)]}getSourceMapUiLocations(e){var s;if(!ei(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(!IN(i))return[];let n=this.getSourceMapUiLocations(i);return n.push(i),n}_sourceMappedUiLocation(e,r){let i=e.source;if(!ei(i))return 1;if(this._temporarilyDisabledSourceMaps.has(i)||this._permanentlyDisabledSourceMaps.has(i))return 0;let n=this.getOptiminalOriginalPosition(r,pc(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 rr))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,()=>lv(n,e,s.map),EN);if(!o)continue;let{lineNumber:a,columnNumber:u}=Da({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:nS.SourceMapConsumer.GREATEST_LOWER_BOUND});return i.line!==null?i:e.originalPositionFor({line:r.lineNumber,column:r.columnNumber-1,bias:nS.SourceMapConsumer.LEAST_UPPER_BOUND})},EN)}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 Zh(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&&!SN(r,e)&&this.removeSource(r,!0),this._sourceByOriginalUrl.set(e.url,e),this._sourceByReference.set(e.sourceReference,e),e instanceof rr&&this._sourceMapSourcesByUrl.set(e.url,e);let i=this._sourceByAbsolutePath.get(e.absolutePath);if((i===void 0||i.url.length>=e.url.length||SN(i,e))&&this._sourceByAbsolutePath.set(e.absolutePath,e),this.scriptSkipper.initializeSkippingValueForSource(e),e.toDap().then(u=>this._dap.loadedSource({reason:"new",source:u})),!ei(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=Je(),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=Qe(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:iS(u)})}catch{}}if(!o.map)return this._dap.output({output:Vy(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 rr){this._sourceMapSourcesByUrl.delete(e.url);for(let[s,o]of e.compiledToSourceUrl)s.sourceMap.sourceByUrl.delete(o)}if(this._sourceByAbsolutePath.delete(e.absolutePath),ei(e)&&(this._permanentlyDisabledSourceMaps.delete(e),this._temporarilyDisabledSourceMaps.delete(e)),r||e.toDap().then(s=>this._dap.loadedSource({reason:"removed",source:s})),!ei(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?Qe(s):r.computedSourceUrl(n),a=this._sourceMapSourcesByUrl.get(o);if(e===a)continue;if(a)if(Nne(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&&Qe(s),c=this.sourceMapFactory.guardSourceMapFn(r,()=>r.sourceContentFor(n,!0),()=>null),l;if(c){let f=Kl(c);if(f&&(!_r(f)&&s?l=wa(s?Qe(s):n,f):l=f),s&&l){let m={sourceMapUrl:l,compiledPath:s};this.sourcePathResolver.shouldResolveSourceMap(m)||(l=void 0)}}let p=new rr(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(!ei(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()}};fr=$([(0,Fn.injectable)(),A(0,(0,Fn.inject)(rn)),A(1,(0,Fn.inject)(vo)),A(2,(0,Fn.inject)(fe)),A(3,(0,Fn.inject)(Ke)),A(4,(0,Fn.inject)(gi)),A(5,(0,Fn.inject)(ut)),A(6,(0,Fn.inject)(xa)),A(7,(0,Fn.inject)(Zu))],fr);function Da(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 pc(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 TN=t=>({lineNumber:t.lineNumber+1,columnNumber:t.columnNumber+1}),Pa=t=>({lineNumber:t.lineNumber-1,columnNumber:t.columnNumber-1});var lp=class{constructor(e,r){this.lineNumber=e;this.columnNumber=r}get base0(){return this}get base1(){return new Ri(this.lineNumber+1,this.columnNumber+1)}get base01(){return new pp(this.lineNumber,this.columnNumber+1)}compare(e){return this.lineNumber-e.lineNumber||this.columnNumber-e.columnNumber||0}},Ri=class{constructor(e,r){this.lineNumber=e;this.columnNumber=r}get base0(){return new lp(this.lineNumber-1,this.columnNumber-1)}get base1(){return this}get base01(){return new pp(this.lineNumber-1,this.columnNumber)}compare(e){return this.lineNumber-e.lineNumber||this.columnNumber-e.columnNumber||0}},pp=class{constructor(e,r){this.lineNumber=e;this.columnNumber=r}get base0(){return new lp(this.lineNumber-1,this.columnNumber)}get base1(){return new Ri(this.lineNumber,this.columnNumber+1)}get base01(){return this}compare(e){return this.lineNumber-e.lineNumber||this.columnNumber-e.columnNumber||0}};var $N=/[$a-z_][$0-9A-Z_$]*/iy,La=Symbol("IRenameProvider"),fp=class{constructor(e,r){this.sourceMapFactory=e;this.launchConfig=r;this.renames=new Map}provideOnStackframe(e){if(!this.launchConfig.sourceMapRenames)return Bn.None;let r=e.uiLocation();return r===void 0?Bn.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 rr))return Bn.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 Bn.None;let o=await r.content();return o?this.createFromSourceMap(s,o):Bn.None}).catch(()=>Bn.None);return this.renames.set(r.url,n),n}createFromSourceMap(e,r){let i=new _a(r),n=[];return e.eachMapping(s=>{if(!s.name)return;let o=new pp(s.generatedLine,s.generatedColumn),a=i.convert(o);$N.lastIndex=a;let u=$N.exec(r);u&&n.push({compiled:u[0],original:s.name,position:o})}),n.sort((s,o)=>s.position.compare(o.position)),new Bn(n)}};fp=$([(0,em.injectable)(),A(0,(0,em.inject)(vo)),A(1,(0,em.inject)(Ke))],fp);var sS=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}},Bn=sS;Bn.None=new sS([]);var bo="$returnValue",Bne="__js_debug_hoisted_",kN=()=>Bne+(0,RN.randomBytes)(8).toString("hex"),un=Symbol("IEvaluator"),dp=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+=Rt());let s=new Map;s.set(bo,kN());for(let u of i??[])s.set(u,kN());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===bo?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}; ${Rt()} }`}):await this.cdp.Runtime.evaluate({expression:`globalThis.${r} = ${JSON.stringify(e==null?void 0:e.value)};${n};`+Rt()})}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=va(e),c=(0,MN.replace)(u,{enter(p,f){let m=p;if(p.type!=="Identifier"||e[m.start-1]===".")return;let g=r.get(p.name);if(g)return n.add(p.name),s=!0,this.skip(),OE(p,f)?{type:"Identifier",name:g}:o(g,Une);let H=i==null?void 0:i.mapping.getCompiledName(p.name,i.position);if(H)return s=!0,this.skip(),OE(p,f)?{type:"Identifier",name:H}:o(H,p)},leave:()=>{a.pop()}});if(!s)return{hoisted:n,transformed:e};let l=u.body[u.body.length-1].end;return{hoisted:n,transformed:Ho(c)+e.slice(l)}}};dp=$([(0,tm.injectable)(),A(0,(0,tm.inject)(Mt)),A(1,(0,tm.inject)(La))],dp);var Une={type:"Identifier",name:"undefined"};var hp=class{static parse(e,r,i,n){i&&(r=oS(r));let s=r&&ba(r);if(s)throw new ne(ma(e,s.message));let{canEvaluateDirectly:o,invoke:a}=n.prepare(r);return new hp(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}},oS=t=>`(()=>{try{return ${t};}catch(e){console.error(e);return true}})()`;var jne=/^(>|>=|={1,3}|<|<=|%)?\s*([0-9]+)$/,Ta=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=jne.exec(e);if(!r)throw new ne(EM(e));let[,i,n]=r,s=i==="%"?`return (numHits % ${n}) === 0;`:i[0]==="="?`return numHits === ${n};`:`return numHits ${i} ${n};`;return new Ta(new Function("numHits",s))}};var ON=require("crypto"),Mv=S(Y());var Rv=class{constructor(e){this.invoke=e;this.breakCondition=void 0}async shouldStayPaused(e){return await this.invoke({callFrameId:e.callFrames[0].callFrameId}),!1}};var mp=class{constructor(e,r){this.breakCondition=r;let i=r&&ba(r);if(i)throw new ne(ma(e,i.message))}shouldStayPaused(){return Promise.resolve(!0)}};var $a=class{constructor(e){this.evaluator=e}compile(e,r){let i=this.logMessageToExpression(r),n=ba(i);if(n)throw new ne(ma(e,n.message));let{canEvaluateDirectly:s,invoke:o}=this.evaluator.prepare(i);return s?new mp(e,this.logMessageToExpression(r)):new Rv(o)}serializeLogStatements(e){return LO([],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]=uv(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(Ho(this.serializeLogStatements(l.body))),i.push("%O")}let a=`console.log(${[JSON.stringify(i.join("")),...n].join(", ")}), false`,u=(0,ON.createHash)("sha1").update(a).digest("hex").slice(0,7);return a+`
//# sourceURL=logpoint-${u}.cdp`}};$a=$([(0,Mv.injectable)(),A(0,(0,Mv.inject)(un))],$a);var qne=new mp({line:0},void 0),Ov=Symbol("IBreakpointConditionFactory"),gp=class{constructor(e,r,i){this.logPointCompiler=e;this.evaluator=r;this.breakOnError=i.__breakOnConditionalError}getConditionFor(e){return e.condition?hp.parse(e,e.condition,this.breakOnError,this.evaluator):e.logMessage?this.logPointCompiler.compile(e,e.logMessage):e.hitCondition?Ta.parse(e.hitCondition):qne}};gp=$([(0,Hp.injectable)(),A(0,(0,Hp.inject)($a)),A(1,(0,Hp.inject)(un)),A(2,(0,Hp.inject)(Ke))],gp);var Bv=require("path");var Nv=(t,e)=>t.lineNumber===e.lineNumber&&t.columnNumber===e.columnNumber;var Fv=t=>!("location"in t),NN=t=>"location"in t,FN=(t,e)=>t.url&&e===t.url||t.urlRegex&&new RegExp(t.urlRegex).test(e),yp=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 rr))&&r.push(this._setByPath(e,Da(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,Da(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=this._manager._sourceContainer.currentSiblingUiLocations({lineNumber:this.originalPosition.lineNumber,columnNumber:this.originalPosition.columnNumber,source:i},await r.source);if(!n.length)return[];let s=[];for(let o of n)s.push(this._setByScriptId(e,r,Da(o,i.runtimeScriptOffset)));for(let o of this.cdpBreakpoints){if(!Fv(o.args)||!this.breakpointIsForSource(o.args,i))continue;let a=o.args;n.some(u=>u.columnNumber-1===a.columnNumber&&u.lineNumber-1===a.lineNumber)||(this._manager.logger.verbose("runtime.sourcemap","Adjusted breakpoint due to overlaid sourcemap",{url:i.url}),s.push(this.removeCdpBreakpoint(o)))}return await Promise.all(s),n}executionContextWasCleared(){this.updateCdpRefs(e=>e.filter(r=>Fv(r.args)))}breakpointIsForSource(e,r){if(FN(e,r.url))return!0;let i=this._manager._sourceContainer.sourcePathResolver.rebaseLocalToRemote(r.absolutePath);return!!FN(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 rr&&[...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,Qe(this.source.path),r)}}hasSetOnLocation(e,r){return this.cdpBreakpoints.find(i=>e.scriptId&&NN(i.args)&&i.args.location.scriptId===e.scriptId&&Nv(i.args.location,r)||e.url&&Fv(i.args)&&new RegExp(i.args.urlRegex??"").test(e.url)&&Nv(i.args,r))}hasSetOnLocationByRegexp(e,r){return this.cdpBreakpoints.find(i=>{if(Fv(i.args))return i.args.urlRegex===e&&Nv(i.args,r);let n=this._manager._sourceContainer.getScriptById(i.args.location.scriptId);if(n)return Nv(i.args.location,r)&&new RegExp(e).test(n.url)})}async _setByUrl(e,r,i){return this._setByUrlRegexp(e,mi(r),i)}async _setByUrlRegexp(e,r,i){i=Pa(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=Pa(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=NN(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 Un=class extends yp{constructor(r,i,n){super(r,i,{lineNumber:1,columnNumber:1});this.mode=n}static getModeKeyForSource(r,i){return r===1?(0,Bv.basename)(i,(0,Bv.extname)(i)||void 0):i}_setPredicted(){return Promise.resolve()}_setByPath(r,i){if(!this.source.path)return Promise.resolve();let n=Un.getModeKeyForSource(this.mode,this.source.path);return this.mode===1?super._setByUrlRegexp(r,Zr(n),i):super._setByPath(r,i)}};var UN=S(Se());var cn=class extends yp{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=Je()}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:UN.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 Uv=class extends cn{constructor(e,r,i,n){super(e,r,i,n,new Ta(()=>!1))}getResolvedUiLocation(){}};var XF=S(om());var wp=class extends Un{constructor(r,i){super(r,{path:i},1);this.pattern=i}async enable(r){if(this.isEnabled)return;this.isEnabled=!0;let i=(0,XF.makeRe)(qe(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 Ip=S(Y());var _p={dispose:()=>{}},Le=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 Ap=Symbol("IExperimentationService");var jt=Symbol("ITelemetryReporter");var soe=/\/node_modules\/|^node\:/,ooe=2,JF=5e3,aoe=JF/2,St=class{constructor(e,r,i){this.telemetry=r;this.experimentation=i;this.disposable=new Le;this.hadBreakpoint=!1;this.didVerifyBreakpoint=!1;this.hadNonModuleSourcemap=!1;this.startedAt=Date.now();this.disposable.push(St.didVerifyEmitter.event(()=>{this.didVerifyBreakpoint=!0})),St.consecutiveQualifyingSessions>=ooe&&this.disposable.push(HM(async()=>{this.currentlyQualifying&&await this.experimentation.getTreatment("diagnosticPrompt",!0)&&(r.report("diagnosticPrompt",{event:"suggested"}),St.didSuggest=!0,e.suggestDiagnosticTool({}))},JF))}get currentlyQualifying(){return this.hadBreakpoint&&!this.didVerifyBreakpoint&&this.hadNonModuleSourcemap}notifyHadBreakpoint(){this.hadBreakpoint=!0}notifyVerifiedBreakpoint(){this.didVerifyBreakpoint||(St.didVerifyEmitter.fire(),St.didSuggest&&(St.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&&!soe.test(i.url)&&(this.hadNonModuleSourcemap=!0,this.disposable.disposeObject(r))}))}}dispose(){this.currentlyQualifying&&Date.now()-aoe>this.startedAt?St.consecutiveQualifyingSessions++:St.consecutiveQualifyingSessions=0,this.disposable.dispose()}};St.consecutiveQualifyingSessions=0,St.didVerifyEmitter=new X,St.didSuggest=!1,St=$([(0,Ip.injectable)(),A(0,(0,Ip.inject)(Bl)),A(1,(0,Ip.inject)(jt)),A(2,(0,Ip.inject)(Ap))],St);var YF=t=>t.originalPosition.columnNumber===1&&t.originalPosition.lineNumber===1,QF=500,ZF=Symbol("DontCompare");var pn=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 Av;this.entryBreakpointMode=0;this._enabledFilter=()=>!0;this._byDapId=new Map;this._byPath=nc();this._byRef=new Map;this.moduleEntryBreakpoints=nc();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 m of p[f]){let g=m.absolutePath,H=g?this._byPath.get(g):void 0;for(let w of H||[])l.push(w.updateForSourceMap(this._thread,u));let b=this._byRef.get(m.sourceReference);for(let w of b||[])l.push(w.updateForSourceMap(this._thread,u));m.sourceMap&&p.push(m.sourceMap.sourceByUrl.values())}return Wu(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=>h$(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=ZF){if(r!==ZF&&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],m=u[p];if(f.source!==m.source){this.logger.warn("internal","Expected to have the same number of start and end scripts");continue}let g=f.source;if(!g.scripts.length)continue;let{scriptId:H}=g.scripts[g.scripts.length-1];c.push(e.cdp().Debugger.getPossibleBreakpoints({restrictToFunction:!1,start:{scriptId:H,...Da(Pa(f),g.runtimeScriptOffset)},end:{scriptId:H,...Da(Pa(m),g.runtimeScriptOffset)}}).then(b=>{if(b)for(let w of b.locations){let{lineNumber:k,columnNumber:U=0}=w,x=this._sourceContainer.currentSiblingUiLocations({source:g,...pc(TN({lineNumber:k,columnNumber:U}),g.runtimeScriptOffset)});l.push({breakLocation:w,uiLocations:x})}}))}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);ei(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(){bv(this.logger,"BreakpointManager.launchBlocker",async()=>{this._predictorDisabledForTest||await Promise.all([...this._launchBlocker])})}setRuntimeSourcemapPausePatterns(e,r){return Promise.all(r.map(i=>this._setBreakpoint(new wp(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([Oe(QF),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=On(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 g;let m={unbound:f.slice(),new:[],list:[]};if(!e.breakpoints)return m;for(let H=0;H<e.breakpoints.length;H++){let b=e.breakpoints[H],w;try{w=new cn(this,r[H],e.source,b,this.conditionFactory.getConditionFor(b))}catch(x){if(!(x instanceof ne))throw x;this._dap.output({category:"stderr",output:x.message}),w=new Uv(this,r[H],e.source,b)}let k=m.unbound.findIndex(x=>x.equivalentTo(w)),U=m.unbound[k];(g=U==null?void 0:U.equivalentTo)!=null&&g.call(U,w)?(m.list.push(U),m.unbound.splice(k,1)):(m.new.push(w),m.list.push(w),this._byDapId.set(w.dapId,w))}return m},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(),m=Promise.all(u.new.filter(this._enabledFilter).filter(g=>f==null?void 0:f.includes(g)).map(g=>g.enable(s)));this.addLaunchBlocker(Promise.race([Oe(QF),m])),await m}let c=await Promise.all(u.list.map(f=>f.toDap()));return this._breakpointsStatisticsCalculator.registerBreakpoints(c),Oe(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 wp||n.disable();return!0}return e.some(n=>{let s=this._resolvedBreakpoints.get(n);return s&&(s instanceof Un||YF(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 Un){this.entryBreakpointMode===0&&!(u instanceof wp)&&u.disable(),o++;return}u instanceof cn&&(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 cn&&this._breakpointsStatisticsCalculator.registerBreakpointHit(i.dapId)}}statisticsForTelemetry(){return this._breakpointsStatisticsCalculator.statistics()}ensureModuleEntryBreakpoint(e,r){if(!r.path||(this._byPath.get(r.path)??[]).some(YF))return;let n=Un.getModeKeyForSource(this.entryBreakpointMode,r.path);if(!r.path||this.moduleEntryBreakpoints.has(n))return;let s=new Un(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)))}}};pn=$([(0,Rs.injectable)(),A(0,(0,Rs.inject)(rn)),A(1,(0,Rs.inject)(fr)),A(2,(0,Rs.inject)(fe)),A(3,(0,Rs.inject)(Ke)),A(4,(0,Rs.inject)(Ov)),A(5,(0,Rs.inject)(St)),A(6,(0,Rs.inject)(ac))],pn);var H2=require("crypto"),Tp=S(Y());var am=class{constructor(e){this.element=e,this.next=am.Undefined,this.prev=am.Undefined}},lt=am;lt.Undefined=new am(void 0);var um=class{constructor(){this._first=lt.Undefined;this._last=lt.Undefined;this._size=0}get size(){return this._size}isEmpty(){return this._first===lt.Undefined}clear(){let e=this._first;for(;e!==lt.Undefined;){let r=e.next;e.prev=lt.Undefined,e.next=lt.Undefined,e=r}this._first=lt.Undefined,this._last=lt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,r){let i=new lt(e);if(this._first===lt.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!==lt.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==lt.Undefined){let e=this._last.element;return this._remove(this._last),e}}applyFilter(e){let r=this._first;for(;r!==lt.Undefined;){let i=r.next;e(r.element)||this._remove(r),r=i}}_remove(e){if(e.prev!==lt.Undefined&&e.next!==lt.Undefined){let r=e.prev;r.next=e.next,e.next.prev=r}else e.prev===lt.Undefined&&e.next===lt.Undefined?(this._first=lt.Undefined,this._last=lt.Undefined):e.next===lt.Undefined?(this._last=this._last.prev,this._last.next=lt.Undefined):e.prev===lt.Undefined&&(this._first=this._first.next,this._first.prev=lt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==lt.Undefined;)yield e.element,e=e.next}};var rb=S(Y()),d2=S(require("net"));var Ms=class extends ne{constructor(e){super({id:9243,format:e,showUser:!0}),this._cause={id:9243,format:e,showUser:!0}}};function Os(t,e,r){if(e.isCancellationRequested)return Promise.reject(new Ms(r||"Task cancelled"));let i=Je(),n=e.onCancellationRequested(i.resolve);return Promise.race([i.promise.then(()=>{throw new Ms(r||"Task cancelled")}),t.then(s=>(n.dispose(),s)).catch(s=>{throw n.dispose(),s})])}function eB(t,e){let r=new dr(e),i=t.map(async n=>{try{return await n(r.token)}finally{r.cancel()}});return Promise.race(i)}var tB=Object.freeze(function(t,e){let r=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(r)}}}),hr=Object.freeze({isCancellationRequested:!1,onCancellationRequested:()=>({dispose:()=>{}})}),uoe=Object.freeze({isCancellationRequested:!0,onCancellationRequested:tB}),dr=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 dr(r),n=i._token=new Ep,s=setTimeout(()=>n.cancel(),e);return n.onCancellationRequested(()=>clearTimeout(s)),i}get token(){return this._token||(this._token=new Ep),this._token}cancel(){this._token?this._token instanceof Ep&&this._token.cancel():this._token=uoe}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Ep&&this._token.dispose():this._token=hr}},Ep=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?tB:(this._emitter||(this._emitter=new X),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var VS=S(require("net"));var hae=S(sB(),1),mae=S(TS(),1),gae=S($S(),1),o2=S(US(),1),WS=S(s2(),1);var a2=o2.default;var u2=(t,e)=>t+Math.floor(Math.random()*(e-t));async function Oa({min:t=53e3,max:e=54e3,attempts:r=1e3,tester:i=l2}={},n=hr){let s=u2(t,e);for(let o=Math.min(r,e-t);;o--)try{return await i(s,n)}catch(a){if(o===0||a instanceof Ms)throw a;s=s===e-1?t:s+1}}async function c2(t,e){try{return await l2(t,e),!0}catch{return!1}}function l2(t,e=hr){let r;return new Promise((i,n)=>{let s=VS.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 Ms("Port open lookup cancelled"))})}).finally(()=>r==null?void 0:r.dispose())}var p2=(t,e)=>(r,i)=>{let n=VS.createServer(t);return n.listen(r,e),tb(n,i)},f2=t=>(e,r)=>tb(new WS.default({host:"127.0.0.1",...t,port:e}),r),tb=(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 Ms("Port open lookup cancelled"))})}).finally(()=>r==null?void 0:r.dispose())};var h2=async(t,e,r,i,n=hr)=>{let s=r?await tb(d2.createServer(e).listen(r,i),n):await Oa({tester:p2(e,i)},n),o=t.register(s.address().port);return s.on("close",()=>o.dispose()),s.on("error",()=>o.dispose()),s},ib=async(t,e,r)=>{let i=await Oa({tester:f2(e)},r),n=t.register(i.address().port);return i.on("close",()=>n.dispose()),i.on("error",()=>n.dispose()),i},gt=Symbol("IPortLeaseTracker"),Pp=class{constructor(e){this.usedPorts=new Set;this.onRegistered=new X;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):eB([()=>Oe(r).then(()=>!1),i=>new Promise(n=>{let s=this.onRegistered.event(o=>{o===e&&n(!0)});i.onCancellationRequested(()=>s.dispose())})])}};Pp=$([(0,rb.injectable)(),A(0,(0,rb.inject)(Ts))],Pp);var m2="JsDebug",g2="*";var GS=class{constructor(){this.replays=new Map}addReplay(e,r,i){let n=this.replays.get(e);return n||(n=new um,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 um;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)??[]}},nb=Symbol("ICdpProxyProvider"),Lp=class{constructor(e,r,i){this.cdp=e;this.portTracker=r;this.logger=i;this.disposables=new Le;this.replay=new GS;this.jsDebugApi={subscribe:(e,{events:r})=>{for(let i of r)i.endsWith(g2)?e.pushDisposable(this.cdp.session.onPrefix(i.slice(0,-g2.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,H2.randomBytes)(20).toString("hex")}`,r=await ib(this.portTracker,{perMessageDeflate:!0,path:e});return this.logger.info("proxyActivity","activated cdp proxy"),r.on("connection",i=>{let n=new KS(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===m2?await this.invokeJsDebugDomainMethod(n,p,u):await this.invokeCdpMethod(n,l,p,u);n.send({id:c,result:f})}catch(f){let m=f instanceof uc&&f.cause?f.cause:{code:0,message:f.message};n.send({id:c,error:m})}})}),{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 uc(r).setCause(-32601,`${m2}.${r} not found`);return this.jsDebugApi[r](e,i)}};Lp=$([(0,Tp.injectable)(),A(0,(0,Tp.inject)(Mt)),A(1,(0,Tp.inject)(gt)),A(2,(0,Tp.inject)(fe))],Lp);var vae=0,KS=class{constructor(e,r){this.webSocket=e;this.logger=r;this.disposables=new Le;this.id=vae++}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 kp=S(sv()),ym=S(Y());var zS=Ur(function(t,e,r){let i=r?"variable":"property",n=(l,p,f)=>{if(p!=="function")return i;if(l==="constructor")return"class";let m=String(f);return m.startsWith("class ")||m.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),m=i,g;try{let H=c[p];m=n(p,typeof(f==null?void 0:f.value),H),g=s(H)}catch{}o.push({label:p,sortText:u+p.replace(/^_+/,H=>"{".repeat(H.length)),type:m,detail:g})}r=!1}return{result:o,isArray:this instanceof Array}}),y2=ic(zS.source);var bae=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 wae(t){let e=!1;return(0,kp.traverse)(t,{enter(r){if(r.type==="CallExpression"||r.type==="NewExpression"||r.type==="UnaryExpression"&&r.operator==="delete"||r.type==="ClassBody")return e=!0,kp.VisitorOption.Break}}),e}var sb=Symbol("ICompletions"),$p=class{constructor(e,r){this.evaluator=e;this.cdp=r}async completions(e){let r=va(e.expression),i=new _a(e.expression).convert(e.position),n=()=>Promise.resolve([]);return(0,kp.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(ya(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:ya(r.property),length:RE(r.property)-ya(r.property)}))}async identifierCompleter(e,r,i,n){let s=[];(0,kp.traverse)(r,{enter(u){var l;let c=bae(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(ya(i),n),a=[...s,...await this.defaultCompletions(e,o)];return this.evaluator.hasReturnValue&&e.executionContextId!==void 0&&bo.startsWith(o)&&a.push({sortText:`~${bo}`,label:bo,type:"variable"}),a}async propertyAccessCompleter(e,r,i){let{result:n,isArray:s}=await this.completePropertyAccess({executionContextId:e.executionContextId,stackFrame:e.stackFrame,expression:xO(e.expression,r.object),prefix:Li(r.property)?"":e.expression.slice(ya(r.property),i),throwOnSideEffect:wae(r)}),o=ya(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:y2.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 zS({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&&bo.startsWith(r)?[{sortText:`~${bo}`,label:bo,type:"variable"}]:[]}};$p=$([(0,ym.injectable)(),A(0,(0,ym.inject)(un)),A(1,(0,ym.inject)(Mt))],$p);var db=S(Se());var Bs=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 j2=S(B2());var Oae=1e4;function Nae(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 m=p?Number(p):void 0;n(f,m,o),++o}s=c+u[0].length}return i(t.substring(s)),r}function eC(t,e,r){let i=Nae(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 Bs(Oae),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 U2(t){try{return new j2.default(t).ansi256().object().ansi256}catch{}}function q2(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=U2(i[2]);n&&(r+=`\x1B[38;5;${n}m`);break;case"background":case"background-color":let s=U2(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 V2=t=>t.replace(/\\/gm,"\\\\").replace(/\n/gm,"\\n").replace(/\r/gm,"\\r").replace(/\t/gm,"\\t"),Bae={budget:1e5,quoted:!0},W2={budget:1e3,quoted:!0,postProcess:V2},Uae={budget:1/0,quoted:!1},jae={budget:1e3,quoted:!0,postProcess:V2},qae={budget:1e5,quoted:!0},lb=t=>{switch(t){case"repl":return Bae;case"hover":return W2;case"propertyValue":return W2;case"watch":return jae;case"copy":case"clipboard":return Uae;default:return qae}};var Wae=30,Vae=100,tC=20,Gae=1e4,Kae=3,G2=120,rC=new Set(["null","regexp","date"]);function gc(t){return t.type==="function"||t.type==="object"&&!rC.has(t.subtype)}function iC(t){return t.subtype==="array"||t.subtype==="typedarray"}function Hc(t,e,r){var s;let i=lb(e),n=pb(t,i,r);return((s=i.postProcess)==null?void 0:s.call(i,n))??n}function pb(t,e,r){return t.type==="function"?t.description?J2(t.description,e.budget):"<function>":t.type==="object"&&t.subtype==="node"?t.description:"preview"in t&&t.preview?fb(t.preview,e.budget,r):X2(t,e.budget,e.quoted,r)}function fb(t,e,r){return iC(t)?zae(t,e):t.subtype==="internal#entry"?xs(t.description||"",e):t.type==="function"?J2(t.description,e):gc(t)?Xae(t,e,r):Yae(t,e,r)}function zae(t,e){let r=new Bs(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(xs(i,r.budget())),r.append(" ");let o=new Bs(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(_m(u,o.budget()))}s>a+1&&o.appendEllipsis();for(let u of t.properties){if(!o.checkBudget())break;isNaN(u.name)&&o.append(_m(u,o.budget(),u.name))}return t.overflow&&o.appendEllipsis(),r.append("["+o.build()+"]"),r.build()}function Xae(t,e,r){let i=new Bs(e," ");t.description!=="Object"&&i.append(xs(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(`(${_m(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(`{${_m(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 Bs(i.budget()-2,", ");for(let f of s){if(!l.checkBudget())break;l.append(_m(f,l.budget(),f.name))}for(let f of t.entries||[]){if(!l.checkBudget())break;if(f.key){let m=fb(f.key,Math.min(tC,l.budget()),r),g=fb(f.value,Math.min(tC,l.budget()-m.length-4),r);l.append(Op(m," => ",g,l.budget()))}else l.append(fb(f.value,Math.min(tC,l.budget()),r))}t.overflow&&l.appendEllipsis();let p=l.build();return p?i.append("{"+p+"}"):i.isEmpty()&&i.append("{}"),i.build()}function K2(t,e){return t.length<=e?t:"\u2026"}function Jae(t,e){return t.length>=e?t.slice(0,e-1)+"\u2026":t}function Yae(t,e,r){if(t.type==="object"&&t.subtype==="null")return K2("null",e);if(t.type==="undefined")return K2("undefined",e);if(t.type==="string"){let i=t.description??t.value;return r!=null&&r.hex&&(i=Buffer.from(i,"utf8").toString("hex")),Jl(i,e)}return t.type==="number"||t.type==="bigint"?Am(t,!1,e,r):Jae(t.description||"",e)}function Op(t,e,r,i){return t===void 0?Jl(r,i):t.length+e.length>i?xs(t,i):`${t}${e}${Jl(r,i-t.length-e.length)}`}function _m(t,e,r){return e=Math.min(e,Vae),t.type==="function"?Op(r,": ","\u0192",e):t.type==="object"&&t.value==="Object"?Op(r,": ","{\u2026}",e):typeof t.value>"u"?Op(r,": ",`<${t.type}>`,e):t.type==="string"?Op(r,": ",`'${t.value}'`,e):Op(r,": ",t.value??"unknown",e)}function X2(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=Jl(n,r?e-2:e);return r?`'${s}'`:s}return t.type==="undefined"?"undefined":t.subtype==="null"?"null":t.type==="bigint"||t.type==="number"?Am(t,!1,e,i):t.description?xs(t.description,Math.max(e,1e5)):xs(String("value"in t?t.value:t.description),e)}function J2(t,e){let r=new Bs(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 g=/^[^{\s]+/.exec(p.trim()),H="";g&&(H=g[0].trim()||""),m("class",p,H)}else if(n)p=i.substring(n[1].length),m("async \u0192",p,f(p));else if(s)p=i.substring(9),m("\u0192*",p,f(p));else if(o)p=i.substring(1),m("\u0192*",p,f(p));else if(a)p=i.substring(8),m("\u0192",p,f(p));else if(l){let g=i;i.length>Wae&&(g=i.substring(0,c+2)+" {\u2026}"),m("",i,g)}else m("\u0192",i,f(i));return r.build();function f(g){let H=g.indexOf("("),b=g.match(/\)\s*{/),w=b&&b.index||0;if(H!==-1&&b&&w>H){let k=g.substring(0,H).trim()||"",U=g.substring(H,w+1);return k+U}return"()"}function m(g,H,b){r.checkBudget()&&(g.length&&r.append(g+" "),H=H.trim(),H.endsWith(" { [native code] }")&&(H=H.substring(0,H.length-18)),r.budget()>=H.length?r.append(H):r.append(b.replace(/\n/g," ")))}}function yc(t){let e=t;if(e.type!=="object"||e.subtype==="null")return{title:X2(e,Gae,!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 Am(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 xs(String(e?Math.floor(s):s),r)}function Qae(t,e){return Jl(String(typeof t.value<"u"?t.value:t.description),e)}function Y2(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(m=>{m.value&&(r.add(m.name),f.set(m.name,m.value),i.set(m.name,Math.max(i.get(m.name)||0,m.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=G2-4-(r.size-1)*3;if(n>s){let p=s/n;for(let f of i.keys()){let m=Math.max(Kae,i.get(f)*p|0);i.set(f,m)}}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(z2(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 m of r.values())f.push(z2(p.get(m)||"",i.get(m)));u.push("\u250A "+f.join(" \u250A ")+" \u250A")}return u.push(a.replace("[","\u2570").replace(/\|/g,"\u2534").replace("]","\u256F").replace(/-/g,"\u2504")),u.map(p=>xs(p,G2)).join(`
`)}var nC=new Map([["",(t,e)=>pb(t,e)],["s",(t,e)=>Qae(t,e.budget)],["i",(t,e)=>Am(t,!0,e.budget,void 0)],["d",(t,e)=>Am(t,!0,e.budget,void 0)],["f",(t,e)=>Am(t,!1,e.budget,void 0)],["c",t=>q2(t.value)],["o",(t,e)=>pb(t,e)],["O",(t,e)=>pb(t,e)]]);function z2(t,e){return t.length===e?t:t.length<e?t+" ".repeat(e-t.length):xs(t,e)}var Z2=Ur(function(){return this});var hb=class{constructor(e,r){this.protoObj=e;this.cdp=r}async toDap(e){if(!this.protoObj.objectId)return{category:"stderr",output:db.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:db.t("Could not query the provided object")};let i;try{i=await Z2({cdp:this.cdp,args:[],objectId:r.objects.objectId,objectGroup:"console",generatePreview:!0})}catch(o){return{category:"stderr",output:db.t(o.message)}}let n="\x1B[32mobjects: "+Hc(i,"repl")+"\x1B[0m";return{category:"stdout",output:"",variablesReference:e.replVariables.createVariableForOutput(n,[i]).id}}};var e3=/^(\W*at .*\()(.*):(\d+):(\d+)(\))$/,t3=/^(\W*at )(.*):(\d+):(\d+)$/,Fa=class{constructor(e){this.stack=e}static isStackLike(e){return e3.test(e)||t3.test(e)}*[Symbol.iterator](){for(let e of this.stack.split(`
`)){let r=e3.exec(e)||t3.exec(e);if(!r){yield e+`
`;continue}let[,i,n,s,o,a]=r;i&&(yield i),yield new sC(n,new Ri(Number(s),Number(o))),a&&(yield a),yield`
`}}},sC=class{constructor(e,r){this.path=e;this.position=r}toString(){return`${this.path}:${this.position.lineNumber}:${this.position.columnNumber}`}};var bi=S(Se());var Cm=S(Y());var We=S(Se()),g3=require("crypto");var ti=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 ti().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 ti([i,r])}};var Np=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 X().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 Promise.all([this.cdp.Debugger.enable({}),this.cdp.Runtime.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]==="\\"?Qe(e):e}executionContextName(){return this.targetInfo.title}};var qt=S(Se()),mb=new Map;function Im(){if(mb.size)return mb;function t(s,o){for(let a of o)a.group=s,mb.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:qt.t('Paused on WebGL Error instrumentation breakpoint, error "{0}"',c)}}return s==="scriptBlockedByCSP"&&u.directiveText?{short:qt.t('CSP violation "{0}"',u.directiveText),long:qt.t('Paused on Content Security Policy violation instrumentation breakpoint, directive "{0}"',u.directiveText)}:{short:a,long:qt.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:qt.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",qt.t("Request Animation Frame")),e("cancelAnimationFrame",qt.t("Cancel Animation Frame")),e("requestAnimationFrame.callback",qt.t("Animation Frame Fired"))]),t("Canvas",[e("canvasContextCreated",qt.t("Create canvas context")),e("webglErrorFired",qt.t("WebGL Error Fired")),e("webglWarningFired",qt.t("WebGL Warning Fired"))]),t("Script",[e("scriptFirstStatement",qt.t("Script First Statement")),e("scriptBlockedByCSP",qt.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",qt.t("Set innerHTML")),e("Document.write","document.write")]),t("Timer",[e("setTimeout"),e("clearTimeout"),e("setInterval"),e("clearInterval"),e("setTimeout.callback",qt.t("setTimeout fired")),e("setInterval.callback",qt.t("setInterval fired"))]),t("Window",[e("DOMWindow.close","window.close")]),t("WebAudio",[e("audioContextCreated",qt.t("Create AudioContext")),e("audioContextClosed",qt.t("Close AudioContext")),e("audioContextResumed",qt.t("Resume AudioContext")),e("audioContextSuspended",qt.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)]),mb}var oC=ic(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 m of p){let g=/^[ \t]+/.exec(m);if(g){f=new RegExp(`^[ \\t]{0,${g[0].length}}`);break}}return p.map((m,g)=>g===0?m:(m=m.replace(f,""),g===p.length-1?r.repeat(a)+m:r.repeat(a+1)+m)).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}}),r3=Ur(`
  function(spaces2) {
    const result = ${oC.expr("this","spaces2")};
    return result;
  }
`);var Ua=S(Se());var vc=S(Y());var i3=Ur(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 n3=Ur(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 s3=ic(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}),o3=ic(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 a3=Ur(function(t){return t.call(this)});var u3=Ur(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 c3=Ur(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 HC=(()=>{let t=0,e=2147483647-1;return()=>t++%e+1})(),yC=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}},eue=new Set(["typedarray","dataview","arraybuffer","webassemblymemory"]);var f3=1024,tue=/^[$a-z_][0-9a-z_$]*$/i,rue=/^#[0-9a-z_$]+$/i,iue=t=>t.hasOwnProperty("configurable"),l3=(t,e,r)=>{let i=DO(t,uv(e),r);return Ho(i)},p3="<<indescribable>>",d3=t=>{if(!t.startsWith(p3))return t;let e,r;try{[e,r]=JSON.parse(t.slice(p3.length))}catch{return t}return Ua.t("{0} (couldn't describe: {1})",e,r)},aC=t=>!!t&&typeof t=="object"&&"readMemory"in t&&"writeMemory"in t,Fp=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 Fp(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 iC(r)?this.createVariable(yb,e,r):r.objectId&&!rC.has(r.subtype)?this.createVariable(Hb,e,r,i):this.createVariable(dn,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(pC,{name:"",sortOrder:-1},l,(l==null?void 0:l.description)||p||Ua.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:s3.decl(`${f3}`,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)?d3(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(lC,{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 Wu(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||(iue(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(mC,u,e.get,r)):a&&s.push(this.createVariable(hC,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(yC)});if(n){if(n.exceptionDetails===void 0)return{result:n.result};if(n&&n.result.description)return{errorDescription:n.result.description}}return{errorDescription:Ua.t("Unknown error")}}catch(n){return{errorDescription:n.stack||n.message||String(n)}}}},dn=class{constructor(e,r){this.context=e;this.remoteObject=r;this.id=HC()}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 bc?this.context.name:e instanceof Em?e.accessor:typeof r=="number"||/^[0-9]+$/.test(r)?`${e.accessor}[${r}]`:tue.test(r)?`${e.accessor}.${r}`:e.accessor==="this"&&rue.test(r)?`${e.accessor}.${r}`:`${e.accessor}[${JSON.stringify(r)}]`}async toDap(e,r){let i=this.context.name;return this.context.parent instanceof bc&&(i=await this.context.parent.getRename(i)),Promise.resolve({name:i,value:Hc(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}; ${Rt()} }`,arguments:[yC(e)],silent:!0});if(!i)throw new ne(ot(Ua.t("Unable to set variable value")));if(i.exceptionDetails)throw new ne(h3(i.exceptionDetails));return this.context.createVariableByType({name:e},i.result)}async getChildren(e){return Promise.resolve([])}},gb=class{constructor(e){this.child=e;this.id=HC()}getChildren(){return Promise.resolve([this.child])}},uC=class extends dn{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(gc)?this.id:0})}getChildren(r){let i=[],{args:n,stackTrace:s}=this;for(let o=0;o<n.length;++o)gc(n[o])&&i.push(this.context.createVariableByType({name:`arg${o}`,sortOrder:o},n[o]));return s&&i.push(this.context.createVariable(cC,{name:"",sortOrder:Number.MAX_SAFE_INTEGER},this.remoteObject,s)),Promise.resolve(i)}},cC=class extends dn{constructor(r,i,n){super(r,i);this.stacktrace=n}async toDap(){return{name:"",value:await this.stacktrace.format(),variablesReference:0}}},lC=class extends dn{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"}}}},pC=class extends dn{constructor(r,i,n){super(r,i);this.message=n}get accessor(){if(!(this.context.parent instanceof dn))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})}},fC=Symbol("NoStringRepr"),Hb=class extends dn{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:eue.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!==fC)try{let i=await this.context.cdp.Runtime.callFunctionOn({functionDeclaration:o3.decl(`${f3}`,this.context.customDescriptionGenerator||"null"),objectId:this.remoteObject.objectId,returnByValue:!0});if(i!=null&&i.result.value)return this.customStringRepr=d3(i.result.value)}catch{this.customStringRepr=fC}return this.context.name==="__proto__"&&this.remoteObject.description||Hc(this.remoteObject,r)}async readMemory(r,i){let n=await u3({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 c3({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)}},yb=class extends Hb{constructor(r,i){super(r,i,fC);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(Wu)}}async getArrayProperties(){try{let r=await i3({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 n3({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}},dC=class extends yb{async toDap(e){return this.remoteObject.preview?{...await super.toDap(e),name:Y2(this.remoteObject.preview)}:super.toDap(e)}},Em=class extends dn{constructor(e,r){super(e,r)}getChildren(e){return this.context.createObjectPropertyVars(this.remoteObject)}},hC=class extends Em{async toDap(e,r){return{...await super.toDap(e,r),value:"write-only",variablesReference:this.id}}},mC=class extends Em{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 a3({cdp:this.context.cdp,objectId:this.parentObject.objectId,args:[new Wh(this.remoteObject.objectId)]});return[this.context.createVariableByType({name:this.name,presentationHint:this.context.presentationHint},i)]}catch(i){if(!(i instanceof zl))throw i}return super.getChildren(r)}},bc=class{constructor(e,r,i,n,s){this.remoteObject=e;this.context=r;this.ref=i;this.extraProperties=n;this.renameProvider=s;this.id=HC()}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} ${Rt()}`,callFrameId:this.ref.callFrameId});if(!i)throw new ne(at(Ua.t("Invalid expression")));if(i.exceptionDetails)throw new ne(h3(i.exceptionDetails));return await this.context.cdp.Debugger.setVariableValue({callFrameId:this.ref.callFrameId,scopeNumber:this.ref.scopeNumber,variableName:e,newValue:yC(i.result)}),this.context.createVariableByType({name:e},i.result)}},gC=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()}},Ba=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 gC;this.contextSettings={customDescriptionGenerator:n.customDescriptionGenerator&&l3(["defaultValue"],n.customDescriptionGenerator,!1),customPropertiesGenerator:n.customPropertiesGenerator&&l3([],n.customPropertiesGenerator,!1)}}createDetached(){return new Ba(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(dC,{name:""},r[0]):r.length===1&&gc(r[0])&&!i?s.createVariableByType({name:""},r[0]):s.createVariable(uC,{name:""},e,r,i),a=new gb(o);return this.vars.add(a),a}createScope(e,r,i){let n=new bc(e,new Fp(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 aC(this.vars.get(Number(e)))}async readMemory(e,r,i){let n=this.vars.get(Number(e));return aC(n)?n.readMemory(r,i):void 0}async writeMemory(e,r,i){let n=this.vars.get(Number(e)),s=aC(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(qu(dn)).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 bc||r instanceof gb?"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 ne(at(Ua.t("Cannot set an empty value")));if(r instanceof bc||r instanceof dn)return await(await r.setProperty(e.name,e.value)).toDap("propertyValue",e.format);throw new ne(ot(Ua.t("Variable not found")))}createFloatingContext(){return new Fp(this.cdp,void 0,{name:"<unnamed>"},this.vars,this.locationProvider,void 0,this.contextSettings)}};Ba=$([(0,vc.injectable)(),A(0,(0,vc.inject)(La)),A(1,(0,vc.inject)(Mt)),A(2,(0,vc.inject)(rn)),A(3,(0,vc.inject)(Ke))],Ba);function h3(t){let e=t.exception&&yc(t.exception).title||t.text;return at(e)}var vC=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)}))}},bC=class{constructor(e){this._obj=e;this._dapDeferred=Je()}resolve(){this._dapDeferred.resolve(this._obj)}with(e){return this._dapDeferred.hasSettled()?e(this._obj):this._dapDeferred.promise.then(r=>e(r))}},sue=50,m3=(t,e)=>t.sourceReference===e.sourceReference&&hv(t.path||"",e.path||""),oue=()=>`
//# sourceURL=eval-${(0,g3.randomBytes)(4).toString("hex")}${".repl"}
`,ja=class{constructor(e,r,i,n,s,o,a,u,c,l,p,f,m,g){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=m;this.shutdown=g;this._executionContexts=new Map;this._excludedCallers=[];this._onPausedEmitter=new X;this.disposed=!1;this.debuggerReady=Je();this.onPaused=this._onPausedEmitter.event;this._dap=new bC(i),this._sourceContainer=e,this._cdp=r,this.id=ja._lastThreadId++,this.replVariables=new Ba(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?ot(We.t("Unable to resume")):{allThreadsContinued:!1}}async pause(){return this._expectedPauseReason={reason:"pause"},await this._cdp.Debugger.pause({})?{}:ot(We.t("Unable to pause"))}async stepOver(){return this._expectedPauseReason={reason:"step",direction:1},await this._cdp.Debugger.stepOver({})?{}:ot(We.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 ot(We.t("Unable to step in"))}async stepOut(){return this._expectedPauseReason={reason:"step",direction:2},await this._cdp.Debugger.stepOut({})?{}:ot(We.t("Unable to step out"))}_stackFrameNotFoundError(){return ot(We.t("Stack frame not found"))}_evaluateOnAsyncFrameError(){return ot(We.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:We.t("Paused on frame entry")},r.canExplicitlyBeRestarted||await this._cdp.Debugger.stepInto({}),{}):at(We.t("Frame could not be restarted")):at(We.t("Cannot restart asynchronous frame"))}async stackTrace(e){return this._pausedDetails?this._pausedDetails.stackTrace.toDap(e):ot(We.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 ot(We.t("Thread is not paused on exception"));let r=yc(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 Ri(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 ne(this._stackFrameNotFoundError());if(r=i.callFrameId(),!r)throw new ne(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:oC.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=qh(n.expression),n.expression.indexOf("await")!==-1){let c=RO(n.expression);c&&(n.expression=c,n.awaitPromise=!0)}n.expression+=oue()}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 ne(ot(We.t("Unable to evaluate")));if(o.exceptionDetails){let c=o.exceptionDetails.exception?yc(o.exceptionDetails.exception).title:o.exceptionDetails.text;throw c.startsWith("Uncaught")||(c="Uncaught "+c),new ne(ot(c))}let a=r?this._pausedVariables:this.replVariables;if(!a)throw new ne(ot(We.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 Sm(n.exceptionDetails).toDap(this);throw new ne(CM(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=lb("repl").budget;return o.variablesReference===0&&o.value.length===a&&setImmediate(()=>this.console.enqueue(this,{toDap:()=>({output:We.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 Sm(e.exceptionDetails))})),this._cdp.Runtime.on("inspectRequested",e=>{e.hints.copyToClipboard?this._copyObjectToClipboard(e.object):e.hints.queryObjects?this.console.enqueue(this,new hb(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 Wt))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 Ri(n.lineNumber,1),new Ri(n.lineNumber+1,1)).then(f=>f.filter(m=>m.breakLocation.lineNumber!==s.lineNumber||m.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 _a(a);return o.map((f,m)=>{let g=f.uiLocations.find(b=>b.source===n.source);if(!g)return;if(!c)return{id:u+m,label:`Column ${g}`,line:g.lineNumber,column:g.columnNumber};let H=MO(a.slice(c.getLineOffset(g.lineNumber-1),c.getLineOffset(g.lineNumber)),g.columnNumber-1);if(H)return{id:u+m,label:H.text,line:g.lineNumber,column:H.start+1,endLine:g.lineNumber,endColumn:H.end+1}}).filter(kt)}async refreshStackTrace(){this._pausedDetails&&(this._pausedDetails=this._createPausedDetails(this._pausedDetails.event),this._onThreadResumed(),await this._onThreadPaused(this._pausedDetails))}_executionContextCreated(e){let r=new vC(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&&ja._allThreadsByDebuggerId.set(e.debuggerId,this)}),this.exceptionPause.apply(this._cdp)}async _onPaused(e){var l,p,f,m,g,H,b;let r=(e.hitBreakpoints??[]).filter(w=>w!==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((m=e.callFrames[0])==null?void 0:m.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((g=this._expectedPauseReason)==null?void 0:g.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=(H=this._waitingForStepIn)==null?void 0:H.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 Np)){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 Wt&&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(),!!m3(n,u.source))){s||(s=await e.loadFrames(sue).then(l=>Promise.all(l.slice(1).filter(qu(Wt)).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(m3(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 ja._allThreadsByDebuggerId)r===this&&ja._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({...pc(e,r.resolvedSource.runtimeScriptOffset),source:r.resolvedSource}):r.source.then(i=>this._sourceContainer.preferredUiLocation({...pc(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({...pc(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=Im().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=Bi.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:We.t("Paused on breakpoint")};if(((o=e.data)==null?void 0:o.__rewriteAs)==="step")return{thread:this,event:e,stackTrace:n,reason:"step",description:We.t("Paused")};switch(e.reason){case"assert":return{thread:this,event:e,stackTrace:n,reason:"exception",description:We.t("Paused on assert")};case"debugCommand":return{thread:this,event:e,stackTrace:n,reason:"pause",description:We.t("Paused on debug() call")};case"DOM":return{thread:this,event:e,stackTrace:n,reason:"data breakpoint",description:We.t("Paused on DOM breakpoint")};case"EventListener":return this._resolveEventListenerBreakpointDetails(n,e);case"exception":return{thread:this,event:e,stackTrace:n,reason:"exception",description:We.t("Paused on exception"),exception:e.data};case"promiseRejection":return{thread:this,event:e,stackTrace:n,reason:"exception",description:We.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:We.t("Paused")}:{thread:this,event:e,stackTrace:n,reason:"function breakpoint",description:We.t("Paused on instrumentation breakpoint")};case"XHR":return{thread:this,event:e,stackTrace:n,reason:"data breakpoint",description:We.t("Paused on XMLHttpRequest or fetch")};case"OOM":return{thread:this,event:e,stackTrace:n,reason:"exception",description:We.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:mt(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:We.t("Paused on breakpoint")}}return this._expectedPauseReason?{thread:this,event:e,stackTrace:n,description:We.t("Paused"),...this._expectedPauseReason}:{thread:this,event:e,stackTrace:n,reason:"pause",description:We.t("Paused on debugger statement")}}}_resolveEventListenerBreakpointDetails(e,r){let i=r.data,n=i&&i.eventName||"",s=Im().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:We.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")||(jr(e.url)&&(e.url=Qe(e.url)),this._sourceContainer.getScriptById(e.scriptId)))return;e.url&&(e.url=this.target.scriptUrlToUrl(e.url));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=_r(e.sourceMapURL)?e.sourceMapURL:e.url&&wa(e.url,e.sourceMapURL)||e.url,c||this._dap.with(p=>yM(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 ti,a=await Promise.race([this._getOrStartLoadingSourceMaps(s),Oe(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:We.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(Pa).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:Hc(e,"copy")}));return}try{let r=await r3({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([Oe(1e3).then(()=>{}),Promise.all(e.hitBreakpoints.map(i=>this._breakpointManager._resolvedBreakpoints.get(i)).filter(qu(cn)).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=ja.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||!Wt.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"||!_r((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 ja._allThreadsByDebuggerId.get(e)}async replacePathsInStackTrace(e){let r=[];for(let n of new Fa(e)){if(typeof n=="string"){r.push(n);continue}let s=this._sourceContainer.getSourceByOriginalUrl(Qe(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("")}},qa=ja;qa._lastThreadId=0,qa._allThreadsByDebuggerId=new Map;async function wC(t){let e=await t.uiLocation();return e?e.source.blackboxed()?2:ei(e.source)&&!e.isMapped&&e.unmappedReason===3?1:0:0}var aue=new Set(["breakpoint","exception","entry"]),uue=16,Wa=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||aue.has(e.reason))return;let i=(await e.stackTrace.loadFrames(1)).find(qu(Wt));if((i&&await wC(i))===0){this.resetSmartStepCount();return}return this._smartStepCount++>uue?2:(r==null?void 0:r.reason)==="step"?r.direction:0}};Wa=$([(0,Cm.injectable)(),A(0,(0,Cm.inject)(Ke)),A(1,(0,Cm.inject)(fe))],Wa);var Bi=class{constructor(e){this.frames=[];this._frameById=new Map;this._lastFrameThread=e}static fromRuntime(e,r){let i=new Bi(e);for(let n of r.callFrames)n.url.endsWith(".cdp")||i.frames.push(Wt.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 Bi(e);for(let o=0;o<r.callFrames.length&&n>0;o++)if(!r.callFrames[o].url.endsWith(".cdp")){let a=Wt.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 Bi(e);for(let o of r)s._appendFrame(Wt.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=qa.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 _C(r.description||"async"));for(let i of r.callFrames)this._appendFrame(Wt.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 Wt&&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 Wt&&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}}},H3=AH(),_C=class{constructor(e="async"){this.label=e;this.frameId=H3()}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`}},Wt=class{constructor(e,r,i,n=!1){this.callFrame=r;this.isAsync=n;this.frameId=H3();this.completions=Fe(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++)r.push(this._scopeVariable(n,this._scope).then(async s=>(await e.getVariableNames({variablesReference:s.id})).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=Fe(()=>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 lp(this._rawLocation.lineNumber,this._rawLocation.columnNumber)}static fromRuntime(e,r,i){return new Wt(e,r,e.rawLocation(r),i)}static fromDebugger(e,r){let i=new Wt(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 Wt&&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(){if(!this._scope)throw new ne(DM());let e=[];for(let r=0;r<this._scope.chain.length;r++){let i=this._scope.chain[r],n="",s;switch(i.type){case"global":n=bi.t("Global");break;case"local":n=bi.t("Local"),s="locals";break;case"with":n=bi.t("With Block"),s="locals";break;case"closure":n=bi.t("Closure"),s="arguments";break;case"catch":n=bi.t("Catch Block"),s="locals";break;case"block":n=bi.t("Block"),s="locals";break;case"script":n=bi.t("Script");break;case"eval":n=bi.t("Eval");break;case"module":n=bi.t("Module");break;default:n=i.type.substr(0,1).toUpperCase()+i.type.substr(1);break}i.name&&i.type==="closure"?n=bi.t("Closure ({0})",i.name):i.name&&(n=`${n}: ${i.name}`);let o=await this._scopeVariable(r,this._scope),a={name:n,presentationHint:s,expensive:i.type==="global",variablesReference:o.id};if(i.startLocation){let u=this._thread.rawLocation(i.startLocation),c=await this._thread.rawLocationToUiLocation(u);if(a.line=(c||u).lineNumber,a.column=(c||u).columnNumber,c&&(a.source=await c.source.toDap()),i.endLocation){let l=this._thread.rawLocation(i.endLocation),p=await this._thread.rawLocationToUiLocation(l);a.endLine=(p||l).lineNumber,a.endColumn=(p||l).columnNumber}}e.push(a)}return{scopes:e}}async toDap(e){let r=await this.uiLocation(),i=r?await r.source.toDap():void 0,n=await wC(this),s=n?"deemphasize":"normal";n&&i&&(i.origin=n===1?bi.t("Skipped by smartStep"):bi.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}async _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:bi.t("Return value"),value:r.returnValue}));let o=this._thread.pausedVariables().createScope(r.chain[e].object,n,s);return r.variables[e]=o}};var y3=S(Se());var wc=class{constructor(e){this.event=e;this.stackTrace=Fe(e=>this.event.stackTrace?Bi.fromRuntime(e,this.event.stackTrace):void 0);this.getUiLocation=Fe(async e=>{let r=this.stackTrace(e);if(!r)return;let i;for(let n of r.frames){if(!(n instanceof Wt))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"?eC(r[0].value,r.slice(1),nC):eC("",r,nC),o=s.result+`
`;return s.usedAllSubs&&!r.some(gc)?{output:o}:this.formatComplexStringOutput(e,o,r,i)}async formatComplexStringOutput(e,r,i,n){(i.some(o=>o.subtype==="error")||Fa.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}}},vb=class extends wc{async toDap(e){var r;return((r=this.event.args[0])==null?void 0:r.value)==="console.assert"&&(this.event.args[0].value=y3.t("Assertion failed")),{category:"stderr",...await this.formatDefaultString(e,this.event.args,!0),...await this.getUiLocation(e)}}},_c=class extends wc{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)}}},Va=class extends _c{constructor(e){super(e,!1,"stdout")}},bb=class extends _c{constructor(e){super(e,!0,"stdout")}},wb=class extends _c{constructor(e){super(e,!0,"stderr")}},_b=class extends _c{constructor(e){super(e,!0,"stderr")}},Ab=class extends wc{async toDap(e){return{category:"stdout",group:this.event.type==="startGroupCollapsed"?"startCollapsed":"start",...await this.formatDefaultString(e,this.event.args),...await this.getUiLocation(e)}}},Ib=class extends _c{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 Sm=class extends wc{constructor(){super(...arguments);this.stackTrace=Fe(r=>{if(this.event.stackTrace)return Bi.fromRuntime(r,this.event.stackTrace);if(this.event.scriptId)return Bi.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?yc(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 Fa.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 Eb=Symbol("IConsole");var Dm=S(Y());var v3=S(Y());var Ga=Symbol("IShutdownParticipants"),Bp=class{constructor(){this.participants=[]}register(e,r){if(this.shutdownStage!==void 0&&this.shutdownStage>=e)return r(),_p;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()))}};Bp=$([(0,v3.injectable)()],Bp);var xm=class{toDap(){return{category:"console",output:"\x1B[2J"}}},Sb=class{toDap(){return{category:"stdout",output:"",group:"end"}}};var Cb=class{constructor(e){this.sink=e;this.q=[];this.disposed=!1;this.onDrainedEmitter=new X;this.onDrained=this.onDrainedEmitter.event}get length(){return this.q.length}enqueue(e){this.disposed||(this.q.push(new AC(e)),this.q.length===1&&this.process())}dispose(){this.disposed=!0,this.q=[]}async process(){let e=this.q.findIndex(r=>r.value===w3);e===0?await this.q[0].wait:e===-1?(this.sink(b3(this.q)),this.q=[]):(this.sink(b3(this.q.slice(0,e))),this.q=this.q.slice(e)),this.q.length?this.process():this.onDrainedEmitter.fire()}},b3=t=>t.map(e=>e.value).filter(e=>e!==_3),w3=Symbol("unsettled"),_3=Symbol("unsettled"),AC=class{constructor(e){this.value=w3;e instanceof Promise?this.wait=e.then(r=>{this.value=r},()=>{this.value=_3}):(this.value=e,this.wait=Promise.resolve())}};var lue=new Set(["group","assert","count"]),Up=class{constructor(e,r){this.dap=e;this.isDirty=!1;this.queue=new Cb(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 xm))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"&&lue.has(i.functionName))return}switch(e.type){case"clear":return new xm;case"endGroup":return new Sb;case"assert":return new vb(e);case"table":return new Ib(e);case"startGroup":case"startGroupCollapsed":return new Ab(e);case"debug":case"log":case"info":return new Va(e);case"trace":return new bb(e);case"error":return new _b(e);case"warning":return new wb(e);case"dir":case"dirxml":return new Va(e);case"count":return new Va(e);case"profile":case"profileEnd":return new Va(e);case"timeEnd":return new Va(e);default:try{wH(e.type,"unknown console message type")}catch{}}}};Up=$([(0,Dm.injectable)(),A(0,(0,Dm.inject)(rn)),A(1,(0,Dm.inject)(Ga))],Up);var Ac=S(Y()),E3=require("os"),S3=require("path");var IC=require("path"),A3=(0,IC.join)(__dirname,"diagnosticTool.js"),I3=(0,IC.join)(__dirname,"diagnosticTool.css");var Ka=Symbol("ITarget"),Ar=Symbol("ILauncher");var za=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,S3.join)((0,E3.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(I3,"utf-8")}<</style>
      </head>
      <body>
        <script>window.DUMP=${JSON.stringify(await this.generateObject())}</script>
        <script>${await this.fs.readFile(A3,"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 rr?[...i.compiledToSourceUrl.entries()].map(([n,s])=>[n.sourceReference,s]):void 0,sourceMap:i.sourceMap&&{url:i.sourceMap.url,metadata:i.sourceMap.metadata,sources:ao(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}}};za=$([(0,Ac.injectable)(),A(0,(0,Ac.inject)(Ie)),A(1,(0,Ac.inject)(fr)),A(2,(0,Ac.inject)(pn)),A(3,(0,Ac.inject)(Ka))],za);var Xa=S(Y());var qp=Symbol("IExceptionPauseService");var jp=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=Je();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 ne))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=Je())}}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(kt).join(") || !!(")+")",c=ba(u);if(c)throw new ne(ma({line:0,condition:u},c.message));let l=this.breakOnError?oS(u):u;return this.evaluator.prepare(l,{hoist:["error"]}).invoke};return i==="none"?{cdp:i}:{cdp:i,condition:{caught:o(n),uncaught:o(s)}}}};jp=$([(0,Xa.injectable)(),A(0,(0,Xa.inject)(un)),A(1,(0,Xa.inject)(xa)),A(2,(0,Xa.inject)(rn)),A(3,(0,Xa.inject)(Ke)),A(4,(0,Xa.inject)(fr))],jp);var Pb=S(Y());var xb=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 Db=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(),
      })${Rt()}`,returnByValue:!0});return r?r.exceptionDetails?{error:r.exceptionDetails.text}:{metrics:r.result.value}:{error:"No response from CDP"}}};var Lb=Symbol("IPerformanceProvider"),Ic=class{constructor(e){this.target=e}create(){return this.target.type()==="node"?new Db:new xb}};Ic=$([(0,Pb.injectable)(),A(0,(0,Pb.inject)(Ka))],Ic);var PC=S(Se()),D3=require("crypto"),Ja=S(Y()),P3=require("os"),L3=require("path");var kb=S(Y());var EC=S(Se()),Ec=S(Y()),Tb=require("path");var Wp=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 gr=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 ne(Fl());return new SC(this.cdp,this.fs,this.sources,this.launchConfig.__workspaceFolder,r)}async save(e,r){let i=await C3(e,this.sources,this.launchConfig.__workspaceFolder);(0,Tb.isAbsolute)(r)||(r=(0,Tb.join)(this.launchConfig.__workspaceFolder,r)),await this.fs.writeFile(r,JSON.stringify(i))}};gr.type="cpu",gr.extension=".cpuprofile",gr.label=EC.t("CPU Profile"),gr.description=EC.t("Generates a .cpuprofile file you can open in the Chrome devtools"),gr.editable=!0,gr=$([(0,Ec.injectable)(),A(0,(0,Ec.inject)(Mt)),A(1,(0,Ec.inject)(Ie)),A(2,(0,Ec.inject)(fr)),A(3,(0,Ec.inject)(Ke))],gr);var SC=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 X;this.disposed=!1;this.onUpdate=new X().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 ne(Fl());await this.dispose();let r=await C3(e.profile,this.sources,this.workspaceFolder);await this.fs.writeFile(this.file,JSON.stringify(r))}};async function C3(t,e,r){let i=new Wp(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 CC=S(Se()),Sc=S(Y());var Ui=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 ne(Fl());return new xC(this.cdp,this.fs,this.sources,this.launchConfig.__workspaceFolder,r)}};Ui.type="heap",Ui.extension=".heapprofile",Ui.label=CC.t("Heap Profile"),Ui.description=CC.t("Generates a .heapprofile file you can open in the Chrome devtools"),Ui.editable=!0,Ui=$([(0,Sc.injectable)(),A(0,(0,Sc.inject)(Mt)),A(1,(0,Sc.inject)(Ie)),A(2,(0,Sc.inject)(fr)),A(3,(0,Sc.inject)(Ke))],Ui);var xC=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 X;this.disposed=!1;this.onUpdate=new X().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 ne(Fl());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 Wp(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 DC=S(Se()),x3=require("fs"),$b=S(Y());var ji=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 X().event,onUpdate:new X().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,x3.createWriteStream)(e),promise:this.cdp.HeapProfiler.takeHeapSnapshot({})};await i,r.end(),this.currentWriter=void 0}};ji.type="memory",ji.extension=".heapsnapshot",ji.label=DC.t("Heap Snapshot"),ji.description=DC.t("Generates a .heapsnapshot file you can open in the Chrome devtools"),ji.instant=!0,ji=$([(0,$b.injectable)(),A(0,(0,$b.inject)(Mt))],ji);var Rb=Symbol("IProfilerFactory"),Mb=()=>{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("-")},wi=class{constructor(e){this.container=e}get(e){let r=wi.ctors.find(i=>i.type===e);if(!r)throw new Error(`Invalid profilter type ${e}`);return this.container.get(r)}};wi.ctors=[gr,Ui,ji],wi=$([(0,kb.injectable)(),A(0,(0,kb.inject)(ap))],wi);var Ob=Symbol("IProfileController"),Vp=class{constructor(e,r,i,n,s){this.cdp=e;this.factory=r;this.basicCpuProfiler=i;this.breakpoints=n;this.shutdown=s}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:PC.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 ne(SM());this.profile=this.startProfileInner(e,r,i).catch(n=>{throw this.profile=void 0,n}),await this.profile}async saveConsoleProfile(e,r){var s;let n=(((s=r.title)==null?void 0:s.replace(/[\/\\]/g,"-"))||Mb())+gr.extension;await this.basicCpuProfiler.save(r.profile,n),e.output({output:PC.t('CPU profile saved as "{0}" in your workspace folder',n)+`
`,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 cn)||p.has(f.dapId)}else s=()=>!1;await this.breakpoints.applyEnabledFilter(s);let o=(0,L3.join)((0,P3.tmpdir)(),`vscode-js-profile-${(0,D3.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()}};Vp=$([(0,Ja.injectable)(),A(0,(0,Ja.inject)(Mt)),A(1,(0,Ja.inject)(Rb)),A(2,(0,Ja.inject)(gr)),A(3,(0,Ja.inject)(pn)),A(4,(0,Ja.inject)(Ga))],Vp);var k3=S(Y());var T3=(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}},$3=(t,e)=>{let r=t;for(let[i,n]of Object.entries(e))typeof n=="object"&&n?r[i]=Object.assign(r[i]||{},n):r[i]=n};var Ya=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?T3(i,"Cookie",n.cookies.sort((o,a)=>o.path.length-a.path.length).map(o=>`${o.name}=${o.value}`).join("; ")):i}};Ya=$([(0,k3.injectable)()],Ya);var js=S(Y());var s8=S(M3()),o8=require("dns"),f0=S(n8()),Dc=S(Y());var sf=Symbol("IRequestOptionsProvider");var ru=class{constructor(e,r){this.fs=e;this.options=r}async fetch(e,r=hr,i){try{let s=(0,s8.default)(e);return{ok:!0,url:e,body:s.toString("utf-8"),statusCode:200}}catch{}let n=jr(e)?e:mt(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 Ql(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 o8.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 Le;try{let u=(0,f0.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 f0.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 jy(l,e,c)}}finally{n.dispose()}}};ru=$([(0,Dc.injectable)(),A(0,(0,Dc.inject)(Ie)),A(1,(0,Dc.optional)()),A(1,(0,Dc.inject)(sf))],ru);var Pc=class extends ru{constructor(r,i,n,s){super(r,s);this.state=i;this.disposables=new Le;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}};Pc=$([(0,js.injectable)(),A(0,(0,js.inject)(Ie)),A(1,(0,js.inject)(Ya)),A(2,(0,js.optional)()),A(2,(0,js.inject)(Mt)),A(3,(0,js.optional)()),A(3,(0,js.inject)(sf))],Pc);var nu=S(Y()),c8=S(om());var iu="node:";function u8(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.startsWith("!")){let n=a8(i.slice(1));for(let s=0;s<e.length;s++)e[s]=`^(?!${n.slice(1)})${e[s].slice(1)}`}else e.push(a8(i))}return e.map(r=>new RegExp(r,"i"))}function a8(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=>Zr(o)).join("[^\\/]*"))}else r.push(Zr(n));r.push(i<e.length-1?"\\/":"$")}}return`^${r.join("")}`}function hpe(t){let e=/^<node_internals>[\/\\](.*)$/,r=t.map(i=>{i=i.trim();let n=e.exec(i);return n?n[1]:null}).filter(kt);return r.length>0?r:void 0}function mpe(t,e){return e.filter(i=>!i.includes("<node_internals>")).map(i=>jr(i)?XO(t.rebaseLocalToRemote(i)):qe(i)).map(dv)}var qs=class{constructor({skipFiles:e},r,i,n,s){this.logger=i;this.cdp=n;this._regexForAuthored=p$(u8);this._scriptsWithSkipping=new Set;this._targetId=s.id(),this._rootTargetId=l8(s).id(),this._isUrlFromSourceMapSkipped=new Es(o=>this._normalizeUrl(o)),this._authoredGlobs=mpe(r,e),this._nodeInternalsGlobs=hpe(e),this._initNodeInternals(s),this._updateSkippedDebounce=d$(500,()=>this._updateGeneratedSkippedSources()),e.length&&this._updateGeneratedSkippedSources(),qs.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(iu)&&(e=e.slice(iu.length)),(0,c8.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(iu)?!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(`^(${iu})?internal\\/`);for(let n of r)this._testSkipNodeInternal(n)&&e.push(`^(${iu})?${Zr(n)}$`)}await this.cdp.Debugger.setBlackboxPatterns({patterns:e})}_normalizeUrl(e){return qe(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(Qe(e.absolutePath))&&(this.setIsUrlBlackboxSkipped(i,!0),n=!0,this._updateSkippedDebounce()),ei(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=Je(),i=await this.cdp.Runtime.evaluate({expression:"require('module').builtinModules"+Rt(),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&&jr(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 rr){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(ei(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 qs.sharedSkipsEmitter.fire({params:e,rootTargetId:this._rootTargetId,targetId:this._targetId}),r}};qs.sharedSkipsEmitter=new X,qs=$([(0,nu.injectable)(),A(0,(0,nu.inject)(Ke)),A(1,(0,nu.inject)(ut)),A(2,(0,nu.inject)(fe)),A(3,(0,nu.inject)(Mt)),A(4,(0,nu.inject)(Ka))],qs);function l8(t){let e=t.parent();return e?l8(e):t}var Bm=S(Y());var f8=require("path");var p8=/^webpack:\/{3}([^/]+?\.vue)(\?[0-9a-z]*)?$/i,gpe=/^webpack:\/{3}\.\/.+\.vue\?[0-9a-z]+$/i,af=Symbol("IVueFileMapper");var of=class{constructor(e,r){this.files=e;this.search=r;this.getMapping=Fe(async()=>{let e=new Map;return await this.search.streamAllChildren(this.files,r=>e.set((0,f8.basename)(r),r)),e})}async lookup(e){let r=p8.exec(e);return r?(await this.getMapping()).get(r[1]):void 0}getVueHandling(e){return this.files.empty?0:p8.test(e)?1:gpe.test(e)?2:0}};of=$([(0,Bm.injectable)(),A(0,(0,Bm.inject)(fo)),A(1,(0,Bm.inject)(rp))],of);var Ws=class{constructor(){this.changeEmitter=new X;this.addEmitter=new X;this.removeEmitter=new X;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 Nq=S(Rq()),b0=S(Y());var Mq=require("child_process"),Po=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 Po(r.command,r.stderr.toString(),r.stdout.toString(),r.exitCode)}};function v0(t,e,r){return new Promise((i,n)=>{let s=(0,Mq.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 Po(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 bfe=new Map([["chrome",0],["safari",1],["firefox",2],["msedge",3],["microsoft edge",3],["appxq0fevzme2pys62n3e0fbqa7peapykr8v",4],["ie.http",5]]),Oq=t=>{t=t.toLowerCase();for(let[e,r]of bfe.entries())if(t.includes(e))return r},pf=Symbol("IDefaultBrowserProvider"),lf=class{constructor(e,r=process.platform){this.execa=e;this.platform=r;this.lookup=Fe(()=>this.platform==="win32"?this.lookupWindows():this.lookupUnix())}async lookupUnix(){let{name:e}=await(0,Nq.default)();return Oq(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 Po.fromExeca(e);let r=/ProgId\s*REG_SZ\s*(\S+)/.exec(e.stdout);if(r)return Oq(r[1])}};lf=$([(0,b0.injectable)(),A(0,(0,b0.inject)(Yh))],lf);var Bq=S(Y()),_0=S(require("os"));var w0=class{async setup(){}dispose(){}write(e){if(e.level>2)throw new Error(e.message);console.log(JSON.stringify(e))}};var eD=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))}},Hn=class{constructor(){this.logTarget={queue:[]};this.logBuffer=new eD}static async test(){let e=new Hn;return e.setup({sinks:[new w0],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=wfe();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))}};Hn.null=(()=>{let e=new Hn;return e.setup({sinks:[]}),e})(),Hn=$([(0,Bq.injectable)()],Hn);var wfe=()=>({timestamp:Date.now(),tag:"runtime.welcome",level:1,message:`${DH} v${Vu} started`,metadata:{os:`${_0.platform()} ${_0.arch()}`,nodeVersion:process.version,adapterVersion:Vu}});var Ym=Symbol("MutableLaunchConfig"),Uq=t=>{let e=new X;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 h6=S(Y());var d6=S(f6()),dw=S(Y());var Bo=class{constructor(e){this.logger=e}async streamAllChildren(e,r){let i=[];return await this.globForFiles(e,s=>i.push(r(Ft(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(ip(Ft(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(kt),state:void 0}}async globForFiles(e,r){await Promise.all([...e.explode()].map(i=>new Promise((n,s)=>(0,d6.default)([i.pattern,"!**/*.asar/**"],{ignore:i.negations,matchBase:!0,cwd:i.cwd}).on("data",r).on("finish",n).on("error",s))))}};Bo=$([(0,dw.injectable)(),A(0,(0,dw.inject)(fe))],Bo);var Hu=class{constructor(e,r){this.vscode=e;this.logger=r;this.nodeStrategy=new Bo(this.logger)}static createOrFallback(e){try{let r=require("vscode");if(r.workspace.findTextInFiles!==void 0)return new Hu(r,e)}catch{}return new Bo(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(kt),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(ip(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(kt)}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}}};Hu=$([(0,h6.injectable)()],Hu);var g6=S(Y());var xf=Symbol("touched"),yu;(u=>{function t(){return{children:{},[xf]:1}}u.root=t;function e(c,l){return a(c,o(l),0)}u.getPath=e;function r(c){c[xf]=1}u.touch=r;function i(c){c[xf]=2}u.touchAll=i;function n(c,l){let p=c.children[l]??={children:{}};return p[xf]=1,p}u.getOrMakeChild=n;function s(c){if(c[xf]){for(let[l,p]of Object.entries(c.children))switch(p[xf]){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)}})(yu||={});var YP=require("fs"),QP=S(om()),Vc=require("path"),m6=S(XP());var lve=/\//g,hw=class{constructor(e){this.stat=uo(e=>YP.promises.lstat(e));this.readdir=uo(e=>YP.promises.readdir(e,{withFileTypes:!0}));this.alreadyProcessedFiles=new Set;this.fileEmitter=new X;this.onFile=this.fileEmitter.event;this.errorEmitter=new X;this.onError=this.errorEmitter.event;this.processor=e.fileProcessor,this.filter=e.filter,this.ignore=e.ignore.map(n=>QP.default.matcher((0,m6.default)(qe(n),{cwd:e.cwd})));let r=(0,Vc.isAbsolute)(e.pattern)?(0,Vc.relative)(e.cwd,e.pattern):e.pattern,i=QP.default.parse(qe(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=yu.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),yu.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=yu.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=Vc.sep==="/"?r:r.replace(lve,Vc.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 Df=class extends Bo{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]||yu.root();await this._streamChildrenWithSourcemaps(u,e,r,o);let c=yu.prune(u);c&&(n[a]=c)})),this.logger.info("sourcemap.parsing",`turboGlobStream search found ${r.length} files`),{values:(await Promise.all(r)).filter(kt),state:n}}async _streamChildrenWithSourcemaps(e,r,i,n){let s=new hw({pattern:n.pattern,ignore:n.negations,cwd:n.cwd,cache:e,filter:r.filter,fileProcessor:o=>ip(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}};Df=$([(0,g6.injectable)()],Df);var Iw=S(Se()),_u=S(Y());var H6=require("url"),y6=S(require("path"));var mw=class{constructor(){this._onFrameAddedEmitter=new X;this._onFrameRemovedEmitter=new X;this._onFrameNavigatedEmitter=new X;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 eL(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)}},eL=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:pve(this._url)||`<iframe ${this.id}>`}};function ZP(t,e){return t.length<=e?t:t.substr(0,e-1)+"\u2026"}function pve(t){let e;try{e=new H6.URL(t)}catch{return ZP(t,20)}if(e.protocol==="data")return ZP(t,20);if(e.protocol==="blob"||t==="about:blank")return t;let r=y6.basename(e.pathname);return r||(r=(e.host||"")+"/"),r==="/"&&(r=ZP(t,20)),r}var v6=require("url"),tL=class{constructor(e){this.versions=new Map;this.id=e.registrationId,this.scopeURL=e.scopeURL}},rL=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 v6.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}`}},vu=class{constructor(e){this._registrations=new Map;this._versions=new Map;this._onDidChangeUpdater=new X;this.onDidChange=this._onDidChangeUpdater.event;this._targets=new Set;this._frameModel=e,vu._instances.add(this)}dispose(){vu._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)),vu._mode!=="normal"&&this.setMode(vu._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 rL(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 tL(r))}this._onDidChangeUpdater.fire()}static setModeForAll(e){vu._mode=e;for(let r of vu._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})}},Pg=vu;Pg._instances=new Set;var bu=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 mw;this.serviceWorkerModel=new Pg(this.frameModel);this._lifecycleQueue=Promise.resolve();this._onTargetAddedEmitter=new X;this._onTargetRemovedEmitter=new X;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=>Vh.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 Xl(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 UE.has(c)&&this.frameModel.attached(a,e.targetId),this.serviceWorkerModel.attached(a),this._onTargetAddedEmitter.fire(u),!Vh.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 R6=S(require("child_process")),M6=require("fs");var fve=50,ii=class{constructor(e){this.messageEmitter=new X;this.endEmitter=new X;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 ti])}),this._ws.addEventListener("close",()=>{this.endEmitter.fire(),this._ws=void 0}),this._ws.addEventListener("error",()=>{})}static async create(e,r){let i=!e.startsWith("ws://"),n=await Ql(e);for(;;){let s=Date.now()+fve;try{let o={headers:{host:"localhost"},perMessageDeflate:!1,maxPayload:268435456,rejectUnauthorized:!(i&&n),followRedirects:!0},a=new a2(e,[],o);return await Os(new Promise((u,c)=>{a.addEventListener("open",()=>u(new ii(a))),a.addEventListener("error",l=>{let p=e===a.url?e:a.url.replace(/^http(s?):/,"ws$1:");if(p===e){c(l.error);return}this.create(p,r).then(u,c)})}),dr.withTimeout(2e3,r).token,`Could not open ${e}`).catch(u=>{throw a.close(),u})}catch(o){if(r.isCancellationRequested)throw o;let a=s-Date.now();a>0&&await Oe(a)}}}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 gw=S(require("path"));function dve(t){let e=[/^APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL$/i,/^ELECTRON_.+$/i,/^GOOGLE_API_KEY$/i,/^VSCODE_.+$/i,/^SNAP(|_.*)$/i,/^GDK_PIXBUF_.+$/i];return new Dt(t).map((r,i)=>e.some(n=>n.test(r))?void 0:i)}var bn=class{constructor(e){this.defined=Fe(()=>vl(this.value));this.value=e?a$(e):{}}lookup(e){return bn.platform==="win32"?l$(this.value,e):this.value[e]}addToPath(e,r="append",i=!1){let n=bn.platform==="win32"?"Path":"PATH",s=bn.platform==="win32"?gw.win32.delimiter:gw.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 bn.merge(this,{[e]:r})}merge(...e){return bn.merge(this,...e)}map(e){return new bn(ao(this.value,(r,i)=>e(i,r)))}static merge(...e){let r=e.map(n=>n instanceof bn?n.value:n),i=bn.platform==="win32"?c$(...r):Object.assign({},...r);return new bn(i)}},Dt=bn;Dt.platform=process.platform,Dt.empty=new bn({}),Dt.processEnv=Fe(()=>dve(process.env));var b6="--remote-debugging-port",w6="--remote-debugging-pipe",_6=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},Hw=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},Uo=class{constructor(e=[]){this.args=e;this.argMap=Fe(()=>_6(this.args))}add(e,r=null){return new Uo(Hw({...this.argMap(),[e]:r}))}remove(e){return new Uo(Hw({...this.argMap(),[e]:void 0}))}merge(e){return new Uo(Hw({...this.argMap(),...e instanceof Uo?e.argMap():_6(e)}))}setConnection(e){return new Uo(Hw({...this.argMap(),[w6]:e==="pipe"?null:void 0,[b6]:e!=="pipe"?String(e):void 0}))}getSuggestedConnection(){let e=this.argMap();if(e.hasOwnProperty(w6))return"pipe";let r=e[b6];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 Uo(i)}toArray(){return this.args.slice()}},jo=Uo;jo.default=new Uo(["--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 iL=require("url");function yw(t,e,r){let i=uo(o=>{if(o)return new iL.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 iL.URL(r).pathname,wsProtocol:()=>i(e).protocol==="https:"?"wss":"ws"};return t.replace(/{([^\}]+)}/g,(o,a)=>n.hasOwnProperty(a)?n[a]():o)}var L6=S(require("readline"));var S6=S(nL());var wn=class{constructor(e,r,i){this.logger=e;this.pipeWrite=r;this.pipeRead=i;this.messageEmitter=new X;this.endEmitter=new X;this.onMessage=this.messageEmitter.event;this.onEnd=this.endEmitter.event;this.onceEnded=Fe(()=>{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,S6.default)("\0")).on("data",s=>this.messageEmitter.fire([s,new ti])).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 bw=require("child_process"),sL=require("path");function qo(t,e,r="forceful"){if(r==="none")return!0;if(process.platform==="win32"){let i=process.env.WINDIR||"C:\\Windows",n=(0,sL.join)(i,"System32","taskkill.exe");try{return(0,bw.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,sL.join)(__dirname,"./targets/node/terminateProcess.sh"),n=(0,bw.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 D6=require("fs");async function oL(t,e,r,i){let n=new ru(D6.promises),[s,o]=await Promise.all([C6(n,new URL("/json/version",t),e),i?C6(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=x6(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=x6(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 C6(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 dr(r);try{let o;return await Is([i,n].map(async u=>(o=await t.fetchJson(u,s.token),o.ok&&o)))||o}finally{s.cancel()}}var P6=t=>async(e,r,i)=>{for(;;)try{return await oL(e,r,i,t)}catch(n){if(r.isCancellationRequested)throw new Error(`Could not connect to debug target at ${e}: ${n.message}`);await Oe(200)}},Pf=P6(!0),ww=P6(!1);function x6(t,e){let r=new URL(t),i=new URL(e);return i.host=r.host,i.toString()}var T6=async(t,e,r,i)=>{let n=r.connection===0?await bve(e,i):await ww(`http://localhost:${r.connection}`,i,t),s=r.inspectUri?yw(r.inspectUri,r.url,n):n;for(;;)try{return await ii.create(s,i)}catch(o){if(i.isCancellationRequested)throw o;await Oe(200)}},_w=class{constructor(e){this.logger=e;this.pid=void 0;this.onExit=new X().event;this.onError=new X().event}async transport(e,r){return T6(this.logger,this,e,r)}kill(){}},Aw=class{constructor(e,r){this.cp=e;this.logger=r;this.pid=void 0;this.exitEmitter=new X;this.onExit=this.exitEmitter.event;this.errorEmitter=new X;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 wn(this.logger,this.cp.stdio[3],this.cp.stdio[4]):T6(this.logger,this,e,r)}kill(){qo(this.cp.pid,this.logger)}};function bve(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=L6.createInterface({input:t.stderr}),s="",o=()=>c();n.on("line",l),n.on("close",o);let a=new Le([t.onExit(()=>c()),t.onError(c)]),u=e.onCancellationRequested(()=>{p(),i(new Ms(`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 m=f.match(/^DevTools listening on (ws:\/\/.*)$/);m&&(p(),r(m[1]))}function p(){u.dispose(),n.removeListener("line",l),n.removeListener("close",o),a.dispose()}})}async function $6(t,e,r,i){let n=t.launchUnelevatedRequest({process:e,args:r});await Os(n,i,"Could not launch browser unelevated")}var k6=()=>{};async function O6(t,e,r,i,n,s,o={}){var j,F,T,O;let{onStderr:a=k6,onStdout:u=k6,args:c=[],dumpio:l=!1,cwd:p=process.cwd(),env:f=Dt.empty,connection:m="pipe",cleanUp:g="wholeBrowser",url:H,inspectUri:b}=o,w=new jo(c),k=w.getSuggestedConnection();o.includeLaunchArgs!==!1?(w=aL(w,o),k===void 0&&(w=w.setConnection(m),k=m)):k===void 0&&(k="pipe");let U=["pipe","pipe","pipe"];k==="pipe"&&(l?U=["ignore","pipe","pipe","pipe","pipe"]:U=["ignore","ignore","ignore","pipe","pipe"]);let x;if(!!(n.supportsLaunchUnelevatedProcessRequest&&o.launchUnelevated)&&typeof k=="number"&&k!==0)await $6(t,e,w.toArray(),s),x=new _w(r);else{r.info("runtime.launch",`Launching Chrome from ${e}`);let E=R6.spawn(e,w.toArray(),{detached:!0,env:f.defined(),cwd:await Ju(M6.promises,p)?p:process.cwd(),stdio:U});if(E.pid===void 0)throw await Promise.race([Oe(1e3).then(()=>new Error("Unable to launch the executable (undefined pid)")),new Promise(M=>E.once("error",M))]);x=new Aw(E,r)}l?((j=x.stderr)==null||j.on("data",E=>a(E.toString())),(F=x.stdout)==null||F.on("data",E=>u(E.toString()))):((T=x.stderr)==null||T.resume(),(O=x.stdout)==null||O.resume());let q=()=>{g==="wholeBrowser"&&x.kill()};process.on("exit",q),x.onExit(()=>process.removeListener("exit",q));try{o.promisedPort&&(k=await o.promisedPort);let E=await x.transport({connection:k,inspectUri:b||void 0,url:H||void 0},s),M=new Yt(E,r,i);return q=async()=>{g==="wholeBrowser"?(await M.rootSession().Browser.close({}),x.kill()):M.close()},{cdp:M,process:x}}catch(E){throw q(),E}}function aL(t,e={}){let{userDataDir:r=null,ignoreDefaultArgs:i=!1}=e,n=i===!0?new jo:jo.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 N6(t,e,r,i){let{browserWSEndpoint:n,browserURL:s}=t;if(n){let o=await ii.create(n,e);return new Yt(o,r,i)}else if(s){let o=await ww(s,e,r),a=t.inspectUri?yw(t.inspectUri,t.pageURL,o):o,u=await ii.create(a,e);return new Yt(u,r,i)}throw new Error("Either browserURL or browserWSEndpoint needs to be specified")}var _n=class{constructor(e,r,i){this.logger=e;this.pathResolver=r;this.vscode=i;this._disposables=[];this._onTerminatedEmitter=new X;this.onTerminated=this._onTerminatedEmitter.event;this._onTargetListChangedEmitter=new X;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:hr})},1e3)}createTargetManager(e,r,i){return bu.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)),Oe(e.timeout).then(()=>{throw new ne(Wy())})]);return typeof s=="string"?s:void 0}async getTargetFilter(e,r){let i=Ia(r),n=Zl(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=Iw.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 ne(Th(Iw.t("Cannot connect to the target at {0}: {1}",`${i.address}:${i.port}`,n.message)));await Oe(1e3)}throw new ne(Th(Iw.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 N6({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()}disconnect(){return this.terminate()}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():[]}};_n=$([(0,_u.injectable)(),A(0,(0,_u.inject)(fe)),A(1,(0,_u.inject)(ut)),A(2,(0,_u.optional)()),A(2,(0,_u.inject)(an))],_n);var zn=S(Y());var B6=S(zA()),U6=S(require("fs")),Au=S(Y()),Ew=S(require("path"));var Js=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 Le;this._terminated=!1;this._onTerminatedEmitter=new X;this.onTerminated=this._onTerminatedEmitter.event;this._onTargetListChangedEmitter=new X;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:m,cleanUp:g,launchUnelevated:H},b,w,k,U){let x=await this.findBrowserPath(e||"stable"),L;typeof o=="string"?L=o:o&&(L=Ew.join(this.storagePath,s!=null&&s.includes("--headless")?".headless-profile":".profile"));try{U6.mkdirSync(this.storagePath)}catch{}return await O6(b,x,this.logger,k,this.initializeParams,w,{onStdout:q=>b.output({category:"stdout",output:q}),onStderr:q=>b.output({category:"stderr",output:q}),dumpio:typeof r=="boolean"?r:r.stdio,cleanUp:g,hasUserNavigation:!!(l||p),cwd:u||m||void 0,env:Dt.merge(Dt.processEnv(),a),args:s||[],userDataDir:L,connection:c||(f?0:"pipe"),launchUnelevated:H,ignoreDefaultArgs:!i,includeLaunchArgs:n,url:l,inspectUri:f,promisedPort:U})}getFilterForTarget(e){return Zl(Ia(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 ne(xM(c))}if(this._disposables.push(o.cdp.onDisconnected(()=>this.fireTerminatedEvent())),this._connectionForTest=o.cdp,this._launchParams=e,this._targetManager=await bu.connect(o.cdp,o.process,this.pathResolver,this._launchParams,this.logger,s,i),!this._targetManager)throw o.process.kill(),new ne(Th());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 Os(this._targetManager.waitForMainTarget(a),n,"Could not attach to main target");if(!u)throw o.process.kill(),new ne(Wy());return u}async finishLaunch(e,r){if("skipNavigateForTest"in r)return;let i;if(r.file){let n=Ew.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 Di(this.fs,n)?i=Qe(n.slice(0,s))+n.slice(s):i=Qe(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(){for(let e of this.targetList())e.type()==="page"&&await e.cdp().Page.close({})}async disconnect(){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,B6.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}))}};Js=$([(0,Au.injectable)(),A(0,(0,Au.inject)(Ls)),A(1,(0,Au.inject)(fe)),A(2,(0,Au.inject)(ut)),A(3,(0,Au.inject)(gi)),A(4,(0,Au.inject)(Ie))],Js);var Gc=class extends Js{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 Ju(this.fs,i))throw new ne(qy("Chrome",r,(await this.browserFinder.findAll()).map(n=>n.quality)));return i}};Gc=$([(0,zn.injectable)(),A(0,(0,zn.inject)(Ls)),A(1,(0,zn.inject)(fe)),A(2,(0,zn.inject)(lc)),A(2,(0,zn.tagged)("browser","chrome")),A(3,(0,zn.inject)(Ie)),A(4,(0,zn.inject)(ut)),A(5,(0,zn.inject)(gi))],Gc);var j6=require("crypto"),Xn=S(Y()),q6=require("net"),W6=require("os"),V6=require("path");var wve=["--do-not-de-elevate"],Lf=class extends Js{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??wve},i,n,s,r.useWebView?this.getWebviewPort(r,s):void 0)}getFilterForTarget(r){return r.useWebView&&r.urlFilter?Zl(Ia(r)):super.getFilterForTarget(r)}async getWebviewPort(r,i){let n=Je();if(!r.runtimeExecutable)return n.resolve(r.port),n.promise;let s=r.runtimeExecutable.split(/\\|\//).pop(),o=`VSCode_${(0,j6.randomBytes)(12).toString("base64")}`,a=`\\\\.\\pipe\\WebView2\\Debugger\\${s}\\${o}`,u=(0,q6.createServer)(c=>{c.on("data",async l=>{let p=JSON.parse(l.toString()),f=p.devtoolsActivePort||"",m=parseInt(f.split(`
`).shift()||""),g=r.port||m;n.resolve(g);let H=`ws://${r.address}:${g}/devtools/${p.type}/${p.id}`,b=await ii.create(H,hr),w=new Yt(b,this.logger,i);await w.rootSession().Runtime.runIfWaitingForDebugger({}),w.close()})});return u.on("error",n.reject),u.on("close",()=>n.resolve(r.port)),u.listen(a),r.userDataDir=r.userDataDir||(0,V6.join)((0,W6.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 Ju(this.fs,i))throw new ne(qy("Edge",r,(await this.browserFinder.findAll()).map(n=>n.quality)));return i}};Lf=$([(0,Xn.injectable)(),A(0,(0,Xn.inject)(Ls)),A(1,(0,Xn.inject)(fe)),A(2,(0,Xn.inject)(lc)),A(2,(0,Xn.tagged)("browser","edge")),A(3,(0,Xn.inject)(Ie)),A(4,(0,Xn.inject)(ut)),A(5,(0,Xn.inject)(gi))],Lf);var Wo=S(Y());var G6=require("crypto"),Sw=S(Y());var _ve=0,Ys=class{constructor(e){this.portLeaseTracker=e;this.teardown=new WeakMap}async launch(e,r,i){this.server&&this.server.close();let n=`/${(0,G6.randomBytes)(20).toString("hex")}`,s=this.server=await ib(this.portLeaseTracker,{perMessageDeflate:!0,host:"127.0.0.1",path:n}),o=++_ve;e.launchBrowserInCompanion({...i,serverPort:s.address().port,path:n,launchId:o});let a=await Os(new Promise((c,l)=>{s.once("connection",c),s.once("error",l)}),r,"Timed out waiting for browser connection"),u=new ii(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}};Ys=$([(0,Sw.injectable)(),A(0,(0,Sw.inject)(gt))],Ys);var Tf=class extends _n{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 Yt(n,this.logger,r.telemetryReporter)}};Tf=$([(0,Wo.injectable)(),A(0,(0,Wo.inject)(Ys)),A(1,(0,Wo.inject)(fe)),A(2,(0,Wo.inject)(ut)),A(3,(0,Wo.optional)()),A(3,(0,Wo.inject)(an))],Tf);var Vo=S(Y());var $f=class extends Js{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:aL(new jo(r.runtimeArgs||[]),{hasUserNavigation:!!r.url,ignoreDefaultArgs:!r.includeDefaultArgs}).setConnection(r.port||"pipe").toArray(),params:r});return{cdp:new Yt(o,this.logger,s),process:{onExit:new X().event,onError:new X().event,transport:()=>Promise.resolve(o),kill:()=>this.helper.close(o)}}}async findBrowserPath(){throw new Error("not implemented")}};$f=$([(0,Vo.injectable)(),A(0,(0,Vo.inject)(Ls)),A(1,(0,Vo.inject)(fe)),A(2,(0,Vo.inject)(ut)),A(3,(0,Vo.inject)(gi)),A(4,(0,Vo.inject)(Ie)),A(5,(0,Vo.inject)(Ys))],$f);var Iu=S(Y()),Z6=require("net");var kf=class extends _n{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(()=>S(Q6())),n=i(r.useWebView.pipeName);if(!n)throw new ne(PM());let s=n.map(u=>(0,Z6.connect)(u)),o;try{o=await Os(Is(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 ne(LM());let a=new wn(this.logger,o);return new Yt(a,this.logger,e.telemetryReporter)}};kf=$([(0,Iu.injectable)(),A(0,(0,Iu.inject)(fe)),A(1,(0,Iu.inject)(ut)),A(2,(0,Iu.optional)()),A(2,(0,Iu.inject)(an))],kf);var Nf=S(Y()),d9=require("net");var Gi=S(Y());var Lg=Symbol("ILinkedBreakpointLocation");var a9=S(require("path"));var $g=S(Y()),Su=S(require("path")),o9=require("url");var e9=require("fs"),Go=S(require("path")),uL=require("url");function xw(t,e){return t?(t.endsWith("/")||(t+="/"),t+e):e}async function Dw(t,e,r,i,n){e=mt(e)||e;let s;if(t){if(ki(t))s=mt(t);else if(jr(t))s=await i(t,r,n)||t;else if(Go.isAbsolute(e))s=Dve(e,t);else{let o=new uL.URL(e).pathname,a=await i(o,r,n),u=Go.dirname(a);s=pa(u,t)}n.verbose("sourcemap.parsing","resolved sourceRoot",{sourceRoot:t,absSourceRoot:s})}else if(Go.isAbsolute(e))s=Go.dirname(e),n.verbose("sourcemap.parsing","no sourceRoot specified, using script dirname",{absSourceRoot:s});else{let o=new uL.URL(e).pathname||"/placeholder.js",a=await i(o,r,n);s=a?Go.dirname(a):"",n.verbose("sourcemap.parsing","no sourceRoot specified, using webRoot + script path dirname",{absSourceRoot:s})}return s=KO(s),s=Ft(s),s}var Tg=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),Cve(n,t))return xve(n,s,t)}return""},t9=(t,e)=>async(r,i,n)=>{if(process.platform==="win32"&&/^[a-z]:/i.test(r))return r;let s=await Yl(t,Go.dirname(e),"package.json");if(!s)return Tg(r,i,n);let o=await Tg(r,u$(i,a=>a.length>=s.length),n);if(process.platform!=="win32"&&r!=="/"&&!o){let a=await e9.promises.stat(r).catch(()=>{});if(a!=null&&a.isDirectory())return r}return o||s};function Cve(t,e){return t===e?!0:(t.endsWith("/")||(t+="/"),e.startsWith(t))}function xve(t,e,r){let i=decodeURIComponent(r.substring(t.length));return i?pa(e,i):e}function Dve(t,e){return Pi(Go.dirname(t),e)}var s9=S(om()),Mf=S(require("path"));var Tw="*",r9=new RegExp(Zr(Tw),"g"),Pw="?:"+Tw,Pve=new RegExp(Zr(Pw),"g"),cL=(t,e)=>{let r=e.match(t);return t.lastIndex=0,r?r.length:0},i9=new RegExp(`${Zr(Pw)}|${Zr(Tw)}`,"g"),Lw=class{constructor(e,r){this.logger=r;this.replacers=[];let i=Object.keys(e).sort((n,s)=>s.replace(Pw,"*").length-n.replace(Pw,"*").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=qe(n),a=`"${o}": "${s}"`,u=cL(r9,o)-cL(Pve,o);if(u>1){r.warn("runtime.sourcemap",`Warning: only one asterisk allowed in a sourceMapPathOverrides entry - ${a}`);continue}if(cL(r9,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(i9.lastIndex=0;;){let p=i9.exec(o);if(c+=Zr(o.slice(l,p==null?void 0:p.index),"/"),!p)break;p[0]===Tw?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=qe(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()}`),pa(s)}return e}};var Lve=/\x00/,n9,Rf=class{constructor(e,r){this.options=e;this.logger=r;this.sourceMapOverrides=new Lw(this.options.sourceMapOverrides,this.logger);this.resolvePatterns=(n9=this.options.resolveSourceMapLocations)==null?void 0:n9.map(e=>{let r=e.startsWith("!")?"!":"",i=e.slice(r.length).replace(/\.[a-z0-9]+$/,".*");if(!jr(i))return qe(e);i=qe(Pi(i));let n=JI(this.options.workspaceFolder),s=JI(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(iu))return!1;if(!this.resolvePatterns||this.resolvePatterns.length===0)return!0;let i=mt(e)||_r(e)&&r||e;if(i.startsWith("webpack-internal:///"))return!0;let n=$y(e)?!1:WE(),s=this.rebaseRemoteToLocal(i);return(0,s9.default)((s!==i?[i,s]:[i]).map(qe),this.resolvePatterns,{dot:!0,nocase:!n}).length>0}rebaseRemoteToLocal(e){if(!this.options.remoteRoot||!this.options.localRoot||!this.canMapPath(e))return Mf.resolve(e);let r=Ah(this.options.remoteRoot,e);if(r.startsWith(".."))return"";let i=pa(this.options.localRoot,r);return i=YI(i),this.logger.verbose("runtime.sourcemap",`Mapped remoteToLocal: ${e} -> ${i}`),Pi(i)}rebaseLocalToRemote(e){if(!this.options.remoteRoot||!this.options.localRoot||!this.canMapPath(e))return e;let r=Ah(this.options.localRoot,e),i=pa(this.options.remoteRoot,r);return i=Ft(i,!0),this.logger.verbose("runtime.sourcemap",`Mapped localToRemote: ${e} -> ${i}`),i}normalizeSourceMapUrl(e){e=e.replace(Lve,"");let r=e.lastIndexOf("?");return r!==-1&&e.slice(r-4,r)!==".vue"&&(e=e.slice(0,r)),e}canMapPath(e){return Mf.posix.isAbsolute(e)||Mf.win32.isAbsolute(e)||ki(e)}};var lL="https?:\\/\\/[^\\/]+\\/",Eu=class extends Rf{constructor(r,i,n,s){super(n,s);this.vueMapper=r;this.fsUtils=i}absolutePathToUrlPath(r){r=Su.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])=>Ty(c,r))||s;if(!o)return{url:Qe(r),needsWildcard:!1};let a=Aa(Su.relative(o[1],r)),u=o[0].replace(/\/$|^\//g,"");return u&&(a=u+"/"+a),!i&&!gv(a)?{url:a,needsWildcard:!0}:{url:cv(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(ki(r)){let o=mt(r);if(await this.fsUtils.exists(o))return o;let a=zO(r);if(await this.fsUtils.exists(a))return a}let i;try{let o=new o9.URL(r);if(!o.pathname||o.pathname==="/"?i="index.html":i=o.pathname,o.protocol==="webpack-internal:")return}catch{i=r}let n=Su.extname(i),s=i.replace(/^\//,"").split(/[\/\\]/);for(;s.length>0;){let o="/"+s.join("/"),a=await Tg(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 Ft(a);break;default:}r=this.normalizeSourceMapUrl(r);let{pathMapping:n}=this.options,s=xw(i.sourceRoot,r),o=this.sourceMapOverrides.apply(s);if(o!==s){o=Ft(o);let a=Pi(n["/"],"..","ClientApp",Ah(n["/"],o));return this.options.clientID==="visualstudio"&&s.startsWith("webpack:///")&&!await this.fsUtils.exists(o)&&await this.fsUtils.exists(a)?a:o}return ki(r)?mt(r):Su.isAbsolute(r)?Ft(r):Pi(await Dw(i.sourceRoot,i.metadata.compiledPath,n,Tg,this.logger),r)}absolutePathToUrlRegexp(r){let i=this.absolutePathToUrlPath(r),n=i.url,s=r.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=lL+n,o=lL.length,s+=lL.length);let a=mi(n,[o,s]);return i.needsWildcard?`${mi(Qe(r))}|${a}`:a}};Eu=$([(0,$g.injectable)(),A(0,(0,$g.inject)(af)),A(1,(0,$g.inject)(Br))],Eu);var $w=class extends Eu{constructor(r,i,n,s){super(r,i,n,s);this.blazorInCodespacesRegexpSubstitution="$1:\\$2";if(this.options.remoteFilePrefix){let o=`\\${a9.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=Aa(i).replace(/^(\w):(.*)$/,"$1$2"),o=mi(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=Qe(r),n=mi(i),s=super.absolutePathToUrlRegexp(r);return n.includes(s)?n:`${n}|${s}`}return super.absolutePathToUrlRegexp(r)}};var u9=require("url");function c9(t){if(t.url)try{let e=new u9.URL(t.url);return e.pathname="/",e.search="",e.hash="",e.protocol==="data:"?void 0:e.href}catch{}}var Kc=S(require("path")),p9=require("url");var l9="node:",Jn=class extends Rf{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 Jn(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(l9)&&this.options.basePath)return r=Kc.join(this.options.basePath,"lib",r.slice(l9.length)),r.endsWith(".js")||(r+=".js"),r;if(i)return this.sourceMapSourceToAbsolute(r,i);let n=mt(r);if(n)return this.rebaseRemoteToLocal(n);if(gv(r)){let o=this.sourceMapOverrides.apply(r);r=o===r?new p9.URL(r).pathname.slice(1):o}else if(Kc.isAbsolute(r))r=this.sourceMapOverrides.apply(r);else return`<node_internals>/${r}`;let s=Pi(this.options.basePath??"",r);return this.rebaseRemoteToLocal(s)}absolutePathToUrl(r){return Qe(this.rebaseLocalToRemote(Kc.normalize(r)))}async absolutePathToUrlRegexp(r){var n;let i=r;try{i=await this.fsUtils.realPath(r)}catch{}return hv(i,r)?mi(this.absolutePathToUrl(r)):((n=this.linkedBp)==null||n.warn(),mi(this.absolutePathToUrl(r))+"|"+mi(this.absolutePathToUrl(i)))}async sourceMapSourceToAbsolute(r,i){if(!this.shouldResolveSourceMap(i.metadata))return;let n=xw(i.sourceRoot,r),s=this.sourceMapOverrides.apply(n);return s!==n?Ft(s):ki(r)?mt(r):(!Kc.isAbsolute(r)&&this.options.basePath&&(r=Pi(await Dw(this.options.remoteRoot&&jr(i.sourceRoot)&&this.rebaseRemoteToLocal(i.sourceRoot)||i.sourceRoot,i.metadata.compiledPath,{"/":this.options.basePath},t9(this.fsUtils,i.metadata.compiledPath),this.logger),r)),this.rebaseRemoteToLocal(r)||r)}};var ni=Symbol("ISourcePathResolverFactory"),Yn=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 Jn(this.fsUtils,Jn.shouldWarnAboutSymlinks(e)?this.linkedBp:void 0,Jn.getOptions(e),r);throw new Error(`Not usable for type ${e.type}`)}};Yn=$([(0,Gi.injectable)(),A(0,(0,Gi.inject)(Br)),A(1,(0,Gi.optional)()),A(1,(0,Gi.inject)(Lg))],Yn);var Of=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 Jn(this.fsUtils,Jn.shouldWarnAboutSymlinks(e)?this.linkedBp:void 0,Jn.getOptions(e),r);{let i=!!e.inspectUri;return new(i?$w:Eu)(this.vueMapper,this.fsUtils,{workspaceFolder:e.__workspaceFolder,resolveSourceMapLocations:e.resolveSourceMapLocations,baseUrl:c9(e),localRoot:null,remoteRoot:null,pathMapping:{"/":e.webRoot,...e.pathMapping},sourceMapOverrides:e.sourceMapPathOverrides,clientID:this.initializeParams.clientID,remoteFilePrefix:e.__remoteFilePrefix},r)}}};Of=$([(0,Gi.injectable)(),A(0,(0,Gi.inject)(gi)),A(1,(0,Gi.inject)(af)),A(2,(0,Gi.inject)(Br)),A(3,(0,Gi.optional)()),A(3,(0,Gi.inject)(Lg))],Of);var f9=require("url");var kw=class extends bu{constructor(){super(...arguments);this.baseFilter=Ia(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(Tve),o}},Tve=t=>{let e;try{e=new f9.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 Qn=class extends _n{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=Qn.debugIdToRendererDebugPort.get(r.__sessionId);if(!n)return{blockSessionTermination:!1};let s=co({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 Le,o=await new Promise((a,u)=>{let c=(0,d9.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 Yt(new wn(this.logger,o),this.logger,r)}async getTargetFilter(r){return r.filter}async createTargetManager(r,i,n){return new kw(r,void 0,r.rootSession(),this.pathResolverFactory.create(i,this.logger),this.logger,n.telemetryReporter,i,n.targetOrigin)}};Qn.debugIdToRendererDebugPort=new Map,Qn=$([(0,Nf.injectable)(),A(0,(0,Nf.inject)(fe)),A(1,(0,Nf.inject)(ut)),A(2,(0,Nf.inject)(ni))],Qn);var Qs=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 Qs}};var h9=Symbol("ITargetOrigin"),Rw=class{constructor(e){this.id=e}},Ff=class{constructor(e){this.id=e}};var Mw=class{constructor(e,r){this.parentList=e;this.logger=r;this.targets=new Ws;this.onTerminatedEmitter=new X;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 Ff))throw new Error("Expected delegate session to have a mutable target origin");let s=i.target.logger;if(!(s instanceof Qs))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()}disconnect(){return this.terminate()}restart(){for(let e of this.targets.value())e.restart();return Promise.resolve()}targetList(){return[...this.targets.value()]}dispose(){this.terminate()}};var m9=S(Y());var $ve=0,Zs=class{constructor(){this.delegateSessions=new Ws;this.refsByTarget=new WeakMap}createLauncher(e){return new Mw(this.delegateSessions,e)}addDelegate(e,r,i){let n={id:$ve++,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)}};Zs=$([(0,m9.injectable)()],Zs);var D9=S(Y());var tt=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 tt(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 E9=S(Y());var A9=S(H9()),to=S(require("fs")),Xc=S(Y()),I9=S(require("net")),hL=S(require("os")),mL=S(require("path"));var Fw=class{constructor(e,r){this.sessionId=e;this.sink=r;this.onMessageEmitter=new X;this.onEndEmitter=new X;this.disposables=new Le;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 ti])}))}send(e){this.sink.NodeWorker.sendMessageToWorker({message:e,sessionId:this.sessionId})}dispose(){this.disposables.isDisposed||(this.disposables.dispose(),this.onEndEmitter.fire())}};var fL=require("path"),y9=(0,fL.join)(__dirname,"watchdog.js"),Bw=(0,fL.join)(__dirname,"bootloader.js");var Mg=S(Se()),An=S(Y()),eo=require("path");var kg=S(Y()),v9=require("path");var zc=Symbol("IPackageJsonProvider"),Uw={getPath:()=>Promise.resolve(void 0),getContents:()=>Promise.resolve(void 0)},Bf=class{constructor(e,r){this.fs=e;this.config=r;this.getPath=Fe(async()=>{if(this.config.type!=="pwa-node"||this.config.request!=="launch")return;let e=await Yl(this.fs,this.config.cwd,"package.json");return e?(0,v9.join)(e,"package.json"):void 0});this.getContents=Fe(async()=>{let e=await this.getPath();if(e)try{let r=await this.fs.readFile(e);return JSON.parse(r.toString())}catch{return}})}};Bf=$([(0,kg.injectable)(),A(0,(0,kg.inject)(Br)),A(1,(0,kg.inject)(Ke))],Bf);var In=Symbol("INodeBinaryProvider");function jw(t,e){return t.has(1)?e.addNodeOption("--inspect-publish-uid=http"):e}var Bve=new Set(["npm","yarn","pnpm","tnpm","cnpm"]),b9=t=>Bve.has((0,eo.basename)(t,(0,eo.extname)(t))),w9=(t,e)=>{if(!(!t||!b9(t)))return e.find(r=>!r.startsWith("-")&&r!=="run"&&r!=="run-script")},dL=new tt(12,0,0),Uve=new tt(8,0,0),jve=[{inclusiveMin:new tt(16,0,0),inclusiveMax:new tt(16,3,99),message:Mg.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 tt(7,0,0),inclusiveMax:new tt(8,99,99),message:Mg.t("You're running an outdated version of Node.js. We recommend upgrading for the latest bug, performance, and security fixes.")}],si=class{constructor(e,r){this.path=e;this.version=r;this.capabilities=new Set;r===void 0&&(r=dL),r.gte(new tt(12,0,0))&&this.capabilities.add(0),r.gte(new tt(12,6,0))&&this.capabilities.add(1)}get isPreciselyKnown(){return this.version!==void 0}get warning(){if(this.version){for(let e of jve)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)}},Rg=class extends ne{constructor(r,i){super(IM(r.toString(),i));this.version=r;this.location=i}},qve=["node","node64","electron"],Wve=new Map([[11,new tt(12,0,0)],[10,new tt(12,0,0)],[9,new tt(12,0,0)],[8,new tt(12,0,0)],[7,new tt(12,0,0)],[6,new tt(12,0,0)],[5,new tt(10,0,0)],[4,new tt(10,0,0)],[3,new tt(10,0,0)],[2,new tt(8,0,0)],[1,new tt(8,0,0)]]),Ko=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 Rg))throw s;if(await this.shouldTryDebuggingAnyway(s))return new si(s.location,s.version instanceof tt?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 ne(gE(r,Mg.t("path does not exist")));if(i)return new si(s,new tt(i,0,0));let o=mv(s);if(!qve.includes(o)){if(b9(s)){let H=await this.packageJson.getPath();H&&(e=e.addToPath((0,eo.resolve)((0,eo.dirname)(H),"node_modules/.bin"),"prepend"))}try{let H=await this.resolveAndValidateInner(e,"node",void 0,n);return new si(s,H.version)}catch(H){if($M(H,9230))throw H;return new si(s,void 0)}}if(s.startsWith("/snap/"))return new si(s,void 0);let a=this.knownGoodMappings.get(s);if(a)return a;let u=await this.getVersionText(s,n);if(!u)return new si(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 Rg(u,s);let[,l,p,f]=c.map(Number),m=new tt(l,p,f);if(o==="electron"){let H=await this.resolveAndValidate(e);m=tt.min(Wve.get(m.major)??dL,H.version??dL)}if(m.lt(Uve))throw new Rg(m,s);let g=new si(s,m);return this.knownGoodMappings.set(s,g),g}async resolveBinaryLocation(e,r){return e&&(0,eo.isAbsolute)(e)?await UR(this.fs,e,r):await Py(this.fs,e,r.value)}async getVersionText(e,r){var i;try{let{stdout:n}=await v0(e,["--version"],{env:Dt.processEnv().defined(),cwd:r});return n.trim()}catch(n){throw r&&!((i=await Di(this.fs,r))!=null&&i.isDirectory())?new ne(AM(r)):new ne(gE(e,n.message))}}};Ko=$([(0,An.injectable)(),A(0,(0,An.inject)(fe)),A(1,(0,An.inject)(Ie)),A(2,(0,An.inject)(zc))],Ko);var Uf=class extends Ko{constructor(r,i,n,s){super(r,i,n);this.vscode=s}async shouldTryDebuggingAnyway({message:r}){if(!this.vscode)return!1;let i=Mg.t("Yes");return await this.vscode.window.showErrorMessage(r,i)===i}};Uf=$([A(0,(0,An.inject)(fe)),A(1,(0,An.inject)(Ie)),A(2,(0,An.inject)(zc)),A(3,(0,An.optional)()),A(3,(0,An.inject)(an))],Uf);var _9=require("path");var jf=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 X;this._onDisconnectEmitter=new X;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,_9.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]==="\\"?Qe(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 Ai=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 Ws;this.onTerminatedEmitter=new X;this.onTerminated=this.onTerminatedEmitter.event;this.onTargetListChanged=this.targets.onChanged;this.bootloaderFile=Fe(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 disconnect(){await this.terminate()}async restart(e){if(!this.run)return;let r=this.program;r&&(this.program=void 0,await r.stop(),await Promise.race([Oe(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?dr.withTimeout(this.run.params.timeout).token:hr}})}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(Dt.merge(Dt.processEnv(),this.getConfiguredEnvironment(e)),r,e.nodeVersionHint,e.cwd)}getConfiguredEnvironment(e){let r=Dt.empty;if(e.envFile)try{r=r.merge(Kve(e.envFile))}catch(i){throw new ne(_M(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 Py(to.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=Dt.processEnv().lookup("NODE_OPTIONS");return l&&(u.NODE_OPTIONS+=` ${l}`),s.merge({...u})}createLifecycle(e,r,i){return{}}async _startServer(e){let r=Dy(),i=await new Promise((n,s)=>{let o=I9.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 jf(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 Fw(n.sessionId,e),o=new Np(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 Yt(s,i.logger,r).rootSession(),i.logger),a=new Le;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 Yt(new wn(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=qe(Bw);if(!i.includes(" "))return{interpolatedPath:i,dispose:()=>{}};if(r.has(0))return{interpolatedPath:`"${i}"`,dispose:()=>{}};let n=`require(${JSON.stringify(i)})`;if(!hL.tmpdir().includes(" ")||!e){let a=mL.join(hL.tmpdir(),"vscode-js-debug-bootloader.js");return await to.promises.writeFile(a,n),{interpolatedPath:a,dispose:()=>{}}}let s=".vscode-js-debug-bootloader.js",o=mL.join(e,s);return await to.promises.writeFile(o,n),{interpolatedPath:`./${s}`,dispose:()=>to.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 })"+Rt()});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 Oe(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}}};Ai=$([(0,Xc.injectable)(),A(0,(0,Xc.inject)(In)),A(1,(0,Xc.inject)(fe)),A(2,(0,Xc.inject)(gt)),A(3,(0,Xc.inject)(ni))],Ai);function Kve(t){if(!to.existsSync(t))return{};let e=zve(to.readFileSync(t,"utf8"));return A9.parse(Buffer.from(e))}function zve(t){return t&&t[0]==="\uFEFF"&&(t=t.substr(1)),t}var Cu=class extends Ai{};Cu=$([(0,E9.injectable)()],Cu);var qw=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]}},Ww=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,qo(this.child.pid,this.logger,this.killBehavior),this.stopped}},zo=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}},Du=class extends zo{constructor(r){super();this.wd=r;r.onEnd(i=>{this.stopDefer(i),this.wd.dispose()})}stop(){return this.wd.dispose(),this.stopped}},Og=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){qo(e,this.logger,this.killBehavior);return}this.loop||this.startPollLoop(e)}stop(){return this.didStop?this.stopped:(this.didStop=!0,this.loop?(qo(this.loop.processId,this.logger,this.killBehavior),this.startPollLoop(this.loop.processId,Og.killConfirmInterval)):this.terminalResult.shellProcessId?(qo(this.terminalResult.shellProcessId,this.logger,this.killBehavior),this.startPollLoop(this.terminalResult.shellProcessId,Og.killConfirmInterval)):this.onStopped(!0),this.stopped)}startPollLoop(e,r=Og.terminationPollInterval){this.loop&&clearInterval(this.loop.timer);let i={processId:e,timer:setInterval(()=>{Xve(e)||(clearInterval(i.timer),this.onStopped(!0))},r)};this.loop=i}},xu=Og;xu.terminationPollInterval=1e3,xu.killConfirmInterval=200;function Xve(t){try{return process.kill(t,0),!0}catch{return!1}}var x9=S(require("net"));var S9=require("crypto"),C9=()=>(0,S9.randomBytes)(12).toString("hex");var Ii=class{constructor(e,r){this.info=e;this.server=r;this.onEndEmitter=new X;this.cts=new dr;this.gracefulExit=!1;this.targetAlive=!1;this.targetInfo={targetId:this.info.ownId??C9(),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=x9.createConnection(e.ipcAddress,()=>n(o));o.on("error",s)}),i=new wn(Hn.null,r);return new Ii(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 ii.create(this.info.inspectorURL,this.cts.token);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 gL=class extends Du{constructor(r,i){super(r);this.logger=i;this.stopped.then(()=>{this.telemetry&&qo(this.telemetry.processId,this.logger,"polite")})}},qf=class extends Cu{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 Pf(`http://localhost:${r.params.port}`,r.context.cancellationToken,this.logger),n=await Ii.attach({ipcAddress:r.serverAddress,scriptName:"Extension Host",inspectorURL:i,waitForDebugger:!0,dynamicAttach:!0}),s=this.program=new gL(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 xu({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 si("node",tt.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())})`+Rt()});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 Oe(50)}}};qf=$([(0,D9.injectable)()],qf);var Ng=require("fs"),P9=S(Y());var Wf=class extends Ai{resolveParams(e){return e.type==="pwa-extensionHost"&&e.request==="launch"?e:void 0}async launchProgram(e){let r=e.params.port||await Oa(),i=await e.context.dap.launchVSCodeRequest({args:Jve(e.params,r),env:this.getConfiguredEnvironment(e.params).defined(),debugRenderer:e.params.debugWebviews||e.params.debugWebWorkerHost});i.rendererDebugPort&&Qn.debugIdToRendererDebugPort.set(e.params.__sessionId,i.rendererDebugPort),this.program=new zo,this.program.stop()}};Wf=$([(0,P9.injectable)()],Wf);var Jve=(t,e)=>{let r=t.args.map(i=>{if(i.startsWith("-")){let n=i.split("=",2);return n.length===2&&((0,Ng.existsSync)(n[1])||(0,Ng.existsSync)(n[1]+".js"))?{prefix:n[0]+"=",path:n[1]}:{prefix:i}}else{try{let n=(0,Ng.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 j9=S(Se()),Yc=S(Y());var L9=require("crypto"),Fg=require("fs"),T9=require("os"),$9=S(require("path")),Vw=class{constructor(){this.disposed=!1;this.path=$9.join((0,T9.tmpdir)(),`node-debug-callback-${(0,L9.randomBytes)(8).toString("hex")}`);this.file=Fg.promises.open(this.path,"w")}static isValid(e){try{let r=(0,Fg.readFileSync)(e);return r.length?r.readDoubleBE()>Date.now()-Vw.recencyDeadline:!1}catch{return!1}}async startTouchLoop(){await this.touch(),this.disposed||(this.updateInterval=setInterval(()=>this.touch(),Vw.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 Fg.promises.unlink(this.path)}catch{}}}},Vf=Vw;Vf.updateInterval=1e3,Vf.recencyDeadline=2e3;var F9=require("fs");var M9=require("path");var k9=require("child_process"),R9=S(nL()),Gf=class{constructor(e=k9.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,R9.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 Kf=class extends Gf{constructor(r){super();this.fsUtils=r}async getWorkingDirectory(r){try{let{stdout:i}=await v0("lsof",["-a","-dcwd","-Fn",`-p${r}`]),n=i.trim().split(`
`).pop().slice(1);return n&&(0,M9.isAbsolute)(n)&&await this.fsUtils.exists(n)?n:void 0}catch(i){if(i instanceof Po)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 Gw=class extends Kf{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 O9=require("path");var Kw=class extends Gf{async getWorkingDirectory(){}createProcess(){let e=(0,O9.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 N9=new xi(F9.promises),Bg=process.platform==="win32"?new Kw:process.platform==="darwin"?new Kf(N9):new Gw(N9);function zw(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 B9(t,e,r,i=hr){let n=await Yve(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}=zw(a.args);u&&s.push(oL(`http://${t.hostname}:${u}`,i,r,!0).then(c=>Ii.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 Yve(t,e){let r=new Map;r.set(0,{children:[],pid:0,ppid:0,command:"",args:""});try{await Bg.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 U9=S(Y());var ro=class{create(e){return e===!1?new HL:e===!0?new Jc({maxAttempts:1/0,delay:1e3}):new Jc({maxAttempts:e.maxAttempts??1/0,delay:e.delay??1e3})}};ro=$([(0,U9.injectable)()],ro);var Jc=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 Jc(this.options,this.attempt+1)}reset(){return this.attempt?new Jc(this.options):this}},HL=class{constructor(){this.delay=-1}next(){}reset(){return this}};var zf=class extends Cu{constructor(r,i,n,s,o=new ro){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 Pf(`http://${r.params.address}:${r.params.port}`,o&&r.params.timeout>0?dr.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 Ii.attach({ipcAddress:r.serverAddress,scriptName:"Remote Process",inspectorURL:u,waitForDebugger:!0,dynamicAttach:!0}),l=this.program=new Du(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:j9.t(`Lost connection to debugee, reconnecting in {0}ms\r
`,u.delay)});let c=new zo;this.program=c;let l=await Promise.race([Oe(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 Vf;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&&B9({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 Ql(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())})`+Rt()});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 Oe(50)}}};zf=$([(0,Yc.injectable)(),A(0,(0,Yc.inject)(In)),A(1,(0,Yc.inject)(fe)),A(2,(0,Yc.inject)(ni)),A(3,(0,Yc.inject)(gt))],zf);var Ki=S(Y()),Yf=require("path");function Ug(t){return t instanceof Array?t:[t]}function Xw(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 q9=require("os"),W9=S(require("path")),V9=require("crypto"),Xf=require("fs"),yL=class{constructor(){this.path=W9.join((0,q9.tmpdir)(),`node-debug-callback-${(0,V9.randomBytes)(8).toString("hex")}`);this.disposed=!1}read(e=yL.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,Xf.existsSync)(this.path)){try{r(JSON.parse((0,Xf.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,Xf.unlinkSync)(this.path)}catch{}}}},jg=yL;jg.pollInterval=200;var Qc=S(require("path"));var qg=Symbol("IProgramLauncher"),Jw=t=>{let e=t.program;if(e&&Qc.isAbsolute(e)){let r=Qc.relative(t.cwd,e);e=Qc.isAbsolute(r)?r:`.${Qc.sep}${r}`}return e?[...t.runtimeArgs,e,...Ug(t.args)]:[...t.runtimeArgs,...Ug(t.args)]};var Qve=async(t,e)=>{if(typeof e.stopOnEntry=="string")return(0,Yf.resolve)(e.cwd,e.stopOnEntry);if(e.program)return(0,Yf.resolve)(e.cwd,e.program);for(let r of Ug(e.args)){if(r.startsWith("-"))continue;let i=(0,Yf.resolve)(e.cwd,r);if(await t.exists(i))return i}},Jf=class extends Ai{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 Xw(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 jg,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=jw(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 Ii.attach({ipcAddress:r.serverAddress,scriptName:"Remote Process",inspectorURL:await Pf(`http://127.0.0.1:${this.attachSimplePort}`,r.context.cancellationToken,this.logger),waitForDebugger:!0,dynamicAttach:!0});p=new qw(p,new Du(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 m=n.next();if(!m){this.onProgramTerminated(f);return}await Oe(m.delay),this.program===p&&i(m)})};return i(this.restarters.create(r.params.restart))}async getSimpleAttachPortIfAny(r){var s,o;if(r.attachSimplePort)return r.attachSimplePort;let i=w9(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 Qve(this.fsUtils,i.params);if(!s){this.logger.warn("runtime","Could not resolve program entrypointfrom args");return}let o="(?:entryBreakpoint){0}",a=Qe(s),u=mi(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=Ft(r);let i=(0,Yf.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}};Jf=$([(0,Ki.injectable)(),A(0,(0,Ki.inject)(In)),A(1,(0,Ki.inject)(fe)),A(2,(0,Ki.inject)(ac)),A(3,(0,Ki.multiInject)(qg)),A(4,(0,Ki.inject)(ro)),A(5,(0,Ki.inject)(Br)),A(6,(0,Ki.inject)(zc)),A(7,(0,Ki.inject)(ni)),A(8,(0,Ki.inject)(gt))],Jf);var Zf=S(require("fs")),G9=require("fs"),Yw=S(Y()),K9=S(require("os")),oi=S(require("path"));var Qw=Symbol("INvmResolver");var Qf=class{constructor(e=new xi(G9.promises),r=process.env,i=process.arch,n=process.platform,s=K9.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"?oi.join(this.env.LOCALAPPDATA||"","nvs"):oi.join(this.env.HOME||"",".nvs");Zf.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 ne(mE(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"]||oi.join(this.homedir,".nvm");await this.fsUtils.exists(o)&&(i=await this.resolveUnixNvm(e),n.push("nvm"))}if(!n.length)throw new ne(hE());if(!i||!await this.fsUtils.exists(i))throw new ne(mE(e,n.join("/")));return{directory:i,binary:await this.getBinaryInFolder(i)}}async getBinaryInFolder(e){return await Is(["node64.exe","node64"].map(r=>this.fsUtils.exists(oi.join(e,r))))?"node64":"node"}async resolveNvs(e,{remoteName:r,semanticVersion:i,arch:n}){if(!e)throw new ne(vM());let s=this.findBinFolderForVersion(oi.join(e,r),i,o=>Zf.existsSync(oi.join(o,n)));if(s)return this.platform!=="win32"?oi.join(s,n,"bin"):oi.join(s,n)}async resolveUnixNvm(e){let r=this.env["NVM_DIR"];if(!r){let n=oi.join(this.env.HOME||"",".nvm");await this.fsUtils.exists(n)&&(r=n)}if(!r)throw new ne(hE());let i=this.findBinFolderForVersion(oi.join(r,"versions","node"),`v${e}`);return i?oi.join(i,"bin"):void 0}async resolveWindowsNvm(e){let r=this.env["NVM_HOME"];if(!r)throw new ne(bM());return this.findBinFolderForVersion(r,`v${e}`)}findBinFolderForVersion(e,r,i){if(!Zf.existsSync(e))return;let n=Zf.readdirSync(e);if(n.includes(r))return oi.join(e,r);let s=n.filter(o=>o.startsWith(`${r}.`)).sort(Zve).filter(o=>i?i(oi.join(e,o)):!0).pop();return s?oi.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=ebe(i[8]||this.arch);return{nvsFormat:n,remoteName:s,semanticVersion:o,arch:a}}};Qf=$([(0,Yw.injectable)(),A(0,(0,Yw.inject)(Br))],Qf);var Zve=(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 ebe(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 z9=require("child_process"),Zw=S(Y());var ed=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}=tbe(e,Jw(r),r.cwd);i.dap.output({category:"console",output:[n,...s].join(" ")+`
`});let u=(0,z9.spawn)(n,s,{shell:o,cwd:a,env:Dt.merge(Dt.processEnv(),r.env).defined()});return r.outputCapture==="console"?this.discardStdio(i.dap,u):this.captureStdio(i.dap,u),new Ww(u,this.logger,r.killBehavior)}captureStdio(e,r){r.stdout.on("data",i=>e.output({category:"stdout",output:i.toString()})),r.stderr.on("data",i=>e.output({category:"stderr",output:i.toString()})),r.stdout.resume(),r.stderr.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()}};ed=$([(0,Zw.injectable)(),A(0,(0,Zw.inject)(fe))],ed);var tbe=(t,e,r)=>{if(process.platform==="win32"&&(t=On(t),r=On(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 e_=S(Y());var td=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,...Jw(r)],env:vl(r.env),argsCanBeInterpretedByShell:!Array.isArray(r.args)},s;try{s=await this.sendLaunchRequest(n,i)}catch(o){throw new ne(wM(o.message))}return new xu(s,this.logger,r.killBehavior)}sendLaunchRequest(e,r){return r.dap.runInTerminalRequest(e)}};td=$([(0,e_.injectable)(),A(0,(0,e_.inject)(fe))],td);var X9=S(Y());var rd=class{getTreatment(e,r){return Promise.resolve(r)}};rd=$([(0,X9.injectable)()],rd);var J9=S(Y());var Zc=class{constructor(){this.flushEmitter=new X;this.onFlush=this.flushEmitter.event}report(){}reportOperation(){}attachDap(){}flush(){this.flushEmitter.fire()}dispose(){}};Zc=$([(0,J9.injectable)()],Zc);var Y9=require("crypto"),Pu=S(Y()),Q9=require("os"),Z9=S(require("path")),Wg=S(require("vscode"));var vL=class{constructor(e){this.terminal=e;this.stopped=new Promise(r=>{let i=Wg.window.onDidCloseTerminal(n=>{n===e&&(r({code:0,killed:!0}),i.dispose())})})}gotTelemetery(){}stop(){return this.terminal.sendText(""),setTimeout(()=>this.terminal.dispose(),1),this.stopped}},Xo=class extends Ai{constructor(r,i,n,s,o){super(r,i,o,s);this.fs=n;this.terminalCreatedEmitter=new X;this.callbackFile=Z9.join((0,Q9.tmpdir)(),`node-debug-callback-${(0,Y9.randomBytes)(8).toString("hex")}`);this.onTerminalCreated=this.terminalCreatedEmitter.event}async getProcessTelemetry(){try{return JSON.parse(await this.fs.readFile(this.callbackFile,"utf-8"))}catch{return}}resolveParams(r){if(r.type==="node-terminal"&&r.request==="launch")return r;if(r.type==="pwa-chrome"&&r.server&&"command"in r.server)return r.server}async launchProgram(r){let i;try{i=await this.resolveNodePath(r.params)}catch(a){if(a instanceof ne&&a.cause.id===9230)throw a;i=new si("node",void 0)}let n=await this.resolveEnvironment(r,i,{fileCallback:this.callbackFile}),s=await this.createTerminal({name:r.params.name,cwd:r.params.cwd,iconPath:new Wg.ThemeIcon("debug"),env:jw(i,n).defined(),isTransient:!0});this.terminalCreatedEmitter.fire(s),s.show();let o=this.program=new vL(s);r.params.command&&s.sendText(r.params.command,!0),o.stopped.then(a=>{o===this.program&&this.onProgramTerminated(a)})}createTerminal(r){return Promise.resolve(Wg.window.createTerminal(r))}dispose(){super.dispose(),this.fs.unlink(this.callbackFile).catch(()=>{})}};Xo=$([(0,Pu.injectable)(),A(0,(0,Pu.inject)(In)),A(1,(0,Pu.inject)(fe)),A(2,(0,Pu.inject)(Ie)),A(3,(0,Pu.inject)(ni)),A(4,(0,Pu.inject)(gt))],Xo);var nl=S(Y()),Xg=S(z7());var dd=class{constructor(e,r){r&&e instanceof yi&&(this.service=(0,Xg.getExperimentationService)("ms-vscode.js-debug",Vu,PH?Xg.TargetPopulation.Insiders:Xg.TargetPopulation.Public,{setSharedProperty(i,n){e.setGlobalMetric(i,n)},postEvent(i,n){e.pushOutput({category:"telemetry",output:i,data:n})}},r.globalState))}async getTreatment(e,r){if(!this.service)return r;try{return await this.service.getTreatmentVariableAsync("vscode",e,!0)}catch{return r}}};dd=$([(0,nl.injectable)(),A(0,(0,nl.inject)(jt)),A(1,(0,nl.optional)()),A(1,(0,nl.inject)(It))],dd);var A_=S(Y()),J7=S(require("vscode"));var X7=S(Y()),Lr=S(require("vscode"));var it=class{constructor(){this._onSessionAddedEmitter=new Lr.EventEmitter;this._onSessionEndedEmitter=new Lr.EventEmitter;this._disposables=[];this.sessions=new Map;this.onSessionAdded=this._onSessionAddedEmitter.event;this.onSessionEnded=this._onSessionEndedEmitter.event}static isConcreteSession(e){return!!e.configuration.__pendingTargetId}static pickSession(e,r){if(e.length<2)return e[0];let i=Lr.window.createQuickPick();return i.title=r,i.items=e.map(n=>({label:n.name,id:n.id})),i.ignoreFocusOut=!0,new Promise(n=>{i.onDidAccept(()=>n(e.find(s=>{var o;return s.id===((o=i.selectedItems[0])==null?void 0:o.id)}))),i.onDidHide(()=>n(void 0)),i.show()}).finally(()=>i.dispose())}get isDebugging(){return this.sessions.size>0}getById(e){return this.sessions.get(e)}isRunning(e){return[...this.sessions.values()].includes(e)}getByName(e){return[...this.sessions.values()].filter(r=>r.name===e)}getConcreteSessions(){return[...this.sessions.values()].filter(it.isConcreteSession)}getChildren(e){return[...this.sessions.values()].filter(r=>r.configuration.__parentId===e.id)}attach(){Lr.debug.onDidStartDebugSession(e=>{ua(e.type)&&(this.sessions.set(e.id,e),this._onSessionAddedEmitter.fire(e))},void 0,this._disposables),Lr.debug.onDidTerminateDebugSession(e=>{ua(e.type)&&(this.sessions.delete(e.id),this._onSessionEndedEmitter.fire(e))},void 0,this._disposables),Lr.debug.onDidReceiveDebugSessionCustomEvent(e=>{if(ua(e.session.type)){if(e.event==="revealLocationRequested"){let r=e.body,i=Lr.debug.asDebugSourceUri(e.body.source),n={};if(r.line){let s=new Lr.Position((r.line||1)-1,(r.column||1)-1);n.selection=new Lr.Range(s,s)}Lr.window.showTextDocument(i,n);return}if(e.event==="copyRequested"){let r=e.body;Lr.env.clipboard.writeText(r.text);return}}},void 0,this._disposables)}dispose(){for(let e of this._disposables)e.dispose();this._disposables=[]}};it=$([(0,X7.injectable)()],it);var hd=class{constructor(e){this.tracker=e}register(e){e.subscriptions.push(this.tracker.onSessionEnded(r=>{let i=r.configuration.cascadeTerminateToConfigurations;if(!(!i||!(i instanceof Array)))for(let n of i)for(let s of this.tracker.getByName(n))J7.debug.stopDebugging(s)}))}};hd=$([(0,A_.injectable)(),A(0,(0,A_.inject)(it))],hd);var I_=Symbol("IDebugConfigurationResolver"),E_=Symbol("IDebugConfigurationProvider");var bd=S(Se()),ea=S(Y()),lK=require("os"),wd=require("path"),Yg=S(require("vscode"));var Y7=S(Y()),Q7=S(require("vscode"));var Yo=class{get type(){return this.getType()}get triggerKind(){return this.getTriggerKind()}async provideDebugConfigurations(e,r){try{let i=await this.provide(e,r);if(!i)return[];let n=i instanceof Array?i:[i],s=oh.get(this.type);if(s)for(let o of n)o.type===this.type&&(o.type=s);return n}catch(i){return Q7.window.showErrorMessage(i.message,{modal:!0}),[]}}};Yo=$([(0,Y7.injectable)()],Yo);var x_=S(Y()),tK=require("path"),Qo=S(require("vscode"));var Jg=S(Y()),hT=S(require("vscode"));var Z7=S(require("vscode")),md=class{constructor(e){this.key=e}set value(e){e!==this._value&&(this._value=e,Z7.commands.executeCommand("setContext",this.key,e))}get value(){return this._value}};var eK=Symbol("Uninitialized"),S_=class{constructor(e,r){this.key=e;this.defaultValue=r;this._value=eK}write(e,r){r!==this.read(e)&&(this._value=r,e.update(this.key,r))}read(e){return this._value===eK&&(this._value=e.get(this.key)??this.defaultValue),this._value}};var C_=new S_("sourceSteppingEnabled",!0),gd=class{constructor(e,r){this.context=e;this.tracker=r}register(e){let r=new md("jsDebugIsMapSteppingDisabled");C_.read(this.context.workspaceState)===!1&&(r.value=!0);let i=n=>{r.value=!n,C_.write(this.context.workspaceState,n);for(let s of this.tracker.getConcreteSessions())s.customRequest("setSourceMapStepping",{enabled:n})};e.subscriptions.push($e(hT.commands,"extension.js-debug.enableSourceMapStepping",async()=>{i(!0)}),$e(hT.commands,"extension.js-debug.disableSourceMapStepping",async()=>{i(!1)}))}};gd=$([(0,Jg.injectable)(),A(0,(0,Jg.inject)(It)),A(1,(0,Jg.inject)(it))],gd);var En=class{constructor(e){this.extensionContext=e}get type(){return this.getType()}async resolveDebugConfiguration(e,r,i){if(r.type&&(r.type=this.getType()),"__pendingTargetId"in r)return r;let n=r;n.sourceMaps??=C_.read(this.extensionContext.workspaceState);try{let s=await this.resolveDebugConfigurationAsync(e,n,i);return s&&this.commonResolution(s,e)}catch(s){Qo.window.showErrorMessage(s.message,{modal:!0})}}applyDefaultRuntimeExecutable(e){if(e.runtimeExecutable)return;let r=$t(Qo.workspace,"debug.javascript.defaultRuntimeExecutable"),i=r?r[e.type]:void 0;i&&(e.runtimeExecutable=i)}commonResolution(e,r){var i,n;return e.trace=ZI(e.trace,this.extensionContext.logPath),e.__workspaceCachePath=this.extensionContext.storagePath,e.__breakOnConditionalError=$t(Qo.workspace,"debug.javascript.breakOnConditionalError",r)??!1,r?e.__workspaceFolder=r.uri.fsPath:(e.__workspaceFolder||=this.getSuggestedWorkspaceFolders(e).filter(kt).filter(s=>!s.includes("${workspaceFolder}")).map(s=>{var o;return(0,tK.isAbsolute)(s)?(o=Qo.workspace.getWorkspaceFolder(Qo.Uri.file(s)))==null?void 0:o.uri.fsPath:s}).find(kt)||((n=(i=Qo.workspace.workspaceFolders)==null?void 0:i[0])==null?void 0:n.uri.fsPath)||"",e.__workspaceFolder?e=MA(e):e=RA(e)),e}getSuggestedWorkspaceFolders(e){return[]}};En=$([(0,x_.injectable)(),A(0,(0,x_.inject)(It))],En);var Tu=S(Se()),yd=require("fs"),Hd=S(Y()),Pt=S(require("path")),Yi=S(require("vscode"));var rK=S(require("vscode"));function D_(t){rK.debug.activeDebugConsole.appendLine(t)}var sl=S(Se()),iK=require("child_process"),nK=require("fs"),sK=require("path"),Ei=S(require("vscode"));var swe=9229;async function oK(){let t=await HT();if(!t)return;let e=$t(Ei.workspace,"debug.javascript.pickAndAttachOptions"),r={...LA,...e,name:"process",processId:t};await gT(new xi(nK.promises),r,!0),await Ei.debug.startDebugging(r.cwd?Ei.workspace.getWorkspaceFolder(Ei.Uri.file(r.cwd)):void 0,r)}async function gT(t,e,r=!1){var s;let i=(s=e.processId)==null?void 0:s.trim(),n=i&&uwe(i);if(!n||isNaN(n.pid))throw new Error(sl.t("Attach to process: '{0}' doesn't look like a process id.",i||"<unknown>"));if(n.port||lwe(n.pid),e.port=n.port||swe,delete e.processId,r){let o=await owe(t,n.pid);o&&(e.cwd=o)}}async function owe(t,e){var s;let r=e&&await Bg.getWorkingDirectory(e);if(!r)return(s=Ei.workspace.workspaceFolders)==null?void 0:s[0].uri.fsPath;let i=await Yl(t,r,"package.json");if(!i)return r;let n=Ei.workspace.getWorkspaceFolder(Ei.Uri.file(r));return!n||Ly(n.uri.fsPath,i)?i:n.uri.fsPath}async function HT(){try{let t=await cwe();return t?t.pidAndPort:null}catch(t){return await Ei.window.showErrorMessage(sl.t("Process picker failed ({0})",t.message),{modal:!0}),null}}var awe=(t,e)=>`${t}:${e??""}`,uwe=t=>{let[e,r]=t.split(":");return{pid:Number(e),port:r?Number(r):void 0}};async function cwe(){let t=/^(?:node|iojs)(?:$|\b)/i,e=0,r=Ei.window.createQuickPick();r.placeholder=sl.t("Pick the node.js process to attach to"),r.matchOnDescription=!0,r.matchOnDetail=!0,r.busy=!0,r.show();let i=!1,n=new Promise(o=>{r.onDidAccept(()=>o(r.selectedItems[0])),r.onDidHide(()=>o(void 0))});Bg.lookup((o,a)=>{if(i)return a;process.platform==="win32"&&o.command.indexOf("\\??\\")===0&&(o.command=o.command.replace("\\??\\",""));let u=(0,sK.basename)(o.command,".exe"),{port:c}=zw(o.args);if(!c&&!t.test(u))return a;let l={label:u,description:o.args,pidAndPort:awe(o.pid,c),sortKey:o.date?o.date:e++,detail:c?sl.t("process id: {0}, debug port: {1} ({2})",o.pid,c,"SIGUSR1"):sl.t("process id: {0} ({1})",o.pid,"SIGUSR1")},p=a.findIndex(f=>f.sortKey<l.sortKey);return a.splice(p===-1?a.length:p,0,l),r.items=a,a},[]).then(()=>r.busy=!1).catch(o=>{Ei.window.showErrorMessage(`Error listing processes: ${o.message}`),r.dispose()});let s=await n;return i=!0,r.dispose(),s}function lwe(t){try{if(process.platform==="win32"){let e=`node -e process._debugProcess(${t})`;(0,iK.execSync)(e)}else process.kill(t,"SIGUSR1")}catch(e){throw new Error(sl.t("Attach to process: cannot enable debug mode for process '{0}' ({1}).",t,e))}}var $u=class extends En{constructor(r,i,n){super(r);this.nvmResolver=i;this.fsUtils=n}async resolveDebugConfigurationWithSubstitutedVariables(r,i){let n=i;if(n.type==="pwa-node"&&n.request==="attach"&&typeof n.processId=="string"&&await gT(this.fsUtils,n),n.cwd){let s=await Di(yd.promises,n.cwd);if(!s){Yi.window.showErrorMessage(Tu.t("The configured `cwd` {0} does not exist.",n.cwd),{modal:!0});return}if(!s.isDirectory()){Yi.window.showErrorMessage(Tu.t("The configured `cwd` {0} is not a folder.",n.cwd),{modal:!0});return}}return n}async resolveDebugConfigurationAsync(r,i,n){if(!i.name&&!i.type&&!i.request&&(i=await vT(r,!0,i),i.request==="launch"&&!i.program)){Yi.window.showErrorMessage(Tu.t("Cannot find a program to debug"),{modal:!0});return}if(i.cwd||(i.cwd=i.localRoot||yT(i.request==="launch"?i.program:void 0,r)),i.remoteRoot&&!i.localRoot&&(i.localRoot="${workspaceFolder}"),i.request==="launch"){if(this.applyDefaultRuntimeExecutable(i),i.runtimeExecutable&&mv(i.runtimeExecutable)==="deno"&&!i.attachSimplePort){let o=await Oa();i.attachSimplePort=o,i.continueOnAttach??=!0;let a=[`--inspect-brk=127.0.0.1:${o}`,"--allow-all"];i.runtimeArgs?i.runtimeArgs.includes("run")?i.runtimeArgs=[...i.runtimeArgs,...a]:i.runtimeArgs=["run",...a,...i.runtimeArgs]:i.runtimeArgs=["run",...a]}let s=i.runtimeVersion;if(typeof s=="string"&&s!=="default"){let{directory:o,binary:a}=await this.nvmResolver.resolveNvmVersionPath(s);i.env=new Dt(i.env).addToPath(o,"prepend",!0).value,i.runtimeExecutable=!i.runtimeExecutable||i.runtimeExecutable==="node"?a:i.runtimeExecutable}if(i.console==="integratedTerminal"&&!i.internalConsoleOptions&&(i.internalConsoleOptions="neverOpen"),i.attachSimplePort===null||i.attachSimplePort===void 0)Xw(i);else{if(i.attachSimplePort===0){i.attachSimplePort=await Oa(void 0,n);let o=`--inspect-brk=${i.attachSimplePort}`;i.runtimeArgs=i.runtimeArgs?[...i.runtimeArgs,o]:[o]}i.continueOnAttach=!i.stopOnEntry,i.stopOnEntry=!1}await pwe(this.fsUtils,r,i)}return $A(i)}getType(){return"pwa-node"}getSuggestedWorkspaceFolders(r){return[r.rootPath,r.cwd]}};$u=$([(0,Hd.injectable)(),A(0,(0,Hd.inject)(It)),A(1,(0,Hd.inject)(Qw)),A(2,(0,Hd.inject)(Br))],$u);function yT(t,e){if(e)return e.uri.fsPath;if(Yi.workspace.workspaceFolders&&Yi.workspace.workspaceFolders.length>0)return Yi.workspace.workspaceFolders[0].uri.fsPath;if(t){if(t==="${file}")return"${fileDirname}";if(Pt.isAbsolute(t))return Pt.dirname(t)}return"${workspaceFolder}"}function aK(t,e){var r;if(t&&(e=is(e,"workspaceFolder",t.uri.fsPath)),(r=Yi.workspace.workspaceFolders)!=null&&r.length&&(e=is(e,"workspaceRoot",Yi.workspace.workspaceFolders[0].uri.fsPath)),Pt.isAbsolute(e))return e;if(t)return Pt.join(t.uri.fsPath,e)}async function pwe(t,e,r){if(r.outFiles||!e)return;let i;if(r.program?(i=aK(e,r.program),i&&(i=Pt.dirname(i))):r.cwd&&(i=aK(e,r.cwd)),!i||Ty(e.uri.fsPath,i))return;let n=await VE(i,async s=>!s.includes("node_modules")&&await t.exists(Pt.join(s,"package.json")));if(n){let s=qe(Pt.relative(e.uri.fsPath,n));s.length&&(r.outFiles=[...IH.outFiles,`\${workspaceFolder}/${s}/**/*.js`,`!\${workspaceFolder}/${s}/**/node_modules/**`])}}var fwe=["index.js","main.js"];async function vT(t,e,r){var a;let i={type:"pwa-node",request:"launch",name:Tu.t("Launch Program"),skipFiles:["<node_internals>/**"]};r&&r.noDebug&&(i.noDebug=!0);let n=await uK(t,"package.json"),s,o=!1;if(n&&n.name==="mern-starter")return e&&D_(Tu.t("Launch configuration for '{0}' project created.","Mern Starter")),hwe(i),i;if(n&&(s=await gwe(t,n,e),s&&e&&D_(Tu.t("Launch configuration created based on 'package.json'."))),!s){let u=Yi.window.activeTextEditor;u&&xH.includes(u.document.languageId)&&(o=u.document.languageId!=="javascript",s=t?Pt.relative(t.uri.fsPath,u.document.uri.fsPath):u.document.uri.fsPath,Pt.isAbsolute(s)||(s="${workspaceFolder}"+Pt.sep+s))}if(!s&&t){let u=t.uri.fsPath;s=await Is(fwe.map(async c=>await Di(yd.promises,Pt.join(u,c))&&"${workspaceFolder}"+Pt.sep+c))}if(s||(s="${file}"),s&&(i.program=s,t||(i.__workspaceFolder=Pt.dirname(s))),o||Yi.workspace.textDocuments.some(u=>mwe(u.languageId))){e&&D_(Tu.t("Adjust glob pattern(s) in the 'outFiles' attribute so that they cover the generated JavaScript."));let u="",c=await uK(t,"tsconfig.json");if((a=c==null?void 0:c.compilerOptions)!=null&&a.outDir&&dwe()){let l=c.compilerOptions.outDir;Pt.isAbsolute(l)||(u=l,u.indexOf("./")===0&&(u=u.substr(2)),u[u.length-1]!=="/"&&(u+="/")),i.preLaunchTask="tsc: build - tsconfig.json"}i.outFiles=["${workspaceFolder}/"+u+"**/*.js"]}return i}function dwe(){let t=Yi.workspace.getConfiguration().get("typescript.tsc.autoDetect");return t!=="off"&&t!=="watch"}function hwe(t){t.request==="launch"&&(t.runtimeExecutable="nodemon",t.program="${workspaceFolder}/index.js",t.restart=!0,t.env={BABEL_DISABLE_CACHE:"1",NODE_ENV:"development"},t.console="integratedTerminal",t.internalConsoleOptions="neverOpen")}function mwe(t){return t==="typescript"||t==="coffeescript"}async function uK(t,e){if(t)try{let r=await yd.promises.readFile(Pt.join(t.uri.fsPath,e),"utf8");return JSON.parse(r)}catch{}}async function gwe(t,e,r){let i;try{if(e.main?i=e.main:e.scripts&&typeof e.scripts.start=="string"&&(i=e.scripts.start.split(" ").pop()),i){let n;if(Pt.isAbsolute(i)?n=i:(n=t?Pt.join(t.uri.fsPath,i):void 0,i=Pt.join("${workspaceFolder}",i)),r&&n&&!await Di(yd.promises,n)&&!await Di(yd.promises,n+".js"))return}}catch{}return i}var cK=S(require("vscode"));var vd=class extends En{async resolveDebugConfigurationAsync(e,r){if(r.cwd||(r.cwd=yT(void 0,e)),r.request==="launch"&&!r.command){await vH(cK.commands,"extension.js-debug.createDebuggerTerminal",void 0,e);return}return r.remoteRoot&&!r.localRoot&&(r.localRoot="${workspaceFolder}"),kA(r)}getType(){return"node-terminal"}};var Hwe=t=>t.request==="launch",ywe=t=>t.request==="attach",ku=class extends En{constructor(r,i,n,s,o){super(r);this.nodeProvider=i;this.terminalProvider=n;this.location=s;this.fs=o}async resolveBrowserCommon(r,i){if(i.request,i.server&&"program"in i.server){let s={...i.server,type:"pwa-node",request:"launch",name:`${i.name}: Server`};i.server=await this.nodeProvider.resolveDebugConfiguration(r,s)}else i.server&&"command"in i.server&&(i.server=await this.terminalProvider.resolveDebugConfiguration(r,{...i.server,type:"node-terminal",request:"launch",name:`${i.name}: Server`}));let n=this.location==="remote"?"ui":"workspace";if(Hwe(i)&&!i.browserLaunchLocation&&(i.browserLaunchLocation=n),ywe(i)&&!i.browserAttachLocation&&(i.browserAttachLocation=n),i.request==="launch"){let s=i;this.applyDefaultRuntimeExecutable(s)}}getSuggestedWorkspaceFolders(r){return[r.rootPath,r.webRoot]}async resolveDebugConfigurationWithSubstitutedVariables(r,i){if("__pendingTargetId"in i)return i;let n=i;if(n.request==="launch"){let s=await this.ensureNoLockfile(n);if(s===void 0)return;n=s}return n}async ensureNoLockfile(r){var a;if(r.request!=="launch")return r;let i=r;if(i.userDataDir===!1||i.port&&!await c2(i.port))return r;let n=typeof i.userDataDir=="string"?i.userDataDir:(0,wd.join)(this.extensionContext.storagePath??(0,lK.tmpdir)(),(a=i.runtimeArgs)!=null&&a.includes("--headless")?".headless-profile":".profile"),s=(0,wd.join)(n,process.platform==="win32"?"lockfile":"SingletonLock");if(await Is([RR(this.fs,s),this.isVsCodeLocked((0,wd.join)(n,"code.lock"))])){let u=bd.t("Debug Anyway");if(await Yg.window.showErrorMessage(bd.t("It looks like a browser is already running from {0}. Please close it before trying to debug, otherwise VS Code may not be able to connect to it.",i.userDataDir===!0?bd.t("an old debug session"):bd.t("the configured userDataDir")),{modal:!0},u)!==u)return}return{...r,userDataDir:n}}async isVsCodeLocked(r){try{let i=Number(await this.fs.readFile(r,"utf-8"));return process.kill(i,0),!0}catch{return!1}}};ku=$([(0,ea.injectable)(),A(0,(0,ea.inject)(It)),A(1,(0,ea.inject)($u)),A(2,(0,ea.inject)(vd)),A(3,(0,ea.inject)(Ts)),A(4,(0,ea.inject)(Ie))],ku);var Ru=class extends Yo{provide(){return this.createLaunchConfigFromContext()||this.getDefaultLaunch()}getTriggerKind(){return Yg.DebugConfigurationProviderTriggerKind.Initial}createLaunchConfigFromContext(){let e=Yg.window.activeTextEditor;if(e&&e.document.languageId==="html")return{type:this.getType(),request:"launch",name:`Open ${(0,wd.basename)(e.document.uri.fsPath)}`,file:e.document.uri.fsPath}}getDefaultLaunch(){return{type:this.getType(),request:"launch",name:bd.t("Launch Chrome against localhost"),url:"http://localhost:8080",webRoot:"${workspaceFolder}"}}};Ru=$([(0,ea.injectable)()],Ru);var bT=S(Y());var _d=class extends ku{async resolveDebugConfigurationAsync(e,r){if(!r.name&&!r.type&&!r.request){let i=new ol().createLaunchConfigFromContext();if(!i)return null;r=i}return await this.resolveBrowserCommon(e,r),r.request==="attach"?{...ch,...r}:{...SH,...r}}getType(){return"pwa-chrome"}};_d=$([(0,bT.injectable)()],_d);var ol=class extends Ru{getType(){return"pwa-chrome"}};ol=$([(0,bT.injectable)()],ol);var pK=S(Se()),wT=S(Y());var Ad=class extends ku{async resolveDebugConfigurationAsync(e,r){if(!r.name&&!r.type&&!r.request){let i=new al().createLaunchConfigFromContext();if(!i)return;r=i}return await this.resolveBrowserCommon(e,r),r.useWebView&&(r.timeout=r.timeout??0),r.request==="attach"?{...DA,...r}:{...PA,...r}}getType(){return"pwa-msedge"}};Ad=$([(0,wT.injectable)()],Ad);var al=class extends Ru{getType(){return"pwa-msedge"}getDefaultLaunch(){return{...super.getDefaultLaunch(),name:pK.t("Launch Edge against localhost")}}};al=$([(0,wT.injectable)()],al);var dK=require("fs"),hK=S(Y()),mK=require("path");var Id=class extends En{async resolveDebugConfigurationAsync(e,r){if(r.debugWebWorkerHost===void 0){let i=await vwe(e,r);r={...r,debugWebWorkerHost:i.length===1&&i[0]==="web"}}return r.debugWebWorkerHost&&(r.outFiles=[]),CH(r),Promise.resolve({...xA,...r})}getType(){return"pwa-extensionHost"}};Id=$([(0,hK.injectable)()],Id);var fK="--extensionDevelopmentPath=",vwe=async(t,e)=>{var s;let r=(s=e.args)==null?void 0:s.find(o=>o.startsWith(fK));if(!r)return["workspace"];let i=is(r.slice(fK.length),"workspaceFolder",(t==null?void 0:t.uri.fsPath)??e.__workspaceFolder??""),n;try{let o=await dK.promises.readFile((0,mK.join)(i,"package.json"),"utf-8");n=JSON.parse(o).extensionKind??"workspace"}catch{return["workspace"]}return n instanceof Array?n:[n]};var L_=S(Se()),ET=S(Y()),xd=S(require("path")),Qg=S(require("vscode"));var Ed=S(Se()),vK=S(require("fs")),P_=S(require("path")),ft=S(require("vscode"));var gK=require("vscode"),_T=async t=>{try{return await gK.commands.executeCommand("npm.packageManager",t==null?void 0:t.uri)}catch{return"npm"}},HK=async(t,e)=>`${await _T(e)} run ${t}`;async function bK(t){let e=await IT(t?[t]:void 0);if(!e)return;let r=async a=>{let u=ft.workspace.getWorkspaceFolder(ft.Uri.file(a.directory));vH(ft.commands,"extension.js-debug.createDebuggerTerminal",await HK(a.name,u),u,{cwd:a.directory})};if(e.length===1)return r(e[0]);let i=e.some(a=>a.directory!==e[0].directory),n=ft.window.createQuickPick(),s,o=[];for(let a of e)a.directory!==s&&i&&(o.push({label:P_.basename(a.directory),kind:ft.QuickPickItemKind.Separator}),s=a.directory),o.push({script:a,label:a.name,description:a.command});n.items=o,n.onDidAccept(async()=>{r(n.selectedItems[0].script),n.dispose()}),n.show()}var AT=(t,e)=>t.score>e.score?t:e;async function IT(t,e=!1){let r=t??ft.workspace.workspaceFolders??[];if(!r||r.length===0){e||ft.window.showErrorMessage(Ed.t("You need to open a workspace folder to debug npm scripts."));return}let i=(await Promise.all(r.map(o=>ft.workspace.findFiles(new ft.RelativePattern(o,"**/package.json"),"**/{node_modules,.vscode-test}/**")))).flat();if(i.length===0){e||ft.window.showErrorMessage(Ed.t("No package.json files found in your workspace."));return}let n=[],s={path:i[0].fsPath,score:0};for(let{fsPath:o}of new Set(i)){s=AT(s,{path:o,score:1});let a;try{a=JSON.parse(await xy(o))}catch(u){e||yK("showWarningMessage",Ed.t("Could not read {0}: {1}",o,u.message),o),s=AT(s,{path:void 0,score:3});continue}if(s=AT(s,{path:void 0,score:2}),!!a.scripts)for(let u of Object.keys(a.scripts))n.push({directory:P_.dirname(o),name:u,command:a.scripts[u]})}if(n.length===0){s.path&&!e&&yK("showErrorMessage",Ed.t("No npm scripts found in your package.json"),s.path);return}return n.sort((o,a)=>(o.name==="start"?-1:0)+(a.name==="start"?1:0)),n}var bwe=`{
  "scripts": {
    
  }
}
`;async function yK(t,e,r){let i=Ed.t("Edit package.json");if(await ft.window[t](e,i)!==i)return;if(vK.existsSync(r)){let a=await ft.workspace.openTextDocument(r);await ft.window.showTextDocument(a);return}let n=await ft.workspace.openTextDocument(ft.Uri.file(r).with({scheme:"untitled"})),s=await ft.window.showTextDocument(n);await s.edit(a=>a.insert(new ft.Position(0,0),bwe));let o=new ft.Position(2,5);s.selection=new ft.Selection(o,o)}var Sd=class extends Yo{provide(e){return vT(e,!0)}getType(){return"pwa-node"}getTriggerKind(){return Qg.DebugConfigurationProviderTriggerKind.Initial}};Sd=$([(0,ET.injectable)()],Sd);var wwe=["cwd","program"],Cd=class extends Yo{async provide(e){let r=Wu(await Promise.all([this.getFromNpmScripts(e),this.getFromActiveFile()]));if(e)for(let i of r){let n=i;for(let s of wwe){let o=n[s];o&&xd.isAbsolute(o)&&(n[s]=xd.join("${workspaceFolder}",xd.relative(e.uri.fsPath,o)))}}return r}getType(){return"pwa-node"}getTriggerKind(){return Qg.DebugConfigurationProviderTriggerKind.Dynamic}async getFromNpmScripts(e){let r={type:yl("node-terminal"),name:L_.t("JavaScript Debug Terminal"),request:"launch",cwd:e==null?void 0:e.uri.fsPath};if(!e)return[r];let i=await IT([e],!0);if(!i)return[r];let n=await _T(e);return i.map(s=>({type:yl("node-terminal"),name:L_.t("Run Script: {0}",s.name),request:"launch",command:`${n} run ${s.name}`,cwd:s.directory})).concat(r)}getFromActiveFile(){let e=Qg.window.activeTextEditor;return!e||!xH.includes(e.document.languageId)||e.document.uri.scheme!=="file"?[]:[{type:yl("pwa-node"),name:L_.t("Run Current File"),request:"launch",program:e.document.uri.fsPath}]}};Cd=$([(0,ET.injectable)()],Cd);var wK=[_d,Ad,Id,$u,vd],_K=[ol,al,Sd,Cd];var Dd=S(Se()),Zg=S(Y()),CT=require("url"),Si=S(require("vscode"));function ST(t,e){if(t){try{if(new CT.URL(t).hostname)return t}catch{}try{let r=`http://${t}`,i=new CT.URL(r);if(!e||i.port)return r}catch{}}}var Pd=class{constructor(e,r){this.defaultBrowser=e;this.context=r}register(e){e.subscriptions.push(Si.commands.registerCommand("extension.js-debug.debugLink",r=>this.handle(r)))}async handle(e){var s;if(e=e??await this.getLinkFromTextEditor()??await this.getLinkFromQuickInput(),!e)return;let r="pwa-chrome";try{await this.defaultBrowser.lookup()===3&&(r="pwa-msedge")}catch{}let i=$t(Si.workspace,"debug.javascript.debugByLinkOptions")??{},n={...typeof i=="string"?{}:i,type:yl(r),name:e,request:"launch",url:e};Si.debug.startDebugging((s=Si.workspace.workspaceFolders)==null?void 0:s[0],n),this.persistConfig(n)}getLinkFromTextEditor(){let e=Si.window.activeTextEditor;if(e)return ST(e.document.getText(e.selection),!0)}async getLinkFromQuickInput(){let e=await Si.env.clipboard.readText(),r=await Si.window.showInputBox({value:ST(e,!1)||this.mostRecentLink,placeHolder:"https://localhost:8080",validateInput:i=>{if(i&&!ST(i,!1))return Dd.t("The URL provided is invalid")}});if(r)return this.mostRecentLink=r,r}async persistConfig(e){if(this.context.globalState.get("saveDebugLinks")===!1)return;let r=Si.workspace.getConfiguration("launch"),i=r.get("configurations")??[];if(i.some(a=>a.url===e.url))return;let n=Dd.t("Yes"),s=Dd.t("Never"),o=await Si.window.showInformationMessage(Dd.t("Would you like to save a configuration in your launch.json for easy access later?"),n,Dd.t("No"),s);o===s&&this.context.globalState.update("saveDebugLinks",!1),o===n&&await r.update("configurations",[...i,e])}};Pd=$([(0,Zg.injectable)(),A(0,(0,Zg.inject)(pf)),A(1,(0,Zg.inject)(It))],Pd);var Ld=S(Se()),$d=S(Y()),Qi=S(require("vscode"));var AK="neverRemind",Td=class{constructor(e,r,i){this.fs=e;this.context=r;this.tracker=i;this.dismissedForSession=!1;this.isPrompting=!1}register(e){e.subscriptions.push($e(Qi.commands,"extension.js-debug.getDiagnosticLogs",async()=>{let r=await this.getTargetSession();if(!r)return;let i=await Qi.window.showSaveDialog({filters:{JSON:["json"]}});i&&r.customRequest("saveDiagnosticLogs",{toFile:i.fsPath})}),$e(Qi.commands,"extension.js-debug.createDiagnostics",async()=>this.getDiagnosticInfo(await this.getTargetSession())),Qi.debug.onDidReceiveDebugSessionCustomEvent(async r=>{if(r.event==="openDiagnosticTool")return this.openDiagnosticTool(r.body.file);if(r.event!=="suggestDiagnosticTool"||this.dismissedForSession||this.context.workspaceState.get(AK)||this.isPrompting)return;this.isPrompting=!0;let i=Ld.t("Yes"),n=Ld.t("Not Now"),s=Ld.t("Never"),o=await Qi.window.showInformationMessage("It looks like you might be having trouble with breakpoints. Would you like to open our diagnostic tool?",i,n,s);switch(this.isPrompting=!1,o){case i:this.getDiagnosticInfo(await this.getTargetSession(),!0);break;case s:e.workspaceState.update(AK,!0);break;case n:this.dismissedForSession=!0;break}}))}getTargetSession(){let e=Qi.debug.activeDebugSession;if(!e||!ua(e==null?void 0:e.type))return this.pickSession();if(it.isConcreteSession(e))return e;let r=this.tracker.getChildren(e);return r.length===1?r[0]:this.pickSession()}pickSession(){return it.pickSession(this.tracker.getConcreteSessions(),Ld.t("Select the session you want to inspect:"))}async getDiagnosticInfo(e,r=!1){if(!e||!this.tracker.isRunning(e)){Qi.window.showErrorMessage(Ld.t('It looks like your debug session has already ended. Try debugging again, then run the "Debug: Diagnose Breakpoint Problems" command.'));return}let{file:i}=await e.customRequest("createDiagnostics",{fromSuggestion:r});await this.openDiagnosticTool(i)}async openDiagnosticTool(e){let r=Qi.window.createWebviewPanel("jsDebugDiagnostics","Debug Diagnostics",Qi.ViewColumn.Active,{enableScripts:!0});r.webview.html=await this.fs.readFile(e,"utf-8")}};Td=$([(0,$d.injectable)(),A(0,(0,$d.inject)(Ie)),A(1,(0,$d.inject)(It)),A(2,(0,$d.inject)(it))],Td);var kd=S(Se()),IK=S(Y()),Sn=S(require("vscode"));var ul=class{register(e){e.subscriptions.push(Sn.debug.onDidReceiveDebugSessionCustomEvent(r=>{if(r.event!=="suggestDisableSourcemap"||!ua(r.session.type))return;let i=r.body;this.unmap(r.session,i.source).catch(n=>Sn.window.showErrorMessage(n.message))}))}async unmap(e,r){($t(Sn.workspace,"debug.javascript.unmapMissingSources")||await this.prompt())&&await e.customRequest("disableSourcemap",{source:r})}async prompt(){let e=kd.t("Always"),r=kd.t("Always in this Workspace"),i=kd.t("Yes");switch(await Sn.window.showInformationMessage(kd.t("This is a missing file path referenced by a sourcemap. Would you like to debug the compiled version instead?"),e,r,kd.t("No"),i)){case e:return SA(Sn.workspace,"debug.javascript.unmapMissingSources",!0,Sn.ConfigurationTarget.Global),!0;case r:return SA(Sn.workspace,"debug.javascript.unmapMissingSources",!0,Sn.ConfigurationTarget.Workspace),!0;case i:return!0;default:return!1}}};ul=$([(0,IK.injectable)()],ul);var SK=S(Se()),T_=S(Y()),Mu=S(require("vscode"));var EK=t=>{if((t==null?void 0:t.type)!=="pwa-msedge")return!1;let e=t.configuration.__browserTargetType;return e==="iframe"||e==="page"},Awe="ms-edgedevtools.vscode-edge-devtools",Iwe="vscode-edge-devtools.attachToCurrentDebugTarget";function Ewe(t){let e=t;for(;e.parentSession;)e=e.parentSession;return e}var Rd=class{constructor(e){this.tracker=e}register(e){e.subscriptions.push($e(Mu.commands,"extension.js-debug.openEdgeDevTools",async()=>{let r=Mu.debug.activeDebugSession&&EK(Mu.debug.activeDebugSession)?Mu.debug.activeDebugSession:await it.pickSession(this.tracker.getConcreteSessions().filter(EK),SK.t("Select the page where you want to open the devtools"));if(!r)return;let i=Ewe(r);try{return await Mu.commands.executeCommand(Iwe,r.id,i.configuration)}catch(n){if(n instanceof Error&&/command .+ not found/.test(n.message))return Mu.commands.executeCommand("workbench.extensions.action.showExtensionsWithIds",[Awe]);throw n}}))}};Rd=$([(0,T_.injectable)(),A(0,(0,T_.inject)(it))],Rd);var PK=require("crypto"),$_=S(Y()),LK=require("path"),ht=S(require("vscode"));var CK=({name:t,line:e,column:r,source:i})=>`${t} (${(0,LK.basename)(String(i.path))}:${e}:${r})`,xK=({name:t,line:e,column:r,source:i})=>`${t} (${i.path}:${e}:${r})`,DK=async({line:t,column:e,source:r})=>{if(r.sourceReference!==0||!r.path)return;let i=ht.Uri.file(r.path),n=await ht.workspace.openTextDocument(i),s=await ht.window.showTextDocument(n),o=new ht.Position(t-1,e-1);s.revealRange(new ht.Range(o,o)),s.selection=new ht.Selection(o,o)},xT=class{constructor(e,r){this.caller=e;this.target=r;this.treeItem=new ht.TreeItem(`${CK(e)} \u2192 ${CK(r)}`,ht.TreeItemCollapsibleState.None),this.treeItem.tooltip=`Breaks at ${xK(r)} containing ${xK(e)} will be skipped`,this.id=this.treeItem.id=(0,PK.createHash)("sha1").update(JSON.stringify([e,r])).digest("base64")}toDap(){return{caller:this.caller,target:this.target}}},Md=class{constructor(e){this.sessionTracker=e;this._onDidChangeTreeData=new ht.EventEmitter;this.allCallers=new Map;this.lastHadCallers=!1;this.onDidChangeTreeData=this._onDidChangeTreeData.event}register(e){e.subscriptions.push(ht.window.createTreeView("jsExcludedCallers",{treeDataProvider:this}),$e(ht.commands,"extension.js-debug.callers.add",async(r,i)=>{var a;let n=await((a=this.sessionTracker.getById(i.sessionId))==null?void 0:a.customRequest("stackTrace",{threadId:0,startFrame:0,levels:1}));if(!(n!=null&&n.stackFrames.length))return;let s=n.stackFrames[0],o=new xT({name:i.frameName,column:i.frameLocation.range.startColumn,line:i.frameLocation.range.startLineNumber,source:i.frameLocation.source},{name:s.name,column:s.column,line:s.line,source:s.source});this.allCallers.set(o.id,o),this.triggerUpdate()}),$e(ht.commands,"extension.js-debug.callers.goToCaller",r=>DK(r.caller)),$e(ht.commands,"extension.js-debug.callers.gotToTarget",r=>DK(r.target)),$e(ht.commands,"extension.js-debug.callers.remove",async r=>{this.allCallers.delete(r.id),this.triggerUpdate()}),$e(ht.commands,"extension.js-debug.callers.removeAll",async()=>{this.allCallers.clear(),this.triggerUpdate()}),this.sessionTracker.onSessionAdded(r=>{this.allCallers.size>0&&this.sendCallersToSession(r)}))}getTreeItem(e){return e.treeItem}getChildren(e){return e?[]:[...this.allCallers.values()]}sendCallersToSession(e){e.customRequest("setExcludedCallers",{callers:[...this.allCallers.values()].map(r=>r.toDap())})}triggerUpdate(){this._onDidChangeTreeData.fire(void 0);for(let r of this.sessionTracker.getConcreteSessions())this.sendCallersToSession(r);let e=this.allCallers.size>0;e!==this.lastHadCallers&&(ah(ht.commands,"jsDebugHasExcludedCallers",e),this.lastHadCallers=e)}};Md=$([(0,$_.injectable)(),A(0,(0,$_.inject)(it))],Md);var DT=S(Se()),eH=S(Y());var TK="linkBpWarnIgnored",Cwe="https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_can-i-debug-if-im-using-symlinks",Od=class{constructor(e,r){this.vscode=e;this.context=r;this.didWarn=this.context.workspaceState.get(TK,!1)}async warn(){if(this.didWarn)return;this.didWarn=!0;let e=DT.t("Read More"),r=DT.t("Ignore"),i=await this.vscode.window.showWarningMessage("It looks like you have symlinked files. You might need to update your configuration to make this work as expected.",r,e);i===r?this.context.workspaceState.update(TK,!0):i===e&&this.vscode.env.openExternal(this.vscode.Uri.parse(Cwe))}};Od=$([(0,eH.injectable)(),A(0,(0,eH.inject)(an)),A(1,(0,eH.inject)(It))],Od);var tH=S(Se()),k_=S(Y()),kK=require("path"),ta=S(require("vscode"));var $K="omitLongPredictions",Nd=class{constructor(e){this.context=e}register(e){e.subscriptions.push(ta.debug.onDidReceiveDebugSessionCustomEvent(r=>{r.event==="longPrediction"&&this.promptLongBreakpoint(r.session.workspaceFolder)}))}async promptLongBreakpoint(e){if(this.context.workspaceState.get($K))return;let r=tH.t("It's taking a while to configure your breakpoints. You can speed this up by updating the 'outFiles' in your launch.json."),i=tH.t("Open launch.json"),n=tH.t("Don't show again"),s=await ta.window.showWarningMessage(r,n,i);if(s===n){this.context.workspaceState.update($K,!0);return}if(s!==i)return;if(e||(e=await ta.window.showWorkspaceFolderPick()),!e){await ta.window.showWarningMessage(tH.t("No workspace folder open."));return}let o=await ta.workspace.openTextDocument((0,kK.join)(e.uri.fsPath,".vscode","launch.json"));await ta.window.showTextDocument(o)}};Nd=$([(0,k_.injectable)(),A(0,(0,k_.inject)(It))],Nd);var R_=S(Y()),Bd=require("vscode");var Fd=class{constructor(e){this.leaseTracker=e;this.cachedResolutions=new Array(16).fill("");this.cachedResolutionIndex=0}register(e){typeof Bd.workspace.registerPortAttributesProvider=="function"&&e.subscriptions.push(Bd.workspace.registerPortAttributesProvider({portRange:[53e3,54e3]},this))}async providePortAttributes(e,r){if(r&&this.cachedResolutions.includes(`${e}:${r}`))return{port:e,autoForwardAction:Bd.PortAutoForwardAction.Ignore};if(await this.leaseTracker.isRegistered(e)){if(r){let i=this.cachedResolutionIndex++%this.cachedResolutions.length;this.cachedResolutions[i]=`${e}:${r}`}return{port:e,autoForwardAction:Bd.PortAutoForwardAction.Ignore}}}};Fd=$([(0,R_.injectable)(),A(0,(0,R_.inject)(gt))],Fd);var M_=S(Y()),MK=S(require("querystring")),cl=S(require("vscode"));var Ud=class{constructor(e){this.tracker=e;this.canPrettyPrintKey=new md("jsDebugCanPrettyPrint")}register(e){e.subscriptions.push($e(cl.commands,"extension.js-debug.prettyPrint",()=>this.prettifyActive()),cl.window.onDidChangeActiveTextEditor(r=>this.updateEditorState(r)),this.tracker.onSessionAdded(()=>this.updateEditorState(cl.window.activeTextEditor)),this.tracker.onSessionEnded(()=>this.updateEditorState(cl.window.activeTextEditor)))}async prettifyActive(){let e=cl.window.activeTextEditor;if(!e||!this.canPrettyPrint(e))return;let{sessionId:r,source:i}=xwe(e.document.uri),n=r&&this.tracker.getById(r);if(n)RK(n,i,e.selection.start);else for(let s of this.tracker.getConcreteSessions())RK(s,i,e.selection.start)}canPrettyPrint(e){return this.tracker.isDebugging&&e.document.languageId==="javascript"&&!e.document.fileName.endsWith("-pretty.js")}updateEditorState(e){var r;if(!this.tracker.isDebugging){this.canPrettyPrintKey.value=void 0;return}e&&this.canPrettyPrint(e)&&e.document.uri.toString()!==((r=this.canPrettyPrintKey.value)==null?void 0:r[0])&&(this.canPrettyPrintKey.value=[e.document.uri.toString()])}};Ud=$([(0,M_.injectable)(),A(0,(0,M_.inject)(it))],Ud);var RK=(t,e,r)=>t.customRequest("prettyPrintSource",{source:e,line:r.line,column:r.character}),xwe=t=>{let e=MK.parse(t.query),r=e.session,i={path:t.fsPath,sourceReference:Number(e.ref)||0};return{sessionId:r,source:i}};var rH=S(Se()),iH=S(Y()),NK=S(require("path")),es=S(require("vscode"));var OK="breakpointTerminationWarnedSlow",jd=class{constructor(e,r){this.fs=e;this.context=r;this.sortOrder=2;this.id="breakpoint";this.label=rH.t("Pick Breakpoint");this.description=rH.t("Run until a specific breakpoint is hit")}async onPick(e,r){if(r)return new O_(r);let i=es.window.createQuickPick();i.canSelectMany=!0,i.matchOnDescription=!0,i.busy=!0;let n=await new Promise(s=>{i.onDidAccept(()=>s(i.selectedItems)),i.onDidHide(()=>s(void 0)),i.onDidChangeActive(async o=>{if(!o.length)return;let a=o[0].location,u=await es.workspace.openTextDocument(a.uri);es.window.showTextDocument(u,{selection:a.range,preview:!0,preserveFocus:!0})}),i.show(),(async()=>{let o=es.debug.breakpoints.filter(c=>c.enabled&&c instanceof es.SourceBreakpoint),a=await Promise.all(o.map(c=>e.getDebugProtocolBreakpoint(c))),u=await this.getCandidates(a,o);i.items=u,i.selectedItems=u,i.busy=!1})()});if(i.dispose(),!!n)return await this.warnSlowCode(),new O_(n.map(s=>Number(s.id)))}async warnSlowCode(){this.context.workspaceState.get(OK)||(es.window.showWarningMessage(rH.t('Profiling with breakpoints enabled can change the performance of your code. It can be useful to validate your findings with the "duration" or "manual" termination conditions.'),rH.t("Got it!")),await this.context.workspaceState.update(OK,!0))}async getCandidates(e,r){if(e.length!==r.length)throw new Error("Mismatched breakpoint array lengths");let i=uo(s=>this.getFileLines(s));return(await Promise.all(r.map(async(s,o)=>{var f;let a=e[o];if(!a||!a.id)return;let u=s.location,c=es.workspace.getWorkspaceFolder(u.uri),l=c?NK.relative(c.uri.fsPath,u.uri.fsPath):u.uri.fsPath,p=await i(u.uri.fsPath);return{id:a.id,label:`${l}:${u.range.start.line}:${u.range.start.character}`,location:u,description:(f=p==null?void 0:p[u.range.start.line])==null?void 0:f.trim()}}))).filter(kt)}async getFileLines(e){try{return(await this.fs.readFile(e,"utf-8")).split(`
`)}catch{return}}};jd=$([(0,iH.injectable)(),A(0,(0,iH.inject)(Ie)),A(1,(0,iH.inject)(It))],jd);var O_=class{constructor(e){this.breakpointIds=e}get customData(){return{stopAtBreakpoint:this.breakpointIds.slice()}}dispose(){}};var ll=S(Se()),FK=S(Y()),BK=S(require("vscode"));var N_=S(Se()),no=S(require("vscode"));var nH=class{constructor(e,r,i){this.session=e;this.impl=r;this.termination=i;this.statusChangeEmitter=new X;this.stopEmitter=new X;this._innerStatus=[];this.disposables=new Le;this.state=0;this.onStatusChange=this.statusChangeEmitter.event;this.onStop=this.stopEmitter.event;var n;this.disposables.push(no.debug.onDidReceiveDebugSessionCustomEvent(s=>{s.session===e&&s.event==="profilerStateUpdate"&&this.onStateUpdate(s.body)}),no.debug.onDidTerminateDebugSession(s=>{s===e&&this.stopEmitter.fire(void 0)})),i&&(this.disposables.push(i),(n=i.attachTo)==null||n.call(i,this))}get status(){return this._innerStatus.filter(e=>!!e).join(", ")||void 0}async start(){try{await no.window.withProgress({location:no.ProgressLocation.Window,title:N_.t("Starting profile...")},()=>{var e;return this.session.customRequest("startProfile",{type:this.impl.type,...(e=this.termination)==null?void 0:e.customData})})}catch(e){no.window.showErrorMessage(e.message),this.stopEmitter.fire(void 0)}}dispose(){this.state=2,this.disposables.dispose()}setFile(e){this.file=e}async stop(){this.state===0&&(this.setStatus(-1,N_.t("Saving")),this.state=1,await no.window.withProgress({location:no.ProgressLocation.Window,title:N_.t("Stopping profile...")},()=>this.session.customRequest("stopProfile",{})))}onStateUpdate(e){if(e.running){this.setStatus(0,e.label);return}this.state=2,this.stopEmitter.fire(this.file),this.dispose()}setStatus(e,r){this.state===0&&(e===-1?this._innerStatus=[r]:this._innerStatus[e]=r,this.statusChangeEmitter.fire(this.status))}};var qd=class{constructor(){this.sortOrder=1;this.id="duration";this.label=ll.t("Duration");this.description=ll.t("Run for a specific amount of time")}async onPick(e,r){if(r)return new F_(r*1e3);let i=BK.window.createInputBox();i.title=ll.t("Duration of Profile"),i.placeholder=ll.t('Profile duration in seconds, e.g "5"'),this.lastDuration&&(i.value=String(this.lastDuration)),i.onDidChangeValue(s=>{/^[0-9]+$/.test(s)?Number(s)<1?i.validationMessage=ll.t("Please enter a number greater than 1"):i.validationMessage=void 0:i.validationMessage=ll.t("Please enter a number")});let n=await new Promise(s=>{i.onDidAccept(()=>{if(i.validationMessage)return s(void 0);this.lastDuration=Number(i.value),s(new F_(this.lastDuration*1e3))}),i.onDidHide(()=>s(void 0)),i.show()});return i.dispose(),n}};qd=$([(0,FK.injectable)()],qd);var F_=class{constructor(e){this.duration=e;this.disposable=new Le}attachTo(e){let r=Date.now()+this.duration,i=()=>e.setStatus(1,`${Math.round((r-Date.now())/1e3)}s`),n=setTimeout(()=>e.stop(),this.duration),s=setInterval(i,1e3);i(),this.disposable.callback(()=>{clearTimeout(n),clearInterval(s)})}dispose(){this.disposable.dispose()}};var PT=S(Se()),UK=S(Y());var Wd=class{constructor(){this.sortOrder=0;this.id="manual";this.label=PT.t("Manual");this.description=PT.t("Run until manually stopped")}async onPick(){return new sH}};Wd=$([(0,UK.injectable)()],Wd);var sH=class{dispose(){}};var Vd=Symbol("ITerminationConditionFactory");var so=S(Se()),Nu=S(Y()),jK=require("os"),B_=require("path"),Hr=S(require("vscode"));var Dwe=t=>"__pendingTargetId"in t.configuration,Ou=class{constructor(e,r,i,n){this.tracker=e;this.fs=r;this.sessionStates=i;this.terminationConditions=n;this.activeSessions=new Map;this.disposables=new Le;this.disposables.push(Hr.debug.onDidReceiveDebugSessionCustomEvent(s=>{if(s.event!=="profileStarted")return;let o=s.body,a=this.activeSessions.get(s.session.id);a||(a=new nH(s.session,wi.ctors.find(u=>u.type===o.type)||wi.ctors[0],new sH),this.registerSession(a)),a.setFile(o.file)}))}async start(e){let r,i=[...this.tracker.getConcreteSessions()].filter(Dwe);if(e.sessionId?r=i.find(c=>c.id===e.sessionId):r=await this.pickSession(i),!r)return;let n=r,s=this.activeSessions.get(n.id);if(s&&!await this.alreadyRunningSession(s))return;let o=await this.pickType(n,e.type);if(!o)return;let a;if(!o.instant&&(a=await this.pickTermination(n,e.termination),!a))return;let u=new nH(n,o,a);u&&(this.registerSession(u,e.onCompleteCommand),await u.start(),o.instant&&await u.stop())}async stop(e){let r;if(e)r=this.activeSessions.get(e);else{let i=await this.pickSession([...this.activeSessions.values()].map(n=>n.session));r=i&&this.activeSessions.get(i.id)}r&&(this.sessionStates.remove(r.session.id),await r.stop())}dispose(){for(let e of this.activeSessions.values())e.dispose();this.activeSessions.clear(),this.disposables.dispose()}registerSession(e,r){this.activeSessions.set(e.session.id,e),this.sessionStates.add(e.session.id,so.t("Profiling")),e.onStatusChange(()=>this.updateStatusBar()),e.onStop(i=>{i&&this.openProfileFile(e,r,e.session,i),this.activeSessions.delete(e.session.id),e.dispose(),this.updateStatusBar()}),this.updateStatusBar()}async openProfileFile(e,r,i,n){var u,c;if(r)return Promise.all([Hr.commands.executeCommand(r,{contents:await this.fs.readFile(n,"utf-8"),basename:(0,B_.basename)(n)+e.impl.extension}),this.fs.unlink(n)]);let s=((u=i.workspaceFolder)==null?void 0:u.uri.fsPath)??((c=Hr.workspace.workspaceFolders)==null?void 0:c[0].uri.fsPath)??(0,jK.homedir)(),o=Mb()+e.impl.extension,a=Hr.Uri.file((0,B_.join)(s,o));await MR(this.fs,n,a.fsPath),await Hr.commands.executeCommand(e.impl.editable?"vscode.open":"revealInExplorer",a)}updateStatusBar(){var e;if(this.activeSessions.size===0){(e=this.statusBarItem)==null||e.hide(),ah(Hr.commands,"jsDebugIsProfiling",!1);return}if(this.statusBarItem||(this.statusBarItem=Hr.window.createStatusBarItem(Hr.StatusBarAlignment.Right,500),this.statusBarItem.command="extension.js-debug.stopProfile"),ah(Hr.commands,"jsDebugIsProfiling",!0),this.activeSessions.size===1){let r=this.activeSessions.values().next().value;this.statusBarItem.text=r.status?so.t("{0} Click to Stop Profiling ({1})","$(loading~spin)",r.status):so.t("{0} Click to Stop Profiling","$(loading~spin)")}else this.statusBarItem.text=so.t("{0} Click to Stop Profiling ({1} sessions)","$(loading~spin)",this.activeSessions.size);this.statusBarItem.show()}async alreadyRunningSession(e){let r=so.t("Yes"),i=so.t("No");return await Hr.window.showErrorMessage(so.t("A profiling session is already running, would you like to stop it and start a new session?"),r,i)!==r?!1:(await this.stop(e.session.id),!0)}async pickSession(e){if(e.length===0)return;if(e.length===1)return e[0];let r=await Hr.window.showQuickPick(e.map(i=>({label:i.name,id:i.id})));return r&&e.find(i=>i.id===r.id)}async pickType(e,r){let i=e.configuration;if(r)return wi.ctors.find(s=>s.type===r&&s.canApplyTo(i));let n=await this.pickWithLastDefault(so.t("Type of profile:"),wi.ctors.filter(s=>s.canApplyTo(i)),this.lastChosenType);return n&&(this.lastChosenType=n.label),n}async pickTermination(e,r){var n;if(r){let s=typeof r=="string"?{type:r}:r;return(n=this.terminationConditions.find(o=>o.id===s.type))==null?void 0:n.onPick(e,...s.args??[])}let i=await this.pickWithLastDefault(so.t("How long to run the profile:"),this.terminationConditions,this.lastChosenTermination);return i&&(this.lastChosenTermination=i.label),i==null?void 0:i.onPick(e)}async pickWithLastDefault(e,r,i){if(r.length<=1)return r[0];let n=Hr.window.createQuickPick();n.title=e,n.items=r.slice().sort((o,a)=>o.label===i||a.label===i?o.label===i?-1:1:(o.sortOrder??0)-(a.sortOrder??0)).map(o=>({label:o.label,description:o.description,alwaysShow:!0}));let s=await new Promise(o=>{n.onDidAccept(()=>{var a;return o((a=n.selectedItems[0])==null?void 0:a.label)}),n.onDidHide(()=>o(void 0)),n.show()});if(n.dispose(),!!s)return r.find(o=>o.label===s)}};Ou=$([(0,Nu.injectable)(),A(0,(0,Nu.inject)(it)),A(1,(0,Nu.inject)(Ie)),A(2,(0,Nu.inject)(cp)),A(3,(0,Nu.multiInject)(Vd))],Ou);var qK=S(Y()),WK=require("vscode");var Gd=class{constructor(){this.read=Fe(()=>$t(WK.workspace,"debug.javascript.resourceRequestOptions"))}provideOptions(e){$3(e,this.read()||{})}};Gd=$([(0,qK.injectable)()],Gd);var VK=S(Y()),LT=require("vscode");var Kd=class{register(e){e.subscriptions.push($e(LT.commands,"extension.node-debug.startWithStopOnEntry",()=>LT.commands.executeCommand("workbench.action.debug.start",{config:{stopOnEntry:!0}})))}};Kd=$([(0,VK.injectable)()],Kd);var VT=S(Se()),aA=S(Y()),rz=S(tz()),iz=require("url"),vr=S(require("vscode"));var Uu=class{constructor(e){this.defaultBrowser=e;this.enabledTerminals=new WeakSet;this.disposable=new Le;this.notifiedCantOpenOnWeb=!1;this.baseConfiguration=this.readConfig();this.disposable.push(vr.workspace.onDidChangeConfiguration(r=>{r.affectsConfiguration("debug.javascript.debugByLinkOptions")&&(this.baseConfiguration=this.readConfig())}))}enableHandlingInTerminal(e){this.enabledTerminals.add(e)}dispose(){this.disposable.dispose()}provideTerminalLinks(e){var n;switch(this.baseConfiguration.enabled){case"off":return[];case"always":break;case"on":default:if(!this.enabledTerminals.has(e.terminal))return[]}let r=[],i=Fe(()=>{var s;if("cwd"in e.terminal.creationOptions&&e.terminal.creationOptions.cwd){let o=vr.workspace.getWorkspaceFolder(typeof e.terminal.creationOptions.cwd=="string"?vr.Uri.file(e.terminal.creationOptions.cwd):e.terminal.creationOptions.cwd);if(o)return o}return(s=vr.workspace.workspaceFolders)==null?void 0:s[0]});for(let s of(0,rz.find)(e.line,"url")){let o=-1;for(;(o=e.line.indexOf(s.value,o+1))!==-1;){let a;try{a=new iz.URL(s.href)}catch{continue}a.protocol==="http:"&&!s.value.startsWith("http:")&&!pv(a.hostname)&&(a.protocol="https:"),!(a.protocol!=="http:"&&a.protocol!=="https:")&&r.push({startIndex:o,length:s.value.length,tooltip:VT.t("Debug URL"),target:a,workspaceFolder:(n=i())==null?void 0:n.index})}}return r}async handleTerminalLink(e){await this.handleTerminalLinkInner(e)||vr.env.openExternal(vr.Uri.parse(e.target.toString()))}async handleTerminalLinkInner(e){var s;if(!e.target)return!1;let r=e.target;if(vr.env.uiKind===vr.UIKind.Web)return this.notifiedCantOpenOnWeb||(vr.window.showInformationMessage(VT.t("We can't launch a browser in debug mode from here. If you want to debug this webpage, open this workspace from VS Code on your desktop.")),this.notifiedCantOpenOnWeb=!0),!1;GO(r.hostname)&&(r.hostname="localhost");let i="pwa-chrome";try{await this.defaultBrowser.lookup()===3&&(i="pwa-msedge")}catch{}let n=e.workspaceFolder!==void 0?(s=vr.workspace.workspaceFolders)==null?void 0:s[e.workspaceFolder]:void 0;return vr.debug.startDebugging(n,{...this.baseConfiguration,type:i,name:r.toString(),request:"launch",url:r.toString()}),!0}readConfig(){let e=$t(vr.workspace,"debug.javascript.debugByLinkOptions");return typeof e=="boolean"&&(e=e?"on":"off"),typeof e=="string"?{enabled:e}:{enabled:"on",...e}}};Uu=$([(0,aA.injectable)(),A(0,(0,aA.inject)(pf))],Uu);var nz=t=>{t.bind(an).toConstantValue(require("vscode")),wK.forEach(e=>{t.bind(e).toSelf().inSingletonScope(),t.bind(I_).to(e)}),_K.forEach(e=>t.bind(E_).to(e).inSingletonScope()),t.bind(Hi).to(Nd).inSingletonScope(),t.bind(Hi).to(Pd).inSingletonScope(),t.bind(Hi).to(hd).inSingletonScope(),t.bind(Hi).to(ul).inSingletonScope(),t.bind(Hi).to(Td).inSingletonScope(),t.bind(Hi).to(Kd).inSingletonScope(),t.bind(Hi).to(Fd).inSingletonScope(),t.bind(Hi).to(Rd).inSingletonScope(),t.bind(Hi).to(Md).inSingletonScope(),t.bind(Hi).to(Ud).inSingletonScope(),t.bind(Hi).to(gd).inSingletonScope(),t.bind(Lg).to(Od).inSingletonScope(),t.bind(it).toSelf().inSingletonScope().onActivation(xt),t.bind(Ou).toSelf().inSingletonScope().onActivation(xt),t.bind(Uu).toSelf().inSingletonScope(),t.bind(ul).toSelf().inSingletonScope(),t.bind(Vd).to(qd).inSingletonScope(),t.bind(Vd).to(Wd).inSingletonScope(),t.bind(Vd).to(jd).inSingletonScope()},sz=t=>{t.bind(Ar).to(Xo).onActivation(xt),t.bind(sf).to(Gd).inSingletonScope(),t.bind(Ap).to(dd).inSingletonScope()};var az=(t,e,r,i)=>{let n=new lA.Container;return n.parent=t,n.bind(Ke).toConstantValue(e.launchConfig),n.bind(ap).toConstantValue(n),n.bind(rn).toConstantValue(r),n.bind(Mt).toConstantValue(i),n.bind(Ka).toConstantValue(e),n.bind(h9).toConstantValue(e.targetOrigin()),n.bind(Zu).to(Pc).inSingletonScope(),n.bind(Ov).to(gp).inSingletonScope(),n.bind($a).toSelf().inSingletonScope(),e.sourcePathResolver&&n.bind(ut).toConstantValue(e.sourcePathResolver),n.bind(Ic).toSelf(),n.bind(Lb).toDynamicValue(s=>s.container.get(Ic).create()).inSingletonScope(),e.parent()&&(n.bind(ac).to(oc).inSingletonScope(),n.bind(Ds).to(sp).inSingletonScope()),n.bind(jt).to(process.env.DA_TEST_DISABLE_TELEMETRY?Zc:yi).inSingletonScope().onActivation(xt),n.bind(pn).toSelf().inSingletonScope(),n.bind(fr).toSelf().inSingletonScope(),n.bind(za).toSelf().inSingletonScope(),n.bind(xa).to(qs).inSingletonScope(),n.bind(Wa).toSelf().inSingletonScope(),n.bind(qp).to(jp).inSingletonScope(),n.bind(sb).to($p).inSingletonScope(),n.bind(un).to(dp).inSingletonScope(),n.bind(Eb).to(Up).inSingletonScope(),n.bind(Ga).to(Bp).inSingletonScope(),n.bind(gr).toSelf(),n.bind(Ui).toSelf(),n.bind(ji).toSelf(),n.bind(Rb).to(wi).inSingletonScope(),n.bind(Ob).to(Vp).inSingletonScope(),n.bind(nb).to(Lp).inSingletonScope().onActivation(xt),n},uz=t=>{let e=new lA.Container;e.parent=t,e.bind(ap).toConstantValue(e),e.bind(fe).to(Hn).inSingletonScope().onActivation(xt),e.bind(Ya).toSelf().inSingletonScope(),e.bind(Zu).to(Pc).inSingletonScope(),e.bind(jt).to(process.env.DA_TEST_DISABLE_TELEMETRY?Zc:yi).inSingletonScope().onActivation(xt),e.bind(_s).to(_s).inSingletonScope(),e.bind(fo).to(fo).inSingletonScope(),e.bind(af).to(of).inSingletonScope(),e.bind(vv).toDynamicValue(i=>Hu.createOrFallback(i.container.get(fe))).inSingletonScope(),e.bind(rp).to(Df).inSingletonScope(),e.bind(In).to(Uf),e.bind(Ys).toSelf().inSingletonScope().onActivation(xt),e.bind(ro).toSelf(),e.bind(Ar).to(Qn).onActivation(xt),e.bind(Ar).to(qf).onActivation(xt),e.bind(Ar).to(Wf).onActivation(xt),e.bind(Ar).to(Jf).onActivation(xt),e.bind(qg).to(ed),e.bind(qg).to(td),e.bind(zc).to(Bf).inSingletonScope(),sz(e),e.bind(Ar).to(zf).onActivation(xt),e.bind(Gc).toSelf().inSingletonScope().onActivation(xt),e.bind(Ar).toService(Gc),e.bind(Ar).to(Lf).inSingletonScope().onActivation(xt),e.bind(Ar).to($f).inSingletonScope().onActivation(xt),e.bind(Ar).to(Tf).inSingletonScope().onActivation(xt),e.bind(Ar).to(kf).inSingletonScope().onActivation(xt),e.bind(Ar).to(_n).onActivation(xt),e.bind(Ar).toDynamicValue(()=>t.get(Zs).createLauncher(e.get(fe))).inSingletonScope();let r=i=>n=>new i(n.container.get(tS),n.container.get(Ie),n.container.get(Yh));return e.bind(lc).toDynamicValue(r(cA.ChromeBrowserFinder)).inSingletonScope().whenTargetTagged("browser","chrome"),e.bind(lc).toDynamicValue(r(cA.EdgeBrowserFinder)).inSingletonScope().whenTargetTagged("browser","edge"),e},cz=t=>{let e=new lA.Container;return e.bind(ap).toConstantValue(e),e.bind(Zs).toSelf().inSingletonScope(),e.bind(Yn).toSelf().inSingletonScope(),e.bind(Ap).to(rd).inSingletonScope(),e.bind(cp).toConstantValue(new Ws),e.bind(pf).to(lf).inSingletonScope(),e.bind(Ls).toConstantValue(t.storagePath),e.bind(up).toConstantValue(t.isVsCode),e.bind(Qw).to(Qf),e.bind(gt).to(Pp).inSingletonScope(),e.bind(tS).toConstantValue(process.env),e.bind(Yh).toConstantValue(oz.default),e.bind(Ie).toConstantValue(uA.promises),e.bind(Br).toConstantValue(new xi(uA.promises)),e.bind(Ts).toConstantValue(t.isRemote?"remote":"local"),t.context&&e.bind(It).toConstantValue(t.context),nz(e),e},lz=(t,e,r)=>{t.bind(Ym).toConstantValue(Uq(e)),t.bind(Ke).toService(Ym),t.bind(ni).to(Of).inSingletonScope(),t.bind(Bl).toConstantValue(r),t.bind(ut).toDynamicValue(i=>i.container.get(ni).create(e,i.container.get(fe))).inSingletonScope(),t.bind(Br).toConstantValue(Cy.create(e.__remoteFilePrefix,uA.promises,r)),t.bind(vo).to(Sa).inSingletonScope().onActivation(xt),t.bind(La).to(fp).inSingletonScope(),t.bind(St).toSelf().inSingletonScope().onActivation(xt),t.bind(sc).toSelf().inSingletonScope(),t.bind(ac).to(oc).inSingletonScope(),t.bind(Ds).to(np).inSingletonScope()};var Hz=S(Se()),ai=S(require("vscode"));var na=S(Y()),KT=S(require("path")),eh=S(require("vscode"));var GT=":::",pA=class{constructor(e){this.processEnv=e}get nodeOptions(){return this.processEnv.NODE_OPTIONS}set nodeOptions(e){e===void 0?delete this.processEnv.NODE_OPTIONS:this.processEnv.NODE_OPTIONS=e}get inspectorOptions(){let e=this.processEnv.VSCODE_INSPECTOR_OPTIONS;if(!e)return;let r=e.split(GT).find(i=>!!i);if(r)try{return JSON.parse(r)}catch{return}}set inspectorOptions(e){e===void 0?delete this.processEnv.VSCODE_INSPECTOR_OPTIONS:this.processEnv.VSCODE_INSPECTOR_OPTIONS=JSON.stringify(e)}unsetForTree(){delete this.processEnv.VSCODE_INSPECTOR_OPTIONS}updateInspectorOption(e,r){let i=this.inspectorOptions;i&&(this.inspectorOptions={...i,[e]:r})}};var hl=class extends Ai{constructor(r,i,n,s,o,a){super(r,i,a,o);this.extensionContext=n;this.fs=s;this.telemetryItems=new Map}get deferredSocketName(){var n;let r=this.extensionContext.environmentVariableCollection.get("VSCODE_INSPECTOR_OPTIONS");return r?(n=new pA({VSCODE_INSPECTOR_OPTIONS:r.value}).inspectorOptions)==null?void 0:n.inspectorIpc:void 0}getProcessTelemetry(r){return Promise.resolve(r instanceof jf?this.telemetryItems.get(r.processId()):void 0)}resolveParams(r){if(r.type==="node-terminal"&&r.request==="launch")return r}async launchProgram(r){await this.applyInspectorOptions(this.extensionContext.environmentVariableCollection,r),this.program=new zo,this.program.stopped.then(i=>this.onProgramTerminated(i))}async refreshVariables(){this.run&&await this.applyInspectorOptions(this.extensionContext.environmentVariableCollection,this.run)}async applyInspectorOptions(r,i){let n;try{n=await this.resolveNodePath(i.params)}catch(u){if(u instanceof ne&&u.cause.id===9229)n=new si("node",void 0);else throw u}let s=$t(eh.workspace,"debug.javascript.autoAttachFilter"),a=(await this.resolveEnvironment(i,n,{deferredMode:!0,inspectorIpc:this.deferredSocketName??i.serverAddress+".deferred",autoAttachMode:s,aaPatterns:s==="smart"?this.readSmartPatterns():void 0})).defined();r.persistent=!0,r.prepend("NODE_OPTIONS",a.NODE_OPTIONS+" "),r.append("VSCODE_INSPECTOR_OPTIONS",GT+a.VSCODE_INSPECTOR_OPTIONS)}readSmartPatterns(){var n,s;let r=$t(eh.workspace,"debug.javascript.autoAttachSmartPattern"),i=((n=eh.workspace.workspaceFolders)==null?void 0:n.length)===1?eh.workspace.workspaceFolders[0].uri.fsPath:`{${(s=eh.workspace.workspaceFolders)==null?void 0:s.map(o=>o.uri.fsPath).join(",")}}`;return r==null?void 0:r.map(o=>o.replace("${workspaceFolder}",i)).map(qe)}async getBootloaderFile(r,i){var a;let n=this.extensionContext.storagePath||this.extensionContext.globalStoragePath;if(n.includes(" ")&&i.isPreciselyKnown&&!i.has(0))throw new hH(`The \`node\` version on your PATH is too old (${(a=i.version)==null?void 0:a.major}), so we cannot enable auto-attach in your environment`,"https://github.com/microsoft/vscode-js-debug/issues/708");let s=KT.join(n,"bootloader.js");try{await this.fs.mkdir(n)}catch{}await Promise.all([XI(this.fs,Bw,s),XI(this.fs,y9,KT.join(n,"watchdog.js"))]);let o=qe(s);return{interpolatedPath:o.includes(" ")?`"${o}"`:o,dispose:()=>{}}}async spawnForChild(r){if(!this.run)return;let i=Number(r.pid??"0");this.telemetryItems.set(i,r.telemetry);let n=await Ii.attach({...r,ipcAddress:this.run.serverAddress});n.onEnd(()=>{this.telemetryItems.delete(i),n.dispose()})}static clearVariables(r){r.environmentVariableCollection.clear()}};hl=$([(0,na.injectable)(),A(0,(0,na.inject)(In)),A(1,(0,na.inject)(fe)),A(2,(0,na.inject)(It)),A(3,(0,na.inject)(Ie)),A(4,(0,na.inject)(ni)),A(5,(0,na.inject)(gt))],hl);var hH=class extends Error{constructor(r,i){super(r);this.helpLink=i}};var dz=S(Se()),hz=require("os"),Tt=S(require("vscode"));var pz=()=>{let t,e=Je(),r=(i,n)=>n==="connect"?s=>{e.resolve(s),t=s}:n==="disconnect"?()=>{e=Je(),t=void 0}:async(...s)=>(t||await e.promise)[n](...s);return new Proxy({},{get:r})};var XT=(t,e,r={},i=()=>!0)=>{let n=new yi,s={...$t(Tt.workspace,"debug.javascript.terminalOptions"),internalConsoleOptions:"neverOpen"},o=pz();n.attachDap(o);let a=new Set,u=async c=>{var m;let l=await e.getProcessTelemetry(c),p=l&&Tt.Uri.file(l.cwd),f=p&&Tt.workspace.getWorkspaceFolder(p);return f?f.uri:r.__workspaceFolder?Tt.Uri.file(r.__workspaceFolder):((m=Tt.workspace.workspaceFolders)==null?void 0:m[0].uri)??p};return e.onTargetListChanged(async()=>{let c=await Tt.workspace.requestWorkspaceTrust(),l=new Set;for(let p of e.targetList()){if(l.add(p),a.has(p)){a.delete(p);continue}let f=t.addDelegate(p,o,p.parent());if(!i(p)){p.detach();return}if(p.targetInfo.openerId&&!p.parent()){p.detach();return}if(!c){p.detach();return}if(!p.parent()){let m=await u(p);Tt.debug.startDebugging(m&&Tt.workspace.getWorkspaceFolder(m),{...s,type:"node-terminal",name:"Node.js Process",request:"attach",delegateId:f,cwd:m==null?void 0:m.fsPath,__workspaceFolder:m})}}for(let p of a)t.removeDelegate(p);a=l}),e.launch(co({...s,type:"node-terminal",name:EH.name,request:"launch",...r}),{dap:o,telemetryReporter:n,cancellationToken:hr,get targetOrigin(){return new Ff("<unset>")}})},mz=Symbol("Abort"),fz=(0,hz.homedir)(),Vwe=process.platform==="win32"?t=>t:t=>t.startsWith(fz)?`~${t.slice(fz.length)}`:t;async function Gwe(){let t=Tt.workspace.workspaceFolders;if(!t||t.length<2)return t==null?void 0:t[0];let e=await Tt.window.showQuickPick(t.map(r=>({label:r.name,description:Vwe(r.uri.fsPath),folder:r})),{placeHolder:dz.t("Select current working directory for new terminal")});return(e==null?void 0:e.folder)??mz}var zT=class extends Xo{constructor(){super(...arguments);this.optionsReadyEmitter=new X;this.onOptionsReady=this.optionsReadyEmitter.event}createTerminal(r){return this.optionsReadyEmitter.fire(r),new Promise(i=>{let n=Tt.window.onDidOpenTerminal(s=>{n.dispose(),i(s)})})}};function gz(t,e,r,i){var a,u;let n=new Map,s=(c,l)=>new Xo(l,c,i.get(Ie),i.get(Yn),i.get(gt));async function o(c,l,p,f,m=s){if(!p){let b=await Gwe();if(b===mz)return;p=b}if(l){for(let[b,w]of n)if(w.folder===p&&w.cwd===(f==null?void 0:f.cwd)&&!w.launcher.targetList().length){b.show(!0),b.sendText(l);return}}let g=new Qs,H=m(g,new Ko(g,i.get(Ie),Uw));H.onTerminalCreated(b=>{n.set(b,{launcher:H,folder:p,cwd:f==null?void 0:f.cwd}),r.enableHandlingInTerminal(b)});try{await XT(c,H,{command:l,...f,__workspaceFolder:p==null?void 0:p.uri.fsPath},()=>{for(let[b,w]of n)if(w.launcher===H&&b.state.isInteractedWith)return!0;return!1})}catch(b){Tt.window.showErrorMessage(b.message)}}t.subscriptions.push(Tt.window.onDidCloseTerminal(c=>{n.delete(c)}),$e(Tt.commands,"extension.js-debug.createDebuggerTerminal",(c,l,p)=>o(e,c,l,p)),Tt.window.registerTerminalProfileProvider("extension.js-debug.debugTerminal",{provideTerminalProfile:()=>new Promise(c=>o(e,void 0,void 0,void 0,(l,p)=>{let f=new zT(p,l,i.get(Ie),i.get(Yn),i.get(gt));return f.onOptionsReady(m=>c(new Tt.TerminalProfile(m))),f}))}),(u=(a=Tt.window).registerTerminalLinkProvider)==null?void 0:u.call(a,r))}function yz(t,e,r){let i,n,s=()=>i||(i=(async()=>{let o=new Qs,a=new hl(new Ko(o,r.get(Ie),Uw),o,t,r.get(Ie),r.get(Yn),r.get(gt));return await XT(e,a,$t(ai.workspace,"debug.javascript.terminalOptions")),a.onTargetListChanged(()=>{a.targetList().length===0&&!n?n=setTimeout(()=>{i=void 0,a.terminate()},3e5):n&&(clearTimeout(n),n=void 0)}),a})(),i);t.subscriptions.push($e(ai.commands,"extension.js-debug.setAutoAttachVariables",async()=>{try{return{ipcAddress:(await s()).deferredSocketName}}catch(o){if(o instanceof hH&&o.helpLink){let a=Hz.t("Details");await ai.window.showErrorMessage(o.message,a)===a&&ai.env.openExternal(ai.Uri.parse(o.helpLink))}else await ai.window.showErrorMessage(o.message)}}),ai.workspace.onDidChangeWorkspaceFolders(()=>{i==null||i.then(o=>o.refreshVariables())}),$e(ai.commands,"extension.js-debug.autoAttachToProcess",async o=>{try{(await s()).spawnForChild(o)}catch(a){console.error(a),ai.window.showErrorMessage(`Error activating auto attach: ${a.stack||a}`)}}),$e(ai.commands,"extension.js-debug.clearAutoAttachVariables",async()=>{hl.clearVariables(t);let o=await i;o&&(o.terminate(),i=void 0)}))}var vz=S(Se()),bz=require("url"),$r=S(require("vscode"));var fA=S(require("vscode"));var th=class{constructor(){this.tunnels=new Map;this.disposable=new Le;this.disposable.push(fA.debug.onDidTerminateDebugSession(e=>this.destroySession(e.id)))}dispose(){return this.disposable.dispose()}destroySession(e){let r=this.tunnels.get(e);r&&(r.dispose(),this.tunnels.delete(e))}async request(e,r){let i=this.tunnels.get(e);i||(i=await fA.workspace.openTunnel({remoteAddress:{port:r.remotePort,host:"localhost"},localAddressPort:r.localPort??r.remotePort,label:r.label}),this.tunnels.set(e,i));let n;if(typeof i.localAddress=="string"){let[s,o]=i.localAddress.split(":");n={host:s,port:Number(o)}}else n=i.localAddress;return{remoteAddress:i.remoteAddress,localAddress:n}}};var Kwe=t=>e=>typeof e.localAddress=="string"?e.localAddress.endsWith(`:${t}`):e.localAddress.port===t,zwe=async t=>{let e=t.params.url;if(!e)return;let r;try{r=new bz.URL(e)}catch{return}if(!$t($r.workspace,"debug.javascript.automaticallyTunnelRemoteServer"))return;let i=Number(r.port)||80;if(!(await $r.workspace.tunnels).some(Kwe(i)))try{await $r.workspace.openTunnel({remoteAddress:{port:i,host:"localhost"},localAddressPort:i})}catch{}},Xwe=async(t,e,r)=>{if($r.env.uiKind===$r.UIKind.Web)return $r.debug.stopDebugging(t),$r.window.showErrorMessage(vz.t("We can't launch a browser in debug mode from here. Open this workspace in VS Code on your desktop to enable debugging."));try{let[,i]=await Promise.all([zwe(r),e.request(t.id,{remotePort:r.serverPort,label:"Browser Debug Tunnel"}).catch(()=>{})]);await $r.commands.executeCommand("js-debug-companion.launchAndAttach",{proxyUri:i?`127.0.0.1:${i.localAddress.port}`:`127.0.0.1:${r.serverPort}`,...r})}catch(i){$r.window.showErrorMessage(`Error launching browser: ${i.message||i.stack}`)}},Jwe=async(t,e,{launchId:r})=>{await $r.commands.executeCommand("js-debug-companion.kill",{launchId:r}),e.destroySession(t.id)};function wz(t){let e=new th;t.subscriptions.push(e,$r.debug.onDidReceiveDebugSessionCustomEvent(async r=>{switch(r.event){case"launchBrowserInCompanion":return Xwe(r.session,e,r.body);case"killCompanionBrowser":return Jwe(r.session,e,r.body);default:}}))}var sa=S(require("vscode"));var dA=class{constructor(e,r){this.id=e.id,this.enabled=r,this.label=`${e.group}: ${e.title}`,this.treeItem=new sa.TreeItem(this.label),this.treeItem.id=e.id}static compare(e,r){return e.label.localeCompare(r.label)}},JT=class{constructor(e){this._onDidChangeTreeData=new X;this.onDidChangeTreeData=this._onDidChangeTreeData.event;this.breakpoints=[];for(let r of Im().values())this.breakpoints.push(new dA(r,!1));this._debugSessionTracker=e,e.onSessionAdded(r=>{it.isConcreteSession(r)&&r.customRequest("enableCustomBreakpoints",{ids:this.breakpoints.filter(i=>i.enabled).map(i=>i.id)})})}getTreeItem(e){return e.treeItem}async getChildren(e){return e?[]:this.breakpoints.filter(r=>r.enabled).sort(dA.compare)}async getParent(){}addBreakpoints(e){for(let i of e)i.enabled=!0;let r=e.map(i=>i.id);for(let i of this._debugSessionTracker.getConcreteSessions())i.customRequest("enableCustomBreakpoints",{ids:r});this._onDidChangeTreeData.fire(void 0)}removeBreakpoints(e){let r=new Set(e);for(let i of this.breakpoints)r.has(i.id)&&(i.enabled=!1);for(let i of this._debugSessionTracker.getConcreteSessions())i.customRequest("disableCustomBreakpoints",{ids:e});this._onDidChangeTreeData.fire(void 0)}};function _z(t,e){let r=new JT(e);sa.window.createTreeView("jsBrowserBreakpoints",{treeDataProvider:r}),t.subscriptions.push(sa.commands.registerCommand("extension.js-debug.addCustomBreakpoints",()=>{let i=sa.window.createQuickPick(),n=r.breakpoints.filter(s=>!s.enabled);i.items=n,i.onDidAccept(()=>{r.addBreakpoints(i.selectedItems),i.dispose()}),i.show()})),t.subscriptions.push(sa.commands.registerCommand("extension.js-debug.removeAllCustomBreakpoints",()=>{r.removeBreakpoints(r.breakpoints.filter(i=>i.enabled).map(i=>i.id))})),t.subscriptions.push(sa.commands.registerCommand("extension.js-debug.removeCustomBreakpoint",i=>{r.removeBreakpoints([i.id])}))}var YT=S(require("vscode"));var Az=(t,e)=>{let r=e.get(Ou);t.subscriptions.push($e(YT.commands,"extension.js-debug.startProfile",i=>r.start(typeof i=="string"?{sessionId:i}:i??{})),$e(YT.commands,"extension.js-debug.stopProfile",i=>r.stop(i)))};var Iz=S(require("vscode"));var Ez=(t,e)=>{let r=new th;t.subscriptions.push(r,$e(Iz.commands,"extension.js-debug.requestCDPProxy",async(i,n)=>{let s=e.getById(i);if(!s)return;let o=await s.customRequest("requestCDPProxy");if(!n)return o;try{let a=await r.request(i,{label:"Edge Devtools Tunnel",remotePort:o.port});return{host:a.localAddress.host,port:a.localAddress.port,path:o.path}}catch{return o}}))};var Sz=S(require("vscode"));var Cz=(t,e)=>{t.subscriptions.push($e(Sz.commands,"extension.js-debug.revealPage",async r=>{let i=e.getById(r);await(i==null?void 0:i.customRequest("revealPage"))}))};var mH=S(require("vscode")),xz=require("url");async function Dz(t){if(!t){let e=mH.window.activeTextEditor;if(!e)return;t=e&&e.document.fileName}if(t&&mH.debug.activeDebugSession){let e;typeof t=="string"?ki(t)?e={resource:(0,xz.fileURLToPath)(t)}:e={resource:t}:e={sourceReference:t},await mH.debug.activeDebugSession.customRequest("toggleSkipFileStatus",e)}}var ih=S(require("vscode"));var Uz=require("fs"),jz=S(require("net"));var Pz=`\r
\r
`,Ywe=0,gH=class{constructor(e,r,i){this.inputStream=e;this.outputStream=r;this._contentLength=-1;this._connectionId=Ywe++;this.msgEmitter=new X;this.messageReceived=this.msgEmitter.event;this.endedEmitter=new X;this.closed=this.endedEmitter.event;this._handleData=e=>{var i;let r=new ti;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(Pz);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+Pz.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}};var Bz=S(Se()),HA=S(require("os"));var Qwe={connect:async()=>_p},Tz=t=>({async connect(e){return await e.Debugger.setAsyncCallStackDepth({maxDepth:t}),_p}}),Zwe=t=>{let e=new X,r=!1,i=()=>{r||(r=!0,e.fire())};return{async connect(n){if(r)return await n.Debugger.setAsyncCallStackDepth({maxDepth:t}),_p;let s=new Le;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}}},Lz=Tz(32),$z=t=>t===!1?Qwe:t===!0?Lz:"onAttach"in t?Tz(t.onAttach):"onceBreakpointResolved"in t?Zwe(t.onceBreakpointResolved):Lz;var xn=S(Se());var ml=class{constructor(e,r,i,n){this.asyncStackPolicy=r;this.launchConfig=i;this._services=n;this._disposables=new Le;this._customBreakpoints=new Set;this._threadDeferred=Je();this.breakpointIdCounter=AH();this._cdpProxyProvider=this._services.get(nb);this._configurationDoneDeferred=Je(),this.sourceContainer=n.get(fr),this.breakpointManager=n.get(pn);let s=n.get(Lb),o=n.get(jt);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 Ri(e.line,e.column||1),new Ri(e.endLine||e.line+1,e.endColumn||e.column||1))).map(s=>s.uiLocations.find(o=>o.source===i)).filter(kt).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(fe).getRecentLogs();return await this._services.get(Ie).writeFile(e,r.map(i=>JSON.stringify(i)).join(`
`)),{}}async launchBlocker(){await this._configurationDoneDeferred.promise,await this._services.get(qp).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=ml.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:xn.t("Caught Exceptions"),default:!1,supportsCondition:!0,description:xn.t("Breaks on all throw errors, even if they're caught later."),conditionDescription:'error.name == "MyError"'},{filter:"uncaught",label:xn.t("Uncaught Exceptions"),default:!1,supportsCondition:!0,description:xn.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(qp).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 ot(xn.t("Source not found"));if(!(r instanceof rr))return ot(xn.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=On(e.source.path);let r=this.sourceContainer.source(e.source);if(!r)return ot(xn.t("Source not found"));let i=await r.content();return i===void 0?(r instanceof rr&&this.dap.suggestDisableSourcemap({source:e.source}),ot(xn.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 ne(HE());let r=await this._thread.evaluate({expression:`${e.expression} = ${qh(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=qh(e.value.trim()),r.setVariable(e)):ot(xn.t("Variable not found"))}_withThread(e){if(!this._thread)throw new ne(HE());return e(this._thread)}async _refreshStackTrace(){if(!this._thread)return;this._thread.pausedDetails()&&await this._thread.refreshStackTrace()}createThread(e,r){this._thread=new qa(this.sourceContainer,e,this.dap,r,this._services.get(La),this._services.get(fe),this._services.get(un),this._services.get(sb),this.launchConfig,this.breakpointManager,this._services.get(Eb),this._services.get(qp),this._services.get(Wa),this._services.get(Ga));let i=this._services.get(Ob);i.connect(this.dap,this._thread),"profileStartup"in this.launchConfig&&this.launchConfig.profileStartup&&i.start(this.dap,this._thread,{type:gr.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(fe).error("internal","Error enabling async stacks",n)),this.breakpointManager.setThread(this._thread),this._services.get(St).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(xa).toggleSkippingFile(e),await this._refreshStackTrace(),{}}async _prettyPrintSource(e){if(!e.source)return{canPrettyPrint:!1};e.source.path=On(e.source.path);let r=this.sourceContainer.source(e.source);if(!r)return ot(xn.t("Source not found"));let i=await r.prettyPrint();if(!i)return ot(xn.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(za).generateHtml()};return e.fromSuggestion&&this._services.get(jt).report("diagnosticPrompt",{event:"opened"}),r}async _requestCDPProxy(){return await this._cdpProxyProvider.proxy()}dispose(){this._disposables.dispose(),Tv(this._services)}};var kz=require("inspector"),Rz=require("fs"),hA=class{constructor(e){this.file=e;this.session=new kz.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 Rz.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 mA=S(require("path"));function Oz(t,e,r){let i=Mz(t,e,"uncaughtException",r),n=Mz(t,e,"unhandledRejection",r);return process.addListener("uncaughtException",i),process.addListener("unhandledRejection",n),{dispose:()=>{process.removeListener("uncaughtException",i),process.removeListener("unhandledRejection",n)}}}var Mz=(t,e,r,i=!0)=>n=>{r_e(n)&&(e.report("error",{"!error":n,error:i?void 0:n,exceptionType:r}),t.error("runtime.exception","Unhandled error in debug adapter",n))},e_e=t=>typeof t=="object"&&!!t&&"stack"in t,t_e=mA.dirname(mA.dirname(mA.dirname(__dirname)));function r_e(t){var e;return!Nz||e_e(t)&&!!((e=t.stack)!=null&&e.includes(t_e))}var Nz=!1;function Fz(){Nz=!0}var gA=class{constructor(e,r,i,n){this._rootServices=i;this._threads=new Map;this._terminationCount=0;this._onTargetListChangedEmitter=new X;this.onTargetListChanged=this._onTargetListChangedEmitter.event;this._serviceTree=new WeakMap;this._delegate=e,this._dap=r.dap(),this._targetOrigin=n,this._disposables=[this._onTargetListChangedEmitter,Oz(i.get(fe),i.get(jt),i.get(up))],r.attachTelemetry(i.get(jt)),this._dap.then(s=>{let o=0,a;s.on("initialize",async u=>{this._rootServices.bind(gi).toConstantValue(u);let c=ml.capabilities();return u.clientID==="vscode"&&Fz(),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(St).notifyHadBreakpoint(),{breakpoints:((l=u.breakpoints)==null?void 0:l.map(()=>({id:++o,verified:!1,message:Bz.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",u=>this._boot(co(u,this._rootServices.get(Ts)),s)),s.on("launch",u=>this._boot(co(u,this._rootServices.get(Ts)),s)),s.on("pause",async()=>({})),s.on("terminate",async()=>(await this._disconnect(),{})),s.on("disconnect",async()=>(await this._disconnect(),{})),s.on("restart",async({arguments:u})=>(await this._restart(u),{})),s.on("startSelfProfile",async({file:u})=>(a==null||a.dispose(),a=new hA(u),await a.start(),{})),s.on("stopSelfProfile",async()=>(a&&(await a.stop(),a.dispose(),a=void 0),{}))})}getLaunchers(){if(!this._launchers){this._launchers=new Set(this._rootServices.getAll(Ar));for(let e of this._launchers)e.onTargetListChanged(()=>{let r=this.targetList();this._attachToNewTargets(r,e),this._detachOrphanThreads(r),this._onTargetListChangedEmitter.fire()},void 0,this._disposables)}return this._launchers}async _disconnect(){if(!this._launchers)return;this._rootServices.get(jt).flush(),await Promise.all([...this._launchers].map(r=>r.disconnect()));let e=()=>!this.targetList.length&&this._terminationCount===0;e()||(await new Promise(r=>this.onTargetListChanged(()=>{e()&&r()})),await Oe(0))}async _boot(e,r){i_e(r),this.reportBootTelemetry(e),lz(this._rootServices,e,r),this._rootServices.get(fe).setup(KR(r,e.trace));let i=e.timeout>0?dr.withTimeout(e.timeout):new dr;e.rootPath&&(e.rootPath=On(e.rootPath)),this._launchParams=e;try{await Promise.all([...this.getLaunchers()].map(n=>this._launch(n,e,i.token)))}catch(n){throw n}return{}}reportBootTelemetry(e){let r=co({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"?ao(n,o=>i(o)):n;this._rootServices.get(jt).report("launch",{type:e.type,request:e.request,os:`${HA.platform()} ${HA.arch()}`,nodeVersion:process.version,adapterVersion:Vu,parameters:ao(e,i)})}async _restart(e){let r;if(e){let i=this._rootServices.get(Ym);r=co({__workspaceFolder:i.__workspaceFolder,...e},this._rootServices.get(Ts)),i.update(r)}await Promise.all([...this.getLaunchers()].map(i=>i.restart(r)))}async _launch(e,r,i){if(!(await this.captureLaunch(e,r,i)).blockSessionTermination)return;++this._terminationCount;let s=e.onTerminated(o=>{s.dispose();let a=this._detachOrphanThreads(this.targetList(),{restart:o.restart});--this._terminationCount,this._onTargetListChangedEmitter.fire(),this._terminationCount||a.then(()=>this._dap).then(u=>u.terminated({restart:o.restart}))});this._disposables.push(s)}async captureLaunch(e,r,i){let n=e.constructor.name,s;try{s=await e.launch(r,{telemetryReporter:this._rootServices.get(jt),cancellationToken:i,targetOrigin:this._targetOrigin,dap:await this._dap})}catch(o){throw this._rootServices.get(fe).warn("runtime.launch","Launch returned error",{error:o,wasCancelled:i.isCancellationRequested,name:n}),o}return s.blockSessionTermination&&this._rootServices.get(fe).info("runtime.launch","Launched successfully",{name:n}),s}dispose(){for(let e of this._disposables)e.dispose();this._disposables=[],Tv(this._rootServices),this._detachOrphanThreads([])}targetList(){let e=[];for(let r of this.getLaunchers())e.push(...r.targetList());return e}async attach(e,r,i){if(!this._launchParams)throw new Error("Cannot launch before params have been set");if(!e.canAttach())return;let n=await e.attach();if(!n)return;let s=await this._delegate.acquireDap(e),o=await s.dap(),a=this._launchParams;this._asyncStackPolicy||(this._asyncStackPolicy=$z(a.showAsyncStacks));let u=e.parent(),c=u&&this._serviceTree.get(u)||this._rootServices,l=az(c,e,o,n);s.attachTelemetry(l.get(jt)),this._serviceTree.set(e,c);let p=new ml(o,this._asyncStackPolicy,a,l),f=p.createThread(n,e),m=async()=>(await p.launchBlocker(),e.runIfWaitingForDebugger(),r.resolve({thread:f,debugAdapter:p}),{});await this._delegate.initAdapter(p,e,i)?m():(o.on("attach",m),o.on("launch",m),o.on("disconnect",()=>this.detachTarget(e,l)),o.on("terminate",()=>this.stopTarget(e,l)),o.on("restart",async()=>(e.canRestart()?e.restart():await this._restart(),{}))),await e.afterBind()}async detachTarget(e,r){return r.get(jt).flush(),this.targetList().includes(e)?(e.canDetach()?(await e.detach(),this._releaseTarget(e)):this._disconnect(),{}):{}}stopTarget(e,r){return r.get(jt).flush(),this.targetList().includes(e)?(e.canStop()?e.stop():this._disconnect(),Promise.resolve({})):Promise.resolve({})}_attachToNewTargets(e,r){for(let i of e.values())if(i.waitingForDebugger()&&!this._threads.has(i)){let n=Je();this._threads.set(i,n),this.attach(i,n,r)}}async _detachOrphanThreads(e,r){await Promise.all([...this._threads.keys()].filter(i=>!e.includes(i)).map(i=>this._releaseTarget(i,r)))}async _releaseTarget(e,r={}){let i=this._threads.get(e);if(!i)return;this._threads.delete(e);let n=await i.promise;await n.thread.dispose(),n.debugAdapter.dap.terminated(r),n.debugAdapter.dispose(),this._delegate.releaseDap(e)}};function i_e(t){PH&&t.output({category:"console",output:`Note: Using the "preview" debug extension
`})}var yA=class{constructor(e,r,i,n,s){this.debugSession=e;this.logger=i;this.sessionStates=n;this.parent=s;this.subscriptions=new Le;r.setLogger(i),this.connection=new $h(r,this.logger)}listenToTarget(e){this.subscriptions.push(e.onNameChanged(()=>this.setName(e)),this.sessionStates.onAdd(([r])=>r===this.debugSession.id&&this.setName(e)),this.sessionStates.onRemove(([r])=>r===this.debugSession.id&&this.setName(e))),this.setName(e)}dispose(){this.subscriptions.dispose()}setName(e){let r=this.sessionStates.get(this.debugSession.id),i=e.name();this.parent instanceof rh&&(i=`${this.parent.debugSession.name}: ${i}`),this.debugSession.name=r?`${i} (${r})`:i}},rh=class extends yA{constructor(r,i,n){super(r,i,n.get(fe),n.get(cp));this.debugSession=r;this.services=n;this.connection.attachTelemetry(n.get(jt))}createBinder(r){this._binder=new gA(r,this.connection,this.services,new Rw(this.debugSession.id))}dispose(){var r,i;super.dispose(),(i=(r=this._binder)==null?void 0:r.dispose)==null||i.call(r)}},vA=class{constructor(e,r){this.globalContainer=e;this.sessionLauncher=r;this._disposables=[];this._sessions=new Map;this._pendingTarget=new Map;this._sessionForTarget=new Map;this._sessionForTargetCallbacks=new Map}terminate(e){let r=this._sessions.get(e.id);this._sessions.delete(e.id),r&&r.dispose()}createNewRootSession(e,r){let i=new rh(e,r,uz(this.globalContainer));return i.createBinder(this),this._sessions.set(e.id,i),i}createNewChildSession(e,r,i){var c;let n=this._pendingTarget.get(r);if(!n)throw new Error(`Cannot find target ${r}`);let{target:s,parent:o}=n,a=new yA(e,i,o.logger,o.sessionStates,o);this._pendingTarget.delete(r),a.debugSession.name=s.name(),a.listenToTarget(s);let u=this._sessionForTargetCallbacks.get(s);return this._sessionForTargetCallbacks.delete(s),(c=u==null?void 0:u.fulfill)==null||c.call(u,a),this._sessions.set(e.id,a),a}async acquireDap(e){return(await this.getOrLaunchSession(e)).connection}getOrLaunchSession(e){let r=this._sessionForTarget.get(e);if(r)return r;let i=new Promise(async(n,s)=>{let o,a=e.parent();if(a?o=await this.getOrLaunchSession(a):o=this._sessions.get(e.targetOrigin().id),!o)throw new Error("Expected to get a parent debug session for target");this._pendingTarget.set(e.id(),{target:e,parent:o}),this._sessionForTargetCallbacks.set(e,{fulfill:n,reject:s});let u=o.debugSession.configuration,c={type:u.type==="pwa-extensionHost"?"pwa-chrome":u.type,name:e.name(),request:o.debugSession.configuration.request,__pendingTargetId:e.id(),preRestartTask:u.preRestartTask??u.postDebugTask,postRestartTask:u.postRestartTask??u.preLaunchTask};this.sessionLauncher.launch(o,e,c)});return this._sessionForTarget.set(e,i),i}initAdapter(){return Promise.resolve(!1)}releaseDap(e){this._sessionForTarget.delete(e);let r=this._sessionForTargetCallbacks.get(e);r&&r.reject(new Error("Target gone")),this._sessionForTargetCallbacks.delete(e)}dispose(){for(let e of this._sessions.values())e.dispose();this._sessions.clear(),this._pendingTarget.clear(),this._sessionForTarget.clear(),this._sessionForTargetCallbacks.clear();for(let e of this._disposables)e.dispose();this._disposables=[]}};var bA=class{constructor(e,r,i="127.0.0.1"){this.host=i;this.disposables=[];this.servers=new Map;this.sessionManager=new vA(e,r),this.portLeaseTracker=e.get(gt),this.disposables.push(this.sessionManager)}createDebugServer(e,r){return e.configuration.__pendingTargetId?this.createChildDebugServer(e):this.createRootDebugServer(e,r)}createRootDebugServer(e,r){return this.innerCreateServer(e,i=>this.sessionManager.createNewRootSession(e,i),r)}createRootDebugSessionFromStreams(e,r,i){let n=new gH(r,i);return this.sessionManager.createNewRootSession(e,n)}createChildDebugServer(e,r){return this.innerCreateServer(e,i=>this.sessionManager.createNewChildSession(e,e.configuration.__pendingTargetId,i),r)}async innerCreateServer(e,r,i){let n=Je(),s=a=>{let u=new gH(a,a),c=r(u);n.resolve(c.connection)},o=i===void 0?await new Promise((a,u)=>{let c=Dy(),l=jz.createServer(s).on("error",u).on("close",()=>Uz.promises.unlink(c).catch(()=>{})).listen(c,()=>a(l))}):await h2(this.portLeaseTracker,s,i,this.host);return this.servers.set(e.id,o),{server:o,connectionPromise:n.promise}}terminate(e){var r;this.sessionManager.terminate(e),(r=this.servers.get(e.id))==null||r.close(),this.servers.delete(e.id)}dispose(){this.sessionManager.dispose()}};var QT=class{launch(e,r,i){ih.debug.startDebugging(e.debugSession.workspaceFolder,{...i,...r.supplementalConfig,serverReadyAction:e.debugSession.configuration.serverReadyAction,__parentId:e.debugSession.id},{parentSession:e.debugSession,consoleMode:ih.DebugConsoleMode.MergeWithParent,noDebug:e.debugSession.configuration.noDebug,compact:e instanceof rh,lifecycleManagedByParent:!r.independentLifeycle})}},wA=class{constructor(e){this.sessionServerManager=new bA(e,new QT)}async createDebugAdapterDescriptor(e){let r=await this.sessionServerManager.createDebugServer(e);return new ih.DebugAdapterNamedPipeServer(r.server.address())}terminate(e){this.sessionServerManager.terminate(e)}dispose(){this.sessionServerManager.dispose()}};function n_e(t){var o;er.l10n.bundle&&qz.config({contents:er.l10n.bundle});let e=cz({storagePath:process.platform==="win32"?(0,Wz.tmpdir)():t.storagePath||t.extensionPath,isVsCode:!0,isRemote:!!process.env.JS_DEBUG_USE_COMPANION||((o=er.extensions.getExtension(m$))==null?void 0:o.extensionKind)===er.ExtensionKind.Workspace,context:t});t.subscriptions.push($e(er.commands,"extension.js-debug.npmScript",bK),$e(er.commands,"extension.js-debug.pickNodeProcess",HT),$e(er.commands,"extension.pwa-node-debug.attachNodeProcess",oK),$e(er.commands,"extension.js-debug.toggleSkippingFile",Dz));let r=e.getAll(I_);for(let a of r){let u=a;t.subscriptions.push(er.debug.registerDebugConfigurationProvider(a.type,u));let c=oh.get(a.type);c&&t.subscriptions.push(er.debug.registerDebugConfigurationProvider(c,u))}let i=e.getAll(E_);for(let a of i)er.debug.registerDebugConfigurationProvider(a.type,a,er.DebugConfigurationProviderTriggerKind!==void 0?a.triggerKind:void 0);let n=new wA(e);t.subscriptions.push(...[...EA].map(a=>er.debug.registerDebugAdapterDescriptorFactory(a,n))),t.subscriptions.push(er.debug.onDidTerminateDebugSession(a=>n.terminate(a))),t.subscriptions.push(n);let s=e.get(it);s.attach(),wz(t),_z(t,s),gz(t,e.get(Zs),e.get(Uu),e),Az(t,e),yz(t,e.get(Zs),e),Cz(t,s),Ez(t,s),e.getAll(Hi).forEach(a=>a.register(t))}function s_e(){}0&&(module.exports={activate,deactivate});
/*! 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.
  ***************************************************************************** *)
*/
//# sourceMappingURL=extension.js.map
