updates 13.0.4 → 13.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/updates.js +1 -1
- package/package.json +7 -7
package/bin/updates.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as t}from"module";var r={1040:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});function once(t,r,{signal:n}={}){return new Promise(((o,a)=>{function cleanup(){n===null||n===void 0?void 0:n.removeEventListener("abort",cleanup);t.removeListener(r,onEvent);t.removeListener("error",onError)}function onEvent(...t){cleanup();o(t)}function onError(t){cleanup();a(t)}n===null||n===void 0?void 0:n.addEventListener("abort",cleanup);t.on(r,onEvent);t.on("error",onError)}))}r["default"]=once},9690:function(t,r,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};const a=n(2361);const s=o(n(8237));const i=o(n(6570));const l=s.default("agent-base");function isAgent(t){return Boolean(t)&&typeof t.addRequest==="function"}function isSecureEndpoint(){const{stack:t}=new Error;if(typeof t!=="string")return false;return t.split("\n").some((t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1))}function createAgent(t,r){return new createAgent.Agent(t,r)}(function(t){class Agent extends a.EventEmitter{constructor(t,r){super();let n=r;if(typeof t==="function"){this.callback=t}else if(t){n=t}this.timeout=null;if(n&&typeof n.timeout==="number"){this.timeout=n.timeout}this.maxFreeSockets=1;this.maxSockets=1;this.maxTotalSockets=Infinity;this.sockets={};this.freeSockets={};this.requests={};this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number"){return this.explicitDefaultPort}return isSecureEndpoint()?443:80}set defaultPort(t){this.explicitDefaultPort=t}get protocol(){if(typeof this.explicitProtocol==="string"){return this.explicitProtocol}return isSecureEndpoint()?"https:":"http:"}set protocol(t){this.explicitProtocol=t}callback(t,r,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(t,r){const n=Object.assign({},r);if(typeof n.secureEndpoint!=="boolean"){n.secureEndpoint=isSecureEndpoint()}if(n.host==null){n.host="localhost"}if(n.port==null){n.port=n.secureEndpoint?443:80}if(n.protocol==null){n.protocol=n.secureEndpoint?"https:":"http:"}if(n.host&&n.path){delete n.path}delete n.agent;delete n.hostname;delete n._defaultAgent;delete n.defaultPort;delete n.createConnection;t._last=true;t.shouldKeepAlive=false;let o=false;let a=null;const s=n.timeout||this.timeout;const onerror=r=>{if(t._hadError)return;t.emit("error",r);t._hadError=true};const ontimeout=()=>{a=null;o=true;const t=new Error(`A "socket" was not created for HTTP request before ${s}ms`);t.code="ETIMEOUT";onerror(t)};const callbackError=t=>{if(o)return;if(a!==null){clearTimeout(a);a=null}onerror(t)};const onsocket=r=>{if(o)return;if(a!=null){clearTimeout(a);a=null}if(isAgent(r)){l("Callback returned another Agent instance %o",r.constructor.name);r.addRequest(t,n);return}if(r){r.once("free",(()=>{this.freeSocket(r,n)}));t.onSocket(r);return}const s=new Error(`no Duplex stream was returned to agent-base for \`${t.method} ${t.path}\``);onerror(s)};if(typeof this.callback!=="function"){onerror(new Error("`callback` is not defined"));return}if(!this.promisifiedCallback){if(this.callback.length>=3){l("Converting legacy callback function to promise");this.promisifiedCallback=i.default(this.callback)}else{this.promisifiedCallback=this.callback}}if(typeof s==="number"&&s>0){a=setTimeout(ontimeout,s)}if("port"in n&&typeof n.port!=="number"){n.port=Number(n.port)}try{l("Resolving socket for %o request: %o",n.protocol,`${t.method} ${t.path}`);Promise.resolve(this.promisifiedCallback(t,n)).then(onsocket,callbackError)}catch(t){Promise.reject(t).catch(callbackError)}}freeSocket(t,r){l("Freeing socket %o %o",t.constructor.name,r);t.destroy()}destroy(){l("Destroying agent %o",this.constructor.name)}}t.Agent=Agent;t.prototype=t.Agent.prototype})(createAgent||(createAgent={}));t.exports=createAgent},6570:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});function promisify(t){return function(r,n){return new Promise(((o,a)=>{t.call(this,r,n,((t,r)=>{if(t){a(t)}else{o(r)}}))}))}}r["default"]=promisify},8222:(t,r,n)=>{r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.storage=localstorage();r.destroy=(()=>{let t=false;return()=>{if(!t){t=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();r.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 useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(r){r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;r.splice(1,0,n,"color: inherit");let o=0;let a=0;r[0].replace(/%[a-zA-Z%]/g,(t=>{if(t==="%%"){return}o++;if(t==="%c"){a=o}}));r.splice(a,0,n)}r.log=console.debug||console.log||(()=>{});function save(t){try{if(t){r.storage.setItem("debug",t)}else{r.storage.removeItem("debug")}}catch(t){}}function load(){let t;try{t=r.storage.getItem("debug")}catch(t){}if(!t&&typeof process!=="undefined"&&"env"in process){t=process.env.DEBUG}return t}function localstorage(){try{return localStorage}catch(t){}}t.exports=n(6243)(r);const{formatters:o}=t.exports;o.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},6243:(t,r,n)=>{function setup(t){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=n(900);createDebug.destroy=destroy;Object.keys(t).forEach((r=>{createDebug[r]=t[r]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(t){let r=0;for(let n=0;n<t.length;n++){r=(r<<5)-r+t.charCodeAt(n);r|=0}return createDebug.colors[Math.abs(r)%createDebug.colors.length]}createDebug.selectColor=selectColor;function createDebug(t){let r;let n=null;let o;let a;function debug(...t){if(!debug.enabled){return}const n=debug;const o=Number(new Date);const a=o-(r||o);n.diff=a;n.prev=r;n.curr=o;r=o;t[0]=createDebug.coerce(t[0]);if(typeof t[0]!=="string"){t.unshift("%O")}let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if(r==="%%"){return"%"}s++;const a=createDebug.formatters[o];if(typeof a==="function"){const o=t[s];r=a.call(n,o);t.splice(s,1);s--}return r}));createDebug.formatArgs.call(n,t);const i=n.log||createDebug.log;i.apply(n,t)}debug.namespace=t;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(t);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(n!==null){return n}if(o!==createDebug.namespaces){o=createDebug.namespaces;a=createDebug.enabled(t)}return a},set:t=>{n=t}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(t,r){const n=createDebug(this.namespace+(typeof r==="undefined"?":":r)+t);n.log=this.log;return n}function enable(t){createDebug.save(t);createDebug.namespaces=t;createDebug.names=[];createDebug.skips=[];let r;const n=(typeof t==="string"?t:"").split(/[\s,]+/);const o=n.length;for(r=0;r<o;r++){if(!n[r]){continue}t=n[r].replace(/\*/g,".*?");if(t[0]==="-"){createDebug.skips.push(new RegExp("^"+t.substr(1)+"$"))}else{createDebug.names.push(new RegExp("^"+t+"$"))}}}function disable(){const t=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map((t=>"-"+t))].join(",");createDebug.enable("");return t}function enabled(t){if(t[t.length-1]==="*"){return true}let r;let n;for(r=0,n=createDebug.skips.length;r<n;r++){if(createDebug.skips[r].test(t)){return false}}for(r=0,n=createDebug.names.length;r<n;r++){if(createDebug.names[r].test(t)){return true}}return false}function toNamespace(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}function coerce(t){if(t instanceof Error){return t.stack||t.message}return t}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}createDebug.enable(createDebug.load());return createDebug}t.exports=setup},8237:(t,r,n)=>{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){t.exports=n(8222)}else{t.exports=n(5332)}},5332:(t,r,n)=>{const o=n(6224);const a=n(3837);r.init=init;r.log=log;r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.destroy=a.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");r.colors=[6,2,3,4,5,1];try{const t=n(9318);if(t&&(t.stderr||t).level>=2){r.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(t){}r.inspectOpts=Object.keys(process.env).filter((t=>/^debug_/i.test(t))).reduce(((t,r)=>{const n=r.substring(6).toLowerCase().replace(/_([a-z])/g,((t,r)=>r.toUpperCase()));let o=process.env[r];if(/^(yes|on|true|enabled)$/i.test(o)){o=true}else if(/^(no|off|false|disabled)$/i.test(o)){o=false}else if(o==="null"){o=null}else{o=Number(o)}t[n]=o;return t}),{});function useColors(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):o.isatty(process.stderr.fd)}function formatArgs(r){const{namespace:n,useColors:o}=this;if(o){const o=this.color;const a="[3"+(o<8?o:"8;5;"+o);const s=` ${a};1m${n} [0m`;r[0]=s+r[0].split("\n").join("\n"+s);r.push(a+"m+"+t.exports.humanize(this.diff)+"[0m")}else{r[0]=getDate()+n+" "+r[0]}}function getDate(){if(r.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...t){return process.stderr.write(a.format(...t)+"\n")}function save(t){if(t){process.env.DEBUG=t}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(t){t.inspectOpts={};const n=Object.keys(r.inspectOpts);for(let o=0;o<n.length;o++){t.inspectOpts[n[o]]=r.inspectOpts[n[o]]}}t.exports=n(6243)(r);const{formatters:s}=t.exports;s.o=function(t){this.inspectOpts.colors=this.useColors;return a.inspect(t,this.inspectOpts).split("\n").map((t=>t.trim())).join(" ")};s.O=function(t){this.inspectOpts.colors=this.useColors;return a.inspect(t,this.inspectOpts)}},1705:t=>{function isSpecificValue(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp?true:false}function cloneSpecificValue(t){if(t instanceof Buffer){var r=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);t.copy(r);return r}else if(t instanceof Date){return new Date(t.getTime())}else if(t instanceof RegExp){return new RegExp(t)}else{throw new Error("Unexpected situation")}}function deepCloneArray(t){var n=[];t.forEach((function(t,o){if(typeof t==="object"&&t!==null){if(Array.isArray(t)){n[o]=deepCloneArray(t)}else if(isSpecificValue(t)){n[o]=cloneSpecificValue(t)}else{n[o]=r({},t)}}else{n[o]=t}}));return n}function safeGetProperty(t,r){return r==="__proto__"?undefined:t[r]}var r=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var t=arguments[0];var n=Array.prototype.slice.call(arguments,1);var o,a,s;n.forEach((function(n){if(typeof n!=="object"||n===null||Array.isArray(n)){return}Object.keys(n).forEach((function(s){a=safeGetProperty(t,s);o=safeGetProperty(n,s);if(o===t){return}else if(typeof o!=="object"||o===null){t[s]=o;return}else if(Array.isArray(o)){t[s]=deepCloneArray(o);return}else if(isSpecificValue(o)){t[s]=cloneSpecificValue(o);return}else if(typeof a!=="object"||a===null||Array.isArray(a)){t[s]=r({},o);return}else{t[s]=r(a,o);return}}))}));return t}},1621:t=>{t.exports=(t,r=process.argv)=>{const n=t.startsWith("-")?"":t.length===1?"-":"--";const o=r.indexOf(n+t);const a=r.indexOf("--");return o!==-1&&(a===-1||o<a)}},135:t=>{const maybeJoin=(...t)=>t.every((t=>t))?t.join(""):"";const maybeEncode=t=>t?encodeURIComponent(t):"";const r={sshtemplate:({domain:t,user:r,project:n,committish:o})=>`git@${t}:${r}/${n}.git${maybeJoin("#",o)}`,sshurltemplate:({domain:t,user:r,project:n,committish:o})=>`git+ssh://git@${t}/${r}/${n}.git${maybeJoin("#",o)}`,browsetemplate:({domain:t,user:r,project:n,committish:o,treepath:a})=>`https://${t}/${r}/${n}${maybeJoin("/",a,"/",maybeEncode(o))}`,browsefiletemplate:({domain:t,user:r,project:n,committish:o,treepath:a,path:s,fragment:i,hashformat:l})=>`https://${t}/${r}/${n}/${a}/${maybeEncode(o||"master")}/${s}${maybeJoin("#",l(i||""))}`,docstemplate:({domain:t,user:r,project:n,treepath:o,committish:a})=>`https://${t}/${r}/${n}${maybeJoin("/",o,"/",maybeEncode(a))}#readme`,httpstemplate:({auth:t,domain:r,user:n,project:o,committish:a})=>`git+https://${maybeJoin(t,"@")}${r}/${n}/${o}.git${maybeJoin("#",a)}`,filetemplate:({domain:t,user:r,project:n,committish:o,path:a})=>`https://${t}/${r}/${n}/raw/${maybeEncode(o)||"master"}/${a}`,shortcuttemplate:({type:t,user:r,project:n,committish:o})=>`${t}:${r}/${n}${maybeJoin("#",o)}`,pathtemplate:({user:t,project:r,committish:n})=>`${t}/${r}${maybeJoin("#",n)}`,bugstemplate:({domain:t,user:r,project:n})=>`https://${t}/${r}/${n}/issues`,hashformat:formatHashFragment};const n={};n.github=Object.assign({},r,{protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",filetemplate:({auth:t,user:r,project:n,committish:o,path:a})=>`https://${maybeJoin(t,"@")}raw.githubusercontent.com/${r}/${n}/${maybeEncode(o)||"master"}/${a}`,gittemplate:({auth:t,domain:r,user:n,project:o,committish:a})=>`git://${maybeJoin(t,"@")}${r}/${n}/${o}.git${maybeJoin("#",a)}`,tarballtemplate:({domain:t,user:r,project:n,committish:o})=>`https://codeload.${t}/${r}/${n}/tar.gz/${maybeEncode(o)||"master"}`,extract:t=>{let[,r,n,o,a]=t.pathname.split("/",5);if(o&&o!=="tree"){return}if(!o){a=t.hash.slice(1)}if(n&&n.endsWith(".git")){n=n.slice(0,-4)}if(!r||!n){return}return{user:r,project:n,committish:a}}});n.bitbucket=Object.assign({},r,{protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",tarballtemplate:({domain:t,user:r,project:n,committish:o})=>`https://${t}/${r}/${n}/get/${maybeEncode(o)||"master"}.tar.gz`,extract:t=>{let[,r,n,o]=t.pathname.split("/",4);if(["get"].includes(o)){return}if(n&&n.endsWith(".git")){n=n.slice(0,-4)}if(!r||!n){return}return{user:r,project:n,committish:t.hash.slice(1)}}});n.gitlab=Object.assign({},r,{protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",httpstemplate:({auth:t,domain:r,user:n,project:o,committish:a})=>`git+https://${maybeJoin(t,"@")}${r}/${n}/${o}.git${maybeJoin("#",a)}`,tarballtemplate:({domain:t,user:r,project:n,committish:o})=>`https://${t}/${r}/${n}/repository/archive.tar.gz?ref=${maybeEncode(o)||"master"}`,extract:t=>{const r=t.pathname.slice(1);if(r.includes("/-/")||r.includes("/archive.tar.gz")){return}const n=r.split("/");let o=n.pop();if(o.endsWith(".git")){o=o.slice(0,-4)}const a=n.join("/");if(!a||!o){return}return{user:a,project:o,committish:t.hash.slice(1)}}});n.gist=Object.assign({},r,{protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",sshtemplate:({domain:t,project:r,committish:n})=>`git@${t}:${r}.git${maybeJoin("#",n)}`,sshurltemplate:({domain:t,project:r,committish:n})=>`git+ssh://git@${t}/${r}.git${maybeJoin("#",n)}`,browsetemplate:({domain:t,project:r,committish:n})=>`https://${t}/${r}${maybeJoin("/",maybeEncode(n))}`,browsefiletemplate:({domain:t,project:r,committish:n,path:o,hashformat:a})=>`https://${t}/${r}${maybeJoin("/",maybeEncode(n))}${maybeJoin("#",a(o))}`,docstemplate:({domain:t,project:r,committish:n})=>`https://${t}/${r}${maybeJoin("/",maybeEncode(n))}`,httpstemplate:({domain:t,project:r,committish:n})=>`git+https://${t}/${r}.git${maybeJoin("#",n)}`,filetemplate:({user:t,project:r,committish:n,path:o})=>`https://gist.githubusercontent.com/${t}/${r}/raw${maybeJoin("/",maybeEncode(n))}/${o}`,shortcuttemplate:({type:t,project:r,committish:n})=>`${t}:${r}${maybeJoin("#",n)}`,pathtemplate:({project:t,committish:r})=>`${t}${maybeJoin("#",r)}`,bugstemplate:({domain:t,project:r})=>`https://${t}/${r}`,gittemplate:({domain:t,project:r,committish:n})=>`git://${t}/${r}.git${maybeJoin("#",n)}`,tarballtemplate:({project:t,committish:r})=>`https://codeload.github.com/gist/${t}/tar.gz/${maybeEncode(r)||"master"}`,extract:t=>{let[,r,n,o]=t.pathname.split("/",4);if(o==="raw"){return}if(!n){if(!r){return}n=r;r=null}if(n.endsWith(".git")){n=n.slice(0,-4)}return{user:r,project:n,committish:t.hash.slice(1)}},hashformat:function(t){return t&&"file-"+formatHashFragment(t)}});n.sourcehut=Object.assign({},r,{protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",browsefiletemplate:({domain:t,user:r,project:n,committish:o,treepath:a,path:s,fragment:i,hashformat:l})=>`https://${t}/${r}/${n}/${a}/${maybeEncode(o||"main")}/${s}${maybeJoin("#",l(i||""))}`,filetemplate:({domain:t,user:r,project:n,committish:o,path:a})=>`https://${t}/${r}/${n}/blob/${maybeEncode(o)||"main"}/${a}`,httpstemplate:({domain:t,user:r,project:n,committish:o})=>`https://${t}/${r}/${n}.git${maybeJoin("#",o)}`,tarballtemplate:({domain:t,user:r,project:n,committish:o})=>`https://${t}/${r}/${n}/archive/${maybeEncode(o)||"main"}.tar.gz`,bugstemplate:({domain:t,user:r,project:n})=>`https://todo.sr.ht/${r}/${n}`,docstemplate:({domain:t,user:r,project:n,treepath:o,committish:a})=>`https://${t}/${r}/${n}${maybeJoin("/",o,"/",maybeEncode(a))}#readme`,extract:t=>{let[,r,n,o]=t.pathname.split("/",4);if(["archive"].includes(o)){return}if(n&&n.endsWith(".git")){n=n.slice(0,-4)}if(!r||!n){return}return{user:r,project:n,committish:t.hash.slice(1)}}});const o=Object.keys(n);n.byShortcut={};n.byDomain={};for(const t of o){n.byShortcut[`${t}:`]=t;n.byDomain[n[t].domain]=t}function formatHashFragment(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}t.exports=n},8145:(t,r,n)=>{const o=n(135);class GitHost{constructor(t,r,n,a,s,i,l={}){Object.assign(this,o[t]);this.type=t;this.user=r;this.auth=n;this.project=a;this.committish=s;this.default=i;this.opts=l}hash(){return this.committish?`#${this.committish}`:""}ssh(t){return this._fill(this.sshtemplate,t)}_fill(t,r){if(typeof t==="function"){const n={...this,...this.opts,...r};if(!n.path){n.path=""}if(n.path.startsWith("/")){n.path=n.path.slice(1)}if(n.noCommittish){n.committish=null}const o=t(n);return n.noGitPlus&&o.startsWith("git+")?o.slice(4):o}return null}sshurl(t){return this._fill(this.sshurltemplate,t)}browse(t,r,n){if(typeof t!=="string"){return this._fill(this.browsetemplate,t)}if(typeof r!=="string"){n=r;r=null}return this._fill(this.browsefiletemplate,{...n,fragment:r,path:t})}docs(t){return this._fill(this.docstemplate,t)}bugs(t){return this._fill(this.bugstemplate,t)}https(t){return this._fill(this.httpstemplate,t)}git(t){return this._fill(this.gittemplate,t)}shortcut(t){return this._fill(this.shortcuttemplate,t)}path(t){return this._fill(this.pathtemplate,t)}tarball(t){return this._fill(this.tarballtemplate,{...t,noCommittish:false})}file(t,r){return this._fill(this.filetemplate,{...r,path:t})}getDefaultRepresentation(){return this.default}toString(t){if(this.default&&typeof this[this.default]==="function"){return this[this.default](t)}return this.sshurl(t)}}t.exports=GitHost},8869:(t,r,n)=>{const o=n(7310);const a=n(135);const s=t.exports=n(8145);const i=n(7129);const l=new i({max:1e3});const u={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function protocolToRepresentation(t){return u[t]||t.slice(0,-1)}const c={"git:":true,"https:":true,"git+https:":true,"http:":true,"git+http:":true};const d=Object.keys(a.byShortcut).concat(["http:","https:","git:","git+ssh:","git+https:","ssh:"]);t.exports.fromUrl=function(t,r){if(typeof t!=="string"){return}const n=t+JSON.stringify(r||{});if(!l.has(n)){l.set(n,fromUrl(t,r))}return l.get(n)};function fromUrl(t,r){if(!t){return}const n=isGitHubShorthand(t)?"github:"+t:correctProtocol(t);const o=parseGitUrl(n);if(!o){return o}const i=a.byShortcut[o.protocol];const l=a.byDomain[o.hostname.startsWith("www.")?o.hostname.slice(4):o.hostname];const u=i||l;if(!u){return}const d=a[i||l];let h=null;if(c[o.protocol]&&(o.username||o.password)){h=`${o.username}${o.password?":"+o.password:""}`}let p=null;let m=null;let b=null;let g=null;try{if(i){let t=o.pathname.startsWith("/")?o.pathname.slice(1):o.pathname;const r=t.indexOf("@");if(r>-1){t=t.slice(r+1)}const n=t.lastIndexOf("/");if(n>-1){m=decodeURIComponent(t.slice(0,n));if(!m){m=null}b=decodeURIComponent(t.slice(n+1))}else{b=decodeURIComponent(t)}if(b.endsWith(".git")){b=b.slice(0,-4)}if(o.hash){p=decodeURIComponent(o.hash.slice(1))}g="shortcut"}else{if(!d.protocols.includes(o.protocol)){return}const t=d.extract(o);if(!t){return}m=t.user&&decodeURIComponent(t.user);b=decodeURIComponent(t.project);p=decodeURIComponent(t.committish);g=protocolToRepresentation(o.protocol)}}catch(t){if(t instanceof URIError){return}else{throw t}}return new s(u,m,h,b,p,g,r)}const correctProtocol=t=>{const r=t.indexOf(":");const n=t.slice(0,r+1);if(d.includes(n)){return t}const o=t.indexOf("@");if(o>-1){if(o>r){return`git+ssh://${t}`}else{return t}}const a=t.indexOf("//");if(a===r+1){return t}return t.slice(0,r+1)+"//"+t.slice(r+1)};const isGitHubShorthand=t=>{const r=t.indexOf("#");const n=t.indexOf("/");const o=t.indexOf("/",n+1);const a=t.indexOf(":");const s=/\s/.exec(t);const i=t.indexOf("@");const l=!s||r>-1&&s.index>r;const u=i===-1||r>-1&&i>r;const c=a===-1||r>-1&&a>r;const d=o===-1||r>-1&&o>r;const h=n>0;const p=r>-1?t[r-1]!=="/":!t.endsWith("/");const m=!t.startsWith(".");return l&&h&&p&&m&&u&&c&&d};const correctUrl=t=>{const r=t.indexOf("@");const n=t.lastIndexOf("#");let o=t.indexOf(":");let a=t.lastIndexOf(":",n>-1?n:Infinity);let s;if(a>r){s=t.slice(0,a)+"/"+t.slice(a+1);o=s.indexOf(":");a=s.lastIndexOf(":")}if(o===-1&&t.indexOf("//")===-1){s=`git+ssh://${s}`}return s};const parseGitUrl=t=>{let r;try{r=new o.URL(t)}catch(t){}if(r){return r}const n=correctUrl(t);try{r=new o.URL(n)}catch(t){}return r}},7492:function(t,r,n){var o=this&&this.__awaiter||function(t,r,n,o){function adopt(t){return t instanceof n?t:new n((function(r){r(t)}))}return new(n||(n=Promise))((function(n,a){function fulfilled(t){try{step(o.next(t))}catch(t){a(t)}}function rejected(t){try{step(o["throw"](t))}catch(t){a(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((o=o.apply(t,r||[])).next())}))};var a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});const s=a(n(1808));const i=a(n(4404));const l=a(n(7310));const u=a(n(8237));const c=a(n(1040));const d=n(9690);const h=(0,u.default)("http-proxy-agent");function isHTTPS(t){return typeof t==="string"?/^https:?$/i.test(t):false}class HttpProxyAgent extends d.Agent{constructor(t){let r;if(typeof t==="string"){r=l.default.parse(t)}else{r=t}if(!r){throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!")}h("Creating new HttpProxyAgent instance: %o",r);super(r);const n=Object.assign({},r);this.secureProxy=r.secureProxy||isHTTPS(n.protocol);n.host=n.hostname||n.host;if(typeof n.port==="string"){n.port=parseInt(n.port,10)}if(!n.port&&n.host){n.port=this.secureProxy?443:80}if(n.host&&n.path){delete n.path;delete n.pathname}this.proxy=n}callback(t,r){return o(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:o}=this;const a=l.default.parse(t.path);if(!a.protocol){a.protocol="http:"}if(!a.hostname){a.hostname=r.hostname||r.host||null}if(a.port==null&&typeof r.port){a.port=String(r.port)}if(a.port==="80"){a.port=""}t.path=l.default.format(a);if(n.auth){t.setHeader("Proxy-Authorization",`Basic ${Buffer.from(n.auth).toString("base64")}`)}let u;if(o){h("Creating `tls.Socket`: %o",n);u=i.default.connect(n)}else{h("Creating `net.Socket`: %o",n);u=s.default.connect(n)}if(t._header){let r;let n;h("Regenerating stored HTTP header string for request");t._header=null;t._implicitHeader();if(t.output&&t.output.length>0){h("Patching connection write() output buffer with updated header");r=t.output[0];n=r.indexOf("\r\n\r\n")+4;t.output[0]=t._header+r.substring(n);h("Output buffer: %o",t.output)}else if(t.outputData&&t.outputData.length>0){h("Patching connection write() output buffer with updated header");r=t.outputData[0].data;n=r.indexOf("\r\n\r\n")+4;t.outputData[0].data=t._header+r.substring(n);h("Output buffer: %o",t.outputData[0].data)}}yield(0,c.default)(u,"connect");return u}))}}r["default"]=HttpProxyAgent},3764:function(t,r,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};const a=o(n(7492));function createHttpProxyAgent(t){return new a.default(t)}(function(t){t.HttpProxyAgent=a.default;t.prototype=a.default.prototype})(createHttpProxyAgent||(createHttpProxyAgent={}));t.exports=createHttpProxyAgent},5098:function(t,r,n){var o=this&&this.__awaiter||function(t,r,n,o){function adopt(t){return t instanceof n?t:new n((function(r){r(t)}))}return new(n||(n=Promise))((function(n,a){function fulfilled(t){try{step(o.next(t))}catch(t){a(t)}}function rejected(t){try{step(o["throw"](t))}catch(t){a(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((o=o.apply(t,r||[])).next())}))};var a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});const s=a(n(1808));const i=a(n(4404));const l=a(n(7310));const u=a(n(9491));const c=a(n(8237));const d=n(9690);const h=a(n(595));const p=c.default("https-proxy-agent:agent");class HttpsProxyAgent extends d.Agent{constructor(t){let r;if(typeof t==="string"){r=l.default.parse(t)}else{r=t}if(!r){throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!")}p("creating new HttpsProxyAgent instance: %o",r);super(r);const n=Object.assign({},r);this.secureProxy=r.secureProxy||isHTTPS(n.protocol);n.host=n.hostname||n.host;if(typeof n.port==="string"){n.port=parseInt(n.port,10)}if(!n.port&&n.host){n.port=this.secureProxy?443:80}if(this.secureProxy&&!("ALPNProtocols"in n)){n.ALPNProtocols=["http 1.1"]}if(n.host&&n.path){delete n.path;delete n.pathname}this.proxy=n}callback(t,r){return o(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:o}=this;let a;if(o){p("Creating `tls.Socket`: %o",n);a=i.default.connect(n)}else{p("Creating `net.Socket`: %o",n);a=s.default.connect(n)}const l=Object.assign({},n.headers);const c=`${r.host}:${r.port}`;let d=`CONNECT ${c} HTTP/1.1\r\n`;if(n.auth){l["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`}let{host:m,port:b,secureEndpoint:g}=r;if(!isDefaultPort(b,g)){m+=`:${b}`}l.Host=m;l.Connection="close";for(const t of Object.keys(l)){d+=`${t}: ${l[t]}\r\n`}const y=h.default(a);a.write(`${d}\r\n`);const{statusCode:S,buffered:R}=yield y;if(S===200){t.once("socket",resume);if(r.secureEndpoint){const t=r.servername||r.host;if(!t){throw new Error('Could not determine "servername"')}p("Upgrading socket connection to TLS");return i.default.connect(Object.assign(Object.assign({},omit(r,"host","hostname","path","port")),{socket:a,servername:t}))}return a}a.destroy();const _=new s.default.Socket;_.readable=true;t.once("socket",(t=>{p("replaying proxy buffer for failed request");u.default(t.listenerCount("data")>0);t.push(R);t.push(null)}));return _}))}}r["default"]=HttpsProxyAgent;function resume(t){t.resume()}function isDefaultPort(t,r){return Boolean(!r&&t===80||r&&t===443)}function isHTTPS(t){return typeof t==="string"?/^https:?$/i.test(t):false}function omit(t,...r){const n={};let o;for(o in t){if(!r.includes(o)){n[o]=t[o]}}return n}},7219:function(t,r,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};const a=o(n(5098));function createHttpsProxyAgent(t){return new a.default(t)}(function(t){t.HttpsProxyAgent=a.default;t.prototype=a.default.prototype})(createHttpsProxyAgent||(createHttpsProxyAgent={}));t.exports=createHttpsProxyAgent},595:function(t,r,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});const a=o(n(8237));const s=a.default("https-proxy-agent:parse-proxy-response");function parseProxyResponse(t){return new Promise(((r,n)=>{let o=0;const a=[];function read(){const r=t.read();if(r)ondata(r);else t.once("readable",read)}function cleanup(){t.removeListener("end",onend);t.removeListener("error",onerror);t.removeListener("close",onclose);t.removeListener("readable",read)}function onclose(t){s("onclose had error %o",t)}function onend(){s("onend")}function onerror(t){cleanup();s("onerror %o",t);n(t)}function ondata(t){a.push(t);o+=t.length;const n=Buffer.concat(a,o);const i=n.indexOf("\r\n\r\n");if(i===-1){s("have not received end of HTTP headers yet...");read();return}const l=n.toString("ascii",0,n.indexOf("\r\n"));const u=+l.split(" ")[1];s("got proxy server response: %o",l);r({statusCode:u,buffered:n})}t.on("error",onerror);t.on("close",onclose);t.on("end",onend);read()}))}r["default"]=parseProxyResponse},8885:(t,r)=>{r.parse=r.decode=decode;r.stringify=r.encode=encode;r.safe=safe;r.unsafe=unsafe;var n=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(t,r){var o=[];var a="";if(typeof r==="string"){r={section:r,whitespace:false}}else{r=r||{};r.whitespace=r.whitespace===true}var s=r.whitespace?" = ":"=";Object.keys(t).forEach((function(r,i,l){var u=t[r];if(u&&Array.isArray(u)){u.forEach((function(t){a+=safe(r+"[]")+s+safe(t)+"\n"}))}else if(u&&typeof u==="object")o.push(r);else a+=safe(r)+s+safe(u)+n}));if(r.section&&a.length)a="["+safe(r.section)+"]"+n+a;o.forEach((function(o,s,i){var l=dotSplit(o).join("\\.");var u=(r.section?r.section+".":"")+l;var c=encode(t[o],{section:u,whitespace:r.whitespace});if(a.length&&c.length)a+=n;a+=c}));return a}function dotSplit(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(t){return t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(t){var r={};var n=r;var o=null;var a=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var s=t.split(/[\r\n]+/g);s.forEach((function(t,s,i){if(!t||t.match(/^\s*[;#]/))return;var l=t.match(a);if(!l)return;if(l[1]!==undefined){o=unsafe(l[1]);if(o==="__proto__"){n={};return}n=r[o]=r[o]||{};return}var u=unsafe(l[2]);if(u==="__proto__")return;var c=l[3]?unsafe(l[4]):true;switch(c){case"true":case"false":case"null":c=JSON.parse(c)}if(u.length>2&&u.slice(-2)==="[]"){u=u.substring(0,u.length-2);if(u==="__proto__")return;if(!n[u])n[u]=[];else if(!Array.isArray(n[u]))n[u]=[n[u]]}if(Array.isArray(n[u]))n[u].push(c);else n[u]=c}));Object.keys(r).filter((function(t,n,o){if(!r[t]||typeof r[t]!=="object"||Array.isArray(r[t]))return false;var a=dotSplit(t);var s=r;var i=a.pop();var l=i.replace(/\\\./g,".");a.forEach((function(t,r,n){if(t==="__proto__")return;if(!s[t]||typeof s[t]!=="object")s[t]={};s=s[t]}));if(s===r&&l===i)return false;s[l]=r[t];return true})).forEach((function(t,n,o){delete r[t]}));return r}function isQuoted(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function safe(t){return typeof t!=="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&isQuoted(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(t,r){t=(t||"").trim();if(isQuoted(t)){if(t.charAt(0)==="'")t=t.substr(1,t.length-2);try{t=JSON.parse(t)}catch(t){}}else{var n=false;var o="";for(var a=0,s=t.length;a<s;a++){var i=t.charAt(a);if(n){if("\\;#".indexOf(i)!==-1)o+=i;else o+="\\"+i;n=false}else if(";#".indexOf(i)!==-1)break;else if(i==="\\")n=true;else o+=i}if(n)o+="\\";return o.trim()}return t}},7129:(t,r,n)=>{const o=n(665);const a=Symbol("max");const s=Symbol("length");const i=Symbol("lengthCalculator");const l=Symbol("allowStale");const u=Symbol("maxAge");const c=Symbol("dispose");const d=Symbol("noDisposeOnSet");const h=Symbol("lruList");const p=Symbol("cache");const m=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(t){if(typeof t==="number")t={max:t};if(!t)t={};if(t.max&&(typeof t.max!=="number"||t.max<0))throw new TypeError("max must be a non-negative number");const r=this[a]=t.max||Infinity;const n=t.length||naiveLength;this[i]=typeof n!=="function"?naiveLength:n;this[l]=t.stale||false;if(t.maxAge&&typeof t.maxAge!=="number")throw new TypeError("maxAge must be a number");this[u]=t.maxAge||0;this[c]=t.dispose;this[d]=t.noDisposeOnSet||false;this[m]=t.updateAgeOnGet||false;this.reset()}set max(t){if(typeof t!=="number"||t<0)throw new TypeError("max must be a non-negative number");this[a]=t||Infinity;trim(this)}get max(){return this[a]}set allowStale(t){this[l]=!!t}get allowStale(){return this[l]}set maxAge(t){if(typeof t!=="number")throw new TypeError("maxAge must be a non-negative number");this[u]=t;trim(this)}get maxAge(){return this[u]}set lengthCalculator(t){if(typeof t!=="function")t=naiveLength;if(t!==this[i]){this[i]=t;this[s]=0;this[h].forEach((t=>{t.length=this[i](t.value,t.key);this[s]+=t.length}))}trim(this)}get lengthCalculator(){return this[i]}get length(){return this[s]}get itemCount(){return this[h].length}rforEach(t,r){r=r||this;for(let n=this[h].tail;n!==null;){const o=n.prev;forEachStep(this,t,n,r);n=o}}forEach(t,r){r=r||this;for(let n=this[h].head;n!==null;){const o=n.next;forEachStep(this,t,n,r);n=o}}keys(){return this[h].toArray().map((t=>t.key))}values(){return this[h].toArray().map((t=>t.value))}reset(){if(this[c]&&this[h]&&this[h].length){this[h].forEach((t=>this[c](t.key,t.value)))}this[p]=new Map;this[h]=new o;this[s]=0}dump(){return this[h].map((t=>isStale(this,t)?false:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[h]}set(t,r,n){n=n||this[u];if(n&&typeof n!=="number")throw new TypeError("maxAge must be a number");const o=n?Date.now():0;const l=this[i](r,t);if(this[p].has(t)){if(l>this[a]){del(this,this[p].get(t));return false}const i=this[p].get(t);const u=i.value;if(this[c]){if(!this[d])this[c](t,u.value)}u.now=o;u.maxAge=n;u.value=r;this[s]+=l-u.length;u.length=l;this.get(t);trim(this);return true}const m=new Entry(t,r,l,o,n);if(m.length>this[a]){if(this[c])this[c](t,r);return false}this[s]+=m.length;this[h].unshift(m);this[p].set(t,this[h].head);trim(this);return true}has(t){if(!this[p].has(t))return false;const r=this[p].get(t).value;return!isStale(this,r)}get(t){return get(this,t,true)}peek(t){return get(this,t,false)}pop(){const t=this[h].tail;if(!t)return null;del(this,t);return t.value}del(t){del(this,this[p].get(t))}load(t){this.reset();const r=Date.now();for(let n=t.length-1;n>=0;n--){const o=t[n];const a=o.e||0;if(a===0)this.set(o.k,o.v);else{const t=a-r;if(t>0){this.set(o.k,o.v,t)}}}}prune(){this[p].forEach(((t,r)=>get(this,r,false)))}}const get=(t,r,n)=>{const o=t[p].get(r);if(o){const r=o.value;if(isStale(t,r)){del(t,o);if(!t[l])return undefined}else{if(n){if(t[m])o.value.now=Date.now();t[h].unshiftNode(o)}}return r.value}};const isStale=(t,r)=>{if(!r||!r.maxAge&&!t[u])return false;const n=Date.now()-r.now;return r.maxAge?n>r.maxAge:t[u]&&n>t[u]};const trim=t=>{if(t[s]>t[a]){for(let r=t[h].tail;t[s]>t[a]&&r!==null;){const n=r.prev;del(t,r);r=n}}};const del=(t,r)=>{if(r){const n=r.value;if(t[c])t[c](n.key,n.value);t[s]-=n.length;t[p].delete(n.key);t[h].removeNode(r)}};class Entry{constructor(t,r,n,o,a){this.key=t;this.value=r;this.length=n;this.now=o;this.maxAge=a||0}}const forEachStep=(t,r,n,o)=>{let a=n.value;if(isStale(t,a)){del(t,n);if(!t[l])a=undefined}if(a)r.call(o,a.value,a.key,t)};t.exports=LRUCache},5871:t=>{t.exports=function(t,r){if(!r)r={};var n={bools:{},strings:{},unknownFn:null};if(typeof r["unknown"]==="function"){n.unknownFn=r["unknown"]}if(typeof r["boolean"]==="boolean"&&r["boolean"]){n.allBools=true}else{[].concat(r["boolean"]).filter(Boolean).forEach((function(t){n.bools[t]=true}))}var o={};Object.keys(r.alias||{}).forEach((function(t){o[t]=[].concat(r.alias[t]);o[t].forEach((function(r){o[r]=[t].concat(o[t].filter((function(t){return r!==t})))}))}));[].concat(r.string).filter(Boolean).forEach((function(t){n.strings[t]=true;if(o[t]){n.strings[o[t]]=true}}));var a=r["default"]||{};var s={_:[]};Object.keys(n.bools).forEach((function(t){setArg(t,a[t]===undefined?false:a[t])}));var i=[];if(t.indexOf("--")!==-1){i=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}function argDefined(t,r){return n.allBools&&/^--[^=]+$/.test(r)||n.strings[t]||n.bools[t]||o[t]}function setArg(t,r,a){if(a&&n.unknownFn&&!argDefined(t,a)){if(n.unknownFn(a)===false)return}var i=!n.strings[t]&&isNumber(r)?Number(r):r;setKey(s,t.split("."),i);(o[t]||[]).forEach((function(t){setKey(s,t.split("."),i)}))}function setKey(t,r,o){var a=t;for(var s=0;s<r.length-1;s++){var i=r[s];if(i==="__proto__")return;if(a[i]===undefined)a[i]={};if(a[i]===Object.prototype||a[i]===Number.prototype||a[i]===String.prototype)a[i]={};if(a[i]===Array.prototype)a[i]=[];a=a[i]}var i=r[r.length-1];if(i==="__proto__")return;if(a===Object.prototype||a===Number.prototype||a===String.prototype)a={};if(a===Array.prototype)a=[];if(a[i]===undefined||n.bools[i]||typeof a[i]==="boolean"){a[i]=o}else if(Array.isArray(a[i])){a[i].push(o)}else{a[i]=[a[i],o]}}function aliasIsBoolean(t){return o[t].some((function(t){return n.bools[t]}))}for(var l=0;l<t.length;l++){var u=t[l];if(/^--.+=/.test(u)){var c=u.match(/^--([^=]+)=([\s\S]*)$/);var d=c[1];var h=c[2];if(n.bools[d]){h=h!=="false"}setArg(d,h,u)}else if(/^--no-.+/.test(u)){var d=u.match(/^--no-(.+)/)[1];setArg(d,false,u)}else if(/^--.+/.test(u)){var d=u.match(/^--(.+)/)[1];var p=t[l+1];if(p!==undefined&&!/^-/.test(p)&&!n.bools[d]&&!n.allBools&&(o[d]?!aliasIsBoolean(d):true)){setArg(d,p,u);l++}else if(/^(true|false)$/.test(p)){setArg(d,p==="true",u);l++}else{setArg(d,n.strings[d]?"":true,u)}}else if(/^-[^-]+/.test(u)){var m=u.slice(1,-1).split("");var b=false;for(var g=0;g<m.length;g++){var p=u.slice(g+2);if(p==="-"){setArg(m[g],p,u);continue}if(/[A-Za-z]/.test(m[g])&&/=/.test(p)){setArg(m[g],p.split("=")[1],u);b=true;break}if(/[A-Za-z]/.test(m[g])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(p)){setArg(m[g],p,u);b=true;break}if(m[g+1]&&m[g+1].match(/\W/)){setArg(m[g],u.slice(g+2),u);b=true;break}else{setArg(m[g],n.strings[m[g]]?"":true,u)}}var d=u.slice(-1)[0];if(!b&&d!=="-"){if(t[l+1]&&!/^(-|--)[^-]/.test(t[l+1])&&!n.bools[d]&&(o[d]?!aliasIsBoolean(d):true)){setArg(d,t[l+1],u);l++}else if(t[l+1]&&/^(true|false)$/.test(t[l+1])){setArg(d,t[l+1]==="true",u);l++}else{setArg(d,n.strings[d]?"":true,u)}}}else{if(!n.unknownFn||n.unknownFn(u)!==false){s._.push(n.strings["_"]||!isNumber(u)?u:Number(u))}if(r.stopEarly){s._.push.apply(s._,t.slice(l+1));break}}}Object.keys(a).forEach((function(t){if(!hasKey(s,t.split("."))){setKey(s,t.split("."),a[t]);(o[t]||[]).forEach((function(r){setKey(s,r.split("."),a[t])}))}}));if(r["--"]){s["--"]=new Array;i.forEach((function(t){s["--"].push(t)}))}else{i.forEach((function(t){s._.push(t)}))}return s};function hasKey(t,r){var n=t;r.slice(0,-1).forEach((function(t){n=n[t]||{}}));var o=r[r.length-1];return o in n}function isNumber(t){if(typeof t==="number")return true;if(/^0x[0-9a-f]+$/i.test(t))return true;return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}},900:t=>{var r=1e3;var n=r*60;var o=n*60;var a=o*24;var s=a*7;var i=a*365.25;t.exports=function(t,r){r=r||{};var n=typeof t;if(n==="string"&&t.length>0){return parse(t)}else if(n==="number"&&isFinite(t)){return r.long?fmtLong(t):fmtShort(t)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function parse(t){t=String(t);if(t.length>100){return}var l=/^(-?(?:\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(!l){return}var u=parseFloat(l[1]);var c=(l[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return u*i;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*a;case"hours":case"hour":case"hrs":case"hr":case"h":return u*o;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(t){var s=Math.abs(t);if(s>=a){return Math.round(t/a)+"d"}if(s>=o){return Math.round(t/o)+"h"}if(s>=n){return Math.round(t/n)+"m"}if(s>=r){return Math.round(t/r)+"s"}return t+"ms"}function fmtLong(t){var s=Math.abs(t);if(s>=a){return plural(t,s,a,"day")}if(s>=o){return plural(t,s,o,"hour")}if(s>=n){return plural(t,s,n,"minute")}if(s>=r){return plural(t,s,r,"second")}return t+" ms"}function plural(t,r,n,o){var a=r>=n*1.5;return Math.round(t/n)+" "+o+(a?"s":"")}},7760:(t,r,n)=>{if(!globalThis.DOMException){try{const{MessageChannel:t}=n(1267),r=(new t).port1,o=new ArrayBuffer;r.postMessage(o,[o,o])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}}t.exports=globalThis.DOMException},3329:(t,r,n)=>{var o=n(7310).parse;var a={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var s=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function getProxyForUrl(t){var r=typeof t==="string"?o(t):t||{};var n=r.protocol;var s=r.host;var i=r.port;if(typeof s!=="string"||!s||typeof n!=="string"){return""}n=n.split(":",1)[0];s=s.replace(/:\d*$/,"");i=parseInt(i)||a[n]||0;if(!shouldProxy(s,i)){return""}var l=getEnv("npm_config_"+n+"_proxy")||getEnv(n+"_proxy")||getEnv("npm_config_proxy")||getEnv("all_proxy");if(l&&l.indexOf("://")===-1){l=n+"://"+l}return l}function shouldProxy(t,r){var n=(getEnv("npm_config_no_proxy")||getEnv("no_proxy")).toLowerCase();if(!n){return true}if(n==="*"){return false}return n.split(/[,\s]/).every((function(n){if(!n){return true}var o=n.match(/^(.+):(\d+)$/);var a=o?o[1]:n;var i=o?parseInt(o[2]):0;if(i&&i!==r){return true}if(!/^[.*]/.test(a)){return t!==a}if(a.charAt(0)==="*"){a=a.slice(1)}return!s.call(t,a)}))}function getEnv(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}r.j=getProxyForUrl},7353:(t,r,n)=>{var o=n(5588);var a=n(1017).join;var s=n(1705);var i="/etc";var l=process.platform==="win32";var u=l?process.env.USERPROFILE:process.env.HOME;t.exports=function(t,r,c,d){if("string"!==typeof t)throw new Error("rc(name): name *must* be string");if(!c)c=n(5871)(process.argv.slice(2));r=("string"===typeof r?o.json(r):r)||{};d=d||o.parse;var h=o.env(t+"_");var p=[r];var m=[];function addConfigFile(t){if(m.indexOf(t)>=0)return;var r=o.file(t);if(r){p.push(d(r));m.push(t)}}if(!l)[a(i,t,"config"),a(i,t+"rc")].forEach(addConfigFile);if(u)[a(u,".config",t,"config"),a(u,".config",t),a(u,"."+t,"config"),a(u,"."+t+"rc")].forEach(addConfigFile);addConfigFile(o.find("."+t+"rc"));if(h.config)addConfigFile(h.config);if(c.config)addConfigFile(c.config);return s.apply(null,p.concat([h,c,m.length?{configs:m,config:m[m.length-1]}:undefined]))}},5588:(t,r,n)=>{var o=n(7147);var a=n(8885);var s=n(1017);var i=n(7035);var l=r.parse=function(t){if(/^\s*{/.test(t))return JSON.parse(i(t));return a.parse(t)};var u=r.file=function(){var t=[].slice.call(arguments).filter((function(t){return t!=null}));for(var r in t)if("string"!==typeof t[r])return;var n=s.join.apply(null,t);var a;try{return o.readFileSync(n,"utf-8")}catch(t){return}};var c=r.json=function(){var t=u.apply(null,arguments);return t?l(t):null};var d=r.env=function(t,r){r=r||process.env;var n={};var o=t.length;for(var a in r){if(a.toLowerCase().indexOf(t.toLowerCase())===0){var s=a.substring(o).split("__");var i;while((i=s.indexOf(""))>-1){s.splice(i,1)}var l=n;s.forEach((function _buildSubObj(t,n){if(!t||typeof l!=="object")return;if(n===s.length-1)l[t]=r[a];if(l[t]===undefined)l[t]={};l=l[t]}))}}return n};var h=r.find=function(){var t=s.join.apply(null,[].slice.call(arguments));function find(t,r){var n=s.join(t,r);try{o.statSync(n);return n}catch(n){if(s.dirname(t)!==t)return find(s.dirname(t),r)}}return find(process.cwd(),t)}},7035:t=>{var r=1;var n=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(t,r,n){return t.slice(r,n).replace(/\S/g," ")}t.exports=function(t,o){o=o||{};var a;var s;var i=false;var l=false;var u=0;var c="";var d=o.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var h=0;h<t.length;h++){a=t[h];s=t[h+1];if(!l&&a==='"'){var p=t[h-1]==="\\"&&t[h-2]!=="\\";if(!p){i=!i}}if(i){continue}if(!l&&a+s==="//"){c+=t.slice(u,h);u=h;l=r;h++}else if(l===r&&a+s==="\r\n"){h++;l=false;c+=d(t,u,h);u=h;continue}else if(l===r&&a==="\n"){l=false;c+=d(t,u,h);u=h}else if(!l&&a+s==="/*"){c+=t.slice(u,h);u=h;l=n;h++;continue}else if(l===n&&a+s==="*/"){h++;l=false;c+=d(t,u,h+1);u=h+1;continue}}return c+(l?d(t.substr(u)):t.substr(u))}},8506:t=>{function decodeBase64(t){return Buffer.from(t,"base64").toString("utf8")}function encodeBase64(t){return Buffer.from(t,"utf8").toString("base64")}t.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},2968:(t,r,n)=>{var o=n(7310);var a=n(8506);var s=a.decodeBase64;var i=a.encodeBase64;var l=":_authToken";var u=":_auth";var c=":username";var d=":_password";t.exports=function(){var t;var r;if(arguments.length>=2){t=arguments[0];r=arguments[1]}else if(typeof arguments[0]==="string"){t=arguments[0]}else{r=arguments[0]}r=r||{};r.npmrc=r.npmrc||n(7353)("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG});t=t||r.npmrc.registry;return getRegistryAuthInfo(t,r)||getLegacyAuthInfo(r.npmrc)};function getRegistryAuthInfo(t,r){var n=o.parse(t,false,true);var a;while(a!=="/"&&n.pathname!==a){a=n.pathname||"/";var s="//"+n.host+a.replace(/\/$/,"");var i=getAuthInfoForUrl(s,r.npmrc);if(i){return i}if(!r.recursive){return/\/$/.test(t)?undefined:getRegistryAuthInfo(o.resolve(t,"."),r)}n.pathname=o.resolve(normalizePath(a),"..")||"/"}return undefined}function getLegacyAuthInfo(t){if(!t._auth){return undefined}var r=replaceEnvironmentVariable(t._auth);return{token:r,type:"Basic"}}function normalizePath(t){return t[t.length-1]==="/"?t:t+"/"}function getAuthInfoForUrl(t,r){var n=getBearerToken(r[t+l]||r[t+"/"+l]);if(n){return n}var o=r[t+c]||r[t+"/"+c];var a=r[t+d]||r[t+"/"+d];var s=getTokenForUsernameAndPassword(o,a);if(s){return s}var i=getLegacyAuthToken(r[t+u]||r[t+"/"+u]);if(i){return i}return undefined}function replaceEnvironmentVariable(t){return t.replace(/^\$\{?([^}]*)\}?$/,(function(t,r){return process.env[r]}))}function getBearerToken(t){if(!t){return undefined}var r=replaceEnvironmentVariable(t);return{token:r,type:"Bearer"}}function getTokenForUsernameAndPassword(t,r){if(!t||!r){return undefined}var n=s(replaceEnvironmentVariable(r));var o=i(t+":"+n);return{token:o,type:"Basic",password:n,username:t}}function getLegacyAuthToken(t){if(!t){return undefined}var r=replaceEnvironmentVariable(t);return{token:r,type:"Basic"}}},5418:(t,r,n)=>{t.exports=function(t,r){var o=r||n(7353)("npm",{registry:"https://registry.npmjs.org/"});var a=o[t+":registry"]||o.registry;return a.slice(-1)==="/"?a:a+"/"}},1532:(t,r,n)=>{const o=Symbol("SemVer ANY");class Comparator{static get ANY(){return o}constructor(t,r){r=a(r);if(t instanceof Comparator){if(t.loose===!!r.loose){return t}else{t=t.value}}u("comparator",t,r);this.options=r;this.loose=!!r.loose;this.parse(t);if(this.semver===o){this.value=""}else{this.value=this.operator+this.semver.version}u("comp",this)}parse(t){const r=this.options.loose?s[i.COMPARATORLOOSE]:s[i.COMPARATOR];const n=t.match(r);if(!n){throw new TypeError(`Invalid comparator: ${t}`)}this.operator=n[1]!==undefined?n[1]:"";if(this.operator==="="){this.operator=""}if(!n[2]){this.semver=o}else{this.semver=new c(n[2],this.options.loose)}}toString(){return this.value}test(t){u("Comparator.test",t,this.options.loose);if(this.semver===o||t===o){return true}if(typeof t==="string"){try{t=new c(t,this.options)}catch(t){return false}}return l(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new d(t.value,r).test(this.value)}else if(t.operator===""){if(t.value===""){return true}return new d(this.value,r).test(t.semver)}const n=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">");const o=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<");const a=this.semver.version===t.semver.version;const s=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<=");const i=l(this.semver,"<",t.semver,r)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<");const u=l(this.semver,">",t.semver,r)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return n||o||a&&s||i||u}}t.exports=Comparator;const a=n(785);const{re:s,t:i}=n(9523);const l=n(4359);const u=n(427);const c=n(8088);const d=n(9828)},9828:(t,r,n)=>{class Range{constructor(t,r){r=s(r);if(t instanceof Range){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{return new Range(t.raw,r)}}if(t instanceof i){this.raw=t.value;this.set=[[t]];this.format();return this}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=t;this.set=t.split(/\s*\|\|\s*/).map((t=>this.parseRange(t.trim()))).filter((t=>t.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${t}`)}if(this.set.length>1){const t=this.set[0];this.set=this.set.filter((t=>!isNullSet(t[0])));if(this.set.length===0)this.set=[t];else if(this.set.length>1){for(const t of this.set){if(t.length===1&&isAny(t[0])){this.set=[t];break}}}}this.format()}format(){this.range=this.set.map((t=>t.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(t){t=t.trim();const r=Object.keys(this.options).join(",");const n=`parseRange:${r}:${t}`;const o=a.get(n);if(o)return o;const s=this.options.loose;const u=s?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];t=t.replace(u,hyphenReplace(this.options.includePrerelease));l("hyphen replace",t);t=t.replace(c[d.COMPARATORTRIM],h);l("comparator trim",t,c[d.COMPARATORTRIM]);t=t.replace(c[d.TILDETRIM],p);t=t.replace(c[d.CARETTRIM],m);t=t.split(/\s+/).join(" ");const b=s?c[d.COMPARATORLOOSE]:c[d.COMPARATOR];const g=t.split(" ").map((t=>parseComparator(t,this.options))).join(" ").split(/\s+/).map((t=>replaceGTE0(t,this.options))).filter(this.options.loose?t=>!!t.match(b):()=>true).map((t=>new i(t,this.options)));const y=g.length;const S=new Map;for(const t of g){if(isNullSet(t))return[t];S.set(t.value,t)}if(S.size>1&&S.has(""))S.delete("");const R=[...S.values()];a.set(n,R);return R}intersects(t,r){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((n=>isSatisfiable(n,r)&&t.set.some((t=>isSatisfiable(t,r)&&n.every((n=>t.every((t=>n.intersects(t,r)))))))))}test(t){if(!t){return false}if(typeof t==="string"){try{t=new u(t,this.options)}catch(t){return false}}for(let r=0;r<this.set.length;r++){if(testSet(this.set[r],t,this.options)){return true}}return false}}t.exports=Range;const o=n(7129);const a=new o({max:1e3});const s=n(785);const i=n(1532);const l=n(427);const u=n(8088);const{re:c,t:d,comparatorTrimReplace:h,tildeTrimReplace:p,caretTrimReplace:m}=n(9523);const isNullSet=t=>t.value==="<0.0.0-0";const isAny=t=>t.value==="";const isSatisfiable=(t,r)=>{let n=true;const o=t.slice();let a=o.pop();while(n&&o.length){n=o.every((t=>a.intersects(t,r)));a=o.pop()}return n};const parseComparator=(t,r)=>{l("comp",t,r);t=replaceCarets(t,r);l("caret",t);t=replaceTildes(t,r);l("tildes",t);t=replaceXRanges(t,r);l("xrange",t);t=replaceStars(t,r);l("stars",t);return t};const isX=t=>!t||t.toLowerCase()==="x"||t==="*";const replaceTildes=(t,r)=>t.trim().split(/\s+/).map((t=>replaceTilde(t,r))).join(" ");const replaceTilde=(t,r)=>{const n=r.loose?c[d.TILDELOOSE]:c[d.TILDE];return t.replace(n,((r,n,o,a,s)=>{l("tilde",t,r,n,o,a,s);let i;if(isX(n)){i=""}else if(isX(o)){i=`>=${n}.0.0 <${+n+1}.0.0-0`}else if(isX(a)){i=`>=${n}.${o}.0 <${n}.${+o+1}.0-0`}else if(s){l("replaceTilde pr",s);i=`>=${n}.${o}.${a}-${s} <${n}.${+o+1}.0-0`}else{i=`>=${n}.${o}.${a} <${n}.${+o+1}.0-0`}l("tilde return",i);return i}))};const replaceCarets=(t,r)=>t.trim().split(/\s+/).map((t=>replaceCaret(t,r))).join(" ");const replaceCaret=(t,r)=>{l("caret",t,r);const n=r.loose?c[d.CARETLOOSE]:c[d.CARET];const o=r.includePrerelease?"-0":"";return t.replace(n,((r,n,a,s,i)=>{l("caret",t,r,n,a,s,i);let u;if(isX(n)){u=""}else if(isX(a)){u=`>=${n}.0.0${o} <${+n+1}.0.0-0`}else if(isX(s)){if(n==="0"){u=`>=${n}.${a}.0${o} <${n}.${+a+1}.0-0`}else{u=`>=${n}.${a}.0${o} <${+n+1}.0.0-0`}}else if(i){l("replaceCaret pr",i);if(n==="0"){if(a==="0"){u=`>=${n}.${a}.${s}-${i} <${n}.${a}.${+s+1}-0`}else{u=`>=${n}.${a}.${s}-${i} <${n}.${+a+1}.0-0`}}else{u=`>=${n}.${a}.${s}-${i} <${+n+1}.0.0-0`}}else{l("no pr");if(n==="0"){if(a==="0"){u=`>=${n}.${a}.${s}${o} <${n}.${a}.${+s+1}-0`}else{u=`>=${n}.${a}.${s}${o} <${n}.${+a+1}.0-0`}}else{u=`>=${n}.${a}.${s} <${+n+1}.0.0-0`}}l("caret return",u);return u}))};const replaceXRanges=(t,r)=>{l("replaceXRanges",t,r);return t.split(/\s+/).map((t=>replaceXRange(t,r))).join(" ")};const replaceXRange=(t,r)=>{t=t.trim();const n=r.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return t.replace(n,((n,o,a,s,i,u)=>{l("xRange",t,n,o,a,s,i,u);const c=isX(a);const d=c||isX(s);const h=d||isX(i);const p=h;if(o==="="&&p){o=""}u=r.includePrerelease?"-0":"";if(c){if(o===">"||o==="<"){n="<0.0.0-0"}else{n="*"}}else if(o&&p){if(d){s=0}i=0;if(o===">"){o=">=";if(d){a=+a+1;s=0;i=0}else{s=+s+1;i=0}}else if(o==="<="){o="<";if(d){a=+a+1}else{s=+s+1}}if(o==="<")u="-0";n=`${o+a}.${s}.${i}${u}`}else if(d){n=`>=${a}.0.0${u} <${+a+1}.0.0-0`}else if(h){n=`>=${a}.${s}.0${u} <${a}.${+s+1}.0-0`}l("xRange return",n);return n}))};const replaceStars=(t,r)=>{l("replaceStars",t,r);return t.trim().replace(c[d.STAR],"")};const replaceGTE0=(t,r)=>{l("replaceGTE0",t,r);return t.trim().replace(c[r.includePrerelease?d.GTE0PRE:d.GTE0],"")};const hyphenReplace=t=>(r,n,o,a,s,i,l,u,c,d,h,p,m)=>{if(isX(o)){n=""}else if(isX(a)){n=`>=${o}.0.0${t?"-0":""}`}else if(isX(s)){n=`>=${o}.${a}.0${t?"-0":""}`}else if(i){n=`>=${n}`}else{n=`>=${n}${t?"-0":""}`}if(isX(c)){u=""}else if(isX(d)){u=`<${+c+1}.0.0-0`}else if(isX(h)){u=`<${c}.${+d+1}.0-0`}else if(p){u=`<=${c}.${d}.${h}-${p}`}else if(t){u=`<${c}.${d}.${+h+1}-0`}else{u=`<=${u}`}return`${n} ${u}`.trim()};const testSet=(t,r,n)=>{for(let n=0;n<t.length;n++){if(!t[n].test(r)){return false}}if(r.prerelease.length&&!n.includePrerelease){for(let n=0;n<t.length;n++){l(t[n].semver);if(t[n].semver===i.ANY){continue}if(t[n].semver.prerelease.length>0){const o=t[n].semver;if(o.major===r.major&&o.minor===r.minor&&o.patch===r.patch){return true}}}return false}return true}},8088:(t,r,n)=>{const o=n(427);const{MAX_LENGTH:a,MAX_SAFE_INTEGER:s}=n(2293);const{re:i,t:l}=n(9523);const u=n(785);const{compareIdentifiers:c}=n(2463);class SemVer{constructor(t,r){r=u(r);if(t instanceof SemVer){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError(`Invalid Version: ${t}`)}if(t.length>a){throw new TypeError(`version is longer than ${a} characters`)}o("SemVer",t,r);this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?i[l.LOOSE]:i[l.FULL]);if(!n){throw new TypeError(`Invalid Version: ${t}`)}this.raw=t;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>s||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>s||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>s||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const r=+t;if(r>=0&&r<s){return r}}return t}))}this.build=n[5]?n[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(t){o("SemVer.compare",this.version,this.options,t);if(!(t instanceof SemVer)){if(typeof t==="string"&&t===this.version){return 0}t=new SemVer(t,this.options)}if(t.version===this.version){return 0}return this.compareMain(t)||this.comparePre(t)}compareMain(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}return c(this.major,t.major)||c(this.minor,t.minor)||c(this.patch,t.patch)}comparePre(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}if(this.prerelease.length&&!t.prerelease.length){return-1}else if(!this.prerelease.length&&t.prerelease.length){return 1}else if(!this.prerelease.length&&!t.prerelease.length){return 0}let r=0;do{const n=this.prerelease[r];const a=t.prerelease[r];o("prerelease compare",r,n,a);if(n===undefined&&a===undefined){return 0}else if(a===undefined){return 1}else if(n===undefined){return-1}else if(n===a){continue}else{return c(n,a)}}while(++r)}compareBuild(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}let r=0;do{const n=this.build[r];const a=t.build[r];o("prerelease compare",r,n,a);if(n===undefined&&a===undefined){return 0}else if(a===undefined){return 1}else if(n===undefined){return-1}else if(n===a){continue}else{return c(n,a)}}while(++r)}inc(t,r){switch(t){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r);this.inc("pre",r);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",r)}this.inc("pre",r);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":if(this.prerelease.length===0){this.prerelease=[0]}else{let t=this.prerelease.length;while(--t>=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1){this.prerelease.push(0)}}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1])){this.prerelease=[r,0]}}else{this.prerelease=[r,0]}}break;default:throw new Error(`invalid increment argument: ${t}`)}this.format();this.raw=this.version;return this}}t.exports=SemVer},8848:(t,r,n)=>{const o=n(5925);const clean=(t,r)=>{const n=o(t.trim().replace(/^[=v]+/,""),r);return n?n.version:null};t.exports=clean},4359:(t,r,n)=>{const o=n(1898);const a=n(6017);const s=n(4123);const i=n(5522);const l=n(194);const u=n(7520);const cmp=(t,r,n,c)=>{switch(r){case"===":if(typeof t==="object")t=t.version;if(typeof n==="object")n=n.version;return t===n;case"!==":if(typeof t==="object")t=t.version;if(typeof n==="object")n=n.version;return t!==n;case"":case"=":case"==":return o(t,n,c);case"!=":return a(t,n,c);case">":return s(t,n,c);case">=":return i(t,n,c);case"<":return l(t,n,c);case"<=":return u(t,n,c);default:throw new TypeError(`Invalid operator: ${r}`)}};t.exports=cmp},3466:(t,r,n)=>{const o=n(8088);const a=n(5925);const{re:s,t:i}=n(9523);const coerce=(t,r)=>{if(t instanceof o){return t}if(typeof t==="number"){t=String(t)}if(typeof t!=="string"){return null}r=r||{};let n=null;if(!r.rtl){n=t.match(s[i.COERCE])}else{let r;while((r=s[i.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length)){if(!n||r.index+r[0].length!==n.index+n[0].length){n=r}s[i.COERCERTL].lastIndex=r.index+r[1].length+r[2].length}s[i.COERCERTL].lastIndex=-1}if(n===null)return null;return a(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,r)};t.exports=coerce},2156:(t,r,n)=>{const o=n(8088);const compareBuild=(t,r,n)=>{const a=new o(t,n);const s=new o(r,n);return a.compare(s)||a.compareBuild(s)};t.exports=compareBuild},2804:(t,r,n)=>{const o=n(4309);const compareLoose=(t,r)=>o(t,r,true);t.exports=compareLoose},4309:(t,r,n)=>{const o=n(8088);const compare=(t,r,n)=>new o(t,n).compare(new o(r,n));t.exports=compare},4297:(t,r,n)=>{const o=n(5925);const a=n(1898);const diff=(t,r)=>{if(a(t,r)){return null}else{const n=o(t);const a=o(r);const s=n.prerelease.length||a.prerelease.length;const i=s?"pre":"";const l=s?"prerelease":"";for(const t in n){if(t==="major"||t==="minor"||t==="patch"){if(n[t]!==a[t]){return i+t}}}return l}};t.exports=diff},1898:(t,r,n)=>{const o=n(4309);const eq=(t,r,n)=>o(t,r,n)===0;t.exports=eq},4123:(t,r,n)=>{const o=n(4309);const gt=(t,r,n)=>o(t,r,n)>0;t.exports=gt},5522:(t,r,n)=>{const o=n(4309);const gte=(t,r,n)=>o(t,r,n)>=0;t.exports=gte},929:(t,r,n)=>{const o=n(8088);const inc=(t,r,n,a)=>{if(typeof n==="string"){a=n;n=undefined}try{return new o(t,n).inc(r,a).version}catch(t){return null}};t.exports=inc},194:(t,r,n)=>{const o=n(4309);const lt=(t,r,n)=>o(t,r,n)<0;t.exports=lt},7520:(t,r,n)=>{const o=n(4309);const lte=(t,r,n)=>o(t,r,n)<=0;t.exports=lte},6688:(t,r,n)=>{const o=n(8088);const major=(t,r)=>new o(t,r).major;t.exports=major},8447:(t,r,n)=>{const o=n(8088);const minor=(t,r)=>new o(t,r).minor;t.exports=minor},6017:(t,r,n)=>{const o=n(4309);const neq=(t,r,n)=>o(t,r,n)!==0;t.exports=neq},5925:(t,r,n)=>{const{MAX_LENGTH:o}=n(2293);const{re:a,t:s}=n(9523);const i=n(8088);const l=n(785);const parse=(t,r)=>{r=l(r);if(t instanceof i){return t}if(typeof t!=="string"){return null}if(t.length>o){return null}const n=r.loose?a[s.LOOSE]:a[s.FULL];if(!n.test(t)){return null}try{return new i(t,r)}catch(t){return null}};t.exports=parse},2866:(t,r,n)=>{const o=n(8088);const patch=(t,r)=>new o(t,r).patch;t.exports=patch},4016:(t,r,n)=>{const o=n(5925);const prerelease=(t,r)=>{const n=o(t,r);return n&&n.prerelease.length?n.prerelease:null};t.exports=prerelease},6417:(t,r,n)=>{const o=n(4309);const rcompare=(t,r,n)=>o(r,t,n);t.exports=rcompare},8701:(t,r,n)=>{const o=n(2156);const rsort=(t,r)=>t.sort(((t,n)=>o(n,t,r)));t.exports=rsort},6055:(t,r,n)=>{const o=n(9828);const satisfies=(t,r,n)=>{try{r=new o(r,n)}catch(t){return false}return r.test(t)};t.exports=satisfies},1426:(t,r,n)=>{const o=n(2156);const sort=(t,r)=>t.sort(((t,n)=>o(t,n,r)));t.exports=sort},9601:(t,r,n)=>{const o=n(5925);const valid=(t,r)=>{const n=o(t,r);return n?n.version:null};t.exports=valid},1383:(t,r,n)=>{const o=n(9523);t.exports={re:o.re,src:o.src,tokens:o.t,SEMVER_SPEC_VERSION:n(2293).SEMVER_SPEC_VERSION,SemVer:n(8088),compareIdentifiers:n(2463).compareIdentifiers,rcompareIdentifiers:n(2463).rcompareIdentifiers,parse:n(5925),valid:n(9601),clean:n(8848),inc:n(929),diff:n(4297),major:n(6688),minor:n(8447),patch:n(2866),prerelease:n(4016),compare:n(4309),rcompare:n(6417),compareLoose:n(2804),compareBuild:n(2156),sort:n(1426),rsort:n(8701),gt:n(4123),lt:n(194),eq:n(1898),neq:n(6017),gte:n(5522),lte:n(7520),cmp:n(4359),coerce:n(3466),Comparator:n(1532),Range:n(9828),satisfies:n(6055),toComparators:n(2706),maxSatisfying:n(579),minSatisfying:n(832),minVersion:n(4179),validRange:n(2098),outside:n(420),gtr:n(9380),ltr:n(3323),intersects:n(7008),simplifyRange:n(5297),subset:n(7863)}},2293:t=>{const r="2.0.0";const n=256;const o=Number.MAX_SAFE_INTEGER||9007199254740991;const a=16;t.exports={SEMVER_SPEC_VERSION:r,MAX_LENGTH:n,MAX_SAFE_INTEGER:o,MAX_SAFE_COMPONENT_LENGTH:a}},427:t=>{const r=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=r},2463:t=>{const r=/^[0-9]+$/;const compareIdentifiers=(t,n)=>{const o=r.test(t);const a=r.test(n);if(o&&a){t=+t;n=+n}return t===n?0:o&&!a?-1:a&&!o?1:t<n?-1:1};const rcompareIdentifiers=(t,r)=>compareIdentifiers(r,t);t.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},785:t=>{const r=["includePrerelease","loose","rtl"];const parseOptions=t=>!t?{}:typeof t!=="object"?{loose:true}:r.filter((r=>t[r])).reduce(((t,r)=>{t[r]=true;return t}),{});t.exports=parseOptions},9523:(t,r,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:o}=n(2293);const a=n(427);r=t.exports={};const s=r.re=[];const i=r.src=[];const l=r.t={};let u=0;const createToken=(t,r,n)=>{const o=u++;a(o,r);l[t]=o;i[o]=r;s[o]=new RegExp(r,n?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","[0-9]+");createToken("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");createToken("MAINVERSION",`(${i[l.NUMERICIDENTIFIER]})\\.`+`(${i[l.NUMERICIDENTIFIER]})\\.`+`(${i[l.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${i[l.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[l.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[l.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${i[l.NUMERICIDENTIFIER]}|${i[l.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${i[l.NUMERICIDENTIFIERLOOSE]}|${i[l.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${i[l.PRERELEASEIDENTIFIER]}(?:\\.${i[l.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${i[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[l.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER","[0-9A-Za-z-]+");createToken("BUILD",`(?:\\+(${i[l.BUILDIDENTIFIER]}(?:\\.${i[l.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${i[l.MAINVERSION]}${i[l.PRERELEASE]}?${i[l.BUILD]}?`);createToken("FULL",`^${i[l.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${i[l.MAINVERSIONLOOSE]}${i[l.PRERELEASELOOSE]}?${i[l.BUILD]}?`);createToken("LOOSE",`^${i[l.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${i[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${i[l.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${i[l.XRANGEIDENTIFIER]})`+`(?:\\.(${i[l.XRANGEIDENTIFIER]})`+`(?:\\.(${i[l.XRANGEIDENTIFIER]})`+`(?:${i[l.PRERELEASE]})?${i[l.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${i[l.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[l.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[l.XRANGEIDENTIFIERLOOSE]})`+`(?:${i[l.PRERELEASELOOSE]})?${i[l.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${i[l.GTLT]}\\s*${i[l.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${i[l.GTLT]}\\s*${i[l.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${o}})`+`(?:\\.(\\d{1,${o}}))?`+`(?:\\.(\\d{1,${o}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",i[l.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${i[l.LONETILDE]}\\s+`,true);r.tildeTrimReplace="$1~";createToken("TILDE",`^${i[l.LONETILDE]}${i[l.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${i[l.LONETILDE]}${i[l.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${i[l.LONECARET]}\\s+`,true);r.caretTrimReplace="$1^";createToken("CARET",`^${i[l.LONECARET]}${i[l.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${i[l.LONECARET]}${i[l.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${i[l.GTLT]}\\s*(${i[l.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${i[l.GTLT]}\\s*(${i[l.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${i[l.GTLT]}\\s*(${i[l.LOOSEPLAIN]}|${i[l.XRANGEPLAIN]})`,true);r.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${i[l.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${i[l.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${i[l.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${i[l.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0.0.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},9380:(t,r,n)=>{const o=n(420);const gtr=(t,r,n)=>o(t,r,">",n);t.exports=gtr},7008:(t,r,n)=>{const o=n(9828);const intersects=(t,r,n)=>{t=new o(t,n);r=new o(r,n);return t.intersects(r)};t.exports=intersects},3323:(t,r,n)=>{const o=n(420);const ltr=(t,r,n)=>o(t,r,"<",n);t.exports=ltr},579:(t,r,n)=>{const o=n(8088);const a=n(9828);const maxSatisfying=(t,r,n)=>{let s=null;let i=null;let l=null;try{l=new a(r,n)}catch(t){return null}t.forEach((t=>{if(l.test(t)){if(!s||i.compare(t)===-1){s=t;i=new o(s,n)}}}));return s};t.exports=maxSatisfying},832:(t,r,n)=>{const o=n(8088);const a=n(9828);const minSatisfying=(t,r,n)=>{let s=null;let i=null;let l=null;try{l=new a(r,n)}catch(t){return null}t.forEach((t=>{if(l.test(t)){if(!s||i.compare(t)===1){s=t;i=new o(s,n)}}}));return s};t.exports=minSatisfying},4179:(t,r,n)=>{const o=n(8088);const a=n(9828);const s=n(4123);const minVersion=(t,r)=>{t=new a(t,r);let n=new o("0.0.0");if(t.test(n)){return n}n=new o("0.0.0-0");if(t.test(n)){return n}n=null;for(let r=0;r<t.set.length;++r){const a=t.set[r];let i=null;a.forEach((t=>{const r=new o(t.semver.version);switch(t.operator){case">":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!i||s(r,i)){i=r}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}));if(i&&(!n||s(n,i)))n=i}if(n&&t.test(n)){return n}return null};t.exports=minVersion},420:(t,r,n)=>{const o=n(8088);const a=n(1532);const{ANY:s}=a;const i=n(9828);const l=n(6055);const u=n(4123);const c=n(194);const d=n(7520);const h=n(5522);const outside=(t,r,n,p)=>{t=new o(t,p);r=new i(r,p);let m,b,g,y,S;switch(n){case">":m=u;b=d;g=c;y=">";S=">=";break;case"<":m=c;b=h;g=u;y="<";S="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(l(t,r,p)){return false}for(let n=0;n<r.set.length;++n){const o=r.set[n];let i=null;let l=null;o.forEach((t=>{if(t.semver===s){t=new a(">=0.0.0")}i=i||t;l=l||t;if(m(t.semver,i.semver,p)){i=t}else if(g(t.semver,l.semver,p)){l=t}}));if(i.operator===y||i.operator===S){return false}if((!l.operator||l.operator===y)&&b(t,l.semver)){return false}else if(l.operator===S&&g(t,l.semver)){return false}}return true};t.exports=outside},5297:(t,r,n)=>{const o=n(6055);const a=n(4309);t.exports=(t,r,n)=>{const s=[];let i=null;let l=null;const u=t.sort(((t,r)=>a(t,r,n)));for(const t of u){const a=o(t,r,n);if(a){l=t;if(!i)i=t}else{if(l){s.push([i,l])}l=null;i=null}}if(i)s.push([i,null]);const c=[];for(const[t,r]of s){if(t===r)c.push(t);else if(!r&&t===u[0])c.push("*");else if(!r)c.push(`>=${t}`);else if(t===u[0])c.push(`<=${r}`);else c.push(`${t} - ${r}`)}const d=c.join(" || ");const h=typeof r.raw==="string"?r.raw:String(r);return d.length<h.length?d:r}},7863:(t,r,n)=>{const o=n(9828);const a=n(1532);const{ANY:s}=a;const i=n(6055);const l=n(4309);const subset=(t,r,n={})=>{if(t===r)return true;t=new o(t,n);r=new o(r,n);let a=false;e:for(const o of t.set){for(const t of r.set){const r=simpleSubset(o,t,n);a=a||r!==null;if(r)continue e}if(a)return false}return true};const simpleSubset=(t,r,n)=>{if(t===r)return true;if(t.length===1&&t[0].semver===s){if(r.length===1&&r[0].semver===s)return true;else if(n.includePrerelease)t=[new a(">=0.0.0-0")];else t=[new a(">=0.0.0")]}if(r.length===1&&r[0].semver===s){if(n.includePrerelease)return true;else r=[new a(">=0.0.0")]}const o=new Set;let u,c;for(const r of t){if(r.operator===">"||r.operator===">=")u=higherGT(u,r,n);else if(r.operator==="<"||r.operator==="<=")c=lowerLT(c,r,n);else o.add(r.semver)}if(o.size>1)return null;let d;if(u&&c){d=l(u.semver,c.semver,n);if(d>0)return null;else if(d===0&&(u.operator!==">="||c.operator!=="<="))return null}for(const t of o){if(u&&!i(t,String(u),n))return null;if(c&&!i(t,String(c),n))return null;for(const o of r){if(!i(t,String(o),n))return false}return true}let h,p;let m,b;let g=c&&!n.includePrerelease&&c.semver.prerelease.length?c.semver:false;let y=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:false;if(g&&g.prerelease.length===1&&c.operator==="<"&&g.prerelease[0]===0){g=false}for(const t of r){b=b||t.operator===">"||t.operator===">=";m=m||t.operator==="<"||t.operator==="<=";if(u){if(y){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===y.major&&t.semver.minor===y.minor&&t.semver.patch===y.patch){y=false}}if(t.operator===">"||t.operator===">="){h=higherGT(u,t,n);if(h===t&&h!==u)return false}else if(u.operator===">="&&!i(u.semver,String(t),n))return false}if(c){if(g){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===g.major&&t.semver.minor===g.minor&&t.semver.patch===g.patch){g=false}}if(t.operator==="<"||t.operator==="<="){p=lowerLT(c,t,n);if(p===t&&p!==c)return false}else if(c.operator==="<="&&!i(c.semver,String(t),n))return false}if(!t.operator&&(c||u)&&d!==0)return false}if(u&&m&&!c&&d!==0)return false;if(c&&b&&!u&&d!==0)return false;if(y||g)return false;return true};const higherGT=(t,r,n)=>{if(!t)return r;const o=l(t.semver,r.semver,n);return o>0?t:o<0?r:r.operator===">"&&t.operator===">="?r:t};const lowerLT=(t,r,n)=>{if(!t)return r;const o=l(t.semver,r.semver,n);return o<0?t:o>0?r:r.operator==="<"&&t.operator==="<="?r:t};t.exports=subset},2706:(t,r,n)=>{const o=n(9828);const toComparators=(t,r)=>new o(t,r).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")));t.exports=toComparators},2098:(t,r,n)=>{const o=n(9828);const validRange=(t,r)=>{try{return new o(t,r).range||"*"}catch(t){return null}};t.exports=validRange},9318:(t,r,n)=>{const o=n(2037);const a=n(6224);const s=n(1621);const{env:i}=process;let l;if(s("no-color")||s("no-colors")||s("color=false")||s("color=never")){l=0}else if(s("color")||s("colors")||s("color=true")||s("color=always")){l=1}if("FORCE_COLOR"in i){if(i.FORCE_COLOR==="true"){l=1}else if(i.FORCE_COLOR==="false"){l=0}else{l=i.FORCE_COLOR.length===0?1:Math.min(parseInt(i.FORCE_COLOR,10),3)}}function translateLevel(t){if(t===0){return false}return{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function supportsColor(t,r){if(l===0){return 0}if(s("color=16m")||s("color=full")||s("color=truecolor")){return 3}if(s("color=256")){return 2}if(t&&!r&&l===undefined){return 0}const n=l||0;if(i.TERM==="dumb"){return n}if(process.platform==="win32"){const t=o.release().split(".");if(Number(t[0])>=10&&Number(t[2])>=10586){return Number(t[2])>=14931?3:2}return 1}if("CI"in i){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((t=>t in i))||i.CI_NAME==="codeship"){return 1}return n}if("TEAMCITY_VERSION"in i){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0}if(i.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in i){const t=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(i.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)){return 1}if("COLORTERM"in i){return 1}return n}function getSupportLevel(t){const r=supportsColor(t,t&&t.isTTY);return translateLevel(r)}t.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,a.isatty(1))),stderr:translateLevel(supportsColor(true,a.isatty(2)))}},418:t=>{t.exports=function(t,r){if(!r)r={};var n=r.hsep===undefined?" ":r.hsep;var o=r.align||[];var a=r.stringLength||function(t){return String(t).length};var s=reduce(t,(function(t,r){forEach(r,(function(r,n){var o=dotindex(r);if(!t[n]||o>t[n])t[n]=o}));return t}),[]);var i=map(t,(function(t){return map(t,(function(t,r){var n=String(t);if(o[r]==="."){var i=dotindex(n);var l=s[r]+(/\./.test(n)?1:2)-(a(n)-i);return n+Array(l).join(" ")}else return n}))}));var l=reduce(i,(function(t,r){forEach(r,(function(r,n){var o=a(r);if(!t[n]||o>t[n])t[n]=o}));return t}),[]);return map(i,(function(t){return map(t,(function(t,r){var n=l[r]-a(t)||0;var s=Array(Math.max(n+1,1)).join(" ");if(o[r]==="r"||o[r]==="."){return s+t}if(o[r]==="c"){return Array(Math.ceil(n/2+1)).join(" ")+t+Array(Math.floor(n/2+1)).join(" ")}return t+s})).join(n).replace(/\s+$/,"")})).join("\n")};function dotindex(t){var r=/\.[^.]*$/.exec(t);return r?r.index+1:t.length}function reduce(t,r,n){if(t.reduce)return t.reduce(r,n);var o=0;var a=arguments.length>=3?n:t[o++];for(;o<t.length;o++){r(a,t[o],o)}return a}function forEach(t,r){if(t.forEach)return t.forEach(r);for(var n=0;n<t.length;n++){r.call(t,t[n],n)}}function map(t,r){if(t.map)return t.map(r);var n=[];for(var o=0;o<t.length;o++){n.push(r.call(t,t[o],o))}return n}},1452:function(t,r){(function(t,n){true?n(r):0})(this,(function(t){"use strict";const r=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol:t=>`Symbol(${t})`;function noop(){return undefined}function getGlobals(){if(typeof self!=="undefined"){return self}else if(typeof window!=="undefined"){return window}else if(typeof global!=="undefined"){return global}return undefined}const n=getGlobals();function typeIsObject(t){return typeof t==="object"&&t!==null||typeof t==="function"}const o=noop;const a=Promise;const s=Promise.prototype.then;const i=Promise.resolve.bind(a);const l=Promise.reject.bind(a);function newPromise(t){return new a(t)}function promiseResolvedWith(t){return i(t)}function promiseRejectedWith(t){return l(t)}function PerformPromiseThen(t,r,n){return s.call(t,r,n)}function uponPromise(t,r,n){PerformPromiseThen(PerformPromiseThen(t,r,n),undefined,o)}function uponFulfillment(t,r){uponPromise(t,r)}function uponRejection(t,r){uponPromise(t,undefined,r)}function transformPromiseWith(t,r,n){return PerformPromiseThen(t,r,n)}function setPromiseIsHandledToTrue(t){PerformPromiseThen(t,undefined,o)}const u=(()=>{const t=n&&n.queueMicrotask;if(typeof t==="function"){return t}const r=promiseResolvedWith(undefined);return t=>PerformPromiseThen(r,t)})();function reflectCall(t,r,n){if(typeof t!=="function"){throw new TypeError("Argument is not a function")}return Function.prototype.apply.call(t,r,n)}function promiseCall(t,r,n){try{return promiseResolvedWith(reflectCall(t,r,n))}catch(t){return promiseRejectedWith(t)}}const c=16384;class SimpleQueue{constructor(){this._cursor=0;this._size=0;this._front={_elements:[],_next:undefined};this._back=this._front;this._cursor=0;this._size=0}get length(){return this._size}push(t){const r=this._back;let n=r;if(r._elements.length===c-1){n={_elements:[],_next:undefined}}r._elements.push(t);if(n!==r){this._back=n;r._next=n}++this._size}shift(){const t=this._front;let r=t;const n=this._cursor;let o=n+1;const a=t._elements;const s=a[n];if(o===c){r=t._next;o=0}--this._size;this._cursor=o;if(t!==r){this._front=r}a[n]=undefined;return s}forEach(t){let r=this._cursor;let n=this._front;let o=n._elements;while(r!==o.length||n._next!==undefined){if(r===o.length){n=n._next;o=n._elements;r=0;if(o.length===0){break}}t(o[r]);++r}}peek(){const t=this._front;const r=this._cursor;return t._elements[r]}}function ReadableStreamReaderGenericInitialize(t,r){t._ownerReadableStream=r;r._reader=t;if(r._state==="readable"){defaultReaderClosedPromiseInitialize(t)}else if(r._state==="closed"){defaultReaderClosedPromiseInitializeAsResolved(t)}else{defaultReaderClosedPromiseInitializeAsRejected(t,r._storedError)}}function ReadableStreamReaderGenericCancel(t,r){const n=t._ownerReadableStream;return ReadableStreamCancel(n,r)}function ReadableStreamReaderGenericRelease(t){if(t._ownerReadableStream._state==="readable"){defaultReaderClosedPromiseReject(t,new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`))}else{defaultReaderClosedPromiseResetToRejected(t,new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`))}t._ownerReadableStream._reader=undefined;t._ownerReadableStream=undefined}function readerLockException(t){return new TypeError("Cannot "+t+" a stream using a released reader")}function defaultReaderClosedPromiseInitialize(t){t._closedPromise=newPromise(((r,n)=>{t._closedPromise_resolve=r;t._closedPromise_reject=n}))}function defaultReaderClosedPromiseInitializeAsRejected(t,r){defaultReaderClosedPromiseInitialize(t);defaultReaderClosedPromiseReject(t,r)}function defaultReaderClosedPromiseInitializeAsResolved(t){defaultReaderClosedPromiseInitialize(t);defaultReaderClosedPromiseResolve(t)}function defaultReaderClosedPromiseReject(t,r){if(t._closedPromise_reject===undefined){return}setPromiseIsHandledToTrue(t._closedPromise);t._closedPromise_reject(r);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined}function defaultReaderClosedPromiseResetToRejected(t,r){defaultReaderClosedPromiseInitializeAsRejected(t,r)}function defaultReaderClosedPromiseResolve(t){if(t._closedPromise_resolve===undefined){return}t._closedPromise_resolve(undefined);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined}const d=r("[[AbortSteps]]");const h=r("[[ErrorSteps]]");const p=r("[[CancelSteps]]");const m=r("[[PullSteps]]");const b=Number.isFinite||function(t){return typeof t==="number"&&isFinite(t)};const g=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};function isDictionary(t){return typeof t==="object"||typeof t==="function"}function assertDictionary(t,r){if(t!==undefined&&!isDictionary(t)){throw new TypeError(`${r} is not an object.`)}}function assertFunction(t,r){if(typeof t!=="function"){throw new TypeError(`${r} is not a function.`)}}function isObject(t){return typeof t==="object"&&t!==null||typeof t==="function"}function assertObject(t,r){if(!isObject(t)){throw new TypeError(`${r} is not an object.`)}}function assertRequiredArgument(t,r,n){if(t===undefined){throw new TypeError(`Parameter ${r} is required in '${n}'.`)}}function assertRequiredField(t,r,n){if(t===undefined){throw new TypeError(`${r} is required in '${n}'.`)}}function convertUnrestrictedDouble(t){return Number(t)}function censorNegativeZero(t){return t===0?0:t}function integerPart(t){return censorNegativeZero(g(t))}function convertUnsignedLongLongWithEnforceRange(t,r){const n=0;const o=Number.MAX_SAFE_INTEGER;let a=Number(t);a=censorNegativeZero(a);if(!b(a)){throw new TypeError(`${r} is not a finite number`)}a=integerPart(a);if(a<n||a>o){throw new TypeError(`${r} is outside the accepted range of ${n} to ${o}, inclusive`)}if(!b(a)||a===0){return 0}return a}function assertReadableStream(t,r){if(!IsReadableStream(t)){throw new TypeError(`${r} is not a ReadableStream.`)}}function AcquireReadableStreamDefaultReader(t){return new ReadableStreamDefaultReader(t)}function ReadableStreamAddReadRequest(t,r){t._reader._readRequests.push(r)}function ReadableStreamFulfillReadRequest(t,r,n){const o=t._reader;const a=o._readRequests.shift();if(n){a._closeSteps()}else{a._chunkSteps(r)}}function ReadableStreamGetNumReadRequests(t){return t._reader._readRequests.length}function ReadableStreamHasDefaultReader(t){const r=t._reader;if(r===undefined){return false}if(!IsReadableStreamDefaultReader(r)){return false}return true}class ReadableStreamDefaultReader{constructor(t){assertRequiredArgument(t,1,"ReadableStreamDefaultReader");assertReadableStream(t,"First parameter");if(IsReadableStreamLocked(t)){throw new TypeError("This stream has already been locked for exclusive reading by another reader")}ReadableStreamReaderGenericInitialize(this,t);this._readRequests=new SimpleQueue}get closed(){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("closed"))}return this._closedPromise}cancel(t=undefined){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("cancel"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("cancel"))}return ReadableStreamReaderGenericCancel(this,t)}read(){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("read"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("read from"))}let t;let r;const n=newPromise(((n,o)=>{t=n;r=o}));const o={_chunkSteps:r=>t({value:r,done:false}),_closeSteps:()=>t({value:undefined,done:true}),_errorSteps:t=>r(t)};ReadableStreamDefaultReaderRead(this,o);return n}releaseLock(){if(!IsReadableStreamDefaultReader(this)){throw defaultReaderBrandCheckException("releaseLock")}if(this._ownerReadableStream===undefined){return}if(this._readRequests.length>0){throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled")}ReadableStreamReaderGenericRelease(this)}}Object.defineProperties(ReadableStreamDefaultReader.prototype,{cancel:{enumerable:true},read:{enumerable:true},releaseLock:{enumerable:true},closed:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamDefaultReader.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:true})}function IsReadableStreamDefaultReader(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_readRequests")){return false}return t instanceof ReadableStreamDefaultReader}function ReadableStreamDefaultReaderRead(t,r){const n=t._ownerReadableStream;n._disturbed=true;if(n._state==="closed"){r._closeSteps()}else if(n._state==="errored"){r._errorSteps(n._storedError)}else{n._readableStreamController[m](r)}}function defaultReaderBrandCheckException(t){return new TypeError(`ReadableStreamDefaultReader.prototype.${t} can only be used on a ReadableStreamDefaultReader`)}const y=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);class ReadableStreamAsyncIteratorImpl{constructor(t,r){this._ongoingPromise=undefined;this._isFinished=false;this._reader=t;this._preventCancel=r}next(){const nextSteps=()=>this._nextSteps();this._ongoingPromise=this._ongoingPromise?transformPromiseWith(this._ongoingPromise,nextSteps,nextSteps):nextSteps();return this._ongoingPromise}return(t){const returnSteps=()=>this._returnSteps(t);return this._ongoingPromise?transformPromiseWith(this._ongoingPromise,returnSteps,returnSteps):returnSteps()}_nextSteps(){if(this._isFinished){return Promise.resolve({value:undefined,done:true})}const t=this._reader;if(t._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("iterate"))}let r;let n;const o=newPromise(((t,o)=>{r=t;n=o}));const a={_chunkSteps:t=>{this._ongoingPromise=undefined;u((()=>r({value:t,done:false})))},_closeSteps:()=>{this._ongoingPromise=undefined;this._isFinished=true;ReadableStreamReaderGenericRelease(t);r({value:undefined,done:true})},_errorSteps:r=>{this._ongoingPromise=undefined;this._isFinished=true;ReadableStreamReaderGenericRelease(t);n(r)}};ReadableStreamDefaultReaderRead(t,a);return o}_returnSteps(t){if(this._isFinished){return Promise.resolve({value:t,done:true})}this._isFinished=true;const r=this._reader;if(r._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("finish iterating"))}if(!this._preventCancel){const n=ReadableStreamReaderGenericCancel(r,t);ReadableStreamReaderGenericRelease(r);return transformPromiseWith(n,(()=>({value:t,done:true})))}ReadableStreamReaderGenericRelease(r);return promiseResolvedWith({value:t,done:true})}}const S={next(){if(!IsReadableStreamAsyncIterator(this)){return promiseRejectedWith(streamAsyncIteratorBrandCheckException("next"))}return this._asyncIteratorImpl.next()},return(t){if(!IsReadableStreamAsyncIterator(this)){return promiseRejectedWith(streamAsyncIteratorBrandCheckException("return"))}return this._asyncIteratorImpl.return(t)}};if(y!==undefined){Object.setPrototypeOf(S,y)}function AcquireReadableStreamAsyncIterator(t,r){const n=AcquireReadableStreamDefaultReader(t);const o=new ReadableStreamAsyncIteratorImpl(n,r);const a=Object.create(S);a._asyncIteratorImpl=o;return a}function IsReadableStreamAsyncIterator(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_asyncIteratorImpl")){return false}try{return t._asyncIteratorImpl instanceof ReadableStreamAsyncIteratorImpl}catch(t){return false}}function streamAsyncIteratorBrandCheckException(t){return new TypeError(`ReadableStreamAsyncIterator.${t} can only be used on a ReadableSteamAsyncIterator`)}const R=Number.isNaN||function(t){return t!==t};function CreateArrayFromList(t){return t.slice()}function CopyDataBlockBytes(t,r,n,o,a){new Uint8Array(t).set(new Uint8Array(n,o,a),r)}function TransferArrayBuffer(t){return t}function IsDetachedBuffer(t){return false}function ArrayBufferSlice(t,r,n){if(t.slice){return t.slice(r,n)}const o=n-r;const a=new ArrayBuffer(o);CopyDataBlockBytes(a,0,t,r,o);return a}function IsNonNegativeNumber(t){if(typeof t!=="number"){return false}if(R(t)){return false}if(t<0){return false}return true}function CloneAsUint8Array(t){const r=ArrayBufferSlice(t.buffer,t.byteOffset,t.byteOffset+t.byteLength);return new Uint8Array(r)}function DequeueValue(t){const r=t._queue.shift();t._queueTotalSize-=r.size;if(t._queueTotalSize<0){t._queueTotalSize=0}return r.value}function EnqueueValueWithSize(t,r,n){if(!IsNonNegativeNumber(n)||n===Infinity){throw new RangeError("Size must be a finite, non-NaN, non-negative number.")}t._queue.push({value:r,size:n});t._queueTotalSize+=n}function PeekQueueValue(t){const r=t._queue.peek();return r.value}function ResetQueue(t){t._queue=new SimpleQueue;t._queueTotalSize=0}class ReadableStreamBYOBRequest{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("view")}return this._view}respond(t){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("respond")}assertRequiredArgument(t,1,"respond");t=convertUnsignedLongLongWithEnforceRange(t,"First parameter");if(this._associatedReadableByteStreamController===undefined){throw new TypeError("This BYOB request has been invalidated")}if(IsDetachedBuffer(this._view.buffer));ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController,t)}respondWithNewView(t){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("respondWithNewView")}assertRequiredArgument(t,1,"respondWithNewView");if(!ArrayBuffer.isView(t)){throw new TypeError("You can only respond with array buffer views")}if(this._associatedReadableByteStreamController===undefined){throw new TypeError("This BYOB request has been invalidated")}if(IsDetachedBuffer(t.buffer));ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController,t)}}Object.defineProperties(ReadableStreamBYOBRequest.prototype,{respond:{enumerable:true},respondWithNewView:{enumerable:true},view:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamBYOBRequest.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:true})}class ReadableByteStreamController{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("byobRequest")}return ReadableByteStreamControllerGetBYOBRequest(this)}get desiredSize(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("desiredSize")}return ReadableByteStreamControllerGetDesiredSize(this)}close(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("close")}if(this._closeRequested){throw new TypeError("The stream has already been closed; do not close it again!")}const t=this._controlledReadableByteStream._state;if(t!=="readable"){throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be closed`)}ReadableByteStreamControllerClose(this)}enqueue(t){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("enqueue")}assertRequiredArgument(t,1,"enqueue");if(!ArrayBuffer.isView(t)){throw new TypeError("chunk must be an array buffer view")}if(t.byteLength===0){throw new TypeError("chunk must have non-zero byteLength")}if(t.buffer.byteLength===0){throw new TypeError(`chunk's buffer must have non-zero byteLength`)}if(this._closeRequested){throw new TypeError("stream is closed or draining")}const r=this._controlledReadableByteStream._state;if(r!=="readable"){throw new TypeError(`The stream (in ${r} state) is not in the readable state and cannot be enqueued to`)}ReadableByteStreamControllerEnqueue(this,t)}error(t=undefined){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("error")}ReadableByteStreamControllerError(this,t)}[p](t){ReadableByteStreamControllerClearPendingPullIntos(this);ResetQueue(this);const r=this._cancelAlgorithm(t);ReadableByteStreamControllerClearAlgorithms(this);return r}[m](t){const r=this._controlledReadableByteStream;if(this._queueTotalSize>0){const r=this._queue.shift();this._queueTotalSize-=r.byteLength;ReadableByteStreamControllerHandleQueueDrain(this);const n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(n);return}const n=this._autoAllocateChunkSize;if(n!==undefined){let r;try{r=new ArrayBuffer(n)}catch(r){t._errorSteps(r);return}const o={buffer:r,bufferByteLength:n,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(o)}ReadableStreamAddReadRequest(r,t);ReadableByteStreamControllerCallPullIfNeeded(this)}}Object.defineProperties(ReadableByteStreamController.prototype,{close:{enumerable:true},enqueue:{enumerable:true},error:{enumerable:true},byobRequest:{enumerable:true},desiredSize:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableByteStreamController.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:true})}function IsReadableByteStreamController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledReadableByteStream")){return false}return t instanceof ReadableByteStreamController}function IsReadableStreamBYOBRequest(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_associatedReadableByteStreamController")){return false}return t instanceof ReadableStreamBYOBRequest}function ReadableByteStreamControllerCallPullIfNeeded(t){const r=ReadableByteStreamControllerShouldCallPull(t);if(!r){return}if(t._pulling){t._pullAgain=true;return}t._pulling=true;const n=t._pullAlgorithm();uponPromise(n,(()=>{t._pulling=false;if(t._pullAgain){t._pullAgain=false;ReadableByteStreamControllerCallPullIfNeeded(t)}}),(r=>{ReadableByteStreamControllerError(t,r)}))}function ReadableByteStreamControllerClearPendingPullIntos(t){ReadableByteStreamControllerInvalidateBYOBRequest(t);t._pendingPullIntos=new SimpleQueue}function ReadableByteStreamControllerCommitPullIntoDescriptor(t,r){let n=false;if(t._state==="closed"){n=true}const o=ReadableByteStreamControllerConvertPullIntoDescriptor(r);if(r.readerType==="default"){ReadableStreamFulfillReadRequest(t,o,n)}else{ReadableStreamFulfillReadIntoRequest(t,o,n)}}function ReadableByteStreamControllerConvertPullIntoDescriptor(t){const r=t.bytesFilled;const n=t.elementSize;return new t.viewConstructor(t.buffer,t.byteOffset,r/n)}function ReadableByteStreamControllerEnqueueChunkToQueue(t,r,n,o){t._queue.push({buffer:r,byteOffset:n,byteLength:o});t._queueTotalSize+=o}function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,r){const n=r.elementSize;const o=r.bytesFilled-r.bytesFilled%n;const a=Math.min(t._queueTotalSize,r.byteLength-r.bytesFilled);const s=r.bytesFilled+a;const i=s-s%n;let l=a;let u=false;if(i>o){l=i-r.bytesFilled;u=true}const c=t._queue;while(l>0){const n=c.peek();const o=Math.min(l,n.byteLength);const a=r.byteOffset+r.bytesFilled;CopyDataBlockBytes(r.buffer,a,n.buffer,n.byteOffset,o);if(n.byteLength===o){c.shift()}else{n.byteOffset+=o;n.byteLength-=o}t._queueTotalSize-=o;ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,o,r);l-=o}return u}function ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,r,n){n.bytesFilled+=r}function ReadableByteStreamControllerHandleQueueDrain(t){if(t._queueTotalSize===0&&t._closeRequested){ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamClose(t._controlledReadableByteStream)}else{ReadableByteStreamControllerCallPullIfNeeded(t)}}function ReadableByteStreamControllerInvalidateBYOBRequest(t){if(t._byobRequest===null){return}t._byobRequest._associatedReadableByteStreamController=undefined;t._byobRequest._view=null;t._byobRequest=null}function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t){while(t._pendingPullIntos.length>0){if(t._queueTotalSize===0){return}const r=t._pendingPullIntos.peek();if(ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,r)){ReadableByteStreamControllerShiftPendingPullInto(t);ReadableByteStreamControllerCommitPullIntoDescriptor(t._controlledReadableByteStream,r)}}}function ReadableByteStreamControllerPullInto(t,r,n){const o=t._controlledReadableByteStream;let a=1;if(r.constructor!==DataView){a=r.constructor.BYTES_PER_ELEMENT}const s=r.constructor;const i=TransferArrayBuffer(r.buffer);const l={buffer:i,bufferByteLength:i.byteLength,byteOffset:r.byteOffset,byteLength:r.byteLength,bytesFilled:0,elementSize:a,viewConstructor:s,readerType:"byob"};if(t._pendingPullIntos.length>0){t._pendingPullIntos.push(l);ReadableStreamAddReadIntoRequest(o,n);return}if(o._state==="closed"){const t=new s(l.buffer,l.byteOffset,0);n._closeSteps(t);return}if(t._queueTotalSize>0){if(ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,l)){const r=ReadableByteStreamControllerConvertPullIntoDescriptor(l);ReadableByteStreamControllerHandleQueueDrain(t);n._chunkSteps(r);return}if(t._closeRequested){const r=new TypeError("Insufficient bytes to fill elements in the given buffer");ReadableByteStreamControllerError(t,r);n._errorSteps(r);return}}t._pendingPullIntos.push(l);ReadableStreamAddReadIntoRequest(o,n);ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerRespondInClosedState(t,r){const n=t._controlledReadableByteStream;if(ReadableStreamHasBYOBReader(n)){while(ReadableStreamGetNumReadIntoRequests(n)>0){const r=ReadableByteStreamControllerShiftPendingPullInto(t);ReadableByteStreamControllerCommitPullIntoDescriptor(n,r)}}}function ReadableByteStreamControllerRespondInReadableState(t,r,n){ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,r,n);if(n.bytesFilled<n.elementSize){return}ReadableByteStreamControllerShiftPendingPullInto(t);const o=n.bytesFilled%n.elementSize;if(o>0){const r=n.byteOffset+n.bytesFilled;const a=ArrayBufferSlice(n.buffer,r-o,r);ReadableByteStreamControllerEnqueueChunkToQueue(t,a,0,a.byteLength)}n.bytesFilled-=o;ReadableByteStreamControllerCommitPullIntoDescriptor(t._controlledReadableByteStream,n);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t)}function ReadableByteStreamControllerRespondInternal(t,r){const n=t._pendingPullIntos.peek();ReadableByteStreamControllerInvalidateBYOBRequest(t);const o=t._controlledReadableByteStream._state;if(o==="closed"){ReadableByteStreamControllerRespondInClosedState(t)}else{ReadableByteStreamControllerRespondInReadableState(t,r,n)}ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerShiftPendingPullInto(t){const r=t._pendingPullIntos.shift();return r}function ReadableByteStreamControllerShouldCallPull(t){const r=t._controlledReadableByteStream;if(r._state!=="readable"){return false}if(t._closeRequested){return false}if(!t._started){return false}if(ReadableStreamHasDefaultReader(r)&&ReadableStreamGetNumReadRequests(r)>0){return true}if(ReadableStreamHasBYOBReader(r)&&ReadableStreamGetNumReadIntoRequests(r)>0){return true}const n=ReadableByteStreamControllerGetDesiredSize(t);if(n>0){return true}return false}function ReadableByteStreamControllerClearAlgorithms(t){t._pullAlgorithm=undefined;t._cancelAlgorithm=undefined}function ReadableByteStreamControllerClose(t){const r=t._controlledReadableByteStream;if(t._closeRequested||r._state!=="readable"){return}if(t._queueTotalSize>0){t._closeRequested=true;return}if(t._pendingPullIntos.length>0){const r=t._pendingPullIntos.peek();if(r.bytesFilled>0){const r=new TypeError("Insufficient bytes to fill elements in the given buffer");ReadableByteStreamControllerError(t,r);throw r}}ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamClose(r)}function ReadableByteStreamControllerEnqueue(t,r){const n=t._controlledReadableByteStream;if(t._closeRequested||n._state!=="readable"){return}const o=r.buffer;const a=r.byteOffset;const s=r.byteLength;const i=TransferArrayBuffer(o);if(t._pendingPullIntos.length>0){const r=t._pendingPullIntos.peek();if(IsDetachedBuffer(r.buffer));r.buffer=TransferArrayBuffer(r.buffer)}ReadableByteStreamControllerInvalidateBYOBRequest(t);if(ReadableStreamHasDefaultReader(n)){if(ReadableStreamGetNumReadRequests(n)===0){ReadableByteStreamControllerEnqueueChunkToQueue(t,i,a,s)}else{const t=new Uint8Array(i,a,s);ReadableStreamFulfillReadRequest(n,t,false)}}else if(ReadableStreamHasBYOBReader(n)){ReadableByteStreamControllerEnqueueChunkToQueue(t,i,a,s);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t)}else{ReadableByteStreamControllerEnqueueChunkToQueue(t,i,a,s)}ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerError(t,r){const n=t._controlledReadableByteStream;if(n._state!=="readable"){return}ReadableByteStreamControllerClearPendingPullIntos(t);ResetQueue(t);ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamError(n,r)}function ReadableByteStreamControllerGetBYOBRequest(t){if(t._byobRequest===null&&t._pendingPullIntos.length>0){const r=t._pendingPullIntos.peek();const n=new Uint8Array(r.buffer,r.byteOffset+r.bytesFilled,r.byteLength-r.bytesFilled);const o=Object.create(ReadableStreamBYOBRequest.prototype);SetUpReadableStreamBYOBRequest(o,t,n);t._byobRequest=o}return t._byobRequest}function ReadableByteStreamControllerGetDesiredSize(t){const r=t._controlledReadableByteStream._state;if(r==="errored"){return null}if(r==="closed"){return 0}return t._strategyHWM-t._queueTotalSize}function ReadableByteStreamControllerRespond(t,r){const n=t._pendingPullIntos.peek();const o=t._controlledReadableByteStream._state;if(o==="closed"){if(r!==0){throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}}else{if(r===0){throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream")}if(n.bytesFilled+r>n.byteLength){throw new RangeError("bytesWritten out of range")}}n.buffer=TransferArrayBuffer(n.buffer);ReadableByteStreamControllerRespondInternal(t,r)}function ReadableByteStreamControllerRespondWithNewView(t,r){const n=t._pendingPullIntos.peek();const o=t._controlledReadableByteStream._state;if(o==="closed"){if(r.byteLength!==0){throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}}else{if(r.byteLength===0){throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream")}}if(n.byteOffset+n.bytesFilled!==r.byteOffset){throw new RangeError("The region specified by view does not match byobRequest")}if(n.bufferByteLength!==r.buffer.byteLength){throw new RangeError("The buffer of view has different capacity than byobRequest")}if(n.bytesFilled+r.byteLength>n.byteLength){throw new RangeError("The region specified by view is larger than byobRequest")}n.buffer=TransferArrayBuffer(r.buffer);ReadableByteStreamControllerRespondInternal(t,r.byteLength)}function SetUpReadableByteStreamController(t,r,n,o,a,s,i){r._controlledReadableByteStream=t;r._pullAgain=false;r._pulling=false;r._byobRequest=null;r._queue=r._queueTotalSize=undefined;ResetQueue(r);r._closeRequested=false;r._started=false;r._strategyHWM=s;r._pullAlgorithm=o;r._cancelAlgorithm=a;r._autoAllocateChunkSize=i;r._pendingPullIntos=new SimpleQueue;t._readableStreamController=r;const l=n();uponPromise(promiseResolvedWith(l),(()=>{r._started=true;ReadableByteStreamControllerCallPullIfNeeded(r)}),(t=>{ReadableByteStreamControllerError(r,t)}))}function SetUpReadableByteStreamControllerFromUnderlyingSource(t,r,n){const o=Object.create(ReadableByteStreamController.prototype);let startAlgorithm=()=>undefined;let pullAlgorithm=()=>promiseResolvedWith(undefined);let cancelAlgorithm=()=>promiseResolvedWith(undefined);if(r.start!==undefined){startAlgorithm=()=>r.start(o)}if(r.pull!==undefined){pullAlgorithm=()=>r.pull(o)}if(r.cancel!==undefined){cancelAlgorithm=t=>r.cancel(t)}const a=r.autoAllocateChunkSize;if(a===0){throw new TypeError("autoAllocateChunkSize must be greater than 0")}SetUpReadableByteStreamController(t,o,startAlgorithm,pullAlgorithm,cancelAlgorithm,n,a)}function SetUpReadableStreamBYOBRequest(t,r,n){t._associatedReadableByteStreamController=r;t._view=n}function byobRequestBrandCheckException(t){return new TypeError(`ReadableStreamBYOBRequest.prototype.${t} can only be used on a ReadableStreamBYOBRequest`)}function byteStreamControllerBrandCheckException(t){return new TypeError(`ReadableByteStreamController.prototype.${t} can only be used on a ReadableByteStreamController`)}function AcquireReadableStreamBYOBReader(t){return new ReadableStreamBYOBReader(t)}function ReadableStreamAddReadIntoRequest(t,r){t._reader._readIntoRequests.push(r)}function ReadableStreamFulfillReadIntoRequest(t,r,n){const o=t._reader;const a=o._readIntoRequests.shift();if(n){a._closeSteps(r)}else{a._chunkSteps(r)}}function ReadableStreamGetNumReadIntoRequests(t){return t._reader._readIntoRequests.length}function ReadableStreamHasBYOBReader(t){const r=t._reader;if(r===undefined){return false}if(!IsReadableStreamBYOBReader(r)){return false}return true}class ReadableStreamBYOBReader{constructor(t){assertRequiredArgument(t,1,"ReadableStreamBYOBReader");assertReadableStream(t,"First parameter");if(IsReadableStreamLocked(t)){throw new TypeError("This stream has already been locked for exclusive reading by another reader")}if(!IsReadableByteStreamController(t._readableStreamController)){throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte "+"source")}ReadableStreamReaderGenericInitialize(this,t);this._readIntoRequests=new SimpleQueue}get closed(){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("closed"))}return this._closedPromise}cancel(t=undefined){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("cancel"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("cancel"))}return ReadableStreamReaderGenericCancel(this,t)}read(t){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("read"))}if(!ArrayBuffer.isView(t)){return promiseRejectedWith(new TypeError("view must be an array buffer view"))}if(t.byteLength===0){return promiseRejectedWith(new TypeError("view must have non-zero byteLength"))}if(t.buffer.byteLength===0){return promiseRejectedWith(new TypeError(`view's buffer must have non-zero byteLength`))}if(IsDetachedBuffer(t.buffer));if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("read from"))}let r;let n;const o=newPromise(((t,o)=>{r=t;n=o}));const a={_chunkSteps:t=>r({value:t,done:false}),_closeSteps:t=>r({value:t,done:true}),_errorSteps:t=>n(t)};ReadableStreamBYOBReaderRead(this,t,a);return o}releaseLock(){if(!IsReadableStreamBYOBReader(this)){throw byobReaderBrandCheckException("releaseLock")}if(this._ownerReadableStream===undefined){return}if(this._readIntoRequests.length>0){throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled")}ReadableStreamReaderGenericRelease(this)}}Object.defineProperties(ReadableStreamBYOBReader.prototype,{cancel:{enumerable:true},read:{enumerable:true},releaseLock:{enumerable:true},closed:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamBYOBReader.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:true})}function IsReadableStreamBYOBReader(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_readIntoRequests")){return false}return t instanceof ReadableStreamBYOBReader}function ReadableStreamBYOBReaderRead(t,r,n){const o=t._ownerReadableStream;o._disturbed=true;if(o._state==="errored"){n._errorSteps(o._storedError)}else{ReadableByteStreamControllerPullInto(o._readableStreamController,r,n)}}function byobReaderBrandCheckException(t){return new TypeError(`ReadableStreamBYOBReader.prototype.${t} can only be used on a ReadableStreamBYOBReader`)}function ExtractHighWaterMark(t,r){const{highWaterMark:n}=t;if(n===undefined){return r}if(R(n)||n<0){throw new RangeError("Invalid highWaterMark")}return n}function ExtractSizeAlgorithm(t){const{size:r}=t;if(!r){return()=>1}return r}function convertQueuingStrategy(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.highWaterMark;const o=t===null||t===void 0?void 0:t.size;return{highWaterMark:n===undefined?undefined:convertUnrestrictedDouble(n),size:o===undefined?undefined:convertQueuingStrategySize(o,`${r} has member 'size' that`)}}function convertQueuingStrategySize(t,r){assertFunction(t,r);return r=>convertUnrestrictedDouble(t(r))}function convertUnderlyingSink(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.abort;const o=t===null||t===void 0?void 0:t.close;const a=t===null||t===void 0?void 0:t.start;const s=t===null||t===void 0?void 0:t.type;const i=t===null||t===void 0?void 0:t.write;return{abort:n===undefined?undefined:convertUnderlyingSinkAbortCallback(n,t,`${r} has member 'abort' that`),close:o===undefined?undefined:convertUnderlyingSinkCloseCallback(o,t,`${r} has member 'close' that`),start:a===undefined?undefined:convertUnderlyingSinkStartCallback(a,t,`${r} has member 'start' that`),write:i===undefined?undefined:convertUnderlyingSinkWriteCallback(i,t,`${r} has member 'write' that`),type:s}}function convertUnderlyingSinkAbortCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertUnderlyingSinkCloseCallback(t,r,n){assertFunction(t,n);return()=>promiseCall(t,r,[])}function convertUnderlyingSinkStartCallback(t,r,n){assertFunction(t,n);return n=>reflectCall(t,r,[n])}function convertUnderlyingSinkWriteCallback(t,r,n){assertFunction(t,n);return(n,o)=>promiseCall(t,r,[n,o])}function assertWritableStream(t,r){if(!IsWritableStream(t)){throw new TypeError(`${r} is not a WritableStream.`)}}function isAbortSignal(t){if(typeof t!=="object"||t===null){return false}try{return typeof t.aborted==="boolean"}catch(t){return false}}const _=typeof AbortController==="function";function createAbortController(){if(_){return new AbortController}return undefined}class WritableStream{constructor(t={},r={}){if(t===undefined){t=null}else{assertObject(t,"First parameter")}const n=convertQueuingStrategy(r,"Second parameter");const o=convertUnderlyingSink(t,"First parameter");InitializeWritableStream(this);const a=o.type;if(a!==undefined){throw new RangeError("Invalid type is specified")}const s=ExtractSizeAlgorithm(n);const i=ExtractHighWaterMark(n,1);SetUpWritableStreamDefaultControllerFromUnderlyingSink(this,o,i,s)}get locked(){if(!IsWritableStream(this)){throw streamBrandCheckException$2("locked")}return IsWritableStreamLocked(this)}abort(t=undefined){if(!IsWritableStream(this)){return promiseRejectedWith(streamBrandCheckException$2("abort"))}if(IsWritableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot abort a stream that already has a writer"))}return WritableStreamAbort(this,t)}close(){if(!IsWritableStream(this)){return promiseRejectedWith(streamBrandCheckException$2("close"))}if(IsWritableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot close a stream that already has a writer"))}if(WritableStreamCloseQueuedOrInFlight(this)){return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"))}return WritableStreamClose(this)}getWriter(){if(!IsWritableStream(this)){throw streamBrandCheckException$2("getWriter")}return AcquireWritableStreamDefaultWriter(this)}}Object.defineProperties(WritableStream.prototype,{abort:{enumerable:true},close:{enumerable:true},getWriter:{enumerable:true},locked:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(WritableStream.prototype,r.toStringTag,{value:"WritableStream",configurable:true})}function AcquireWritableStreamDefaultWriter(t){return new WritableStreamDefaultWriter(t)}function CreateWritableStream(t,r,n,o,a=1,s=(()=>1)){const i=Object.create(WritableStream.prototype);InitializeWritableStream(i);const l=Object.create(WritableStreamDefaultController.prototype);SetUpWritableStreamDefaultController(i,l,t,r,n,o,a,s);return i}function InitializeWritableStream(t){t._state="writable";t._storedError=undefined;t._writer=undefined;t._writableStreamController=undefined;t._writeRequests=new SimpleQueue;t._inFlightWriteRequest=undefined;t._closeRequest=undefined;t._inFlightCloseRequest=undefined;t._pendingAbortRequest=undefined;t._backpressure=false}function IsWritableStream(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_writableStreamController")){return false}return t instanceof WritableStream}function IsWritableStreamLocked(t){if(t._writer===undefined){return false}return true}function WritableStreamAbort(t,r){var n;if(t._state==="closed"||t._state==="errored"){return promiseResolvedWith(undefined)}t._writableStreamController._abortReason=r;(n=t._writableStreamController._abortController)===null||n===void 0?void 0:n.abort();const o=t._state;if(o==="closed"||o==="errored"){return promiseResolvedWith(undefined)}if(t._pendingAbortRequest!==undefined){return t._pendingAbortRequest._promise}let a=false;if(o==="erroring"){a=true;r=undefined}const s=newPromise(((n,o)=>{t._pendingAbortRequest={_promise:undefined,_resolve:n,_reject:o,_reason:r,_wasAlreadyErroring:a}}));t._pendingAbortRequest._promise=s;if(!a){WritableStreamStartErroring(t,r)}return s}function WritableStreamClose(t){const r=t._state;if(r==="closed"||r==="errored"){return promiseRejectedWith(new TypeError(`The stream (in ${r} state) is not in the writable state and cannot be closed`))}const n=newPromise(((r,n)=>{const o={_resolve:r,_reject:n};t._closeRequest=o}));const o=t._writer;if(o!==undefined&&t._backpressure&&r==="writable"){defaultWriterReadyPromiseResolve(o)}WritableStreamDefaultControllerClose(t._writableStreamController);return n}function WritableStreamAddWriteRequest(t){const r=newPromise(((r,n)=>{const o={_resolve:r,_reject:n};t._writeRequests.push(o)}));return r}function WritableStreamDealWithRejection(t,r){const n=t._state;if(n==="writable"){WritableStreamStartErroring(t,r);return}WritableStreamFinishErroring(t)}function WritableStreamStartErroring(t,r){const n=t._writableStreamController;t._state="erroring";t._storedError=r;const o=t._writer;if(o!==undefined){WritableStreamDefaultWriterEnsureReadyPromiseRejected(o,r)}if(!WritableStreamHasOperationMarkedInFlight(t)&&n._started){WritableStreamFinishErroring(t)}}function WritableStreamFinishErroring(t){t._state="errored";t._writableStreamController[h]();const r=t._storedError;t._writeRequests.forEach((t=>{t._reject(r)}));t._writeRequests=new SimpleQueue;if(t._pendingAbortRequest===undefined){WritableStreamRejectCloseAndClosedPromiseIfNeeded(t);return}const n=t._pendingAbortRequest;t._pendingAbortRequest=undefined;if(n._wasAlreadyErroring){n._reject(r);WritableStreamRejectCloseAndClosedPromiseIfNeeded(t);return}const o=t._writableStreamController[d](n._reason);uponPromise(o,(()=>{n._resolve();WritableStreamRejectCloseAndClosedPromiseIfNeeded(t)}),(r=>{n._reject(r);WritableStreamRejectCloseAndClosedPromiseIfNeeded(t)}))}function WritableStreamFinishInFlightWrite(t){t._inFlightWriteRequest._resolve(undefined);t._inFlightWriteRequest=undefined}function WritableStreamFinishInFlightWriteWithError(t,r){t._inFlightWriteRequest._reject(r);t._inFlightWriteRequest=undefined;WritableStreamDealWithRejection(t,r)}function WritableStreamFinishInFlightClose(t){t._inFlightCloseRequest._resolve(undefined);t._inFlightCloseRequest=undefined;const r=t._state;if(r==="erroring"){t._storedError=undefined;if(t._pendingAbortRequest!==undefined){t._pendingAbortRequest._resolve();t._pendingAbortRequest=undefined}}t._state="closed";const n=t._writer;if(n!==undefined){defaultWriterClosedPromiseResolve(n)}}function WritableStreamFinishInFlightCloseWithError(t,r){t._inFlightCloseRequest._reject(r);t._inFlightCloseRequest=undefined;if(t._pendingAbortRequest!==undefined){t._pendingAbortRequest._reject(r);t._pendingAbortRequest=undefined}WritableStreamDealWithRejection(t,r)}function WritableStreamCloseQueuedOrInFlight(t){if(t._closeRequest===undefined&&t._inFlightCloseRequest===undefined){return false}return true}function WritableStreamHasOperationMarkedInFlight(t){if(t._inFlightWriteRequest===undefined&&t._inFlightCloseRequest===undefined){return false}return true}function WritableStreamMarkCloseRequestInFlight(t){t._inFlightCloseRequest=t._closeRequest;t._closeRequest=undefined}function WritableStreamMarkFirstWriteRequestInFlight(t){t._inFlightWriteRequest=t._writeRequests.shift()}function WritableStreamRejectCloseAndClosedPromiseIfNeeded(t){if(t._closeRequest!==undefined){t._closeRequest._reject(t._storedError);t._closeRequest=undefined}const r=t._writer;if(r!==undefined){defaultWriterClosedPromiseReject(r,t._storedError)}}function WritableStreamUpdateBackpressure(t,r){const n=t._writer;if(n!==undefined&&r!==t._backpressure){if(r){defaultWriterReadyPromiseReset(n)}else{defaultWriterReadyPromiseResolve(n)}}t._backpressure=r}class WritableStreamDefaultWriter{constructor(t){assertRequiredArgument(t,1,"WritableStreamDefaultWriter");assertWritableStream(t,"First parameter");if(IsWritableStreamLocked(t)){throw new TypeError("This stream has already been locked for exclusive writing by another writer")}this._ownerWritableStream=t;t._writer=this;const r=t._state;if(r==="writable"){if(!WritableStreamCloseQueuedOrInFlight(t)&&t._backpressure){defaultWriterReadyPromiseInitialize(this)}else{defaultWriterReadyPromiseInitializeAsResolved(this)}defaultWriterClosedPromiseInitialize(this)}else if(r==="erroring"){defaultWriterReadyPromiseInitializeAsRejected(this,t._storedError);defaultWriterClosedPromiseInitialize(this)}else if(r==="closed"){defaultWriterReadyPromiseInitializeAsResolved(this);defaultWriterClosedPromiseInitializeAsResolved(this)}else{const r=t._storedError;defaultWriterReadyPromiseInitializeAsRejected(this,r);defaultWriterClosedPromiseInitializeAsRejected(this,r)}}get closed(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("closed"))}return this._closedPromise}get desiredSize(){if(!IsWritableStreamDefaultWriter(this)){throw defaultWriterBrandCheckException("desiredSize")}if(this._ownerWritableStream===undefined){throw defaultWriterLockException("desiredSize")}return WritableStreamDefaultWriterGetDesiredSize(this)}get ready(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("ready"))}return this._readyPromise}abort(t=undefined){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("abort"))}if(this._ownerWritableStream===undefined){return promiseRejectedWith(defaultWriterLockException("abort"))}return WritableStreamDefaultWriterAbort(this,t)}close(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("close"))}const t=this._ownerWritableStream;if(t===undefined){return promiseRejectedWith(defaultWriterLockException("close"))}if(WritableStreamCloseQueuedOrInFlight(t)){return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"))}return WritableStreamDefaultWriterClose(this)}releaseLock(){if(!IsWritableStreamDefaultWriter(this)){throw defaultWriterBrandCheckException("releaseLock")}const t=this._ownerWritableStream;if(t===undefined){return}WritableStreamDefaultWriterRelease(this)}write(t=undefined){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("write"))}if(this._ownerWritableStream===undefined){return promiseRejectedWith(defaultWriterLockException("write to"))}return WritableStreamDefaultWriterWrite(this,t)}}Object.defineProperties(WritableStreamDefaultWriter.prototype,{abort:{enumerable:true},close:{enumerable:true},releaseLock:{enumerable:true},write:{enumerable:true},closed:{enumerable:true},desiredSize:{enumerable:true},ready:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(WritableStreamDefaultWriter.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:true})}function IsWritableStreamDefaultWriter(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_ownerWritableStream")){return false}return t instanceof WritableStreamDefaultWriter}function WritableStreamDefaultWriterAbort(t,r){const n=t._ownerWritableStream;return WritableStreamAbort(n,r)}function WritableStreamDefaultWriterClose(t){const r=t._ownerWritableStream;return WritableStreamClose(r)}function WritableStreamDefaultWriterCloseWithErrorPropagation(t){const r=t._ownerWritableStream;const n=r._state;if(WritableStreamCloseQueuedOrInFlight(r)||n==="closed"){return promiseResolvedWith(undefined)}if(n==="errored"){return promiseRejectedWith(r._storedError)}return WritableStreamDefaultWriterClose(t)}function WritableStreamDefaultWriterEnsureClosedPromiseRejected(t,r){if(t._closedPromiseState==="pending"){defaultWriterClosedPromiseReject(t,r)}else{defaultWriterClosedPromiseResetToRejected(t,r)}}function WritableStreamDefaultWriterEnsureReadyPromiseRejected(t,r){if(t._readyPromiseState==="pending"){defaultWriterReadyPromiseReject(t,r)}else{defaultWriterReadyPromiseResetToRejected(t,r)}}function WritableStreamDefaultWriterGetDesiredSize(t){const r=t._ownerWritableStream;const n=r._state;if(n==="errored"||n==="erroring"){return null}if(n==="closed"){return 0}return WritableStreamDefaultControllerGetDesiredSize(r._writableStreamController)}function WritableStreamDefaultWriterRelease(t){const r=t._ownerWritableStream;const n=new TypeError(`Writer was released and can no longer be used to monitor the stream's closedness`);WritableStreamDefaultWriterEnsureReadyPromiseRejected(t,n);WritableStreamDefaultWriterEnsureClosedPromiseRejected(t,n);r._writer=undefined;t._ownerWritableStream=undefined}function WritableStreamDefaultWriterWrite(t,r){const n=t._ownerWritableStream;const o=n._writableStreamController;const a=WritableStreamDefaultControllerGetChunkSize(o,r);if(n!==t._ownerWritableStream){return promiseRejectedWith(defaultWriterLockException("write to"))}const s=n._state;if(s==="errored"){return promiseRejectedWith(n._storedError)}if(WritableStreamCloseQueuedOrInFlight(n)||s==="closed"){return promiseRejectedWith(new TypeError("The stream is closing or closed and cannot be written to"))}if(s==="erroring"){return promiseRejectedWith(n._storedError)}const i=WritableStreamAddWriteRequest(n);WritableStreamDefaultControllerWrite(o,r,a);return i}const w={};class WritableStreamDefaultController{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!IsWritableStreamDefaultController(this)){throw defaultControllerBrandCheckException$2("abortReason")}return this._abortReason}get signal(){if(!IsWritableStreamDefaultController(this)){throw defaultControllerBrandCheckException$2("signal")}if(this._abortController===undefined){throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported")}return this._abortController.signal}error(t=undefined){if(!IsWritableStreamDefaultController(this)){throw defaultControllerBrandCheckException$2("error")}const r=this._controlledWritableStream._state;if(r!=="writable"){return}WritableStreamDefaultControllerError(this,t)}[d](t){const r=this._abortAlgorithm(t);WritableStreamDefaultControllerClearAlgorithms(this);return r}[h](){ResetQueue(this)}}Object.defineProperties(WritableStreamDefaultController.prototype,{error:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(WritableStreamDefaultController.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:true})}function IsWritableStreamDefaultController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledWritableStream")){return false}return t instanceof WritableStreamDefaultController}function SetUpWritableStreamDefaultController(t,r,n,o,a,s,i,l){r._controlledWritableStream=t;t._writableStreamController=r;r._queue=undefined;r._queueTotalSize=undefined;ResetQueue(r);r._abortReason=undefined;r._abortController=createAbortController();r._started=false;r._strategySizeAlgorithm=l;r._strategyHWM=i;r._writeAlgorithm=o;r._closeAlgorithm=a;r._abortAlgorithm=s;const u=WritableStreamDefaultControllerGetBackpressure(r);WritableStreamUpdateBackpressure(t,u);const c=n();const d=promiseResolvedWith(c);uponPromise(d,(()=>{r._started=true;WritableStreamDefaultControllerAdvanceQueueIfNeeded(r)}),(n=>{r._started=true;WritableStreamDealWithRejection(t,n)}))}function SetUpWritableStreamDefaultControllerFromUnderlyingSink(t,r,n,o){const a=Object.create(WritableStreamDefaultController.prototype);let startAlgorithm=()=>undefined;let writeAlgorithm=()=>promiseResolvedWith(undefined);let closeAlgorithm=()=>promiseResolvedWith(undefined);let abortAlgorithm=()=>promiseResolvedWith(undefined);if(r.start!==undefined){startAlgorithm=()=>r.start(a)}if(r.write!==undefined){writeAlgorithm=t=>r.write(t,a)}if(r.close!==undefined){closeAlgorithm=()=>r.close()}if(r.abort!==undefined){abortAlgorithm=t=>r.abort(t)}SetUpWritableStreamDefaultController(t,a,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,n,o)}function WritableStreamDefaultControllerClearAlgorithms(t){t._writeAlgorithm=undefined;t._closeAlgorithm=undefined;t._abortAlgorithm=undefined;t._strategySizeAlgorithm=undefined}function WritableStreamDefaultControllerClose(t){EnqueueValueWithSize(t,w,0);WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}function WritableStreamDefaultControllerGetChunkSize(t,r){try{return t._strategySizeAlgorithm(r)}catch(r){WritableStreamDefaultControllerErrorIfNeeded(t,r);return 1}}function WritableStreamDefaultControllerGetDesiredSize(t){return t._strategyHWM-t._queueTotalSize}function WritableStreamDefaultControllerWrite(t,r,n){try{EnqueueValueWithSize(t,r,n)}catch(r){WritableStreamDefaultControllerErrorIfNeeded(t,r);return}const o=t._controlledWritableStream;if(!WritableStreamCloseQueuedOrInFlight(o)&&o._state==="writable"){const r=WritableStreamDefaultControllerGetBackpressure(t);WritableStreamUpdateBackpressure(o,r)}WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}function WritableStreamDefaultControllerAdvanceQueueIfNeeded(t){const r=t._controlledWritableStream;if(!t._started){return}if(r._inFlightWriteRequest!==undefined){return}const n=r._state;if(n==="erroring"){WritableStreamFinishErroring(r);return}if(t._queue.length===0){return}const o=PeekQueueValue(t);if(o===w){WritableStreamDefaultControllerProcessClose(t)}else{WritableStreamDefaultControllerProcessWrite(t,o)}}function WritableStreamDefaultControllerErrorIfNeeded(t,r){if(t._controlledWritableStream._state==="writable"){WritableStreamDefaultControllerError(t,r)}}function WritableStreamDefaultControllerProcessClose(t){const r=t._controlledWritableStream;WritableStreamMarkCloseRequestInFlight(r);DequeueValue(t);const n=t._closeAlgorithm();WritableStreamDefaultControllerClearAlgorithms(t);uponPromise(n,(()=>{WritableStreamFinishInFlightClose(r)}),(t=>{WritableStreamFinishInFlightCloseWithError(r,t)}))}function WritableStreamDefaultControllerProcessWrite(t,r){const n=t._controlledWritableStream;WritableStreamMarkFirstWriteRequestInFlight(n);const o=t._writeAlgorithm(r);uponPromise(o,(()=>{WritableStreamFinishInFlightWrite(n);const r=n._state;DequeueValue(t);if(!WritableStreamCloseQueuedOrInFlight(n)&&r==="writable"){const r=WritableStreamDefaultControllerGetBackpressure(t);WritableStreamUpdateBackpressure(n,r)}WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}),(r=>{if(n._state==="writable"){WritableStreamDefaultControllerClearAlgorithms(t)}WritableStreamFinishInFlightWriteWithError(n,r)}))}function WritableStreamDefaultControllerGetBackpressure(t){const r=WritableStreamDefaultControllerGetDesiredSize(t);return r<=0}function WritableStreamDefaultControllerError(t,r){const n=t._controlledWritableStream;WritableStreamDefaultControllerClearAlgorithms(t);WritableStreamStartErroring(n,r)}function streamBrandCheckException$2(t){return new TypeError(`WritableStream.prototype.${t} can only be used on a WritableStream`)}function defaultControllerBrandCheckException$2(t){return new TypeError(`WritableStreamDefaultController.prototype.${t} can only be used on a WritableStreamDefaultController`)}function defaultWriterBrandCheckException(t){return new TypeError(`WritableStreamDefaultWriter.prototype.${t} can only be used on a WritableStreamDefaultWriter`)}function defaultWriterLockException(t){return new TypeError("Cannot "+t+" a stream using a released writer")}function defaultWriterClosedPromiseInitialize(t){t._closedPromise=newPromise(((r,n)=>{t._closedPromise_resolve=r;t._closedPromise_reject=n;t._closedPromiseState="pending"}))}function defaultWriterClosedPromiseInitializeAsRejected(t,r){defaultWriterClosedPromiseInitialize(t);defaultWriterClosedPromiseReject(t,r)}function defaultWriterClosedPromiseInitializeAsResolved(t){defaultWriterClosedPromiseInitialize(t);defaultWriterClosedPromiseResolve(t)}function defaultWriterClosedPromiseReject(t,r){if(t._closedPromise_reject===undefined){return}setPromiseIsHandledToTrue(t._closedPromise);t._closedPromise_reject(r);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined;t._closedPromiseState="rejected"}function defaultWriterClosedPromiseResetToRejected(t,r){defaultWriterClosedPromiseInitializeAsRejected(t,r)}function defaultWriterClosedPromiseResolve(t){if(t._closedPromise_resolve===undefined){return}t._closedPromise_resolve(undefined);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined;t._closedPromiseState="resolved"}function defaultWriterReadyPromiseInitialize(t){t._readyPromise=newPromise(((r,n)=>{t._readyPromise_resolve=r;t._readyPromise_reject=n}));t._readyPromiseState="pending"}function defaultWriterReadyPromiseInitializeAsRejected(t,r){defaultWriterReadyPromiseInitialize(t);defaultWriterReadyPromiseReject(t,r)}function defaultWriterReadyPromiseInitializeAsResolved(t){defaultWriterReadyPromiseInitialize(t);defaultWriterReadyPromiseResolve(t)}function defaultWriterReadyPromiseReject(t,r){if(t._readyPromise_reject===undefined){return}setPromiseIsHandledToTrue(t._readyPromise);t._readyPromise_reject(r);t._readyPromise_resolve=undefined;t._readyPromise_reject=undefined;t._readyPromiseState="rejected"}function defaultWriterReadyPromiseReset(t){defaultWriterReadyPromiseInitialize(t)}function defaultWriterReadyPromiseResetToRejected(t,r){defaultWriterReadyPromiseInitializeAsRejected(t,r)}function defaultWriterReadyPromiseResolve(t){if(t._readyPromise_resolve===undefined){return}t._readyPromise_resolve(undefined);t._readyPromise_resolve=undefined;t._readyPromise_reject=undefined;t._readyPromiseState="fulfilled"}const C=typeof DOMException!=="undefined"?DOMException:undefined;function isDOMExceptionConstructor(t){if(!(typeof t==="function"||typeof t==="object")){return false}try{new t;return true}catch(t){return false}}function createDOMExceptionPolyfill(){const t=function DOMException(t,r){this.message=t||"";this.name=r||"Error";if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}};t.prototype=Object.create(Error.prototype);Object.defineProperty(t.prototype,"constructor",{value:t,writable:true,configurable:true});return t}const v=isDOMExceptionConstructor(C)?C:createDOMExceptionPolyfill();function ReadableStreamPipeTo(t,r,n,o,a,s){const i=AcquireReadableStreamDefaultReader(t);const l=AcquireWritableStreamDefaultWriter(r);t._disturbed=true;let u=false;let c=promiseResolvedWith(undefined);return newPromise(((d,h)=>{let p;if(s!==undefined){p=()=>{const n=new v("Aborted","AbortError");const s=[];if(!o){s.push((()=>{if(r._state==="writable"){return WritableStreamAbort(r,n)}return promiseResolvedWith(undefined)}))}if(!a){s.push((()=>{if(t._state==="readable"){return ReadableStreamCancel(t,n)}return promiseResolvedWith(undefined)}))}shutdownWithAction((()=>Promise.all(s.map((t=>t())))),true,n)};if(s.aborted){p();return}s.addEventListener("abort",p)}function pipeLoop(){return newPromise(((t,r)=>{function next(n){if(n){t()}else{PerformPromiseThen(pipeStep(),next,r)}}next(false)}))}function pipeStep(){if(u){return promiseResolvedWith(true)}return PerformPromiseThen(l._readyPromise,(()=>newPromise(((t,r)=>{ReadableStreamDefaultReaderRead(i,{_chunkSteps:r=>{c=PerformPromiseThen(WritableStreamDefaultWriterWrite(l,r),undefined,noop);t(false)},_closeSteps:()=>t(true),_errorSteps:r})}))))}isOrBecomesErrored(t,i._closedPromise,(t=>{if(!o){shutdownWithAction((()=>WritableStreamAbort(r,t)),true,t)}else{shutdown(true,t)}}));isOrBecomesErrored(r,l._closedPromise,(r=>{if(!a){shutdownWithAction((()=>ReadableStreamCancel(t,r)),true,r)}else{shutdown(true,r)}}));isOrBecomesClosed(t,i._closedPromise,(()=>{if(!n){shutdownWithAction((()=>WritableStreamDefaultWriterCloseWithErrorPropagation(l)))}else{shutdown()}}));if(WritableStreamCloseQueuedOrInFlight(r)||r._state==="closed"){const r=new TypeError("the destination writable stream closed before all data could be piped to it");if(!a){shutdownWithAction((()=>ReadableStreamCancel(t,r)),true,r)}else{shutdown(true,r)}}setPromiseIsHandledToTrue(pipeLoop());function waitForWritesToFinish(){const t=c;return PerformPromiseThen(c,(()=>t!==c?waitForWritesToFinish():undefined))}function isOrBecomesErrored(t,r,n){if(t._state==="errored"){n(t._storedError)}else{uponRejection(r,n)}}function isOrBecomesClosed(t,r,n){if(t._state==="closed"){n()}else{uponFulfillment(r,n)}}function shutdownWithAction(t,n,o){if(u){return}u=true;if(r._state==="writable"&&!WritableStreamCloseQueuedOrInFlight(r)){uponFulfillment(waitForWritesToFinish(),doTheRest)}else{doTheRest()}function doTheRest(){uponPromise(t(),(()=>finalize(n,o)),(t=>finalize(true,t)))}}function shutdown(t,n){if(u){return}u=true;if(r._state==="writable"&&!WritableStreamCloseQueuedOrInFlight(r)){uponFulfillment(waitForWritesToFinish(),(()=>finalize(t,n)))}else{finalize(t,n)}}function finalize(t,r){WritableStreamDefaultWriterRelease(l);ReadableStreamReaderGenericRelease(i);if(s!==undefined){s.removeEventListener("abort",p)}if(t){h(r)}else{d(undefined)}}}))}class ReadableStreamDefaultController{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("desiredSize")}return ReadableStreamDefaultControllerGetDesiredSize(this)}close(){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("close")}if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)){throw new TypeError("The stream is not in a state that permits close")}ReadableStreamDefaultControllerClose(this)}enqueue(t=undefined){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("enqueue")}if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)){throw new TypeError("The stream is not in a state that permits enqueue")}return ReadableStreamDefaultControllerEnqueue(this,t)}error(t=undefined){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("error")}ReadableStreamDefaultControllerError(this,t)}[p](t){ResetQueue(this);const r=this._cancelAlgorithm(t);ReadableStreamDefaultControllerClearAlgorithms(this);return r}[m](t){const r=this._controlledReadableStream;if(this._queue.length>0){const n=DequeueValue(this);if(this._closeRequested&&this._queue.length===0){ReadableStreamDefaultControllerClearAlgorithms(this);ReadableStreamClose(r)}else{ReadableStreamDefaultControllerCallPullIfNeeded(this)}t._chunkSteps(n)}else{ReadableStreamAddReadRequest(r,t);ReadableStreamDefaultControllerCallPullIfNeeded(this)}}}Object.defineProperties(ReadableStreamDefaultController.prototype,{close:{enumerable:true},enqueue:{enumerable:true},error:{enumerable:true},desiredSize:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamDefaultController.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:true})}function IsReadableStreamDefaultController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledReadableStream")){return false}return t instanceof ReadableStreamDefaultController}function ReadableStreamDefaultControllerCallPullIfNeeded(t){const r=ReadableStreamDefaultControllerShouldCallPull(t);if(!r){return}if(t._pulling){t._pullAgain=true;return}t._pulling=true;const n=t._pullAlgorithm();uponPromise(n,(()=>{t._pulling=false;if(t._pullAgain){t._pullAgain=false;ReadableStreamDefaultControllerCallPullIfNeeded(t)}}),(r=>{ReadableStreamDefaultControllerError(t,r)}))}function ReadableStreamDefaultControllerShouldCallPull(t){const r=t._controlledReadableStream;if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(t)){return false}if(!t._started){return false}if(IsReadableStreamLocked(r)&&ReadableStreamGetNumReadRequests(r)>0){return true}const n=ReadableStreamDefaultControllerGetDesiredSize(t);if(n>0){return true}return false}function ReadableStreamDefaultControllerClearAlgorithms(t){t._pullAlgorithm=undefined;t._cancelAlgorithm=undefined;t._strategySizeAlgorithm=undefined}function ReadableStreamDefaultControllerClose(t){if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(t)){return}const r=t._controlledReadableStream;t._closeRequested=true;if(t._queue.length===0){ReadableStreamDefaultControllerClearAlgorithms(t);ReadableStreamClose(r)}}function ReadableStreamDefaultControllerEnqueue(t,r){if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(t)){return}const n=t._controlledReadableStream;if(IsReadableStreamLocked(n)&&ReadableStreamGetNumReadRequests(n)>0){ReadableStreamFulfillReadRequest(n,r,false)}else{let n;try{n=t._strategySizeAlgorithm(r)}catch(r){ReadableStreamDefaultControllerError(t,r);throw r}try{EnqueueValueWithSize(t,r,n)}catch(r){ReadableStreamDefaultControllerError(t,r);throw r}}ReadableStreamDefaultControllerCallPullIfNeeded(t)}function ReadableStreamDefaultControllerError(t,r){const n=t._controlledReadableStream;if(n._state!=="readable"){return}ResetQueue(t);ReadableStreamDefaultControllerClearAlgorithms(t);ReadableStreamError(n,r)}function ReadableStreamDefaultControllerGetDesiredSize(t){const r=t._controlledReadableStream._state;if(r==="errored"){return null}if(r==="closed"){return 0}return t._strategyHWM-t._queueTotalSize}function ReadableStreamDefaultControllerHasBackpressure(t){if(ReadableStreamDefaultControllerShouldCallPull(t)){return false}return true}function ReadableStreamDefaultControllerCanCloseOrEnqueue(t){const r=t._controlledReadableStream._state;if(!t._closeRequested&&r==="readable"){return true}return false}function SetUpReadableStreamDefaultController(t,r,n,o,a,s,i){r._controlledReadableStream=t;r._queue=undefined;r._queueTotalSize=undefined;ResetQueue(r);r._started=false;r._closeRequested=false;r._pullAgain=false;r._pulling=false;r._strategySizeAlgorithm=i;r._strategyHWM=s;r._pullAlgorithm=o;r._cancelAlgorithm=a;t._readableStreamController=r;const l=n();uponPromise(promiseResolvedWith(l),(()=>{r._started=true;ReadableStreamDefaultControllerCallPullIfNeeded(r)}),(t=>{ReadableStreamDefaultControllerError(r,t)}))}function SetUpReadableStreamDefaultControllerFromUnderlyingSource(t,r,n,o){const a=Object.create(ReadableStreamDefaultController.prototype);let startAlgorithm=()=>undefined;let pullAlgorithm=()=>promiseResolvedWith(undefined);let cancelAlgorithm=()=>promiseResolvedWith(undefined);if(r.start!==undefined){startAlgorithm=()=>r.start(a)}if(r.pull!==undefined){pullAlgorithm=()=>r.pull(a)}if(r.cancel!==undefined){cancelAlgorithm=t=>r.cancel(t)}SetUpReadableStreamDefaultController(t,a,startAlgorithm,pullAlgorithm,cancelAlgorithm,n,o)}function defaultControllerBrandCheckException$1(t){return new TypeError(`ReadableStreamDefaultController.prototype.${t} can only be used on a ReadableStreamDefaultController`)}function ReadableStreamTee(t,r){if(IsReadableByteStreamController(t._readableStreamController)){return ReadableByteStreamTee(t)}return ReadableStreamDefaultTee(t)}function ReadableStreamDefaultTee(t,r){const n=AcquireReadableStreamDefaultReader(t);let o=false;let a=false;let s=false;let i;let l;let c;let d;let h;const p=newPromise((t=>{h=t}));function pullAlgorithm(){if(o){return promiseResolvedWith(undefined)}o=true;const t={_chunkSteps:t=>{u((()=>{o=false;const r=t;const n=t;if(!a){ReadableStreamDefaultControllerEnqueue(c._readableStreamController,r)}if(!s){ReadableStreamDefaultControllerEnqueue(d._readableStreamController,n)}}))},_closeSteps:()=>{o=false;if(!a){ReadableStreamDefaultControllerClose(c._readableStreamController)}if(!s){ReadableStreamDefaultControllerClose(d._readableStreamController)}if(!a||!s){h(undefined)}},_errorSteps:()=>{o=false}};ReadableStreamDefaultReaderRead(n,t);return promiseResolvedWith(undefined)}function cancel1Algorithm(r){a=true;i=r;if(s){const r=CreateArrayFromList([i,l]);const n=ReadableStreamCancel(t,r);h(n)}return p}function cancel2Algorithm(r){s=true;l=r;if(a){const r=CreateArrayFromList([i,l]);const n=ReadableStreamCancel(t,r);h(n)}return p}function startAlgorithm(){}c=CreateReadableStream(startAlgorithm,pullAlgorithm,cancel1Algorithm);d=CreateReadableStream(startAlgorithm,pullAlgorithm,cancel2Algorithm);uponRejection(n._closedPromise,(t=>{ReadableStreamDefaultControllerError(c._readableStreamController,t);ReadableStreamDefaultControllerError(d._readableStreamController,t);if(!a||!s){h(undefined)}}));return[c,d]}function ReadableByteStreamTee(t){let r=AcquireReadableStreamDefaultReader(t);let n=false;let o=false;let a=false;let s;let i;let l;let c;let d;const h=newPromise((t=>{d=t}));function forwardReaderError(t){uponRejection(t._closedPromise,(n=>{if(t!==r){return}ReadableByteStreamControllerError(l._readableStreamController,n);ReadableByteStreamControllerError(c._readableStreamController,n);if(!o||!a){d(undefined)}}))}function pullWithDefaultReader(){if(IsReadableStreamBYOBReader(r)){ReadableStreamReaderGenericRelease(r);r=AcquireReadableStreamDefaultReader(t);forwardReaderError(r)}const s={_chunkSteps:r=>{u((()=>{n=false;const s=r;let i=r;if(!o&&!a){try{i=CloneAsUint8Array(r)}catch(r){ReadableByteStreamControllerError(l._readableStreamController,r);ReadableByteStreamControllerError(c._readableStreamController,r);d(ReadableStreamCancel(t,r));return}}if(!o){ReadableByteStreamControllerEnqueue(l._readableStreamController,s)}if(!a){ReadableByteStreamControllerEnqueue(c._readableStreamController,i)}}))},_closeSteps:()=>{n=false;if(!o){ReadableByteStreamControllerClose(l._readableStreamController)}if(!a){ReadableByteStreamControllerClose(c._readableStreamController)}if(l._readableStreamController._pendingPullIntos.length>0){ReadableByteStreamControllerRespond(l._readableStreamController,0)}if(c._readableStreamController._pendingPullIntos.length>0){ReadableByteStreamControllerRespond(c._readableStreamController,0)}if(!o||!a){d(undefined)}},_errorSteps:()=>{n=false}};ReadableStreamDefaultReaderRead(r,s)}function pullWithBYOBReader(s,i){if(IsReadableStreamDefaultReader(r)){ReadableStreamReaderGenericRelease(r);r=AcquireReadableStreamBYOBReader(t);forwardReaderError(r)}const h=i?c:l;const p=i?l:c;const m={_chunkSteps:r=>{u((()=>{n=false;const s=i?a:o;const l=i?o:a;if(!l){let n;try{n=CloneAsUint8Array(r)}catch(r){ReadableByteStreamControllerError(h._readableStreamController,r);ReadableByteStreamControllerError(p._readableStreamController,r);d(ReadableStreamCancel(t,r));return}if(!s){ReadableByteStreamControllerRespondWithNewView(h._readableStreamController,r)}ReadableByteStreamControllerEnqueue(p._readableStreamController,n)}else if(!s){ReadableByteStreamControllerRespondWithNewView(h._readableStreamController,r)}}))},_closeSteps:t=>{n=false;const r=i?a:o;const s=i?o:a;if(!r){ReadableByteStreamControllerClose(h._readableStreamController)}if(!s){ReadableByteStreamControllerClose(p._readableStreamController)}if(t!==undefined){if(!r){ReadableByteStreamControllerRespondWithNewView(h._readableStreamController,t)}if(!s&&p._readableStreamController._pendingPullIntos.length>0){ReadableByteStreamControllerRespond(p._readableStreamController,0)}}if(!r||!s){d(undefined)}},_errorSteps:()=>{n=false}};ReadableStreamBYOBReaderRead(r,s,m)}function pull1Algorithm(){if(n){return promiseResolvedWith(undefined)}n=true;const t=ReadableByteStreamControllerGetBYOBRequest(l._readableStreamController);if(t===null){pullWithDefaultReader()}else{pullWithBYOBReader(t._view,false)}return promiseResolvedWith(undefined)}function pull2Algorithm(){if(n){return promiseResolvedWith(undefined)}n=true;const t=ReadableByteStreamControllerGetBYOBRequest(c._readableStreamController);if(t===null){pullWithDefaultReader()}else{pullWithBYOBReader(t._view,true)}return promiseResolvedWith(undefined)}function cancel1Algorithm(r){o=true;s=r;if(a){const r=CreateArrayFromList([s,i]);const n=ReadableStreamCancel(t,r);d(n)}return h}function cancel2Algorithm(r){a=true;i=r;if(o){const r=CreateArrayFromList([s,i]);const n=ReadableStreamCancel(t,r);d(n)}return h}function startAlgorithm(){return}l=CreateReadableByteStream(startAlgorithm,pull1Algorithm,cancel1Algorithm);c=CreateReadableByteStream(startAlgorithm,pull2Algorithm,cancel2Algorithm);forwardReaderError(r);return[l,c]}function convertUnderlyingDefaultOrByteSource(t,r){assertDictionary(t,r);const n=t;const o=n===null||n===void 0?void 0:n.autoAllocateChunkSize;const a=n===null||n===void 0?void 0:n.cancel;const s=n===null||n===void 0?void 0:n.pull;const i=n===null||n===void 0?void 0:n.start;const l=n===null||n===void 0?void 0:n.type;return{autoAllocateChunkSize:o===undefined?undefined:convertUnsignedLongLongWithEnforceRange(o,`${r} has member 'autoAllocateChunkSize' that`),cancel:a===undefined?undefined:convertUnderlyingSourceCancelCallback(a,n,`${r} has member 'cancel' that`),pull:s===undefined?undefined:convertUnderlyingSourcePullCallback(s,n,`${r} has member 'pull' that`),start:i===undefined?undefined:convertUnderlyingSourceStartCallback(i,n,`${r} has member 'start' that`),type:l===undefined?undefined:convertReadableStreamType(l,`${r} has member 'type' that`)}}function convertUnderlyingSourceCancelCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertUnderlyingSourcePullCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertUnderlyingSourceStartCallback(t,r,n){assertFunction(t,n);return n=>reflectCall(t,r,[n])}function convertReadableStreamType(t,r){t=`${t}`;if(t!=="bytes"){throw new TypeError(`${r} '${t}' is not a valid enumeration value for ReadableStreamType`)}return t}function convertReaderOptions(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.mode;return{mode:n===undefined?undefined:convertReadableStreamReaderMode(n,`${r} has member 'mode' that`)}}function convertReadableStreamReaderMode(t,r){t=`${t}`;if(t!=="byob"){throw new TypeError(`${r} '${t}' is not a valid enumeration value for ReadableStreamReaderMode`)}return t}function convertIteratorOptions(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.preventCancel;return{preventCancel:Boolean(n)}}function convertPipeOptions(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.preventAbort;const o=t===null||t===void 0?void 0:t.preventCancel;const a=t===null||t===void 0?void 0:t.preventClose;const s=t===null||t===void 0?void 0:t.signal;if(s!==undefined){assertAbortSignal(s,`${r} has member 'signal' that`)}return{preventAbort:Boolean(n),preventCancel:Boolean(o),preventClose:Boolean(a),signal:s}}function assertAbortSignal(t,r){if(!isAbortSignal(t)){throw new TypeError(`${r} is not an AbortSignal.`)}}function convertReadableWritablePair(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.readable;assertRequiredField(n,"readable","ReadableWritablePair");assertReadableStream(n,`${r} has member 'readable' that`);const o=t===null||t===void 0?void 0:t.writable;assertRequiredField(o,"writable","ReadableWritablePair");assertWritableStream(o,`${r} has member 'writable' that`);return{readable:n,writable:o}}class ReadableStream{constructor(t={},r={}){if(t===undefined){t=null}else{assertObject(t,"First parameter")}const n=convertQueuingStrategy(r,"Second parameter");const o=convertUnderlyingDefaultOrByteSource(t,"First parameter");InitializeReadableStream(this);if(o.type==="bytes"){if(n.size!==undefined){throw new RangeError("The strategy for a byte stream cannot have a size function")}const t=ExtractHighWaterMark(n,0);SetUpReadableByteStreamControllerFromUnderlyingSource(this,o,t)}else{const t=ExtractSizeAlgorithm(n);const r=ExtractHighWaterMark(n,1);SetUpReadableStreamDefaultControllerFromUnderlyingSource(this,o,r,t)}}get locked(){if(!IsReadableStream(this)){throw streamBrandCheckException$1("locked")}return IsReadableStreamLocked(this)}cancel(t=undefined){if(!IsReadableStream(this)){return promiseRejectedWith(streamBrandCheckException$1("cancel"))}if(IsReadableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot cancel a stream that already has a reader"))}return ReadableStreamCancel(this,t)}getReader(t=undefined){if(!IsReadableStream(this)){throw streamBrandCheckException$1("getReader")}const r=convertReaderOptions(t,"First parameter");if(r.mode===undefined){return AcquireReadableStreamDefaultReader(this)}return AcquireReadableStreamBYOBReader(this)}pipeThrough(t,r={}){if(!IsReadableStream(this)){throw streamBrandCheckException$1("pipeThrough")}assertRequiredArgument(t,1,"pipeThrough");const n=convertReadableWritablePair(t,"First parameter");const o=convertPipeOptions(r,"Second parameter");if(IsReadableStreamLocked(this)){throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream")}if(IsWritableStreamLocked(n.writable)){throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream")}const a=ReadableStreamPipeTo(this,n.writable,o.preventClose,o.preventAbort,o.preventCancel,o.signal);setPromiseIsHandledToTrue(a);return n.readable}pipeTo(t,r={}){if(!IsReadableStream(this)){return promiseRejectedWith(streamBrandCheckException$1("pipeTo"))}if(t===undefined){return promiseRejectedWith(`Parameter 1 is required in 'pipeTo'.`)}if(!IsWritableStream(t)){return promiseRejectedWith(new TypeError(`ReadableStream.prototype.pipeTo's first argument must be a WritableStream`))}let n;try{n=convertPipeOptions(r,"Second parameter")}catch(t){return promiseRejectedWith(t)}if(IsReadableStreamLocked(this)){return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"))}if(IsWritableStreamLocked(t)){return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"))}return ReadableStreamPipeTo(this,t,n.preventClose,n.preventAbort,n.preventCancel,n.signal)}tee(){if(!IsReadableStream(this)){throw streamBrandCheckException$1("tee")}const t=ReadableStreamTee(this);return CreateArrayFromList(t)}values(t=undefined){if(!IsReadableStream(this)){throw streamBrandCheckException$1("values")}const r=convertIteratorOptions(t,"First parameter");return AcquireReadableStreamAsyncIterator(this,r.preventCancel)}}Object.defineProperties(ReadableStream.prototype,{cancel:{enumerable:true},getReader:{enumerable:true},pipeThrough:{enumerable:true},pipeTo:{enumerable:true},tee:{enumerable:true},values:{enumerable:true},locked:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStream.prototype,r.toStringTag,{value:"ReadableStream",configurable:true})}if(typeof r.asyncIterator==="symbol"){Object.defineProperty(ReadableStream.prototype,r.asyncIterator,{value:ReadableStream.prototype.values,writable:true,configurable:true})}function CreateReadableStream(t,r,n,o=1,a=(()=>1)){const s=Object.create(ReadableStream.prototype);InitializeReadableStream(s);const i=Object.create(ReadableStreamDefaultController.prototype);SetUpReadableStreamDefaultController(s,i,t,r,n,o,a);return s}function CreateReadableByteStream(t,r,n){const o=Object.create(ReadableStream.prototype);InitializeReadableStream(o);const a=Object.create(ReadableByteStreamController.prototype);SetUpReadableByteStreamController(o,a,t,r,n,0,undefined);return o}function InitializeReadableStream(t){t._state="readable";t._reader=undefined;t._storedError=undefined;t._disturbed=false}function IsReadableStream(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_readableStreamController")){return false}return t instanceof ReadableStream}function IsReadableStreamLocked(t){if(t._reader===undefined){return false}return true}function ReadableStreamCancel(t,r){t._disturbed=true;if(t._state==="closed"){return promiseResolvedWith(undefined)}if(t._state==="errored"){return promiseRejectedWith(t._storedError)}ReadableStreamClose(t);const n=t._reader;if(n!==undefined&&IsReadableStreamBYOBReader(n)){n._readIntoRequests.forEach((t=>{t._closeSteps(undefined)}));n._readIntoRequests=new SimpleQueue}const o=t._readableStreamController[p](r);return transformPromiseWith(o,noop)}function ReadableStreamClose(t){t._state="closed";const r=t._reader;if(r===undefined){return}defaultReaderClosedPromiseResolve(r);if(IsReadableStreamDefaultReader(r)){r._readRequests.forEach((t=>{t._closeSteps()}));r._readRequests=new SimpleQueue}}function ReadableStreamError(t,r){t._state="errored";t._storedError=r;const n=t._reader;if(n===undefined){return}defaultReaderClosedPromiseReject(n,r);if(IsReadableStreamDefaultReader(n)){n._readRequests.forEach((t=>{t._errorSteps(r)}));n._readRequests=new SimpleQueue}else{n._readIntoRequests.forEach((t=>{t._errorSteps(r)}));n._readIntoRequests=new SimpleQueue}}function streamBrandCheckException$1(t){return new TypeError(`ReadableStream.prototype.${t} can only be used on a ReadableStream`)}function convertQueuingStrategyInit(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.highWaterMark;assertRequiredField(n,"highWaterMark","QueuingStrategyInit");return{highWaterMark:convertUnrestrictedDouble(n)}}const byteLengthSizeFunction=t=>t.byteLength;Object.defineProperty(byteLengthSizeFunction,"name",{value:"size",configurable:true});class ByteLengthQueuingStrategy{constructor(t){assertRequiredArgument(t,1,"ByteLengthQueuingStrategy");t=convertQueuingStrategyInit(t,"First parameter");this._byteLengthQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!IsByteLengthQueuingStrategy(this)){throw byteLengthBrandCheckException("highWaterMark")}return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!IsByteLengthQueuingStrategy(this)){throw byteLengthBrandCheckException("size")}return byteLengthSizeFunction}}Object.defineProperties(ByteLengthQueuingStrategy.prototype,{highWaterMark:{enumerable:true},size:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ByteLengthQueuingStrategy.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:true})}function byteLengthBrandCheckException(t){return new TypeError(`ByteLengthQueuingStrategy.prototype.${t} can only be used on a ByteLengthQueuingStrategy`)}function IsByteLengthQueuingStrategy(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_byteLengthQueuingStrategyHighWaterMark")){return false}return t instanceof ByteLengthQueuingStrategy}const countSizeFunction=()=>1;Object.defineProperty(countSizeFunction,"name",{value:"size",configurable:true});class CountQueuingStrategy{constructor(t){assertRequiredArgument(t,1,"CountQueuingStrategy");t=convertQueuingStrategyInit(t,"First parameter");this._countQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!IsCountQueuingStrategy(this)){throw countBrandCheckException("highWaterMark")}return this._countQueuingStrategyHighWaterMark}get size(){if(!IsCountQueuingStrategy(this)){throw countBrandCheckException("size")}return countSizeFunction}}Object.defineProperties(CountQueuingStrategy.prototype,{highWaterMark:{enumerable:true},size:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(CountQueuingStrategy.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:true})}function countBrandCheckException(t){return new TypeError(`CountQueuingStrategy.prototype.${t} can only be used on a CountQueuingStrategy`)}function IsCountQueuingStrategy(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_countQueuingStrategyHighWaterMark")){return false}return t instanceof CountQueuingStrategy}function convertTransformer(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.flush;const o=t===null||t===void 0?void 0:t.readableType;const a=t===null||t===void 0?void 0:t.start;const s=t===null||t===void 0?void 0:t.transform;const i=t===null||t===void 0?void 0:t.writableType;return{flush:n===undefined?undefined:convertTransformerFlushCallback(n,t,`${r} has member 'flush' that`),readableType:o,start:a===undefined?undefined:convertTransformerStartCallback(a,t,`${r} has member 'start' that`),transform:s===undefined?undefined:convertTransformerTransformCallback(s,t,`${r} has member 'transform' that`),writableType:i}}function convertTransformerFlushCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertTransformerStartCallback(t,r,n){assertFunction(t,n);return n=>reflectCall(t,r,[n])}function convertTransformerTransformCallback(t,r,n){assertFunction(t,n);return(n,o)=>promiseCall(t,r,[n,o])}class TransformStream{constructor(t={},r={},n={}){if(t===undefined){t=null}const o=convertQueuingStrategy(r,"Second parameter");const a=convertQueuingStrategy(n,"Third parameter");const s=convertTransformer(t,"First parameter");if(s.readableType!==undefined){throw new RangeError("Invalid readableType specified")}if(s.writableType!==undefined){throw new RangeError("Invalid writableType specified")}const i=ExtractHighWaterMark(a,0);const l=ExtractSizeAlgorithm(a);const u=ExtractHighWaterMark(o,1);const c=ExtractSizeAlgorithm(o);let d;const h=newPromise((t=>{d=t}));InitializeTransformStream(this,h,u,c,i,l);SetUpTransformStreamDefaultControllerFromTransformer(this,s);if(s.start!==undefined){d(s.start(this._transformStreamController))}else{d(undefined)}}get readable(){if(!IsTransformStream(this)){throw streamBrandCheckException("readable")}return this._readable}get writable(){if(!IsTransformStream(this)){throw streamBrandCheckException("writable")}return this._writable}}Object.defineProperties(TransformStream.prototype,{readable:{enumerable:true},writable:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(TransformStream.prototype,r.toStringTag,{value:"TransformStream",configurable:true})}function InitializeTransformStream(t,r,n,o,a,s){function startAlgorithm(){return r}function writeAlgorithm(r){return TransformStreamDefaultSinkWriteAlgorithm(t,r)}function abortAlgorithm(r){return TransformStreamDefaultSinkAbortAlgorithm(t,r)}function closeAlgorithm(){return TransformStreamDefaultSinkCloseAlgorithm(t)}t._writable=CreateWritableStream(startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,n,o);function pullAlgorithm(){return TransformStreamDefaultSourcePullAlgorithm(t)}function cancelAlgorithm(r){TransformStreamErrorWritableAndUnblockWrite(t,r);return promiseResolvedWith(undefined)}t._readable=CreateReadableStream(startAlgorithm,pullAlgorithm,cancelAlgorithm,a,s);t._backpressure=undefined;t._backpressureChangePromise=undefined;t._backpressureChangePromise_resolve=undefined;TransformStreamSetBackpressure(t,true);t._transformStreamController=undefined}function IsTransformStream(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_transformStreamController")){return false}return t instanceof TransformStream}function TransformStreamError(t,r){ReadableStreamDefaultControllerError(t._readable._readableStreamController,r);TransformStreamErrorWritableAndUnblockWrite(t,r)}function TransformStreamErrorWritableAndUnblockWrite(t,r){TransformStreamDefaultControllerClearAlgorithms(t._transformStreamController);WritableStreamDefaultControllerErrorIfNeeded(t._writable._writableStreamController,r);if(t._backpressure){TransformStreamSetBackpressure(t,false)}}function TransformStreamSetBackpressure(t,r){if(t._backpressureChangePromise!==undefined){t._backpressureChangePromise_resolve()}t._backpressureChangePromise=newPromise((r=>{t._backpressureChangePromise_resolve=r}));t._backpressure=r}class TransformStreamDefaultController{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("desiredSize")}const t=this._controlledTransformStream._readable._readableStreamController;return ReadableStreamDefaultControllerGetDesiredSize(t)}enqueue(t=undefined){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("enqueue")}TransformStreamDefaultControllerEnqueue(this,t)}error(t=undefined){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("error")}TransformStreamDefaultControllerError(this,t)}terminate(){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("terminate")}TransformStreamDefaultControllerTerminate(this)}}Object.defineProperties(TransformStreamDefaultController.prototype,{enqueue:{enumerable:true},error:{enumerable:true},terminate:{enumerable:true},desiredSize:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(TransformStreamDefaultController.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:true})}function IsTransformStreamDefaultController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledTransformStream")){return false}return t instanceof TransformStreamDefaultController}function SetUpTransformStreamDefaultController(t,r,n,o){r._controlledTransformStream=t;t._transformStreamController=r;r._transformAlgorithm=n;r._flushAlgorithm=o}function SetUpTransformStreamDefaultControllerFromTransformer(t,r){const n=Object.create(TransformStreamDefaultController.prototype);let transformAlgorithm=t=>{try{TransformStreamDefaultControllerEnqueue(n,t);return promiseResolvedWith(undefined)}catch(t){return promiseRejectedWith(t)}};let flushAlgorithm=()=>promiseResolvedWith(undefined);if(r.transform!==undefined){transformAlgorithm=t=>r.transform(t,n)}if(r.flush!==undefined){flushAlgorithm=()=>r.flush(n)}SetUpTransformStreamDefaultController(t,n,transformAlgorithm,flushAlgorithm)}function TransformStreamDefaultControllerClearAlgorithms(t){t._transformAlgorithm=undefined;t._flushAlgorithm=undefined}function TransformStreamDefaultControllerEnqueue(t,r){const n=t._controlledTransformStream;const o=n._readable._readableStreamController;if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(o)){throw new TypeError("Readable side is not in a state that permits enqueue")}try{ReadableStreamDefaultControllerEnqueue(o,r)}catch(t){TransformStreamErrorWritableAndUnblockWrite(n,t);throw n._readable._storedError}const a=ReadableStreamDefaultControllerHasBackpressure(o);if(a!==n._backpressure){TransformStreamSetBackpressure(n,true)}}function TransformStreamDefaultControllerError(t,r){TransformStreamError(t._controlledTransformStream,r)}function TransformStreamDefaultControllerPerformTransform(t,r){const n=t._transformAlgorithm(r);return transformPromiseWith(n,undefined,(r=>{TransformStreamError(t._controlledTransformStream,r);throw r}))}function TransformStreamDefaultControllerTerminate(t){const r=t._controlledTransformStream;const n=r._readable._readableStreamController;ReadableStreamDefaultControllerClose(n);const o=new TypeError("TransformStream terminated");TransformStreamErrorWritableAndUnblockWrite(r,o)}function TransformStreamDefaultSinkWriteAlgorithm(t,r){const n=t._transformStreamController;if(t._backpressure){const o=t._backpressureChangePromise;return transformPromiseWith(o,(()=>{const o=t._writable;const a=o._state;if(a==="erroring"){throw o._storedError}return TransformStreamDefaultControllerPerformTransform(n,r)}))}return TransformStreamDefaultControllerPerformTransform(n,r)}function TransformStreamDefaultSinkAbortAlgorithm(t,r){TransformStreamError(t,r);return promiseResolvedWith(undefined)}function TransformStreamDefaultSinkCloseAlgorithm(t){const r=t._readable;const n=t._transformStreamController;const o=n._flushAlgorithm();TransformStreamDefaultControllerClearAlgorithms(n);return transformPromiseWith(o,(()=>{if(r._state==="errored"){throw r._storedError}ReadableStreamDefaultControllerClose(r._readableStreamController)}),(n=>{TransformStreamError(t,n);throw r._storedError}))}function TransformStreamDefaultSourcePullAlgorithm(t){TransformStreamSetBackpressure(t,false);return t._backpressureChangePromise}function defaultControllerBrandCheckException(t){return new TypeError(`TransformStreamDefaultController.prototype.${t} can only be used on a TransformStreamDefaultController`)}function streamBrandCheckException(t){return new TypeError(`TransformStream.prototype.${t} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=ByteLengthQueuingStrategy;t.CountQueuingStrategy=CountQueuingStrategy;t.ReadableByteStreamController=ReadableByteStreamController;t.ReadableStream=ReadableStream;t.ReadableStreamBYOBReader=ReadableStreamBYOBReader;t.ReadableStreamBYOBRequest=ReadableStreamBYOBRequest;t.ReadableStreamDefaultController=ReadableStreamDefaultController;t.ReadableStreamDefaultReader=ReadableStreamDefaultReader;t.TransformStream=TransformStream;t.TransformStreamDefaultController=TransformStreamDefaultController;t.WritableStream=WritableStream;t.WritableStreamDefaultController=WritableStreamDefaultController;t.WritableStreamDefaultWriter=WritableStreamDefaultWriter;Object.defineProperty(t,"__esModule",{value:true})}))},4091:t=>{t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},665:(t,r,n)=>{t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var r=this;if(!(r instanceof Yallist)){r=new Yallist}r.tail=null;r.head=null;r.length=0;if(t&&typeof t.forEach==="function"){t.forEach((function(t){r.push(t)}))}else if(arguments.length>0){for(var n=0,o=arguments.length;n<o;n++){r.push(arguments[n])}}return r}Yallist.prototype.removeNode=function(t){if(t.list!==this){throw new Error("removing node which does not belong to this list")}var r=t.next;var n=t.prev;if(r){r.prev=n}if(n){n.next=r}if(t===this.head){this.head=r}if(t===this.tail){this.tail=n}t.list.length--;t.next=null;t.prev=null;t.list=null;return r};Yallist.prototype.unshiftNode=function(t){if(t===this.head){return}if(t.list){t.list.removeNode(t)}var r=this.head;t.list=this;t.next=r;if(r){r.prev=t}this.head=t;if(!this.tail){this.tail=t}this.length++};Yallist.prototype.pushNode=function(t){if(t===this.tail){return}if(t.list){t.list.removeNode(t)}var r=this.tail;t.list=this;t.prev=r;if(r){r.next=t}this.tail=t;if(!this.head){this.head=t}this.length++};Yallist.prototype.push=function(){for(var t=0,r=arguments.length;t<r;t++){push(this,arguments[t])}return this.length};Yallist.prototype.unshift=function(){for(var t=0,r=arguments.length;t<r;t++){unshift(this,arguments[t])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var t=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return t};Yallist.prototype.shift=function(){if(!this.head){return undefined}var t=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return t};Yallist.prototype.forEach=function(t,r){r=r||this;for(var n=this.head,o=0;n!==null;o++){t.call(r,n.value,o,this);n=n.next}};Yallist.prototype.forEachReverse=function(t,r){r=r||this;for(var n=this.tail,o=this.length-1;n!==null;o--){t.call(r,n.value,o,this);n=n.prev}};Yallist.prototype.get=function(t){for(var r=0,n=this.head;n!==null&&r<t;r++){n=n.next}if(r===t&&n!==null){return n.value}};Yallist.prototype.getReverse=function(t){for(var r=0,n=this.tail;n!==null&&r<t;r++){n=n.prev}if(r===t&&n!==null){return n.value}};Yallist.prototype.map=function(t,r){r=r||this;var n=new Yallist;for(var o=this.head;o!==null;){n.push(t.call(r,o.value,this));o=o.next}return n};Yallist.prototype.mapReverse=function(t,r){r=r||this;var n=new Yallist;for(var o=this.tail;o!==null;){n.push(t.call(r,o.value,this));o=o.prev}return n};Yallist.prototype.reduce=function(t,r){var n;var o=this.head;if(arguments.length>1){n=r}else if(this.head){o=this.head.next;n=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var a=0;o!==null;a++){n=t(n,o.value,a);o=o.next}return n};Yallist.prototype.reduceReverse=function(t,r){var n;var o=this.tail;if(arguments.length>1){n=r}else if(this.tail){o=this.tail.prev;n=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var a=this.length-1;o!==null;a--){n=t(n,o.value,a);o=o.prev}return n};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var r=0,n=this.head;n!==null;r++){t[r]=n.value;n=n.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var r=0,n=this.tail;n!==null;r++){t[r]=n.value;n=n.prev}return t};Yallist.prototype.slice=function(t,r){r=r||this.length;if(r<0){r+=this.length}t=t||0;if(t<0){t+=this.length}var n=new Yallist;if(r<t||r<0){return n}if(t<0){t=0}if(r>this.length){r=this.length}for(var o=0,a=this.head;a!==null&&o<t;o++){a=a.next}for(;a!==null&&o<r;o++,a=a.next){n.push(a.value)}return n};Yallist.prototype.sliceReverse=function(t,r){r=r||this.length;if(r<0){r+=this.length}t=t||0;if(t<0){t+=this.length}var n=new Yallist;if(r<t||r<0){return n}if(t<0){t=0}if(r>this.length){r=this.length}for(var o=this.length,a=this.tail;a!==null&&o>r;o--){a=a.prev}for(;a!==null&&o>t;o--,a=a.prev){n.push(a.value)}return n};Yallist.prototype.splice=function(t,r,...n){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var o=0,a=this.head;a!==null&&o<t;o++){a=a.next}var s=[];for(var o=0;a&&o<r;o++){s.push(a.value);a=this.removeNode(a)}if(a===null){a=this.tail}if(a!==this.head&&a!==this.tail){a=a.prev}for(var o=0;o<n.length;o++){a=insert(this,a,n[o])}return s};Yallist.prototype.reverse=function(){var t=this.head;var r=this.tail;for(var n=t;n!==null;n=n.prev){var o=n.prev;n.prev=n.next;n.next=o}this.head=r;this.tail=t;return this};function insert(t,r,n){var o=r===t.head?new Node(n,null,r,t):new Node(n,r,r.next,t);if(o.next===null){t.tail=o}if(o.prev===null){t.head=o}t.length++;return o}function push(t,r){t.tail=new Node(r,t.tail,null,t);if(!t.head){t.head=t.tail}t.length++}function unshift(t,r){t.head=new Node(r,null,t.head,t);if(!t.tail){t.tail=t.head}t.length++}function Node(t,r,n,o){if(!(this instanceof Node)){return new Node(t,r,n,o)}this.list=o;this.value=t;if(r){r.next=this;this.prev=r}else{this.prev=null}if(n){n.prev=this;this.next=n}else{this.next=null}}try{n(4091)(Yallist)}catch(t){}},9491:r=>{r.exports=t(import.meta.url)("assert")},4300:r=>{r.exports=t(import.meta.url)("buffer")},2361:r=>{r.exports=t(import.meta.url)("events")},7147:r=>{r.exports=t(import.meta.url)("fs")},1808:r=>{r.exports=t(import.meta.url)("net")},7742:r=>{r.exports=t(import.meta.url)("node:process")},2477:r=>{r.exports=t(import.meta.url)("node:stream/web")},2037:r=>{r.exports=t(import.meta.url)("os")},1017:r=>{r.exports=t(import.meta.url)("path")},4404:r=>{r.exports=t(import.meta.url)("tls")},6224:r=>{r.exports=t(import.meta.url)("tty")},7310:r=>{r.exports=t(import.meta.url)("url")},3837:r=>{r.exports=t(import.meta.url)("util")},1267:r=>{r.exports=t(import.meta.url)("worker_threads")},8572:(t,r,n)=>{const o=65536;if(!globalThis.ReadableStream){try{const t=n(7742);const{emitWarning:r}=t;try{t.emitWarning=()=>{};Object.assign(globalThis,n(2477));t.emitWarning=r}catch(n){t.emitWarning=r;throw n}}catch(t){Object.assign(globalThis,n(1452))}}try{const{Blob:t}=n(4300);if(t&&!t.prototype.stream){t.prototype.stream=function name(t){let r=0;const n=this;return new ReadableStream({type:"bytes",async pull(t){const a=n.slice(r,Math.min(n.size,r+o));const s=await a.arrayBuffer();r+=s.byteLength;t.enqueue(new Uint8Array(s));if(r===n.size){t.close()}}})}}}catch(t){}},3213:(t,r,n)=>{n.d(r,{Z:()=>i});var o=n(1410);const a=class File extends o.Z{#e=0;#t="";constructor(t,r,n={}){if(arguments.length<2){throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`)}super(t,n);if(n===null)n={};const o=n.lastModified===undefined?Date.now():Number(n.lastModified);if(!Number.isNaN(o)){this.#e=o}this.#t=String(r)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](t){return!!t&&t instanceof o.Z&&/^(File)$/.test(t[Symbol.toStringTag])}};const s=a;const i=s},2777:(r,n,o)=>{o.d(n,{$B:()=>l.Z});const a=t(import.meta.url)("node:fs");const s=t(import.meta.url)("node:path");var i=o(7760);var l=o(3213);var u=o(1410);const{stat:c}=a.promises;const blobFromSync=(t,r)=>fromBlob(statSync(t),t,r);const blobFrom=(t,r)=>c(t).then((n=>fromBlob(n,t,r)));const fileFrom=(t,r)=>c(t).then((n=>fromFile(n,t,r)));const fileFromSync=(t,r)=>fromFile(statSync(t),t,r);const fromBlob=(t,r,n="")=>new Blob([new BlobDataItem({path:r,size:t.size,lastModified:t.mtimeMs,start:0})],{type:n});const fromFile=(t,r,n="")=>new File([new BlobDataItem({path:r,size:t.size,lastModified:t.mtimeMs,start:0})],basename(r),{type:n,lastModified:t.mtimeMs});class BlobDataItem{#r;#n;constructor(t){this.#r=t.path;this.#n=t.start;this.size=t.size;this.lastModified=t.lastModified}slice(t,r){return new BlobDataItem({path:this.#r,lastModified:this.lastModified,size:r-t,start:this.#n+t})}async*stream(){const{mtimeMs:t}=await c(this.#r);if(t>this.lastModified){throw new DOMException("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError")}yield*createReadStream(this.#r,{start:this.#n,end:this.#n+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}const d=null&&blobFromSync},1410:(t,r,n)=>{n.d(r,{Z:()=>l});var o=n(8572);const a=65536;async function*toIterator(t,r=true){for(const n of t){if("stream"in n){yield*n.stream()}else if(ArrayBuffer.isView(n)){if(r){let t=n.byteOffset;const r=n.byteOffset+n.byteLength;while(t!==r){const o=Math.min(r-t,a);const s=n.buffer.slice(t,t+o);t+=s.byteLength;yield new Uint8Array(s)}}else{yield n}}else{let t=0,r=n;while(t!==r.size){const n=r.slice(t,Math.min(r.size,t+a));const o=await n.arrayBuffer();t+=o.byteLength;yield new Uint8Array(o)}}}}const s=class Blob{#o=[];#a="";#s=0;#i="transparent";constructor(t=[],r={}){if(typeof t!=="object"||t===null){throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.")}if(typeof t[Symbol.iterator]!=="function"){throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.")}if(typeof r!=="object"&&typeof r!=="function"){throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.")}if(r===null)r={};const n=new TextEncoder;for(const r of t){let t;if(ArrayBuffer.isView(r)){t=new Uint8Array(r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength))}else if(r instanceof ArrayBuffer){t=new Uint8Array(r.slice(0))}else if(r instanceof Blob){t=r}else{t=n.encode(`${r}`)}this.#s+=ArrayBuffer.isView(t)?t.byteLength:t.size;this.#o.push(t)}this.#i=`${r.endings===undefined?"transparent":r.endings}`;const o=r.type===undefined?"":String(r.type);this.#a=/^[\x20-\x7E]*$/.test(o)?o:""}get size(){return this.#s}get type(){return this.#a}async text(){const t=new TextDecoder;let r="";for await(const n of toIterator(this.#o,false)){r+=t.decode(n,{stream:true})}r+=t.decode();return r}async arrayBuffer(){const t=new Uint8Array(this.size);let r=0;for await(const n of toIterator(this.#o,false)){t.set(n,r);r+=n.length}return t.buffer}stream(){const t=toIterator(this.#o,true);return new globalThis.ReadableStream({type:"bytes",async pull(r){const n=await t.next();n.done?r.close():r.enqueue(n.value)},async cancel(){await t.return()}})}slice(t=0,r=this.size,n=""){const{size:o}=this;let a=t<0?Math.max(o+t,0):Math.min(t,o);let s=r<0?Math.max(o+r,0):Math.min(r,o);const i=Math.max(s-a,0);const l=this.#o;const u=[];let c=0;for(const t of l){if(c>=i){break}const r=ArrayBuffer.isView(t)?t.byteLength:t.size;if(a&&r<=a){a-=r;s-=r}else{let n;if(ArrayBuffer.isView(t)){n=t.subarray(a,Math.min(r,s));c+=n.byteLength}else{n=t.slice(a,Math.min(r,s));c+=n.size}s-=r;u.push(n);a=0}}const d=new Blob([],{type:String(n).toLowerCase()});d.#s=i;d.#o=u;return d}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](t){return t&&typeof t==="object"&&typeof t.constructor==="function"&&(typeof t.stream==="function"||typeof t.arrayBuffer==="function")&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}};Object.defineProperties(s.prototype,{size:{enumerable:true},type:{enumerable:true},slice:{enumerable:true}});const i=s;const l=i},8010:(t,r,n)=>{n.d(r,{Ct:()=>h,au:()=>formDataToBlob});var o=n(1410);var a=n(3213);var{toStringTag:s,iterator:i,hasInstance:l}=Symbol,u=Math.random,c="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),f=(t,r,n)=>(t+="",/^(Blob|File)$/.test(r&&r[s])?[(n=n!==void 0?n+"":r[s]=="File"?r.name:"blob",t),r.name!==n||r[s]=="blob"?new a.Z([r],n,r):r]:[t,r+""]),e=(t,r)=>(r?t:t.replace(/\r?\n|\r/g,"\r\n")).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),x=(t,r,n)=>{if(r.length<n){throw new TypeError(`Failed to execute '${t}' on 'FormData': ${n} arguments required, but only ${r.length} present.`)}};const d=null&&F;const h=class FormData{#l=[];constructor(...t){if(t.length)throw new TypeError(`Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.`)}get[s](){return"FormData"}[i](){return this.entries()}static[l](t){return t&&typeof t==="object"&&t[s]==="FormData"&&!c.some((r=>typeof t[r]!="function"))}append(...t){x("append",arguments,2);this.#l.push(f(...t))}delete(t){x("delete",arguments,1);t+="";this.#l=this.#l.filter((([r])=>r!==t))}get(t){x("get",arguments,1);t+="";for(var r=this.#l,n=r.length,o=0;o<n;o++)if(r[o][0]===t)return r[o][1];return null}getAll(t,r){x("getAll",arguments,1);r=[];t+="";this.#l.forEach((n=>n[0]===t&&r.push(n[1])));return r}has(t){x("has",arguments,1);t+="";return this.#l.some((r=>r[0]===t))}forEach(t,r){x("forEach",arguments,1);for(var[n,o]of this)t.call(r,o,n,this)}set(...t){x("set",arguments,2);var r=[],n=!0;t=f(...t);this.#l.forEach((o=>{o[0]===t[0]?n&&(n=!r.push(t)):r.push(o)}));n&&r.push(t);this.#l=r}*entries(){yield*this.#l}*keys(){for(var[t]of this)yield t}*values(){for(var[,t]of this)yield t}};function formDataToBlob(t,r=o.Z){var n=`${u()}${u()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),a=[],s=`--${n}\r\nContent-Disposition: form-data; name="`;t.forEach(((t,r)=>typeof t=="string"?a.push(s+e(r)+`"\r\n\r\n${t.replace(/\r(?!\n)|(?<!\r)\n/g,"\r\n")}\r\n`):a.push(s+e(r)+`"; filename="${e(t.name,1)}"\r\nContent-Type: ${t.type||"application/octet-stream"}\r\n\r\n`,t,"\r\n")));a.push(`--${n}--`);return new r(a,{type:"multipart/form-data; boundary="+n})}}};var n={};function __nccwpck_require__(t){var o=n[t];if(o!==undefined){return o.exports}var a=n[t]={exports:{}};var s=true;try{r[t].call(a.exports,a,a.exports,__nccwpck_require__);s=false}finally{if(s)delete n[t]}return a.exports}__nccwpck_require__.m=r;(()=>{__nccwpck_require__.d=(t,r)=>{for(var n in r){if(__nccwpck_require__.o(r,n)&&!__nccwpck_require__.o(t,n)){Object.defineProperty(t,n,{enumerable:true,get:r[n]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=t=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((r,n)=>{__nccwpck_require__.f[n](t,r);return r}),[]))})();(()=>{__nccwpck_require__.u=t=>""+t+".index.js"})();(()=>{__nccwpck_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=new URL(".",import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/)?1:0,-1)+"/";(()=>{var t={179:0};var installChunk=r=>{var{ids:n,modules:o,runtime:a}=r;var s,i,l=0;for(s in o){if(__nccwpck_require__.o(o,s)){__nccwpck_require__.m[s]=o[s]}}if(a)a(__nccwpck_require__);for(;l<n.length;l++){i=n[l];if(__nccwpck_require__.o(t,i)&&t[i]){t[i][0]()}t[n[l]]=0}};__nccwpck_require__.f.j=(r,n)=>{var o=__nccwpck_require__.o(t,r)?t[r]:undefined;if(o!==0){if(o){n.push(o[1])}else{if(true){var a=import("./"+__nccwpck_require__.u(r)).then(installChunk,(n=>{if(t[r]!==0)t[r]=undefined;throw n}));var a=Promise.race([a,new Promise((n=>o=t[r]=[n]))]);n.push(o[1]=a)}else t[r]=0}}}})();var o={};(()=>{function ansiRegex({onlyFirst:t=false}={}){const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,t?undefined:"g")}const r=t(import.meta.url)("dns");var n=__nccwpck_require__(3764);var o=__nccwpck_require__(7219);class QuickLRU{constructor(t={}){if(!(t.maxSize&&t.maxSize>0)){throw new TypeError("`maxSize` must be a number greater than 0")}if(typeof t.maxAge==="number"&&t.maxAge===0){throw new TypeError("`maxAge` must be a number greater than 0")}this.maxSize=t.maxSize;this.maxAge=t.maxAge||Number.POSITIVE_INFINITY;this.onEviction=t.onEviction;this.cache=new Map;this.oldCache=new Map;this._size=0}_emitEvictions(t){if(typeof this.onEviction!=="function"){return}for(const[r,n]of t){this.onEviction(r,n.value)}}_deleteIfExpired(t,r){if(typeof r.expiry==="number"&&r.expiry<=Date.now()){if(typeof this.onEviction==="function"){this.onEviction(t,r.value)}return this.delete(t)}return false}_getOrDeleteIfExpired(t,r){const n=this._deleteIfExpired(t,r);if(n===false){return r.value}}_getItemValue(t,r){return r.expiry?this._getOrDeleteIfExpired(t,r):r.value}_peek(t,r){const n=r.get(t);return this._getItemValue(t,n)}_set(t,r){this.cache.set(t,r);this._size++;if(this._size>=this.maxSize){this._size=0;this._emitEvictions(this.oldCache);this.oldCache=this.cache;this.cache=new Map}}_moveToRecent(t,r){this.oldCache.delete(t);this._set(t,r)}*_entriesAscending(){for(const t of this.oldCache){const[r,n]=t;if(!this.cache.has(r)){const o=this._deleteIfExpired(r,n);if(o===false){yield t}}}for(const t of this.cache){const[r,n]=t;const o=this._deleteIfExpired(r,n);if(o===false){yield t}}}get(t){if(this.cache.has(t)){const r=this.cache.get(t);return this._getItemValue(t,r)}if(this.oldCache.has(t)){const r=this.oldCache.get(t);if(this._deleteIfExpired(t,r)===false){this._moveToRecent(t,r);return r.value}}}set(t,r,{maxAge:n=this.maxAge}={}){const o=typeof n==="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:undefined;if(this.cache.has(t)){this.cache.set(t,{value:r,expiry:o})}else{this._set(t,{value:r,expiry:o})}}has(t){if(this.cache.has(t)){return!this._deleteIfExpired(t,this.cache.get(t))}if(this.oldCache.has(t)){return!this._deleteIfExpired(t,this.oldCache.get(t))}return false}peek(t){if(this.cache.has(t)){return this._peek(t,this.cache)}if(this.oldCache.has(t)){return this._peek(t,this.oldCache)}}delete(t){const r=this.cache.delete(t);if(r){this._size--}return this.oldCache.delete(t)||r}clear(){this.cache.clear();this.oldCache.clear();this._size=0}resize(t){if(!(t&&t>0)){throw new TypeError("`maxSize` must be a number greater than 0")}const r=[...this._entriesAscending()];const n=r.length-t;if(n<0){this.cache=new Map(r);this.oldCache=new Map;this._size=r.length}else{if(n>0){this._emitEvictions(r.slice(0,n))}this.oldCache=new Map(r.slice(n));this.cache=new Map;this._size=0}this.maxSize=t}*keys(){for(const[t]of this){yield t}}*values(){for(const[,t]of this){yield t}}*[Symbol.iterator](){for(const t of this.cache){const[r,n]=t;const o=this._deleteIfExpired(r,n);if(o===false){yield[r,n.value]}}for(const t of this.oldCache){const[r,n]=t;if(!this.cache.has(r)){const t=this._deleteIfExpired(r,n);if(t===false){yield[r,n.value]}}}}*entriesDescending(){let t=[...this.cache];for(let r=t.length-1;r>=0;--r){const n=t[r];const[o,a]=n;const s=this._deleteIfExpired(o,a);if(s===false){yield[o,a.value]}}t=[...this.oldCache];for(let r=t.length-1;r>=0;--r){const n=t[r];const[o,a]=n;if(!this.cache.has(o)){const t=this._deleteIfExpired(o,a);if(t===false){yield[o,a.value]}}}}*entriesAscending(){for(const[t,r]of this._entriesAscending()){yield[t,r.value]}}get size(){if(!this._size){return this.oldCache.size}let t=0;for(const r of this.oldCache.keys()){if(!this.cache.has(r)){t++}}return Math.min(this._size+t,this.maxSize)}}var a=__nccwpck_require__(3329);const s=t(import.meta.url)("http");const i=t(import.meta.url)("https");const l={agentCacheSize:512};const u={maxSockets:64,keepAlive:false};class TimeoutError extends Error{constructor(t){super(t);this.name="TimeoutError";Error.captureStackTrace(this,TimeoutError)}}function fetchEnhanced(t,r={}){const c={...l,...r};const d=new QuickLRU({maxSize:c.agentCacheSize});function getAgent(t,r={}){const{origin:l,protocol:u}=new URL(t);const c=JSON.stringify({origin:l,...r});if(d.peek(c))return d.get(c);let h;const p=u==="https:";const m=(0,a.j)(t);if(m){const{protocol:t,username:a,password:s,hostname:i,port:l,pathname:u,search:c,hash:d}=new URL(m);h=new(p?o:n)({protocol:t,port:l,hostname:i.replace(/^\[/,"").replace(/\]$/,""),path:`${u}${c}${d}`,auth:a&&s?`${a}:${s}`:a?a:null,...r})}else{h=new(p?i.Agent:s.Agent)(r);if("maxSockets"in r){h.maxSockets=r.maxSockets}}d.set(c,h);return h}const fetch=(r,{timeout:n=0,agentOpts:o={},...a}={})=>new Promise(((s,i)=>{if(!("agent"in a)){a.agent=getAgent(r,{...u,...o})}let l;if(n){l=setTimeout((()=>{const t=new TimeoutError(`${a.method||"GET"} ${r} timed out after ${n}ms`);i(t)}),n)}t(r,a).then((t=>{if(l)clearTimeout(l);s(t)})).catch((t=>{if(l)clearTimeout(l);if(t.name==="AbortError")return s(null);i(t)}))}));fetch.clearCache=()=>{for(const t of d.values()){if("destroy"in t)t.destroy()}d.clear()};return fetch}var c=__nccwpck_require__(5871);const d=t(import.meta.url)("node:http");const h=t(import.meta.url)("node:https");const p=t(import.meta.url)("node:zlib");const m=t(import.meta.url)("node:stream");const b=t(import.meta.url)("node:buffer");function dataUriToBuffer(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,"");const r=t.indexOf(",");if(r===-1||r<=4){throw new TypeError("malformed data: URI")}const n=t.substring(5,r).split(";");let o="";let a=false;const s=n[0]||"text/plain";let i=s;for(let t=1;t<n.length;t++){if(n[t]==="base64"){a=true}else{i+=`;${n[t]}`;if(n[t].indexOf("charset=")===0){o=n[t].substring(8)}}}if(!n[0]&&!o.length){i+=";charset=US-ASCII";o="US-ASCII"}const l=a?"base64":"ascii";const u=unescape(t.substring(r+1));const c=Buffer.from(u,l);c.type=s;c.typeFull=i;c.charset=o;return c}const g=dataUriToBuffer;const y=t(import.meta.url)("node:util");var S=__nccwpck_require__(1410);var R=__nccwpck_require__(8010);class FetchBaseError extends Error{constructor(t,r){super(t);Error.captureStackTrace(this,this.constructor);this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}class FetchError extends FetchBaseError{constructor(t,r,n){super(t,r);if(n){this.code=this.errno=n.code;this.erroredSysCall=n.syscall}}}const _=Symbol.toStringTag;const isURLSearchParameters=t=>typeof t==="object"&&typeof t.append==="function"&&typeof t.delete==="function"&&typeof t.get==="function"&&typeof t.getAll==="function"&&typeof t.has==="function"&&typeof t.set==="function"&&typeof t.sort==="function"&&t[_]==="URLSearchParams";const isBlob=t=>t&&typeof t==="object"&&typeof t.arrayBuffer==="function"&&typeof t.type==="string"&&typeof t.stream==="function"&&typeof t.constructor==="function"&&/^(Blob|File)$/.test(t[_]);const isAbortSignal=t=>typeof t==="object"&&(t[_]==="AbortSignal"||t[_]==="EventTarget");const isDomainOrSubdomain=(t,r)=>{const n=new URL(r).hostname;const o=new URL(t).hostname;return n===o||n.endsWith(`.${o}`)};const w=(0,y.promisify)(m.pipeline);const C=Symbol("Body internals");class Body{constructor(t,{size:r=0}={}){let n=null;if(t===null){t=null}else if(isURLSearchParameters(t)){t=b.Buffer.from(t.toString())}else if(isBlob(t)){}else if(b.Buffer.isBuffer(t)){}else if(y.types.isAnyArrayBuffer(t)){t=b.Buffer.from(t)}else if(ArrayBuffer.isView(t)){t=b.Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(t instanceof m){}else if(t instanceof R.Ct){t=(0,R.au)(t);n=t.type.split("=")[1]}else{t=b.Buffer.from(String(t))}let o=t;if(b.Buffer.isBuffer(t)){o=m.Readable.from(t)}else if(isBlob(t)){o=m.Readable.from(t.stream())}this[C]={body:t,stream:o,boundary:n,disturbed:false,error:null};this.size=r;if(t instanceof m){t.on("error",(t=>{const r=t instanceof FetchBaseError?t:new FetchError(`Invalid response body while trying to fetch ${this.url}: ${t.message}`,"system",t);this[C].error=r}))}}get body(){return this[C].stream}get bodyUsed(){return this[C].disturbed}async arrayBuffer(){const{buffer:t,byteOffset:r,byteLength:n}=await consumeBody(this);return t.slice(r,r+n)}async formData(){const t=this.headers.get("content-type");if(t.startsWith("application/x-www-form-urlencoded")){const t=new R.Ct;const r=new URLSearchParams(await this.text());for(const[n,o]of r){t.append(n,o)}return t}const{toFormData:r}=await __nccwpck_require__.e(37).then(__nccwpck_require__.bind(__nccwpck_require__,4037));return r(this.body,t)}async blob(){const t=this.headers&&this.headers.get("content-type")||this[C].body&&this[C].body.type||"";const r=await this.arrayBuffer();return new S.Z([r],{type:t})}async json(){const t=await consumeBody(this);return JSON.parse(t.toString())}async text(){const t=await consumeBody(this);return t.toString()}buffer(){return consumeBody(this)}}Body.prototype.buffer=(0,y.deprecate)(Body.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true},data:{get:(0,y.deprecate)((()=>{}),"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function consumeBody(t){if(t[C].disturbed){throw new TypeError(`body used already for: ${t.url}`)}t[C].disturbed=true;if(t[C].error){throw t[C].error}const{body:r}=t;if(r===null){return b.Buffer.alloc(0)}if(!(r instanceof m)){return b.Buffer.alloc(0)}const n=[];let o=0;try{for await(const a of r){if(t.size>0&&o+a.length>t.size){const n=new FetchError(`content size at ${t.url} over limit: ${t.size}`,"max-size");r.destroy(n);throw n}o+=a.length;n.push(a)}}catch(r){const n=r instanceof FetchBaseError?r:new FetchError(`Invalid response body while trying to fetch ${t.url}: ${r.message}`,"system",r);throw n}if(r.readableEnded===true||r._readableState.ended===true){try{if(n.every((t=>typeof t==="string"))){return b.Buffer.from(n.join(""))}return b.Buffer.concat(n,o)}catch(r){throw new FetchError(`Could not create Buffer from response body for ${t.url}: ${r.message}`,"system",r)}}else{throw new FetchError(`Premature close of server response while trying to fetch ${t.url}`)}}const clone=(t,r)=>{let n;let o;let{body:a}=t[C];if(t.bodyUsed){throw new Error("cannot clone body after it is used")}if(a instanceof m&&typeof a.getBoundary!=="function"){n=new m.PassThrough({highWaterMark:r});o=new m.PassThrough({highWaterMark:r});a.pipe(n);a.pipe(o);t[C].stream=n;a=o}return a};const v=(0,y.deprecate)((t=>t.getBoundary()),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167");const extractContentType=(t,r)=>{if(t===null){return null}if(typeof t==="string"){return"text/plain;charset=UTF-8"}if(isURLSearchParameters(t)){return"application/x-www-form-urlencoded;charset=UTF-8"}if(isBlob(t)){return t.type||null}if(b.Buffer.isBuffer(t)||y.types.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)){return null}if(t instanceof R.Ct){return`multipart/form-data; boundary=${r[C].boundary}`}if(t&&typeof t.getBoundary==="function"){return`multipart/form-data;boundary=${v(t)}`}if(t instanceof m){return null}return"text/plain;charset=UTF-8"};const getTotalBytes=t=>{const{body:r}=t[C];if(r===null){return 0}if(isBlob(r)){return r.size}if(b.Buffer.isBuffer(r)){return r.length}if(r&&typeof r.getLengthSync==="function"){return r.hasKnownLength&&r.hasKnownLength()?r.getLengthSync():null}return null};const writeToStream=async(t,{body:r})=>{if(r===null){t.end()}else{await w(r,t)}};const E=typeof d.validateHeaderName==="function"?d.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){const r=new TypeError(`Header name must be a valid HTTP token [${t}]`);Object.defineProperty(r,"code",{value:"ERR_INVALID_HTTP_TOKEN"});throw r}};const I=typeof d.validateHeaderValue==="function"?d.validateHeaderValue:(t,r)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(r)){const r=new TypeError(`Invalid character in header content ["${t}"]`);Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"});throw r}};class Headers extends URLSearchParams{constructor(t){let r=[];if(t instanceof Headers){const n=t.raw();for(const[t,o]of Object.entries(n)){r.push(...o.map((r=>[t,r])))}}else if(t==null){}else if(typeof t==="object"&&!y.types.isBoxedPrimitive(t)){const n=t[Symbol.iterator];if(n==null){r.push(...Object.entries(t))}else{if(typeof n!=="function"){throw new TypeError("Header pairs must be iterable")}r=[...t].map((t=>{if(typeof t!=="object"||y.types.isBoxedPrimitive(t)){throw new TypeError("Each header pair must be an iterable object")}return[...t]})).map((t=>{if(t.length!==2){throw new TypeError("Each header pair must be a name/value tuple")}return[...t]}))}}else{throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)")}r=r.length>0?r.map((([t,r])=>{E(t);I(t,String(r));return[String(t).toLowerCase(),String(r)]})):undefined;super(r);return new Proxy(this,{get(t,r,n){switch(r){case"append":case"set":return(n,o)=>{E(n);I(n,String(o));return URLSearchParams.prototype[r].call(t,String(n).toLowerCase(),String(o))};case"delete":case"has":case"getAll":return n=>{E(n);return URLSearchParams.prototype[r].call(t,String(n).toLowerCase())};case"keys":return()=>{t.sort();return new Set(URLSearchParams.prototype.keys.call(t)).keys()};default:return Reflect.get(t,r,n)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(t){const r=this.getAll(t);if(r.length===0){return null}let n=r.join(", ");if(/^content-encoding$/i.test(t)){n=n.toLowerCase()}return n}forEach(t,r=undefined){for(const n of this.keys()){Reflect.apply(t,r,[this.get(n),n,this])}}*values(){for(const t of this.keys()){yield this.get(t)}}*entries(){for(const t of this.keys()){yield[t,this.get(t)]}}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce(((t,r)=>{t[r]=this.getAll(r);return t}),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce(((t,r)=>{const n=this.getAll(r);if(r==="host"){t[r]=n[0]}else{t[r]=n.length>1?n:n[0]}return t}),{})}}Object.defineProperties(Headers.prototype,["get","entries","forEach","values"].reduce(((t,r)=>{t[r]={enumerable:true};return t}),{}));function fromRawHeaders(t=[]){return new Headers(t.reduce(((t,r,n,o)=>{if(n%2===0){t.push(o.slice(n,n+2))}return t}),[]).filter((([t,r])=>{try{E(t);I(t,String(r));return true}catch{return false}})))}const A=new Set([301,302,303,307,308]);const isRedirect=t=>A.has(t);const T=Symbol("Response internals");class Response extends Body{constructor(t=null,r={}){super(t,r);const n=r.status!=null?r.status:200;const o=new Headers(r.headers);if(t!==null&&!o.has("Content-Type")){const r=extractContentType(t,this);if(r){o.append("Content-Type",r)}}this[T]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:o,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[T].type}get url(){return this[T].url||""}get status(){return this[T].status}get ok(){return this[T].status>=200&&this[T].status<300}get redirected(){return this[T].counter>0}get statusText(){return this[T].statusText}get headers(){return this[T].headers}get highWaterMark(){return this[T].highWaterMark}clone(){return new Response(clone(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(t,r=302){if(!isRedirect(r)){throw new RangeError('Failed to execute "redirect" on "response": Invalid status code')}return new Response(null,{headers:{location:new URL(t).toString()},status:r})}static error(){const t=new Response(null,{status:0,statusText:""});t[T].type="error";return t}get[Symbol.toStringTag](){return"Response"}}Object.defineProperties(Response.prototype,{type:{enumerable:true},url:{enumerable:true},status:{enumerable:true},ok:{enumerable:true},redirected:{enumerable:true},statusText:{enumerable:true},headers:{enumerable:true},clone:{enumerable:true}});const P=t(import.meta.url)("node:url");const getSearch=t=>{if(t.search){return t.search}const r=t.href.length-1;const n=t.hash||(t.href[r]==="#"?"#":"");return t.href[r-n.length]==="?"?"?":""};const $=t(import.meta.url)("node:net");function stripURLForUseAsAReferrer(t,r=false){if(t==null){return"no-referrer"}t=new URL(t);if(/^(about|blob|data):$/.test(t.protocol)){return"no-referrer"}t.username="";t.password="";t.hash="";if(r){t.pathname="";t.search=""}return t}const W=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]);const B="strict-origin-when-cross-origin";function validateReferrerPolicy(t){if(!W.has(t)){throw new TypeError(`Invalid referrerPolicy: ${t}`)}return t}function isOriginPotentiallyTrustworthy(t){if(/^(http|ws)s:$/.test(t.protocol)){return true}const r=t.host.replace(/(^\[)|(]$)/g,"");const n=(0,$.isIP)(r);if(n===4&&/^127\./.test(r)){return true}if(n===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(r)){return true}if(/^(.+\.)*localhost$/.test(t.host)){return false}if(t.protocol==="file:"){return true}return false}function isUrlPotentiallyTrustworthy(t){if(/^about:(blank|srcdoc)$/.test(t)){return true}if(t.protocol==="data:"){return true}if(/^(blob|filesystem):$/.test(t.protocol)){return true}return isOriginPotentiallyTrustworthy(t)}function determineRequestsReferrer(t,{referrerURLCallback:r,referrerOriginCallback:n}={}){if(t.referrer==="no-referrer"||t.referrerPolicy===""){return null}const o=t.referrerPolicy;if(t.referrer==="about:client"){return"no-referrer"}const a=t.referrer;let s=stripURLForUseAsAReferrer(a);let i=stripURLForUseAsAReferrer(a,true);if(s.toString().length>4096){s=i}if(r){s=r(s)}if(n){i=n(i)}const l=new URL(t.url);switch(o){case"no-referrer":return"no-referrer";case"origin":return i;case"unsafe-url":return s;case"strict-origin":if(isUrlPotentiallyTrustworthy(s)&&!isUrlPotentiallyTrustworthy(l)){return"no-referrer"}return i.toString();case"strict-origin-when-cross-origin":if(s.origin===l.origin){return s}if(isUrlPotentiallyTrustworthy(s)&&!isUrlPotentiallyTrustworthy(l)){return"no-referrer"}return i;case"same-origin":if(s.origin===l.origin){return s}return"no-referrer";case"origin-when-cross-origin":if(s.origin===l.origin){return s}return i;case"no-referrer-when-downgrade":if(isUrlPotentiallyTrustworthy(s)&&!isUrlPotentiallyTrustworthy(l)){return"no-referrer"}return s;default:throw new TypeError(`Invalid referrerPolicy: ${o}`)}}function parseReferrerPolicyFromHeader(t){const r=(t.get("referrer-policy")||"").split(/[,\s]+/);let n="";for(const t of r){if(t&&W.has(t)){n=t}}return n}const k=Symbol("Request internals");const isRequest=t=>typeof t==="object"&&typeof t[k]==="object";const O=(0,y.deprecate)((()=>{}),".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)");class Request extends Body{constructor(t,r={}){let n;if(isRequest(t)){n=new URL(t.url)}else{n=new URL(t);t={}}if(n.username!==""||n.password!==""){throw new TypeError(`${n} is an url with embedded credentails.`)}let o=r.method||t.method||"GET";o=o.toUpperCase();if("data"in r){O()}if((r.body!=null||isRequest(t)&&t.body!==null)&&(o==="GET"||o==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}const a=r.body?r.body:isRequest(t)&&t.body!==null?clone(t):null;super(a,{size:r.size||t.size||0});const s=new Headers(r.headers||t.headers||{});if(a!==null&&!s.has("Content-Type")){const t=extractContentType(a,this);if(t){s.set("Content-Type",t)}}let i=isRequest(t)?t.signal:null;if("signal"in r){i=r.signal}if(i!=null&&!isAbortSignal(i)){throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget")}let l=r.referrer==null?t.referrer:r.referrer;if(l===""){l="no-referrer"}else if(l){const t=new URL(l);l=/^about:(\/\/)?client$/.test(t)?"client":t}else{l=undefined}this[k]={method:o,redirect:r.redirect||t.redirect||"follow",headers:s,parsedURL:n,signal:i,referrer:l};this.follow=r.follow===undefined?t.follow===undefined?20:t.follow:r.follow;this.compress=r.compress===undefined?t.compress===undefined?true:t.compress:r.compress;this.counter=r.counter||t.counter||0;this.agent=r.agent||t.agent;this.highWaterMark=r.highWaterMark||t.highWaterMark||16384;this.insecureHTTPParser=r.insecureHTTPParser||t.insecureHTTPParser||false;this.referrerPolicy=r.referrerPolicy||t.referrerPolicy||""}get method(){return this[k].method}get url(){return(0,P.format)(this[k].parsedURL)}get headers(){return this[k].headers}get redirect(){return this[k].redirect}get signal(){return this[k].signal}get referrer(){if(this[k].referrer==="no-referrer"){return""}if(this[k].referrer==="client"){return"about:client"}if(this[k].referrer){return this[k].referrer.toString()}return undefined}get referrerPolicy(){return this[k].referrerPolicy}set referrerPolicy(t){this[k].referrerPolicy=validateReferrerPolicy(t)}clone(){return new Request(this)}get[Symbol.toStringTag](){return"Request"}}Object.defineProperties(Request.prototype,{method:{enumerable:true},url:{enumerable:true},headers:{enumerable:true},redirect:{enumerable:true},clone:{enumerable:true},signal:{enumerable:true},referrer:{enumerable:true},referrerPolicy:{enumerable:true}});const getNodeRequestOptions=t=>{const{parsedURL:r}=t[k];const n=new Headers(t[k].headers);if(!n.has("Accept")){n.set("Accept","*/*")}let o=null;if(t.body===null&&/^(post|put)$/i.test(t.method)){o="0"}if(t.body!==null){const r=getTotalBytes(t);if(typeof r==="number"&&!Number.isNaN(r)){o=String(r)}}if(o){n.set("Content-Length",o)}if(t.referrerPolicy===""){t.referrerPolicy=B}if(t.referrer&&t.referrer!=="no-referrer"){t[k].referrer=determineRequestsReferrer(t)}else{t[k].referrer="no-referrer"}if(t[k].referrer instanceof URL){n.set("Referer",t.referrer)}if(!n.has("User-Agent")){n.set("User-Agent","node-fetch")}if(t.compress&&!n.has("Accept-Encoding")){n.set("Accept-Encoding","gzip,deflate,br")}let{agent:a}=t;if(typeof a==="function"){a=a(r)}if(!n.has("Connection")&&!a){n.set("Connection","close")}const s=getSearch(r);const i={path:r.pathname+s,method:t.method,headers:n[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:a};return{parsedURL:r,options:i}};class AbortError extends FetchBaseError{constructor(t,r="aborted"){super(t,r)}}var D=__nccwpck_require__(2777);const j=new Set(["data:","http:","https:"]);async function fetch(t,r){return new Promise(((n,o)=>{const a=new Request(t,r);const{parsedURL:s,options:i}=getNodeRequestOptions(a);if(!j.has(s.protocol)){throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${s.protocol.replace(/:$/,"")}" is not supported.`)}if(s.protocol==="data:"){const t=g(a.url);const r=new Response(t,{headers:{"Content-Type":t.typeFull}});n(r);return}const l=(s.protocol==="https:"?h:d).request;const{signal:u}=a;let c=null;const abort=()=>{const t=new AbortError("The operation was aborted.");o(t);if(a.body&&a.body instanceof m.Readable){a.body.destroy(t)}if(!c||!c.body){return}c.body.emit("error",t)};if(u&&u.aborted){abort();return}const abortAndFinalize=()=>{abort();finalize()};const b=l(s.toString(),i);if(u){u.addEventListener("abort",abortAndFinalize)}const finalize=()=>{b.abort();if(u){u.removeEventListener("abort",abortAndFinalize)}};b.on("error",(t=>{o(new FetchError(`request to ${a.url} failed, reason: ${t.message}`,"system",t));finalize()}));fixResponseChunkedTransferBadEnding(b,(t=>{c.body.destroy(t)}));if(process.version<"v14"){b.on("socket",(t=>{let r;t.prependListener("end",(()=>{r=t._eventsCount}));t.prependListener("close",(n=>{if(c&&r<t._eventsCount&&!n){const t=new Error("Premature close");t.code="ERR_STREAM_PREMATURE_CLOSE";c.body.emit("error",t)}}))}))}b.on("response",(t=>{b.setTimeout(0);const s=fromRawHeaders(t.rawHeaders);if(isRedirect(t.statusCode)){const i=s.get("Location");let l=null;try{l=i===null?null:new URL(i,a.url)}catch{if(a.redirect!=="manual"){o(new FetchError(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect"));finalize();return}}switch(a.redirect){case"error":o(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${a.url}`,"no-redirect"));finalize();return;case"manual":break;case"follow":{if(l===null){break}if(a.counter>=a.follow){o(new FetchError(`maximum redirect reached at: ${a.url}`,"max-redirect"));finalize();return}const i={headers:new Headers(a.headers),follow:a.follow,counter:a.counter+1,agent:a.agent,compress:a.compress,method:a.method,body:clone(a),signal:a.signal,size:a.size,referrer:a.referrer,referrerPolicy:a.referrerPolicy};if(!isDomainOrSubdomain(a.url,l)){for(const t of["authorization","www-authenticate","cookie","cookie2"]){i.headers.delete(t)}}if(t.statusCode!==303&&a.body&&r.body instanceof m.Readable){o(new FetchError("Cannot follow redirect with body being a readable stream","unsupported-redirect"));finalize();return}if(t.statusCode===303||(t.statusCode===301||t.statusCode===302)&&a.method==="POST"){i.method="GET";i.body=undefined;i.headers.delete("content-length")}const u=parseReferrerPolicyFromHeader(s);if(u){i.referrerPolicy=u}n(fetch(new Request(l,i)));finalize();return}default:return o(new TypeError(`Redirect option '${a.redirect}' is not a valid value of RequestRedirect`))}}if(u){t.once("end",(()=>{u.removeEventListener("abort",abortAndFinalize)}))}let i=(0,m.pipeline)(t,new m.PassThrough,(t=>{if(t){o(t)}}));if(process.version<"v12.10"){t.on("aborted",abortAndFinalize)}const l={url:a.url,status:t.statusCode,statusText:t.statusMessage,headers:s,size:a.size,counter:a.counter,highWaterMark:a.highWaterMark};const d=s.get("Content-Encoding");if(!a.compress||a.method==="HEAD"||d===null||t.statusCode===204||t.statusCode===304){c=new Response(i,l);n(c);return}const h={flush:p.Z_SYNC_FLUSH,finishFlush:p.Z_SYNC_FLUSH};if(d==="gzip"||d==="x-gzip"){i=(0,m.pipeline)(i,p.createGunzip(h),(t=>{if(t){o(t)}}));c=new Response(i,l);n(c);return}if(d==="deflate"||d==="x-deflate"){const r=(0,m.pipeline)(t,new m.PassThrough,(t=>{if(t){o(t)}}));r.once("data",(t=>{if((t[0]&15)===8){i=(0,m.pipeline)(i,p.createInflate(),(t=>{if(t){o(t)}}))}else{i=(0,m.pipeline)(i,p.createInflateRaw(),(t=>{if(t){o(t)}}))}c=new Response(i,l);n(c)}));r.once("end",(()=>{if(!c){c=new Response(i,l);n(c)}}));return}if(d==="br"){i=(0,m.pipeline)(i,p.createBrotliDecompress(),(t=>{if(t){o(t)}}));c=new Response(i,l);n(c);return}c=new Response(i,l);n(c)}));writeToStream(b,a).catch(o)}))}function fixResponseChunkedTransferBadEnding(t,r){const n=b.Buffer.from("0\r\n\r\n");let o=false;let a=false;let s;t.on("response",(t=>{const{headers:r}=t;o=r["transfer-encoding"]==="chunked"&&!r["content-length"]}));t.on("socket",(i=>{const onSocketClose=()=>{if(o&&!a){const t=new Error("Premature close");t.code="ERR_STREAM_PREMATURE_CLOSE";r(t)}};i.prependListener("close",onSocketClose);t.on("abort",(()=>{i.removeListener("close",onSocketClose)}));i.on("data",(t=>{a=b.Buffer.compare(t.slice(-5),n)===0;if(!a&&s){a=b.Buffer.compare(s.slice(-3),n.slice(0,3))===0&&b.Buffer.compare(t.slice(-2),n.slice(3))===0}s=t}))}))}var F=__nccwpck_require__(2968);var L=__nccwpck_require__(7353);var q=__nccwpck_require__(5418);var N=__nccwpck_require__(1383);var z=__nccwpck_require__(418);const M=t(import.meta.url)("process");var U=__nccwpck_require__(8869);var G=__nccwpck_require__(1017);var H=__nccwpck_require__(7147);var Y=__nccwpck_require__(2037);var Q=__nccwpck_require__(4404);M.env.NODE_ENV="production";const V=fetchEnhanced(fetch);const X=96;const Z="\0";const J=(0,M.cwd)();const K=/^.*?:\/\/(.*?@)?(github\.com[:/])/i;const ee=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i;const te=/^[0-9a-f]{7,}$/i;const memoize=t=>{const r=Object.create(null);return(n,o)=>n in r?r[n]:r[n]=t(n,o)};const esc=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&");const re=memoize(U.fromUrl);const ne=memoize(F);const oe=memoize(q);const ae=memoize((t=>t.endsWith("/")?t.substring(0,t.length-1):t));const se=new Set(["patch"]);const ie=new Set(["patch","minor"]);const le=new Set(["patch","minor","major"]);const ue=Object.create(null);const ce=Object.create(null);const fe=r.lookup;r.lookup=(t,r,n)=>{if(!n){n=r;r=undefined}if(t in ue){n(...ue[t])}else{if(!(t in ce)){ce[t]=[n];fe(t,r,((...r)=>{if(!(t in ue))ue[t]=r;for(const n of ce[t]){n(...r)}}))}else{ce[t].push(n)}}};for(const t of[process.stdout,process.stderr]){t?._handle?.setBlocking?.(true)}const de=c(M.argv.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","G","githubapi","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",G:"githubapi",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});if(de.color===false)M.env.NO_COLOR="1";let he,pe,me,be;if("NO_COLOR"in M.env||M.env.TERM==="dumb"){he=pe=me=be=t=>t}else{he=t=>`[35m${t}[0m`;pe=t=>`[31m${t}[0m`;me=t=>`[32m${t}[0m`;be=t=>`[90m${t}[0m`}if(de.help){M.stdout.write(`usage: updates [options]\n\n Options:\n -u, --update Update versions and write package.json\n -p, --prerelease [<pkg,...>] Consider prerelease versions\n -R, --release [<pkg,...>] Only use release versions, may downgrade\n -g, --greatest [<pkg,...>] Prefer greatest over latest version\n -i, --include <pkg,...> Include only given packages\n -e, --exclude <pkg,...> Exclude given packages\n -t, --types <type,...> Check only given dependency types\n -P, --patch [<pkg,...>] Consider only up to semver-patch\n -m, --minor [<pkg,...>] Consider only up to semver-minor\n -d, --allow-downgrade [<pkg,...>] Allow version downgrades when using latest version\n -E, --error-on-outdated Exit with code 2 when updates are available and 0 when not\n -U, --error-on-unchanged Exit with code 0 when updates are available and 2 when not\n -r, --registry <url> Override npm registry URL\n -G, --githubapi <url> Override Github API URL\n -f, --file <path> Use given package.json file or module directory\n -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${X}\n -j, --json Output a JSON object\n -n, --no-color Disable color output\n -v, --version Print the version\n -V, --verbose Print verbose output to stderr\n -h, --help Print this help\n\n Examples:\n $ updates\n $ updates -u\n $ updates -u -m -e eslint\n $ updates -u -U && rm -rf node_modules && npm i\n`);(0,M.exit)(0)}if(de.version){const t=__nccwpck_require__.ab+"package.json";const{version:r}=JSON.parse((0,H.readFileSync)(__nccwpck_require__.ab+"package.json","utf8"));console.info(r);(0,M.exit)(0)}const ge=parseMixedArg(de.greatest);const ye=parseMixedArg(de.prerelease);const Se=parseMixedArg(de.release);const Re=parseMixedArg(de.patch);const _e=parseMixedArg(de.minor);const we=parseMixedArg(de["allow-downgrade"]);const Ce=L("npm",{registry:"https://registry.npmjs.org"});const ve={npmrc:Ce,recursive:true};const Ee=ae(de.registry||Ce.registry);const Ie=de.githubapi?ae(de.githubapi):"https://api.github.com";const Ae=typeof de.sockets==="number"?parseInt(de.sockets):X;const extractCerts=t=>Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g)).map((t=>t[0]));const Te={};if(Ce["strict-ssl"]===false){Te.rejectUnauthorized=false}else{if("cafile"in Ce){Te.ca=Q.rootCertificates.concat(extractCerts((0,H.readFileSync)(Ce.cafile,"utf8")))}if("ca"in Ce){const t=Array.isArray(Ce.ca)?Ce.ca:[Ce.ca];Te.ca=Q.rootCertificates.concat(t.map((t=>extractCerts(t))))}}let Pe;if(de.file){let t;try{t=(0,H.lstatSync)(de.file)}catch(t){finish(new Error(`Unable to open ${de.file}: ${t.message}`))}if(t&&t.isFile()){Pe=de.file}else if(t&&t.isDirectory()){Pe=(0,G.join)(de.file,"package.json")}else{finish(new Error(`${de.file} is neither a file nor directory`))}}else{Pe=findSync("package.json",J);if(!Pe){finish(new Error(`Unable to find package.json in ${J} or any of its parents`))}}let $e;if(de.types){$e=Array.isArray(de.types)?de.types:de.types.split(",")}else{$e=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]}let We,Be;try{Be=(0,H.readFileSync)(Pe,"utf8")}catch(t){finish(new Error(`Unable to open package.json: ${t.message}`))}try{We=JSON.parse(Be)}catch(t){finish(new Error(`Error parsing package.json: ${t.message}`))}let ke,Oe;if(de.include&&de.include!==true)ke=new Set((Array.isArray(de.include)?de.include:[de.include]).flatMap((t=>t.split(","))));if(de.exclude&&de.exclude!==true)Oe=new Set((Array.isArray(de.exclude)?de.exclude:[de.exclude]).flatMap((t=>t.split(","))));function canInclude(t){if(Oe&&Oe.has(t))return false;if(ke&&!ke.has(t))return false;return true}const xe={},De={};for(const t of $e){for(const[r,n]of Object.entries(We[t]||{})){if(N.validRange(n)&&canInclude(r)){xe[`${t}${Z}${r}`]={old:n}}else if(canInclude(r)){De[`${t}${Z}${r}`]={old:n}}}}if(!Object.keys(xe).length&&!Object.keys(De).length){finish(new Error(`No packages ${ke||Oe?"match the given filters":"found"}`))}const je=[[1e3,1,"ns"],[1e6,1e3,"µs"],[1e9,1e6,"ms"],[6e10,1e9,"sec"],[36e11,6e10,"min"],[864e11,36e11,"hour"],[2592e12,864e11,"day"],[31536e12,2592e12,"month"],[Infinity,31536e12,"year"]];function getAge(t){if(!t)return"";const r=new Date(t).getTime()*1e6;if(Number.isNaN(r))return"";const n=Date.now()*1e6-r;if(n<=0)return"none";let o,a;for(let t=0;t<=je.length;t++){const r=je[t];const[s,i,l]=r||[];if(r&&s&&n<s){o=Math.round(n/i);a=`${l}${o>1&&!l.endsWith("s")?"s":""}`;break}}return`${o} ${a}`}function findSync(t,r,n){const o=(0,G.join)(r,t);try{(0,H.accessSync)(o);return o}catch{}const a=(0,G.dirname)(r);if(n&&o===n||a===r){return null}else{return findSync(t,a,n)}}function getAuthAndRegistry(t,r){if(!t.startsWith("@")){return[ne(r,ve),r]}else{const n=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0];const o=ae(oe(n,Ce));if(o!==r){try{const t=ne(o,ve);if(t&&t.token){return[t,o]}}catch{return[ne(r,ve),r]}}else{return[ne(r,ve),r]}}}async function fetchInfo(t,r,n){const[o,a]=getAuthAndRegistry(t,n);const s={maxSockets:Ae};if(Object.keys(Te).length){s.agentOpts=Te}if(o&&o.token){s.headers={Authorization:`${o.type} ${o.token}`}}const i=r==="resolutions"?resolutionsBasePackage(t):t;const l=i.replace(/\//g,"%2f");const u=`${a}/${l}`;if(de.verbose)console.error(`${he("fetch")} ${u}`);const c=await V(u,s);if(c&&c.ok){if(de.verbose)console.error(`${me("done")} ${u}`);return[await c.json(),r,a,t]}else{if(c&&c.status&&c.statusText){throw new Error(`Received ${c.status} ${c.statusText} for ${t} from ${a}`)}else{throw new Error(`Unable to fetch ${t} from ${a}`)}}}function getInfoUrl({repository:t,homepage:r},n,o){let a;if(n==="https://npm.pkg.github.com"){return`https://github.com/${o.replace(/^@/,"")}`}else if(t){const r=typeof t==="string"?t:t.url;const n=re(r);if(n&&n.browse){a=n.browse()}if(a&&t.directory&&n.treepath){a=`${a}/${n.treepath}/HEAD/${t.directory}`}if(!a&&t&&t.url&&/^https?:/.test(t.url)){a=t.url}}let s=a||r||"";if(s){const t=new URL(s);if(t.hostname==="github.com"&&t.protocol==="http:"){t.protocol="https:";s=String(t)}}return s}function finish(t,r={}){const n={};const o=t instanceof Error;if(typeof t==="string"){n.message=t}else if(o){n.error=t.stack}for(const t of Object.values(xe)){if("oldPrint"in t){t.old=t.oldPrint;delete t.oldPrint}if("newPrint"in t){t.new=t.newPrint;delete t.newPrint}}if(de.json){if(!o){n.results={};for(const[t,r]of Object.entries(xe)){const[o,a]=t.split(Z);if(!n.results[o])n.results[o]={};n.results[o][a]=r}}console.info(JSON.stringify(n))}else{if(Object.keys(xe).length&&!o){console.info(formatDeps(xe))}if(n.message||n.error){if(n.message){console.info(n.message)}else if(n.error){const t=n.error.split(/\r?\n/);for(const[r,n]of Object.entries(t)){console.info((r==="0"?pe:be)(n))}}}}V.clearCache();if(de["error-on-outdated"]){(0,M.exit)(Object.keys(xe).length?2:0)}else if(de["error-on-unchanged"]){(0,M.exit)(Object.keys(xe).length?0:2)}else{(0,M.exit)(r.exitCode||(n.error?1:0))}}function write(t,r){const n=(0,Y.platform)()==="win32";if(n)(0,H.truncateSync)(t,0);(0,H.writeFileSync)(t,r,n?{flag:"r+"}:undefined)}function highlightDiff(t,r,n){const o=t.split(/\./);const a=r.split(/\./);const s=n?me:pe;const i=/^[0-9a-zA-Z-.]+$/;let l="";for(let t=0;t<o.length;t++){if(o[t]!==a[t]){if(i.test(o[t])){l+=s(o.slice(t).join("."))}else{l+=o[t].split("").map((t=>i.test(t)?s(t):t)).join("")+s(`.${o.slice(t+1).join(".")}`)}break}else{l+=`${o[t]}.`}}return l}function formatDeps(){const t=[["NAME","OLD","NEW","AGE","INFO"]];for(const[r,n]of Object.entries(xe)){const[o,a]=r.split(Z);t.push([a,highlightDiff(n.old,n.new,false),highlightDiff(n.new,n.old,true),n.age||"",n.info])}const r=ansiRegex();return z(t,{hsep:" ",stringLength:t=>t.replace(r,"").length})}function updatePackageJson(){let t=Be;for(const r of Object.keys(xe)){const[n,o]=r.split(Z);const a=new RegExp(`"${esc(o)}": +"${esc(xe[r].old)}"`,"g");t=t.replace(a,`"${o}": "${xe[r].new}"`)}return t}function updateRange(t,r){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,r)}function isVersionPrerelease(t){const r=N.parse(t);if(!r)return false;return Boolean(r.prerelease.length)}function isRangePrerelease(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function rangeToVersion(t){try{return N.coerce(t).version}catch{return null}}function findVersion(t,r,{range:n,semvers:o,usePre:a,useRel:s,useGreatest:i}={}){let l=rangeToVersion(n);let u=0;o=new Set(o);a=isRangePrerelease(n)||a;if(a){o.add("prerelease");if(o.has("patch"))o.add("prepatch");if(o.has("minor"))o.add("preminor");if(o.has("major"))o.add("premajor")}for(const n of r){const r=N.parse(n);if(r.prerelease.length&&(!a||s))continue;const c=N.diff(l,r.version);if(!c||!o.has(c))continue;if(i||!("time"in t)){if(N.gte(N.coerce(r.version).version,l)){l=r.version}}else{const o=new Date(t.time[n]).getTime();if(o>=0&&o>u){l=r.version;u=o}}}return l||null}function findNewVersion(t,r){if(r.range==="*")return null;if(r.range.includes("||"))return null;const n=Object.keys(t.versions).filter((t=>N.valid(t)));const o=findVersion(t,n,r);if(r.useGreatest){return o}else{const n=t["dist-tags"].latest;const a=N.coerce(r.range).version;const s=isRangePrerelease(r.range);const i=isVersionPrerelease(o);const l=isVersionPrerelease(n);const u=N.gt(o,a);if(!r.useRel&&r.usePre||s&&i){return o}if(r.useRel&&!u&&s&&!i){return o}if(s&&!i&&u){return o}if(s&&!i&&!u){return null}const c=N.diff(a,n);if(c&&c!=="prerelease"&&!r.semvers.has(c.replace(/^pre/,""))){return o}if(r.useRel&&isVersionPrerelease(n)){return o}if(N.lt(n,a)&&!l){if(we===true||Array.isArray(we)&&we.has(t.name)){return n}else{return null}}return n}}async function checkUrlDep([t,r],{useGreatest:n}={}){const o=r.old.replace(K,"");const[a,s,i,l]=ee.exec(o)||[];if(!s||!i||!l)return;if(te.test(l)){const n=await V(`${Ie}/repos/${s}/${i}/commits`);if(!n||!n.ok)return;const o=await n.json();let{sha:a,commit:u}=o[0];if(!a||!a.length)return;let c;if(u&&u.committer&&u.committer.date){c=u.committer.date}else if(u&&u.auhor&&u.author.date){c=u.author.date}a=a.substring(0,l.length);if(l!==a){const n=r.old.replace(l,a);return{key:t,newRange:n,user:s,repo:i,oldRef:l,newRef:a,newDate:c}}}else{const r=await V(`${Ie}/repos/${s}/${i}/git/refs/tags`);if(!r||!r.ok)return;const o=await r.json();const a=o.map((t=>t.ref.replace(/^refs\/tags\//,"")));const u=l.replace(/^v/,"");if(!N.valid(u))return;if(!n){const r=a[a.length-1];const n=r.replace(/^v/,"");if(!N.valid(n))return;if(N.neq(u,n)){const n=r;const o=r;return{key:t,newRange:n,user:s,repo:i,oldRef:l,newRef:o}}}else{let r=l;let n=l.replace(/^v/,"");for(const t of a){const o=t.replace(/^v/,"");if(!N.valid(o))continue;if(!r||N.gt(o,n)){r=t;n=o}}if(N.neq(u,n)){const n=r;const o=r;return{key:t,newRange:n,user:s,repo:i,oldRef:l,newRef:o}}}}}function resolutionsBasePackage(t){const r=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return r[r.length-1]}function parseMixedArg(t){if(t===undefined){return false}else if(t===""){return true}else if(typeof t==="string"){return t.includes(",")?new Set(t.split(",")):new Set([t])}else if(Array.isArray(t)){return new Set(t)}else{return false}}async function main(){const t=await Promise.all(Object.keys(xe).map((t=>{const[r,n]=t.split(Z);return fetchInfo(n,r,Ee)})));for(const[r,n,o,a]of t){if(r&&r.error){throw new Error(r.error)}const t=typeof ge==="boolean"?ge:ge.has(r.name);const s=typeof ye==="boolean"?ye:ye.has(r.name);const i=typeof Se==="boolean"?Se:Se.has(r.name);let l;if(Re===true||Array.isArray(Re)&&Re.has(r.name)){l=se}else if(_e===true||Array.isArray(_e)&&_e.has(r.name)){l=ie}else{l=le}const u=`${n}${Z}${a}`;const c=xe[u].old;const d=findNewVersion(r,{usePre:s,useRel:i,useGreatest:t,semvers:l,range:c});const h=updateRange(c,d);if(!d||c===h){delete xe[u]}else{xe[u].new=h;xe[u].info=getInfoUrl(r.versions[d]||r,o,r.name);if(r.time&&r.time[d])xe[u].age=getAge(r.time[d])}}if(Object.keys(De).length){let t=await Promise.all(Object.entries(De).map((([t,r])=>{const[n,o]=t.split(Z);const a=typeof ge==="boolean"?ge:ge.has(o);return checkUrlDep([t,r],{useGreatest:a})})));t=t.filter((t=>!!t));for(const r of t||[]){const{key:t,newRange:n,user:o,repo:a,oldRef:s,newRef:i,newDate:l}=r;xe[t]={old:De[t].old,new:n,oldPrint:te.test(s)?s.substring(0,7):s,newPrint:te.test(i)?i.substring(0,7):i,info:`https://github.com/${o}/${a}`};if(l)xe[t].age=getAge(l)}}if(!Object.keys(xe).length){finish("All packages are up to date.")}if(!de.update){finish()}try{write(Pe,updatePackageJson())}catch(t){finish(new Error(`Error writing ${Pe}: ${t.message}`))}finish(me(`\n ╭────────────────────────╮\n │ package.json updated │\n ╰────────────────────────╯`.substring(1)))}main().catch(finish)})();
|
|
2
|
+
import{createRequire as t}from"module";var r={1040:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});function once(t,r,{signal:n}={}){return new Promise(((o,s)=>{function cleanup(){n===null||n===void 0?void 0:n.removeEventListener("abort",cleanup);t.removeListener(r,onEvent);t.removeListener("error",onError)}function onEvent(...t){cleanup();o(t)}function onError(t){cleanup();s(t)}n===null||n===void 0?void 0:n.addEventListener("abort",cleanup);t.on(r,onEvent);t.on("error",onError)}))}r["default"]=once},9690:function(t,r,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};const s=n(2361);const i=o(n(8237));const a=o(n(6570));const l=i.default("agent-base");function isAgent(t){return Boolean(t)&&typeof t.addRequest==="function"}function isSecureEndpoint(){const{stack:t}=new Error;if(typeof t!=="string")return false;return t.split("\n").some((t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1))}function createAgent(t,r){return new createAgent.Agent(t,r)}(function(t){class Agent extends s.EventEmitter{constructor(t,r){super();let n=r;if(typeof t==="function"){this.callback=t}else if(t){n=t}this.timeout=null;if(n&&typeof n.timeout==="number"){this.timeout=n.timeout}this.maxFreeSockets=1;this.maxSockets=1;this.maxTotalSockets=Infinity;this.sockets={};this.freeSockets={};this.requests={};this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number"){return this.explicitDefaultPort}return isSecureEndpoint()?443:80}set defaultPort(t){this.explicitDefaultPort=t}get protocol(){if(typeof this.explicitProtocol==="string"){return this.explicitProtocol}return isSecureEndpoint()?"https:":"http:"}set protocol(t){this.explicitProtocol=t}callback(t,r,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(t,r){const n=Object.assign({},r);if(typeof n.secureEndpoint!=="boolean"){n.secureEndpoint=isSecureEndpoint()}if(n.host==null){n.host="localhost"}if(n.port==null){n.port=n.secureEndpoint?443:80}if(n.protocol==null){n.protocol=n.secureEndpoint?"https:":"http:"}if(n.host&&n.path){delete n.path}delete n.agent;delete n.hostname;delete n._defaultAgent;delete n.defaultPort;delete n.createConnection;t._last=true;t.shouldKeepAlive=false;let o=false;let s=null;const i=n.timeout||this.timeout;const onerror=r=>{if(t._hadError)return;t.emit("error",r);t._hadError=true};const ontimeout=()=>{s=null;o=true;const t=new Error(`A "socket" was not created for HTTP request before ${i}ms`);t.code="ETIMEOUT";onerror(t)};const callbackError=t=>{if(o)return;if(s!==null){clearTimeout(s);s=null}onerror(t)};const onsocket=r=>{if(o)return;if(s!=null){clearTimeout(s);s=null}if(isAgent(r)){l("Callback returned another Agent instance %o",r.constructor.name);r.addRequest(t,n);return}if(r){r.once("free",(()=>{this.freeSocket(r,n)}));t.onSocket(r);return}const i=new Error(`no Duplex stream was returned to agent-base for \`${t.method} ${t.path}\``);onerror(i)};if(typeof this.callback!=="function"){onerror(new Error("`callback` is not defined"));return}if(!this.promisifiedCallback){if(this.callback.length>=3){l("Converting legacy callback function to promise");this.promisifiedCallback=a.default(this.callback)}else{this.promisifiedCallback=this.callback}}if(typeof i==="number"&&i>0){s=setTimeout(ontimeout,i)}if("port"in n&&typeof n.port!=="number"){n.port=Number(n.port)}try{l("Resolving socket for %o request: %o",n.protocol,`${t.method} ${t.path}`);Promise.resolve(this.promisifiedCallback(t,n)).then(onsocket,callbackError)}catch(t){Promise.reject(t).catch(callbackError)}}freeSocket(t,r){l("Freeing socket %o %o",t.constructor.name,r);t.destroy()}destroy(){l("Destroying agent %o",this.constructor.name)}}t.Agent=Agent;t.prototype=t.Agent.prototype})(createAgent||(createAgent={}));t.exports=createAgent},6570:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});function promisify(t){return function(r,n){return new Promise(((o,s)=>{t.call(this,r,n,((t,r)=>{if(t){s(t)}else{o(r)}}))}))}}r["default"]=promisify},8222:(t,r,n)=>{r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.storage=localstorage();r.destroy=(()=>{let t=false;return()=>{if(!t){t=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();r.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 useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(r){r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;r.splice(1,0,n,"color: inherit");let o=0;let s=0;r[0].replace(/%[a-zA-Z%]/g,(t=>{if(t==="%%"){return}o++;if(t==="%c"){s=o}}));r.splice(s,0,n)}r.log=console.debug||console.log||(()=>{});function save(t){try{if(t){r.storage.setItem("debug",t)}else{r.storage.removeItem("debug")}}catch(t){}}function load(){let t;try{t=r.storage.getItem("debug")}catch(t){}if(!t&&typeof process!=="undefined"&&"env"in process){t=process.env.DEBUG}return t}function localstorage(){try{return localStorage}catch(t){}}t.exports=n(6243)(r);const{formatters:o}=t.exports;o.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},6243:(t,r,n)=>{function setup(t){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=n(900);createDebug.destroy=destroy;Object.keys(t).forEach((r=>{createDebug[r]=t[r]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(t){let r=0;for(let n=0;n<t.length;n++){r=(r<<5)-r+t.charCodeAt(n);r|=0}return createDebug.colors[Math.abs(r)%createDebug.colors.length]}createDebug.selectColor=selectColor;function createDebug(t){let r;let n=null;let o;let s;function debug(...t){if(!debug.enabled){return}const n=debug;const o=Number(new Date);const s=o-(r||o);n.diff=s;n.prev=r;n.curr=o;r=o;t[0]=createDebug.coerce(t[0]);if(typeof t[0]!=="string"){t.unshift("%O")}let i=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if(r==="%%"){return"%"}i++;const s=createDebug.formatters[o];if(typeof s==="function"){const o=t[i];r=s.call(n,o);t.splice(i,1);i--}return r}));createDebug.formatArgs.call(n,t);const a=n.log||createDebug.log;a.apply(n,t)}debug.namespace=t;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(t);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(n!==null){return n}if(o!==createDebug.namespaces){o=createDebug.namespaces;s=createDebug.enabled(t)}return s},set:t=>{n=t}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(t,r){const n=createDebug(this.namespace+(typeof r==="undefined"?":":r)+t);n.log=this.log;return n}function enable(t){createDebug.save(t);createDebug.namespaces=t;createDebug.names=[];createDebug.skips=[];let r;const n=(typeof t==="string"?t:"").split(/[\s,]+/);const o=n.length;for(r=0;r<o;r++){if(!n[r]){continue}t=n[r].replace(/\*/g,".*?");if(t[0]==="-"){createDebug.skips.push(new RegExp("^"+t.substr(1)+"$"))}else{createDebug.names.push(new RegExp("^"+t+"$"))}}}function disable(){const t=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map((t=>"-"+t))].join(",");createDebug.enable("");return t}function enabled(t){if(t[t.length-1]==="*"){return true}let r;let n;for(r=0,n=createDebug.skips.length;r<n;r++){if(createDebug.skips[r].test(t)){return false}}for(r=0,n=createDebug.names.length;r<n;r++){if(createDebug.names[r].test(t)){return true}}return false}function toNamespace(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}function coerce(t){if(t instanceof Error){return t.stack||t.message}return t}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}createDebug.enable(createDebug.load());return createDebug}t.exports=setup},8237:(t,r,n)=>{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){t.exports=n(8222)}else{t.exports=n(5332)}},5332:(t,r,n)=>{const o=n(6224);const s=n(3837);r.init=init;r.log=log;r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.destroy=s.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");r.colors=[6,2,3,4,5,1];try{const t=n(9318);if(t&&(t.stderr||t).level>=2){r.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(t){}r.inspectOpts=Object.keys(process.env).filter((t=>/^debug_/i.test(t))).reduce(((t,r)=>{const n=r.substring(6).toLowerCase().replace(/_([a-z])/g,((t,r)=>r.toUpperCase()));let o=process.env[r];if(/^(yes|on|true|enabled)$/i.test(o)){o=true}else if(/^(no|off|false|disabled)$/i.test(o)){o=false}else if(o==="null"){o=null}else{o=Number(o)}t[n]=o;return t}),{});function useColors(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):o.isatty(process.stderr.fd)}function formatArgs(r){const{namespace:n,useColors:o}=this;if(o){const o=this.color;const s="[3"+(o<8?o:"8;5;"+o);const i=` ${s};1m${n} [0m`;r[0]=i+r[0].split("\n").join("\n"+i);r.push(s+"m+"+t.exports.humanize(this.diff)+"[0m")}else{r[0]=getDate()+n+" "+r[0]}}function getDate(){if(r.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...t){return process.stderr.write(s.format(...t)+"\n")}function save(t){if(t){process.env.DEBUG=t}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(t){t.inspectOpts={};const n=Object.keys(r.inspectOpts);for(let o=0;o<n.length;o++){t.inspectOpts[n[o]]=r.inspectOpts[n[o]]}}t.exports=n(6243)(r);const{formatters:i}=t.exports;i.o=function(t){this.inspectOpts.colors=this.useColors;return s.inspect(t,this.inspectOpts).split("\n").map((t=>t.trim())).join(" ")};i.O=function(t){this.inspectOpts.colors=this.useColors;return s.inspect(t,this.inspectOpts)}},1705:t=>{function isSpecificValue(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp?true:false}function cloneSpecificValue(t){if(t instanceof Buffer){var r=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);t.copy(r);return r}else if(t instanceof Date){return new Date(t.getTime())}else if(t instanceof RegExp){return new RegExp(t)}else{throw new Error("Unexpected situation")}}function deepCloneArray(t){var n=[];t.forEach((function(t,o){if(typeof t==="object"&&t!==null){if(Array.isArray(t)){n[o]=deepCloneArray(t)}else if(isSpecificValue(t)){n[o]=cloneSpecificValue(t)}else{n[o]=r({},t)}}else{n[o]=t}}));return n}function safeGetProperty(t,r){return r==="__proto__"?undefined:t[r]}var r=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var t=arguments[0];var n=Array.prototype.slice.call(arguments,1);var o,s,i;n.forEach((function(n){if(typeof n!=="object"||n===null||Array.isArray(n)){return}Object.keys(n).forEach((function(i){s=safeGetProperty(t,i);o=safeGetProperty(n,i);if(o===t){return}else if(typeof o!=="object"||o===null){t[i]=o;return}else if(Array.isArray(o)){t[i]=deepCloneArray(o);return}else if(isSpecificValue(o)){t[i]=cloneSpecificValue(o);return}else if(typeof s!=="object"||s===null||Array.isArray(s)){t[i]=r({},o);return}else{t[i]=r(s,o);return}}))}));return t}},1621:t=>{t.exports=(t,r=process.argv)=>{const n=t.startsWith("-")?"":t.length===1?"-":"--";const o=r.indexOf(n+t);const s=r.indexOf("--");return o!==-1&&(s===-1||o<s)}},4897:t=>{const maybeJoin=(...t)=>t.every((t=>t))?t.join(""):"";const maybeEncode=t=>t?encodeURIComponent(t):"";const r={sshtemplate:({domain:t,user:r,project:n,committish:o})=>`git@${t}:${r}/${n}.git${maybeJoin("#",o)}`,sshurltemplate:({domain:t,user:r,project:n,committish:o})=>`git+ssh://git@${t}/${r}/${n}.git${maybeJoin("#",o)}`,browsetemplate:({domain:t,user:r,project:n,committish:o,treepath:s})=>`https://${t}/${r}/${n}${maybeJoin("/",s,"/",maybeEncode(o))}`,browsefiletemplate:({domain:t,user:r,project:n,committish:o,treepath:s,path:i,fragment:a,hashformat:l})=>`https://${t}/${r}/${n}/${s}/${maybeEncode(o||"master")}/${i}${maybeJoin("#",l(a||""))}`,docstemplate:({domain:t,user:r,project:n,treepath:o,committish:s})=>`https://${t}/${r}/${n}${maybeJoin("/",o,"/",maybeEncode(s))}#readme`,httpstemplate:({auth:t,domain:r,user:n,project:o,committish:s})=>`git+https://${maybeJoin(t,"@")}${r}/${n}/${o}.git${maybeJoin("#",s)}`,filetemplate:({domain:t,user:r,project:n,committish:o,path:s})=>`https://${t}/${r}/${n}/raw/${maybeEncode(o)||"master"}/${s}`,shortcuttemplate:({type:t,user:r,project:n,committish:o})=>`${t}:${r}/${n}${maybeJoin("#",o)}`,pathtemplate:({user:t,project:r,committish:n})=>`${t}/${r}${maybeJoin("#",n)}`,bugstemplate:({domain:t,user:r,project:n})=>`https://${t}/${r}/${n}/issues`,hashformat:formatHashFragment};const n={};n.github=Object.assign({},r,{protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",filetemplate:({auth:t,user:r,project:n,committish:o,path:s})=>`https://${maybeJoin(t,"@")}raw.githubusercontent.com/${r}/${n}/${maybeEncode(o)||"master"}/${s}`,gittemplate:({auth:t,domain:r,user:n,project:o,committish:s})=>`git://${maybeJoin(t,"@")}${r}/${n}/${o}.git${maybeJoin("#",s)}`,tarballtemplate:({domain:t,user:r,project:n,committish:o})=>`https://codeload.${t}/${r}/${n}/tar.gz/${maybeEncode(o)||"master"}`,extract:t=>{let[,r,n,o,s]=t.pathname.split("/",5);if(o&&o!=="tree"){return}if(!o){s=t.hash.slice(1)}if(n&&n.endsWith(".git")){n=n.slice(0,-4)}if(!r||!n){return}return{user:r,project:n,committish:s}}});n.bitbucket=Object.assign({},r,{protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",tarballtemplate:({domain:t,user:r,project:n,committish:o})=>`https://${t}/${r}/${n}/get/${maybeEncode(o)||"master"}.tar.gz`,extract:t=>{let[,r,n,o]=t.pathname.split("/",4);if(["get"].includes(o)){return}if(n&&n.endsWith(".git")){n=n.slice(0,-4)}if(!r||!n){return}return{user:r,project:n,committish:t.hash.slice(1)}}});n.gitlab=Object.assign({},r,{protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",httpstemplate:({auth:t,domain:r,user:n,project:o,committish:s})=>`git+https://${maybeJoin(t,"@")}${r}/${n}/${o}.git${maybeJoin("#",s)}`,tarballtemplate:({domain:t,user:r,project:n,committish:o})=>`https://${t}/${r}/${n}/repository/archive.tar.gz?ref=${maybeEncode(o)||"master"}`,extract:t=>{const r=t.pathname.slice(1);if(r.includes("/-/")||r.includes("/archive.tar.gz")){return}const n=r.split("/");let o=n.pop();if(o.endsWith(".git")){o=o.slice(0,-4)}const s=n.join("/");if(!s||!o){return}return{user:s,project:o,committish:t.hash.slice(1)}}});n.gist=Object.assign({},r,{protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",sshtemplate:({domain:t,project:r,committish:n})=>`git@${t}:${r}.git${maybeJoin("#",n)}`,sshurltemplate:({domain:t,project:r,committish:n})=>`git+ssh://git@${t}/${r}.git${maybeJoin("#",n)}`,browsetemplate:({domain:t,project:r,committish:n})=>`https://${t}/${r}${maybeJoin("/",maybeEncode(n))}`,browsefiletemplate:({domain:t,project:r,committish:n,path:o,hashformat:s})=>`https://${t}/${r}${maybeJoin("/",maybeEncode(n))}${maybeJoin("#",s(o))}`,docstemplate:({domain:t,project:r,committish:n})=>`https://${t}/${r}${maybeJoin("/",maybeEncode(n))}`,httpstemplate:({domain:t,project:r,committish:n})=>`git+https://${t}/${r}.git${maybeJoin("#",n)}`,filetemplate:({user:t,project:r,committish:n,path:o})=>`https://gist.githubusercontent.com/${t}/${r}/raw${maybeJoin("/",maybeEncode(n))}/${o}`,shortcuttemplate:({type:t,project:r,committish:n})=>`${t}:${r}${maybeJoin("#",n)}`,pathtemplate:({project:t,committish:r})=>`${t}${maybeJoin("#",r)}`,bugstemplate:({domain:t,project:r})=>`https://${t}/${r}`,gittemplate:({domain:t,project:r,committish:n})=>`git://${t}/${r}.git${maybeJoin("#",n)}`,tarballtemplate:({project:t,committish:r})=>`https://codeload.github.com/gist/${t}/tar.gz/${maybeEncode(r)||"master"}`,extract:t=>{let[,r,n,o]=t.pathname.split("/",4);if(o==="raw"){return}if(!n){if(!r){return}n=r;r=null}if(n.endsWith(".git")){n=n.slice(0,-4)}return{user:r,project:n,committish:t.hash.slice(1)}},hashformat:function(t){return t&&"file-"+formatHashFragment(t)}});n.sourcehut=Object.assign({},r,{protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",browsefiletemplate:({domain:t,user:r,project:n,committish:o,treepath:s,path:i,fragment:a,hashformat:l})=>`https://${t}/${r}/${n}/${s}/${maybeEncode(o||"main")}/${i}${maybeJoin("#",l(a||""))}`,filetemplate:({domain:t,user:r,project:n,committish:o,path:s})=>`https://${t}/${r}/${n}/blob/${maybeEncode(o)||"main"}/${s}`,httpstemplate:({domain:t,user:r,project:n,committish:o})=>`https://${t}/${r}/${n}.git${maybeJoin("#",o)}`,tarballtemplate:({domain:t,user:r,project:n,committish:o})=>`https://${t}/${r}/${n}/archive/${maybeEncode(o)||"main"}.tar.gz`,bugstemplate:({domain:t,user:r,project:n})=>`https://todo.sr.ht/${r}/${n}`,docstemplate:({domain:t,user:r,project:n,treepath:o,committish:s})=>`https://${t}/${r}/${n}${maybeJoin("/",o,"/",maybeEncode(s))}#readme`,extract:t=>{let[,r,n,o]=t.pathname.split("/",4);if(["archive"].includes(o)){return}if(n&&n.endsWith(".git")){n=n.slice(0,-4)}if(!r||!n){return}return{user:r,project:n,committish:t.hash.slice(1)}}});const o=Object.keys(n);n.byShortcut={};n.byDomain={};for(const t of o){n.byShortcut[`${t}:`]=t;n.byDomain[n[t].domain]=t}function formatHashFragment(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}t.exports=n},5758:(t,r,n)=>{const o=n(4897);class GitHost{constructor(t,r,n,s,i,a,l={}){Object.assign(this,o[t]);this.type=t;this.user=r;this.auth=n;this.project=s;this.committish=i;this.default=a;this.opts=l}hash(){return this.committish?`#${this.committish}`:""}ssh(t){return this._fill(this.sshtemplate,t)}_fill(t,r){if(typeof t==="function"){const n={...this,...this.opts,...r};if(!n.path){n.path=""}if(n.path.startsWith("/")){n.path=n.path.slice(1)}if(n.noCommittish){n.committish=null}const o=t(n);return n.noGitPlus&&o.startsWith("git+")?o.slice(4):o}return null}sshurl(t){return this._fill(this.sshurltemplate,t)}browse(t,r,n){if(typeof t!=="string"){return this._fill(this.browsetemplate,t)}if(typeof r!=="string"){n=r;r=null}return this._fill(this.browsefiletemplate,{...n,fragment:r,path:t})}docs(t){return this._fill(this.docstemplate,t)}bugs(t){return this._fill(this.bugstemplate,t)}https(t){return this._fill(this.httpstemplate,t)}git(t){return this._fill(this.gittemplate,t)}shortcut(t){return this._fill(this.shortcuttemplate,t)}path(t){return this._fill(this.pathtemplate,t)}tarball(t){return this._fill(this.tarballtemplate,{...t,noCommittish:false})}file(t,r){return this._fill(this.filetemplate,{...r,path:t})}getDefaultRepresentation(){return this.default}toString(t){if(this.default&&typeof this[this.default]==="function"){return this[this.default](t)}return this.sshurl(t)}}t.exports=GitHost},167:(t,r,n)=>{const o=n(7310);const s=n(4897);const i=t.exports=n(5758);const a=n(1372);const l=new a({max:1e3});const u={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function protocolToRepresentation(t){return u[t]||t.slice(0,-1)}const c={"git:":true,"https:":true,"git+https:":true,"http:":true,"git+http:":true};const d=Object.keys(s.byShortcut).concat(["http:","https:","git:","git+ssh:","git+https:","ssh:"]);t.exports.fromUrl=function(t,r){if(typeof t!=="string"){return}const n=t+JSON.stringify(r||{});if(!l.has(n)){l.set(n,fromUrl(t,r))}return l.get(n)};function fromUrl(t,r){if(!t){return}const n=isGitHubShorthand(t)?"github:"+t:correctProtocol(t);const o=parseGitUrl(n);if(!o){return o}const a=s.byShortcut[o.protocol];const l=s.byDomain[o.hostname.startsWith("www.")?o.hostname.slice(4):o.hostname];const u=a||l;if(!u){return}const d=s[a||l];let h=null;if(c[o.protocol]&&(o.username||o.password)){h=`${o.username}${o.password?":"+o.password:""}`}let p=null;let m=null;let b=null;let g=null;try{if(a){let t=o.pathname.startsWith("/")?o.pathname.slice(1):o.pathname;const r=t.indexOf("@");if(r>-1){t=t.slice(r+1)}const n=t.lastIndexOf("/");if(n>-1){m=decodeURIComponent(t.slice(0,n));if(!m){m=null}b=decodeURIComponent(t.slice(n+1))}else{b=decodeURIComponent(t)}if(b.endsWith(".git")){b=b.slice(0,-4)}if(o.hash){p=decodeURIComponent(o.hash.slice(1))}g="shortcut"}else{if(!d.protocols.includes(o.protocol)){return}const t=d.extract(o);if(!t){return}m=t.user&&decodeURIComponent(t.user);b=decodeURIComponent(t.project);p=decodeURIComponent(t.committish);g=protocolToRepresentation(o.protocol)}}catch(t){if(t instanceof URIError){return}else{throw t}}return new i(u,m,h,b,p,g,r)}const correctProtocol=t=>{const r=t.indexOf(":");const n=t.slice(0,r+1);if(d.includes(n)){return t}const o=t.indexOf("@");if(o>-1){if(o>r){return`git+ssh://${t}`}else{return t}}const s=t.indexOf("//");if(s===r+1){return t}return t.slice(0,r+1)+"//"+t.slice(r+1)};const isGitHubShorthand=t=>{const r=t.indexOf("#");const n=t.indexOf("/");const o=t.indexOf("/",n+1);const s=t.indexOf(":");const i=/\s/.exec(t);const a=t.indexOf("@");const l=!i||r>-1&&i.index>r;const u=a===-1||r>-1&&a>r;const c=s===-1||r>-1&&s>r;const d=o===-1||r>-1&&o>r;const h=n>0;const p=r>-1?t[r-1]!=="/":!t.endsWith("/");const m=!t.startsWith(".");return l&&h&&p&&m&&u&&c&&d};const correctUrl=t=>{const r=t.indexOf("@");const n=t.lastIndexOf("#");let o=t.indexOf(":");let s=t.lastIndexOf(":",n>-1?n:Infinity);let i;if(s>r){i=t.slice(0,s)+"/"+t.slice(s+1);o=i.indexOf(":");s=i.lastIndexOf(":")}if(o===-1&&t.indexOf("//")===-1){i=`git+ssh://${i}`}return i};const parseGitUrl=t=>{let r;try{r=new o.URL(t)}catch(t){}if(r){return r}const n=correctUrl(t);try{r=new o.URL(n)}catch(t){}return r}},1372:t=>{const r=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const n=typeof AbortController!=="undefined";const o=n?AbortController:Object.assign(class AbortController{constructor(){this.signal=new o.AbortSignal}abort(){this.signal.aborted=true}},{AbortSignal:class AbortSignal{constructor(){this.aborted=false}}});const s=new Set;const deprecatedOption=(t,r)=>{const n=`LRU_CACHE_OPTION_${t}`;if(shouldWarn(n)){warn(n,`${t} option`,`options.${r}`,LRUCache)}};const deprecatedMethod=(t,r)=>{const n=`LRU_CACHE_METHOD_${t}`;if(shouldWarn(n)){const{prototype:o}=LRUCache;const{get:s}=Object.getOwnPropertyDescriptor(o,t);warn(n,`${t} method`,`cache.${r}()`,s)}};const deprecatedProperty=(t,r)=>{const n=`LRU_CACHE_PROPERTY_${t}`;if(shouldWarn(n)){const{prototype:o}=LRUCache;const{get:s}=Object.getOwnPropertyDescriptor(o,t);warn(n,`${t} property`,`cache.${r}`,s)}};const shouldWarn=t=>typeof process==="object"&&process&&!s.has(t);const warn=(t,r,n,o)=>{s.add(t);const i=`The ${r} is deprecated. Please use ${n} instead.`;process.emitWarning(i,"DeprecationWarning",t,o)};const isPosInt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t);const getUintArray=t=>!isPosInt(t)?null:t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(t){super(t);this.fill(0)}}class Stack{constructor(t){const r=t?getUintArray(t):Array;this.heap=new r(t);this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class LRUCache{constructor(t={}){const{max:r=0,ttl:n,ttlResolution:o=1,ttlAutopurge:i,updateAgeOnGet:a,allowStale:l,dispose:u,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:h,maxSize:p=0,sizeCalculation:m,fetchMethod:b}=t;const{length:g,maxAge:y,stale:S}=t instanceof LRUCache?{}:t;if(r!==0&&!isPosInt(r)){throw new TypeError("max option must be a nonnegative integer")}const R=r?getUintArray(r):Array;if(!R){throw new Error("invalid max value: "+r)}this.max=r;this.maxSize=p;this.sizeCalculation=m||g;if(this.sizeCalculation){if(!this.maxSize){throw new TypeError("cannot set sizeCalculation without setting maxSize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}this.fetchMethod=b||null;if(this.fetchMethod&&typeof this.fetchMethod!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.keyMap=new Map;this.keyList=new Array(r).fill(null);this.valList=new Array(r).fill(null);this.next=new R(r);this.prev=new R(r);this.head=0;this.tail=0;this.free=new Stack(r);this.initialFill=1;this.size=0;if(typeof u==="function"){this.dispose=u}if(typeof c==="function"){this.disposeAfter=c;this.disposed=[]}else{this.disposeAfter=null;this.disposed=null}this.noDisposeOnSet=!!d;this.noUpdateTTL=!!h;if(this.maxSize!==0){if(!isPosInt(this.maxSize)){throw new TypeError("maxSize must be a positive integer if specified")}this.initializeSizeTracking()}this.allowStale=!!l||!!S;this.updateAgeOnGet=!!a;this.ttlResolution=isPosInt(o)||o===0?o:1;this.ttlAutopurge=!!i;this.ttl=n||y||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const t="LRU_CACHE_UNBOUNDED";if(shouldWarn(t)){s.add(t);const r="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";process.emitWarning(r,"UnboundedCacheWarning",t,LRUCache)}}if(S){deprecatedOption("stale","allowStale")}if(y){deprecatedOption("maxAge","ttl")}if(g){deprecatedOption("length","sizeCalculation")}}getRemainingTTL(t){return this.has(t)?Infinity:0}initializeTTLTracking(){this.ttls=new ZeroArray(this.max);this.starts=new ZeroArray(this.max);this.setItemTTL=(t,n)=>{this.starts[t]=n!==0?r.now():0;this.ttls[t]=n;if(n!==0&&this.ttlAutopurge){const r=setTimeout((()=>{if(this.isStale(t)){this.delete(this.keyList[t])}}),n+1);if(r.unref){r.unref()}}};this.updateItemAge=t=>{this.starts[t]=this.ttls[t]!==0?r.now():0};let t=0;const getNow=()=>{const n=r.now();if(this.ttlResolution>0){t=n;const r=setTimeout((()=>t=0),this.ttlResolution);if(r.unref){r.unref()}}return n};this.getRemainingTTL=r=>{const n=this.keyMap.get(r);if(n===undefined){return 0}return this.ttls[n]===0||this.starts[n]===0?Infinity:this.starts[n]+this.ttls[n]-(t||getNow())};this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(t||getNow())-this.starts[r]>this.ttls[r]}updateItemAge(t){}setItemTTL(t,r){}isStale(t){return false}initializeSizeTracking(){this.calculatedSize=0;this.sizes=new ZeroArray(this.max);this.removeItemSize=t=>this.calculatedSize-=this.sizes[t];this.requireSize=(t,r,n,o)=>{if(!isPosInt(n)){if(o){if(typeof o!=="function"){throw new TypeError("sizeCalculation must be a function")}n=o(r,t);if(!isPosInt(n)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer)")}}return n};this.addItemSize=(t,r,n,o)=>{this.sizes[t]=o;const s=this.maxSize-this.sizes[t];while(this.calculatedSize>s){this.evict()}this.calculatedSize+=this.sizes[t]};this.delete=t=>{if(this.size!==0){const r=this.keyMap.get(t);if(r!==undefined){this.calculatedSize-=this.sizes[r]}}return LRUCache.prototype.delete.call(this,t)}}removeItemSize(t){}addItemSize(t,r,n,o){}requireSize(t,r,n,o){if(n||o){throw new TypeError("cannot set size without setting maxSize on cache")}}*indexes({allowStale:t=this.allowStale}={}){if(this.size){for(let r=this.tail;true;){if(!this.isValidIndex(r)){break}if(t||!this.isStale(r)){yield r}if(r===this.head){break}else{r=this.prev[r]}}}}*rindexes({allowStale:t=this.allowStale}={}){if(this.size){for(let r=this.head;true;){if(!this.isValidIndex(r)){break}if(t||!this.isStale(r)){yield r}if(r===this.tail){break}else{r=this.next[r]}}}}isValidIndex(t){return this.keyMap.get(this.keyList[t])===t}*entries(){for(const t of this.indexes()){yield[this.keyList[t],this.valList[t]]}}*rentries(){for(const t of this.rindexes()){yield[this.keyList[t],this.valList[t]]}}*keys(){for(const t of this.indexes()){yield this.keyList[t]}}*rkeys(){for(const t of this.rindexes()){yield this.keyList[t]}}*values(){for(const t of this.indexes()){yield this.valList[t]}}*rvalues(){for(const t of this.rindexes()){yield this.valList[t]}}[Symbol.iterator](){return this.entries()}find(t,r={}){for(const n of this.indexes()){if(t(this.valList[n],this.keyList[n],this)){return this.get(this.keyList[n],r)}}}forEach(t,r=this){for(const n of this.indexes()){t.call(r,this.valList[n],this.keyList[n],this)}}rforEach(t,r=this){for(const n of this.rindexes()){t.call(r,this.valList[n],this.keyList[n],this)}}get prune(){deprecatedMethod("prune","purgeStale");return this.purgeStale}purgeStale(){let t=false;for(const r of this.rindexes({allowStale:true})){if(this.isStale(r)){this.delete(this.keyList[r]);t=true}}return t}dump(){const t=[];for(const r of this.indexes()){const n=this.keyList[r];const o=this.valList[r];const s={value:o};if(this.ttls){s.ttl=this.ttls[r]}if(this.sizes){s.size=this.sizes[r]}t.unshift([n,s])}return t}load(t){this.clear();for(const[r,n]of t){this.set(r,n.value,n)}}dispose(t,r,n){}set(t,r,{ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:i=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){s=this.requireSize(t,r,s,i);let l=this.size===0?undefined:this.keyMap.get(t);if(l===undefined){l=this.newIndex();this.keyList[l]=t;this.valList[l]=r;this.keyMap.set(t,l);this.next[this.tail]=l;this.prev[l]=this.tail;this.tail=l;this.size++;this.addItemSize(l,r,t,s);a=false}else{const n=this.valList[l];if(r!==n){if(this.isBackgroundFetch(n)){n.__abortController.abort()}else{if(!o){this.dispose(n,t,"set");if(this.disposeAfter){this.disposed.push([n,t,"set"])}}}this.removeItemSize(l);this.valList[l]=r;this.addItemSize(l,r,t,s)}this.moveToTail(l)}if(n!==0&&this.ttl===0&&!this.ttls){this.initializeTTLTracking()}if(!a){this.setItemTTL(l,n)}if(this.disposeAfter){while(this.disposed.length){this.disposeAfter(...this.disposed.shift())}}return this}newIndex(){if(this.size===0){return this.tail}if(this.size===this.max){return this.evict()}if(this.free.length!==0){return this.free.pop()}return this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];this.evict();return t}}evict(){const t=this.head;const r=this.keyList[t];const n=this.valList[t];if(this.isBackgroundFetch(n)){n.__abortController.abort()}else{this.dispose(n,r,"evict");if(this.disposeAfter){this.disposed.push([n,r,"evict"])}}this.removeItemSize(t);this.head=this.next[t];this.keyMap.delete(r);this.size--;return t}has(t){return this.keyMap.has(t)&&!this.isStale(this.keyMap.get(t))}peek(t,{allowStale:r=this.allowStale}={}){const n=this.keyMap.get(t);if(n!==undefined&&(r||!this.isStale(n))){return this.valList[n]}}backgroundFetch(t,r,n){const s=r===undefined?undefined:this.valList[r];if(this.isBackgroundFetch(s)){return s}const i=new o;const a={signal:i.signal,options:n};const l=Promise.resolve(this.fetchMethod(t,s,a)).then((r=>{if(!i.signal.aborted){this.set(t,r,a.options)}return r}));l.__abortController=i;l.__staleWhileFetching=s;if(r===undefined){this.set(t,l,a.options);r=this.keyMap.get(t)}else{this.valList[r]=l}return l}isBackgroundFetch(t){return t&&typeof t==="object"&&typeof t.then==="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")}async fetch(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:i=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL}={}){if(!this.fetchMethod){return this.get(t,{allowStale:r,updateAgeOnGet:n})}const u={allowStale:r,updateAgeOnGet:n,ttl:o,noDisposeOnSet:s,size:i,sizeCalculation:a,noUpdateTTL:l};let c=this.keyMap.get(t);if(c===undefined){return this.backgroundFetch(t,c,u)}else{const o=this.valList[c];if(this.isBackgroundFetch(o)){return r&&o.__staleWhileFetching!==undefined?o.__staleWhileFetching:o}if(!this.isStale(c)){this.moveToTail(c);if(n){this.updateItemAge(c)}return o}const s=this.backgroundFetch(t,c,u);return r&&s.__staleWhileFetching!==undefined?s.__staleWhileFetching:s}}get(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet}={}){const o=this.keyMap.get(t);if(o!==undefined){const s=this.valList[o];const i=this.isBackgroundFetch(s);if(this.isStale(o)){if(!i){this.delete(t);return r?s:undefined}else{return r?s.__staleWhileFetching:undefined}}else{if(i){return undefined}this.moveToTail(o);if(n){this.updateItemAge(o)}return s}}}connect(t,r){this.prev[r]=t;this.next[t]=r}moveToTail(t){if(t!==this.tail){if(t===this.head){this.head=this.next[t]}else{this.connect(this.prev[t],this.next[t])}this.connect(this.tail,t);this.tail=t}}get del(){deprecatedMethod("del","delete");return this.delete}delete(t){let r=false;if(this.size!==0){const n=this.keyMap.get(t);if(n!==undefined){r=true;if(this.size===1){this.clear()}else{this.removeItemSize(n);const r=this.valList[n];if(this.isBackgroundFetch(r)){r.__abortController.abort()}else{this.dispose(r,t,"delete");if(this.disposeAfter){this.disposed.push([r,t,"delete"])}}this.keyMap.delete(t);this.keyList[n]=null;this.valList[n]=null;if(n===this.tail){this.tail=this.prev[n]}else if(n===this.head){this.head=this.next[n]}else{this.next[this.prev[n]]=this.next[n];this.prev[this.next[n]]=this.prev[n]}this.size--;this.free.push(n)}}}if(this.disposed){while(this.disposed.length){this.disposeAfter(...this.disposed.shift())}}return r}clear(){for(const t of this.rindexes({allowStale:true})){const r=this.valList[t];if(this.isBackgroundFetch(r)){r.__abortController.abort()}else{const n=this.keyList[t];this.dispose(r,n,"delete");if(this.disposeAfter){this.disposed.push([r,n,"delete"])}}}this.keyMap.clear();this.valList.fill(null);this.keyList.fill(null);if(this.ttls){this.ttls.fill(0);this.starts.fill(0)}if(this.sizes){this.sizes.fill(0)}this.head=0;this.tail=0;this.initialFill=1;this.free.length=0;this.calculatedSize=0;this.size=0;if(this.disposed){while(this.disposed.length){this.disposeAfter(...this.disposed.shift())}}}get reset(){deprecatedMethod("reset","clear");return this.clear}get length(){deprecatedProperty("length","size");return this.size}}t.exports=LRUCache},7492:function(t,r,n){var o=this&&this.__awaiter||function(t,r,n,o){function adopt(t){return t instanceof n?t:new n((function(r){r(t)}))}return new(n||(n=Promise))((function(n,s){function fulfilled(t){try{step(o.next(t))}catch(t){s(t)}}function rejected(t){try{step(o["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((o=o.apply(t,r||[])).next())}))};var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});const i=s(n(1808));const a=s(n(4404));const l=s(n(7310));const u=s(n(8237));const c=s(n(1040));const d=n(9690);const h=(0,u.default)("http-proxy-agent");function isHTTPS(t){return typeof t==="string"?/^https:?$/i.test(t):false}class HttpProxyAgent extends d.Agent{constructor(t){let r;if(typeof t==="string"){r=l.default.parse(t)}else{r=t}if(!r){throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!")}h("Creating new HttpProxyAgent instance: %o",r);super(r);const n=Object.assign({},r);this.secureProxy=r.secureProxy||isHTTPS(n.protocol);n.host=n.hostname||n.host;if(typeof n.port==="string"){n.port=parseInt(n.port,10)}if(!n.port&&n.host){n.port=this.secureProxy?443:80}if(n.host&&n.path){delete n.path;delete n.pathname}this.proxy=n}callback(t,r){return o(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:o}=this;const s=l.default.parse(t.path);if(!s.protocol){s.protocol="http:"}if(!s.hostname){s.hostname=r.hostname||r.host||null}if(s.port==null&&typeof r.port){s.port=String(r.port)}if(s.port==="80"){s.port=""}t.path=l.default.format(s);if(n.auth){t.setHeader("Proxy-Authorization",`Basic ${Buffer.from(n.auth).toString("base64")}`)}let u;if(o){h("Creating `tls.Socket`: %o",n);u=a.default.connect(n)}else{h("Creating `net.Socket`: %o",n);u=i.default.connect(n)}if(t._header){let r;let n;h("Regenerating stored HTTP header string for request");t._header=null;t._implicitHeader();if(t.output&&t.output.length>0){h("Patching connection write() output buffer with updated header");r=t.output[0];n=r.indexOf("\r\n\r\n")+4;t.output[0]=t._header+r.substring(n);h("Output buffer: %o",t.output)}else if(t.outputData&&t.outputData.length>0){h("Patching connection write() output buffer with updated header");r=t.outputData[0].data;n=r.indexOf("\r\n\r\n")+4;t.outputData[0].data=t._header+r.substring(n);h("Output buffer: %o",t.outputData[0].data)}}yield(0,c.default)(u,"connect");return u}))}}r["default"]=HttpProxyAgent},3764:function(t,r,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};const s=o(n(7492));function createHttpProxyAgent(t){return new s.default(t)}(function(t){t.HttpProxyAgent=s.default;t.prototype=s.default.prototype})(createHttpProxyAgent||(createHttpProxyAgent={}));t.exports=createHttpProxyAgent},5098:function(t,r,n){var o=this&&this.__awaiter||function(t,r,n,o){function adopt(t){return t instanceof n?t:new n((function(r){r(t)}))}return new(n||(n=Promise))((function(n,s){function fulfilled(t){try{step(o.next(t))}catch(t){s(t)}}function rejected(t){try{step(o["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((o=o.apply(t,r||[])).next())}))};var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});const i=s(n(1808));const a=s(n(4404));const l=s(n(7310));const u=s(n(9491));const c=s(n(8237));const d=n(9690);const h=s(n(595));const p=c.default("https-proxy-agent:agent");class HttpsProxyAgent extends d.Agent{constructor(t){let r;if(typeof t==="string"){r=l.default.parse(t)}else{r=t}if(!r){throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!")}p("creating new HttpsProxyAgent instance: %o",r);super(r);const n=Object.assign({},r);this.secureProxy=r.secureProxy||isHTTPS(n.protocol);n.host=n.hostname||n.host;if(typeof n.port==="string"){n.port=parseInt(n.port,10)}if(!n.port&&n.host){n.port=this.secureProxy?443:80}if(this.secureProxy&&!("ALPNProtocols"in n)){n.ALPNProtocols=["http 1.1"]}if(n.host&&n.path){delete n.path;delete n.pathname}this.proxy=n}callback(t,r){return o(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:o}=this;let s;if(o){p("Creating `tls.Socket`: %o",n);s=a.default.connect(n)}else{p("Creating `net.Socket`: %o",n);s=i.default.connect(n)}const l=Object.assign({},n.headers);const c=`${r.host}:${r.port}`;let d=`CONNECT ${c} HTTP/1.1\r\n`;if(n.auth){l["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`}let{host:m,port:b,secureEndpoint:g}=r;if(!isDefaultPort(b,g)){m+=`:${b}`}l.Host=m;l.Connection="close";for(const t of Object.keys(l)){d+=`${t}: ${l[t]}\r\n`}const y=h.default(s);s.write(`${d}\r\n`);const{statusCode:S,buffered:R}=yield y;if(S===200){t.once("socket",resume);if(r.secureEndpoint){const t=r.servername||r.host;if(!t){throw new Error('Could not determine "servername"')}p("Upgrading socket connection to TLS");return a.default.connect(Object.assign(Object.assign({},omit(r,"host","hostname","path","port")),{socket:s,servername:t}))}return s}s.destroy();const _=new i.default.Socket;_.readable=true;t.once("socket",(t=>{p("replaying proxy buffer for failed request");u.default(t.listenerCount("data")>0);t.push(R);t.push(null)}));return _}))}}r["default"]=HttpsProxyAgent;function resume(t){t.resume()}function isDefaultPort(t,r){return Boolean(!r&&t===80||r&&t===443)}function isHTTPS(t){return typeof t==="string"?/^https:?$/i.test(t):false}function omit(t,...r){const n={};let o;for(o in t){if(!r.includes(o)){n[o]=t[o]}}return n}},7219:function(t,r,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};const s=o(n(5098));function createHttpsProxyAgent(t){return new s.default(t)}(function(t){t.HttpsProxyAgent=s.default;t.prototype=s.default.prototype})(createHttpsProxyAgent||(createHttpsProxyAgent={}));t.exports=createHttpsProxyAgent},595:function(t,r,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});const s=o(n(8237));const i=s.default("https-proxy-agent:parse-proxy-response");function parseProxyResponse(t){return new Promise(((r,n)=>{let o=0;const s=[];function read(){const r=t.read();if(r)ondata(r);else t.once("readable",read)}function cleanup(){t.removeListener("end",onend);t.removeListener("error",onerror);t.removeListener("close",onclose);t.removeListener("readable",read)}function onclose(t){i("onclose had error %o",t)}function onend(){i("onend")}function onerror(t){cleanup();i("onerror %o",t);n(t)}function ondata(t){s.push(t);o+=t.length;const n=Buffer.concat(s,o);const a=n.indexOf("\r\n\r\n");if(a===-1){i("have not received end of HTTP headers yet...");read();return}const l=n.toString("ascii",0,n.indexOf("\r\n"));const u=+l.split(" ")[1];i("got proxy server response: %o",l);r({statusCode:u,buffered:n})}t.on("error",onerror);t.on("close",onclose);t.on("end",onend);read()}))}r["default"]=parseProxyResponse},8885:(t,r)=>{r.parse=r.decode=decode;r.stringify=r.encode=encode;r.safe=safe;r.unsafe=unsafe;var n=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(t,r){var o=[];var s="";if(typeof r==="string"){r={section:r,whitespace:false}}else{r=r||{};r.whitespace=r.whitespace===true}var i=r.whitespace?" = ":"=";Object.keys(t).forEach((function(r,a,l){var u=t[r];if(u&&Array.isArray(u)){u.forEach((function(t){s+=safe(r+"[]")+i+safe(t)+"\n"}))}else if(u&&typeof u==="object")o.push(r);else s+=safe(r)+i+safe(u)+n}));if(r.section&&s.length)s="["+safe(r.section)+"]"+n+s;o.forEach((function(o,i,a){var l=dotSplit(o).join("\\.");var u=(r.section?r.section+".":"")+l;var c=encode(t[o],{section:u,whitespace:r.whitespace});if(s.length&&c.length)s+=n;s+=c}));return s}function dotSplit(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(t){return t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(t){var r={};var n=r;var o=null;var s=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var i=t.split(/[\r\n]+/g);i.forEach((function(t,i,a){if(!t||t.match(/^\s*[;#]/))return;var l=t.match(s);if(!l)return;if(l[1]!==undefined){o=unsafe(l[1]);if(o==="__proto__"){n={};return}n=r[o]=r[o]||{};return}var u=unsafe(l[2]);if(u==="__proto__")return;var c=l[3]?unsafe(l[4]):true;switch(c){case"true":case"false":case"null":c=JSON.parse(c)}if(u.length>2&&u.slice(-2)==="[]"){u=u.substring(0,u.length-2);if(u==="__proto__")return;if(!n[u])n[u]=[];else if(!Array.isArray(n[u]))n[u]=[n[u]]}if(Array.isArray(n[u]))n[u].push(c);else n[u]=c}));Object.keys(r).filter((function(t,n,o){if(!r[t]||typeof r[t]!=="object"||Array.isArray(r[t]))return false;var s=dotSplit(t);var i=r;var a=s.pop();var l=a.replace(/\\\./g,".");s.forEach((function(t,r,n){if(t==="__proto__")return;if(!i[t]||typeof i[t]!=="object")i[t]={};i=i[t]}));if(i===r&&l===a)return false;i[l]=r[t];return true})).forEach((function(t,n,o){delete r[t]}));return r}function isQuoted(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function safe(t){return typeof t!=="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&isQuoted(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(t,r){t=(t||"").trim();if(isQuoted(t)){if(t.charAt(0)==="'")t=t.substr(1,t.length-2);try{t=JSON.parse(t)}catch(t){}}else{var n=false;var o="";for(var s=0,i=t.length;s<i;s++){var a=t.charAt(s);if(n){if("\\;#".indexOf(a)!==-1)o+=a;else o+="\\"+a;n=false}else if(";#".indexOf(a)!==-1)break;else if(a==="\\")n=true;else o+=a}if(n)o+="\\";return o.trim()}return t}},5871:t=>{t.exports=function(t,r){if(!r)r={};var n={bools:{},strings:{},unknownFn:null};if(typeof r["unknown"]==="function"){n.unknownFn=r["unknown"]}if(typeof r["boolean"]==="boolean"&&r["boolean"]){n.allBools=true}else{[].concat(r["boolean"]).filter(Boolean).forEach((function(t){n.bools[t]=true}))}var o={};Object.keys(r.alias||{}).forEach((function(t){o[t]=[].concat(r.alias[t]);o[t].forEach((function(r){o[r]=[t].concat(o[t].filter((function(t){return r!==t})))}))}));[].concat(r.string).filter(Boolean).forEach((function(t){n.strings[t]=true;if(o[t]){n.strings[o[t]]=true}}));var s=r["default"]||{};var i={_:[]};Object.keys(n.bools).forEach((function(t){setArg(t,s[t]===undefined?false:s[t])}));var a=[];if(t.indexOf("--")!==-1){a=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}function argDefined(t,r){return n.allBools&&/^--[^=]+$/.test(r)||n.strings[t]||n.bools[t]||o[t]}function setArg(t,r,s){if(s&&n.unknownFn&&!argDefined(t,s)){if(n.unknownFn(s)===false)return}var a=!n.strings[t]&&isNumber(r)?Number(r):r;setKey(i,t.split("."),a);(o[t]||[]).forEach((function(t){setKey(i,t.split("."),a)}))}function setKey(t,r,o){var s=t;for(var i=0;i<r.length-1;i++){var a=r[i];if(isConstructorOrProto(s,a))return;if(s[a]===undefined)s[a]={};if(s[a]===Object.prototype||s[a]===Number.prototype||s[a]===String.prototype)s[a]={};if(s[a]===Array.prototype)s[a]=[];s=s[a]}var a=r[r.length-1];if(isConstructorOrProto(s,a))return;if(s===Object.prototype||s===Number.prototype||s===String.prototype)s={};if(s===Array.prototype)s=[];if(s[a]===undefined||n.bools[a]||typeof s[a]==="boolean"){s[a]=o}else if(Array.isArray(s[a])){s[a].push(o)}else{s[a]=[s[a],o]}}function aliasIsBoolean(t){return o[t].some((function(t){return n.bools[t]}))}for(var l=0;l<t.length;l++){var u=t[l];if(/^--.+=/.test(u)){var c=u.match(/^--([^=]+)=([\s\S]*)$/);var d=c[1];var h=c[2];if(n.bools[d]){h=h!=="false"}setArg(d,h,u)}else if(/^--no-.+/.test(u)){var d=u.match(/^--no-(.+)/)[1];setArg(d,false,u)}else if(/^--.+/.test(u)){var d=u.match(/^--(.+)/)[1];var p=t[l+1];if(p!==undefined&&!/^-/.test(p)&&!n.bools[d]&&!n.allBools&&(o[d]?!aliasIsBoolean(d):true)){setArg(d,p,u);l++}else if(/^(true|false)$/.test(p)){setArg(d,p==="true",u);l++}else{setArg(d,n.strings[d]?"":true,u)}}else if(/^-[^-]+/.test(u)){var m=u.slice(1,-1).split("");var b=false;for(var g=0;g<m.length;g++){var p=u.slice(g+2);if(p==="-"){setArg(m[g],p,u);continue}if(/[A-Za-z]/.test(m[g])&&/=/.test(p)){setArg(m[g],p.split("=")[1],u);b=true;break}if(/[A-Za-z]/.test(m[g])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(p)){setArg(m[g],p,u);b=true;break}if(m[g+1]&&m[g+1].match(/\W/)){setArg(m[g],u.slice(g+2),u);b=true;break}else{setArg(m[g],n.strings[m[g]]?"":true,u)}}var d=u.slice(-1)[0];if(!b&&d!=="-"){if(t[l+1]&&!/^(-|--)[^-]/.test(t[l+1])&&!n.bools[d]&&(o[d]?!aliasIsBoolean(d):true)){setArg(d,t[l+1],u);l++}else if(t[l+1]&&/^(true|false)$/.test(t[l+1])){setArg(d,t[l+1]==="true",u);l++}else{setArg(d,n.strings[d]?"":true,u)}}}else{if(!n.unknownFn||n.unknownFn(u)!==false){i._.push(n.strings["_"]||!isNumber(u)?u:Number(u))}if(r.stopEarly){i._.push.apply(i._,t.slice(l+1));break}}}Object.keys(s).forEach((function(t){if(!hasKey(i,t.split("."))){setKey(i,t.split("."),s[t]);(o[t]||[]).forEach((function(r){setKey(i,r.split("."),s[t])}))}}));if(r["--"]){i["--"]=new Array;a.forEach((function(t){i["--"].push(t)}))}else{a.forEach((function(t){i._.push(t)}))}return i};function hasKey(t,r){var n=t;r.slice(0,-1).forEach((function(t){n=n[t]||{}}));var o=r[r.length-1];return o in n}function isNumber(t){if(typeof t==="number")return true;if(/^0x[0-9a-f]+$/i.test(t))return true;return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function isConstructorOrProto(t,r){return r==="constructor"&&typeof t[r]==="function"||r==="__proto__"}},900:t=>{var r=1e3;var n=r*60;var o=n*60;var s=o*24;var i=s*7;var a=s*365.25;t.exports=function(t,r){r=r||{};var n=typeof t;if(n==="string"&&t.length>0){return parse(t)}else if(n==="number"&&isFinite(t)){return r.long?fmtLong(t):fmtShort(t)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function parse(t){t=String(t);if(t.length>100){return}var l=/^(-?(?:\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(!l){return}var u=parseFloat(l[1]);var c=(l[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*s;case"hours":case"hour":case"hrs":case"hr":case"h":return u*o;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(t){var i=Math.abs(t);if(i>=s){return Math.round(t/s)+"d"}if(i>=o){return Math.round(t/o)+"h"}if(i>=n){return Math.round(t/n)+"m"}if(i>=r){return Math.round(t/r)+"s"}return t+"ms"}function fmtLong(t){var i=Math.abs(t);if(i>=s){return plural(t,i,s,"day")}if(i>=o){return plural(t,i,o,"hour")}if(i>=n){return plural(t,i,n,"minute")}if(i>=r){return plural(t,i,r,"second")}return t+" ms"}function plural(t,r,n,o){var s=r>=n*1.5;return Math.round(t/n)+" "+o+(s?"s":"")}},7760:(t,r,n)=>{if(!globalThis.DOMException){try{const{MessageChannel:t}=n(1267),r=(new t).port1,o=new ArrayBuffer;r.postMessage(o,[o,o])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}}t.exports=globalThis.DOMException},3329:(t,r,n)=>{var o=n(7310).parse;var s={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var i=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function getProxyForUrl(t){var r=typeof t==="string"?o(t):t||{};var n=r.protocol;var i=r.host;var a=r.port;if(typeof i!=="string"||!i||typeof n!=="string"){return""}n=n.split(":",1)[0];i=i.replace(/:\d*$/,"");a=parseInt(a)||s[n]||0;if(!shouldProxy(i,a)){return""}var l=getEnv("npm_config_"+n+"_proxy")||getEnv(n+"_proxy")||getEnv("npm_config_proxy")||getEnv("all_proxy");if(l&&l.indexOf("://")===-1){l=n+"://"+l}return l}function shouldProxy(t,r){var n=(getEnv("npm_config_no_proxy")||getEnv("no_proxy")).toLowerCase();if(!n){return true}if(n==="*"){return false}return n.split(/[,\s]/).every((function(n){if(!n){return true}var o=n.match(/^(.+):(\d+)$/);var s=o?o[1]:n;var a=o?parseInt(o[2]):0;if(a&&a!==r){return true}if(!/^[.*]/.test(s)){return t!==s}if(s.charAt(0)==="*"){s=s.slice(1)}return!i.call(t,s)}))}function getEnv(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}r.j=getProxyForUrl},7353:(t,r,n)=>{var o=n(5588);var s=n(1017).join;var i=n(1705);var a="/etc";var l=process.platform==="win32";var u=l?process.env.USERPROFILE:process.env.HOME;t.exports=function(t,r,c,d){if("string"!==typeof t)throw new Error("rc(name): name *must* be string");if(!c)c=n(5871)(process.argv.slice(2));r=("string"===typeof r?o.json(r):r)||{};d=d||o.parse;var h=o.env(t+"_");var p=[r];var m=[];function addConfigFile(t){if(m.indexOf(t)>=0)return;var r=o.file(t);if(r){p.push(d(r));m.push(t)}}if(!l)[s(a,t,"config"),s(a,t+"rc")].forEach(addConfigFile);if(u)[s(u,".config",t,"config"),s(u,".config",t),s(u,"."+t,"config"),s(u,"."+t+"rc")].forEach(addConfigFile);addConfigFile(o.find("."+t+"rc"));if(h.config)addConfigFile(h.config);if(c.config)addConfigFile(c.config);return i.apply(null,p.concat([h,c,m.length?{configs:m,config:m[m.length-1]}:undefined]))}},5588:(t,r,n)=>{var o=n(7147);var s=n(8885);var i=n(1017);var a=n(7035);var l=r.parse=function(t){if(/^\s*{/.test(t))return JSON.parse(a(t));return s.parse(t)};var u=r.file=function(){var t=[].slice.call(arguments).filter((function(t){return t!=null}));for(var r in t)if("string"!==typeof t[r])return;var n=i.join.apply(null,t);var s;try{return o.readFileSync(n,"utf-8")}catch(t){return}};var c=r.json=function(){var t=u.apply(null,arguments);return t?l(t):null};var d=r.env=function(t,r){r=r||process.env;var n={};var o=t.length;for(var s in r){if(s.toLowerCase().indexOf(t.toLowerCase())===0){var i=s.substring(o).split("__");var a;while((a=i.indexOf(""))>-1){i.splice(a,1)}var l=n;i.forEach((function _buildSubObj(t,n){if(!t||typeof l!=="object")return;if(n===i.length-1)l[t]=r[s];if(l[t]===undefined)l[t]={};l=l[t]}))}}return n};var h=r.find=function(){var t=i.join.apply(null,[].slice.call(arguments));function find(t,r){var n=i.join(t,r);try{o.statSync(n);return n}catch(n){if(i.dirname(t)!==t)return find(i.dirname(t),r)}}return find(process.cwd(),t)}},7035:t=>{var r=1;var n=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(t,r,n){return t.slice(r,n).replace(/\S/g," ")}t.exports=function(t,o){o=o||{};var s;var i;var a=false;var l=false;var u=0;var c="";var d=o.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var h=0;h<t.length;h++){s=t[h];i=t[h+1];if(!l&&s==='"'){var p=t[h-1]==="\\"&&t[h-2]!=="\\";if(!p){a=!a}}if(a){continue}if(!l&&s+i==="//"){c+=t.slice(u,h);u=h;l=r;h++}else if(l===r&&s+i==="\r\n"){h++;l=false;c+=d(t,u,h);u=h;continue}else if(l===r&&s==="\n"){l=false;c+=d(t,u,h);u=h}else if(!l&&s+i==="/*"){c+=t.slice(u,h);u=h;l=n;h++;continue}else if(l===n&&s+i==="*/"){h++;l=false;c+=d(t,u,h+1);u=h+1;continue}}return c+(l?d(t.substr(u)):t.substr(u))}},8506:t=>{function decodeBase64(t){return Buffer.from(t,"base64").toString("utf8")}function encodeBase64(t){return Buffer.from(t,"utf8").toString("base64")}t.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},2968:(t,r,n)=>{var o=n(7310);var s=n(8506);var i=s.decodeBase64;var a=s.encodeBase64;var l=":_authToken";var u=":_auth";var c=":username";var d=":_password";t.exports=function(){var t;var r;if(arguments.length>=2){t=arguments[0];r=arguments[1]}else if(typeof arguments[0]==="string"){t=arguments[0]}else{r=arguments[0]}r=r||{};r.npmrc=r.npmrc||n(7353)("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG});t=t||r.npmrc.registry;return getRegistryAuthInfo(t,r)||getLegacyAuthInfo(r.npmrc)};function getRegistryAuthInfo(t,r){var n=o.parse(t,false,true);var s;while(s!=="/"&&n.pathname!==s){s=n.pathname||"/";var i="//"+n.host+s.replace(/\/$/,"");var a=getAuthInfoForUrl(i,r.npmrc);if(a){return a}if(!r.recursive){return/\/$/.test(t)?undefined:getRegistryAuthInfo(o.resolve(t,"."),r)}n.pathname=o.resolve(normalizePath(s),"..")||"/"}return undefined}function getLegacyAuthInfo(t){if(!t._auth){return undefined}var r=replaceEnvironmentVariable(t._auth);return{token:r,type:"Basic"}}function normalizePath(t){return t[t.length-1]==="/"?t:t+"/"}function getAuthInfoForUrl(t,r){var n=getBearerToken(r[t+l]||r[t+"/"+l]);if(n){return n}var o=r[t+c]||r[t+"/"+c];var s=r[t+d]||r[t+"/"+d];var i=getTokenForUsernameAndPassword(o,s);if(i){return i}var a=getLegacyAuthToken(r[t+u]||r[t+"/"+u]);if(a){return a}return undefined}function replaceEnvironmentVariable(t){return t.replace(/^\$\{?([^}]*)\}?$/,(function(t,r){return process.env[r]}))}function getBearerToken(t){if(!t){return undefined}var r=replaceEnvironmentVariable(t);return{token:r,type:"Bearer"}}function getTokenForUsernameAndPassword(t,r){if(!t||!r){return undefined}var n=i(replaceEnvironmentVariable(r));var o=a(t+":"+n);return{token:o,type:"Basic",password:n,username:t}}function getLegacyAuthToken(t){if(!t){return undefined}var r=replaceEnvironmentVariable(t);return{token:r,type:"Basic"}}},5418:(t,r,n)=>{t.exports=function(t,r){var o=r||n(7353)("npm",{registry:"https://registry.npmjs.org/"});var s=o[t+":registry"]||o.registry;return s.slice(-1)==="/"?s:s+"/"}},1532:(t,r,n)=>{const o=Symbol("SemVer ANY");class Comparator{static get ANY(){return o}constructor(t,r){r=s(r);if(t instanceof Comparator){if(t.loose===!!r.loose){return t}else{t=t.value}}u("comparator",t,r);this.options=r;this.loose=!!r.loose;this.parse(t);if(this.semver===o){this.value=""}else{this.value=this.operator+this.semver.version}u("comp",this)}parse(t){const r=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR];const n=t.match(r);if(!n){throw new TypeError(`Invalid comparator: ${t}`)}this.operator=n[1]!==undefined?n[1]:"";if(this.operator==="="){this.operator=""}if(!n[2]){this.semver=o}else{this.semver=new c(n[2],this.options.loose)}}toString(){return this.value}test(t){u("Comparator.test",t,this.options.loose);if(this.semver===o||t===o){return true}if(typeof t==="string"){try{t=new c(t,this.options)}catch(t){return false}}return l(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new d(t.value,r).test(this.value)}else if(t.operator===""){if(t.value===""){return true}return new d(this.value,r).test(t.semver)}const n=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">");const o=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<");const s=this.semver.version===t.semver.version;const i=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<=");const a=l(this.semver,"<",t.semver,r)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<");const u=l(this.semver,">",t.semver,r)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return n||o||s&&i||a||u}}t.exports=Comparator;const s=n(785);const{re:i,t:a}=n(9523);const l=n(4359);const u=n(427);const c=n(8088);const d=n(9828)},9828:(t,r,n)=>{class Range{constructor(t,r){r=i(r);if(t instanceof Range){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{return new Range(t.raw,r)}}if(t instanceof a){this.raw=t.value;this.set=[[t]];this.format();return this}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=t;this.set=t.split("||").map((t=>this.parseRange(t.trim()))).filter((t=>t.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${t}`)}if(this.set.length>1){const t=this.set[0];this.set=this.set.filter((t=>!isNullSet(t[0])));if(this.set.length===0){this.set=[t]}else if(this.set.length>1){for(const t of this.set){if(t.length===1&&isAny(t[0])){this.set=[t];break}}}}this.format()}format(){this.range=this.set.map((t=>t.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(t){t=t.trim();const r=Object.keys(this.options).join(",");const n=`parseRange:${r}:${t}`;const o=s.get(n);if(o){return o}const i=this.options.loose;const u=i?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];t=t.replace(u,hyphenReplace(this.options.includePrerelease));l("hyphen replace",t);t=t.replace(c[d.COMPARATORTRIM],h);l("comparator trim",t);t=t.replace(c[d.TILDETRIM],p);t=t.replace(c[d.CARETTRIM],m);t=t.split(/\s+/).join(" ");let b=t.split(" ").map((t=>parseComparator(t,this.options))).join(" ").split(/\s+/).map((t=>replaceGTE0(t,this.options)));if(i){b=b.filter((t=>{l("loose invalid filter",t,this.options);return!!t.match(c[d.COMPARATORLOOSE])}))}l("range list",b);const g=new Map;const y=b.map((t=>new a(t,this.options)));for(const t of y){if(isNullSet(t)){return[t]}g.set(t.value,t)}if(g.size>1&&g.has("")){g.delete("")}const S=[...g.values()];s.set(n,S);return S}intersects(t,r){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((n=>isSatisfiable(n,r)&&t.set.some((t=>isSatisfiable(t,r)&&n.every((n=>t.every((t=>n.intersects(t,r)))))))))}test(t){if(!t){return false}if(typeof t==="string"){try{t=new u(t,this.options)}catch(t){return false}}for(let r=0;r<this.set.length;r++){if(testSet(this.set[r],t,this.options)){return true}}return false}}t.exports=Range;const o=n(1196);const s=new o({max:1e3});const i=n(785);const a=n(1532);const l=n(427);const u=n(8088);const{re:c,t:d,comparatorTrimReplace:h,tildeTrimReplace:p,caretTrimReplace:m}=n(9523);const isNullSet=t=>t.value==="<0.0.0-0";const isAny=t=>t.value==="";const isSatisfiable=(t,r)=>{let n=true;const o=t.slice();let s=o.pop();while(n&&o.length){n=o.every((t=>s.intersects(t,r)));s=o.pop()}return n};const parseComparator=(t,r)=>{l("comp",t,r);t=replaceCarets(t,r);l("caret",t);t=replaceTildes(t,r);l("tildes",t);t=replaceXRanges(t,r);l("xrange",t);t=replaceStars(t,r);l("stars",t);return t};const isX=t=>!t||t.toLowerCase()==="x"||t==="*";const replaceTildes=(t,r)=>t.trim().split(/\s+/).map((t=>replaceTilde(t,r))).join(" ");const replaceTilde=(t,r)=>{const n=r.loose?c[d.TILDELOOSE]:c[d.TILDE];return t.replace(n,((r,n,o,s,i)=>{l("tilde",t,r,n,o,s,i);let a;if(isX(n)){a=""}else if(isX(o)){a=`>=${n}.0.0 <${+n+1}.0.0-0`}else if(isX(s)){a=`>=${n}.${o}.0 <${n}.${+o+1}.0-0`}else if(i){l("replaceTilde pr",i);a=`>=${n}.${o}.${s}-${i} <${n}.${+o+1}.0-0`}else{a=`>=${n}.${o}.${s} <${n}.${+o+1}.0-0`}l("tilde return",a);return a}))};const replaceCarets=(t,r)=>t.trim().split(/\s+/).map((t=>replaceCaret(t,r))).join(" ");const replaceCaret=(t,r)=>{l("caret",t,r);const n=r.loose?c[d.CARETLOOSE]:c[d.CARET];const o=r.includePrerelease?"-0":"";return t.replace(n,((r,n,s,i,a)=>{l("caret",t,r,n,s,i,a);let u;if(isX(n)){u=""}else if(isX(s)){u=`>=${n}.0.0${o} <${+n+1}.0.0-0`}else if(isX(i)){if(n==="0"){u=`>=${n}.${s}.0${o} <${n}.${+s+1}.0-0`}else{u=`>=${n}.${s}.0${o} <${+n+1}.0.0-0`}}else if(a){l("replaceCaret pr",a);if(n==="0"){if(s==="0"){u=`>=${n}.${s}.${i}-${a} <${n}.${s}.${+i+1}-0`}else{u=`>=${n}.${s}.${i}-${a} <${n}.${+s+1}.0-0`}}else{u=`>=${n}.${s}.${i}-${a} <${+n+1}.0.0-0`}}else{l("no pr");if(n==="0"){if(s==="0"){u=`>=${n}.${s}.${i}${o} <${n}.${s}.${+i+1}-0`}else{u=`>=${n}.${s}.${i}${o} <${n}.${+s+1}.0-0`}}else{u=`>=${n}.${s}.${i} <${+n+1}.0.0-0`}}l("caret return",u);return u}))};const replaceXRanges=(t,r)=>{l("replaceXRanges",t,r);return t.split(/\s+/).map((t=>replaceXRange(t,r))).join(" ")};const replaceXRange=(t,r)=>{t=t.trim();const n=r.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return t.replace(n,((n,o,s,i,a,u)=>{l("xRange",t,n,o,s,i,a,u);const c=isX(s);const d=c||isX(i);const h=d||isX(a);const p=h;if(o==="="&&p){o=""}u=r.includePrerelease?"-0":"";if(c){if(o===">"||o==="<"){n="<0.0.0-0"}else{n="*"}}else if(o&&p){if(d){i=0}a=0;if(o===">"){o=">=";if(d){s=+s+1;i=0;a=0}else{i=+i+1;a=0}}else if(o==="<="){o="<";if(d){s=+s+1}else{i=+i+1}}if(o==="<"){u="-0"}n=`${o+s}.${i}.${a}${u}`}else if(d){n=`>=${s}.0.0${u} <${+s+1}.0.0-0`}else if(h){n=`>=${s}.${i}.0${u} <${s}.${+i+1}.0-0`}l("xRange return",n);return n}))};const replaceStars=(t,r)=>{l("replaceStars",t,r);return t.trim().replace(c[d.STAR],"")};const replaceGTE0=(t,r)=>{l("replaceGTE0",t,r);return t.trim().replace(c[r.includePrerelease?d.GTE0PRE:d.GTE0],"")};const hyphenReplace=t=>(r,n,o,s,i,a,l,u,c,d,h,p,m)=>{if(isX(o)){n=""}else if(isX(s)){n=`>=${o}.0.0${t?"-0":""}`}else if(isX(i)){n=`>=${o}.${s}.0${t?"-0":""}`}else if(a){n=`>=${n}`}else{n=`>=${n}${t?"-0":""}`}if(isX(c)){u=""}else if(isX(d)){u=`<${+c+1}.0.0-0`}else if(isX(h)){u=`<${c}.${+d+1}.0-0`}else if(p){u=`<=${c}.${d}.${h}-${p}`}else if(t){u=`<${c}.${d}.${+h+1}-0`}else{u=`<=${u}`}return`${n} ${u}`.trim()};const testSet=(t,r,n)=>{for(let n=0;n<t.length;n++){if(!t[n].test(r)){return false}}if(r.prerelease.length&&!n.includePrerelease){for(let n=0;n<t.length;n++){l(t[n].semver);if(t[n].semver===a.ANY){continue}if(t[n].semver.prerelease.length>0){const o=t[n].semver;if(o.major===r.major&&o.minor===r.minor&&o.patch===r.patch){return true}}}return false}return true}},8088:(t,r,n)=>{const o=n(427);const{MAX_LENGTH:s,MAX_SAFE_INTEGER:i}=n(2293);const{re:a,t:l}=n(9523);const u=n(785);const{compareIdentifiers:c}=n(2463);class SemVer{constructor(t,r){r=u(r);if(t instanceof SemVer){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError(`Invalid Version: ${t}`)}if(t.length>s){throw new TypeError(`version is longer than ${s} characters`)}o("SemVer",t,r);this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?a[l.LOOSE]:a[l.FULL]);if(!n){throw new TypeError(`Invalid Version: ${t}`)}this.raw=t;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const r=+t;if(r>=0&&r<i){return r}}return t}))}this.build=n[5]?n[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(t){o("SemVer.compare",this.version,this.options,t);if(!(t instanceof SemVer)){if(typeof t==="string"&&t===this.version){return 0}t=new SemVer(t,this.options)}if(t.version===this.version){return 0}return this.compareMain(t)||this.comparePre(t)}compareMain(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}return c(this.major,t.major)||c(this.minor,t.minor)||c(this.patch,t.patch)}comparePre(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}if(this.prerelease.length&&!t.prerelease.length){return-1}else if(!this.prerelease.length&&t.prerelease.length){return 1}else if(!this.prerelease.length&&!t.prerelease.length){return 0}let r=0;do{const n=this.prerelease[r];const s=t.prerelease[r];o("prerelease compare",r,n,s);if(n===undefined&&s===undefined){return 0}else if(s===undefined){return 1}else if(n===undefined){return-1}else if(n===s){continue}else{return c(n,s)}}while(++r)}compareBuild(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}let r=0;do{const n=this.build[r];const s=t.build[r];o("prerelease compare",r,n,s);if(n===undefined&&s===undefined){return 0}else if(s===undefined){return 1}else if(n===undefined){return-1}else if(n===s){continue}else{return c(n,s)}}while(++r)}inc(t,r){switch(t){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r);this.inc("pre",r);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",r)}this.inc("pre",r);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":if(this.prerelease.length===0){this.prerelease=[0]}else{let t=this.prerelease.length;while(--t>=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1){this.prerelease.push(0)}}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1])){this.prerelease=[r,0]}}else{this.prerelease=[r,0]}}break;default:throw new Error(`invalid increment argument: ${t}`)}this.format();this.raw=this.version;return this}}t.exports=SemVer},8848:(t,r,n)=>{const o=n(5925);const clean=(t,r)=>{const n=o(t.trim().replace(/^[=v]+/,""),r);return n?n.version:null};t.exports=clean},4359:(t,r,n)=>{const o=n(1898);const s=n(6017);const i=n(4123);const a=n(5522);const l=n(194);const u=n(7520);const cmp=(t,r,n,c)=>{switch(r){case"===":if(typeof t==="object"){t=t.version}if(typeof n==="object"){n=n.version}return t===n;case"!==":if(typeof t==="object"){t=t.version}if(typeof n==="object"){n=n.version}return t!==n;case"":case"=":case"==":return o(t,n,c);case"!=":return s(t,n,c);case">":return i(t,n,c);case">=":return a(t,n,c);case"<":return l(t,n,c);case"<=":return u(t,n,c);default:throw new TypeError(`Invalid operator: ${r}`)}};t.exports=cmp},3466:(t,r,n)=>{const o=n(8088);const s=n(5925);const{re:i,t:a}=n(9523);const coerce=(t,r)=>{if(t instanceof o){return t}if(typeof t==="number"){t=String(t)}if(typeof t!=="string"){return null}r=r||{};let n=null;if(!r.rtl){n=t.match(i[a.COERCE])}else{let r;while((r=i[a.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length)){if(!n||r.index+r[0].length!==n.index+n[0].length){n=r}i[a.COERCERTL].lastIndex=r.index+r[1].length+r[2].length}i[a.COERCERTL].lastIndex=-1}if(n===null){return null}return s(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,r)};t.exports=coerce},2156:(t,r,n)=>{const o=n(8088);const compareBuild=(t,r,n)=>{const s=new o(t,n);const i=new o(r,n);return s.compare(i)||s.compareBuild(i)};t.exports=compareBuild},2804:(t,r,n)=>{const o=n(4309);const compareLoose=(t,r)=>o(t,r,true);t.exports=compareLoose},4309:(t,r,n)=>{const o=n(8088);const compare=(t,r,n)=>new o(t,n).compare(new o(r,n));t.exports=compare},4297:(t,r,n)=>{const o=n(5925);const s=n(1898);const diff=(t,r)=>{if(s(t,r)){return null}else{const n=o(t);const s=o(r);const i=n.prerelease.length||s.prerelease.length;const a=i?"pre":"";const l=i?"prerelease":"";for(const t in n){if(t==="major"||t==="minor"||t==="patch"){if(n[t]!==s[t]){return a+t}}}return l}};t.exports=diff},1898:(t,r,n)=>{const o=n(4309);const eq=(t,r,n)=>o(t,r,n)===0;t.exports=eq},4123:(t,r,n)=>{const o=n(4309);const gt=(t,r,n)=>o(t,r,n)>0;t.exports=gt},5522:(t,r,n)=>{const o=n(4309);const gte=(t,r,n)=>o(t,r,n)>=0;t.exports=gte},929:(t,r,n)=>{const o=n(8088);const inc=(t,r,n,s)=>{if(typeof n==="string"){s=n;n=undefined}try{return new o(t,n).inc(r,s).version}catch(t){return null}};t.exports=inc},194:(t,r,n)=>{const o=n(4309);const lt=(t,r,n)=>o(t,r,n)<0;t.exports=lt},7520:(t,r,n)=>{const o=n(4309);const lte=(t,r,n)=>o(t,r,n)<=0;t.exports=lte},6688:(t,r,n)=>{const o=n(8088);const major=(t,r)=>new o(t,r).major;t.exports=major},8447:(t,r,n)=>{const o=n(8088);const minor=(t,r)=>new o(t,r).minor;t.exports=minor},6017:(t,r,n)=>{const o=n(4309);const neq=(t,r,n)=>o(t,r,n)!==0;t.exports=neq},5925:(t,r,n)=>{const{MAX_LENGTH:o}=n(2293);const{re:s,t:i}=n(9523);const a=n(8088);const l=n(785);const parse=(t,r)=>{r=l(r);if(t instanceof a){return t}if(typeof t!=="string"){return null}if(t.length>o){return null}const n=r.loose?s[i.LOOSE]:s[i.FULL];if(!n.test(t)){return null}try{return new a(t,r)}catch(t){return null}};t.exports=parse},2866:(t,r,n)=>{const o=n(8088);const patch=(t,r)=>new o(t,r).patch;t.exports=patch},4016:(t,r,n)=>{const o=n(5925);const prerelease=(t,r)=>{const n=o(t,r);return n&&n.prerelease.length?n.prerelease:null};t.exports=prerelease},6417:(t,r,n)=>{const o=n(4309);const rcompare=(t,r,n)=>o(r,t,n);t.exports=rcompare},8701:(t,r,n)=>{const o=n(2156);const rsort=(t,r)=>t.sort(((t,n)=>o(n,t,r)));t.exports=rsort},6055:(t,r,n)=>{const o=n(9828);const satisfies=(t,r,n)=>{try{r=new o(r,n)}catch(t){return false}return r.test(t)};t.exports=satisfies},1426:(t,r,n)=>{const o=n(2156);const sort=(t,r)=>t.sort(((t,n)=>o(t,n,r)));t.exports=sort},9601:(t,r,n)=>{const o=n(5925);const valid=(t,r)=>{const n=o(t,r);return n?n.version:null};t.exports=valid},1383:(t,r,n)=>{const o=n(9523);t.exports={re:o.re,src:o.src,tokens:o.t,SEMVER_SPEC_VERSION:n(2293).SEMVER_SPEC_VERSION,SemVer:n(8088),compareIdentifiers:n(2463).compareIdentifiers,rcompareIdentifiers:n(2463).rcompareIdentifiers,parse:n(5925),valid:n(9601),clean:n(8848),inc:n(929),diff:n(4297),major:n(6688),minor:n(8447),patch:n(2866),prerelease:n(4016),compare:n(4309),rcompare:n(6417),compareLoose:n(2804),compareBuild:n(2156),sort:n(1426),rsort:n(8701),gt:n(4123),lt:n(194),eq:n(1898),neq:n(6017),gte:n(5522),lte:n(7520),cmp:n(4359),coerce:n(3466),Comparator:n(1532),Range:n(9828),satisfies:n(6055),toComparators:n(2706),maxSatisfying:n(579),minSatisfying:n(832),minVersion:n(4179),validRange:n(2098),outside:n(420),gtr:n(9380),ltr:n(3323),intersects:n(7008),simplifyRange:n(5297),subset:n(7863)}},2293:t=>{const r="2.0.0";const n=256;const o=Number.MAX_SAFE_INTEGER||9007199254740991;const s=16;t.exports={SEMVER_SPEC_VERSION:r,MAX_LENGTH:n,MAX_SAFE_INTEGER:o,MAX_SAFE_COMPONENT_LENGTH:s}},427:t=>{const r=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=r},2463:t=>{const r=/^[0-9]+$/;const compareIdentifiers=(t,n)=>{const o=r.test(t);const s=r.test(n);if(o&&s){t=+t;n=+n}return t===n?0:o&&!s?-1:s&&!o?1:t<n?-1:1};const rcompareIdentifiers=(t,r)=>compareIdentifiers(r,t);t.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},785:t=>{const r=["includePrerelease","loose","rtl"];const parseOptions=t=>!t?{}:typeof t!=="object"?{loose:true}:r.filter((r=>t[r])).reduce(((t,r)=>{t[r]=true;return t}),{});t.exports=parseOptions},9523:(t,r,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:o}=n(2293);const s=n(427);r=t.exports={};const i=r.re=[];const a=r.src=[];const l=r.t={};let u=0;const createToken=(t,r,n)=>{const o=u++;s(t,o,r);l[t]=o;a[o]=r;i[o]=new RegExp(r,n?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","[0-9]+");createToken("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");createToken("MAINVERSION",`(${a[l.NUMERICIDENTIFIER]})\\.`+`(${a[l.NUMERICIDENTIFIER]})\\.`+`(${a[l.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${a[l.NUMERICIDENTIFIERLOOSE]})\\.`+`(${a[l.NUMERICIDENTIFIERLOOSE]})\\.`+`(${a[l.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${a[l.NUMERICIDENTIFIER]}|${a[l.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${a[l.NUMERICIDENTIFIERLOOSE]}|${a[l.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${a[l.PRERELEASEIDENTIFIER]}(?:\\.${a[l.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${a[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[l.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER","[0-9A-Za-z-]+");createToken("BUILD",`(?:\\+(${a[l.BUILDIDENTIFIER]}(?:\\.${a[l.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${a[l.MAINVERSION]}${a[l.PRERELEASE]}?${a[l.BUILD]}?`);createToken("FULL",`^${a[l.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${a[l.MAINVERSIONLOOSE]}${a[l.PRERELEASELOOSE]}?${a[l.BUILD]}?`);createToken("LOOSE",`^${a[l.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${a[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${a[l.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${a[l.XRANGEIDENTIFIER]})`+`(?:\\.(${a[l.XRANGEIDENTIFIER]})`+`(?:\\.(${a[l.XRANGEIDENTIFIER]})`+`(?:${a[l.PRERELEASE]})?${a[l.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${a[l.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})`+`(?:${a[l.PRERELEASELOOSE]})?${a[l.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${a[l.GTLT]}\\s*${a[l.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${a[l.GTLT]}\\s*${a[l.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${o}})`+`(?:\\.(\\d{1,${o}}))?`+`(?:\\.(\\d{1,${o}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",a[l.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${a[l.LONETILDE]}\\s+`,true);r.tildeTrimReplace="$1~";createToken("TILDE",`^${a[l.LONETILDE]}${a[l.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${a[l.LONETILDE]}${a[l.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${a[l.LONECARET]}\\s+`,true);r.caretTrimReplace="$1^";createToken("CARET",`^${a[l.LONECARET]}${a[l.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${a[l.LONECARET]}${a[l.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${a[l.GTLT]}\\s*(${a[l.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]}|${a[l.XRANGEPLAIN]})`,true);r.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${a[l.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${a[l.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${a[l.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${a[l.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},1196:t=>{const r=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const n=typeof AbortController!=="undefined";const o=n?AbortController:Object.assign(class AbortController{constructor(){this.signal=new o.AbortSignal}abort(){this.signal.aborted=true}},{AbortSignal:class AbortSignal{constructor(){this.aborted=false}}});const s=new Set;const deprecatedOption=(t,r)=>{const n=`LRU_CACHE_OPTION_${t}`;if(shouldWarn(n)){warn(n,`${t} option`,`options.${r}`,LRUCache)}};const deprecatedMethod=(t,r)=>{const n=`LRU_CACHE_METHOD_${t}`;if(shouldWarn(n)){const{prototype:o}=LRUCache;const{get:s}=Object.getOwnPropertyDescriptor(o,t);warn(n,`${t} method`,`cache.${r}()`,s)}};const deprecatedProperty=(t,r)=>{const n=`LRU_CACHE_PROPERTY_${t}`;if(shouldWarn(n)){const{prototype:o}=LRUCache;const{get:s}=Object.getOwnPropertyDescriptor(o,t);warn(n,`${t} property`,`cache.${r}`,s)}};const shouldWarn=t=>typeof process==="object"&&process&&!s.has(t);const warn=(t,r,n,o)=>{s.add(t);const i=`The ${r} is deprecated. Please use ${n} instead.`;process.emitWarning(i,"DeprecationWarning",t,o)};const isPosInt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t);const getUintArray=t=>!isPosInt(t)?null:t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(t){super(t);this.fill(0)}}class Stack{constructor(t){const r=t?getUintArray(t):Array;this.heap=new r(t);this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class LRUCache{constructor(t={}){const{max:r=0,ttl:n,ttlResolution:o=1,ttlAutopurge:i,updateAgeOnGet:a,allowStale:l,dispose:u,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:h,maxSize:p=0,sizeCalculation:m,fetchMethod:b}=t;const{length:g,maxAge:y,stale:S}=t instanceof LRUCache?{}:t;if(r!==0&&!isPosInt(r)){throw new TypeError("max option must be a nonnegative integer")}const R=r?getUintArray(r):Array;if(!R){throw new Error("invalid max value: "+r)}this.max=r;this.maxSize=p;this.sizeCalculation=m||g;if(this.sizeCalculation){if(!this.maxSize){throw new TypeError("cannot set sizeCalculation without setting maxSize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}this.fetchMethod=b||null;if(this.fetchMethod&&typeof this.fetchMethod!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.keyMap=new Map;this.keyList=new Array(r).fill(null);this.valList=new Array(r).fill(null);this.next=new R(r);this.prev=new R(r);this.head=0;this.tail=0;this.free=new Stack(r);this.initialFill=1;this.size=0;if(typeof u==="function"){this.dispose=u}if(typeof c==="function"){this.disposeAfter=c;this.disposed=[]}else{this.disposeAfter=null;this.disposed=null}this.noDisposeOnSet=!!d;this.noUpdateTTL=!!h;if(this.maxSize!==0){if(!isPosInt(this.maxSize)){throw new TypeError("maxSize must be a positive integer if specified")}this.initializeSizeTracking()}this.allowStale=!!l||!!S;this.updateAgeOnGet=!!a;this.ttlResolution=isPosInt(o)||o===0?o:1;this.ttlAutopurge=!!i;this.ttl=n||y||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const t="LRU_CACHE_UNBOUNDED";if(shouldWarn(t)){s.add(t);const r="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";process.emitWarning(r,"UnboundedCacheWarning",t,LRUCache)}}if(S){deprecatedOption("stale","allowStale")}if(y){deprecatedOption("maxAge","ttl")}if(g){deprecatedOption("length","sizeCalculation")}}getRemainingTTL(t){return this.has(t)?Infinity:0}initializeTTLTracking(){this.ttls=new ZeroArray(this.max);this.starts=new ZeroArray(this.max);this.setItemTTL=(t,n)=>{this.starts[t]=n!==0?r.now():0;this.ttls[t]=n;if(n!==0&&this.ttlAutopurge){const r=setTimeout((()=>{if(this.isStale(t)){this.delete(this.keyList[t])}}),n+1);if(r.unref){r.unref()}}};this.updateItemAge=t=>{this.starts[t]=this.ttls[t]!==0?r.now():0};let t=0;const getNow=()=>{const n=r.now();if(this.ttlResolution>0){t=n;const r=setTimeout((()=>t=0),this.ttlResolution);if(r.unref){r.unref()}}return n};this.getRemainingTTL=r=>{const n=this.keyMap.get(r);if(n===undefined){return 0}return this.ttls[n]===0||this.starts[n]===0?Infinity:this.starts[n]+this.ttls[n]-(t||getNow())};this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(t||getNow())-this.starts[r]>this.ttls[r]}updateItemAge(t){}setItemTTL(t,r){}isStale(t){return false}initializeSizeTracking(){this.calculatedSize=0;this.sizes=new ZeroArray(this.max);this.removeItemSize=t=>this.calculatedSize-=this.sizes[t];this.requireSize=(t,r,n,o)=>{if(!isPosInt(n)){if(o){if(typeof o!=="function"){throw new TypeError("sizeCalculation must be a function")}n=o(r,t);if(!isPosInt(n)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer)")}}return n};this.addItemSize=(t,r,n,o)=>{this.sizes[t]=o;const s=this.maxSize-this.sizes[t];while(this.calculatedSize>s){this.evict()}this.calculatedSize+=this.sizes[t]};this.delete=t=>{if(this.size!==0){const r=this.keyMap.get(t);if(r!==undefined){this.calculatedSize-=this.sizes[r]}}return LRUCache.prototype.delete.call(this,t)}}removeItemSize(t){}addItemSize(t,r,n,o){}requireSize(t,r,n,o){if(n||o){throw new TypeError("cannot set size without setting maxSize on cache")}}*indexes({allowStale:t=this.allowStale}={}){if(this.size){for(let r=this.tail;true;){if(!this.isValidIndex(r)){break}if(t||!this.isStale(r)){yield r}if(r===this.head){break}else{r=this.prev[r]}}}}*rindexes({allowStale:t=this.allowStale}={}){if(this.size){for(let r=this.head;true;){if(!this.isValidIndex(r)){break}if(t||!this.isStale(r)){yield r}if(r===this.tail){break}else{r=this.next[r]}}}}isValidIndex(t){return this.keyMap.get(this.keyList[t])===t}*entries(){for(const t of this.indexes()){yield[this.keyList[t],this.valList[t]]}}*rentries(){for(const t of this.rindexes()){yield[this.keyList[t],this.valList[t]]}}*keys(){for(const t of this.indexes()){yield this.keyList[t]}}*rkeys(){for(const t of this.rindexes()){yield this.keyList[t]}}*values(){for(const t of this.indexes()){yield this.valList[t]}}*rvalues(){for(const t of this.rindexes()){yield this.valList[t]}}[Symbol.iterator](){return this.entries()}find(t,r={}){for(const n of this.indexes()){if(t(this.valList[n],this.keyList[n],this)){return this.get(this.keyList[n],r)}}}forEach(t,r=this){for(const n of this.indexes()){t.call(r,this.valList[n],this.keyList[n],this)}}rforEach(t,r=this){for(const n of this.rindexes()){t.call(r,this.valList[n],this.keyList[n],this)}}get prune(){deprecatedMethod("prune","purgeStale");return this.purgeStale}purgeStale(){let t=false;for(const r of this.rindexes({allowStale:true})){if(this.isStale(r)){this.delete(this.keyList[r]);t=true}}return t}dump(){const t=[];for(const r of this.indexes()){const n=this.keyList[r];const o=this.valList[r];const s={value:o};if(this.ttls){s.ttl=this.ttls[r]}if(this.sizes){s.size=this.sizes[r]}t.unshift([n,s])}return t}load(t){this.clear();for(const[r,n]of t){this.set(r,n.value,n)}}dispose(t,r,n){}set(t,r,{ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:i=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){s=this.requireSize(t,r,s,i);let l=this.size===0?undefined:this.keyMap.get(t);if(l===undefined){l=this.newIndex();this.keyList[l]=t;this.valList[l]=r;this.keyMap.set(t,l);this.next[this.tail]=l;this.prev[l]=this.tail;this.tail=l;this.size++;this.addItemSize(l,r,t,s);a=false}else{const n=this.valList[l];if(r!==n){if(this.isBackgroundFetch(n)){n.__abortController.abort()}else{if(!o){this.dispose(n,t,"set");if(this.disposeAfter){this.disposed.push([n,t,"set"])}}}this.removeItemSize(l);this.valList[l]=r;this.addItemSize(l,r,t,s)}this.moveToTail(l)}if(n!==0&&this.ttl===0&&!this.ttls){this.initializeTTLTracking()}if(!a){this.setItemTTL(l,n)}if(this.disposeAfter){while(this.disposed.length){this.disposeAfter(...this.disposed.shift())}}return this}newIndex(){if(this.size===0){return this.tail}if(this.size===this.max){return this.evict()}if(this.free.length!==0){return this.free.pop()}return this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];this.evict();return t}}evict(){const t=this.head;const r=this.keyList[t];const n=this.valList[t];if(this.isBackgroundFetch(n)){n.__abortController.abort()}else{this.dispose(n,r,"evict");if(this.disposeAfter){this.disposed.push([n,r,"evict"])}}this.removeItemSize(t);this.head=this.next[t];this.keyMap.delete(r);this.size--;return t}has(t){return this.keyMap.has(t)&&!this.isStale(this.keyMap.get(t))}peek(t,{allowStale:r=this.allowStale}={}){const n=this.keyMap.get(t);if(n!==undefined&&(r||!this.isStale(n))){return this.valList[n]}}backgroundFetch(t,r,n){const s=r===undefined?undefined:this.valList[r];if(this.isBackgroundFetch(s)){return s}const i=new o;const a={signal:i.signal,options:n};const l=Promise.resolve(this.fetchMethod(t,s,a)).then((r=>{if(!i.signal.aborted){this.set(t,r,a.options)}return r}));l.__abortController=i;l.__staleWhileFetching=s;if(r===undefined){this.set(t,l,a.options);r=this.keyMap.get(t)}else{this.valList[r]=l}return l}isBackgroundFetch(t){return t&&typeof t==="object"&&typeof t.then==="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")}async fetch(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:i=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL}={}){if(!this.fetchMethod){return this.get(t,{allowStale:r,updateAgeOnGet:n})}const u={allowStale:r,updateAgeOnGet:n,ttl:o,noDisposeOnSet:s,size:i,sizeCalculation:a,noUpdateTTL:l};let c=this.keyMap.get(t);if(c===undefined){return this.backgroundFetch(t,c,u)}else{const o=this.valList[c];if(this.isBackgroundFetch(o)){return r&&o.__staleWhileFetching!==undefined?o.__staleWhileFetching:o}if(!this.isStale(c)){this.moveToTail(c);if(n){this.updateItemAge(c)}return o}const s=this.backgroundFetch(t,c,u);return r&&s.__staleWhileFetching!==undefined?s.__staleWhileFetching:s}}get(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet}={}){const o=this.keyMap.get(t);if(o!==undefined){const s=this.valList[o];const i=this.isBackgroundFetch(s);if(this.isStale(o)){if(!i){this.delete(t);return r?s:undefined}else{return r?s.__staleWhileFetching:undefined}}else{if(i){return undefined}this.moveToTail(o);if(n){this.updateItemAge(o)}return s}}}connect(t,r){this.prev[r]=t;this.next[t]=r}moveToTail(t){if(t!==this.tail){if(t===this.head){this.head=this.next[t]}else{this.connect(this.prev[t],this.next[t])}this.connect(this.tail,t);this.tail=t}}get del(){deprecatedMethod("del","delete");return this.delete}delete(t){let r=false;if(this.size!==0){const n=this.keyMap.get(t);if(n!==undefined){r=true;if(this.size===1){this.clear()}else{this.removeItemSize(n);const r=this.valList[n];if(this.isBackgroundFetch(r)){r.__abortController.abort()}else{this.dispose(r,t,"delete");if(this.disposeAfter){this.disposed.push([r,t,"delete"])}}this.keyMap.delete(t);this.keyList[n]=null;this.valList[n]=null;if(n===this.tail){this.tail=this.prev[n]}else if(n===this.head){this.head=this.next[n]}else{this.next[this.prev[n]]=this.next[n];this.prev[this.next[n]]=this.prev[n]}this.size--;this.free.push(n)}}}if(this.disposed){while(this.disposed.length){this.disposeAfter(...this.disposed.shift())}}return r}clear(){for(const t of this.rindexes({allowStale:true})){const r=this.valList[t];if(this.isBackgroundFetch(r)){r.__abortController.abort()}else{const n=this.keyList[t];this.dispose(r,n,"delete");if(this.disposeAfter){this.disposed.push([r,n,"delete"])}}}this.keyMap.clear();this.valList.fill(null);this.keyList.fill(null);if(this.ttls){this.ttls.fill(0);this.starts.fill(0)}if(this.sizes){this.sizes.fill(0)}this.head=0;this.tail=0;this.initialFill=1;this.free.length=0;this.calculatedSize=0;this.size=0;if(this.disposed){while(this.disposed.length){this.disposeAfter(...this.disposed.shift())}}}get reset(){deprecatedMethod("reset","clear");return this.clear}get length(){deprecatedProperty("length","size");return this.size}}t.exports=LRUCache},9380:(t,r,n)=>{const o=n(420);const gtr=(t,r,n)=>o(t,r,">",n);t.exports=gtr},7008:(t,r,n)=>{const o=n(9828);const intersects=(t,r,n)=>{t=new o(t,n);r=new o(r,n);return t.intersects(r)};t.exports=intersects},3323:(t,r,n)=>{const o=n(420);const ltr=(t,r,n)=>o(t,r,"<",n);t.exports=ltr},579:(t,r,n)=>{const o=n(8088);const s=n(9828);const maxSatisfying=(t,r,n)=>{let i=null;let a=null;let l=null;try{l=new s(r,n)}catch(t){return null}t.forEach((t=>{if(l.test(t)){if(!i||a.compare(t)===-1){i=t;a=new o(i,n)}}}));return i};t.exports=maxSatisfying},832:(t,r,n)=>{const o=n(8088);const s=n(9828);const minSatisfying=(t,r,n)=>{let i=null;let a=null;let l=null;try{l=new s(r,n)}catch(t){return null}t.forEach((t=>{if(l.test(t)){if(!i||a.compare(t)===1){i=t;a=new o(i,n)}}}));return i};t.exports=minSatisfying},4179:(t,r,n)=>{const o=n(8088);const s=n(9828);const i=n(4123);const minVersion=(t,r)=>{t=new s(t,r);let n=new o("0.0.0");if(t.test(n)){return n}n=new o("0.0.0-0");if(t.test(n)){return n}n=null;for(let r=0;r<t.set.length;++r){const s=t.set[r];let a=null;s.forEach((t=>{const r=new o(t.semver.version);switch(t.operator){case">":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!a||i(r,a)){a=r}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}));if(a&&(!n||i(n,a))){n=a}}if(n&&t.test(n)){return n}return null};t.exports=minVersion},420:(t,r,n)=>{const o=n(8088);const s=n(1532);const{ANY:i}=s;const a=n(9828);const l=n(6055);const u=n(4123);const c=n(194);const d=n(7520);const h=n(5522);const outside=(t,r,n,p)=>{t=new o(t,p);r=new a(r,p);let m,b,g,y,S;switch(n){case">":m=u;b=d;g=c;y=">";S=">=";break;case"<":m=c;b=h;g=u;y="<";S="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(l(t,r,p)){return false}for(let n=0;n<r.set.length;++n){const o=r.set[n];let a=null;let l=null;o.forEach((t=>{if(t.semver===i){t=new s(">=0.0.0")}a=a||t;l=l||t;if(m(t.semver,a.semver,p)){a=t}else if(g(t.semver,l.semver,p)){l=t}}));if(a.operator===y||a.operator===S){return false}if((!l.operator||l.operator===y)&&b(t,l.semver)){return false}else if(l.operator===S&&g(t,l.semver)){return false}}return true};t.exports=outside},5297:(t,r,n)=>{const o=n(6055);const s=n(4309);t.exports=(t,r,n)=>{const i=[];let a=null;let l=null;const u=t.sort(((t,r)=>s(t,r,n)));for(const t of u){const s=o(t,r,n);if(s){l=t;if(!a){a=t}}else{if(l){i.push([a,l])}l=null;a=null}}if(a){i.push([a,null])}const c=[];for(const[t,r]of i){if(t===r){c.push(t)}else if(!r&&t===u[0]){c.push("*")}else if(!r){c.push(`>=${t}`)}else if(t===u[0]){c.push(`<=${r}`)}else{c.push(`${t} - ${r}`)}}const d=c.join(" || ");const h=typeof r.raw==="string"?r.raw:String(r);return d.length<h.length?d:r}},7863:(t,r,n)=>{const o=n(9828);const s=n(1532);const{ANY:i}=s;const a=n(6055);const l=n(4309);const subset=(t,r,n={})=>{if(t===r){return true}t=new o(t,n);r=new o(r,n);let s=false;e:for(const o of t.set){for(const t of r.set){const r=simpleSubset(o,t,n);s=s||r!==null;if(r){continue e}}if(s){return false}}return true};const simpleSubset=(t,r,n)=>{if(t===r){return true}if(t.length===1&&t[0].semver===i){if(r.length===1&&r[0].semver===i){return true}else if(n.includePrerelease){t=[new s(">=0.0.0-0")]}else{t=[new s(">=0.0.0")]}}if(r.length===1&&r[0].semver===i){if(n.includePrerelease){return true}else{r=[new s(">=0.0.0")]}}const o=new Set;let u,c;for(const r of t){if(r.operator===">"||r.operator===">="){u=higherGT(u,r,n)}else if(r.operator==="<"||r.operator==="<="){c=lowerLT(c,r,n)}else{o.add(r.semver)}}if(o.size>1){return null}let d;if(u&&c){d=l(u.semver,c.semver,n);if(d>0){return null}else if(d===0&&(u.operator!==">="||c.operator!=="<=")){return null}}for(const t of o){if(u&&!a(t,String(u),n)){return null}if(c&&!a(t,String(c),n)){return null}for(const o of r){if(!a(t,String(o),n)){return false}}return true}let h,p;let m,b;let g=c&&!n.includePrerelease&&c.semver.prerelease.length?c.semver:false;let y=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:false;if(g&&g.prerelease.length===1&&c.operator==="<"&&g.prerelease[0]===0){g=false}for(const t of r){b=b||t.operator===">"||t.operator===">=";m=m||t.operator==="<"||t.operator==="<=";if(u){if(y){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===y.major&&t.semver.minor===y.minor&&t.semver.patch===y.patch){y=false}}if(t.operator===">"||t.operator===">="){h=higherGT(u,t,n);if(h===t&&h!==u){return false}}else if(u.operator===">="&&!a(u.semver,String(t),n)){return false}}if(c){if(g){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===g.major&&t.semver.minor===g.minor&&t.semver.patch===g.patch){g=false}}if(t.operator==="<"||t.operator==="<="){p=lowerLT(c,t,n);if(p===t&&p!==c){return false}}else if(c.operator==="<="&&!a(c.semver,String(t),n)){return false}}if(!t.operator&&(c||u)&&d!==0){return false}}if(u&&m&&!c&&d!==0){return false}if(c&&b&&!u&&d!==0){return false}if(y||g){return false}return true};const higherGT=(t,r,n)=>{if(!t){return r}const o=l(t.semver,r.semver,n);return o>0?t:o<0?r:r.operator===">"&&t.operator===">="?r:t};const lowerLT=(t,r,n)=>{if(!t){return r}const o=l(t.semver,r.semver,n);return o<0?t:o>0?r:r.operator==="<"&&t.operator==="<="?r:t};t.exports=subset},2706:(t,r,n)=>{const o=n(9828);const toComparators=(t,r)=>new o(t,r).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")));t.exports=toComparators},2098:(t,r,n)=>{const o=n(9828);const validRange=(t,r)=>{try{return new o(t,r).range||"*"}catch(t){return null}};t.exports=validRange},9318:(t,r,n)=>{const o=n(2037);const s=n(6224);const i=n(1621);const{env:a}=process;let l;if(i("no-color")||i("no-colors")||i("color=false")||i("color=never")){l=0}else if(i("color")||i("colors")||i("color=true")||i("color=always")){l=1}if("FORCE_COLOR"in a){if(a.FORCE_COLOR==="true"){l=1}else if(a.FORCE_COLOR==="false"){l=0}else{l=a.FORCE_COLOR.length===0?1:Math.min(parseInt(a.FORCE_COLOR,10),3)}}function translateLevel(t){if(t===0){return false}return{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function supportsColor(t,r){if(l===0){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(t&&!r&&l===undefined){return 0}const n=l||0;if(a.TERM==="dumb"){return n}if(process.platform==="win32"){const t=o.release().split(".");if(Number(t[0])>=10&&Number(t[2])>=10586){return Number(t[2])>=14931?3:2}return 1}if("CI"in a){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((t=>t in a))||a.CI_NAME==="codeship"){return 1}return n}if("TEAMCITY_VERSION"in a){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0}if(a.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in a){const t=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(a.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)){return 1}if("COLORTERM"in a){return 1}return n}function getSupportLevel(t){const r=supportsColor(t,t&&t.isTTY);return translateLevel(r)}t.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,s.isatty(1))),stderr:translateLevel(supportsColor(true,s.isatty(2)))}},418:t=>{t.exports=function(t,r){if(!r)r={};var n=r.hsep===undefined?" ":r.hsep;var o=r.align||[];var s=r.stringLength||function(t){return String(t).length};var i=reduce(t,(function(t,r){forEach(r,(function(r,n){var o=dotindex(r);if(!t[n]||o>t[n])t[n]=o}));return t}),[]);var a=map(t,(function(t){return map(t,(function(t,r){var n=String(t);if(o[r]==="."){var a=dotindex(n);var l=i[r]+(/\./.test(n)?1:2)-(s(n)-a);return n+Array(l).join(" ")}else return n}))}));var l=reduce(a,(function(t,r){forEach(r,(function(r,n){var o=s(r);if(!t[n]||o>t[n])t[n]=o}));return t}),[]);return map(a,(function(t){return map(t,(function(t,r){var n=l[r]-s(t)||0;var i=Array(Math.max(n+1,1)).join(" ");if(o[r]==="r"||o[r]==="."){return i+t}if(o[r]==="c"){return Array(Math.ceil(n/2+1)).join(" ")+t+Array(Math.floor(n/2+1)).join(" ")}return t+i})).join(n).replace(/\s+$/,"")})).join("\n")};function dotindex(t){var r=/\.[^.]*$/.exec(t);return r?r.index+1:t.length}function reduce(t,r,n){if(t.reduce)return t.reduce(r,n);var o=0;var s=arguments.length>=3?n:t[o++];for(;o<t.length;o++){r(s,t[o],o)}return s}function forEach(t,r){if(t.forEach)return t.forEach(r);for(var n=0;n<t.length;n++){r.call(t,t[n],n)}}function map(t,r){if(t.map)return t.map(r);var n=[];for(var o=0;o<t.length;o++){n.push(r.call(t,t[o],o))}return n}},1452:function(t,r){(function(t,n){true?n(r):0})(this,(function(t){"use strict";const r=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol:t=>`Symbol(${t})`;function noop(){return undefined}function getGlobals(){if(typeof self!=="undefined"){return self}else if(typeof window!=="undefined"){return window}else if(typeof global!=="undefined"){return global}return undefined}const n=getGlobals();function typeIsObject(t){return typeof t==="object"&&t!==null||typeof t==="function"}const o=noop;const s=Promise;const i=Promise.prototype.then;const a=Promise.resolve.bind(s);const l=Promise.reject.bind(s);function newPromise(t){return new s(t)}function promiseResolvedWith(t){return a(t)}function promiseRejectedWith(t){return l(t)}function PerformPromiseThen(t,r,n){return i.call(t,r,n)}function uponPromise(t,r,n){PerformPromiseThen(PerformPromiseThen(t,r,n),undefined,o)}function uponFulfillment(t,r){uponPromise(t,r)}function uponRejection(t,r){uponPromise(t,undefined,r)}function transformPromiseWith(t,r,n){return PerformPromiseThen(t,r,n)}function setPromiseIsHandledToTrue(t){PerformPromiseThen(t,undefined,o)}const u=(()=>{const t=n&&n.queueMicrotask;if(typeof t==="function"){return t}const r=promiseResolvedWith(undefined);return t=>PerformPromiseThen(r,t)})();function reflectCall(t,r,n){if(typeof t!=="function"){throw new TypeError("Argument is not a function")}return Function.prototype.apply.call(t,r,n)}function promiseCall(t,r,n){try{return promiseResolvedWith(reflectCall(t,r,n))}catch(t){return promiseRejectedWith(t)}}const c=16384;class SimpleQueue{constructor(){this._cursor=0;this._size=0;this._front={_elements:[],_next:undefined};this._back=this._front;this._cursor=0;this._size=0}get length(){return this._size}push(t){const r=this._back;let n=r;if(r._elements.length===c-1){n={_elements:[],_next:undefined}}r._elements.push(t);if(n!==r){this._back=n;r._next=n}++this._size}shift(){const t=this._front;let r=t;const n=this._cursor;let o=n+1;const s=t._elements;const i=s[n];if(o===c){r=t._next;o=0}--this._size;this._cursor=o;if(t!==r){this._front=r}s[n]=undefined;return i}forEach(t){let r=this._cursor;let n=this._front;let o=n._elements;while(r!==o.length||n._next!==undefined){if(r===o.length){n=n._next;o=n._elements;r=0;if(o.length===0){break}}t(o[r]);++r}}peek(){const t=this._front;const r=this._cursor;return t._elements[r]}}function ReadableStreamReaderGenericInitialize(t,r){t._ownerReadableStream=r;r._reader=t;if(r._state==="readable"){defaultReaderClosedPromiseInitialize(t)}else if(r._state==="closed"){defaultReaderClosedPromiseInitializeAsResolved(t)}else{defaultReaderClosedPromiseInitializeAsRejected(t,r._storedError)}}function ReadableStreamReaderGenericCancel(t,r){const n=t._ownerReadableStream;return ReadableStreamCancel(n,r)}function ReadableStreamReaderGenericRelease(t){if(t._ownerReadableStream._state==="readable"){defaultReaderClosedPromiseReject(t,new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`))}else{defaultReaderClosedPromiseResetToRejected(t,new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`))}t._ownerReadableStream._reader=undefined;t._ownerReadableStream=undefined}function readerLockException(t){return new TypeError("Cannot "+t+" a stream using a released reader")}function defaultReaderClosedPromiseInitialize(t){t._closedPromise=newPromise(((r,n)=>{t._closedPromise_resolve=r;t._closedPromise_reject=n}))}function defaultReaderClosedPromiseInitializeAsRejected(t,r){defaultReaderClosedPromiseInitialize(t);defaultReaderClosedPromiseReject(t,r)}function defaultReaderClosedPromiseInitializeAsResolved(t){defaultReaderClosedPromiseInitialize(t);defaultReaderClosedPromiseResolve(t)}function defaultReaderClosedPromiseReject(t,r){if(t._closedPromise_reject===undefined){return}setPromiseIsHandledToTrue(t._closedPromise);t._closedPromise_reject(r);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined}function defaultReaderClosedPromiseResetToRejected(t,r){defaultReaderClosedPromiseInitializeAsRejected(t,r)}function defaultReaderClosedPromiseResolve(t){if(t._closedPromise_resolve===undefined){return}t._closedPromise_resolve(undefined);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined}const d=r("[[AbortSteps]]");const h=r("[[ErrorSteps]]");const p=r("[[CancelSteps]]");const m=r("[[PullSteps]]");const b=Number.isFinite||function(t){return typeof t==="number"&&isFinite(t)};const g=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};function isDictionary(t){return typeof t==="object"||typeof t==="function"}function assertDictionary(t,r){if(t!==undefined&&!isDictionary(t)){throw new TypeError(`${r} is not an object.`)}}function assertFunction(t,r){if(typeof t!=="function"){throw new TypeError(`${r} is not a function.`)}}function isObject(t){return typeof t==="object"&&t!==null||typeof t==="function"}function assertObject(t,r){if(!isObject(t)){throw new TypeError(`${r} is not an object.`)}}function assertRequiredArgument(t,r,n){if(t===undefined){throw new TypeError(`Parameter ${r} is required in '${n}'.`)}}function assertRequiredField(t,r,n){if(t===undefined){throw new TypeError(`${r} is required in '${n}'.`)}}function convertUnrestrictedDouble(t){return Number(t)}function censorNegativeZero(t){return t===0?0:t}function integerPart(t){return censorNegativeZero(g(t))}function convertUnsignedLongLongWithEnforceRange(t,r){const n=0;const o=Number.MAX_SAFE_INTEGER;let s=Number(t);s=censorNegativeZero(s);if(!b(s)){throw new TypeError(`${r} is not a finite number`)}s=integerPart(s);if(s<n||s>o){throw new TypeError(`${r} is outside the accepted range of ${n} to ${o}, inclusive`)}if(!b(s)||s===0){return 0}return s}function assertReadableStream(t,r){if(!IsReadableStream(t)){throw new TypeError(`${r} is not a ReadableStream.`)}}function AcquireReadableStreamDefaultReader(t){return new ReadableStreamDefaultReader(t)}function ReadableStreamAddReadRequest(t,r){t._reader._readRequests.push(r)}function ReadableStreamFulfillReadRequest(t,r,n){const o=t._reader;const s=o._readRequests.shift();if(n){s._closeSteps()}else{s._chunkSteps(r)}}function ReadableStreamGetNumReadRequests(t){return t._reader._readRequests.length}function ReadableStreamHasDefaultReader(t){const r=t._reader;if(r===undefined){return false}if(!IsReadableStreamDefaultReader(r)){return false}return true}class ReadableStreamDefaultReader{constructor(t){assertRequiredArgument(t,1,"ReadableStreamDefaultReader");assertReadableStream(t,"First parameter");if(IsReadableStreamLocked(t)){throw new TypeError("This stream has already been locked for exclusive reading by another reader")}ReadableStreamReaderGenericInitialize(this,t);this._readRequests=new SimpleQueue}get closed(){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("closed"))}return this._closedPromise}cancel(t=undefined){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("cancel"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("cancel"))}return ReadableStreamReaderGenericCancel(this,t)}read(){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("read"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("read from"))}let t;let r;const n=newPromise(((n,o)=>{t=n;r=o}));const o={_chunkSteps:r=>t({value:r,done:false}),_closeSteps:()=>t({value:undefined,done:true}),_errorSteps:t=>r(t)};ReadableStreamDefaultReaderRead(this,o);return n}releaseLock(){if(!IsReadableStreamDefaultReader(this)){throw defaultReaderBrandCheckException("releaseLock")}if(this._ownerReadableStream===undefined){return}if(this._readRequests.length>0){throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled")}ReadableStreamReaderGenericRelease(this)}}Object.defineProperties(ReadableStreamDefaultReader.prototype,{cancel:{enumerable:true},read:{enumerable:true},releaseLock:{enumerable:true},closed:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamDefaultReader.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:true})}function IsReadableStreamDefaultReader(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_readRequests")){return false}return t instanceof ReadableStreamDefaultReader}function ReadableStreamDefaultReaderRead(t,r){const n=t._ownerReadableStream;n._disturbed=true;if(n._state==="closed"){r._closeSteps()}else if(n._state==="errored"){r._errorSteps(n._storedError)}else{n._readableStreamController[m](r)}}function defaultReaderBrandCheckException(t){return new TypeError(`ReadableStreamDefaultReader.prototype.${t} can only be used on a ReadableStreamDefaultReader`)}const y=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);class ReadableStreamAsyncIteratorImpl{constructor(t,r){this._ongoingPromise=undefined;this._isFinished=false;this._reader=t;this._preventCancel=r}next(){const nextSteps=()=>this._nextSteps();this._ongoingPromise=this._ongoingPromise?transformPromiseWith(this._ongoingPromise,nextSteps,nextSteps):nextSteps();return this._ongoingPromise}return(t){const returnSteps=()=>this._returnSteps(t);return this._ongoingPromise?transformPromiseWith(this._ongoingPromise,returnSteps,returnSteps):returnSteps()}_nextSteps(){if(this._isFinished){return Promise.resolve({value:undefined,done:true})}const t=this._reader;if(t._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("iterate"))}let r;let n;const o=newPromise(((t,o)=>{r=t;n=o}));const s={_chunkSteps:t=>{this._ongoingPromise=undefined;u((()=>r({value:t,done:false})))},_closeSteps:()=>{this._ongoingPromise=undefined;this._isFinished=true;ReadableStreamReaderGenericRelease(t);r({value:undefined,done:true})},_errorSteps:r=>{this._ongoingPromise=undefined;this._isFinished=true;ReadableStreamReaderGenericRelease(t);n(r)}};ReadableStreamDefaultReaderRead(t,s);return o}_returnSteps(t){if(this._isFinished){return Promise.resolve({value:t,done:true})}this._isFinished=true;const r=this._reader;if(r._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("finish iterating"))}if(!this._preventCancel){const n=ReadableStreamReaderGenericCancel(r,t);ReadableStreamReaderGenericRelease(r);return transformPromiseWith(n,(()=>({value:t,done:true})))}ReadableStreamReaderGenericRelease(r);return promiseResolvedWith({value:t,done:true})}}const S={next(){if(!IsReadableStreamAsyncIterator(this)){return promiseRejectedWith(streamAsyncIteratorBrandCheckException("next"))}return this._asyncIteratorImpl.next()},return(t){if(!IsReadableStreamAsyncIterator(this)){return promiseRejectedWith(streamAsyncIteratorBrandCheckException("return"))}return this._asyncIteratorImpl.return(t)}};if(y!==undefined){Object.setPrototypeOf(S,y)}function AcquireReadableStreamAsyncIterator(t,r){const n=AcquireReadableStreamDefaultReader(t);const o=new ReadableStreamAsyncIteratorImpl(n,r);const s=Object.create(S);s._asyncIteratorImpl=o;return s}function IsReadableStreamAsyncIterator(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_asyncIteratorImpl")){return false}try{return t._asyncIteratorImpl instanceof ReadableStreamAsyncIteratorImpl}catch(t){return false}}function streamAsyncIteratorBrandCheckException(t){return new TypeError(`ReadableStreamAsyncIterator.${t} can only be used on a ReadableSteamAsyncIterator`)}const R=Number.isNaN||function(t){return t!==t};function CreateArrayFromList(t){return t.slice()}function CopyDataBlockBytes(t,r,n,o,s){new Uint8Array(t).set(new Uint8Array(n,o,s),r)}function TransferArrayBuffer(t){return t}function IsDetachedBuffer(t){return false}function ArrayBufferSlice(t,r,n){if(t.slice){return t.slice(r,n)}const o=n-r;const s=new ArrayBuffer(o);CopyDataBlockBytes(s,0,t,r,o);return s}function IsNonNegativeNumber(t){if(typeof t!=="number"){return false}if(R(t)){return false}if(t<0){return false}return true}function CloneAsUint8Array(t){const r=ArrayBufferSlice(t.buffer,t.byteOffset,t.byteOffset+t.byteLength);return new Uint8Array(r)}function DequeueValue(t){const r=t._queue.shift();t._queueTotalSize-=r.size;if(t._queueTotalSize<0){t._queueTotalSize=0}return r.value}function EnqueueValueWithSize(t,r,n){if(!IsNonNegativeNumber(n)||n===Infinity){throw new RangeError("Size must be a finite, non-NaN, non-negative number.")}t._queue.push({value:r,size:n});t._queueTotalSize+=n}function PeekQueueValue(t){const r=t._queue.peek();return r.value}function ResetQueue(t){t._queue=new SimpleQueue;t._queueTotalSize=0}class ReadableStreamBYOBRequest{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("view")}return this._view}respond(t){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("respond")}assertRequiredArgument(t,1,"respond");t=convertUnsignedLongLongWithEnforceRange(t,"First parameter");if(this._associatedReadableByteStreamController===undefined){throw new TypeError("This BYOB request has been invalidated")}if(IsDetachedBuffer(this._view.buffer));ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController,t)}respondWithNewView(t){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("respondWithNewView")}assertRequiredArgument(t,1,"respondWithNewView");if(!ArrayBuffer.isView(t)){throw new TypeError("You can only respond with array buffer views")}if(this._associatedReadableByteStreamController===undefined){throw new TypeError("This BYOB request has been invalidated")}if(IsDetachedBuffer(t.buffer));ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController,t)}}Object.defineProperties(ReadableStreamBYOBRequest.prototype,{respond:{enumerable:true},respondWithNewView:{enumerable:true},view:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamBYOBRequest.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:true})}class ReadableByteStreamController{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("byobRequest")}return ReadableByteStreamControllerGetBYOBRequest(this)}get desiredSize(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("desiredSize")}return ReadableByteStreamControllerGetDesiredSize(this)}close(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("close")}if(this._closeRequested){throw new TypeError("The stream has already been closed; do not close it again!")}const t=this._controlledReadableByteStream._state;if(t!=="readable"){throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be closed`)}ReadableByteStreamControllerClose(this)}enqueue(t){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("enqueue")}assertRequiredArgument(t,1,"enqueue");if(!ArrayBuffer.isView(t)){throw new TypeError("chunk must be an array buffer view")}if(t.byteLength===0){throw new TypeError("chunk must have non-zero byteLength")}if(t.buffer.byteLength===0){throw new TypeError(`chunk's buffer must have non-zero byteLength`)}if(this._closeRequested){throw new TypeError("stream is closed or draining")}const r=this._controlledReadableByteStream._state;if(r!=="readable"){throw new TypeError(`The stream (in ${r} state) is not in the readable state and cannot be enqueued to`)}ReadableByteStreamControllerEnqueue(this,t)}error(t=undefined){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("error")}ReadableByteStreamControllerError(this,t)}[p](t){ReadableByteStreamControllerClearPendingPullIntos(this);ResetQueue(this);const r=this._cancelAlgorithm(t);ReadableByteStreamControllerClearAlgorithms(this);return r}[m](t){const r=this._controlledReadableByteStream;if(this._queueTotalSize>0){const r=this._queue.shift();this._queueTotalSize-=r.byteLength;ReadableByteStreamControllerHandleQueueDrain(this);const n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(n);return}const n=this._autoAllocateChunkSize;if(n!==undefined){let r;try{r=new ArrayBuffer(n)}catch(r){t._errorSteps(r);return}const o={buffer:r,bufferByteLength:n,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(o)}ReadableStreamAddReadRequest(r,t);ReadableByteStreamControllerCallPullIfNeeded(this)}}Object.defineProperties(ReadableByteStreamController.prototype,{close:{enumerable:true},enqueue:{enumerable:true},error:{enumerable:true},byobRequest:{enumerable:true},desiredSize:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableByteStreamController.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:true})}function IsReadableByteStreamController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledReadableByteStream")){return false}return t instanceof ReadableByteStreamController}function IsReadableStreamBYOBRequest(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_associatedReadableByteStreamController")){return false}return t instanceof ReadableStreamBYOBRequest}function ReadableByteStreamControllerCallPullIfNeeded(t){const r=ReadableByteStreamControllerShouldCallPull(t);if(!r){return}if(t._pulling){t._pullAgain=true;return}t._pulling=true;const n=t._pullAlgorithm();uponPromise(n,(()=>{t._pulling=false;if(t._pullAgain){t._pullAgain=false;ReadableByteStreamControllerCallPullIfNeeded(t)}}),(r=>{ReadableByteStreamControllerError(t,r)}))}function ReadableByteStreamControllerClearPendingPullIntos(t){ReadableByteStreamControllerInvalidateBYOBRequest(t);t._pendingPullIntos=new SimpleQueue}function ReadableByteStreamControllerCommitPullIntoDescriptor(t,r){let n=false;if(t._state==="closed"){n=true}const o=ReadableByteStreamControllerConvertPullIntoDescriptor(r);if(r.readerType==="default"){ReadableStreamFulfillReadRequest(t,o,n)}else{ReadableStreamFulfillReadIntoRequest(t,o,n)}}function ReadableByteStreamControllerConvertPullIntoDescriptor(t){const r=t.bytesFilled;const n=t.elementSize;return new t.viewConstructor(t.buffer,t.byteOffset,r/n)}function ReadableByteStreamControllerEnqueueChunkToQueue(t,r,n,o){t._queue.push({buffer:r,byteOffset:n,byteLength:o});t._queueTotalSize+=o}function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,r){const n=r.elementSize;const o=r.bytesFilled-r.bytesFilled%n;const s=Math.min(t._queueTotalSize,r.byteLength-r.bytesFilled);const i=r.bytesFilled+s;const a=i-i%n;let l=s;let u=false;if(a>o){l=a-r.bytesFilled;u=true}const c=t._queue;while(l>0){const n=c.peek();const o=Math.min(l,n.byteLength);const s=r.byteOffset+r.bytesFilled;CopyDataBlockBytes(r.buffer,s,n.buffer,n.byteOffset,o);if(n.byteLength===o){c.shift()}else{n.byteOffset+=o;n.byteLength-=o}t._queueTotalSize-=o;ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,o,r);l-=o}return u}function ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,r,n){n.bytesFilled+=r}function ReadableByteStreamControllerHandleQueueDrain(t){if(t._queueTotalSize===0&&t._closeRequested){ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamClose(t._controlledReadableByteStream)}else{ReadableByteStreamControllerCallPullIfNeeded(t)}}function ReadableByteStreamControllerInvalidateBYOBRequest(t){if(t._byobRequest===null){return}t._byobRequest._associatedReadableByteStreamController=undefined;t._byobRequest._view=null;t._byobRequest=null}function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t){while(t._pendingPullIntos.length>0){if(t._queueTotalSize===0){return}const r=t._pendingPullIntos.peek();if(ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,r)){ReadableByteStreamControllerShiftPendingPullInto(t);ReadableByteStreamControllerCommitPullIntoDescriptor(t._controlledReadableByteStream,r)}}}function ReadableByteStreamControllerPullInto(t,r,n){const o=t._controlledReadableByteStream;let s=1;if(r.constructor!==DataView){s=r.constructor.BYTES_PER_ELEMENT}const i=r.constructor;const a=TransferArrayBuffer(r.buffer);const l={buffer:a,bufferByteLength:a.byteLength,byteOffset:r.byteOffset,byteLength:r.byteLength,bytesFilled:0,elementSize:s,viewConstructor:i,readerType:"byob"};if(t._pendingPullIntos.length>0){t._pendingPullIntos.push(l);ReadableStreamAddReadIntoRequest(o,n);return}if(o._state==="closed"){const t=new i(l.buffer,l.byteOffset,0);n._closeSteps(t);return}if(t._queueTotalSize>0){if(ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,l)){const r=ReadableByteStreamControllerConvertPullIntoDescriptor(l);ReadableByteStreamControllerHandleQueueDrain(t);n._chunkSteps(r);return}if(t._closeRequested){const r=new TypeError("Insufficient bytes to fill elements in the given buffer");ReadableByteStreamControllerError(t,r);n._errorSteps(r);return}}t._pendingPullIntos.push(l);ReadableStreamAddReadIntoRequest(o,n);ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerRespondInClosedState(t,r){const n=t._controlledReadableByteStream;if(ReadableStreamHasBYOBReader(n)){while(ReadableStreamGetNumReadIntoRequests(n)>0){const r=ReadableByteStreamControllerShiftPendingPullInto(t);ReadableByteStreamControllerCommitPullIntoDescriptor(n,r)}}}function ReadableByteStreamControllerRespondInReadableState(t,r,n){ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,r,n);if(n.bytesFilled<n.elementSize){return}ReadableByteStreamControllerShiftPendingPullInto(t);const o=n.bytesFilled%n.elementSize;if(o>0){const r=n.byteOffset+n.bytesFilled;const s=ArrayBufferSlice(n.buffer,r-o,r);ReadableByteStreamControllerEnqueueChunkToQueue(t,s,0,s.byteLength)}n.bytesFilled-=o;ReadableByteStreamControllerCommitPullIntoDescriptor(t._controlledReadableByteStream,n);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t)}function ReadableByteStreamControllerRespondInternal(t,r){const n=t._pendingPullIntos.peek();ReadableByteStreamControllerInvalidateBYOBRequest(t);const o=t._controlledReadableByteStream._state;if(o==="closed"){ReadableByteStreamControllerRespondInClosedState(t)}else{ReadableByteStreamControllerRespondInReadableState(t,r,n)}ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerShiftPendingPullInto(t){const r=t._pendingPullIntos.shift();return r}function ReadableByteStreamControllerShouldCallPull(t){const r=t._controlledReadableByteStream;if(r._state!=="readable"){return false}if(t._closeRequested){return false}if(!t._started){return false}if(ReadableStreamHasDefaultReader(r)&&ReadableStreamGetNumReadRequests(r)>0){return true}if(ReadableStreamHasBYOBReader(r)&&ReadableStreamGetNumReadIntoRequests(r)>0){return true}const n=ReadableByteStreamControllerGetDesiredSize(t);if(n>0){return true}return false}function ReadableByteStreamControllerClearAlgorithms(t){t._pullAlgorithm=undefined;t._cancelAlgorithm=undefined}function ReadableByteStreamControllerClose(t){const r=t._controlledReadableByteStream;if(t._closeRequested||r._state!=="readable"){return}if(t._queueTotalSize>0){t._closeRequested=true;return}if(t._pendingPullIntos.length>0){const r=t._pendingPullIntos.peek();if(r.bytesFilled>0){const r=new TypeError("Insufficient bytes to fill elements in the given buffer");ReadableByteStreamControllerError(t,r);throw r}}ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamClose(r)}function ReadableByteStreamControllerEnqueue(t,r){const n=t._controlledReadableByteStream;if(t._closeRequested||n._state!=="readable"){return}const o=r.buffer;const s=r.byteOffset;const i=r.byteLength;const a=TransferArrayBuffer(o);if(t._pendingPullIntos.length>0){const r=t._pendingPullIntos.peek();if(IsDetachedBuffer(r.buffer));r.buffer=TransferArrayBuffer(r.buffer)}ReadableByteStreamControllerInvalidateBYOBRequest(t);if(ReadableStreamHasDefaultReader(n)){if(ReadableStreamGetNumReadRequests(n)===0){ReadableByteStreamControllerEnqueueChunkToQueue(t,a,s,i)}else{const t=new Uint8Array(a,s,i);ReadableStreamFulfillReadRequest(n,t,false)}}else if(ReadableStreamHasBYOBReader(n)){ReadableByteStreamControllerEnqueueChunkToQueue(t,a,s,i);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t)}else{ReadableByteStreamControllerEnqueueChunkToQueue(t,a,s,i)}ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerError(t,r){const n=t._controlledReadableByteStream;if(n._state!=="readable"){return}ReadableByteStreamControllerClearPendingPullIntos(t);ResetQueue(t);ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamError(n,r)}function ReadableByteStreamControllerGetBYOBRequest(t){if(t._byobRequest===null&&t._pendingPullIntos.length>0){const r=t._pendingPullIntos.peek();const n=new Uint8Array(r.buffer,r.byteOffset+r.bytesFilled,r.byteLength-r.bytesFilled);const o=Object.create(ReadableStreamBYOBRequest.prototype);SetUpReadableStreamBYOBRequest(o,t,n);t._byobRequest=o}return t._byobRequest}function ReadableByteStreamControllerGetDesiredSize(t){const r=t._controlledReadableByteStream._state;if(r==="errored"){return null}if(r==="closed"){return 0}return t._strategyHWM-t._queueTotalSize}function ReadableByteStreamControllerRespond(t,r){const n=t._pendingPullIntos.peek();const o=t._controlledReadableByteStream._state;if(o==="closed"){if(r!==0){throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}}else{if(r===0){throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream")}if(n.bytesFilled+r>n.byteLength){throw new RangeError("bytesWritten out of range")}}n.buffer=TransferArrayBuffer(n.buffer);ReadableByteStreamControllerRespondInternal(t,r)}function ReadableByteStreamControllerRespondWithNewView(t,r){const n=t._pendingPullIntos.peek();const o=t._controlledReadableByteStream._state;if(o==="closed"){if(r.byteLength!==0){throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}}else{if(r.byteLength===0){throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream")}}if(n.byteOffset+n.bytesFilled!==r.byteOffset){throw new RangeError("The region specified by view does not match byobRequest")}if(n.bufferByteLength!==r.buffer.byteLength){throw new RangeError("The buffer of view has different capacity than byobRequest")}if(n.bytesFilled+r.byteLength>n.byteLength){throw new RangeError("The region specified by view is larger than byobRequest")}n.buffer=TransferArrayBuffer(r.buffer);ReadableByteStreamControllerRespondInternal(t,r.byteLength)}function SetUpReadableByteStreamController(t,r,n,o,s,i,a){r._controlledReadableByteStream=t;r._pullAgain=false;r._pulling=false;r._byobRequest=null;r._queue=r._queueTotalSize=undefined;ResetQueue(r);r._closeRequested=false;r._started=false;r._strategyHWM=i;r._pullAlgorithm=o;r._cancelAlgorithm=s;r._autoAllocateChunkSize=a;r._pendingPullIntos=new SimpleQueue;t._readableStreamController=r;const l=n();uponPromise(promiseResolvedWith(l),(()=>{r._started=true;ReadableByteStreamControllerCallPullIfNeeded(r)}),(t=>{ReadableByteStreamControllerError(r,t)}))}function SetUpReadableByteStreamControllerFromUnderlyingSource(t,r,n){const o=Object.create(ReadableByteStreamController.prototype);let startAlgorithm=()=>undefined;let pullAlgorithm=()=>promiseResolvedWith(undefined);let cancelAlgorithm=()=>promiseResolvedWith(undefined);if(r.start!==undefined){startAlgorithm=()=>r.start(o)}if(r.pull!==undefined){pullAlgorithm=()=>r.pull(o)}if(r.cancel!==undefined){cancelAlgorithm=t=>r.cancel(t)}const s=r.autoAllocateChunkSize;if(s===0){throw new TypeError("autoAllocateChunkSize must be greater than 0")}SetUpReadableByteStreamController(t,o,startAlgorithm,pullAlgorithm,cancelAlgorithm,n,s)}function SetUpReadableStreamBYOBRequest(t,r,n){t._associatedReadableByteStreamController=r;t._view=n}function byobRequestBrandCheckException(t){return new TypeError(`ReadableStreamBYOBRequest.prototype.${t} can only be used on a ReadableStreamBYOBRequest`)}function byteStreamControllerBrandCheckException(t){return new TypeError(`ReadableByteStreamController.prototype.${t} can only be used on a ReadableByteStreamController`)}function AcquireReadableStreamBYOBReader(t){return new ReadableStreamBYOBReader(t)}function ReadableStreamAddReadIntoRequest(t,r){t._reader._readIntoRequests.push(r)}function ReadableStreamFulfillReadIntoRequest(t,r,n){const o=t._reader;const s=o._readIntoRequests.shift();if(n){s._closeSteps(r)}else{s._chunkSteps(r)}}function ReadableStreamGetNumReadIntoRequests(t){return t._reader._readIntoRequests.length}function ReadableStreamHasBYOBReader(t){const r=t._reader;if(r===undefined){return false}if(!IsReadableStreamBYOBReader(r)){return false}return true}class ReadableStreamBYOBReader{constructor(t){assertRequiredArgument(t,1,"ReadableStreamBYOBReader");assertReadableStream(t,"First parameter");if(IsReadableStreamLocked(t)){throw new TypeError("This stream has already been locked for exclusive reading by another reader")}if(!IsReadableByteStreamController(t._readableStreamController)){throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte "+"source")}ReadableStreamReaderGenericInitialize(this,t);this._readIntoRequests=new SimpleQueue}get closed(){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("closed"))}return this._closedPromise}cancel(t=undefined){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("cancel"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("cancel"))}return ReadableStreamReaderGenericCancel(this,t)}read(t){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("read"))}if(!ArrayBuffer.isView(t)){return promiseRejectedWith(new TypeError("view must be an array buffer view"))}if(t.byteLength===0){return promiseRejectedWith(new TypeError("view must have non-zero byteLength"))}if(t.buffer.byteLength===0){return promiseRejectedWith(new TypeError(`view's buffer must have non-zero byteLength`))}if(IsDetachedBuffer(t.buffer));if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("read from"))}let r;let n;const o=newPromise(((t,o)=>{r=t;n=o}));const s={_chunkSteps:t=>r({value:t,done:false}),_closeSteps:t=>r({value:t,done:true}),_errorSteps:t=>n(t)};ReadableStreamBYOBReaderRead(this,t,s);return o}releaseLock(){if(!IsReadableStreamBYOBReader(this)){throw byobReaderBrandCheckException("releaseLock")}if(this._ownerReadableStream===undefined){return}if(this._readIntoRequests.length>0){throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled")}ReadableStreamReaderGenericRelease(this)}}Object.defineProperties(ReadableStreamBYOBReader.prototype,{cancel:{enumerable:true},read:{enumerable:true},releaseLock:{enumerable:true},closed:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamBYOBReader.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:true})}function IsReadableStreamBYOBReader(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_readIntoRequests")){return false}return t instanceof ReadableStreamBYOBReader}function ReadableStreamBYOBReaderRead(t,r,n){const o=t._ownerReadableStream;o._disturbed=true;if(o._state==="errored"){n._errorSteps(o._storedError)}else{ReadableByteStreamControllerPullInto(o._readableStreamController,r,n)}}function byobReaderBrandCheckException(t){return new TypeError(`ReadableStreamBYOBReader.prototype.${t} can only be used on a ReadableStreamBYOBReader`)}function ExtractHighWaterMark(t,r){const{highWaterMark:n}=t;if(n===undefined){return r}if(R(n)||n<0){throw new RangeError("Invalid highWaterMark")}return n}function ExtractSizeAlgorithm(t){const{size:r}=t;if(!r){return()=>1}return r}function convertQueuingStrategy(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.highWaterMark;const o=t===null||t===void 0?void 0:t.size;return{highWaterMark:n===undefined?undefined:convertUnrestrictedDouble(n),size:o===undefined?undefined:convertQueuingStrategySize(o,`${r} has member 'size' that`)}}function convertQueuingStrategySize(t,r){assertFunction(t,r);return r=>convertUnrestrictedDouble(t(r))}function convertUnderlyingSink(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.abort;const o=t===null||t===void 0?void 0:t.close;const s=t===null||t===void 0?void 0:t.start;const i=t===null||t===void 0?void 0:t.type;const a=t===null||t===void 0?void 0:t.write;return{abort:n===undefined?undefined:convertUnderlyingSinkAbortCallback(n,t,`${r} has member 'abort' that`),close:o===undefined?undefined:convertUnderlyingSinkCloseCallback(o,t,`${r} has member 'close' that`),start:s===undefined?undefined:convertUnderlyingSinkStartCallback(s,t,`${r} has member 'start' that`),write:a===undefined?undefined:convertUnderlyingSinkWriteCallback(a,t,`${r} has member 'write' that`),type:i}}function convertUnderlyingSinkAbortCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertUnderlyingSinkCloseCallback(t,r,n){assertFunction(t,n);return()=>promiseCall(t,r,[])}function convertUnderlyingSinkStartCallback(t,r,n){assertFunction(t,n);return n=>reflectCall(t,r,[n])}function convertUnderlyingSinkWriteCallback(t,r,n){assertFunction(t,n);return(n,o)=>promiseCall(t,r,[n,o])}function assertWritableStream(t,r){if(!IsWritableStream(t)){throw new TypeError(`${r} is not a WritableStream.`)}}function isAbortSignal(t){if(typeof t!=="object"||t===null){return false}try{return typeof t.aborted==="boolean"}catch(t){return false}}const _=typeof AbortController==="function";function createAbortController(){if(_){return new AbortController}return undefined}class WritableStream{constructor(t={},r={}){if(t===undefined){t=null}else{assertObject(t,"First parameter")}const n=convertQueuingStrategy(r,"Second parameter");const o=convertUnderlyingSink(t,"First parameter");InitializeWritableStream(this);const s=o.type;if(s!==undefined){throw new RangeError("Invalid type is specified")}const i=ExtractSizeAlgorithm(n);const a=ExtractHighWaterMark(n,1);SetUpWritableStreamDefaultControllerFromUnderlyingSink(this,o,a,i)}get locked(){if(!IsWritableStream(this)){throw streamBrandCheckException$2("locked")}return IsWritableStreamLocked(this)}abort(t=undefined){if(!IsWritableStream(this)){return promiseRejectedWith(streamBrandCheckException$2("abort"))}if(IsWritableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot abort a stream that already has a writer"))}return WritableStreamAbort(this,t)}close(){if(!IsWritableStream(this)){return promiseRejectedWith(streamBrandCheckException$2("close"))}if(IsWritableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot close a stream that already has a writer"))}if(WritableStreamCloseQueuedOrInFlight(this)){return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"))}return WritableStreamClose(this)}getWriter(){if(!IsWritableStream(this)){throw streamBrandCheckException$2("getWriter")}return AcquireWritableStreamDefaultWriter(this)}}Object.defineProperties(WritableStream.prototype,{abort:{enumerable:true},close:{enumerable:true},getWriter:{enumerable:true},locked:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(WritableStream.prototype,r.toStringTag,{value:"WritableStream",configurable:true})}function AcquireWritableStreamDefaultWriter(t){return new WritableStreamDefaultWriter(t)}function CreateWritableStream(t,r,n,o,s=1,i=(()=>1)){const a=Object.create(WritableStream.prototype);InitializeWritableStream(a);const l=Object.create(WritableStreamDefaultController.prototype);SetUpWritableStreamDefaultController(a,l,t,r,n,o,s,i);return a}function InitializeWritableStream(t){t._state="writable";t._storedError=undefined;t._writer=undefined;t._writableStreamController=undefined;t._writeRequests=new SimpleQueue;t._inFlightWriteRequest=undefined;t._closeRequest=undefined;t._inFlightCloseRequest=undefined;t._pendingAbortRequest=undefined;t._backpressure=false}function IsWritableStream(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_writableStreamController")){return false}return t instanceof WritableStream}function IsWritableStreamLocked(t){if(t._writer===undefined){return false}return true}function WritableStreamAbort(t,r){var n;if(t._state==="closed"||t._state==="errored"){return promiseResolvedWith(undefined)}t._writableStreamController._abortReason=r;(n=t._writableStreamController._abortController)===null||n===void 0?void 0:n.abort();const o=t._state;if(o==="closed"||o==="errored"){return promiseResolvedWith(undefined)}if(t._pendingAbortRequest!==undefined){return t._pendingAbortRequest._promise}let s=false;if(o==="erroring"){s=true;r=undefined}const i=newPromise(((n,o)=>{t._pendingAbortRequest={_promise:undefined,_resolve:n,_reject:o,_reason:r,_wasAlreadyErroring:s}}));t._pendingAbortRequest._promise=i;if(!s){WritableStreamStartErroring(t,r)}return i}function WritableStreamClose(t){const r=t._state;if(r==="closed"||r==="errored"){return promiseRejectedWith(new TypeError(`The stream (in ${r} state) is not in the writable state and cannot be closed`))}const n=newPromise(((r,n)=>{const o={_resolve:r,_reject:n};t._closeRequest=o}));const o=t._writer;if(o!==undefined&&t._backpressure&&r==="writable"){defaultWriterReadyPromiseResolve(o)}WritableStreamDefaultControllerClose(t._writableStreamController);return n}function WritableStreamAddWriteRequest(t){const r=newPromise(((r,n)=>{const o={_resolve:r,_reject:n};t._writeRequests.push(o)}));return r}function WritableStreamDealWithRejection(t,r){const n=t._state;if(n==="writable"){WritableStreamStartErroring(t,r);return}WritableStreamFinishErroring(t)}function WritableStreamStartErroring(t,r){const n=t._writableStreamController;t._state="erroring";t._storedError=r;const o=t._writer;if(o!==undefined){WritableStreamDefaultWriterEnsureReadyPromiseRejected(o,r)}if(!WritableStreamHasOperationMarkedInFlight(t)&&n._started){WritableStreamFinishErroring(t)}}function WritableStreamFinishErroring(t){t._state="errored";t._writableStreamController[h]();const r=t._storedError;t._writeRequests.forEach((t=>{t._reject(r)}));t._writeRequests=new SimpleQueue;if(t._pendingAbortRequest===undefined){WritableStreamRejectCloseAndClosedPromiseIfNeeded(t);return}const n=t._pendingAbortRequest;t._pendingAbortRequest=undefined;if(n._wasAlreadyErroring){n._reject(r);WritableStreamRejectCloseAndClosedPromiseIfNeeded(t);return}const o=t._writableStreamController[d](n._reason);uponPromise(o,(()=>{n._resolve();WritableStreamRejectCloseAndClosedPromiseIfNeeded(t)}),(r=>{n._reject(r);WritableStreamRejectCloseAndClosedPromiseIfNeeded(t)}))}function WritableStreamFinishInFlightWrite(t){t._inFlightWriteRequest._resolve(undefined);t._inFlightWriteRequest=undefined}function WritableStreamFinishInFlightWriteWithError(t,r){t._inFlightWriteRequest._reject(r);t._inFlightWriteRequest=undefined;WritableStreamDealWithRejection(t,r)}function WritableStreamFinishInFlightClose(t){t._inFlightCloseRequest._resolve(undefined);t._inFlightCloseRequest=undefined;const r=t._state;if(r==="erroring"){t._storedError=undefined;if(t._pendingAbortRequest!==undefined){t._pendingAbortRequest._resolve();t._pendingAbortRequest=undefined}}t._state="closed";const n=t._writer;if(n!==undefined){defaultWriterClosedPromiseResolve(n)}}function WritableStreamFinishInFlightCloseWithError(t,r){t._inFlightCloseRequest._reject(r);t._inFlightCloseRequest=undefined;if(t._pendingAbortRequest!==undefined){t._pendingAbortRequest._reject(r);t._pendingAbortRequest=undefined}WritableStreamDealWithRejection(t,r)}function WritableStreamCloseQueuedOrInFlight(t){if(t._closeRequest===undefined&&t._inFlightCloseRequest===undefined){return false}return true}function WritableStreamHasOperationMarkedInFlight(t){if(t._inFlightWriteRequest===undefined&&t._inFlightCloseRequest===undefined){return false}return true}function WritableStreamMarkCloseRequestInFlight(t){t._inFlightCloseRequest=t._closeRequest;t._closeRequest=undefined}function WritableStreamMarkFirstWriteRequestInFlight(t){t._inFlightWriteRequest=t._writeRequests.shift()}function WritableStreamRejectCloseAndClosedPromiseIfNeeded(t){if(t._closeRequest!==undefined){t._closeRequest._reject(t._storedError);t._closeRequest=undefined}const r=t._writer;if(r!==undefined){defaultWriterClosedPromiseReject(r,t._storedError)}}function WritableStreamUpdateBackpressure(t,r){const n=t._writer;if(n!==undefined&&r!==t._backpressure){if(r){defaultWriterReadyPromiseReset(n)}else{defaultWriterReadyPromiseResolve(n)}}t._backpressure=r}class WritableStreamDefaultWriter{constructor(t){assertRequiredArgument(t,1,"WritableStreamDefaultWriter");assertWritableStream(t,"First parameter");if(IsWritableStreamLocked(t)){throw new TypeError("This stream has already been locked for exclusive writing by another writer")}this._ownerWritableStream=t;t._writer=this;const r=t._state;if(r==="writable"){if(!WritableStreamCloseQueuedOrInFlight(t)&&t._backpressure){defaultWriterReadyPromiseInitialize(this)}else{defaultWriterReadyPromiseInitializeAsResolved(this)}defaultWriterClosedPromiseInitialize(this)}else if(r==="erroring"){defaultWriterReadyPromiseInitializeAsRejected(this,t._storedError);defaultWriterClosedPromiseInitialize(this)}else if(r==="closed"){defaultWriterReadyPromiseInitializeAsResolved(this);defaultWriterClosedPromiseInitializeAsResolved(this)}else{const r=t._storedError;defaultWriterReadyPromiseInitializeAsRejected(this,r);defaultWriterClosedPromiseInitializeAsRejected(this,r)}}get closed(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("closed"))}return this._closedPromise}get desiredSize(){if(!IsWritableStreamDefaultWriter(this)){throw defaultWriterBrandCheckException("desiredSize")}if(this._ownerWritableStream===undefined){throw defaultWriterLockException("desiredSize")}return WritableStreamDefaultWriterGetDesiredSize(this)}get ready(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("ready"))}return this._readyPromise}abort(t=undefined){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("abort"))}if(this._ownerWritableStream===undefined){return promiseRejectedWith(defaultWriterLockException("abort"))}return WritableStreamDefaultWriterAbort(this,t)}close(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("close"))}const t=this._ownerWritableStream;if(t===undefined){return promiseRejectedWith(defaultWriterLockException("close"))}if(WritableStreamCloseQueuedOrInFlight(t)){return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"))}return WritableStreamDefaultWriterClose(this)}releaseLock(){if(!IsWritableStreamDefaultWriter(this)){throw defaultWriterBrandCheckException("releaseLock")}const t=this._ownerWritableStream;if(t===undefined){return}WritableStreamDefaultWriterRelease(this)}write(t=undefined){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("write"))}if(this._ownerWritableStream===undefined){return promiseRejectedWith(defaultWriterLockException("write to"))}return WritableStreamDefaultWriterWrite(this,t)}}Object.defineProperties(WritableStreamDefaultWriter.prototype,{abort:{enumerable:true},close:{enumerable:true},releaseLock:{enumerable:true},write:{enumerable:true},closed:{enumerable:true},desiredSize:{enumerable:true},ready:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(WritableStreamDefaultWriter.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:true})}function IsWritableStreamDefaultWriter(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_ownerWritableStream")){return false}return t instanceof WritableStreamDefaultWriter}function WritableStreamDefaultWriterAbort(t,r){const n=t._ownerWritableStream;return WritableStreamAbort(n,r)}function WritableStreamDefaultWriterClose(t){const r=t._ownerWritableStream;return WritableStreamClose(r)}function WritableStreamDefaultWriterCloseWithErrorPropagation(t){const r=t._ownerWritableStream;const n=r._state;if(WritableStreamCloseQueuedOrInFlight(r)||n==="closed"){return promiseResolvedWith(undefined)}if(n==="errored"){return promiseRejectedWith(r._storedError)}return WritableStreamDefaultWriterClose(t)}function WritableStreamDefaultWriterEnsureClosedPromiseRejected(t,r){if(t._closedPromiseState==="pending"){defaultWriterClosedPromiseReject(t,r)}else{defaultWriterClosedPromiseResetToRejected(t,r)}}function WritableStreamDefaultWriterEnsureReadyPromiseRejected(t,r){if(t._readyPromiseState==="pending"){defaultWriterReadyPromiseReject(t,r)}else{defaultWriterReadyPromiseResetToRejected(t,r)}}function WritableStreamDefaultWriterGetDesiredSize(t){const r=t._ownerWritableStream;const n=r._state;if(n==="errored"||n==="erroring"){return null}if(n==="closed"){return 0}return WritableStreamDefaultControllerGetDesiredSize(r._writableStreamController)}function WritableStreamDefaultWriterRelease(t){const r=t._ownerWritableStream;const n=new TypeError(`Writer was released and can no longer be used to monitor the stream's closedness`);WritableStreamDefaultWriterEnsureReadyPromiseRejected(t,n);WritableStreamDefaultWriterEnsureClosedPromiseRejected(t,n);r._writer=undefined;t._ownerWritableStream=undefined}function WritableStreamDefaultWriterWrite(t,r){const n=t._ownerWritableStream;const o=n._writableStreamController;const s=WritableStreamDefaultControllerGetChunkSize(o,r);if(n!==t._ownerWritableStream){return promiseRejectedWith(defaultWriterLockException("write to"))}const i=n._state;if(i==="errored"){return promiseRejectedWith(n._storedError)}if(WritableStreamCloseQueuedOrInFlight(n)||i==="closed"){return promiseRejectedWith(new TypeError("The stream is closing or closed and cannot be written to"))}if(i==="erroring"){return promiseRejectedWith(n._storedError)}const a=WritableStreamAddWriteRequest(n);WritableStreamDefaultControllerWrite(o,r,s);return a}const w={};class WritableStreamDefaultController{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!IsWritableStreamDefaultController(this)){throw defaultControllerBrandCheckException$2("abortReason")}return this._abortReason}get signal(){if(!IsWritableStreamDefaultController(this)){throw defaultControllerBrandCheckException$2("signal")}if(this._abortController===undefined){throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported")}return this._abortController.signal}error(t=undefined){if(!IsWritableStreamDefaultController(this)){throw defaultControllerBrandCheckException$2("error")}const r=this._controlledWritableStream._state;if(r!=="writable"){return}WritableStreamDefaultControllerError(this,t)}[d](t){const r=this._abortAlgorithm(t);WritableStreamDefaultControllerClearAlgorithms(this);return r}[h](){ResetQueue(this)}}Object.defineProperties(WritableStreamDefaultController.prototype,{error:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(WritableStreamDefaultController.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:true})}function IsWritableStreamDefaultController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledWritableStream")){return false}return t instanceof WritableStreamDefaultController}function SetUpWritableStreamDefaultController(t,r,n,o,s,i,a,l){r._controlledWritableStream=t;t._writableStreamController=r;r._queue=undefined;r._queueTotalSize=undefined;ResetQueue(r);r._abortReason=undefined;r._abortController=createAbortController();r._started=false;r._strategySizeAlgorithm=l;r._strategyHWM=a;r._writeAlgorithm=o;r._closeAlgorithm=s;r._abortAlgorithm=i;const u=WritableStreamDefaultControllerGetBackpressure(r);WritableStreamUpdateBackpressure(t,u);const c=n();const d=promiseResolvedWith(c);uponPromise(d,(()=>{r._started=true;WritableStreamDefaultControllerAdvanceQueueIfNeeded(r)}),(n=>{r._started=true;WritableStreamDealWithRejection(t,n)}))}function SetUpWritableStreamDefaultControllerFromUnderlyingSink(t,r,n,o){const s=Object.create(WritableStreamDefaultController.prototype);let startAlgorithm=()=>undefined;let writeAlgorithm=()=>promiseResolvedWith(undefined);let closeAlgorithm=()=>promiseResolvedWith(undefined);let abortAlgorithm=()=>promiseResolvedWith(undefined);if(r.start!==undefined){startAlgorithm=()=>r.start(s)}if(r.write!==undefined){writeAlgorithm=t=>r.write(t,s)}if(r.close!==undefined){closeAlgorithm=()=>r.close()}if(r.abort!==undefined){abortAlgorithm=t=>r.abort(t)}SetUpWritableStreamDefaultController(t,s,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,n,o)}function WritableStreamDefaultControllerClearAlgorithms(t){t._writeAlgorithm=undefined;t._closeAlgorithm=undefined;t._abortAlgorithm=undefined;t._strategySizeAlgorithm=undefined}function WritableStreamDefaultControllerClose(t){EnqueueValueWithSize(t,w,0);WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}function WritableStreamDefaultControllerGetChunkSize(t,r){try{return t._strategySizeAlgorithm(r)}catch(r){WritableStreamDefaultControllerErrorIfNeeded(t,r);return 1}}function WritableStreamDefaultControllerGetDesiredSize(t){return t._strategyHWM-t._queueTotalSize}function WritableStreamDefaultControllerWrite(t,r,n){try{EnqueueValueWithSize(t,r,n)}catch(r){WritableStreamDefaultControllerErrorIfNeeded(t,r);return}const o=t._controlledWritableStream;if(!WritableStreamCloseQueuedOrInFlight(o)&&o._state==="writable"){const r=WritableStreamDefaultControllerGetBackpressure(t);WritableStreamUpdateBackpressure(o,r)}WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}function WritableStreamDefaultControllerAdvanceQueueIfNeeded(t){const r=t._controlledWritableStream;if(!t._started){return}if(r._inFlightWriteRequest!==undefined){return}const n=r._state;if(n==="erroring"){WritableStreamFinishErroring(r);return}if(t._queue.length===0){return}const o=PeekQueueValue(t);if(o===w){WritableStreamDefaultControllerProcessClose(t)}else{WritableStreamDefaultControllerProcessWrite(t,o)}}function WritableStreamDefaultControllerErrorIfNeeded(t,r){if(t._controlledWritableStream._state==="writable"){WritableStreamDefaultControllerError(t,r)}}function WritableStreamDefaultControllerProcessClose(t){const r=t._controlledWritableStream;WritableStreamMarkCloseRequestInFlight(r);DequeueValue(t);const n=t._closeAlgorithm();WritableStreamDefaultControllerClearAlgorithms(t);uponPromise(n,(()=>{WritableStreamFinishInFlightClose(r)}),(t=>{WritableStreamFinishInFlightCloseWithError(r,t)}))}function WritableStreamDefaultControllerProcessWrite(t,r){const n=t._controlledWritableStream;WritableStreamMarkFirstWriteRequestInFlight(n);const o=t._writeAlgorithm(r);uponPromise(o,(()=>{WritableStreamFinishInFlightWrite(n);const r=n._state;DequeueValue(t);if(!WritableStreamCloseQueuedOrInFlight(n)&&r==="writable"){const r=WritableStreamDefaultControllerGetBackpressure(t);WritableStreamUpdateBackpressure(n,r)}WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}),(r=>{if(n._state==="writable"){WritableStreamDefaultControllerClearAlgorithms(t)}WritableStreamFinishInFlightWriteWithError(n,r)}))}function WritableStreamDefaultControllerGetBackpressure(t){const r=WritableStreamDefaultControllerGetDesiredSize(t);return r<=0}function WritableStreamDefaultControllerError(t,r){const n=t._controlledWritableStream;WritableStreamDefaultControllerClearAlgorithms(t);WritableStreamStartErroring(n,r)}function streamBrandCheckException$2(t){return new TypeError(`WritableStream.prototype.${t} can only be used on a WritableStream`)}function defaultControllerBrandCheckException$2(t){return new TypeError(`WritableStreamDefaultController.prototype.${t} can only be used on a WritableStreamDefaultController`)}function defaultWriterBrandCheckException(t){return new TypeError(`WritableStreamDefaultWriter.prototype.${t} can only be used on a WritableStreamDefaultWriter`)}function defaultWriterLockException(t){return new TypeError("Cannot "+t+" a stream using a released writer")}function defaultWriterClosedPromiseInitialize(t){t._closedPromise=newPromise(((r,n)=>{t._closedPromise_resolve=r;t._closedPromise_reject=n;t._closedPromiseState="pending"}))}function defaultWriterClosedPromiseInitializeAsRejected(t,r){defaultWriterClosedPromiseInitialize(t);defaultWriterClosedPromiseReject(t,r)}function defaultWriterClosedPromiseInitializeAsResolved(t){defaultWriterClosedPromiseInitialize(t);defaultWriterClosedPromiseResolve(t)}function defaultWriterClosedPromiseReject(t,r){if(t._closedPromise_reject===undefined){return}setPromiseIsHandledToTrue(t._closedPromise);t._closedPromise_reject(r);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined;t._closedPromiseState="rejected"}function defaultWriterClosedPromiseResetToRejected(t,r){defaultWriterClosedPromiseInitializeAsRejected(t,r)}function defaultWriterClosedPromiseResolve(t){if(t._closedPromise_resolve===undefined){return}t._closedPromise_resolve(undefined);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined;t._closedPromiseState="resolved"}function defaultWriterReadyPromiseInitialize(t){t._readyPromise=newPromise(((r,n)=>{t._readyPromise_resolve=r;t._readyPromise_reject=n}));t._readyPromiseState="pending"}function defaultWriterReadyPromiseInitializeAsRejected(t,r){defaultWriterReadyPromiseInitialize(t);defaultWriterReadyPromiseReject(t,r)}function defaultWriterReadyPromiseInitializeAsResolved(t){defaultWriterReadyPromiseInitialize(t);defaultWriterReadyPromiseResolve(t)}function defaultWriterReadyPromiseReject(t,r){if(t._readyPromise_reject===undefined){return}setPromiseIsHandledToTrue(t._readyPromise);t._readyPromise_reject(r);t._readyPromise_resolve=undefined;t._readyPromise_reject=undefined;t._readyPromiseState="rejected"}function defaultWriterReadyPromiseReset(t){defaultWriterReadyPromiseInitialize(t)}function defaultWriterReadyPromiseResetToRejected(t,r){defaultWriterReadyPromiseInitializeAsRejected(t,r)}function defaultWriterReadyPromiseResolve(t){if(t._readyPromise_resolve===undefined){return}t._readyPromise_resolve(undefined);t._readyPromise_resolve=undefined;t._readyPromise_reject=undefined;t._readyPromiseState="fulfilled"}const C=typeof DOMException!=="undefined"?DOMException:undefined;function isDOMExceptionConstructor(t){if(!(typeof t==="function"||typeof t==="object")){return false}try{new t;return true}catch(t){return false}}function createDOMExceptionPolyfill(){const t=function DOMException(t,r){this.message=t||"";this.name=r||"Error";if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}};t.prototype=Object.create(Error.prototype);Object.defineProperty(t.prototype,"constructor",{value:t,writable:true,configurable:true});return t}const v=isDOMExceptionConstructor(C)?C:createDOMExceptionPolyfill();function ReadableStreamPipeTo(t,r,n,o,s,i){const a=AcquireReadableStreamDefaultReader(t);const l=AcquireWritableStreamDefaultWriter(r);t._disturbed=true;let u=false;let c=promiseResolvedWith(undefined);return newPromise(((d,h)=>{let p;if(i!==undefined){p=()=>{const n=new v("Aborted","AbortError");const i=[];if(!o){i.push((()=>{if(r._state==="writable"){return WritableStreamAbort(r,n)}return promiseResolvedWith(undefined)}))}if(!s){i.push((()=>{if(t._state==="readable"){return ReadableStreamCancel(t,n)}return promiseResolvedWith(undefined)}))}shutdownWithAction((()=>Promise.all(i.map((t=>t())))),true,n)};if(i.aborted){p();return}i.addEventListener("abort",p)}function pipeLoop(){return newPromise(((t,r)=>{function next(n){if(n){t()}else{PerformPromiseThen(pipeStep(),next,r)}}next(false)}))}function pipeStep(){if(u){return promiseResolvedWith(true)}return PerformPromiseThen(l._readyPromise,(()=>newPromise(((t,r)=>{ReadableStreamDefaultReaderRead(a,{_chunkSteps:r=>{c=PerformPromiseThen(WritableStreamDefaultWriterWrite(l,r),undefined,noop);t(false)},_closeSteps:()=>t(true),_errorSteps:r})}))))}isOrBecomesErrored(t,a._closedPromise,(t=>{if(!o){shutdownWithAction((()=>WritableStreamAbort(r,t)),true,t)}else{shutdown(true,t)}}));isOrBecomesErrored(r,l._closedPromise,(r=>{if(!s){shutdownWithAction((()=>ReadableStreamCancel(t,r)),true,r)}else{shutdown(true,r)}}));isOrBecomesClosed(t,a._closedPromise,(()=>{if(!n){shutdownWithAction((()=>WritableStreamDefaultWriterCloseWithErrorPropagation(l)))}else{shutdown()}}));if(WritableStreamCloseQueuedOrInFlight(r)||r._state==="closed"){const r=new TypeError("the destination writable stream closed before all data could be piped to it");if(!s){shutdownWithAction((()=>ReadableStreamCancel(t,r)),true,r)}else{shutdown(true,r)}}setPromiseIsHandledToTrue(pipeLoop());function waitForWritesToFinish(){const t=c;return PerformPromiseThen(c,(()=>t!==c?waitForWritesToFinish():undefined))}function isOrBecomesErrored(t,r,n){if(t._state==="errored"){n(t._storedError)}else{uponRejection(r,n)}}function isOrBecomesClosed(t,r,n){if(t._state==="closed"){n()}else{uponFulfillment(r,n)}}function shutdownWithAction(t,n,o){if(u){return}u=true;if(r._state==="writable"&&!WritableStreamCloseQueuedOrInFlight(r)){uponFulfillment(waitForWritesToFinish(),doTheRest)}else{doTheRest()}function doTheRest(){uponPromise(t(),(()=>finalize(n,o)),(t=>finalize(true,t)))}}function shutdown(t,n){if(u){return}u=true;if(r._state==="writable"&&!WritableStreamCloseQueuedOrInFlight(r)){uponFulfillment(waitForWritesToFinish(),(()=>finalize(t,n)))}else{finalize(t,n)}}function finalize(t,r){WritableStreamDefaultWriterRelease(l);ReadableStreamReaderGenericRelease(a);if(i!==undefined){i.removeEventListener("abort",p)}if(t){h(r)}else{d(undefined)}}}))}class ReadableStreamDefaultController{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("desiredSize")}return ReadableStreamDefaultControllerGetDesiredSize(this)}close(){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("close")}if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)){throw new TypeError("The stream is not in a state that permits close")}ReadableStreamDefaultControllerClose(this)}enqueue(t=undefined){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("enqueue")}if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)){throw new TypeError("The stream is not in a state that permits enqueue")}return ReadableStreamDefaultControllerEnqueue(this,t)}error(t=undefined){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("error")}ReadableStreamDefaultControllerError(this,t)}[p](t){ResetQueue(this);const r=this._cancelAlgorithm(t);ReadableStreamDefaultControllerClearAlgorithms(this);return r}[m](t){const r=this._controlledReadableStream;if(this._queue.length>0){const n=DequeueValue(this);if(this._closeRequested&&this._queue.length===0){ReadableStreamDefaultControllerClearAlgorithms(this);ReadableStreamClose(r)}else{ReadableStreamDefaultControllerCallPullIfNeeded(this)}t._chunkSteps(n)}else{ReadableStreamAddReadRequest(r,t);ReadableStreamDefaultControllerCallPullIfNeeded(this)}}}Object.defineProperties(ReadableStreamDefaultController.prototype,{close:{enumerable:true},enqueue:{enumerable:true},error:{enumerable:true},desiredSize:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamDefaultController.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:true})}function IsReadableStreamDefaultController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledReadableStream")){return false}return t instanceof ReadableStreamDefaultController}function ReadableStreamDefaultControllerCallPullIfNeeded(t){const r=ReadableStreamDefaultControllerShouldCallPull(t);if(!r){return}if(t._pulling){t._pullAgain=true;return}t._pulling=true;const n=t._pullAlgorithm();uponPromise(n,(()=>{t._pulling=false;if(t._pullAgain){t._pullAgain=false;ReadableStreamDefaultControllerCallPullIfNeeded(t)}}),(r=>{ReadableStreamDefaultControllerError(t,r)}))}function ReadableStreamDefaultControllerShouldCallPull(t){const r=t._controlledReadableStream;if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(t)){return false}if(!t._started){return false}if(IsReadableStreamLocked(r)&&ReadableStreamGetNumReadRequests(r)>0){return true}const n=ReadableStreamDefaultControllerGetDesiredSize(t);if(n>0){return true}return false}function ReadableStreamDefaultControllerClearAlgorithms(t){t._pullAlgorithm=undefined;t._cancelAlgorithm=undefined;t._strategySizeAlgorithm=undefined}function ReadableStreamDefaultControllerClose(t){if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(t)){return}const r=t._controlledReadableStream;t._closeRequested=true;if(t._queue.length===0){ReadableStreamDefaultControllerClearAlgorithms(t);ReadableStreamClose(r)}}function ReadableStreamDefaultControllerEnqueue(t,r){if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(t)){return}const n=t._controlledReadableStream;if(IsReadableStreamLocked(n)&&ReadableStreamGetNumReadRequests(n)>0){ReadableStreamFulfillReadRequest(n,r,false)}else{let n;try{n=t._strategySizeAlgorithm(r)}catch(r){ReadableStreamDefaultControllerError(t,r);throw r}try{EnqueueValueWithSize(t,r,n)}catch(r){ReadableStreamDefaultControllerError(t,r);throw r}}ReadableStreamDefaultControllerCallPullIfNeeded(t)}function ReadableStreamDefaultControllerError(t,r){const n=t._controlledReadableStream;if(n._state!=="readable"){return}ResetQueue(t);ReadableStreamDefaultControllerClearAlgorithms(t);ReadableStreamError(n,r)}function ReadableStreamDefaultControllerGetDesiredSize(t){const r=t._controlledReadableStream._state;if(r==="errored"){return null}if(r==="closed"){return 0}return t._strategyHWM-t._queueTotalSize}function ReadableStreamDefaultControllerHasBackpressure(t){if(ReadableStreamDefaultControllerShouldCallPull(t)){return false}return true}function ReadableStreamDefaultControllerCanCloseOrEnqueue(t){const r=t._controlledReadableStream._state;if(!t._closeRequested&&r==="readable"){return true}return false}function SetUpReadableStreamDefaultController(t,r,n,o,s,i,a){r._controlledReadableStream=t;r._queue=undefined;r._queueTotalSize=undefined;ResetQueue(r);r._started=false;r._closeRequested=false;r._pullAgain=false;r._pulling=false;r._strategySizeAlgorithm=a;r._strategyHWM=i;r._pullAlgorithm=o;r._cancelAlgorithm=s;t._readableStreamController=r;const l=n();uponPromise(promiseResolvedWith(l),(()=>{r._started=true;ReadableStreamDefaultControllerCallPullIfNeeded(r)}),(t=>{ReadableStreamDefaultControllerError(r,t)}))}function SetUpReadableStreamDefaultControllerFromUnderlyingSource(t,r,n,o){const s=Object.create(ReadableStreamDefaultController.prototype);let startAlgorithm=()=>undefined;let pullAlgorithm=()=>promiseResolvedWith(undefined);let cancelAlgorithm=()=>promiseResolvedWith(undefined);if(r.start!==undefined){startAlgorithm=()=>r.start(s)}if(r.pull!==undefined){pullAlgorithm=()=>r.pull(s)}if(r.cancel!==undefined){cancelAlgorithm=t=>r.cancel(t)}SetUpReadableStreamDefaultController(t,s,startAlgorithm,pullAlgorithm,cancelAlgorithm,n,o)}function defaultControllerBrandCheckException$1(t){return new TypeError(`ReadableStreamDefaultController.prototype.${t} can only be used on a ReadableStreamDefaultController`)}function ReadableStreamTee(t,r){if(IsReadableByteStreamController(t._readableStreamController)){return ReadableByteStreamTee(t)}return ReadableStreamDefaultTee(t)}function ReadableStreamDefaultTee(t,r){const n=AcquireReadableStreamDefaultReader(t);let o=false;let s=false;let i=false;let a;let l;let c;let d;let h;const p=newPromise((t=>{h=t}));function pullAlgorithm(){if(o){return promiseResolvedWith(undefined)}o=true;const t={_chunkSteps:t=>{u((()=>{o=false;const r=t;const n=t;if(!s){ReadableStreamDefaultControllerEnqueue(c._readableStreamController,r)}if(!i){ReadableStreamDefaultControllerEnqueue(d._readableStreamController,n)}}))},_closeSteps:()=>{o=false;if(!s){ReadableStreamDefaultControllerClose(c._readableStreamController)}if(!i){ReadableStreamDefaultControllerClose(d._readableStreamController)}if(!s||!i){h(undefined)}},_errorSteps:()=>{o=false}};ReadableStreamDefaultReaderRead(n,t);return promiseResolvedWith(undefined)}function cancel1Algorithm(r){s=true;a=r;if(i){const r=CreateArrayFromList([a,l]);const n=ReadableStreamCancel(t,r);h(n)}return p}function cancel2Algorithm(r){i=true;l=r;if(s){const r=CreateArrayFromList([a,l]);const n=ReadableStreamCancel(t,r);h(n)}return p}function startAlgorithm(){}c=CreateReadableStream(startAlgorithm,pullAlgorithm,cancel1Algorithm);d=CreateReadableStream(startAlgorithm,pullAlgorithm,cancel2Algorithm);uponRejection(n._closedPromise,(t=>{ReadableStreamDefaultControllerError(c._readableStreamController,t);ReadableStreamDefaultControllerError(d._readableStreamController,t);if(!s||!i){h(undefined)}}));return[c,d]}function ReadableByteStreamTee(t){let r=AcquireReadableStreamDefaultReader(t);let n=false;let o=false;let s=false;let i;let a;let l;let c;let d;const h=newPromise((t=>{d=t}));function forwardReaderError(t){uponRejection(t._closedPromise,(n=>{if(t!==r){return}ReadableByteStreamControllerError(l._readableStreamController,n);ReadableByteStreamControllerError(c._readableStreamController,n);if(!o||!s){d(undefined)}}))}function pullWithDefaultReader(){if(IsReadableStreamBYOBReader(r)){ReadableStreamReaderGenericRelease(r);r=AcquireReadableStreamDefaultReader(t);forwardReaderError(r)}const i={_chunkSteps:r=>{u((()=>{n=false;const i=r;let a=r;if(!o&&!s){try{a=CloneAsUint8Array(r)}catch(r){ReadableByteStreamControllerError(l._readableStreamController,r);ReadableByteStreamControllerError(c._readableStreamController,r);d(ReadableStreamCancel(t,r));return}}if(!o){ReadableByteStreamControllerEnqueue(l._readableStreamController,i)}if(!s){ReadableByteStreamControllerEnqueue(c._readableStreamController,a)}}))},_closeSteps:()=>{n=false;if(!o){ReadableByteStreamControllerClose(l._readableStreamController)}if(!s){ReadableByteStreamControllerClose(c._readableStreamController)}if(l._readableStreamController._pendingPullIntos.length>0){ReadableByteStreamControllerRespond(l._readableStreamController,0)}if(c._readableStreamController._pendingPullIntos.length>0){ReadableByteStreamControllerRespond(c._readableStreamController,0)}if(!o||!s){d(undefined)}},_errorSteps:()=>{n=false}};ReadableStreamDefaultReaderRead(r,i)}function pullWithBYOBReader(i,a){if(IsReadableStreamDefaultReader(r)){ReadableStreamReaderGenericRelease(r);r=AcquireReadableStreamBYOBReader(t);forwardReaderError(r)}const h=a?c:l;const p=a?l:c;const m={_chunkSteps:r=>{u((()=>{n=false;const i=a?s:o;const l=a?o:s;if(!l){let n;try{n=CloneAsUint8Array(r)}catch(r){ReadableByteStreamControllerError(h._readableStreamController,r);ReadableByteStreamControllerError(p._readableStreamController,r);d(ReadableStreamCancel(t,r));return}if(!i){ReadableByteStreamControllerRespondWithNewView(h._readableStreamController,r)}ReadableByteStreamControllerEnqueue(p._readableStreamController,n)}else if(!i){ReadableByteStreamControllerRespondWithNewView(h._readableStreamController,r)}}))},_closeSteps:t=>{n=false;const r=a?s:o;const i=a?o:s;if(!r){ReadableByteStreamControllerClose(h._readableStreamController)}if(!i){ReadableByteStreamControllerClose(p._readableStreamController)}if(t!==undefined){if(!r){ReadableByteStreamControllerRespondWithNewView(h._readableStreamController,t)}if(!i&&p._readableStreamController._pendingPullIntos.length>0){ReadableByteStreamControllerRespond(p._readableStreamController,0)}}if(!r||!i){d(undefined)}},_errorSteps:()=>{n=false}};ReadableStreamBYOBReaderRead(r,i,m)}function pull1Algorithm(){if(n){return promiseResolvedWith(undefined)}n=true;const t=ReadableByteStreamControllerGetBYOBRequest(l._readableStreamController);if(t===null){pullWithDefaultReader()}else{pullWithBYOBReader(t._view,false)}return promiseResolvedWith(undefined)}function pull2Algorithm(){if(n){return promiseResolvedWith(undefined)}n=true;const t=ReadableByteStreamControllerGetBYOBRequest(c._readableStreamController);if(t===null){pullWithDefaultReader()}else{pullWithBYOBReader(t._view,true)}return promiseResolvedWith(undefined)}function cancel1Algorithm(r){o=true;i=r;if(s){const r=CreateArrayFromList([i,a]);const n=ReadableStreamCancel(t,r);d(n)}return h}function cancel2Algorithm(r){s=true;a=r;if(o){const r=CreateArrayFromList([i,a]);const n=ReadableStreamCancel(t,r);d(n)}return h}function startAlgorithm(){return}l=CreateReadableByteStream(startAlgorithm,pull1Algorithm,cancel1Algorithm);c=CreateReadableByteStream(startAlgorithm,pull2Algorithm,cancel2Algorithm);forwardReaderError(r);return[l,c]}function convertUnderlyingDefaultOrByteSource(t,r){assertDictionary(t,r);const n=t;const o=n===null||n===void 0?void 0:n.autoAllocateChunkSize;const s=n===null||n===void 0?void 0:n.cancel;const i=n===null||n===void 0?void 0:n.pull;const a=n===null||n===void 0?void 0:n.start;const l=n===null||n===void 0?void 0:n.type;return{autoAllocateChunkSize:o===undefined?undefined:convertUnsignedLongLongWithEnforceRange(o,`${r} has member 'autoAllocateChunkSize' that`),cancel:s===undefined?undefined:convertUnderlyingSourceCancelCallback(s,n,`${r} has member 'cancel' that`),pull:i===undefined?undefined:convertUnderlyingSourcePullCallback(i,n,`${r} has member 'pull' that`),start:a===undefined?undefined:convertUnderlyingSourceStartCallback(a,n,`${r} has member 'start' that`),type:l===undefined?undefined:convertReadableStreamType(l,`${r} has member 'type' that`)}}function convertUnderlyingSourceCancelCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertUnderlyingSourcePullCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertUnderlyingSourceStartCallback(t,r,n){assertFunction(t,n);return n=>reflectCall(t,r,[n])}function convertReadableStreamType(t,r){t=`${t}`;if(t!=="bytes"){throw new TypeError(`${r} '${t}' is not a valid enumeration value for ReadableStreamType`)}return t}function convertReaderOptions(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.mode;return{mode:n===undefined?undefined:convertReadableStreamReaderMode(n,`${r} has member 'mode' that`)}}function convertReadableStreamReaderMode(t,r){t=`${t}`;if(t!=="byob"){throw new TypeError(`${r} '${t}' is not a valid enumeration value for ReadableStreamReaderMode`)}return t}function convertIteratorOptions(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.preventCancel;return{preventCancel:Boolean(n)}}function convertPipeOptions(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.preventAbort;const o=t===null||t===void 0?void 0:t.preventCancel;const s=t===null||t===void 0?void 0:t.preventClose;const i=t===null||t===void 0?void 0:t.signal;if(i!==undefined){assertAbortSignal(i,`${r} has member 'signal' that`)}return{preventAbort:Boolean(n),preventCancel:Boolean(o),preventClose:Boolean(s),signal:i}}function assertAbortSignal(t,r){if(!isAbortSignal(t)){throw new TypeError(`${r} is not an AbortSignal.`)}}function convertReadableWritablePair(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.readable;assertRequiredField(n,"readable","ReadableWritablePair");assertReadableStream(n,`${r} has member 'readable' that`);const o=t===null||t===void 0?void 0:t.writable;assertRequiredField(o,"writable","ReadableWritablePair");assertWritableStream(o,`${r} has member 'writable' that`);return{readable:n,writable:o}}class ReadableStream{constructor(t={},r={}){if(t===undefined){t=null}else{assertObject(t,"First parameter")}const n=convertQueuingStrategy(r,"Second parameter");const o=convertUnderlyingDefaultOrByteSource(t,"First parameter");InitializeReadableStream(this);if(o.type==="bytes"){if(n.size!==undefined){throw new RangeError("The strategy for a byte stream cannot have a size function")}const t=ExtractHighWaterMark(n,0);SetUpReadableByteStreamControllerFromUnderlyingSource(this,o,t)}else{const t=ExtractSizeAlgorithm(n);const r=ExtractHighWaterMark(n,1);SetUpReadableStreamDefaultControllerFromUnderlyingSource(this,o,r,t)}}get locked(){if(!IsReadableStream(this)){throw streamBrandCheckException$1("locked")}return IsReadableStreamLocked(this)}cancel(t=undefined){if(!IsReadableStream(this)){return promiseRejectedWith(streamBrandCheckException$1("cancel"))}if(IsReadableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot cancel a stream that already has a reader"))}return ReadableStreamCancel(this,t)}getReader(t=undefined){if(!IsReadableStream(this)){throw streamBrandCheckException$1("getReader")}const r=convertReaderOptions(t,"First parameter");if(r.mode===undefined){return AcquireReadableStreamDefaultReader(this)}return AcquireReadableStreamBYOBReader(this)}pipeThrough(t,r={}){if(!IsReadableStream(this)){throw streamBrandCheckException$1("pipeThrough")}assertRequiredArgument(t,1,"pipeThrough");const n=convertReadableWritablePair(t,"First parameter");const o=convertPipeOptions(r,"Second parameter");if(IsReadableStreamLocked(this)){throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream")}if(IsWritableStreamLocked(n.writable)){throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream")}const s=ReadableStreamPipeTo(this,n.writable,o.preventClose,o.preventAbort,o.preventCancel,o.signal);setPromiseIsHandledToTrue(s);return n.readable}pipeTo(t,r={}){if(!IsReadableStream(this)){return promiseRejectedWith(streamBrandCheckException$1("pipeTo"))}if(t===undefined){return promiseRejectedWith(`Parameter 1 is required in 'pipeTo'.`)}if(!IsWritableStream(t)){return promiseRejectedWith(new TypeError(`ReadableStream.prototype.pipeTo's first argument must be a WritableStream`))}let n;try{n=convertPipeOptions(r,"Second parameter")}catch(t){return promiseRejectedWith(t)}if(IsReadableStreamLocked(this)){return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"))}if(IsWritableStreamLocked(t)){return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"))}return ReadableStreamPipeTo(this,t,n.preventClose,n.preventAbort,n.preventCancel,n.signal)}tee(){if(!IsReadableStream(this)){throw streamBrandCheckException$1("tee")}const t=ReadableStreamTee(this);return CreateArrayFromList(t)}values(t=undefined){if(!IsReadableStream(this)){throw streamBrandCheckException$1("values")}const r=convertIteratorOptions(t,"First parameter");return AcquireReadableStreamAsyncIterator(this,r.preventCancel)}}Object.defineProperties(ReadableStream.prototype,{cancel:{enumerable:true},getReader:{enumerable:true},pipeThrough:{enumerable:true},pipeTo:{enumerable:true},tee:{enumerable:true},values:{enumerable:true},locked:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStream.prototype,r.toStringTag,{value:"ReadableStream",configurable:true})}if(typeof r.asyncIterator==="symbol"){Object.defineProperty(ReadableStream.prototype,r.asyncIterator,{value:ReadableStream.prototype.values,writable:true,configurable:true})}function CreateReadableStream(t,r,n,o=1,s=(()=>1)){const i=Object.create(ReadableStream.prototype);InitializeReadableStream(i);const a=Object.create(ReadableStreamDefaultController.prototype);SetUpReadableStreamDefaultController(i,a,t,r,n,o,s);return i}function CreateReadableByteStream(t,r,n){const o=Object.create(ReadableStream.prototype);InitializeReadableStream(o);const s=Object.create(ReadableByteStreamController.prototype);SetUpReadableByteStreamController(o,s,t,r,n,0,undefined);return o}function InitializeReadableStream(t){t._state="readable";t._reader=undefined;t._storedError=undefined;t._disturbed=false}function IsReadableStream(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_readableStreamController")){return false}return t instanceof ReadableStream}function IsReadableStreamLocked(t){if(t._reader===undefined){return false}return true}function ReadableStreamCancel(t,r){t._disturbed=true;if(t._state==="closed"){return promiseResolvedWith(undefined)}if(t._state==="errored"){return promiseRejectedWith(t._storedError)}ReadableStreamClose(t);const n=t._reader;if(n!==undefined&&IsReadableStreamBYOBReader(n)){n._readIntoRequests.forEach((t=>{t._closeSteps(undefined)}));n._readIntoRequests=new SimpleQueue}const o=t._readableStreamController[p](r);return transformPromiseWith(o,noop)}function ReadableStreamClose(t){t._state="closed";const r=t._reader;if(r===undefined){return}defaultReaderClosedPromiseResolve(r);if(IsReadableStreamDefaultReader(r)){r._readRequests.forEach((t=>{t._closeSteps()}));r._readRequests=new SimpleQueue}}function ReadableStreamError(t,r){t._state="errored";t._storedError=r;const n=t._reader;if(n===undefined){return}defaultReaderClosedPromiseReject(n,r);if(IsReadableStreamDefaultReader(n)){n._readRequests.forEach((t=>{t._errorSteps(r)}));n._readRequests=new SimpleQueue}else{n._readIntoRequests.forEach((t=>{t._errorSteps(r)}));n._readIntoRequests=new SimpleQueue}}function streamBrandCheckException$1(t){return new TypeError(`ReadableStream.prototype.${t} can only be used on a ReadableStream`)}function convertQueuingStrategyInit(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.highWaterMark;assertRequiredField(n,"highWaterMark","QueuingStrategyInit");return{highWaterMark:convertUnrestrictedDouble(n)}}const byteLengthSizeFunction=t=>t.byteLength;Object.defineProperty(byteLengthSizeFunction,"name",{value:"size",configurable:true});class ByteLengthQueuingStrategy{constructor(t){assertRequiredArgument(t,1,"ByteLengthQueuingStrategy");t=convertQueuingStrategyInit(t,"First parameter");this._byteLengthQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!IsByteLengthQueuingStrategy(this)){throw byteLengthBrandCheckException("highWaterMark")}return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!IsByteLengthQueuingStrategy(this)){throw byteLengthBrandCheckException("size")}return byteLengthSizeFunction}}Object.defineProperties(ByteLengthQueuingStrategy.prototype,{highWaterMark:{enumerable:true},size:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ByteLengthQueuingStrategy.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:true})}function byteLengthBrandCheckException(t){return new TypeError(`ByteLengthQueuingStrategy.prototype.${t} can only be used on a ByteLengthQueuingStrategy`)}function IsByteLengthQueuingStrategy(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_byteLengthQueuingStrategyHighWaterMark")){return false}return t instanceof ByteLengthQueuingStrategy}const countSizeFunction=()=>1;Object.defineProperty(countSizeFunction,"name",{value:"size",configurable:true});class CountQueuingStrategy{constructor(t){assertRequiredArgument(t,1,"CountQueuingStrategy");t=convertQueuingStrategyInit(t,"First parameter");this._countQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!IsCountQueuingStrategy(this)){throw countBrandCheckException("highWaterMark")}return this._countQueuingStrategyHighWaterMark}get size(){if(!IsCountQueuingStrategy(this)){throw countBrandCheckException("size")}return countSizeFunction}}Object.defineProperties(CountQueuingStrategy.prototype,{highWaterMark:{enumerable:true},size:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(CountQueuingStrategy.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:true})}function countBrandCheckException(t){return new TypeError(`CountQueuingStrategy.prototype.${t} can only be used on a CountQueuingStrategy`)}function IsCountQueuingStrategy(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_countQueuingStrategyHighWaterMark")){return false}return t instanceof CountQueuingStrategy}function convertTransformer(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.flush;const o=t===null||t===void 0?void 0:t.readableType;const s=t===null||t===void 0?void 0:t.start;const i=t===null||t===void 0?void 0:t.transform;const a=t===null||t===void 0?void 0:t.writableType;return{flush:n===undefined?undefined:convertTransformerFlushCallback(n,t,`${r} has member 'flush' that`),readableType:o,start:s===undefined?undefined:convertTransformerStartCallback(s,t,`${r} has member 'start' that`),transform:i===undefined?undefined:convertTransformerTransformCallback(i,t,`${r} has member 'transform' that`),writableType:a}}function convertTransformerFlushCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertTransformerStartCallback(t,r,n){assertFunction(t,n);return n=>reflectCall(t,r,[n])}function convertTransformerTransformCallback(t,r,n){assertFunction(t,n);return(n,o)=>promiseCall(t,r,[n,o])}class TransformStream{constructor(t={},r={},n={}){if(t===undefined){t=null}const o=convertQueuingStrategy(r,"Second parameter");const s=convertQueuingStrategy(n,"Third parameter");const i=convertTransformer(t,"First parameter");if(i.readableType!==undefined){throw new RangeError("Invalid readableType specified")}if(i.writableType!==undefined){throw new RangeError("Invalid writableType specified")}const a=ExtractHighWaterMark(s,0);const l=ExtractSizeAlgorithm(s);const u=ExtractHighWaterMark(o,1);const c=ExtractSizeAlgorithm(o);let d;const h=newPromise((t=>{d=t}));InitializeTransformStream(this,h,u,c,a,l);SetUpTransformStreamDefaultControllerFromTransformer(this,i);if(i.start!==undefined){d(i.start(this._transformStreamController))}else{d(undefined)}}get readable(){if(!IsTransformStream(this)){throw streamBrandCheckException("readable")}return this._readable}get writable(){if(!IsTransformStream(this)){throw streamBrandCheckException("writable")}return this._writable}}Object.defineProperties(TransformStream.prototype,{readable:{enumerable:true},writable:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(TransformStream.prototype,r.toStringTag,{value:"TransformStream",configurable:true})}function InitializeTransformStream(t,r,n,o,s,i){function startAlgorithm(){return r}function writeAlgorithm(r){return TransformStreamDefaultSinkWriteAlgorithm(t,r)}function abortAlgorithm(r){return TransformStreamDefaultSinkAbortAlgorithm(t,r)}function closeAlgorithm(){return TransformStreamDefaultSinkCloseAlgorithm(t)}t._writable=CreateWritableStream(startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,n,o);function pullAlgorithm(){return TransformStreamDefaultSourcePullAlgorithm(t)}function cancelAlgorithm(r){TransformStreamErrorWritableAndUnblockWrite(t,r);return promiseResolvedWith(undefined)}t._readable=CreateReadableStream(startAlgorithm,pullAlgorithm,cancelAlgorithm,s,i);t._backpressure=undefined;t._backpressureChangePromise=undefined;t._backpressureChangePromise_resolve=undefined;TransformStreamSetBackpressure(t,true);t._transformStreamController=undefined}function IsTransformStream(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_transformStreamController")){return false}return t instanceof TransformStream}function TransformStreamError(t,r){ReadableStreamDefaultControllerError(t._readable._readableStreamController,r);TransformStreamErrorWritableAndUnblockWrite(t,r)}function TransformStreamErrorWritableAndUnblockWrite(t,r){TransformStreamDefaultControllerClearAlgorithms(t._transformStreamController);WritableStreamDefaultControllerErrorIfNeeded(t._writable._writableStreamController,r);if(t._backpressure){TransformStreamSetBackpressure(t,false)}}function TransformStreamSetBackpressure(t,r){if(t._backpressureChangePromise!==undefined){t._backpressureChangePromise_resolve()}t._backpressureChangePromise=newPromise((r=>{t._backpressureChangePromise_resolve=r}));t._backpressure=r}class TransformStreamDefaultController{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("desiredSize")}const t=this._controlledTransformStream._readable._readableStreamController;return ReadableStreamDefaultControllerGetDesiredSize(t)}enqueue(t=undefined){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("enqueue")}TransformStreamDefaultControllerEnqueue(this,t)}error(t=undefined){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("error")}TransformStreamDefaultControllerError(this,t)}terminate(){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("terminate")}TransformStreamDefaultControllerTerminate(this)}}Object.defineProperties(TransformStreamDefaultController.prototype,{enqueue:{enumerable:true},error:{enumerable:true},terminate:{enumerable:true},desiredSize:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(TransformStreamDefaultController.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:true})}function IsTransformStreamDefaultController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledTransformStream")){return false}return t instanceof TransformStreamDefaultController}function SetUpTransformStreamDefaultController(t,r,n,o){r._controlledTransformStream=t;t._transformStreamController=r;r._transformAlgorithm=n;r._flushAlgorithm=o}function SetUpTransformStreamDefaultControllerFromTransformer(t,r){const n=Object.create(TransformStreamDefaultController.prototype);let transformAlgorithm=t=>{try{TransformStreamDefaultControllerEnqueue(n,t);return promiseResolvedWith(undefined)}catch(t){return promiseRejectedWith(t)}};let flushAlgorithm=()=>promiseResolvedWith(undefined);if(r.transform!==undefined){transformAlgorithm=t=>r.transform(t,n)}if(r.flush!==undefined){flushAlgorithm=()=>r.flush(n)}SetUpTransformStreamDefaultController(t,n,transformAlgorithm,flushAlgorithm)}function TransformStreamDefaultControllerClearAlgorithms(t){t._transformAlgorithm=undefined;t._flushAlgorithm=undefined}function TransformStreamDefaultControllerEnqueue(t,r){const n=t._controlledTransformStream;const o=n._readable._readableStreamController;if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(o)){throw new TypeError("Readable side is not in a state that permits enqueue")}try{ReadableStreamDefaultControllerEnqueue(o,r)}catch(t){TransformStreamErrorWritableAndUnblockWrite(n,t);throw n._readable._storedError}const s=ReadableStreamDefaultControllerHasBackpressure(o);if(s!==n._backpressure){TransformStreamSetBackpressure(n,true)}}function TransformStreamDefaultControllerError(t,r){TransformStreamError(t._controlledTransformStream,r)}function TransformStreamDefaultControllerPerformTransform(t,r){const n=t._transformAlgorithm(r);return transformPromiseWith(n,undefined,(r=>{TransformStreamError(t._controlledTransformStream,r);throw r}))}function TransformStreamDefaultControllerTerminate(t){const r=t._controlledTransformStream;const n=r._readable._readableStreamController;ReadableStreamDefaultControllerClose(n);const o=new TypeError("TransformStream terminated");TransformStreamErrorWritableAndUnblockWrite(r,o)}function TransformStreamDefaultSinkWriteAlgorithm(t,r){const n=t._transformStreamController;if(t._backpressure){const o=t._backpressureChangePromise;return transformPromiseWith(o,(()=>{const o=t._writable;const s=o._state;if(s==="erroring"){throw o._storedError}return TransformStreamDefaultControllerPerformTransform(n,r)}))}return TransformStreamDefaultControllerPerformTransform(n,r)}function TransformStreamDefaultSinkAbortAlgorithm(t,r){TransformStreamError(t,r);return promiseResolvedWith(undefined)}function TransformStreamDefaultSinkCloseAlgorithm(t){const r=t._readable;const n=t._transformStreamController;const o=n._flushAlgorithm();TransformStreamDefaultControllerClearAlgorithms(n);return transformPromiseWith(o,(()=>{if(r._state==="errored"){throw r._storedError}ReadableStreamDefaultControllerClose(r._readableStreamController)}),(n=>{TransformStreamError(t,n);throw r._storedError}))}function TransformStreamDefaultSourcePullAlgorithm(t){TransformStreamSetBackpressure(t,false);return t._backpressureChangePromise}function defaultControllerBrandCheckException(t){return new TypeError(`TransformStreamDefaultController.prototype.${t} can only be used on a TransformStreamDefaultController`)}function streamBrandCheckException(t){return new TypeError(`TransformStream.prototype.${t} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=ByteLengthQueuingStrategy;t.CountQueuingStrategy=CountQueuingStrategy;t.ReadableByteStreamController=ReadableByteStreamController;t.ReadableStream=ReadableStream;t.ReadableStreamBYOBReader=ReadableStreamBYOBReader;t.ReadableStreamBYOBRequest=ReadableStreamBYOBRequest;t.ReadableStreamDefaultController=ReadableStreamDefaultController;t.ReadableStreamDefaultReader=ReadableStreamDefaultReader;t.TransformStream=TransformStream;t.TransformStreamDefaultController=TransformStreamDefaultController;t.WritableStream=WritableStream;t.WritableStreamDefaultController=WritableStreamDefaultController;t.WritableStreamDefaultWriter=WritableStreamDefaultWriter;Object.defineProperty(t,"__esModule",{value:true})}))},9491:r=>{r.exports=t(import.meta.url)("assert")},4300:r=>{r.exports=t(import.meta.url)("buffer")},2361:r=>{r.exports=t(import.meta.url)("events")},7147:r=>{r.exports=t(import.meta.url)("fs")},1808:r=>{r.exports=t(import.meta.url)("net")},7742:r=>{r.exports=t(import.meta.url)("node:process")},2477:r=>{r.exports=t(import.meta.url)("node:stream/web")},2037:r=>{r.exports=t(import.meta.url)("os")},1017:r=>{r.exports=t(import.meta.url)("path")},4404:r=>{r.exports=t(import.meta.url)("tls")},6224:r=>{r.exports=t(import.meta.url)("tty")},7310:r=>{r.exports=t(import.meta.url)("url")},3837:r=>{r.exports=t(import.meta.url)("util")},1267:r=>{r.exports=t(import.meta.url)("worker_threads")},8572:(t,r,n)=>{const o=65536;if(!globalThis.ReadableStream){try{const t=n(7742);const{emitWarning:r}=t;try{t.emitWarning=()=>{};Object.assign(globalThis,n(2477));t.emitWarning=r}catch(n){t.emitWarning=r;throw n}}catch(t){Object.assign(globalThis,n(1452))}}try{const{Blob:t}=n(4300);if(t&&!t.prototype.stream){t.prototype.stream=function name(t){let r=0;const n=this;return new ReadableStream({type:"bytes",async pull(t){const s=n.slice(r,Math.min(n.size,r+o));const i=await s.arrayBuffer();r+=i.byteLength;t.enqueue(new Uint8Array(i));if(r===n.size){t.close()}}})}}}catch(t){}},3213:(t,r,n)=>{n.d(r,{Z:()=>a});var o=n(1410);const s=class File extends o.Z{#e=0;#t="";constructor(t,r,n={}){if(arguments.length<2){throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`)}super(t,n);if(n===null)n={};const o=n.lastModified===undefined?Date.now():Number(n.lastModified);if(!Number.isNaN(o)){this.#e=o}this.#t=String(r)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](t){return!!t&&t instanceof o.Z&&/^(File)$/.test(t[Symbol.toStringTag])}};const i=s;const a=i},2777:(r,n,o)=>{o.d(n,{$B:()=>l.Z});const s=t(import.meta.url)("node:fs");const i=t(import.meta.url)("node:path");var a=o(7760);var l=o(3213);var u=o(1410);const{stat:c}=s.promises;const blobFromSync=(t,r)=>fromBlob(statSync(t),t,r);const blobFrom=(t,r)=>c(t).then((n=>fromBlob(n,t,r)));const fileFrom=(t,r)=>c(t).then((n=>fromFile(n,t,r)));const fileFromSync=(t,r)=>fromFile(statSync(t),t,r);const fromBlob=(t,r,n="")=>new Blob([new BlobDataItem({path:r,size:t.size,lastModified:t.mtimeMs,start:0})],{type:n});const fromFile=(t,r,n="")=>new File([new BlobDataItem({path:r,size:t.size,lastModified:t.mtimeMs,start:0})],basename(r),{type:n,lastModified:t.mtimeMs});class BlobDataItem{#r;#n;constructor(t){this.#r=t.path;this.#n=t.start;this.size=t.size;this.lastModified=t.lastModified}slice(t,r){return new BlobDataItem({path:this.#r,lastModified:this.lastModified,size:r-t,start:this.#n+t})}async*stream(){const{mtimeMs:t}=await c(this.#r);if(t>this.lastModified){throw new DOMException("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError")}yield*createReadStream(this.#r,{start:this.#n,end:this.#n+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}const d=null&&blobFromSync},1410:(t,r,n)=>{n.d(r,{Z:()=>l});var o=n(8572);const s=65536;async function*toIterator(t,r=true){for(const n of t){if("stream"in n){yield*n.stream()}else if(ArrayBuffer.isView(n)){if(r){let t=n.byteOffset;const r=n.byteOffset+n.byteLength;while(t!==r){const o=Math.min(r-t,s);const i=n.buffer.slice(t,t+o);t+=i.byteLength;yield new Uint8Array(i)}}else{yield n}}else{let t=0,r=n;while(t!==r.size){const n=r.slice(t,Math.min(r.size,t+s));const o=await n.arrayBuffer();t+=o.byteLength;yield new Uint8Array(o)}}}}const i=class Blob{#o=[];#s="";#i=0;#a="transparent";constructor(t=[],r={}){if(typeof t!=="object"||t===null){throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.")}if(typeof t[Symbol.iterator]!=="function"){throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.")}if(typeof r!=="object"&&typeof r!=="function"){throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.")}if(r===null)r={};const n=new TextEncoder;for(const r of t){let t;if(ArrayBuffer.isView(r)){t=new Uint8Array(r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength))}else if(r instanceof ArrayBuffer){t=new Uint8Array(r.slice(0))}else if(r instanceof Blob){t=r}else{t=n.encode(`${r}`)}this.#i+=ArrayBuffer.isView(t)?t.byteLength:t.size;this.#o.push(t)}this.#a=`${r.endings===undefined?"transparent":r.endings}`;const o=r.type===undefined?"":String(r.type);this.#s=/^[\x20-\x7E]*$/.test(o)?o:""}get size(){return this.#i}get type(){return this.#s}async text(){const t=new TextDecoder;let r="";for await(const n of toIterator(this.#o,false)){r+=t.decode(n,{stream:true})}r+=t.decode();return r}async arrayBuffer(){const t=new Uint8Array(this.size);let r=0;for await(const n of toIterator(this.#o,false)){t.set(n,r);r+=n.length}return t.buffer}stream(){const t=toIterator(this.#o,true);return new globalThis.ReadableStream({type:"bytes",async pull(r){const n=await t.next();n.done?r.close():r.enqueue(n.value)},async cancel(){await t.return()}})}slice(t=0,r=this.size,n=""){const{size:o}=this;let s=t<0?Math.max(o+t,0):Math.min(t,o);let i=r<0?Math.max(o+r,0):Math.min(r,o);const a=Math.max(i-s,0);const l=this.#o;const u=[];let c=0;for(const t of l){if(c>=a){break}const r=ArrayBuffer.isView(t)?t.byteLength:t.size;if(s&&r<=s){s-=r;i-=r}else{let n;if(ArrayBuffer.isView(t)){n=t.subarray(s,Math.min(r,i));c+=n.byteLength}else{n=t.slice(s,Math.min(r,i));c+=n.size}i-=r;u.push(n);s=0}}const d=new Blob([],{type:String(n).toLowerCase()});d.#i=a;d.#o=u;return d}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](t){return t&&typeof t==="object"&&typeof t.constructor==="function"&&(typeof t.stream==="function"||typeof t.arrayBuffer==="function")&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}};Object.defineProperties(i.prototype,{size:{enumerable:true},type:{enumerable:true},slice:{enumerable:true}});const a=i;const l=a},8010:(t,r,n)=>{n.d(r,{Ct:()=>h,au:()=>formDataToBlob});var o=n(1410);var s=n(3213);var{toStringTag:i,iterator:a,hasInstance:l}=Symbol,u=Math.random,c="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),f=(t,r,n)=>(t+="",/^(Blob|File)$/.test(r&&r[i])?[(n=n!==void 0?n+"":r[i]=="File"?r.name:"blob",t),r.name!==n||r[i]=="blob"?new s.Z([r],n,r):r]:[t,r+""]),e=(t,r)=>(r?t:t.replace(/\r?\n|\r/g,"\r\n")).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),x=(t,r,n)=>{if(r.length<n){throw new TypeError(`Failed to execute '${t}' on 'FormData': ${n} arguments required, but only ${r.length} present.`)}};const d=null&&F;const h=class FormData{#l=[];constructor(...t){if(t.length)throw new TypeError(`Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.`)}get[i](){return"FormData"}[a](){return this.entries()}static[l](t){return t&&typeof t==="object"&&t[i]==="FormData"&&!c.some((r=>typeof t[r]!="function"))}append(...t){x("append",arguments,2);this.#l.push(f(...t))}delete(t){x("delete",arguments,1);t+="";this.#l=this.#l.filter((([r])=>r!==t))}get(t){x("get",arguments,1);t+="";for(var r=this.#l,n=r.length,o=0;o<n;o++)if(r[o][0]===t)return r[o][1];return null}getAll(t,r){x("getAll",arguments,1);r=[];t+="";this.#l.forEach((n=>n[0]===t&&r.push(n[1])));return r}has(t){x("has",arguments,1);t+="";return this.#l.some((r=>r[0]===t))}forEach(t,r){x("forEach",arguments,1);for(var[n,o]of this)t.call(r,o,n,this)}set(...t){x("set",arguments,2);var r=[],n=!0;t=f(...t);this.#l.forEach((o=>{o[0]===t[0]?n&&(n=!r.push(t)):r.push(o)}));n&&r.push(t);this.#l=r}*entries(){yield*this.#l}*keys(){for(var[t]of this)yield t}*values(){for(var[,t]of this)yield t}};function formDataToBlob(t,r=o.Z){var n=`${u()}${u()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),s=[],i=`--${n}\r\nContent-Disposition: form-data; name="`;t.forEach(((t,r)=>typeof t=="string"?s.push(i+e(r)+`"\r\n\r\n${t.replace(/\r(?!\n)|(?<!\r)\n/g,"\r\n")}\r\n`):s.push(i+e(r)+`"; filename="${e(t.name,1)}"\r\nContent-Type: ${t.type||"application/octet-stream"}\r\n\r\n`,t,"\r\n")));s.push(`--${n}--`);return new r(s,{type:"multipart/form-data; boundary="+n})}}};var n={};function __nccwpck_require__(t){var o=n[t];if(o!==undefined){return o.exports}var s=n[t]={exports:{}};var i=true;try{r[t].call(s.exports,s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete n[t]}return s.exports}__nccwpck_require__.m=r;(()=>{__nccwpck_require__.d=(t,r)=>{for(var n in r){if(__nccwpck_require__.o(r,n)&&!__nccwpck_require__.o(t,n)){Object.defineProperty(t,n,{enumerable:true,get:r[n]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=t=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((r,n)=>{__nccwpck_require__.f[n](t,r);return r}),[]))})();(()=>{__nccwpck_require__.u=t=>""+t+".index.js"})();(()=>{__nccwpck_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=new URL(".",import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/)?1:0,-1)+"/";(()=>{var t={179:0};var installChunk=r=>{var{ids:n,modules:o,runtime:s}=r;var i,a,l=0;for(i in o){if(__nccwpck_require__.o(o,i)){__nccwpck_require__.m[i]=o[i]}}if(s)s(__nccwpck_require__);for(;l<n.length;l++){a=n[l];if(__nccwpck_require__.o(t,a)&&t[a]){t[a][0]()}t[n[l]]=0}};__nccwpck_require__.f.j=(r,n)=>{var o=__nccwpck_require__.o(t,r)?t[r]:undefined;if(o!==0){if(o){n.push(o[1])}else{if(true){var s=import("./"+__nccwpck_require__.u(r)).then(installChunk,(n=>{if(t[r]!==0)t[r]=undefined;throw n}));var s=Promise.race([s,new Promise((n=>o=t[r]=[n]))]);n.push(o[1]=s)}else t[r]=0}}}})();var o={};(()=>{function ansiRegex({onlyFirst:t=false}={}){const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,t?undefined:"g")}const r=t(import.meta.url)("dns");var n=__nccwpck_require__(3764);var o=__nccwpck_require__(7219);class QuickLRU{constructor(t={}){if(!(t.maxSize&&t.maxSize>0)){throw new TypeError("`maxSize` must be a number greater than 0")}if(typeof t.maxAge==="number"&&t.maxAge===0){throw new TypeError("`maxAge` must be a number greater than 0")}this.maxSize=t.maxSize;this.maxAge=t.maxAge||Number.POSITIVE_INFINITY;this.onEviction=t.onEviction;this.cache=new Map;this.oldCache=new Map;this._size=0}_emitEvictions(t){if(typeof this.onEviction!=="function"){return}for(const[r,n]of t){this.onEviction(r,n.value)}}_deleteIfExpired(t,r){if(typeof r.expiry==="number"&&r.expiry<=Date.now()){if(typeof this.onEviction==="function"){this.onEviction(t,r.value)}return this.delete(t)}return false}_getOrDeleteIfExpired(t,r){const n=this._deleteIfExpired(t,r);if(n===false){return r.value}}_getItemValue(t,r){return r.expiry?this._getOrDeleteIfExpired(t,r):r.value}_peek(t,r){const n=r.get(t);return this._getItemValue(t,n)}_set(t,r){this.cache.set(t,r);this._size++;if(this._size>=this.maxSize){this._size=0;this._emitEvictions(this.oldCache);this.oldCache=this.cache;this.cache=new Map}}_moveToRecent(t,r){this.oldCache.delete(t);this._set(t,r)}*_entriesAscending(){for(const t of this.oldCache){const[r,n]=t;if(!this.cache.has(r)){const o=this._deleteIfExpired(r,n);if(o===false){yield t}}}for(const t of this.cache){const[r,n]=t;const o=this._deleteIfExpired(r,n);if(o===false){yield t}}}get(t){if(this.cache.has(t)){const r=this.cache.get(t);return this._getItemValue(t,r)}if(this.oldCache.has(t)){const r=this.oldCache.get(t);if(this._deleteIfExpired(t,r)===false){this._moveToRecent(t,r);return r.value}}}set(t,r,{maxAge:n=this.maxAge}={}){const o=typeof n==="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:undefined;if(this.cache.has(t)){this.cache.set(t,{value:r,expiry:o})}else{this._set(t,{value:r,expiry:o})}}has(t){if(this.cache.has(t)){return!this._deleteIfExpired(t,this.cache.get(t))}if(this.oldCache.has(t)){return!this._deleteIfExpired(t,this.oldCache.get(t))}return false}peek(t){if(this.cache.has(t)){return this._peek(t,this.cache)}if(this.oldCache.has(t)){return this._peek(t,this.oldCache)}}delete(t){const r=this.cache.delete(t);if(r){this._size--}return this.oldCache.delete(t)||r}clear(){this.cache.clear();this.oldCache.clear();this._size=0}resize(t){if(!(t&&t>0)){throw new TypeError("`maxSize` must be a number greater than 0")}const r=[...this._entriesAscending()];const n=r.length-t;if(n<0){this.cache=new Map(r);this.oldCache=new Map;this._size=r.length}else{if(n>0){this._emitEvictions(r.slice(0,n))}this.oldCache=new Map(r.slice(n));this.cache=new Map;this._size=0}this.maxSize=t}*keys(){for(const[t]of this){yield t}}*values(){for(const[,t]of this){yield t}}*[Symbol.iterator](){for(const t of this.cache){const[r,n]=t;const o=this._deleteIfExpired(r,n);if(o===false){yield[r,n.value]}}for(const t of this.oldCache){const[r,n]=t;if(!this.cache.has(r)){const t=this._deleteIfExpired(r,n);if(t===false){yield[r,n.value]}}}}*entriesDescending(){let t=[...this.cache];for(let r=t.length-1;r>=0;--r){const n=t[r];const[o,s]=n;const i=this._deleteIfExpired(o,s);if(i===false){yield[o,s.value]}}t=[...this.oldCache];for(let r=t.length-1;r>=0;--r){const n=t[r];const[o,s]=n;if(!this.cache.has(o)){const t=this._deleteIfExpired(o,s);if(t===false){yield[o,s.value]}}}}*entriesAscending(){for(const[t,r]of this._entriesAscending()){yield[t,r.value]}}get size(){if(!this._size){return this.oldCache.size}let t=0;for(const r of this.oldCache.keys()){if(!this.cache.has(r)){t++}}return Math.min(this._size+t,this.maxSize)}}var s=__nccwpck_require__(3329);const i=t(import.meta.url)("http");const a=t(import.meta.url)("https");const l={agentCacheSize:512};const u={maxSockets:64,keepAlive:false};class TimeoutError extends Error{constructor(t){super(t);this.name="TimeoutError";Error.captureStackTrace(this,TimeoutError)}}function fetchEnhanced(t,r={}){const c={...l,...r};const d=new QuickLRU({maxSize:c.agentCacheSize});function getAgent(t,r={}){const{origin:l,protocol:u}=new URL(t);const c=JSON.stringify({origin:l,...r});if(d.peek(c))return d.get(c);let h;const p=u==="https:";const m=(0,s.j)(t);if(m){const{protocol:t,username:s,password:i,hostname:a,port:l,pathname:u,search:c,hash:d}=new URL(m);h=new(p?o:n)({protocol:t,port:l,hostname:a.replace(/^\[/,"").replace(/\]$/,""),path:`${u}${c}${d}`,auth:s&&i?`${s}:${i}`:s?s:null,...r})}else{h=new(p?a.Agent:i.Agent)(r);if("maxSockets"in r){h.maxSockets=r.maxSockets}}d.set(c,h);return h}const fetch=(r,{timeout:n=0,agentOpts:o={},...s}={})=>new Promise(((i,a)=>{if(!("agent"in s)){s.agent=getAgent(r,{...u,...o})}let l;if(n){l=setTimeout((()=>{const t=new TimeoutError(`${s.method||"GET"} ${r} timed out after ${n}ms`);a(t)}),n)}t(r,s).then((t=>{if(l)clearTimeout(l);i(t)})).catch((t=>{if(l)clearTimeout(l);if(t.name==="AbortError")return i(null);a(t)}))}));fetch.clearCache=()=>{for(const t of d.values()){if("destroy"in t)t.destroy()}d.clear()};return fetch}var c=__nccwpck_require__(5871);const d=t(import.meta.url)("node:http");const h=t(import.meta.url)("node:https");const p=t(import.meta.url)("node:zlib");const m=t(import.meta.url)("node:stream");const b=t(import.meta.url)("node:buffer");function dataUriToBuffer(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,"");const r=t.indexOf(",");if(r===-1||r<=4){throw new TypeError("malformed data: URI")}const n=t.substring(5,r).split(";");let o="";let s=false;const i=n[0]||"text/plain";let a=i;for(let t=1;t<n.length;t++){if(n[t]==="base64"){s=true}else{a+=`;${n[t]}`;if(n[t].indexOf("charset=")===0){o=n[t].substring(8)}}}if(!n[0]&&!o.length){a+=";charset=US-ASCII";o="US-ASCII"}const l=s?"base64":"ascii";const u=unescape(t.substring(r+1));const c=Buffer.from(u,l);c.type=i;c.typeFull=a;c.charset=o;return c}const g=dataUriToBuffer;const y=t(import.meta.url)("node:util");var S=__nccwpck_require__(1410);var R=__nccwpck_require__(8010);class FetchBaseError extends Error{constructor(t,r){super(t);Error.captureStackTrace(this,this.constructor);this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}class FetchError extends FetchBaseError{constructor(t,r,n){super(t,r);if(n){this.code=this.errno=n.code;this.erroredSysCall=n.syscall}}}const _=Symbol.toStringTag;const isURLSearchParameters=t=>typeof t==="object"&&typeof t.append==="function"&&typeof t.delete==="function"&&typeof t.get==="function"&&typeof t.getAll==="function"&&typeof t.has==="function"&&typeof t.set==="function"&&typeof t.sort==="function"&&t[_]==="URLSearchParams";const isBlob=t=>t&&typeof t==="object"&&typeof t.arrayBuffer==="function"&&typeof t.type==="string"&&typeof t.stream==="function"&&typeof t.constructor==="function"&&/^(Blob|File)$/.test(t[_]);const isAbortSignal=t=>typeof t==="object"&&(t[_]==="AbortSignal"||t[_]==="EventTarget");const isDomainOrSubdomain=(t,r)=>{const n=new URL(r).hostname;const o=new URL(t).hostname;return n===o||n.endsWith(`.${o}`)};const w=(0,y.promisify)(m.pipeline);const C=Symbol("Body internals");class Body{constructor(t,{size:r=0}={}){let n=null;if(t===null){t=null}else if(isURLSearchParameters(t)){t=b.Buffer.from(t.toString())}else if(isBlob(t)){}else if(b.Buffer.isBuffer(t)){}else if(y.types.isAnyArrayBuffer(t)){t=b.Buffer.from(t)}else if(ArrayBuffer.isView(t)){t=b.Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(t instanceof m){}else if(t instanceof R.Ct){t=(0,R.au)(t);n=t.type.split("=")[1]}else{t=b.Buffer.from(String(t))}let o=t;if(b.Buffer.isBuffer(t)){o=m.Readable.from(t)}else if(isBlob(t)){o=m.Readable.from(t.stream())}this[C]={body:t,stream:o,boundary:n,disturbed:false,error:null};this.size=r;if(t instanceof m){t.on("error",(t=>{const r=t instanceof FetchBaseError?t:new FetchError(`Invalid response body while trying to fetch ${this.url}: ${t.message}`,"system",t);this[C].error=r}))}}get body(){return this[C].stream}get bodyUsed(){return this[C].disturbed}async arrayBuffer(){const{buffer:t,byteOffset:r,byteLength:n}=await consumeBody(this);return t.slice(r,r+n)}async formData(){const t=this.headers.get("content-type");if(t.startsWith("application/x-www-form-urlencoded")){const t=new R.Ct;const r=new URLSearchParams(await this.text());for(const[n,o]of r){t.append(n,o)}return t}const{toFormData:r}=await __nccwpck_require__.e(37).then(__nccwpck_require__.bind(__nccwpck_require__,4037));return r(this.body,t)}async blob(){const t=this.headers&&this.headers.get("content-type")||this[C].body&&this[C].body.type||"";const r=await this.arrayBuffer();return new S.Z([r],{type:t})}async json(){const t=await this.text();return JSON.parse(t)}async text(){const t=await consumeBody(this);return(new TextDecoder).decode(t)}buffer(){return consumeBody(this)}}Body.prototype.buffer=(0,y.deprecate)(Body.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true},data:{get:(0,y.deprecate)((()=>{}),"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function consumeBody(t){if(t[C].disturbed){throw new TypeError(`body used already for: ${t.url}`)}t[C].disturbed=true;if(t[C].error){throw t[C].error}const{body:r}=t;if(r===null){return b.Buffer.alloc(0)}if(!(r instanceof m)){return b.Buffer.alloc(0)}const n=[];let o=0;try{for await(const s of r){if(t.size>0&&o+s.length>t.size){const n=new FetchError(`content size at ${t.url} over limit: ${t.size}`,"max-size");r.destroy(n);throw n}o+=s.length;n.push(s)}}catch(r){const n=r instanceof FetchBaseError?r:new FetchError(`Invalid response body while trying to fetch ${t.url}: ${r.message}`,"system",r);throw n}if(r.readableEnded===true||r._readableState.ended===true){try{if(n.every((t=>typeof t==="string"))){return b.Buffer.from(n.join(""))}return b.Buffer.concat(n,o)}catch(r){throw new FetchError(`Could not create Buffer from response body for ${t.url}: ${r.message}`,"system",r)}}else{throw new FetchError(`Premature close of server response while trying to fetch ${t.url}`)}}const clone=(t,r)=>{let n;let o;let{body:s}=t[C];if(t.bodyUsed){throw new Error("cannot clone body after it is used")}if(s instanceof m&&typeof s.getBoundary!=="function"){n=new m.PassThrough({highWaterMark:r});o=new m.PassThrough({highWaterMark:r});s.pipe(n);s.pipe(o);t[C].stream=n;s=o}return s};const v=(0,y.deprecate)((t=>t.getBoundary()),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167");const extractContentType=(t,r)=>{if(t===null){return null}if(typeof t==="string"){return"text/plain;charset=UTF-8"}if(isURLSearchParameters(t)){return"application/x-www-form-urlencoded;charset=UTF-8"}if(isBlob(t)){return t.type||null}if(b.Buffer.isBuffer(t)||y.types.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)){return null}if(t instanceof R.Ct){return`multipart/form-data; boundary=${r[C].boundary}`}if(t&&typeof t.getBoundary==="function"){return`multipart/form-data;boundary=${v(t)}`}if(t instanceof m){return null}return"text/plain;charset=UTF-8"};const getTotalBytes=t=>{const{body:r}=t[C];if(r===null){return 0}if(isBlob(r)){return r.size}if(b.Buffer.isBuffer(r)){return r.length}if(r&&typeof r.getLengthSync==="function"){return r.hasKnownLength&&r.hasKnownLength()?r.getLengthSync():null}return null};const writeToStream=async(t,{body:r})=>{if(r===null){t.end()}else{await w(r,t)}};const E=typeof d.validateHeaderName==="function"?d.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){const r=new TypeError(`Header name must be a valid HTTP token [${t}]`);Object.defineProperty(r,"code",{value:"ERR_INVALID_HTTP_TOKEN"});throw r}};const T=typeof d.validateHeaderValue==="function"?d.validateHeaderValue:(t,r)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(r)){const r=new TypeError(`Invalid character in header content ["${t}"]`);Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"});throw r}};class Headers extends URLSearchParams{constructor(t){let r=[];if(t instanceof Headers){const n=t.raw();for(const[t,o]of Object.entries(n)){r.push(...o.map((r=>[t,r])))}}else if(t==null){}else if(typeof t==="object"&&!y.types.isBoxedPrimitive(t)){const n=t[Symbol.iterator];if(n==null){r.push(...Object.entries(t))}else{if(typeof n!=="function"){throw new TypeError("Header pairs must be iterable")}r=[...t].map((t=>{if(typeof t!=="object"||y.types.isBoxedPrimitive(t)){throw new TypeError("Each header pair must be an iterable object")}return[...t]})).map((t=>{if(t.length!==2){throw new TypeError("Each header pair must be a name/value tuple")}return[...t]}))}}else{throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)")}r=r.length>0?r.map((([t,r])=>{E(t);T(t,String(r));return[String(t).toLowerCase(),String(r)]})):undefined;super(r);return new Proxy(this,{get(t,r,n){switch(r){case"append":case"set":return(n,o)=>{E(n);T(n,String(o));return URLSearchParams.prototype[r].call(t,String(n).toLowerCase(),String(o))};case"delete":case"has":case"getAll":return n=>{E(n);return URLSearchParams.prototype[r].call(t,String(n).toLowerCase())};case"keys":return()=>{t.sort();return new Set(URLSearchParams.prototype.keys.call(t)).keys()};default:return Reflect.get(t,r,n)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(t){const r=this.getAll(t);if(r.length===0){return null}let n=r.join(", ");if(/^content-encoding$/i.test(t)){n=n.toLowerCase()}return n}forEach(t,r=undefined){for(const n of this.keys()){Reflect.apply(t,r,[this.get(n),n,this])}}*values(){for(const t of this.keys()){yield this.get(t)}}*entries(){for(const t of this.keys()){yield[t,this.get(t)]}}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce(((t,r)=>{t[r]=this.getAll(r);return t}),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce(((t,r)=>{const n=this.getAll(r);if(r==="host"){t[r]=n[0]}else{t[r]=n.length>1?n:n[0]}return t}),{})}}Object.defineProperties(Headers.prototype,["get","entries","forEach","values"].reduce(((t,r)=>{t[r]={enumerable:true};return t}),{}));function fromRawHeaders(t=[]){return new Headers(t.reduce(((t,r,n,o)=>{if(n%2===0){t.push(o.slice(n,n+2))}return t}),[]).filter((([t,r])=>{try{E(t);T(t,String(r));return true}catch{return false}})))}const A=new Set([301,302,303,307,308]);const isRedirect=t=>A.has(t);const I=Symbol("Response internals");class Response extends Body{constructor(t=null,r={}){super(t,r);const n=r.status!=null?r.status:200;const o=new Headers(r.headers);if(t!==null&&!o.has("Content-Type")){const r=extractContentType(t,this);if(r){o.append("Content-Type",r)}}this[I]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:o,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[I].type}get url(){return this[I].url||""}get status(){return this[I].status}get ok(){return this[I].status>=200&&this[I].status<300}get redirected(){return this[I].counter>0}get statusText(){return this[I].statusText}get headers(){return this[I].headers}get highWaterMark(){return this[I].highWaterMark}clone(){return new Response(clone(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(t,r=302){if(!isRedirect(r)){throw new RangeError('Failed to execute "redirect" on "response": Invalid status code')}return new Response(null,{headers:{location:new URL(t).toString()},status:r})}static error(){const t=new Response(null,{status:0,statusText:""});t[I].type="error";return t}get[Symbol.toStringTag](){return"Response"}}Object.defineProperties(Response.prototype,{type:{enumerable:true},url:{enumerable:true},status:{enumerable:true},ok:{enumerable:true},redirected:{enumerable:true},statusText:{enumerable:true},headers:{enumerable:true},clone:{enumerable:true}});const k=t(import.meta.url)("node:url");const getSearch=t=>{if(t.search){return t.search}const r=t.href.length-1;const n=t.hash||(t.href[r]==="#"?"#":"");return t.href[r-n.length]==="?"?"?":""};const P=t(import.meta.url)("node:net");function stripURLForUseAsAReferrer(t,r=false){if(t==null){return"no-referrer"}t=new URL(t);if(/^(about|blob|data):$/.test(t.protocol)){return"no-referrer"}t.username="";t.password="";t.hash="";if(r){t.pathname="";t.search=""}return t}const $=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]);const O="strict-origin-when-cross-origin";function validateReferrerPolicy(t){if(!$.has(t)){throw new TypeError(`Invalid referrerPolicy: ${t}`)}return t}function isOriginPotentiallyTrustworthy(t){if(/^(http|ws)s:$/.test(t.protocol)){return true}const r=t.host.replace(/(^\[)|(]$)/g,"");const n=(0,P.isIP)(r);if(n===4&&/^127\./.test(r)){return true}if(n===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(r)){return true}if(/^(.+\.)*localhost$/.test(t.host)){return false}if(t.protocol==="file:"){return true}return false}function isUrlPotentiallyTrustworthy(t){if(/^about:(blank|srcdoc)$/.test(t)){return true}if(t.protocol==="data:"){return true}if(/^(blob|filesystem):$/.test(t.protocol)){return true}return isOriginPotentiallyTrustworthy(t)}function determineRequestsReferrer(t,{referrerURLCallback:r,referrerOriginCallback:n}={}){if(t.referrer==="no-referrer"||t.referrerPolicy===""){return null}const o=t.referrerPolicy;if(t.referrer==="about:client"){return"no-referrer"}const s=t.referrer;let i=stripURLForUseAsAReferrer(s);let a=stripURLForUseAsAReferrer(s,true);if(i.toString().length>4096){i=a}if(r){i=r(i)}if(n){a=n(a)}const l=new URL(t.url);switch(o){case"no-referrer":return"no-referrer";case"origin":return a;case"unsafe-url":return i;case"strict-origin":if(isUrlPotentiallyTrustworthy(i)&&!isUrlPotentiallyTrustworthy(l)){return"no-referrer"}return a.toString();case"strict-origin-when-cross-origin":if(i.origin===l.origin){return i}if(isUrlPotentiallyTrustworthy(i)&&!isUrlPotentiallyTrustworthy(l)){return"no-referrer"}return a;case"same-origin":if(i.origin===l.origin){return i}return"no-referrer";case"origin-when-cross-origin":if(i.origin===l.origin){return i}return a;case"no-referrer-when-downgrade":if(isUrlPotentiallyTrustworthy(i)&&!isUrlPotentiallyTrustworthy(l)){return"no-referrer"}return i;default:throw new TypeError(`Invalid referrerPolicy: ${o}`)}}function parseReferrerPolicyFromHeader(t){const r=(t.get("referrer-policy")||"").split(/[,\s]+/);let n="";for(const t of r){if(t&&$.has(t)){n=t}}return n}const W=Symbol("Request internals");const isRequest=t=>typeof t==="object"&&typeof t[W]==="object";const B=(0,y.deprecate)((()=>{}),".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)");class Request extends Body{constructor(t,r={}){let n;if(isRequest(t)){n=new URL(t.url)}else{n=new URL(t);t={}}if(n.username!==""||n.password!==""){throw new TypeError(`${n} is an url with embedded credentials.`)}let o=r.method||t.method||"GET";o=o.toUpperCase();if("data"in r){B()}if((r.body!=null||isRequest(t)&&t.body!==null)&&(o==="GET"||o==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}const s=r.body?r.body:isRequest(t)&&t.body!==null?clone(t):null;super(s,{size:r.size||t.size||0});const i=new Headers(r.headers||t.headers||{});if(s!==null&&!i.has("Content-Type")){const t=extractContentType(s,this);if(t){i.set("Content-Type",t)}}let a=isRequest(t)?t.signal:null;if("signal"in r){a=r.signal}if(a!=null&&!isAbortSignal(a)){throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget")}let l=r.referrer==null?t.referrer:r.referrer;if(l===""){l="no-referrer"}else if(l){const t=new URL(l);l=/^about:(\/\/)?client$/.test(t)?"client":t}else{l=undefined}this[W]={method:o,redirect:r.redirect||t.redirect||"follow",headers:i,parsedURL:n,signal:a,referrer:l};this.follow=r.follow===undefined?t.follow===undefined?20:t.follow:r.follow;this.compress=r.compress===undefined?t.compress===undefined?true:t.compress:r.compress;this.counter=r.counter||t.counter||0;this.agent=r.agent||t.agent;this.highWaterMark=r.highWaterMark||t.highWaterMark||16384;this.insecureHTTPParser=r.insecureHTTPParser||t.insecureHTTPParser||false;this.referrerPolicy=r.referrerPolicy||t.referrerPolicy||""}get method(){return this[W].method}get url(){return(0,k.format)(this[W].parsedURL)}get headers(){return this[W].headers}get redirect(){return this[W].redirect}get signal(){return this[W].signal}get referrer(){if(this[W].referrer==="no-referrer"){return""}if(this[W].referrer==="client"){return"about:client"}if(this[W].referrer){return this[W].referrer.toString()}return undefined}get referrerPolicy(){return this[W].referrerPolicy}set referrerPolicy(t){this[W].referrerPolicy=validateReferrerPolicy(t)}clone(){return new Request(this)}get[Symbol.toStringTag](){return"Request"}}Object.defineProperties(Request.prototype,{method:{enumerable:true},url:{enumerable:true},headers:{enumerable:true},redirect:{enumerable:true},clone:{enumerable:true},signal:{enumerable:true},referrer:{enumerable:true},referrerPolicy:{enumerable:true}});const getNodeRequestOptions=t=>{const{parsedURL:r}=t[W];const n=new Headers(t[W].headers);if(!n.has("Accept")){n.set("Accept","*/*")}let o=null;if(t.body===null&&/^(post|put)$/i.test(t.method)){o="0"}if(t.body!==null){const r=getTotalBytes(t);if(typeof r==="number"&&!Number.isNaN(r)){o=String(r)}}if(o){n.set("Content-Length",o)}if(t.referrerPolicy===""){t.referrerPolicy=O}if(t.referrer&&t.referrer!=="no-referrer"){t[W].referrer=determineRequestsReferrer(t)}else{t[W].referrer="no-referrer"}if(t[W].referrer instanceof URL){n.set("Referer",t.referrer)}if(!n.has("User-Agent")){n.set("User-Agent","node-fetch")}if(t.compress&&!n.has("Accept-Encoding")){n.set("Accept-Encoding","gzip,deflate,br")}let{agent:s}=t;if(typeof s==="function"){s=s(r)}if(!n.has("Connection")&&!s){n.set("Connection","close")}const i=getSearch(r);const a={path:r.pathname+i,method:t.method,headers:n[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:s};return{parsedURL:r,options:a}};class AbortError extends FetchBaseError{constructor(t,r="aborted"){super(t,r)}}var D=__nccwpck_require__(2777);const L=new Set(["data:","http:","https:"]);async function fetch(t,r){return new Promise(((n,o)=>{const s=new Request(t,r);const{parsedURL:i,options:a}=getNodeRequestOptions(s);if(!L.has(i.protocol)){throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${i.protocol.replace(/:$/,"")}" is not supported.`)}if(i.protocol==="data:"){const t=g(s.url);const r=new Response(t,{headers:{"Content-Type":t.typeFull}});n(r);return}const l=(i.protocol==="https:"?h:d).request;const{signal:u}=s;let c=null;const abort=()=>{const t=new AbortError("The operation was aborted.");o(t);if(s.body&&s.body instanceof m.Readable){s.body.destroy(t)}if(!c||!c.body){return}c.body.emit("error",t)};if(u&&u.aborted){abort();return}const abortAndFinalize=()=>{abort();finalize()};const b=l(i.toString(),a);if(u){u.addEventListener("abort",abortAndFinalize)}const finalize=()=>{b.abort();if(u){u.removeEventListener("abort",abortAndFinalize)}};b.on("error",(t=>{o(new FetchError(`request to ${s.url} failed, reason: ${t.message}`,"system",t));finalize()}));fixResponseChunkedTransferBadEnding(b,(t=>{c.body.destroy(t)}));if(process.version<"v14"){b.on("socket",(t=>{let r;t.prependListener("end",(()=>{r=t._eventsCount}));t.prependListener("close",(n=>{if(c&&r<t._eventsCount&&!n){const t=new Error("Premature close");t.code="ERR_STREAM_PREMATURE_CLOSE";c.body.emit("error",t)}}))}))}b.on("response",(t=>{b.setTimeout(0);const i=fromRawHeaders(t.rawHeaders);if(isRedirect(t.statusCode)){const a=i.get("Location");let l=null;try{l=a===null?null:new URL(a,s.url)}catch{if(s.redirect!=="manual"){o(new FetchError(`uri requested responds with an invalid redirect URL: ${a}`,"invalid-redirect"));finalize();return}}switch(s.redirect){case"error":o(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect"));finalize();return;case"manual":break;case"follow":{if(l===null){break}if(s.counter>=s.follow){o(new FetchError(`maximum redirect reached at: ${s.url}`,"max-redirect"));finalize();return}const a={headers:new Headers(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:clone(s),signal:s.signal,size:s.size,referrer:s.referrer,referrerPolicy:s.referrerPolicy};if(!isDomainOrSubdomain(s.url,l)){for(const t of["authorization","www-authenticate","cookie","cookie2"]){a.headers.delete(t)}}if(t.statusCode!==303&&s.body&&r.body instanceof m.Readable){o(new FetchError("Cannot follow redirect with body being a readable stream","unsupported-redirect"));finalize();return}if(t.statusCode===303||(t.statusCode===301||t.statusCode===302)&&s.method==="POST"){a.method="GET";a.body=undefined;a.headers.delete("content-length")}const u=parseReferrerPolicyFromHeader(i);if(u){a.referrerPolicy=u}n(fetch(new Request(l,a)));finalize();return}default:return o(new TypeError(`Redirect option '${s.redirect}' is not a valid value of RequestRedirect`))}}if(u){t.once("end",(()=>{u.removeEventListener("abort",abortAndFinalize)}))}let a=(0,m.pipeline)(t,new m.PassThrough,(t=>{if(t){o(t)}}));if(process.version<"v12.10"){t.on("aborted",abortAndFinalize)}const l={url:s.url,status:t.statusCode,statusText:t.statusMessage,headers:i,size:s.size,counter:s.counter,highWaterMark:s.highWaterMark};const d=i.get("Content-Encoding");if(!s.compress||s.method==="HEAD"||d===null||t.statusCode===204||t.statusCode===304){c=new Response(a,l);n(c);return}const h={flush:p.Z_SYNC_FLUSH,finishFlush:p.Z_SYNC_FLUSH};if(d==="gzip"||d==="x-gzip"){a=(0,m.pipeline)(a,p.createGunzip(h),(t=>{if(t){o(t)}}));c=new Response(a,l);n(c);return}if(d==="deflate"||d==="x-deflate"){const r=(0,m.pipeline)(t,new m.PassThrough,(t=>{if(t){o(t)}}));r.once("data",(t=>{if((t[0]&15)===8){a=(0,m.pipeline)(a,p.createInflate(),(t=>{if(t){o(t)}}))}else{a=(0,m.pipeline)(a,p.createInflateRaw(),(t=>{if(t){o(t)}}))}c=new Response(a,l);n(c)}));r.once("end",(()=>{if(!c){c=new Response(a,l);n(c)}}));return}if(d==="br"){a=(0,m.pipeline)(a,p.createBrotliDecompress(),(t=>{if(t){o(t)}}));c=new Response(a,l);n(c);return}c=new Response(a,l);n(c)}));writeToStream(b,s).catch(o)}))}function fixResponseChunkedTransferBadEnding(t,r){const n=b.Buffer.from("0\r\n\r\n");let o=false;let s=false;let i;t.on("response",(t=>{const{headers:r}=t;o=r["transfer-encoding"]==="chunked"&&!r["content-length"]}));t.on("socket",(a=>{const onSocketClose=()=>{if(o&&!s){const t=new Error("Premature close");t.code="ERR_STREAM_PREMATURE_CLOSE";r(t)}};a.prependListener("close",onSocketClose);t.on("abort",(()=>{a.removeListener("close",onSocketClose)}));a.on("data",(t=>{s=b.Buffer.compare(t.slice(-5),n)===0;if(!s&&i){s=b.Buffer.compare(i.slice(-3),n.slice(0,3))===0&&b.Buffer.compare(t.slice(-2),n.slice(3))===0}i=t}))}))}var j=__nccwpck_require__(2968);var z=__nccwpck_require__(7353);var F=__nccwpck_require__(5418);var q=__nccwpck_require__(1383);var N=__nccwpck_require__(418);const M=t(import.meta.url)("process");var U=__nccwpck_require__(167);var G=__nccwpck_require__(1017);var H=__nccwpck_require__(7147);var V=__nccwpck_require__(2037);var Q=__nccwpck_require__(4404);M.env.NODE_ENV="production";const Y=fetchEnhanced(fetch);const X=96;const Z="\0";const J=(0,M.cwd)();const K=/^.*?:\/\/(.*?@)?(github\.com[:/])/i;const ee=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i;const te=/^[0-9a-f]{7,}$/i;const memoize=t=>{const r=Object.create(null);return(n,o)=>n in r?r[n]:r[n]=t(n,o)};const esc=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&");const re=memoize(U.fromUrl);const ne=memoize(j);const oe=memoize(F);const se=memoize((t=>t.endsWith("/")?t.substring(0,t.length-1):t));const ie=new Set(["patch"]);const ae=new Set(["patch","minor"]);const le=new Set(["patch","minor","major"]);const ue=Object.create(null);const ce=Object.create(null);const fe=r.lookup;r.lookup=(t,r,n)=>{if(!n){n=r;r=undefined}if(t in ue){n(...ue[t])}else{if(!(t in ce)){ce[t]=[n];fe(t,r,((...r)=>{if(!(t in ue))ue[t]=r;for(const n of ce[t]){n(...r)}}))}else{ce[t].push(n)}}};for(const t of[process.stdout,process.stderr]){t?._handle?.setBlocking?.(true)}const de=c(M.argv.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","G","githubapi","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",G:"githubapi",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});if(de.color===false)M.env.NO_COLOR="1";let he,pe,me,be;if("NO_COLOR"in M.env||M.env.TERM==="dumb"){he=pe=me=be=t=>t}else{he=t=>`[35m${t}[0m`;pe=t=>`[31m${t}[0m`;me=t=>`[32m${t}[0m`;be=t=>`[90m${t}[0m`}if(de.help){M.stdout.write(`usage: updates [options]\n\n Options:\n -u, --update Update versions and write package.json\n -p, --prerelease [<pkg,...>] Consider prerelease versions\n -R, --release [<pkg,...>] Only use release versions, may downgrade\n -g, --greatest [<pkg,...>] Prefer greatest over latest version\n -i, --include <pkg,...> Include only given packages\n -e, --exclude <pkg,...> Exclude given packages\n -t, --types <type,...> Check only given dependency types\n -P, --patch [<pkg,...>] Consider only up to semver-patch\n -m, --minor [<pkg,...>] Consider only up to semver-minor\n -d, --allow-downgrade [<pkg,...>] Allow version downgrades when using latest version\n -E, --error-on-outdated Exit with code 2 when updates are available and 0 when not\n -U, --error-on-unchanged Exit with code 0 when updates are available and 2 when not\n -r, --registry <url> Override npm registry URL\n -G, --githubapi <url> Override Github API URL\n -f, --file <path> Use given package.json file or module directory\n -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${X}\n -j, --json Output a JSON object\n -n, --no-color Disable color output\n -v, --version Print the version\n -V, --verbose Print verbose output to stderr\n -h, --help Print this help\n\n Examples:\n $ updates\n $ updates -u\n $ updates -u -m -e eslint\n $ updates -u -U && rm -rf node_modules && npm i\n`);(0,M.exit)(0)}if(de.version){const t=__nccwpck_require__.ab+"package.json";const{version:r}=JSON.parse((0,H.readFileSync)(__nccwpck_require__.ab+"package.json","utf8"));console.info(r);(0,M.exit)(0)}const ge=parseMixedArg(de.greatest);const ye=parseMixedArg(de.prerelease);const Se=parseMixedArg(de.release);const Re=parseMixedArg(de.patch);const _e=parseMixedArg(de.minor);const we=parseMixedArg(de["allow-downgrade"]);const Ce=z("npm",{registry:"https://registry.npmjs.org"});const ve={npmrc:Ce,recursive:true};const Ee=se(de.registry||Ce.registry);const Te=de.githubapi?se(de.githubapi):"https://api.github.com";const Ae=typeof de.sockets==="number"?parseInt(de.sockets):X;const extractCerts=t=>Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g)).map((t=>t[0]));const Ie={};if(Ce["strict-ssl"]===false){Ie.rejectUnauthorized=false}else{if("cafile"in Ce){Ie.ca=Q.rootCertificates.concat(extractCerts((0,H.readFileSync)(Ce.cafile,"utf8")))}if("ca"in Ce){const t=Array.isArray(Ce.ca)?Ce.ca:[Ce.ca];Ie.ca=Q.rootCertificates.concat(t.map((t=>extractCerts(t))))}}let ke;if(de.file){let t;try{t=(0,H.lstatSync)(de.file)}catch(t){finish(new Error(`Unable to open ${de.file}: ${t.message}`))}if(t&&t.isFile()){ke=de.file}else if(t&&t.isDirectory()){ke=(0,G.join)(de.file,"package.json")}else{finish(new Error(`${de.file} is neither a file nor directory`))}}else{ke=findSync("package.json",J);if(!ke){finish(new Error(`Unable to find package.json in ${J} or any of its parents`))}}let Pe;if(de.types){Pe=Array.isArray(de.types)?de.types:de.types.split(",")}else{Pe=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]}let $e,xe;try{xe=(0,H.readFileSync)(ke,"utf8")}catch(t){finish(new Error(`Unable to open package.json: ${t.message}`))}try{$e=JSON.parse(xe)}catch(t){finish(new Error(`Error parsing package.json: ${t.message}`))}let Oe,We;if(de.include&&de.include!==true)Oe=new Set((Array.isArray(de.include)?de.include:[de.include]).flatMap((t=>t.split(","))));if(de.exclude&&de.exclude!==true)We=new Set((Array.isArray(de.exclude)?de.exclude:[de.exclude]).flatMap((t=>t.split(","))));function canInclude(t){if(We&&We.has(t))return false;if(Oe&&!Oe.has(t))return false;return true}const Be={},De={};for(const t of Pe){for(const[r,n]of Object.entries($e[t]||{})){if(q.validRange(n)&&canInclude(r)){Be[`${t}${Z}${r}`]={old:n}}else if(canInclude(r)){De[`${t}${Z}${r}`]={old:n}}}}if(!Object.keys(Be).length&&!Object.keys(De).length){finish(new Error(`No packages ${Oe||We?"match the given filters":"found"}`))}const Le=[[1e3,1,"ns"],[1e6,1e3,"µs"],[1e9,1e6,"ms"],[6e10,1e9,"sec"],[36e11,6e10,"min"],[864e11,36e11,"hour"],[2592e12,864e11,"day"],[31536e12,2592e12,"month"],[Infinity,31536e12,"year"]];function getAge(t){if(!t)return"";const r=new Date(t).getTime()*1e6;if(Number.isNaN(r))return"";const n=Date.now()*1e6-r;if(n<=0)return"none";let o,s;for(let t=0;t<=Le.length;t++){const r=Le[t];const[i,a,l]=r||[];if(r&&i&&n<i){o=Math.round(n/a);s=`${l}${o>1&&!l.endsWith("s")?"s":""}`;break}}return`${o} ${s}`}function findSync(t,r,n){const o=(0,G.join)(r,t);try{(0,H.accessSync)(o);return o}catch{}const s=(0,G.dirname)(r);if(n&&o===n||s===r){return null}else{return findSync(t,s,n)}}function getAuthAndRegistry(t,r){if(!t.startsWith("@")){return[ne(r,ve),r]}else{const n=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0];const o=se(oe(n,Ce));if(o!==r){try{const t=ne(o,ve);if(t&&t.token){return[t,o]}}catch{return[ne(r,ve),r]}}else{return[ne(r,ve),r]}}}async function fetchInfo(t,r,n){const[o,s]=getAuthAndRegistry(t,n);const i={maxSockets:Ae};if(Object.keys(Ie).length){i.agentOpts=Ie}if(o&&o.token){i.headers={Authorization:`${o.type} ${o.token}`}}const a=r==="resolutions"?resolutionsBasePackage(t):t;const l=a.replace(/\//g,"%2f");const u=`${s}/${l}`;if(de.verbose)console.error(`${he("fetch")} ${u}`);const c=await Y(u,i);if(c&&c.ok){if(de.verbose)console.error(`${me("done")} ${u}`);return[await c.json(),r,s,t]}else{if(c&&c.status&&c.statusText){throw new Error(`Received ${c.status} ${c.statusText} for ${t} from ${s}`)}else{throw new Error(`Unable to fetch ${t} from ${s}`)}}}function getInfoUrl({repository:t,homepage:r},n,o){let s;if(n==="https://npm.pkg.github.com"){return`https://github.com/${o.replace(/^@/,"")}`}else if(t){const r=typeof t==="string"?t:t.url;const n=re(r);if(n&&n.browse){s=n.browse()}if(s&&t.directory&&n.treepath){s=`${s}/${n.treepath}/HEAD/${t.directory}`}if(!s&&t&&t.url&&/^https?:/.test(t.url)){s=t.url}}let i=s||r||"";if(i){const t=new URL(i);if(t.hostname==="github.com"&&t.protocol==="http:"){t.protocol="https:";i=String(t)}}return i}function finish(t,r={}){const n={};const o=t instanceof Error;if(typeof t==="string"){n.message=t}else if(o){n.error=t.stack}for(const t of Object.values(Be)){if("oldPrint"in t){t.old=t.oldPrint;delete t.oldPrint}if("newPrint"in t){t.new=t.newPrint;delete t.newPrint}}if(de.json){if(!o){n.results={};for(const[t,r]of Object.entries(Be)){const[o,s]=t.split(Z);if(!n.results[o])n.results[o]={};n.results[o][s]=r}}console.info(JSON.stringify(n))}else{if(Object.keys(Be).length&&!o){console.info(formatDeps(Be))}if(n.message||n.error){if(n.message){console.info(n.message)}else if(n.error){const t=n.error.split(/\r?\n/);for(const[r,n]of Object.entries(t)){console.info((r==="0"?pe:be)(n))}}}}Y.clearCache();if(de["error-on-outdated"]){(0,M.exit)(Object.keys(Be).length?2:0)}else if(de["error-on-unchanged"]){(0,M.exit)(Object.keys(Be).length?0:2)}else{(0,M.exit)(r.exitCode||(n.error?1:0))}}function write(t,r){const n=(0,V.platform)()==="win32";if(n)(0,H.truncateSync)(t,0);(0,H.writeFileSync)(t,r,n?{flag:"r+"}:undefined)}function highlightDiff(t,r,n){const o=t.split(/\./);const s=r.split(/\./);const i=n?me:pe;const a=/^[0-9a-zA-Z-.]+$/;let l="";for(let t=0;t<o.length;t++){if(o[t]!==s[t]){if(a.test(o[t])){l+=i(o.slice(t).join("."))}else{l+=o[t].split("").map((t=>a.test(t)?i(t):t)).join("")+i(`.${o.slice(t+1).join(".")}`)}break}else{l+=`${o[t]}.`}}return l}function formatDeps(){const t=[["NAME","OLD","NEW","AGE","INFO"]];for(const[r,n]of Object.entries(Be)){const[o,s]=r.split(Z);t.push([s,highlightDiff(n.old,n.new,false),highlightDiff(n.new,n.old,true),n.age||"",n.info])}const r=ansiRegex();return N(t,{hsep:" ",stringLength:t=>t.replace(r,"").length})}function updatePackageJson(){let t=xe;for(const r of Object.keys(Be)){const[n,o]=r.split(Z);const s=new RegExp(`"${esc(o)}": +"${esc(Be[r].old)}"`,"g");t=t.replace(s,`"${o}": "${Be[r].new}"`)}return t}function updateRange(t,r){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,r)}function isVersionPrerelease(t){const r=q.parse(t);if(!r)return false;return Boolean(r.prerelease.length)}function isRangePrerelease(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function rangeToVersion(t){try{return q.coerce(t).version}catch{return null}}function findVersion(t,r,{range:n,semvers:o,usePre:s,useRel:i,useGreatest:a}={}){let l=rangeToVersion(n);let u=0;o=new Set(o);s=isRangePrerelease(n)||s;if(s){o.add("prerelease");if(o.has("patch"))o.add("prepatch");if(o.has("minor"))o.add("preminor");if(o.has("major"))o.add("premajor")}for(const n of r){const r=q.parse(n);if(r.prerelease.length&&(!s||i))continue;const c=q.diff(l,r.version);if(!c||!o.has(c))continue;if(a||!("time"in t)){if(q.gte(q.coerce(r.version).version,l)){l=r.version}}else{const o=new Date(t.time[n]).getTime();if(o>=0&&o>u){l=r.version;u=o}}}return l||null}function findNewVersion(t,r){if(r.range==="*")return null;if(r.range.includes("||"))return null;const n=Object.keys(t.versions).filter((t=>q.valid(t)));const o=findVersion(t,n,r);if(r.useGreatest){return o}else{const n=t["dist-tags"].latest;const s=q.coerce(r.range).version;const i=isRangePrerelease(r.range);const a=isVersionPrerelease(o);const l=isVersionPrerelease(n);const u=q.gt(o,s);if(!r.useRel&&r.usePre||i&&a){return o}if(r.useRel&&!u&&i&&!a){return o}if(i&&!a&&u){return o}if(i&&!a&&!u){return null}const c=q.diff(s,n);if(c&&c!=="prerelease"&&!r.semvers.has(c.replace(/^pre/,""))){return o}if(r.useRel&&isVersionPrerelease(n)){return o}if(q.lt(n,s)&&!l){if(we===true||Array.isArray(we)&&we.has(t.name)){return n}else{return null}}return n}}async function checkUrlDep([t,r],{useGreatest:n}={}){const o=r.old.replace(K,"");const[s,i,a,l]=ee.exec(o)||[];if(!i||!a||!l)return;if(te.test(l)){const n=await Y(`${Te}/repos/${i}/${a}/commits`);if(!n||!n.ok)return;const o=await n.json();let{sha:s,commit:u}=o[0];if(!s||!s.length)return;let c;if(u&&u.committer&&u.committer.date){c=u.committer.date}else if(u&&u.auhor&&u.author.date){c=u.author.date}s=s.substring(0,l.length);if(l!==s){const n=r.old.replace(l,s);return{key:t,newRange:n,user:i,repo:a,oldRef:l,newRef:s,newDate:c}}}else{const r=await Y(`${Te}/repos/${i}/${a}/git/refs/tags`);if(!r||!r.ok)return;const o=await r.json();const s=o.map((t=>t.ref.replace(/^refs\/tags\//,"")));const u=l.replace(/^v/,"");if(!q.valid(u))return;if(!n){const r=s[s.length-1];const n=r.replace(/^v/,"");if(!q.valid(n))return;if(q.neq(u,n)){const n=r;const o=r;return{key:t,newRange:n,user:i,repo:a,oldRef:l,newRef:o}}}else{let r=l;let n=l.replace(/^v/,"");for(const t of s){const o=t.replace(/^v/,"");if(!q.valid(o))continue;if(!r||q.gt(o,n)){r=t;n=o}}if(q.neq(u,n)){const n=r;const o=r;return{key:t,newRange:n,user:i,repo:a,oldRef:l,newRef:o}}}}}function resolutionsBasePackage(t){const r=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return r[r.length-1]}function parseMixedArg(t){if(t===undefined){return false}else if(t===""){return true}else if(typeof t==="string"){return t.includes(",")?new Set(t.split(",")):new Set([t])}else if(Array.isArray(t)){return new Set(t)}else{return false}}async function main(){const t=await Promise.all(Object.keys(Be).map((t=>{const[r,n]=t.split(Z);return fetchInfo(n,r,Ee)})));for(const[r,n,o,s]of t){if(r&&r.error){throw new Error(r.error)}const t=typeof ge==="boolean"?ge:ge.has(r.name);const i=typeof ye==="boolean"?ye:ye.has(r.name);const a=typeof Se==="boolean"?Se:Se.has(r.name);let l;if(Re===true||Array.isArray(Re)&&Re.has(r.name)){l=ie}else if(_e===true||Array.isArray(_e)&&_e.has(r.name)){l=ae}else{l=le}const u=`${n}${Z}${s}`;const c=Be[u].old;const d=findNewVersion(r,{usePre:i,useRel:a,useGreatest:t,semvers:l,range:c});const h=updateRange(c,d);if(!d||c===h){delete Be[u]}else{Be[u].new=h;Be[u].info=getInfoUrl(r.versions[d]||r,o,r.name);if(r.time&&r.time[d])Be[u].age=getAge(r.time[d])}}if(Object.keys(De).length){let t=await Promise.all(Object.entries(De).map((([t,r])=>{const[n,o]=t.split(Z);const s=typeof ge==="boolean"?ge:ge.has(o);return checkUrlDep([t,r],{useGreatest:s})})));t=t.filter((t=>!!t));for(const r of t||[]){const{key:t,newRange:n,user:o,repo:s,oldRef:i,newRef:a,newDate:l}=r;Be[t]={old:De[t].old,new:n,oldPrint:te.test(i)?i.substring(0,7):i,newPrint:te.test(a)?a.substring(0,7):a,info:`https://github.com/${o}/${s}`};if(l)Be[t].age=getAge(l)}}if(!Object.keys(Be).length){finish("All packages are up to date.")}if(!de.update){finish()}try{write(ke,updatePackageJson())}catch(t){finish(new Error(`Error writing ${ke}: ${t.message}`))}finish(me(`\n ╭────────────────────────╮\n │ package.json updated │\n ╰────────────────────────╯`.substring(1)))}main().catch(finish)})();
|