diff --git a/dist/main/index.js b/dist/main/index.js index 7f49af1..74f7247 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -72,4 +72,4 @@ var n=r(181);var s=n.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}i * @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE} * @copyright (c) 2014 Chris Talkington, contributors. */ -var n=r(9023).inherits;var s=r(7544).ZipArchiveOutputStream;var A=r(7544).ZipArchiveEntry;var a=r(3296);var c=e.exports=function(e){if(!(this instanceof c)){return new c(e)}e=this.options=e||{};e.zlib=e.zlib||{};s.call(this,e);if(typeof e.level==="number"&&e.level>=0){e.zlib.level=e.level;delete e.level}if(!e.forceZip64&&typeof e.zlib.level==="number"&&e.zlib.level===0){e.store=true}e.namePrependSlash=e.namePrependSlash||false;if(e.comment&&e.comment.length>0){this.setComment(e.comment)}};n(c,s);c.prototype._normalizeFileData=function(e){e=a.defaults(e,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var t=e.type==="directory";var r=e.type==="symlink";if(e.name){e.name=a.sanitizePath(e.name);if(!r&&e.name.slice(-1)==="/"){t=true;e.type="directory"}else if(t){e.name+="/"}}if(t||r){e.store=true}e.date=a.dateify(e.date);return e};c.prototype.entry=function(e,t,r){if(typeof r!=="function"){r=this._emitErrorCallback.bind(this)}t=this._normalizeFileData(t);if(t.type!=="file"&&t.type!=="directory"&&t.type!=="symlink"){r(new Error(t.type+" entries not currently supported"));return}if(typeof t.name!=="string"||t.name.length===0){r(new Error("entry name must be a non-empty string value"));return}if(t.type==="symlink"&&typeof t.linkname!=="string"){r(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var n=new A(t.name);n.setTime(t.date,this.options.forceLocalTime);if(t.namePrependSlash){n.setName(t.name,true)}if(t.store){n.setMethod(0)}if(t.comment.length>0){n.setComment(t.comment)}if(t.type==="symlink"&&typeof t.mode!=="number"){t.mode=40960}if(typeof t.mode==="number"){if(t.type==="symlink"){t.mode|=40960}n.setUnixMode(t.mode)}if(t.type==="symlink"&&typeof t.linkname==="string"){e=Buffer.from(t.linkname)}return s.prototype.entry.call(this,n,e,r)};c.prototype.finalize=function(){this.finish()}},9592:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A=400){throw new Error(`(${a}) ${A}`)}return JSON.parse(A)}catch(r){const n=(0,C.errorMessage)(r);throw new Error(`Failed to ${e} ${t}: ${n}`)}}async#X(e,t){const r=5e3;for(;;){if(t.onPoll)t.onPoll();const n=await this.getOperation(e);if(n.error){throw new Error(`Operation failed: ${n.error.message}`)}if(n.done){return n}await new Promise((e=>setTimeout(e,r)))}}async getOperation(e){if(e.startsWith("operations/")){e.slice(11)}const t=`${this.#$.cloudfunctions}/${e}`;const r=await this.#Z("GET",t);return r}async create(e,t){const r=this.fullResourceName(e.name);e.name=r;if(t?.onDebug){t.onDebug((()=>`create: computed Cloud Function:\n${JSON.stringify(e,null,2)}`))}const n=this.parentFromName(r);const s=r.split("/").at(-1);const A=`${this.#$.cloudfunctions}/${n}/functions?functionId=${s}`;const a=JSON.stringify(e);const c=await this.#Z("POST",A,a);const l=await this.#X(c.name,{onPoll:t?.onPoll,onDebug:t?.onDebug});if(!l.response){throw new Error(`create operation result did not include function`)}return l.response}async delete(e,t){const r=this.fullResourceName(e);const n=`${this.#$.cloudfunctions}/${r}`;const s=await this.#Z("DELETE",n);return await this.#X(s.name,{onPoll:t?.onPoll,onDebug:t?.onDebug})}async generateUploadURL(e){const t=`${this.#$.cloudfunctions}/${e}/functions:generateUploadUrl`;const r=JSON.stringify({environment:b.GEN_2});const n=await this.#Z("POST",t,r);return n}async get(e){const t=this.fullResourceName(e);const r=`${this.#$.cloudfunctions}/${t}`;const n=await this.#Z("GET",r);return n}async getSafe(e){try{return await this.get(e)}catch(e){const t=(0,C.errorMessage)(e);if(!t.includes("404")&&!t.includes("NOT_FOUND")){throw new Error(`Failed to lookup existing function - does the caller have `+`cloudfunctions.functions.get permissions? ${e}`)}return null}}async patch(e,t){const r=this.fullResourceName(e.name);e.name=r;if(t?.onDebug){t.onDebug((()=>`patch: computed Cloud Function:\n${JSON.stringify(e,null,2)}`))}const n=this.computeUpdateMask(e);if(t?.onDebug){t.onDebug((()=>`Computed updateMask: ${n}`))}const s=`${this.#$.cloudfunctions}/${r}?updateMask=${n}`;const A=JSON.stringify(e);const a=await this.#Z("PATCH",s,A);const c=await this.#X(a.name,{onPoll:t?.onPoll,onDebug:t?.onDebug});if(!c.response){throw new Error(`patch operation result did not include function`)}return c.response}async deployFromLocalSource(e,t,r){const n=(0,c.randomBytes)(12).toString("hex");const s=u.join((0,h.tmpdir)(),`cfsrc-${n}.zip`);try{await(0,y.zipDir)(t,s,r);if(r?.onZip)r.onZip(t,s)}catch(e){throw new Error(`Zip file ${s} creation failed: ${e}`)}const A=this.fullResourceName(e.name);e.name=A;const a=this.parentFromName(A);let l;try{l=await this.generateUploadURL(a);await this.uploadSource(l.uploadUrl,s)}catch(e){throw new Error(`Failed to upload zip file: ${e}`)}await(0,C.forceRemove)(s);if(!e.buildConfig){e.buildConfig={}}if(!e.buildConfig.source){e.buildConfig.source={}}e.buildConfig.source.storageSource=l.storageSource;const g=await this.getSafe(A);if(g){if(r?.onExisting)r.onExisting();const t=await this.patch(e,{onPoll:r?.onPoll,onDebug:r?.onDebug});return t}else{if(r?.onNew)r.onNew();const t=await this.create(e,{onPoll:r?.onPoll,onDebug:r?.onDebug});return t}}async uploadSource(e,t){const r=l.default.createReadStream(t);try{const t=await this.#K.request("PUT",e,r,{"content-type":"application/zip"});const n=await t.readBody();const s=t.message.statusCode||500;if(s>=400){throw new Error(`(${s}) ${n}`)}}catch(e){const t=(0,C.errorMessage)(e);throw new Error(`Failed to upload source: ${t}`)}}fullResourceName(e){if(!e){e=""}e=e.trim();if(!e){throw new Error(`Failed to parse resource name: name cannot be empty`)}if(e.includes("/")){if(e.match(Q)){return e}else{throw new Error(`Invalid resource name '${e}'`)}}const t=this.#q;if(!t){throw new Error(`Failed to get project ID to build resource name. Try setting 'project_id'.`)}const r=this.#z;if(!r){throw new Error(`Failed to get location (region) to build resource name. Try setting 'region'.`)}return`projects/${t}/locations/${r}/functions/${e}`}parentFromName(e){const t=e.split("/");if(t.length<3){throw new Error(`Invalid or missing name '${e}' (expected 'projects/p/locations/l/functions/f')`)}const r=t.slice(0,t.length-2).join("/");return r}computeUpdateMask(e){const t=[];if(e.name!==undefined)t.push("name");if(e.description!==undefined)t.push("description");if(e.environment!==undefined)t.push("environment");if(e.kmsKeyName!==undefined)t.push("kmsKeyName");if(e.labels!==undefined)t.push("labels");if(e.buildConfig?.runtime!==undefined)t.push("buildConfig.runtime");if(e.buildConfig?.entryPoint!==undefined)t.push("buildConfig.entryPoint");if(e.buildConfig?.source!==undefined)t.push("buildConfig.source");if(e.buildConfig?.dockerRepository!==undefined)t.push("buildConfig.dockerRepository");if(e.buildConfig?.environmentVariables!==undefined)t.push("buildConfig.environmentVariables");if(e.buildConfig?.serviceAccount!==undefined)t.push("buildConfig.serviceAccount");if(e.buildConfig?.workerPool!==undefined)t.push("buildConfig.workerPool");if(e.serviceConfig?.allTrafficOnLatestRevision!==undefined)t.push("serviceConfig.allTrafficOnLatestRevision");if(e.serviceConfig?.availableCpu!==undefined)t.push("serviceConfig.availableCpu");if(e.serviceConfig?.availableMemory!==undefined)t.push("serviceConfig.availableMemory");if(e.serviceConfig?.environmentVariables!==undefined)t.push("serviceConfig.environmentVariables");if(e.serviceConfig?.ingressSettings!==undefined)t.push("serviceConfig.ingressSettings");if(e.serviceConfig?.maxInstanceCount!==undefined)t.push("serviceConfig.maxInstanceCount");if(e.serviceConfig?.maxInstanceRequestConcurrency!==undefined)t.push("serviceConfig.maxInstanceRequestConcurrency");if(e.serviceConfig?.minInstanceCount!==undefined)t.push("serviceConfig.minInstanceCount");if(e.serviceConfig?.secretEnvironmentVariables!==undefined)t.push("serviceConfig.secretEnvironmentVariables");if(e.serviceConfig?.secretVolumes!==undefined)t.push("serviceConfig.secretVolumes");if(e.serviceConfig?.serviceAccountEmail!==undefined)t.push("serviceConfig.serviceAccountEmail");if(e.serviceConfig?.timeoutSeconds!==undefined)t.push("serviceConfig.timeoutSeconds");if(e.serviceConfig?.vpcConnector!==undefined)t.push("serviceConfig.vpcConnector");if(e.serviceConfig?.vpcConnectorEgressSettings!==undefined)t.push("serviceConfig.vpcConnectorEgressSettings");if(e.eventTrigger?.triggerRegion!==undefined)t.push("eventTrigger.triggerRegion");if(e.eventTrigger?.eventType!==undefined)t.push("eventTrigger.eventType");if(e.eventTrigger?.eventFilters!==undefined)t.push("eventTrigger.eventFilters");if(e.eventTrigger?.pubsubTopic!==undefined)t.push("eventTrigger.pubsubTopic");if(e.eventTrigger?.serviceAccountEmail!==undefined)t.push("eventTrigger.serviceAccountEmail");if(e.eventTrigger?.retryPolicy!==undefined)t.push("eventTrigger.retryPolicy");if(e.eventTrigger?.channel!==undefined)t.push("eventTrigger.channel");if(e.eventTrigger?.service!==undefined)t.push("eventTrigger.service");return t.join(",")}}t.CloudFunctionsClient=CloudFunctionsClient},7355:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SecretName=void 0;class SecretName{project;name;version;constructor(e){e=(e||"").trim();if(!e){throw new Error(`Missing secret name`)}const t=e.split("/");switch(t.length){case 6:{this.project=t[1];this.name=t[3];this.version=t[5];break}case 4:{this.project=t[1];this.name=t[3];this.version="latest";break}case 3:{this.project=t[0];this.name=t[1];this.version=t[2];break}case 2:{this.project=t[0];this.name=t[1];this.version="latest";break}default:{throw new TypeError(`Failed to parse secret reference "${e}": unknown format. Secrets `+`should be of the format "projects/p/secrets/s/versions/v".`)}}}selfLink(){return`projects/${this.project}/secrets/${this.name}/versions/${this.version}`}}t.SecretName=SecretName},4527:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{if(a.ignores(e.name)){if(r?.onZipIgnoreEntry)r.onZipIgnoreEntry(e);return false}return e};return new Promise(((s,A)=>{const a=h.create("zip",{zlib:{level:7}});a.on("entry",(e=>{if(r?.onZipAddEntry)r.onZipAddEntry(e)}));a.on("warning",(e=>A(e)));a.on("error",(e=>A(e)));n.on("finish",(()=>s(t)));a.pipe(n);a.directory(e,false,ignoreFn);a.finalize()}))}function formatEntry(e){const t=e.name;const r=e.mode||"000";const n=e.sourcePath||"unknown";const s=(e.type||"unknown").toUpperCase()[0];return`[${s}] (${r}) ${t} => ${n}`}function stringToInt(e){e=(e||"").trim().replace(/[_,]/g,"");if(e===""){return undefined}const t=parseInt(e);if(isNaN(t)){throw new Error(`input "${e}" is not a number`)}return t}function parseEventTriggerFilters(e){const t=(0,g.parseKVString)(e);if(t===undefined){return undefined}const r=[];for(const[e,n]of Object.entries(t)){if(n.startsWith("PATTERN:")){r.push({attribute:e,value:n.slice(8),operator:"match-path-pattern"})}else{r.push({attribute:e,value:n})}}return r}function parseSecrets(e){const t=(0,g.parseKVString)(e);if(t===undefined){return[undefined,undefined]}const r=[];const n=[];for(const[e,s]of Object.entries(t)){const t=new C.SecretName(s);if(e.startsWith("/")){const r=l.posix.dirname(e);const s=l.posix.basename(e);n.push({mountPath:r,projectId:t.project,secret:t.name,versions:[{path:s,version:t.version}]})}else{r.push({key:e,projectId:t.project,secret:t.name,version:t.version})}}return[r,n]}},2613:e=>{"use strict";e.exports=require("assert")},290:e=>{"use strict";e.exports=require("async_hooks")},181:e=>{"use strict";e.exports=require("buffer")},5317:e=>{"use strict";e.exports=require("child_process")},4236:e=>{"use strict";e.exports=require("console")},9140:e=>{"use strict";e.exports=require("constants")},6982:e=>{"use strict";e.exports=require("crypto")},1637:e=>{"use strict";e.exports=require("diagnostics_channel")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},1943:e=>{"use strict";e.exports=require("fs/promises")},8611:e=>{"use strict";e.exports=require("http")},5675:e=>{"use strict";e.exports=require("http2")},5692:e=>{"use strict";e.exports=require("https")},9278:e=>{"use strict";e.exports=require("net")},4589:e=>{"use strict";e.exports=require("node:assert")},4573:e=>{"use strict";e.exports=require("node:buffer")},7598:e=>{"use strict";e.exports=require("node:crypto")},8474:e=>{"use strict";e.exports=require("node:events")},3024:e=>{"use strict";e.exports=require("node:fs")},1455:e=>{"use strict";e.exports=require("node:fs/promises")},7067:e=>{"use strict";e.exports=require("node:http")},4708:e=>{"use strict";e.exports=require("node:https")},7030:e=>{"use strict";e.exports=require("node:net")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},7075:e=>{"use strict";e.exports=require("node:stream")},7830:e=>{"use strict";e.exports=require("node:stream/web")},6193:e=>{"use strict";e.exports=require("node:string_decoder")},3136:e=>{"use strict";e.exports=require("node:url")},7975:e=>{"use strict";e.exports=require("node:util")},8522:e=>{"use strict";e.exports=require("node:zlib")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},2987:e=>{"use strict";e.exports=require("perf_hooks")},932:e=>{"use strict";e.exports=require("process")},3480:e=>{"use strict";e.exports=require("querystring")},2203:e=>{"use strict";e.exports=require("stream")},3774:e=>{"use strict";e.exports=require("stream/web")},3193:e=>{"use strict";e.exports=require("string_decoder")},3557:e=>{"use strict";e.exports=require("timers")},4756:e=>{"use strict";e.exports=require("tls")},2018:e=>{"use strict";e.exports=require("tty")},7016:e=>{"use strict";e.exports=require("url")},9023:e=>{"use strict";e.exports=require("util")},8253:e=>{"use strict";e.exports=require("util/types")},1493:e=>{"use strict";e.exports=require("v8")},8167:e=>{"use strict";e.exports=require("worker_threads")},3106:e=>{"use strict";e.exports=require("zlib")},7182:(e,t,r)=>{"use strict";const n=r(7075).Writable;const s=r(7975).inherits;const A=r(4136);const a=r(612);const c=r(2271);const l=45;const u=Buffer.from("-");const h=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}n.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.headerFirst;this._dashes=0;this._parts=0;this._finished=false;this._realFinish=false;this._isPreamble=true;this._justMatched=false;this._firstWrite=true;this._inHeader=true;this._part=undefined;this._cb=undefined;this._ignoreData=false;this._partOpts={highWaterMark:e.partHwm};this._pause=false;const t=this;this._hparser=new c(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}s(Dicer,n);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{n.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,r){if(!this._hparser&&!this._bparser){return r()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new a(this._partOpts);if(this.listenerCount("preamble")!==0){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const n=r(8474).EventEmitter;const s=r(7975).inherits;const A=r(2393);const a=r(4136);const c=Buffer.from("\r\n\r\n");const l=/\r\n/g;const u=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){n.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=A(e,"maxHeaderPairs",2e3);this.maxHeaderSize=A(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new a(c);this.ss.on("info",(function(e,r,n,s){if(r&&!t.maxed){if(t.nread+s-n>=t.maxHeaderSize){s=t.maxHeaderSize-t.nread+n;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=s-n}t.buffer+=r.toString("binary",n,s)}if(e){t._finish()}}))}s(HeaderParser,n);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};HeaderParser.prototype.reset=function(){this.finished=false;this.buffer="";this.header={};this.ss.reset()};HeaderParser.prototype._finish=function(){if(this.buffer){this._parseHeader()}this.ss.matches=this.ss.maxMatches;const e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(l);const t=e.length;let r,n;for(var s=0;s{"use strict";const n=r(7975).inherits;const s=r(7075).Readable;function PartStream(e){s.call(this,e)}n(PartStream,s);PartStream.prototype._read=function(e){};e.exports=PartStream},4136:(e,t,r)=>{"use strict";const n=r(8474).EventEmitter;const s=r(7975).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>256){throw new Error("The needle cannot have a length bigger than 256.")}this.maxMatches=Infinity;this.matches=0;this._occ=new Array(256).fill(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var r=0;r=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const r=this._lookbehind_size+A;if(r>0){this.emit("info",false,this._lookbehind,0,r)}this._lookbehind.copy(this._lookbehind,0,r,this._lookbehind_size-r);this._lookbehind_size-=r;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}A+=(A>=0)*this._bufpos;if(e.indexOf(r,A)!==-1){A=e.indexOf(r,A);++this.matches;if(A>0){this.emit("info",true,e,this._bufpos,A)}else{this.emit("info",true)}return this._bufpos=A+n}else{A=t-n}while(A0){this.emit("info",false,e,this._bufpos,A{"use strict";const n=r(7075).Writable;const{inherits:s}=r(7975);const A=r(7182);const a=r(1192);const c=r(855);const l=r(8929);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...r}=e;this.opts={autoDestroy:false,...r};n.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}s(Busboy,n);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}n.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=l(e["content-type"]);const r={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(a.detect.test(t[0])){return new a(this,r)}if(c.detect.test(t[0])){return new c(this,r)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,r){this._parser.write(e,r)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=A},1192:(e,t,r)=>{"use strict";const{Readable:n}=r(7075);const{inherits:s}=r(7975);const A=r(7182);const a=r(8929);const c=r(2747);const l=r(692);const u=r(2393);const h=/^boundary$/i;const g=/^form-data$/i;const p=/^charset$/i;const C=/^filename$/i;const y=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let r;let n;const s=this;let I;const B=t.limits;const Q=t.isPartAFile||((e,t,r)=>t==="application/octet-stream"||r!==undefined);const b=t.parsedConType||[];const w=t.defCharset||"utf8";const S=t.preservePath;const k={highWaterMark:t.fileHwm};for(r=0,n=b.length;rN){s.parser.removeListener("part",onPart);s.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(U){const e=U;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(A){let u;let h;let I;let B;let b;let N;let T=0;if(A["content-type"]){I=a(A["content-type"][0]);if(I[0]){u=I[0].toLowerCase();for(r=0,n=I.length;rR){const n=R-T+e.length;if(n>0){r.push(e.slice(0,n))}r.truncated=true;r.bytesRead=R;t.removeAllListeners("data");r.emit("limit");return}else if(!r.push(e)){s._pause=true}r.bytesRead=T};P=function(){O=undefined;r.push(null)}}else{if(M===_){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++M;++x;let r="";let n=false;U=t;F=function(e){if((T+=e.length)>v){const s=v-(T-e.length);r+=e.toString("binary",0,s);n=true;t.removeAllListeners("data")}else{r+=e.toString("binary")}};P=function(){U=undefined;if(r.length){r=c(r,"binary",B)}e.emit("field",h,r,false,n,b,u);--x;checkFinished()}}t._readableState.sync=false;t.on("data",F);t.on("end",P)})).on("error",(function(e){if(O){O.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){P=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const r=this.parser.write(e);if(r&&!this._pause){t()}else{this._needDrain=!r;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){n.call(this,e);this.bytesRead=0;this.truncated=false}s(FileStream,n);FileStream.prototype._read=function(e){};e.exports=Multipart},855:(e,t,r)=>{"use strict";const n=r(1496);const s=r(2747);const A=r(2393);const a=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const r=t.limits;const s=t.parsedConType;this.boy=e;this.fieldSizeLimit=A(r,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=A(r,"fieldNameSize",100);this.fieldsLimit=A(r,"fields",Infinity);let c;for(var l=0,u=s.length;la){this._key+=this.decoder.write(e.toString("binary",a,r))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();a=r+1}else if(n!==undefined){++this._fields;let r;const A=this._keyTrunc;if(n>a){r=this._key+=this.decoder.write(e.toString("binary",a,n))}else{r=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(r.length){this.boy.emit("field",s(r,"binary",this.charset),"",A,false)}a=n+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(A>a){this._key+=this.decoder.write(e.toString("binary",a,A))}a=A;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(aa){this._val+=this.decoder.write(e.toString("binary",a,n))}this.boy.emit("field",s(this._key,"binary",this.charset),s(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc);this._state="key";this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();a=n+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(A>a){this._val+=this.decoder.write(e.toString("binary",a,A))}a=A;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(a0){this.boy.emit("field",s(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",s(this._key,"binary",this.charset),s(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},1496:e=>{"use strict";const t=/\+/g;const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Decoder(){this.buffer=undefined}Decoder.prototype.write=function(e){e=e.replace(t," ");let n="";let s=0;let A=0;const a=e.length;for(;sA){n+=e.substring(A,s);A=s}this.buffer="";++A}}if(A{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},2747:function(e){"use strict";const t=new TextDecoder("utf-8");const r=new Map([["utf-8",t],["utf8",t]]);function getDecoder(e){let t;while(true){switch(e){case"utf-8":case"utf8":return n.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return n.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return n.utf16le;case"base64":return n.base64;default:if(t===undefined){t=true;e=e.toLowerCase();continue}return n.other.bind(e)}}}const n={utf8:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.utf8Slice(0,e.length)},latin1:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){return e}return e.latin1Slice(0,e.length)},utf16le:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.ucs2Slice(0,e.length)},base64:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.base64Slice(0,e.length)},other:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}if(r.has(this.toString())){try{return r.get(this).decode(e)}catch{}}return typeof e==="string"?e:e.toString()}};function decodeText(e,t,r){if(e){return getDecoder(r)(e,t)}return e}e.exports=decodeText},2393:e=>{"use strict";e.exports=function getLimit(e,t,r){if(!e||e[t]===undefined||e[t]===null){return r}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},8929:(e,t,r)=>{"use strict";const n=r(2747);const s=/%[a-fA-F0-9][a-fA-F0-9]/g;const A={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"","%08":"\b","%09":"\t","%0a":"\n","%0A":"\n","%0b":"\v","%0B":"\v","%0c":"\f","%0C":"\f","%0d":"\r","%0D":"\r","%0e":"","%0E":"","%0f":"","%0F":"","%10":"","%11":"","%12":"","%13":"","%14":"","%15":"","%16":"","%17":"","%18":"","%19":"","%1a":"","%1A":"","%1b":"","%1B":"","%1c":"","%1C":"","%1d":"","%1D":"","%1e":"","%1E":"","%1f":"","%1F":"","%20":" ","%21":"!","%22":'"',"%23":"#","%24":"$","%25":"%","%26":"&","%27":"'","%28":"(","%29":")","%2a":"*","%2A":"*","%2b":"+","%2B":"+","%2c":",","%2C":",","%2d":"-","%2D":"-","%2e":".","%2E":".","%2f":"/","%2F":"/","%30":"0","%31":"1","%32":"2","%33":"3","%34":"4","%35":"5","%36":"6","%37":"7","%38":"8","%39":"9","%3a":":","%3A":":","%3b":";","%3B":";","%3c":"<","%3C":"<","%3d":"=","%3D":"=","%3e":">","%3E":">","%3f":"?","%3F":"?","%40":"@","%41":"A","%42":"B","%43":"C","%44":"D","%45":"E","%46":"F","%47":"G","%48":"H","%49":"I","%4a":"J","%4A":"J","%4b":"K","%4B":"K","%4c":"L","%4C":"L","%4d":"M","%4D":"M","%4e":"N","%4E":"N","%4f":"O","%4F":"O","%50":"P","%51":"Q","%52":"R","%53":"S","%54":"T","%55":"U","%56":"V","%57":"W","%58":"X","%59":"Y","%5a":"Z","%5A":"Z","%5b":"[","%5B":"[","%5c":"\\","%5C":"\\","%5d":"]","%5D":"]","%5e":"^","%5E":"^","%5f":"_","%5F":"_","%60":"`","%61":"a","%62":"b","%63":"c","%64":"d","%65":"e","%66":"f","%67":"g","%68":"h","%69":"i","%6a":"j","%6A":"j","%6b":"k","%6B":"k","%6c":"l","%6C":"l","%6d":"m","%6D":"m","%6e":"n","%6E":"n","%6f":"o","%6F":"o","%70":"p","%71":"q","%72":"r","%73":"s","%74":"t","%75":"u","%76":"v","%77":"w","%78":"x","%79":"y","%7a":"z","%7A":"z","%7b":"{","%7B":"{","%7c":"|","%7C":"|","%7d":"}","%7D":"}","%7e":"~","%7E":"~","%7f":"","%7F":"","%80":"€","%81":"","%82":"‚","%83":"ƒ","%84":"„","%85":"…","%86":"†","%87":"‡","%88":"ˆ","%89":"‰","%8a":"Š","%8A":"Š","%8b":"‹","%8B":"‹","%8c":"Œ","%8C":"Œ","%8d":"","%8D":"","%8e":"Ž","%8E":"Ž","%8f":"","%8F":"","%90":"","%91":"‘","%92":"’","%93":"“","%94":"”","%95":"•","%96":"–","%97":"—","%98":"˜","%99":"™","%9a":"š","%9A":"š","%9b":"›","%9B":"›","%9c":"œ","%9C":"œ","%9d":"","%9D":"","%9e":"ž","%9E":"ž","%9f":"Ÿ","%9F":"Ÿ","%a0":" ","%A0":" ","%a1":"¡","%A1":"¡","%a2":"¢","%A2":"¢","%a3":"£","%A3":"£","%a4":"¤","%A4":"¤","%a5":"¥","%A5":"¥","%a6":"¦","%A6":"¦","%a7":"§","%A7":"§","%a8":"¨","%A8":"¨","%a9":"©","%A9":"©","%aa":"ª","%Aa":"ª","%aA":"ª","%AA":"ª","%ab":"«","%Ab":"«","%aB":"«","%AB":"«","%ac":"¬","%Ac":"¬","%aC":"¬","%AC":"¬","%ad":"­","%Ad":"­","%aD":"­","%AD":"­","%ae":"®","%Ae":"®","%aE":"®","%AE":"®","%af":"¯","%Af":"¯","%aF":"¯","%AF":"¯","%b0":"°","%B0":"°","%b1":"±","%B1":"±","%b2":"²","%B2":"²","%b3":"³","%B3":"³","%b4":"´","%B4":"´","%b5":"µ","%B5":"µ","%b6":"¶","%B6":"¶","%b7":"·","%B7":"·","%b8":"¸","%B8":"¸","%b9":"¹","%B9":"¹","%ba":"º","%Ba":"º","%bA":"º","%BA":"º","%bb":"»","%Bb":"»","%bB":"»","%BB":"»","%bc":"¼","%Bc":"¼","%bC":"¼","%BC":"¼","%bd":"½","%Bd":"½","%bD":"½","%BD":"½","%be":"¾","%Be":"¾","%bE":"¾","%BE":"¾","%bf":"¿","%Bf":"¿","%bF":"¿","%BF":"¿","%c0":"À","%C0":"À","%c1":"Á","%C1":"Á","%c2":"Â","%C2":"Â","%c3":"Ã","%C3":"Ã","%c4":"Ä","%C4":"Ä","%c5":"Å","%C5":"Å","%c6":"Æ","%C6":"Æ","%c7":"Ç","%C7":"Ç","%c8":"È","%C8":"È","%c9":"É","%C9":"É","%ca":"Ê","%Ca":"Ê","%cA":"Ê","%CA":"Ê","%cb":"Ë","%Cb":"Ë","%cB":"Ë","%CB":"Ë","%cc":"Ì","%Cc":"Ì","%cC":"Ì","%CC":"Ì","%cd":"Í","%Cd":"Í","%cD":"Í","%CD":"Í","%ce":"Î","%Ce":"Î","%cE":"Î","%CE":"Î","%cf":"Ï","%Cf":"Ï","%cF":"Ï","%CF":"Ï","%d0":"Ð","%D0":"Ð","%d1":"Ñ","%D1":"Ñ","%d2":"Ò","%D2":"Ò","%d3":"Ó","%D3":"Ó","%d4":"Ô","%D4":"Ô","%d5":"Õ","%D5":"Õ","%d6":"Ö","%D6":"Ö","%d7":"×","%D7":"×","%d8":"Ø","%D8":"Ø","%d9":"Ù","%D9":"Ù","%da":"Ú","%Da":"Ú","%dA":"Ú","%DA":"Ú","%db":"Û","%Db":"Û","%dB":"Û","%DB":"Û","%dc":"Ü","%Dc":"Ü","%dC":"Ü","%DC":"Ü","%dd":"Ý","%Dd":"Ý","%dD":"Ý","%DD":"Ý","%de":"Þ","%De":"Þ","%dE":"Þ","%DE":"Þ","%df":"ß","%Df":"ß","%dF":"ß","%DF":"ß","%e0":"à","%E0":"à","%e1":"á","%E1":"á","%e2":"â","%E2":"â","%e3":"ã","%E3":"ã","%e4":"ä","%E4":"ä","%e5":"å","%E5":"å","%e6":"æ","%E6":"æ","%e7":"ç","%E7":"ç","%e8":"è","%E8":"è","%e9":"é","%E9":"é","%ea":"ê","%Ea":"ê","%eA":"ê","%EA":"ê","%eb":"ë","%Eb":"ë","%eB":"ë","%EB":"ë","%ec":"ì","%Ec":"ì","%eC":"ì","%EC":"ì","%ed":"í","%Ed":"í","%eD":"í","%ED":"í","%ee":"î","%Ee":"î","%eE":"î","%EE":"î","%ef":"ï","%Ef":"ï","%eF":"ï","%EF":"ï","%f0":"ð","%F0":"ð","%f1":"ñ","%F1":"ñ","%f2":"ò","%F2":"ò","%f3":"ó","%F3":"ó","%f4":"ô","%F4":"ô","%f5":"õ","%F5":"õ","%f6":"ö","%F6":"ö","%f7":"÷","%F7":"÷","%f8":"ø","%F8":"ø","%f9":"ù","%F9":"ù","%fa":"ú","%Fa":"ú","%fA":"ú","%FA":"ú","%fb":"û","%Fb":"û","%fB":"û","%FB":"û","%fc":"ü","%Fc":"ü","%fC":"ü","%FC":"ü","%fd":"ý","%Fd":"ý","%fD":"ý","%FD":"ý","%fe":"þ","%Fe":"þ","%fE":"þ","%FE":"þ","%ff":"ÿ","%Ff":"ÿ","%fF":"ÿ","%FF":"ÿ"};function encodedReplacer(e){return A[e]}const a=0;const c=1;const l=2;const u=3;function parseParams(e){const t=[];let r=a;let A="";let h=false;let g=false;let p=0;let C="";const y=e.length;for(var I=0;I{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GCE_LINUX_BIOS_PATHS=void 0;t.isGoogleCloudServerless=isGoogleCloudServerless;t.isGoogleComputeEngineLinux=isGoogleComputeEngineLinux;t.isGoogleComputeEngineMACAddress=isGoogleComputeEngineMACAddress;t.isGoogleComputeEngine=isGoogleComputeEngine;t.detectGCPResidency=detectGCPResidency;const n=r(9896);const s=r(857);t.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};const A=/^42:01/;function isGoogleCloudServerless(){const e=process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE;return!!e}function isGoogleComputeEngineLinux(){if((0,s.platform)()!=="linux")return false;try{(0,n.statSync)(t.GCE_LINUX_BIOS_PATHS.BIOS_DATE);const e=(0,n.readFileSync)(t.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(e)}catch{return false}}function isGoogleComputeEngineMACAddress(){const e=(0,s.networkInterfaces)();for(const t of Object.values(e)){if(!t)continue;for(const{mac:e}of t){if(A.test(e)){return true}}}return false}function isGoogleComputeEngine(){return isGoogleComputeEngineLinux()||isGoogleComputeEngineMACAddress()}function detectGCPResidency(){return isGoogleCloudServerless()||isGoogleComputeEngine()}},9595:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{switch(e){case"params":case"property":case"headers":break;case"qs":throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw new Error(`'${e}' is not a valid configuration option.`)}}))}async function metadataAccessor(e,r={},n=3,s=false){const A=new Headers(t.HEADERS);let a="";let u={};if(typeof e==="object"){const t=e;new Headers(t.headers).forEach(((e,t)=>A.set(t,e)));a=t.metadataKey;u=t.params||u;n=t.noResponseRetries||n;s=t.fastFail||s}else{a=e}if(typeof r==="string"){a+=`/${r}`}else{validate(r);if(r.property){a+=`/${r.property}`}new Headers(r.headers).forEach(((e,t)=>A.set(t,e)));u=r.params||u}const h=s?fastFailMetadataRequest:c.request;const p={url:`${getBaseUrl()}/${a}`,headers:A,retryConfig:{noResponseRetries:n},params:u,responseType:"text",timeout:requestTimeout()};g.info("instance request %j",p);const C=await h(p);g.info("instance metadata is %s",C.data);const y=C.headers.get(t.HEADER_NAME);if(y!==t.HEADER_VALUE){throw new RangeError(`Invalid response from metadata service: incorrect ${t.HEADER_NAME} header. Expected '${t.HEADER_VALUE}', got ${y?`'${y}'`:"no header"}`)}if(typeof C.data==="string"){try{return l.parse(C.data)}catch{}}return C.data}async function fastFailMetadataRequest(e){const r={...e,url:e.url?.toString().replace(getBaseUrl(),getBaseUrl(t.SECONDARY_HOST_ADDRESS))};const n=(0,c.request)(e);const s=(0,c.request)(r);return Promise.any([n,s])}function instance(e){return metadataAccessor("instance",e)}function project(e){return metadataAccessor("project",e)}function universe(e){return metadataAccessor("universe",e)}async function bulk(e){const t={};await Promise.all(e.map((e=>(async()=>{const r=await metadataAccessor(e);const n=e.metadataKey;t[n]=r})())));return t}function detectGCPAvailableRetries(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}let p;async function isAvailable(){if(process.env.METADATA_SERVER_DETECTION){const e=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(e in t.METADATA_SERVER_DETECTION)){throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${e}\`, but it should be \`${Object.keys(t.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`)}switch(e){case"assume-present":return true;case"none":return false;case"bios-only":return getGCPResidency();case"ping-only":}}try{if(p===undefined){p=metadataAccessor("instance",undefined,detectGCPAvailableRetries(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))}await p;return true}catch(e){const t=e;if(process.env.DEBUG_AUTH){console.info(t)}if(t.type==="request-timeout"){return false}if(t.response&&t.response.status===404){return false}else{if(!(t.response&&t.response.status===404)&&(!t.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(t.code.toString()))){let e="UNKNOWN";if(t.code)e=t.code.toString();process.emitWarning(`received unexpected error = ${t.message} code = ${e}`,"MetadataLookupWarning")}return false}}}function resetIsAvailableCache(){p=undefined}t.gcpResidencyCache=null;function getGCPResidency(){if(t.gcpResidencyCache===null){setGCPResidency()}return t.gcpResidencyCache}function setGCPResidency(e=null){t.gcpResidencyCache=e!==null?e:(0,u.detectGCPResidency)()}function requestTimeout(){return getGCPResidency()?0:3e3}a(r(6128),t)},2981:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Glob=void 0;const n=r(1409);const s=r(3136);const A=r(8958);const a=r(7813);const c=r(1157);const l=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Glob{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");this.withFileTypes=!!t.withFileTypes;this.signal=t.signal;this.follow=!!t.follow;this.dot=!!t.dot;this.dotRelative=!!t.dotRelative;this.nodir=!!t.nodir;this.mark=!!t.mark;if(!t.cwd){this.cwd=""}else if(t.cwd instanceof URL||t.cwd.startsWith("file://")){t.cwd=(0,s.fileURLToPath)(t.cwd)}this.cwd=t.cwd||"";this.root=t.root;this.magicalBraces=!!t.magicalBraces;this.nobrace=!!t.nobrace;this.noext=!!t.noext;this.realpath=!!t.realpath;this.absolute=t.absolute;this.includeChildMatches=t.includeChildMatches!==false;this.noglobstar=!!t.noglobstar;this.matchBase=!!t.matchBase;this.maxDepth=typeof t.maxDepth==="number"?t.maxDepth:Infinity;this.stat=!!t.stat;this.ignore=t.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof e==="string"){e=[e]}this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){e=e.map((e=>e.replace(/\\/g,"/")))}if(this.matchBase){if(t.noglobstar){throw new TypeError("base matching requires globstar")}e=e.map((e=>e.includes("/")?e:`./**/${e}`))}this.pattern=e;this.platform=t.platform||l;this.opts={...t,platform:this.platform};if(t.scurry){this.scurry=t.scurry;if(t.nocase!==undefined&&t.nocase!==t.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const e=t.platform==="win32"?A.PathScurryWin32:t.platform==="darwin"?A.PathScurryDarwin:t.platform?A.PathScurryPosix:A.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const r=this.platform==="darwin"||this.platform==="win32";const c={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const u=this.pattern.map((e=>new n.Minimatch(e,c)));const[h,g]=u.reduce(((e,t)=>{e[0].push(...t.set);e[1].push(...t.globParts);return e}),[[],[]]);this.patterns=h.map(((e,t)=>{const r=g[t];if(!r)throw new Error("invalid pattern object");return new a.Pattern(e,r,0,this.platform)}))}async walk(){return[...await new c.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new c.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new c.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new c.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}t.Glob=Glob},5197:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hasMagic=void 0;const n=r(1409);const hasMagic=(e,t={})=>{if(!Array.isArray(e)){e=[e]}for(const r of e){if(new n.Minimatch(r,t).hasMagic())return true}return false};t.hasMagic=hasMagic},5637:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Ignore=void 0;const n=r(1409);const s=r(7813);const A=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:r,noext:n,noglobstar:s,platform:a=A}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];this.platform=a;this.mmopts={dot:true,nobrace:t,nocase:r,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:true,nonegate:true};for(const t of e)this.add(t)}add(e){const t=new n.Minimatch(e,this.mmopts);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.glob=t.sync=t.iterate=t.iterateSync=t.stream=t.streamSync=t.Ignore=t.hasMagic=t.Glob=t.unescape=t.escape=void 0;t.globStreamSync=globStreamSync;t.globStream=globStream;t.globSync=globSync;t.globIterateSync=globIterateSync;t.globIterate=globIterate;const n=r(1409);const s=r(2981);const A=r(5197);var a=r(1409);Object.defineProperty(t,"escape",{enumerable:true,get:function(){return a.escape}});Object.defineProperty(t,"unescape",{enumerable:true,get:function(){return a.unescape}});var c=r(2981);Object.defineProperty(t,"Glob",{enumerable:true,get:function(){return c.Glob}});var l=r(5197);Object.defineProperty(t,"hasMagic",{enumerable:true,get:function(){return l.hasMagic}});var u=r(5637);Object.defineProperty(t,"Ignore",{enumerable:true,get:function(){return u.Ignore}});function globStreamSync(e,t={}){return new s.Glob(e,t).streamSync()}function globStream(e,t={}){return new s.Glob(e,t).stream()}function globSync(e,t={}){return new s.Glob(e,t).walkSync()}async function glob_(e,t={}){return new s.Glob(e,t).walk()}function globIterateSync(e,t={}){return new s.Glob(e,t).iterateSync()}function globIterate(e,t={}){return new s.Glob(e,t).iterate()}t.streamSync=globStreamSync;t.stream=Object.assign(globStream,{sync:globStreamSync});t.iterateSync=globIterateSync;t.iterate=Object.assign(globIterate,{sync:globIterateSync});t.sync=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});t.glob=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:t.sync,globStream:globStream,stream:t.stream,globStreamSync:globStreamSync,streamSync:t.streamSync,globIterate:globIterate,iterate:t.iterate,globIterateSync:globIterateSync,iterateSync:t.iterateSync,Glob:s.Glob,hasMagic:A.hasMagic,escape:n.escape,unescape:n.unescape});t.glob.glob=t.glob},7813:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Pattern=void 0;const n=r(1409);const isPatternList=e=>e.length>=1;const isGlobList=e=>e.length>=1;class Pattern{#ee;#te;#re;length;#ne;#ie;#se;#oe;#Ae;#ae;#ce=true;constructor(e,t,r,n){if(!isPatternList(e)){throw new TypeError("empty pattern list")}if(!isGlobList(t)){throw new TypeError("empty glob list")}if(t.length!==e.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=e.length;if(r<0||r>=this.length){throw new TypeError("index out of range")}this.#ee=e;this.#te=t;this.#re=r;this.#ne=n;if(this.#re===0){if(this.isUNC()){const[e,t,r,n,...s]=this.#ee;const[A,a,c,l,...u]=this.#te;if(s[0]===""){s.shift();u.shift()}const h=[e,t,r,n,""].join("/");const g=[A,a,c,l,""].join("/");this.#ee=[h,...s];this.#te=[g,...u];this.length=this.#ee.length}else if(this.isDrive()||this.isAbsolute()){const[e,...t]=this.#ee;const[r,...n]=this.#te;if(t[0]===""){t.shift();n.shift()}const s=e+"/";const A=r+"/";this.#ee=[s,...t];this.#te=[A,...n];this.length=this.#ee.length}}}pattern(){return this.#ee[this.#re]}isString(){return typeof this.#ee[this.#re]==="string"}isGlobstar(){return this.#ee[this.#re]===n.GLOBSTAR}isRegExp(){return this.#ee[this.#re]instanceof RegExp}globString(){return this.#se=this.#se||(this.#re===0?this.isAbsolute()?this.#te[0]+this.#te.slice(1).join("/"):this.#te.join("/"):this.#te.slice(this.#re).join("/"))}hasMore(){return this.length>this.#re+1}rest(){if(this.#ie!==undefined)return this.#ie;if(!this.hasMore())return this.#ie=null;this.#ie=new Pattern(this.#ee,this.#te,this.#re+1,this.#ne);this.#ie.#ae=this.#ae;this.#ie.#Ae=this.#Ae;this.#ie.#oe=this.#oe;return this.#ie}isUNC(){const e=this.#ee;return this.#Ae!==undefined?this.#Ae:this.#Ae=this.#ne==="win32"&&this.#re===0&&e[0]===""&&e[1]===""&&typeof e[2]==="string"&&!!e[2]&&typeof e[3]==="string"&&!!e[3]}isDrive(){const e=this.#ee;return this.#oe!==undefined?this.#oe:this.#oe=this.#ne==="win32"&&this.#re===0&&this.length>1&&typeof e[0]==="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){const e=this.#ee;return this.#ae!==undefined?this.#ae:this.#ae=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){const e=this.#ee[0];return typeof e==="string"&&this.isAbsolute()&&this.#re===0?e:""}checkFollowGlobstar(){return!(this.#re===0||!this.isGlobstar()||!this.#ce)}markFollowGlobstar(){if(this.#re===0||!this.isGlobstar()||!this.#ce)return false;this.#ce=false;return true}}t.Pattern=Pattern},7843:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Processor=t.SubWalks=t.MatchRecord=t.HasWalkedCache=void 0;const n=r(1409);class HasWalkedCache{store;constructor(e=new Map){this.store=e}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const r=e.fullpath();const n=this.store.get(r);if(n)n.add(t.globString());else this.store.set(r,new Set([t.globString()]))}}t.HasWalkedCache=HasWalkedCache;class MatchRecord{store=new Map;add(e,t,r){const n=(t?2:0)|(r?1:0);const s=this.store.get(e);this.store.set(e,s===undefined?n:n&s)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(t&2),!!(t&1)]))}}t.MatchRecord=MatchRecord;class SubWalks{store=new Map;add(e,t){if(!e.canReaddir()){return}const r=this.store.get(e);if(r){if(!r.find((e=>e.globString()===t.globString()))){r.push(t)}}else this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t){throw new Error("attempting to walk unknown path")}return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}t.SubWalks=SubWalks;class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(e,t){this.opts=e;this.follow=!!e.follow;this.dot=!!e.dot;this.hasWalkedCache=t?t.copy():new HasWalkedCache}processPatterns(e,t){this.patterns=t;const r=t.map((t=>[e,t]));for(let[e,t]of r){this.hasWalkedCache.storeWalked(e,t);const r=t.root();const s=t.isAbsolute()&&this.opts.absolute!==false;if(r){e=e.resolve(r==="/"&&this.opts.root!==undefined?this.opts.root:r);const n=t.rest();if(!n){this.matches.add(e,true,false);continue}else{t=n}}if(e.isENOENT())continue;let A;let a;let c=false;while(typeof(A=t.pattern())==="string"&&(a=t.rest())){const r=e.resolve(A);e=r;t=a;c=true}A=t.pattern();a=t.rest();if(c){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if(typeof A==="string"){const t=A===".."||A===""||A===".";this.matches.add(e.resolve(A),s,t);continue}else if(A===n.GLOBSTAR){if(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar()){this.subwalks.add(e,t)}const r=a?.pattern();const n=a?.rest();if(!a||(r===""||r===".")&&!n){this.matches.add(e,s,r===""||r===".")}else{if(r===".."){const t=e.parent||e;if(!n)this.matches.add(t,s,true);else if(!this.hasWalkedCache.hasWalked(t,n)){this.subwalks.add(t,n)}}}}else if(A instanceof RegExp){this.subwalks.add(e,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(e,t){const r=this.subwalks.get(e);const s=this.child();for(const e of t){for(const t of r){const r=t.isAbsolute();const A=t.pattern();const a=t.rest();if(A===n.GLOBSTAR){s.testGlobstar(e,t,a,r)}else if(A instanceof RegExp){s.testRegExp(e,A,a,r)}else{s.testString(e,A,a,r)}}}return s}testGlobstar(e,t,r,n){if(this.dot||!e.name.startsWith(".")){if(!t.hasMore()){this.matches.add(e,n,false)}if(e.canReaddir()){if(this.follow||!e.isSymbolicLink()){this.subwalks.add(e,t)}else if(e.isSymbolicLink()){if(r&&t.checkFollowGlobstar()){this.subwalks.add(e,r)}else if(t.markFollowGlobstar()){this.subwalks.add(e,t)}}}}if(r){const t=r.pattern();if(typeof t==="string"&&t!==".."&&t!==""&&t!=="."){this.testString(e,t,r.rest(),n)}else if(t===".."){const t=e.parent||e;this.subwalks.add(t,r)}else if(t instanceof RegExp){this.testRegExp(e,t,r.rest(),n)}}}testRegExp(e,t,r,n){if(!t.test(e.name))return;if(!r){this.matches.add(e,n,false)}else{this.subwalks.add(e,r)}}testString(e,t,r,n){if(!e.isNamed(t))return;if(!r){this.matches.add(e,n,false)}else{this.subwalks.add(e,r)}}}t.Processor=Processor},1157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GlobStream=t.GlobWalker=t.GlobUtil=void 0;const n=r(8275);const s=r(5637);const A=r(7843);const makeIgnore=(e,t)=>typeof e==="string"?new s.Ignore([e],t):Array.isArray(e)?new s.Ignore(e,t):e;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#le=[];#ue;#he;signal;maxDepth;includeChildMatches;constructor(e,t,r){this.patterns=e;this.path=t;this.opts=r;this.#he=!r.posix&&r.platform==="win32"?"\\":"/";this.includeChildMatches=r.includeChildMatches!==false;if(r.ignore||!this.includeChildMatches){this.#ue=makeIgnore(r.ignore??[],r);if(!this.includeChildMatches&&typeof this.#ue.add!=="function"){const e="cannot ignore child matches, ignore lacks add() method.";throw new Error(e)}}this.maxDepth=r.maxDepth||Infinity;if(r.signal){this.signal=r.signal;this.signal.addEventListener("abort",(()=>{this.#le.length=0}))}}#fe(e){return this.seen.has(e)||!!this.#ue?.ignored?.(e)}#de(e){return!!this.#ue?.childrenIgnored?.(e)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let e=undefined;while(!this.paused&&(e=this.#le.shift())){e()}}onResume(e){if(this.signal?.aborted)return;if(!this.paused){e()}else{this.#le.push(e)}}async matchCheck(e,t){if(t&&this.opts.nodir)return undefined;let r;if(this.opts.realpath){r=e.realpathCached()||await e.realpath();if(!r)return undefined;e=r}const n=e.isUnknown()||this.opts.stat;const s=n?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){const e=await s.realpath();if(e&&(e.isUnknown()||this.opts.stat)){await e.lstat()}}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===Infinity||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#fe(e)?e:undefined}matchCheckSync(e,t){if(t&&this.opts.nodir)return undefined;let r;if(this.opts.realpath){r=e.realpathCached()||e.realpathSync();if(!r)return undefined;e=r}const n=e.isUnknown()||this.opts.stat;const s=n?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){const e=s.realpathSync();if(e&&(e?.isUnknown()||this.opts.stat)){e.lstatSync()}}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#fe(e))return;if(!this.includeChildMatches&&this.#ue?.add){const t=`${e.relativePosix()}/**`;this.#ue.add(t)}const r=this.opts.absolute===undefined?t:this.opts.absolute;this.seen.add(e);const n=this.opts.mark&&e.isDirectory()?this.#he:"";if(this.opts.withFileTypes){this.matchEmit(e)}else if(r){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+n)}else{const t=this.opts.posix?e.relativePosix():e.relative();const r=this.opts.dotRelative&&!t.startsWith(".."+this.#he)?"."+this.#he:"";this.matchEmit(!t?"."+n:r+t+n)}}async match(e,t,r){const n=await this.matchCheck(e,r);if(n)this.matchFinish(n,t)}matchSync(e,t,r){const n=this.matchCheckSync(e,r);if(n)this.matchFinish(n,t)}walkCB(e,t,r){if(this.signal?.aborted)r();this.walkCB2(e,t,new A.Processor(this.opts),r)}walkCB2(e,t,r,n){if(this.#de(e))return n();if(this.signal?.aborted)n();if(this.paused){this.onResume((()=>this.walkCB2(e,t,r,n)));return}r.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;s++;this.match(e,t,n).then((()=>next()))}for(const e of r.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirCached();if(e.calledReaddir())this.walkCB3(e,t,r,next);else{e.readdirCB(((t,n)=>this.walkCB3(e,n,r,next)),true)}}next()}walkCB3(e,t,r,n){r=r.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;s++;this.match(e,t,n).then((()=>next()))}for(const[e,t]of r.subwalks.entries()){s++;this.walkCB2(e,t,r.child(),next)}next()}walkCBSync(e,t,r){if(this.signal?.aborted)r();this.walkCB2Sync(e,t,new A.Processor(this.opts),r)}walkCB2Sync(e,t,r,n){if(this.#de(e))return n();if(this.signal?.aborted)n();if(this.paused){this.onResume((()=>this.walkCB2Sync(e,t,r,n)));return}r.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;this.matchSync(e,t,n)}for(const e of r.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirSync();this.walkCB3Sync(e,t,r,next)}next()}walkCB3Sync(e,t,r,n){r=r.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;this.matchSync(e,t,n)}for(const[e,t]of r.subwalks.entries()){s++;this.walkCB2Sync(e,t,r.child(),next)}next()}}t.GlobUtil=GlobUtil;class GlobWalker extends GlobUtil{matches=new Set;constructor(e,t,r){super(e,t,r)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){t(this.signal.reason)}else{e(this.matches)}}))}));return this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason}));return this.matches}}t.GlobWalker=GlobWalker;class GlobStream extends GlobUtil{results;constructor(e,t,r){super(e,t,r);this.results=new n.Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e);if(!this.results.flowing)this.pause()}stream(){const e=this.path;if(e.isUnknown()){e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(e,this.patterns,(()=>this.results.end()))}return this.results}streamSync(){if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>this.results.end()));return this.results}}t.GlobStream=GlobStream},8895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertValidPattern=void 0;const r=1024*64;const assertValidPattern=e=>{if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>r){throw new TypeError("pattern is too long")}};t.assertValidPattern=assertValidPattern},3238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.AST=void 0;const n=r(5192);const s=r(9829);const A=new Set(["!","?","+","*","@"]);const isExtglobType=e=>A.has(e);const a="(?!(?:^|/)\\.\\.?(?:$|/))";const c="(?!\\.)";const l=new Set(["[","."]);const u=new Set(["..","."]);const h=new Set("().*{}+?[]^$\\!");const regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const g="[^/]";const p=g+"*?";const C=g+"+?";class AST{type;#ge;#pe;#Ee=false;#Ce=[];#ye;#Ie;#Be;#Qe=false;#me;#be;#we=false;constructor(e,t,r={}){this.type=e;if(e)this.#pe=true;this.#ye=t;this.#ge=this.#ye?this.#ye.#ge:this;this.#me=this.#ge===this?r:this.#ge.#me;this.#Be=this.#ge===this?[]:this.#ge.#Be;if(e==="!"&&!this.#ge.#Qe)this.#Be.push(this);this.#Ie=this.#ye?this.#ye.#Ce.length:0}get hasMagic(){if(this.#pe!==undefined)return this.#pe;for(const e of this.#Ce){if(typeof e==="string")continue;if(e.type||e.hasMagic)return this.#pe=true}return this.#pe}toString(){if(this.#be!==undefined)return this.#be;if(!this.type){return this.#be=this.#Ce.map((e=>String(e))).join("")}else{return this.#be=this.type+"("+this.#Ce.map((e=>String(e))).join("|")+")"}}#Se(){if(this!==this.#ge)throw new Error("should only call on root");if(this.#Qe)return this;this.toString();this.#Qe=true;let e;while(e=this.#Be.pop()){if(e.type!=="!")continue;let t=e;let r=t.#ye;while(r){for(let n=t.#Ie+1;!r.type&&ntypeof e==="string"?e:e.toJSON())):[this.type,...this.#Ce.map((e=>e.toJSON()))];if(this.isStart()&&!this.type)e.unshift([]);if(this.isEnd()&&(this===this.#ge||this.#ge.#Qe&&this.#ye?.type==="!")){e.push({})}return e}isStart(){if(this.#ge===this)return true;if(!this.#ye?.isStart())return false;if(this.#Ie===0)return true;const e=this.#ye;for(let t=0;t{const[n,s,A,a]=typeof t==="string"?AST.#ve(t,this.#pe,r):t.toRegExpSource(e);this.#pe=this.#pe||A;this.#Ee=this.#Ee||a;return n})).join("");let A="";if(this.isStart()){if(typeof this.#Ce[0]==="string"){const r=this.#Ce.length===1&&u.has(this.#Ce[0]);if(!r){const r=l;const s=t&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4));const u=!t&&!e&&r.has(n.charAt(0));A=s?a:u?c:""}}}let h="";if(this.isEnd()&&this.#ge.#Qe&&this.#ye?.type==="!"){h="(?:$|\\/)"}const g=A+n+h;return[g,(0,s.unescape)(n),this.#pe=!!this.#pe,this.#Ee]}const r=this.type==="*"||this.type==="+";const n=this.type==="!"?"(?:(?!(?:":"(?:";let A=this.#Re(t);if(this.isStart()&&this.isEnd()&&!A&&this.type!=="!"){const e=this.toString();this.#Ce=[e];this.type=null;this.#pe=undefined;return[e,(0,s.unescape)(this.toString()),false,false]}let h=!r||e||t||!c?"":this.#Re(true);if(h===A){h=""}if(h){A=`(?:${A})(?:${h})*?`}let g="";if(this.type==="!"&&this.#we){g=(this.isStart()&&!t?c:"")+C}else{const r=this.type==="!"?"))"+(this.isStart()&&!t&&!e?c:"")+p+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&h?")":this.type==="*"&&h?`)?`:`)${this.type}`;g=n+A+r}return[g,(0,s.unescape)(A),this.#pe=!!this.#pe,this.#Ee]}#Re(e){return this.#Ce.map((t=>{if(typeof t==="string"){throw new Error("string type in extglob ast??")}const[r,n,s,A]=t.toRegExpSource(e);this.#Ee=this.#Ee||A;return r})).filter((e=>!(this.isStart()&&this.isEnd())||!!e)).join("|")}static#ve(e,t,r=false){let A=false;let a="";let c=false;for(let s=0;s{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseClass=void 0;const r={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x"+"00-\\x"+"7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]};const braceEscape=e=>e.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=e=>e.join("");const parseClass=(e,t)=>{const n=t;if(e.charAt(n)!=="["){throw new Error("not in a brace expression")}const s=[];const A=[];let a=n+1;let c=false;let l=false;let u=false;let h=false;let g=n;let p="";e:while(ap){s.push(braceEscape(p)+"-"+braceEscape(t))}else if(t===p){s.push(braceEscape(t))}p="";a++;continue}if(e.startsWith("-]",a+1)){s.push(braceEscape(t+"-"));a+=2;continue}if(e.startsWith("-",a+1)){p=t;a+=2;continue}s.push(braceEscape(t));a++}if(g{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.escape=void 0;const escape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");t.escape=escape},1409:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.unescape=t.escape=t.AST=t.Minimatch=t.match=t.makeRe=t.braceExpand=t.defaults=t.filter=t.GLOBSTAR=t.sep=t.minimatch=void 0;const s=n(r(8497));const A=r(8895);const a=r(3238);const c=r(6726);const l=r(9829);const minimatch=(e,t,r={})=>{(0,A.assertValidPattern)(t);if(!r.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,r).match(e)};t.minimatch=minimatch;const u=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=e=>t=>!t.startsWith(".")&&t.endsWith(e);const starDotExtTestDot=e=>t=>t.endsWith(e);const starDotExtTestNocase=e=>{e=e.toLowerCase();return t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)};const starDotExtTestNocaseDot=e=>{e=e.toLowerCase();return t=>t.toLowerCase().endsWith(e)};const h=/^\*+\.\*+$/;const starDotStarTest=e=>!e.startsWith(".")&&e.includes(".");const starDotStarTestDot=e=>e!=="."&&e!==".."&&e.includes(".");const g=/^\.\*+$/;const dotStarTest=e=>e!=="."&&e!==".."&&e.startsWith(".");const p=/^\*+$/;const starTest=e=>e.length!==0&&!e.startsWith(".");const starTestDot=e=>e.length!==0&&e!=="."&&e!=="..";const C=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([e,t=""])=>{const r=qmarksTestNoExt([e]);if(!t)return r;t=t.toLowerCase();return e=>r(e)&&e.toLowerCase().endsWith(t)};const qmarksTestNocaseDot=([e,t=""])=>{const r=qmarksTestNoExtDot([e]);if(!t)return r;t=t.toLowerCase();return e=>r(e)&&e.toLowerCase().endsWith(t)};const qmarksTestDot=([e,t=""])=>{const r=qmarksTestNoExtDot([e]);return!t?r:e=>r(e)&&e.endsWith(t)};const qmarksTest=([e,t=""])=>{const r=qmarksTestNoExt([e]);return!t?r:e=>r(e)&&e.endsWith(t)};const qmarksTestNoExt=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")};const qmarksTestNoExtDot=([e])=>{const t=e.length;return e=>e.length===t&&e!=="."&&e!==".."};const y=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const I={win32:{sep:"\\"},posix:{sep:"/"}};t.sep=y==="win32"?I.win32.sep:I.posix.sep;t.minimatch.sep=t.sep;t.GLOBSTAR=Symbol("globstar **");t.minimatch.GLOBSTAR=t.GLOBSTAR;const B="[^/]";const Q=B+"*?";const b="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const w="(?:(?!(?:\\/|^)\\.).)*?";const filter=(e,r={})=>n=>(0,t.minimatch)(n,e,r);t.filter=filter;t.minimatch.filter=t.filter;const ext=(e,t={})=>Object.assign({},e,t);const defaults=e=>{if(!e||typeof e!=="object"||!Object.keys(e).length){return t.minimatch}const r=t.minimatch;const m=(t,n,s={})=>r(t,n,ext(e,s));return Object.assign(m,{Minimatch:class Minimatch extends r.Minimatch{constructor(t,r={}){super(t,ext(e,r))}static defaults(t){return r.defaults(ext(e,t)).Minimatch}},AST:class AST extends r.AST{constructor(t,r,n={}){super(t,r,ext(e,n))}static fromGlob(t,n={}){return r.AST.fromGlob(t,ext(e,n))}},unescape:(t,n={})=>r.unescape(t,ext(e,n)),escape:(t,n={})=>r.escape(t,ext(e,n)),filter:(t,n={})=>r.filter(t,ext(e,n)),defaults:t=>r.defaults(ext(e,t)),makeRe:(t,n={})=>r.makeRe(t,ext(e,n)),braceExpand:(t,n={})=>r.braceExpand(t,ext(e,n)),match:(t,n,s={})=>r.match(t,n,ext(e,s)),sep:r.sep,GLOBSTAR:t.GLOBSTAR})};t.defaults=defaults;t.minimatch.defaults=t.defaults;const braceExpand=(e,t={})=>{(0,A.assertValidPattern)(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return(0,s.default)(e)};t.braceExpand=braceExpand;t.minimatch.braceExpand=t.braceExpand;const makeRe=(e,t={})=>new Minimatch(e,t).makeRe();t.makeRe=makeRe;t.minimatch.makeRe=t.makeRe;const match=(e,t,r={})=>{const n=new Minimatch(t,r);e=e.filter((e=>n.match(e)));if(n.options.nonull&&!e.length){e.push(t)}return e};t.match=match;t.minimatch.match=t.match;const S=/[?*]|[+@!]\(.*?\)|\[|\]/;const regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,A.assertValidPattern)(e);t=t||{};this.options=t;this.pattern=e;this.platform=t.platform||y;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!t.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!t.nonegate;this.comment=false;this.empty=false;this.partial=!!t.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=t.windowsNoMagicRoot!==undefined?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase);this.globSet=[];this.globParts=[];this.set=[];this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1){return true}for(const e of this.set){for(const t of e){if(typeof t!=="string")return true}}return false}debug(...e){}make(){const e=this.pattern;const t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(t.debug){this.debug=(...e)=>console.error(...e)}this.debug(this.pattern,this.globSet);const r=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(r);this.debug(this.pattern,this.globParts);let n=this.globParts.map(((e,t,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=e[0]===""&&e[1]===""&&(e[2]==="?"||!S.test(e[2]))&&!S.test(e[3]);const r=/^[a-z]:/i.test(e[0]);if(t){return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))]}else if(r){return[e[0],...e.slice(1).map((e=>this.parse(e)))]}}return e.map((e=>this.parse(e)))}));this.debug(this.pattern,n);this.set=n.filter((e=>e.indexOf(false)===-1));if(this.isWindows){for(let e=0;e=2){e=this.firstPhasePreProcess(e);e=this.secondPhasePreProcess(e)}else if(t>=1){e=this.levelOneOptimize(e)}else{e=this.adjascentGlobstarOptimize(e)}return e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;while(-1!==(t=e.indexOf("**",t+1))){let r=t;while(e[r+1]==="**"){r++}if(r!==t){e.splice(t,r-t)}}return e}))}levelOneOptimize(e){return e.map((e=>{e=e.reduce(((e,t)=>{const r=e[e.length-1];if(t==="**"&&r==="**"){return e}if(t===".."){if(r&&r!==".."&&r!=="."&&r!=="**"){e.pop();return e}}e.push(t);return e}),[]);return e.length===0?[""]:e}))}levelTwoFileOptimize(e){if(!Array.isArray(e)){e=this.slashSplit(e)}let t=false;do{t=false;if(!this.preserveMultipleSlashes){for(let r=1;rn){r.splice(n+1,s-n)}let A=r[n+1];const a=r[n+2];const c=r[n+3];if(A!=="..")continue;if(!a||a==="."||a===".."||!c||c==="."||c===".."){continue}t=true;r.splice(n,1);const l=r.slice(0);l[n]="**";e.push(l);n--}if(!this.preserveMultipleSlashes){for(let e=1;ee.length))}partsMatch(e,t,r=false){let n=0;let s=0;let A=[];let a="";while(na){r=r.slice(c)}else if(a>c){e=e.slice(a)}}}}const{optimizationLevel:A=1}=this.options;if(A>=2){e=this.levelTwoFileOptimize(e)}this.debug("matchOne",this,{file:e,pattern:r});this.debug("matchOne",e.length,r.length);for(var a=0,c=0,l=e.length,u=r.length;a>> no match, partial?",e,p,r,C);if(p===l){return true}}return false}let A;if(typeof h==="string"){A=g===h;this.debug("string match",h,g,A)}else{A=h.test(g);this.debug("pattern match",h,g,A)}if(!A)return false}if(a===l&&c===u){return true}else if(a===l){return n}else if(c===u){return a===l-1&&e[a]===""}else{throw new Error("wtf?")}}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(e){(0,A.assertValidPattern)(e);const r=this.options;if(e==="**")return t.GLOBSTAR;if(e==="")return"";let n;let s=null;if(n=e.match(p)){s=r.dot?starTestDot:starTest}else if(n=e.match(u)){s=(r.nocase?r.dot?starDotExtTestNocaseDot:starDotExtTestNocase:r.dot?starDotExtTestDot:starDotExtTest)(n[1])}else if(n=e.match(C)){s=(r.nocase?r.dot?qmarksTestNocaseDot:qmarksTestNocase:r.dot?qmarksTestDot:qmarksTest)(n)}else if(n=e.match(h)){s=r.dot?starDotStarTestDot:starDotStarTest}else if(n=e.match(g)){s=dotStarTest}const c=a.AST.fromGlob(e,this.options).toMMPattern();if(s&&typeof c==="object"){Reflect.defineProperty(c,"test",{value:s})}return c}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const e=this.set;if(!e.length){this.regexp=false;return this.regexp}const r=this.options;const n=r.noglobstar?Q:r.dot?b:w;const s=new Set(r.nocase?["i"]:[]);let A=e.map((e=>{const r=e.map((e=>{if(e instanceof RegExp){for(const t of e.flags.split(""))s.add(t)}return typeof e==="string"?regExpEscape(e):e===t.GLOBSTAR?t.GLOBSTAR:e._src}));r.forEach(((e,s)=>{const A=r[s+1];const a=r[s-1];if(e!==t.GLOBSTAR||a===t.GLOBSTAR){return}if(a===undefined){if(A!==undefined&&A!==t.GLOBSTAR){r[s+1]="(?:\\/|"+n+"\\/)?"+A}else{r[s]=n}}else if(A===undefined){r[s-1]=a+"(?:\\/|"+n+")?"}else if(A!==t.GLOBSTAR){r[s-1]=a+"(?:\\/|\\/"+n+"\\/)"+A;r[s+1]=t.GLOBSTAR}}));return r.filter((e=>e!==t.GLOBSTAR)).join("/")})).join("|");const[a,c]=e.length>1?["(?:",")"]:["",""];A="^"+a+A+c+"$";if(this.negate)A="^(?!"+A+").+$";try{this.regexp=new RegExp(A,[...s].join(""))}catch(e){this.regexp=false}return this.regexp}slashSplit(e){if(this.preserveMultipleSlashes){return e.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(e)){return["",...e.split(/\/+/)]}else{return e.split(/\/+/)}}match(e,t=this.partial){this.debug("match",e,this.pattern);if(this.comment){return false}if(this.empty){return e===""}if(e==="/"&&t){return true}const r=this.options;if(this.isWindows){e=e.split("\\").join("/")}const n=this.slashSplit(e);this.debug(this.pattern,"split",n);const s=this.set;this.debug(this.pattern,"set",s);let A=n[n.length-1];if(!A){for(let e=n.length-2;!A&&e>=0;e--){A=n[e]}}for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unescape=void 0;const unescape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");t.unescape=unescape},2477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.LRUCache=void 0;const r=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const n=new Set;const s=typeof process==="object"&&!!process?process:{};const emitWarning=(e,t,r,n)=>{typeof s.emitWarning==="function"?s.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let A=globalThis.AbortController;let a=globalThis.AbortSignal;if(typeof A==="undefined"){a=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(e,t){this._onabort.push(t)}};A=class AbortController{constructor(){warnACPolyfill()}signal=new a;abort(e){if(this.signal.aborted)return;this.signal.reason=e;this.signal.aborted=true;for(const t of this.signal._onabort){t(e)}this.signal.onabort?.(e)}};let e=s.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!e)return;e=false;emitWarning("AbortController is not defined. If using lru-cache in "+"node 14, load an AbortController polyfill from the "+"`node-abort-controller` package. A minimal polyfill is "+"provided for use by LRUCache.fetch(), but it should not be "+"relied upon in other contexts (eg, passing it to other APIs that "+"use AbortController/AbortSignal might have undesirable effects). "+"You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",warnACPolyfill)}}const shouldWarn=e=>!n.has(e);const c=Symbol("type");const isPosInt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e);const getUintArray=e=>!isPosInt(e)?null:e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(e){super(e);this.fill(0)}}class Stack{heap;length;static#De=false;static create(e){const t=getUintArray(e);if(!t)return[];Stack.#De=true;const r=new Stack(e,t);Stack.#De=false;return r}constructor(e,t){if(!Stack.#De){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new t(e);this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class LRUCache{#_e;#Ne;#Te;#Fe;#Le;#Me;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#xe;#Oe;#Ue;#Pe;#Ge;#He;#Ye;#Je;#je;#Ve;#We;#qe;#ze;#Ke;#$e;#Ze;#Xe;static unsafeExposeInternals(e){return{starts:e.#ze,ttls:e.#Ke,sizes:e.#qe,keyMap:e.#Ue,keyList:e.#Pe,valList:e.#Ge,next:e.#He,prev:e.#Ye,get head(){return e.#Je},get tail(){return e.#je},free:e.#Ve,isBackgroundFetch:t=>e.#et(t),backgroundFetch:(t,r,n,s)=>e.#tt(t,r,n,s),moveToTail:t=>e.#rt(t),indexes:t=>e.#nt(t),rindexes:t=>e.#it(t),isStale:t=>e.#st(t)}}get max(){return this.#_e}get maxSize(){return this.#Ne}get calculatedSize(){return this.#Oe}get size(){return this.#xe}get fetchMethod(){return this.#Le}get memoMethod(){return this.#Me}get dispose(){return this.#Te}get disposeAfter(){return this.#Fe}constructor(e){const{max:t=0,ttl:r,ttlResolution:s=1,ttlAutopurge:A,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:l,dispose:u,disposeAfter:h,noDisposeOnSet:g,noUpdateTTL:p,maxSize:C=0,maxEntrySize:y=0,sizeCalculation:I,fetchMethod:B,memoMethod:Q,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:k,ignoreFetchAbort:v}=e;if(t!==0&&!isPosInt(t)){throw new TypeError("max option must be a nonnegative integer")}const R=t?getUintArray(t):Array;if(!R){throw new Error("invalid max value: "+t)}this.#_e=t;this.#Ne=C;this.maxEntrySize=y||this.#Ne;this.sizeCalculation=I;if(this.sizeCalculation){if(!this.#Ne&&!this.maxEntrySize){throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}if(Q!==undefined&&typeof Q!=="function"){throw new TypeError("memoMethod must be a function if defined")}this.#Me=Q;if(B!==undefined&&typeof B!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#Le=B;this.#Ze=!!B;this.#Ue=new Map;this.#Pe=new Array(t).fill(undefined);this.#Ge=new Array(t).fill(undefined);this.#He=new R(t);this.#Ye=new R(t);this.#Je=0;this.#je=0;this.#Ve=Stack.create(t);this.#xe=0;this.#Oe=0;if(typeof u==="function"){this.#Te=u}if(typeof h==="function"){this.#Fe=h;this.#We=[]}else{this.#Fe=undefined;this.#We=undefined}this.#$e=!!this.#Te;this.#Xe=!!this.#Fe;this.noDisposeOnSet=!!g;this.noUpdateTTL=!!p;this.noDeleteOnFetchRejection=!!b;this.allowStaleOnFetchRejection=!!S;this.allowStaleOnFetchAbort=!!k;this.ignoreFetchAbort=!!v;if(this.maxEntrySize!==0){if(this.#Ne!==0){if(!isPosInt(this.#Ne)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#ot()}this.allowStale=!!l;this.noDeleteOnStaleGet=!!w;this.updateAgeOnGet=!!a;this.updateAgeOnHas=!!c;this.ttlResolution=isPosInt(s)||s===0?s:1;this.ttlAutopurge=!!A;this.ttl=r||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#At()}if(this.#_e===0&&this.ttl===0&&this.#Ne===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#_e&&!this.#Ne){const e="LRU_CACHE_UNBOUNDED";if(shouldWarn(e)){n.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(t,"UnboundedCacheWarning",e,LRUCache)}}}getRemainingTTL(e){return this.#Ue.has(e)?Infinity:0}#At(){const e=new ZeroArray(this.#_e);const t=new ZeroArray(this.#_e);this.#Ke=e;this.#ze=t;this.#at=(n,s,A=r.now())=>{t[n]=s!==0?A:0;e[n]=s;if(s!==0&&this.ttlAutopurge){const e=setTimeout((()=>{if(this.#st(n)){this.#ct(this.#Pe[n],"expire")}}),s+1);if(e.unref){e.unref()}}};this.#lt=n=>{t[n]=e[n]!==0?r.now():0};this.#ut=(r,s)=>{if(e[s]){const A=e[s];const a=t[s];if(!A||!a)return;r.ttl=A;r.start=a;r.now=n||getNow();const c=r.now-a;r.remainingTTL=A-c}};let n=0;const getNow=()=>{const e=r.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);if(t.unref){t.unref()}}return e};this.getRemainingTTL=r=>{const s=this.#Ue.get(r);if(s===undefined){return 0}const A=e[s];const a=t[s];if(!A||!a){return Infinity}const c=(n||getNow())-a;return A-c};this.#st=r=>{const s=t[r];const A=e[r];return!!A&&!!s&&(n||getNow())-s>A}}#lt=()=>{};#ut=()=>{};#at=()=>{};#st=()=>false;#ot(){const e=new ZeroArray(this.#_e);this.#Oe=0;this.#qe=e;this.#ht=t=>{this.#Oe-=e[t];e[t]=0};this.#ft=(e,t,r,n)=>{if(this.#et(t)){return 0}if(!isPosInt(r)){if(n){if(typeof n!=="function"){throw new TypeError("sizeCalculation must be a function")}r=n(t,e);if(!isPosInt(r)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return r};this.#dt=(t,r,n)=>{e[t]=r;if(this.#Ne){const r=this.#Ne-e[t];while(this.#Oe>r){this.#D(true)}}this.#Oe+=e[t];if(n){n.entrySize=r;n.totalCalculatedSize=this.#Oe}}}#ht=e=>{};#dt=(e,t,r)=>{};#ft=(e,t,r,n)=>{if(r||n){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#nt({allowStale:e=this.allowStale}={}){if(this.#xe){for(let t=this.#je;true;){if(!this.#gt(t)){break}if(e||!this.#st(t)){yield t}if(t===this.#Je){break}else{t=this.#Ye[t]}}}}*#it({allowStale:e=this.allowStale}={}){if(this.#xe){for(let t=this.#Je;true;){if(!this.#gt(t)){break}if(e||!this.#st(t)){yield t}if(t===this.#je){break}else{t=this.#He[t]}}}}#gt(e){return e!==undefined&&this.#Ue.get(this.#Pe[e])===e}*entries(){for(const e of this.#nt()){if(this.#Ge[e]!==undefined&&this.#Pe[e]!==undefined&&!this.#et(this.#Ge[e])){yield[this.#Pe[e],this.#Ge[e]]}}}*rentries(){for(const e of this.#it()){if(this.#Ge[e]!==undefined&&this.#Pe[e]!==undefined&&!this.#et(this.#Ge[e])){yield[this.#Pe[e],this.#Ge[e]]}}}*keys(){for(const e of this.#nt()){const t=this.#Pe[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield t}}}*rkeys(){for(const e of this.#it()){const t=this.#Pe[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield t}}}*values(){for(const e of this.#nt()){const t=this.#Ge[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield this.#Ge[e]}}}*rvalues(){for(const e of this.#it()){const t=this.#Ge[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield this.#Ge[e]}}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#nt()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;if(e(s,this.#Pe[r],this)){return this.get(this.#Pe[r],t)}}}forEach(e,t=this){for(const r of this.#nt()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;e.call(t,s,this.#Pe[r],this)}}rforEach(e,t=this){for(const r of this.#it()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;e.call(t,s,this.#Pe[r],this)}}purgeStale(){let e=false;for(const t of this.#it({allowStale:true})){if(this.#st(t)){this.#ct(this.#Pe[t],"expire");e=true}}return e}info(e){const t=this.#Ue.get(e);if(t===undefined)return undefined;const n=this.#Ge[t];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)return undefined;const A={value:s};if(this.#Ke&&this.#ze){const e=this.#Ke[t];const n=this.#ze[t];if(e&&n){const t=e-(r.now()-n);A.ttl=t;A.start=Date.now()}}if(this.#qe){A.size=this.#qe[t]}return A}dump(){const e=[];for(const t of this.#nt({allowStale:true})){const n=this.#Pe[t];const s=this.#Ge[t];const A=this.#et(s)?s.__staleWhileFetching:s;if(A===undefined||n===undefined)continue;const a={value:A};if(this.#Ke&&this.#ze){a.ttl=this.#Ke[t];const e=r.now()-this.#ze[t];a.start=Math.floor(Date.now()-e)}if(this.#qe){a.size=this.#qe[t]}e.unshift([n,a])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t,r={}){if(t===undefined){this.delete(e);return this}const{ttl:n=this.ttl,start:s,noDisposeOnSet:A=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=r;let{noUpdateTTL:l=this.noUpdateTTL}=r;const u=this.#ft(e,t,r.size||0,a);if(this.maxEntrySize&&u>this.maxEntrySize){if(c){c.set="miss";c.maxEntrySizeExceeded=true}this.#ct(e,"set");return this}let h=this.#xe===0?undefined:this.#Ue.get(e);if(h===undefined){h=this.#xe===0?this.#je:this.#Ve.length!==0?this.#Ve.pop():this.#xe===this.#_e?this.#D(false):this.#xe;this.#Pe[h]=e;this.#Ge[h]=t;this.#Ue.set(e,h);this.#He[this.#je]=h;this.#Ye[h]=this.#je;this.#je=h;this.#xe++;this.#dt(h,u,c);if(c)c.set="add";l=false}else{this.#rt(h);const r=this.#Ge[h];if(t!==r){if(this.#Ze&&this.#et(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;if(t!==undefined&&!A){if(this.#$e){this.#Te?.(t,e,"set")}if(this.#Xe){this.#We?.push([t,e,"set"])}}}else if(!A){if(this.#$e){this.#Te?.(r,e,"set")}if(this.#Xe){this.#We?.push([r,e,"set"])}}this.#ht(h);this.#dt(h,u,c);this.#Ge[h]=t;if(c){c.set="replace";const e=r&&this.#et(r)?r.__staleWhileFetching:r;if(e!==undefined)c.oldValue=e}}else if(c){c.set="update"}}if(n!==0&&!this.#Ke){this.#At()}if(this.#Ke){if(!l){this.#at(h,n,s)}if(c)this.#ut(c,h)}if(!A&&this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}return this}pop(){try{while(this.#xe){const e=this.#Ge[this.#Je];this.#D(true);if(this.#et(e)){if(e.__staleWhileFetching){return e.__staleWhileFetching}}else if(e!==undefined){return e}}}finally{if(this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}}}#D(e){const t=this.#Je;const r=this.#Pe[t];const n=this.#Ge[t];if(this.#Ze&&this.#et(n)){n.__abortController.abort(new Error("evicted"))}else if(this.#$e||this.#Xe){if(this.#$e){this.#Te?.(n,r,"evict")}if(this.#Xe){this.#We?.push([n,r,"evict"])}}this.#ht(t);if(e){this.#Pe[t]=undefined;this.#Ge[t]=undefined;this.#Ve.push(t)}if(this.#xe===1){this.#Je=this.#je=0;this.#Ve.length=0}else{this.#Je=this.#He[t]}this.#Ue.delete(r);this.#xe--;return t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t;const s=this.#Ue.get(e);if(s!==undefined){const e=this.#Ge[s];if(this.#et(e)&&e.__staleWhileFetching===undefined){return false}if(!this.#st(s)){if(r){this.#lt(s)}if(n){n.has="hit";this.#ut(n,s)}return true}else if(n){n.has="stale";this.#ut(n,s)}}else if(n){n.has="miss"}return false}peek(e,t={}){const{allowStale:r=this.allowStale}=t;const n=this.#Ue.get(e);if(n===undefined||!r&&this.#st(n)){return}const s=this.#Ge[n];return this.#et(s)?s.__staleWhileFetching:s}#tt(e,t,r,n){const s=t===undefined?undefined:this.#Ge[t];if(this.#et(s)){return s}const a=new A;const{signal:c}=r;c?.addEventListener("abort",(()=>a.abort(c.reason)),{signal:a.signal});const l={signal:a.signal,options:r,context:n};const cb=(n,s=false)=>{const{aborted:A}=a.signal;const c=r.ignoreFetchAbort&&n!==undefined;if(r.status){if(A&&!s){r.status.fetchAborted=true;r.status.fetchError=a.signal.reason;if(c)r.status.fetchAbortIgnored=true}else{r.status.fetchResolved=true}}if(A&&!c&&!s){return fetchFail(a.signal.reason)}const h=u;if(this.#Ge[t]===u){if(n===undefined){if(h.__staleWhileFetching){this.#Ge[t]=h.__staleWhileFetching}else{this.#ct(e,"fetch")}}else{if(r.status)r.status.fetchUpdated=true;this.set(e,n,l.options)}}return n};const eb=e=>{if(r.status){r.status.fetchRejected=true;r.status.fetchError=e}return fetchFail(e)};const fetchFail=n=>{const{aborted:s}=a.signal;const A=s&&r.allowStaleOnFetchAbort;const c=A||r.allowStaleOnFetchRejection;const l=c||r.noDeleteOnFetchRejection;const h=u;if(this.#Ge[t]===u){const r=!l||h.__staleWhileFetching===undefined;if(r){this.#ct(e,"fetch")}else if(!A){this.#Ge[t]=h.__staleWhileFetching}}if(c){if(r.status&&h.__staleWhileFetching!==undefined){r.status.returnedStale=true}return h.__staleWhileFetching}else if(h.__returned===h){throw n}};const pcall=(t,n)=>{const A=this.#Le?.(e,s,l);if(A&&A instanceof Promise){A.then((e=>t(e===undefined?undefined:e)),n)}a.signal.addEventListener("abort",(()=>{if(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort){t(undefined);if(r.allowStaleOnFetchAbort){t=e=>cb(e,true)}}}))};if(r.status)r.status.fetchDispatched=true;const u=new Promise(pcall).then(cb,eb);const h=Object.assign(u,{__abortController:a,__staleWhileFetching:s,__returned:undefined});if(t===undefined){this.set(e,h,{...l.options,status:undefined});t=this.#Ue.get(e)}else{this.#Ge[t]=h}return h}#et(e){if(!this.#Ze)return false;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof A}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:A=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:y,forceRefresh:I=false,status:B,signal:Q}=t;if(!this.#Ze){if(B)B.fetch="get";return this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:B})}const b={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:A,noDisposeOnSet:a,size:c,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:C,ignoreFetchAbort:p,status:B,signal:Q};let w=this.#Ue.get(e);if(w===undefined){if(B)B.fetch="miss";const t=this.#tt(e,w,b,y);return t.__returned=t}else{const t=this.#Ge[w];if(this.#et(t)){const e=r&&t.__staleWhileFetching!==undefined;if(B){B.fetch="inflight";if(e)B.returnedStale=true}return e?t.__staleWhileFetching:t.__returned=t}const s=this.#st(w);if(!I&&!s){if(B)B.fetch="hit";this.#rt(w);if(n){this.#lt(w)}if(B)this.#ut(B,w);return t}const A=this.#tt(e,w,b,y);const a=A.__staleWhileFetching!==undefined;const c=a&&r;if(B){B.fetch=s?"stale":"refresh";if(c&&s)B.returnedStale=true}return c?A.__staleWhileFetching:A.__returned=A}}async forceFetch(e,t={}){const r=await this.fetch(e,t);if(r===undefined)throw new Error("fetch() returned undefined");return r}memo(e,t={}){const r=this.#Me;if(!r){throw new Error("no memoMethod provided to constructor")}const{context:n,forceRefresh:s,...A}=t;const a=this.get(e,A);if(!s&&a!==undefined)return a;const c=r(e,a,{options:A,context:n});this.set(e,c,A);return c}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:A}=t;const a=this.#Ue.get(e);if(a!==undefined){const t=this.#Ge[a];const c=this.#et(t);if(A)this.#ut(A,a);if(this.#st(a)){if(A)A.get="stale";if(!c){if(!s){this.#ct(e,"expire")}if(A&&r)A.returnedStale=true;return r?t:undefined}else{if(A&&r&&t.__staleWhileFetching!==undefined){A.returnedStale=true}return r?t.__staleWhileFetching:undefined}}else{if(A)A.get="hit";if(c){return t.__staleWhileFetching}this.#rt(a);if(n){this.#lt(a)}return t}}else if(A){A.get="miss"}}#pt(e,t){this.#Ye[t]=e;this.#He[e]=t}#rt(e){if(e!==this.#je){if(e===this.#Je){this.#Je=this.#He[e]}else{this.#pt(this.#Ye[e],this.#He[e])}this.#pt(this.#je,e);this.#je=e}}delete(e){return this.#ct(e,"delete")}#ct(e,t){let r=false;if(this.#xe!==0){const n=this.#Ue.get(e);if(n!==undefined){r=true;if(this.#xe===1){this.#Et(t)}else{this.#ht(n);const r=this.#Ge[n];if(this.#et(r)){r.__abortController.abort(new Error("deleted"))}else if(this.#$e||this.#Xe){if(this.#$e){this.#Te?.(r,e,t)}if(this.#Xe){this.#We?.push([r,e,t])}}this.#Ue.delete(e);this.#Pe[n]=undefined;this.#Ge[n]=undefined;if(n===this.#je){this.#je=this.#Ye[n]}else if(n===this.#Je){this.#Je=this.#He[n]}else{const e=this.#Ye[n];this.#He[e]=this.#He[n];const t=this.#He[n];this.#Ye[t]=this.#Ye[n]}this.#xe--;this.#Ve.push(n)}}}if(this.#Xe&&this.#We?.length){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}return r}clear(){return this.#Et("delete")}#Et(e){for(const t of this.#it({allowStale:true})){const r=this.#Ge[t];if(this.#et(r)){r.__abortController.abort(new Error("deleted"))}else{const n=this.#Pe[t];if(this.#$e){this.#Te?.(r,n,e)}if(this.#Xe){this.#We?.push([r,n,e])}}}this.#Ue.clear();this.#Ge.fill(undefined);this.#Pe.fill(undefined);if(this.#Ke&&this.#ze){this.#Ke.fill(0);this.#ze.fill(0)}if(this.#qe){this.#qe.fill(0)}this.#Je=0;this.#je=0;this.#Ve.length=0;this.#Oe=0;this.#xe=0;if(this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}}}t.LRUCache=LRUCache},8275:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Minipass=t.isWritable=t.isReadable=t.isStream=void 0;const s=typeof process==="object"&&process?process:{stdout:null,stderr:null};const A=r(8474);const a=n(r(7075));const c=r(6193);const isStream=e=>!!e&&typeof e==="object"&&(e instanceof Minipass||e instanceof a.default||(0,t.isReadable)(e)||(0,t.isWritable)(e));t.isStream=isStream;const isReadable=e=>!!e&&typeof e==="object"&&e instanceof A.EventEmitter&&typeof e.pipe==="function"&&e.pipe!==a.default.Writable.prototype.pipe;t.isReadable=isReadable;const isWritable=e=>!!e&&typeof e==="object"&&e instanceof A.EventEmitter&&typeof e.write==="function"&&typeof e.end==="function";t.isWritable=isWritable;const l=Symbol("EOF");const u=Symbol("maybeEmitEnd");const h=Symbol("emittedEnd");const g=Symbol("emittingEnd");const p=Symbol("emittedError");const C=Symbol("closed");const y=Symbol("read");const I=Symbol("flush");const B=Symbol("flushChunk");const Q=Symbol("encoding");const b=Symbol("decoder");const w=Symbol("flowing");const S=Symbol("paused");const k=Symbol("resume");const v=Symbol("buffer");const R=Symbol("pipes");const D=Symbol("bufferLength");const _=Symbol("bufferPush");const N=Symbol("bufferShift");const T=Symbol("objectMode");const F=Symbol("destroyed");const L=Symbol("error");const M=Symbol("emitData");const x=Symbol("emitEnd");const O=Symbol("emitEnd2");const U=Symbol("async");const P=Symbol("abort");const G=Symbol("aborted");const H=Symbol("signal");const Y=Symbol("dataListeners");const J=Symbol("discarded");const defer=e=>Promise.resolve().then(e);const nodefer=e=>e();const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBufferLike=e=>e instanceof ArrayBuffer||!!e&&typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{src;dest;opts;ondrain;constructor(e,t,r){this.src=e;this.dest=t;this.opts=r;this.ondrain=()=>e[k]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(e,t,r){super(e,t,r);this.proxyErrors=e=>t.emit("error",e);e.on("error",this.proxyErrors)}}const isObjectModeOptions=e=>!!e.objectMode;const isEncodingOptions=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer";class Minipass extends A.EventEmitter{[w]=false;[S]=false;[R]=[];[v]=[];[T];[Q];[U];[b];[l]=false;[h]=false;[g]=false;[C]=false;[p]=null;[D]=0;[F]=false;[H];[G]=false;[Y]=0;[J]=false;writable=true;readable=true;constructor(...e){const t=e[0]||{};super();if(t.objectMode&&typeof t.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(t)){this[T]=true;this[Q]=null}else if(isEncodingOptions(t)){this[Q]=t.encoding;this[T]=false}else{this[T]=false;this[Q]=null}this[U]=!!t.async;this[b]=this[Q]?new c.StringDecoder(this[Q]):null;if(t&&t.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[v]})}if(t&&t.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[R]})}const{signal:r}=t;if(r){this[H]=r;if(r.aborted){this[P]()}else{r.addEventListener("abort",(()=>this[P]()))}}}get bufferLength(){return this[D]}get encoding(){return this[Q]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[T]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[U]}set["async"](e){this[U]=this[U]||!!e}[P](){this[G]=true;this.emit("abort",this[H]?.reason);this.destroy(this[H]?.reason)}get aborted(){return this[G]}set aborted(e){}write(e,t,r){if(this[G])return false;if(this[l])throw new Error("write after end");if(this[F]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function"){r=t;t="utf8"}if(!t)t="utf8";const n=this[U]?defer:nodefer;if(!this[T]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(isArrayBufferLike(e)){e=Buffer.from(e)}else if(typeof e!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[T]){if(this[w]&&this[D]!==0)this[I](true);if(this[w])this.emit("data",e);else this[_](e);if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}if(!e.length){if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}if(typeof e==="string"&&!(t===this[Q]&&!this[b]?.lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[Q]){e=this[b].write(e)}if(this[w]&&this[D]!==0)this[I](true);if(this[w])this.emit("data",e);else this[_](e);if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}read(e){if(this[F])return null;this[J]=false;if(this[D]===0||e===0||e&&e>this[D]){this[u]();return null}if(this[T])e=null;if(this[v].length>1&&!this[T]){this[v]=[this[Q]?this[v].join(""):Buffer.concat(this[v],this[D])]}const t=this[y](e||null,this[v][0]);this[u]();return t}[y](e,t){if(this[T])this[N]();else{const r=t;if(e===r.length||e===null)this[N]();else if(typeof r==="string"){this[v][0]=r.slice(e);t=r.slice(0,e);this[D]-=e}else{this[v][0]=r.subarray(e);t=r.subarray(0,e);this[D]-=e}}this.emit("data",t);if(!this[v].length&&!this[l])this.emit("drain");return t}end(e,t,r){if(typeof e==="function"){r=e;e=undefined}if(typeof t==="function"){r=t;t="utf8"}if(e!==undefined)this.write(e,t);if(r)this.once("end",r);this[l]=true;this.writable=false;if(this[w]||!this[S])this[u]();return this}[k](){if(this[F])return;if(!this[Y]&&!this[R].length){this[J]=true}this[S]=false;this[w]=true;this.emit("resume");if(this[v].length)this[I]();else if(this[l])this[u]();else this.emit("drain")}resume(){return this[k]()}pause(){this[w]=false;this[S]=true;this[J]=false}get destroyed(){return this[F]}get flowing(){return this[w]}get paused(){return this[S]}[_](e){if(this[T])this[D]+=1;else this[D]+=e.length;this[v].push(e)}[N](){if(this[T])this[D]-=1;else this[D]-=this[v][0].length;return this[v].shift()}[I](e=false){do{}while(this[B](this[N]())&&this[v].length);if(!e&&!this[v].length&&!this[l])this.emit("drain")}[B](e){this.emit("data",e);return this[w]}pipe(e,t){if(this[F])return e;this[J]=false;const r=this[h];t=t||{};if(e===s.stdout||e===s.stderr)t.end=false;else t.end=t.end!==false;t.proxyErrors=!!t.proxyErrors;if(r){if(t.end)e.end()}else{this[R].push(!t.proxyErrors?new Pipe(this,e,t):new PipeProxyErrors(this,e,t));if(this[U])defer((()=>this[k]()));else this[k]()}return e}unpipe(e){const t=this[R].find((t=>t.dest===e));if(t){if(this[R].length===1){if(this[w]&&this[Y]===0){this[w]=false}this[R]=[]}else this[R].splice(this[R].indexOf(t),1);t.unpipe()}}addListener(e,t){return this.on(e,t)}on(e,t){const r=super.on(e,t);if(e==="data"){this[J]=false;this[Y]++;if(!this[R].length&&!this[w]){this[k]()}}else if(e==="readable"&&this[D]!==0){super.emit("readable")}else if(isEndish(e)&&this[h]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[p]){const e=t;if(this[U])defer((()=>e.call(this,this[p])));else e.call(this,this[p])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){const r=super.off(e,t);if(e==="data"){this[Y]=this.listeners("data").length;if(this[Y]===0&&!this[J]&&!this[R].length){this[w]=false}}return r}removeAllListeners(e){const t=super.removeAllListeners(e);if(e==="data"||e===undefined){this[Y]=0;if(!this[J]&&!this[R].length){this[w]=false}}return t}get emittedEnd(){return this[h]}[u](){if(!this[g]&&!this[h]&&!this[F]&&this[v].length===0&&this[l]){this[g]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[C])this.emit("close");this[g]=false}}emit(e,...t){const r=t[0];if(e!=="error"&&e!=="close"&&e!==F&&this[F]){return false}else if(e==="data"){return!this[T]&&!r?false:this[U]?(defer((()=>this[M](r))),true):this[M](r)}else if(e==="end"){return this[x]()}else if(e==="close"){this[C]=true;if(!this[h]&&!this[F])return false;const e=super.emit("close");this.removeAllListeners("close");return e}else if(e==="error"){this[p]=r;super.emit(L,r);const e=!this[H]||this.listeners("error").length?super.emit("error",r):false;this[u]();return e}else if(e==="resume"){const e=super.emit("resume");this[u]();return e}else if(e==="finish"||e==="prefinish"){const t=super.emit(e);this.removeAllListeners(e);return t}const n=super.emit(e,...t);this[u]();return n}[M](e){for(const t of this[R]){if(t.dest.write(e)===false)this.pause()}const t=this[J]?false:super.emit("data",e);this[u]();return t}[x](){if(this[h])return false;this[h]=true;this.readable=false;return this[U]?(defer((()=>this[O]())),true):this[O]()}[O](){if(this[b]){const e=this[b].end();if(e){for(const t of this[R]){t.dest.write(e)}if(!this[J])super.emit("data",e)}}for(const e of this[R]){e.end()}const e=super.emit("end");this.removeAllListeners("end");return e}async collect(){const e=Object.assign([],{dataLength:0});if(!this[T])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[T])e.dataLength+=t.length}));await t;return e}async concat(){if(this[T]){throw new Error("cannot concat in objectMode")}const e=await this.collect();return this[Q]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise(((e,t)=>{this.on(F,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[Symbol.asyncIterator](){this[J]=false;let e=false;const stop=async()=>{this.pause();e=true;return{value:undefined,done:true}};const next=()=>{if(e)return stop();const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[l])return stop();let r;let n;const onerr=e=>{this.off("data",ondata);this.off("end",onend);this.off(F,ondestroy);stop();n(e)};const ondata=e=>{this.off("error",onerr);this.off("end",onend);this.off(F,ondestroy);this.pause();r({value:e,done:!!this[l]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(F,ondestroy);stop();r({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,t)=>{n=t;r=e;this.once(F,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[J]=false;let e=false;const stop=()=>{this.pause();this.off(L,stop);this.off(F,stop);this.off("end",stop);e=true;return{done:true,value:undefined}};const next=()=>{if(e)return stop();const t=this.read();return t===null?stop():{done:false,value:t}};this.once("end",stop);this.once(L,stop);this.once(F,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(e){if(this[F]){if(e)this.emit("error",e);else this.emit(F);return this}this[F]=true;this[J]=true;this[v].length=0;this[D]=0;const t=this;if(typeof t.close==="function"&&!this[C])t.close();if(e)this.emit("error",e);else this.emit(F);return this}static get isStream(){return t.isStream}}t.Minipass=Minipass},8958:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.PathScurry=t.Path=t.PathScurryDarwin=t.PathScurryPosix=t.PathScurryWin32=t.PathScurryBase=t.PathPosix=t.PathWin32=t.PathBase=t.ChildrenCache=t.ResolveCache=void 0;const a=r(2477);const c=r(6760);const l=r(3136);const u=r(9896);const h=A(r(3024));const g=u.realpathSync.native;const p=r(1455);const C=r(8275);const y={lstatSync:u.lstatSync,readdir:u.readdir,readdirSync:u.readdirSync,readlinkSync:u.readlinkSync,realpathSync:g,promises:{lstat:p.lstat,readdir:p.readdir,readlink:p.readlink,realpath:p.realpath}};const fsFromOption=e=>!e||e===y||e===h?y:{...y,...e,promises:{...y.promises,...e.promises||{}}};const I=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=e=>e.replace(/\//g,"\\").replace(I,"$1\\");const B=/[\\\/]/;const Q=0;const b=1;const w=2;const S=4;const k=6;const v=8;const R=10;const D=12;const _=15;const N=~_;const T=16;const F=32;const L=64;const M=128;const x=256;const O=512;const U=L|M|O;const P=1023;const entToType=e=>e.isFile()?v:e.isDirectory()?S:e.isSymbolicLink()?R:e.isCharacterDevice()?w:e.isBlockDevice()?k:e.isSocket()?D:e.isFIFO()?b:Q;const G=new Map;const normalize=e=>{const t=G.get(e);if(t)return t;const r=e.normalize("NFKD");G.set(e,r);return r};const H=new Map;const normalizeNocase=e=>{const t=H.get(e);if(t)return t;const r=normalize(e.toLowerCase());H.set(e,r);return r};class ResolveCache extends a.LRUCache{constructor(){super({max:256})}}t.ResolveCache=ResolveCache;class ChildrenCache extends a.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}}t.ChildrenCache=ChildrenCache;const Y=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;isCWD=false;#Ct;#yt;get dev(){return this.#yt}#It;get mode(){return this.#It}#Bt;get nlink(){return this.#Bt}#Qt;get uid(){return this.#Qt}#mt;get gid(){return this.#mt}#bt;get rdev(){return this.#bt}#wt;get blksize(){return this.#wt}#St;get ino(){return this.#St}#xe;get size(){return this.#xe}#kt;get blocks(){return this.#kt}#vt;get atimeMs(){return this.#vt}#Rt;get mtimeMs(){return this.#Rt}#Dt;get ctimeMs(){return this.#Dt}#_t;get birthtimeMs(){return this.#_t}#Nt;get atime(){return this.#Nt}#Tt;get mtime(){return this.#Tt}#Ft;get ctime(){return this.#Ft}#Lt;get birthtime(){return this.#Lt}#Mt;#xt;#Ot;#Ut;#Pt;#Gt;#Ht;#Yt;#Jt;#jt;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Q,r,n,s,A,a){this.name=e;this.#Mt=s?normalizeNocase(e):normalize(e);this.#Ht=t&P;this.nocase=s;this.roots=n;this.root=r||this;this.#Yt=A;this.#Ot=a.fullpath;this.#Pt=a.relative;this.#Gt=a.relativePosix;this.parent=a.parent;if(this.parent){this.#Ct=this.parent.#Ct}else{this.#Ct=fsFromOption(a.fs)}}depth(){if(this.#xt!==undefined)return this.#xt;if(!this.parent)return this.#xt=0;return this.#xt=this.parent.depth()+1}childrenCache(){return this.#Yt}resolve(e){if(!e){return this}const t=this.getRootString(e);const r=e.substring(t.length);const n=r.split(this.splitSep);const s=t?this.getRoot(t).#Vt(n):this.#Vt(n);return s}#Vt(e){let t=this;for(const r of e){t=t.child(r)}return t}children(){const e=this.#Yt.get(this);if(e){return e}const t=Object.assign([],{provisional:0});this.#Yt.set(this,t);this.#Ht&=~T;return t}child(e,t){if(e===""||e==="."){return this}if(e===".."){return this.parent||this}const r=this.children();const n=this.nocase?normalizeNocase(e):normalize(e);for(const e of r){if(e.#Mt===n){return e}}const s=this.parent?this.sep:"";const A=this.#Ot?this.#Ot+s+e:undefined;const a=this.newChild(e,Q,{...t,parent:this,fullpath:A});if(!this.canReaddir()){a.#Ht|=M}r.push(a);return a}relative(){if(this.isCWD)return"";if(this.#Pt!==undefined){return this.#Pt}const e=this.name;const t=this.parent;if(!t){return this.#Pt=this.name}const r=t.relative();return r+(!r||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#Gt!==undefined)return this.#Gt;const e=this.name;const t=this.parent;if(!t){return this.#Gt=this.fullpathPosix()}const r=t.relativePosix();return r+(!r||!t.parent?"":"/")+e}fullpath(){if(this.#Ot!==undefined){return this.#Ot}const e=this.name;const t=this.parent;if(!t){return this.#Ot=this.name}const r=t.fullpath();const n=r+(!t.parent?"":this.sep)+e;return this.#Ot=n}fullpathPosix(){if(this.#Ut!==undefined)return this.#Ut;if(this.sep==="/")return this.#Ut=this.fullpath();if(!this.parent){const e=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(e)){return this.#Ut=`//?/${e}`}else{return this.#Ut=e}}const e=this.parent;const t=e.fullpathPosix();const r=t+(!t||!e.parent?"":"/")+this.name;return this.#Ut=r}isUnknown(){return(this.#Ht&_)===Q}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#Ht&_)===v}isDirectory(){return(this.#Ht&_)===S}isCharacterDevice(){return(this.#Ht&_)===w}isBlockDevice(){return(this.#Ht&_)===k}isFIFO(){return(this.#Ht&_)===b}isSocket(){return(this.#Ht&_)===D}isSymbolicLink(){return(this.#Ht&R)===R}lstatCached(){return this.#Ht&F?this:undefined}readlinkCached(){return this.#Jt}realpathCached(){return this.#jt}readdirCached(){const e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#Jt)return true;if(!this.parent)return false;const e=this.#Ht&_;return!(e!==Q&&e!==R||this.#Ht&x||this.#Ht&M)}calledReaddir(){return!!(this.#Ht&T)}isENOENT(){return!!(this.#Ht&M)}isNamed(e){return!this.nocase?this.#Mt===normalize(e):this.#Mt===normalizeNocase(e)}async readlink(){const e=this.#Jt;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=await this.#Ct.promises.readlink(this.fullpath());const t=(await this.parent.realpath())?.resolve(e);if(t){return this.#Jt=t}}catch(e){this.#Wt(e.code);return undefined}}readlinkSync(){const e=this.#Jt;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=this.#Ct.readlinkSync(this.fullpath());const t=this.parent.realpathSync()?.resolve(e);if(t){return this.#Jt=t}}catch(e){this.#Wt(e.code);return undefined}}#qt(e){this.#Ht|=T;for(let t=e.provisional;tt(null,e)))}readdirCB(e,t=false){if(!this.canReaddir()){if(t)e(null,[]);else queueMicrotask((()=>e(null,[])));return}const r=this.children();if(this.calledReaddir()){const n=r.slice(0,r.provisional);if(t)e(null,n);else queueMicrotask((()=>e(null,n)));return}this.#or.push(e);if(this.#Ar){return}this.#Ar=true;const n=this.fullpath();this.#Ct.readdir(n,{withFileTypes:true},((e,t)=>{if(e){this.#Xt(e.code);r.provisional=0}else{for(const e of t){this.#tr(e,r)}this.#qt(r)}this.#ar(r.slice(0,r.provisional));return}))}#cr;async readdir(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();if(this.#cr){await this.#cr}else{let resolve=()=>{};this.#cr=new Promise((e=>resolve=e));try{for(const r of await this.#Ct.promises.readdir(t,{withFileTypes:true})){this.#tr(r,e)}this.#qt(e)}catch(t){this.#Xt(t.code);e.provisional=0}this.#cr=undefined;resolve()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();try{for(const r of this.#Ct.readdirSync(t,{withFileTypes:true})){this.#tr(r,e)}this.#qt(e)}catch(t){this.#Xt(t.code);e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#Ht&U)return false;const e=_&this.#Ht;if(!(e===Q||e===S||e===R)){return false}return true}shouldWalk(e,t){return(this.#Ht&S)===S&&!(this.#Ht&U)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#jt)return this.#jt;if((O|x|M)&this.#Ht)return undefined;try{const e=await this.#Ct.promises.realpath(this.fullpath());return this.#jt=this.resolve(e)}catch(e){this.#$t()}}realpathSync(){if(this.#jt)return this.#jt;if((O|x|M)&this.#Ht)return undefined;try{const e=this.#Ct.realpathSync(this.fullpath());return this.#jt=this.resolve(e)}catch(e){this.#$t()}}[Y](e){if(e===this)return;e.isCWD=false;this.isCWD=true;const t=new Set([]);let r=[];let n=this;while(n&&n.parent){t.add(n);n.#Pt=r.join(this.sep);n.#Gt=r.join("/");n=n.parent;r.push("..")}n=e;while(n&&n.parent&&!t.has(n)){n.#Pt=undefined;n.#Gt=undefined;n=n.parent}}}t.PathBase=PathBase;class PathWin32 extends PathBase{sep="\\";splitSep=B;constructor(e,t=Q,r,n,s,A,a){super(e,t,r,n,s,A,a)}newChild(e,t=Q,r={}){return new PathWin32(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return c.win32.parse(e).root}getRoot(e){e=uncToDrive(e.toUpperCase());if(e===this.root.name){return this.root}for(const[t,r]of Object.entries(this.roots)){if(this.sameRoot(e,t)){return this.roots[e]=r}}return this.roots[e]=new PathScurryWin32(e,this).root}sameRoot(e,t=this.root.name){e=e.toUpperCase().replace(/\//g,"\\").replace(I,"$1\\");return e===t}}t.PathWin32=PathWin32;class PathPosix extends PathBase{splitSep="/";sep="/";constructor(e,t=Q,r,n,s,A,a){super(e,t,r,n,s,A,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Q,r={}){return new PathPosix(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}}t.PathPosix=PathPosix;class PathScurryBase{root;rootPath;roots;cwd;#lr;#ur;#Yt;nocase;#Ct;constructor(e=process.cwd(),t,r,{nocase:n,childrenCacheSize:s=16*1024,fs:A=y}={}){this.#Ct=fsFromOption(A);if(e instanceof URL||e.startsWith("file://")){e=(0,l.fileURLToPath)(e)}const a=t.resolve(e);this.roots=Object.create(null);this.rootPath=this.parseRootPath(a);this.#lr=new ResolveCache;this.#ur=new ResolveCache;this.#Yt=new ChildrenCache(s);const c=a.substring(this.rootPath.length).split(r);if(c.length===1&&!c[0]){c.pop()}if(n===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=n;this.root=this.newRoot(this.#Ct);this.roots[this.rootPath]=this.root;let u=this.root;let h=c.length-1;const g=t.sep;let p=this.rootPath;let C=false;for(const e of c){const t=h--;u=u.child(e,{relative:new Array(t).fill("..").join(g),relativePosix:new Array(t).fill("..").join("/"),fullpath:p+=(C?"":g)+e});C=true}this.cwd=u}depth(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.depth()}childrenCache(){return this.#Yt}resolve(...e){let t="";for(let r=e.length-1;r>=0;r--){const n=e[r];if(!n||n===".")continue;t=t?`${n}/${t}`:n;if(this.isAbsolute(n)){break}}const r=this.#lr.get(t);if(r!==undefined){return r}const n=this.cwd.resolve(t).fullpath();this.#lr.set(t,n);return n}resolvePosix(...e){let t="";for(let r=e.length-1;r>=0;r--){const n=e[r];if(!n||n===".")continue;t=t?`${n}/${t}`:n;if(this.isAbsolute(n)){break}}const r=this.#ur.get(t);if(r!==undefined){return r}const n=this.cwd.resolve(t).fullpathPosix();this.#ur.set(t,n);return n}relative(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relative()}relativePosix(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relativePosix()}basename(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.name}dirname(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r}=t;if(!e.canReaddir()){return[]}else{const t=await e.readdir();return r?t:t.map((e=>e.name))}}readdirSync(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true}=t;if(!e.canReaddir()){return[]}else if(r){return e.readdirSync()}else{return e.readdirSync().map((e=>e.name))}}async lstat(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstat()}lstatSync(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=await e.readlink();return t?r:r?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=e.readlinkSync();return t?r:r?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=await e.realpath();return t?r:r?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=e.realpathSync();return t?r:r?.fullpath()}async walk(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=[];if(!s||s(e)){a.push(r?e:e.fullpath())}const c=new Set;const walk=(e,t)=>{c.add(e);e.readdirCB(((e,l)=>{if(e){return t(e)}let u=l.length;if(!u)return t();const next=()=>{if(--u===0){t()}};for(const e of l){if(!s||s(e)){a.push(r?e:e.fullpath())}if(n&&e.isSymbolicLink()){e.realpath().then((e=>e?.isUnknown()?e.lstat():e)).then((e=>e?.shouldWalk(c,A)?walk(e,next):next()))}else{if(e.shouldWalk(c,A)){walk(e,next)}else{next()}}}}),true)};const l=e;return new Promise(((e,t)=>{walk(l,(r=>{if(r)return t(r);e(a)}))}))}walkSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=[];if(!s||s(e)){a.push(r?e:e.fullpath())}const c=new Set([e]);for(const e of c){const t=e.readdirSync();for(const e of t){if(!s||s(e)){a.push(r?e:e.fullpath())}let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(c,A)){c.add(t)}}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}return this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;if(!s||s(e)){yield r?e:e.fullpath()}const a=new Set([e]);for(const e of a){const t=e.readdirSync();for(const e of t){if(!s||s(e)){yield r?e:e.fullpath()}let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(a,A)){a.add(t)}}}}stream(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=new C.Minipass({objectMode:true});if(!s||s(e)){a.write(r?e:e.fullpath())}const c=new Set;const l=[e];let u=0;const process=()=>{let e=false;while(!e){const t=l.shift();if(!t){if(u===0)a.end();return}u++;c.add(t);const onReaddir=(t,g,p=false)=>{if(t)return a.emit("error",t);if(n&&!p){const e=[];for(const t of g){if(t.isSymbolicLink()){e.push(t.realpath().then((e=>e?.isUnknown()?e.lstat():e)))}}if(e.length){Promise.all(e).then((()=>onReaddir(null,g,true)));return}}for(const t of g){if(t&&(!s||s(t))){if(!a.write(r?t:t.fullpath())){e=true}}}u--;for(const e of g){const t=e.realpathCached()||e;if(t.shouldWalk(c,A)){l.push(t)}}if(e&&!a.flowing){a.once("drain",process)}else if(!h){process()}};let h=true;t.readdirCB(onReaddir,true);h=false}};process();return a}streamSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=new C.Minipass({objectMode:true});const c=new Set;if(!s||s(e)){a.write(r?e:e.fullpath())}const l=[e];let u=0;const process=()=>{let e=false;while(!e){const t=l.shift();if(!t){if(u===0)a.end();return}u++;c.add(t);const h=t.readdirSync();for(const t of h){if(!s||s(t)){if(!a.write(r?t:t.fullpath())){e=true}}}u--;for(const e of h){let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(c,A)){l.push(t)}}}if(e&&!a.flowing)a.once("drain",process)};process();return a}chdir(e=this.cwd){const t=this.cwd;this.cwd=typeof e==="string"?this.cwd.resolve(e):e;this.cwd[Y](t)}}t.PathScurryBase=PathScurryBase;class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(e=process.cwd(),t={}){const{nocase:r=true}=t;super(e,c.win32,"\\",{...t,nocase:r});this.nocase=r;for(let e=this.cwd;e;e=e.parent){e.nocase=this.nocase}}parseRootPath(e){return c.win32.parse(e).root.toUpperCase()}newRoot(e){return new PathWin32(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}}t.PathScurryWin32=PathScurryWin32;class PathScurryPosix extends PathScurryBase{sep="/";constructor(e=process.cwd(),t={}){const{nocase:r=false}=t;super(e,c.posix,"/",{...t,nocase:r});this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new PathPosix(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}}t.PathScurryPosix=PathScurryPosix;class PathScurryDarwin extends PathScurryPosix{constructor(e=process.cwd(),t={}){const{nocase:r=true}=t;super(e,{...t,nocase:r})}}t.PathScurryDarwin=PathScurryDarwin;t.Path=process.platform==="win32"?PathWin32:PathPosix;t.PathScurry=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix},4928:e=>{"use strict";function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}const t=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function ensureBuffer(e){if(Buffer.isBuffer(e)){return e}if(typeof e==="number"){return Buffer.alloc(e)}else if(typeof e==="string"){return Buffer.from(e)}else{throw new Error("input must be buffer, number, or string, received "+typeof e)}}function bufferizeInt(e){const t=ensureBuffer(4);t.writeInt32BE(e,0);return t}function _crc32(e,r){e=ensureBuffer(e);if(Buffer.isBuffer(r)){r=r.readUInt32BE(0)}let n=~~r^-1;for(var s=0;s>>8}return n^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};var r=crc32;const n=getDefaultExportFromCjs(r);e.exports=n},8823:(e,t,r)=>{"use strict";const n=r(6495);e.exports={pkg:n}},5470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.USER_AGENT=t.PRODUCT_NAME=t.pkg=void 0;const n=r(6066);t.pkg=n;const s="google-api-nodejs-client";t.PRODUCT_NAME=s;const A=`${s}/${n.version}`;t.USER_AGENT=A},920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GoogleToken=void 0;var n=_interopRequireWildcard(r(9896));var s=r(7842);var A=_interopRequireWildcard(r(3324));var a=_interopRequireWildcard(r(6928));var c=r(9023);function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var s,A,a={__proto__:null,default:e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return a;if(s=t?n:r){if(s.has(e))return s.get(e);s.set(e,a)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((A=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(A.get||A.set)?s(a,c,A):a[c]=e[c]);return a})(e,t)}function _typeof(e){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(e,t,r){return e.set(_assertClassBrand(e,t),r),r}function _classPrivateFieldGet(e,t){return e.get(_assertClassBrand(e,t))}function _assertClassBrand(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function _defineProperties(e,t){for(var r=0;r3?(s=y===n)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=C&&((s=r<2&&Cn||n>y)&&(a[4]=r,a[5]=n,p.n=y,c=0))}if(s||r>1)return A;throw g=!0,n}return function(s,h,C){if(u>1)throw TypeError("Generator is already running");for(g&&1===h&&d(h,C),c=h,l=C;(t=c<2?e:l)||!g;){a||(c?c<3?(c>1&&(p.n=-1),d(c,l)):p.n=l:p.v=l);try{if(u=2,a){if(c||(s="next"),t=a[s]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=a["return"])&&t.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+s+"' method"),c=1);a=e}else if((t=(g=p.n<0)?l:r.call(n,p))!==A)break}catch(t){a=e,c=1,l=t}finally{u=1}}return{value:t,done:g}}}(r,s,a),!0),l}var A={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var a=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,(function(){return this})),t),c=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(a);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,s,"GeneratorFunction")),e.prototype=Object.create(c),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(c,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,s,"GeneratorFunction"),_regeneratorDefine2(c),_regeneratorDefine2(c,s,"Generator"),_regeneratorDefine2(c,n,(function(){return this})),_regeneratorDefine2(c,"toString",(function(){return"[object Generator]"})),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,t,r,n){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}_regeneratorDefine2=function _regeneratorDefine(e,t,r,n){if(t)s?s(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var A=function o(t,r){_regeneratorDefine2(e,t,(function(e){return this._invoke(t,r,e)}))};A("next",0),A("throw",1),A("return",2)}},_regeneratorDefine2(e,t,r,n)}function asyncGeneratorStep(e,t,r,n,s,A,a){try{var c=e[A](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,s)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var A=e.apply(t,r);function _next(e){asyncGeneratorStep(A,n,s,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(A,n,s,_next,_throw,"throw",e)}_next(void 0)}))}}var l=n.readFile?(0,c.promisify)(n.readFile):_asyncToGenerator(_regenerator().m((function _callee(){return _regenerator().w((function(e){while(1)switch(e.n){case 0:throw new g("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return e.a(2)}}),_callee)})));var u="https://oauth2.googleapis.com/token";var h="https://oauth2.googleapis.com/revoke?token=";var g=function(e){function ErrorWithCode(e,t){var r;_classCallCheck(this,ErrorWithCode);r=_callSuper(this,ErrorWithCode,[e]);_defineProperty(r,"code",void 0);r.code=t;return r}_inherits(ErrorWithCode,e);return _createClass(ErrorWithCode)}(_wrapNativeSuper(Error));var p=new WeakMap;var C=new WeakSet;var y=t.GoogleToken=function(){function GoogleToken(e){_classCallCheck(this,GoogleToken);_classPrivateMethodInitSpec(this,C);_defineProperty(this,"expiresAt",void 0);_defineProperty(this,"key",void 0);_defineProperty(this,"keyFile",void 0);_defineProperty(this,"iss",void 0);_defineProperty(this,"sub",void 0);_defineProperty(this,"scope",void 0);_defineProperty(this,"rawToken",void 0);_defineProperty(this,"tokenExpires",void 0);_defineProperty(this,"email",void 0);_defineProperty(this,"additionalClaims",void 0);_defineProperty(this,"eagerRefreshThresholdMillis",void 0);_defineProperty(this,"transporter",{request:function request(e){return(0,s.request)(e)}});_classPrivateFieldInitSpec(this,p,void 0);_assertClassBrand(C,this,_configure).call(this,e)}return _createClass(GoogleToken,[{key:"accessToken",get:function get(){return this.rawToken?this.rawToken.access_token:undefined}},{key:"idToken",get:function get(){return this.rawToken?this.rawToken.id_token:undefined}},{key:"tokenType",get:function get(){return this.rawToken?this.rawToken.token_type:undefined}},{key:"refreshToken",get:function get(){return this.rawToken?this.rawToken.refresh_token:undefined}},{key:"hasExpired",value:function hasExpired(){var e=(new Date).getTime();if(this.rawToken&&this.expiresAt){return e>=this.expiresAt}else{return true}}},{key:"isTokenExpiring",value:function isTokenExpiring(){var e;var t=(new Date).getTime();var r=(e=this.eagerRefreshThresholdMillis)!==null&&e!==void 0?e:0;if(this.rawToken&&this.expiresAt){return this.expiresAt<=t+r}else{return true}}},{key:"getToken",value:function getToken(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(_typeof(e)==="object"){t=e;e=undefined}t=Object.assign({forceRefresh:false},t);if(e){var r=e;_assertClassBrand(C,this,_getTokenAsync).call(this,t).then((function(e){return r(null,e)}),e);return}return _assertClassBrand(C,this,_getTokenAsync).call(this,t)}},{key:"getCredentials",value:function(){var e=_asyncToGenerator(_regenerator().m((function _callee2(e){var t,r,n,s,A,c,u;return _regenerator().w((function(h){while(1)switch(h.n){case 0:t=a.extname(e);u=t;h.n=u===".json"?1:u===".der"?4:u===".crt"?4:u===".pem"?4:u===".p12"?6:u===".pfx"?6:7;break;case 1:h.n=2;return l(e,"utf8");case 2:r=h.v;n=JSON.parse(r);s=n.private_key;A=n.client_email;if(!(!s||!A)){h.n=3;break}throw new g("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return h.a(2,{privateKey:s,clientEmail:A});case 4:h.n=5;return l(e,"utf8");case 5:c=h.v;return h.a(2,{privateKey:c});case 6:throw new g("*.p12 certificates are not supported after v6.1.2. "+"Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");case 7:throw new g("Unknown certificate type. Type is determined based on file extension. "+"Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return h.a(2)}}),_callee2)})));function getCredentials(t){return e.apply(this,arguments)}return getCredentials}()},{key:"revokeToken",value:function revokeToken(e){if(e){_assertClassBrand(C,this,_revokeTokenAsync).call(this).then((function(){return e()}),e);return}return _assertClassBrand(C,this,_revokeTokenAsync).call(this)}}])}();function _getTokenAsync(e){return _getTokenAsync2.apply(this,arguments)}function _getTokenAsync2(){_getTokenAsync2=_asyncToGenerator(_regenerator().m((function _callee3(e){return _regenerator().w((function(t){while(1)switch(t.n){case 0:if(!(_classPrivateFieldGet(p,this)&&!e.forceRefresh)){t.n=1;break}return t.a(2,_classPrivateFieldGet(p,this));case 1:t.p=1;t.n=2;return _classPrivateFieldSet(p,this,_assertClassBrand(C,this,_getTokenAsyncInner).call(this,e));case 2:return t.a(2,t.v);case 3:t.p=3;_classPrivateFieldSet(p,this,undefined);return t.f(3);case 4:return t.a(2)}}),_callee3,this,[[1,,3,4]])})));return _getTokenAsync2.apply(this,arguments)}function _getTokenAsyncInner(e){return _getTokenAsyncInner2.apply(this,arguments)}function _getTokenAsyncInner2(){_getTokenAsyncInner2=_asyncToGenerator(_regenerator().m((function _callee4(e){var t;return _regenerator().w((function(r){while(1)switch(r.n){case 0:if(!(this.isTokenExpiring()===false&&e.forceRefresh===false)){r.n=1;break}return r.a(2,Promise.resolve(this.rawToken));case 1:if(!(!this.key&&!this.keyFile)){r.n=2;break}throw new Error("No key or keyFile set.");case 2:if(!(!this.key&&this.keyFile)){r.n=4;break}r.n=3;return this.getCredentials(this.keyFile);case 3:t=r.v;this.key=t.privateKey;this.iss=t.clientEmail||this.iss;if(!t.clientEmail){_assertClassBrand(C,this,_ensureEmail).call(this)}case 4:return r.a(2,_assertClassBrand(C,this,_requestToken).call(this))}}),_callee4,this)})));return _getTokenAsyncInner2.apply(this,arguments)}function _ensureEmail(){if(!this.iss){throw new g("email is required.","MISSING_CREDENTIALS")}}function _revokeTokenAsync(){return _revokeTokenAsync2.apply(this,arguments)}function _revokeTokenAsync2(){_revokeTokenAsync2=_asyncToGenerator(_regenerator().m((function _callee5(){var e;return _regenerator().w((function(t){while(1)switch(t.n){case 0:if(this.accessToken){t.n=1;break}throw new Error("No token to revoke.");case 1:e=h+this.accessToken;t.n=2;return this.transporter.request({url:e,retry:true});case 2:_assertClassBrand(C,this,_configure).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims});case 3:return t.a(2)}}),_callee5,this)})));return _revokeTokenAsync2.apply(this,arguments)}function _configure(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.keyFile=e.keyFile;this.key=e.key;this.rawToken=undefined;this.iss=e.email||e.iss;this.sub=e.sub;this.additionalClaims=e.additionalClaims;if(_typeof(e.scope)==="object"){this.scope=e.scope.join(" ")}else{this.scope=e.scope}this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis;if(e.transporter){this.transporter=e.transporter}}function _requestToken(){return _requestToken2.apply(this,arguments)}function _requestToken2(){_requestToken2=_asyncToGenerator(_regenerator().m((function _callee6(){var e,t,r,n,s,a,c,l,h,g;return _regenerator().w((function(p){while(1)switch(p.n){case 0:e=Math.floor((new Date).getTime()/1e3);t=this.additionalClaims||{};r=Object.assign({iss:this.iss,scope:this.scope,aud:u,exp:e+3600,iat:e,sub:this.sub},t);n=A.sign({header:{alg:"RS256"},payload:r,secret:this.key});p.p=1;p.n=2;return this.transporter.request({method:"POST",url:u,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:n}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:s=p.v;this.rawToken=s.data;this.expiresAt=s.data.expires_in===null||s.data.expires_in===undefined?undefined:(e+s.data.expires_in)*1e3;return p.a(2,this.rawToken);case 3:p.p=3;g=p.v;this.rawToken=undefined;this.tokenExpires=undefined;l=g.response&&(a=g.response)!==null&&a!==void 0&&a.data?(c=g.response)===null||c===void 0?void 0:c.data:{};if(l.error){h=l.error_description?": ".concat(l.error_description):"";g.message="".concat(l.error).concat(h)}throw g;case 4:return p.a(2)}}),_callee6,this,[[1,3]])})));return _requestToken2.apply(this,arguments)}},6495:e=>{"use strict";e.exports=JSON.parse('{"name":"gaxios","version":"7.1.1","description":"A simple common HTTP client specifically for Google APIs and services.","main":"build/cjs/src/index.js","types":"build/cjs/src/index.d.ts","files":["build/"],"exports":{".":{"import":{"types":"./build/esm/src/index.d.ts","default":"./build/esm/src/index.js"},"require":{"types":"./build/cjs/src/index.d.ts","default":"./build/cjs/src/index.js"}}},"scripts":{"lint":"gts check --no-inline-config","test":"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000","compile":"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs","fix":"gts fix","prepare":"npm run compile","pretest":"npm run compile","webpack":"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js","docs":"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","prelint":"cd samples; npm link ../; npm install","clean":"gts clean"},"repository":"googleapis/gaxios","keywords":["google"],"engines":{"node":">=18"},"author":"Google, LLC","license":"Apache-2.0","devDependencies":{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","assert":"^2.0.0","browserify":"^17.0.0","c8":"^10.0.0","cors":"^2.8.5","express":"^5.0.0","gts":"^6.0.0","is-docker":"^3.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^4.0.0","jsdoc-region-tag":"^3.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1","linkinator":"^6.1.2","mocha":"^11.1.0","multiparty":"^4.2.1","mv":"^2.1.1","ncp":"^2.0.0","nock":"^14.0.0-beta.13","null-loader":"^4.0.0","pack-n-play":"^3.0.0","puppeteer":"^24.0.0","sinon":"^20.0.0","stream-browserify":"^3.0.0","tmp":"0.2.3","ts-loader":"^9.5.2","typescript":"^5.8.3","webpack":"^5.35.0","webpack-cli":"^6.0.1"},"dependencies":{"extend":"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2"}}')},6066:e=>{"use strict";e.exports=JSON.parse('{"name":"google-auth-library","version":"10.3.0","author":"Google Inc.","description":"Google APIs Authentication Client Library for Node.js","engines":{"node":">=18"},"main":"./build/src/index.js","types":"./build/src/index.d.ts","repository":"googleapis/google-auth-library-nodejs.git","keywords":["google","api","google apis","client","client library"],"dependencies":{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11","gaxios":"^7.0.0","gcp-metadata":"^7.0.0","google-logging-utils":"^1.0.0","gtoken":"^8.0.0","jws":"^4.0.0"},"devDependencies":{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0","c8":"^10.0.0","codecov":"^3.0.2","gts":"^6.0.0","is-docker":"^3.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^4.0.0","jsdoc-region-tag":"^3.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1","keypair":"^1.0.4","linkinator":"^6.1.2","mocha":"^11.1.0","mv":"^2.1.1","ncp":"^2.0.0","nock":"^14.0.5","null-loader":"^4.0.0","puppeteer":"^24.0.0","sinon":"^21.0.0","ts-loader":"^8.0.0","typescript":"5.8.2","webpack":"^5.21.2","webpack-cli":"^4.0.0"},"files":["build/src","!build/src/**/*.map"],"scripts":{"test":"c8 mocha build/test","clean":"gts clean","prepare":"npm run compile","lint":"gts check --no-inline-config","compile":"tsc -p .","fix":"gts fix","pretest":"npm run compile -- --sourceMap","docs":"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap","webpack":"webpack","browser-test":"karma start","docs-test":"linkinator docs","predocs-test":"npm run docs","prelint":"cd samples; npm link ../; npm install"},"license":"Apache-2.0"}')},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"@google-github-actions/deploy-cloud-functions","version":"3.0.9","description":"Deploy a Cloud Function","main":"dist/index.js","scripts":{"build":"rm -rf dist/ && ncc build -m src/main.ts -o dist/main","docs":"./node_modules/.bin/actions-gen-readme","lint":"eslint .","format":"eslint . --fix","test":"node --require ts-node/register --test-reporter spec --test tests/**/*.test.ts"},"engines":{"node":">= 24.x","npm":">= 11.x"},"repository":{"type":"git","url":"https://github.com/google-github-actions/deploy-cloud-functions"},"keywords":["actions","gcf","functions","google cloud","cloud function"],"author":"Google LLC","license":"Apache-2.0","dependencies":{"@actions/core":"^1.11.1","@actions/http-client":"^2.2.3","@google-github-actions/actions-utils":"^1.0.1","archiver":"^7.0.1","google-auth-library":"^10.3.0","ignore":"^7.0.5"},"devDependencies":{"@eslint/eslintrc":"^3.3.1","@eslint/js":"^9.34.0","@types/archiver":"^6.0.3","@types/node":"^24.3.0","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.3","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","eslint":"^9.34.0","node-stream-zip":"^1.15.0","prettier":"^3.6.2","ts-node":"^10.9.2","typescript-eslint":"^8.42.0","typescript":"^5.9.2"}}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={id:e,loaded:false,exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}r.loaded=true;return r.exports}__nccwpck_require__.m=__webpack_modules__;(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(r,n){if(n&1)r=this(r);if(n&8)return r;if(typeof r==="object"&&r){if(n&4&&r.__esModule)return r;if(n&16&&typeof r.then==="function")return r}var s=Object.create(null);__nccwpck_require__.r(s);var A={};t=t||[null,e({}),e([]),e(e)];for(var a=n&2&&r;typeof a=="object"&&!~t.indexOf(a);a=e(a)){Object.getOwnPropertyNames(a).forEach((e=>A[e]=()=>r[e]))}A["default"]=()=>r;__nccwpck_require__.d(s,A);return s}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=e=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((t,r)=>{__nccwpck_require__.f[r](e,t);return t}),[]))})();(()=>{__nccwpck_require__.u=e=>""+e+".index.js"})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";(()=>{var e={792:1};var installChunk=t=>{var r=t.modules,n=t.ids,s=t.runtime;for(var A in r){if(__nccwpck_require__.o(r,A)){__nccwpck_require__.m[A]=r[A]}}if(s)s(__nccwpck_require__);for(var a=0;a{if(!e[t]){if(true){installChunk(require("./"+__nccwpck_require__.u(t)))}else e[t]=1}}})();var __webpack_exports__={};(()=>{"use strict";var exports=__webpack_exports__;Object.defineProperty(exports,"__esModule",{value:true});const core_1=__nccwpck_require__(7484);const actions_utils_1=__nccwpck_require__(6160);const client_1=__nccwpck_require__(9592);const util_1=__nccwpck_require__(4527);async function run(){try{const e=(0,actions_utils_1.presence)((0,core_1.getInput)("project_id"))||(0,actions_utils_1.presence)(process.env?.GCLOUD_PROJECT);const t=(0,actions_utils_1.presence)((0,core_1.getInput)("region"))||"us-central1";const r=(0,core_1.getInput)("universe")||"googleapis.com";const n=(0,core_1.getInput)("name",{required:true});const s=(0,actions_utils_1.presence)((0,core_1.getInput)("description"));const A=(0,actions_utils_1.toEnum)(client_1.Environment,(0,core_1.getInput)("environment")||client_1.Environment.GEN_2);const a=(0,actions_utils_1.presence)((0,core_1.getInput)("kms_key_name"));const c=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("labels"));const l=(0,actions_utils_1.presence)((0,core_1.getInput)("source_dir"))||process.cwd();const u=(0,core_1.getInput)("runtime",{required:true});const h=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("build_environment_variables"));const g=(0,actions_utils_1.presence)((0,core_1.getInput)("build_service_account"));const p=(0,actions_utils_1.presence)((0,core_1.getInput)("build_worker_pool"));const C=(0,actions_utils_1.presence)((0,core_1.getInput)("docker_repository"));const y=(0,actions_utils_1.presence)((0,core_1.getInput)("entry_point"));const I=(0,actions_utils_1.parseBoolean)((0,core_1.getInput)("all_traffic_on_latest_revision"),true);const B=(0,actions_utils_1.presence)((0,core_1.getInput)("cpu"));const Q=(0,actions_utils_1.presence)((0,core_1.getInput)("memory"))||"256Mi";const b=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("environment_variables"));const w=(0,actions_utils_1.toEnum)(client_1.IngressSettings,(0,core_1.getInput)("ingress_settings")||client_1.IngressSettings.ALLOW_ALL);const S=(0,actions_utils_1.presence)((0,core_1.getInput)("max_instance_count"));const k=(0,util_1.stringToInt)((0,core_1.getInput)("max_instance_request_concurrency"));const v=(0,actions_utils_1.presence)((0,core_1.getInput)("min_instance_count"));const[R,D]=(0,util_1.parseSecrets)((0,core_1.getInput)("secrets"));const _=(0,actions_utils_1.presence)((0,core_1.getInput)("service_account"));const N=(0,actions_utils_1.parseDuration)((0,core_1.getInput)("service_timeout"));const T=(0,actions_utils_1.presence)((0,core_1.getInput)("vpc_connector"));const F=(0,actions_utils_1.toEnum)(client_1.VpcConnectorEgressSettings,(0,core_1.getInput)("vpc_connector_egress_settings")||client_1.VpcConnectorEgressSettings.PRIVATE_RANGES_ONLY);const L=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_location"));const M=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_type"));const x=(0,util_1.parseEventTriggerFilters)((0,core_1.getInput)("event_trigger_filters"));const O=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_pubsub_topic"));const U=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_service_account"));const P=(0,actions_utils_1.parseBoolean)((0,core_1.getInput)("event_trigger_retry"),true)?client_1.RetryPolicy.RETRY_POLICY_RETRY:client_1.RetryPolicy.RETRY_POLICY_DO_NOT_RETRY;const G=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_channel"));if(N<=0){throw new Error(`The 'service_timeout' parameter must be > 0 seconds (got ${N})`)}const H=new client_1.CloudFunctionsClient({projectID:e,location:t,universe:r});const Y={name:n,description:s,environment:A,kmsKeyName:a,labels:c,buildConfig:{runtime:u,entryPoint:y,dockerRepository:C,environmentVariables:h,serviceAccount:g,workerPool:p},serviceConfig:{allTrafficOnLatestRevision:I,availableCpu:B,availableMemory:Q,environmentVariables:b,ingressSettings:w,maxInstanceCount:S?+S:undefined,maxInstanceRequestConcurrency:k,minInstanceCount:v?+v:undefined,secretEnvironmentVariables:R,secretVolumes:D,serviceAccountEmail:_,timeoutSeconds:N,vpcConnector:T,vpcConnectorEgressSettings:F},eventTrigger:{triggerRegion:L,eventType:M,eventFilters:x,pubsubTopic:O,serviceAccountEmail:U,retryPolicy:P,channel:G}};if(!Y.eventTrigger?.eventType){delete Y.eventTrigger}if(!Y.serviceConfig?.vpcConnector){delete Y.serviceConfig?.vpcConnectorEgressSettings}const J=await H.deployFromLocalSource(Y,l,{onZip:(e,t)=>{(0,core_1.info)(`Created zip file from '${e}' at '${t}'`)},onZipAddEntry:e=>{(0,core_1.debug)((0,util_1.formatEntry)(e))},onZipIgnoreEntry:e=>{(0,core_1.debug)(`Ignoring ${e.name}`)},onNew:()=>{(0,core_1.info)("Creating new Cloud Functions deployment")},onExisting:()=>{(0,core_1.info)("Updating existing Cloud Functions deployment")},onPoll:(()=>{let e=0;return()=>{if(e===0){process.stdout.write(`Deploying Cloud Function...`)}else{process.stdout.write(`.`)}e++}})(),onDebug:e=>{if((0,core_1.isDebug)()){(0,core_1.debug)(e())}}});if(J.state!=="ACTIVE"){throw new Error(`Cloud Function deployment finished, but the function not in the `+`"ACTIVE" status. The current status is "${J.state}", which `+`could indicate a failed deployment. Check the Cloud Function `+`logs for more information.`)}(0,core_1.setOutput)("name",J.name);(0,core_1.setOutput)("url",J.url)}catch(e){const t=(0,actions_utils_1.errorMessage)(e);(0,core_1.setFailed)(`google-github-actions/deploy-cloud-functions failed with: ${t}`)}}if(require.main===require.cache[eval("__filename")]){run()}})();module.exports=__webpack_exports__})(); \ No newline at end of file +var n=r(9023).inherits;var s=r(7544).ZipArchiveOutputStream;var A=r(7544).ZipArchiveEntry;var a=r(3296);var c=e.exports=function(e){if(!(this instanceof c)){return new c(e)}e=this.options=e||{};e.zlib=e.zlib||{};s.call(this,e);if(typeof e.level==="number"&&e.level>=0){e.zlib.level=e.level;delete e.level}if(!e.forceZip64&&typeof e.zlib.level==="number"&&e.zlib.level===0){e.store=true}e.namePrependSlash=e.namePrependSlash||false;if(e.comment&&e.comment.length>0){this.setComment(e.comment)}};n(c,s);c.prototype._normalizeFileData=function(e){e=a.defaults(e,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var t=e.type==="directory";var r=e.type==="symlink";if(e.name){e.name=a.sanitizePath(e.name);if(!r&&e.name.slice(-1)==="/"){t=true;e.type="directory"}else if(t){e.name+="/"}}if(t||r){e.store=true}e.date=a.dateify(e.date);return e};c.prototype.entry=function(e,t,r){if(typeof r!=="function"){r=this._emitErrorCallback.bind(this)}t=this._normalizeFileData(t);if(t.type!=="file"&&t.type!=="directory"&&t.type!=="symlink"){r(new Error(t.type+" entries not currently supported"));return}if(typeof t.name!=="string"||t.name.length===0){r(new Error("entry name must be a non-empty string value"));return}if(t.type==="symlink"&&typeof t.linkname!=="string"){r(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var n=new A(t.name);n.setTime(t.date,this.options.forceLocalTime);if(t.namePrependSlash){n.setName(t.name,true)}if(t.store){n.setMethod(0)}if(t.comment.length>0){n.setComment(t.comment)}if(t.type==="symlink"&&typeof t.mode!=="number"){t.mode=40960}if(typeof t.mode==="number"){if(t.type==="symlink"){t.mode|=40960}n.setUnixMode(t.mode)}if(t.type==="symlink"&&typeof t.linkname==="string"){e=Buffer.from(t.linkname)}return s.prototype.entry.call(this,n,e,r)};c.prototype.finalize=function(){this.finish()}},9592:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A=400){throw new Error(`(${a}) ${A}`)}return JSON.parse(A)}catch(r){const n=(0,C.errorMessage)(r);throw new Error(`Failed to ${e} ${t}: ${n}`)}}async#X(e,t){const r=5e3;for(;;){if(t.onPoll)t.onPoll();const n=await this.getOperation(e);if(n.error){throw new Error(`Operation failed: ${n.error.message}`)}if(n.done){return n}await new Promise((e=>setTimeout(e,r)))}}async getOperation(e){if(e.startsWith("operations/")){e.slice(11)}const t=`${this.#$.cloudfunctions}/${e}`;const r=await this.#Z("GET",t);return r}async create(e,t){const r=this.fullResourceName(e.name);e.name=r;if(t?.onDebug){t.onDebug((()=>`create: computed Cloud Function:\n${JSON.stringify(e,null,2)}`))}const n=this.parentFromName(r);const s=r.split("/").at(-1);const A=`${this.#$.cloudfunctions}/${n}/functions?functionId=${s}`;const a=JSON.stringify(e);const c=await this.#Z("POST",A,a);const l=await this.#X(c.name,{onPoll:t?.onPoll,onDebug:t?.onDebug});if(!l.response){throw new Error(`create operation result did not include function`)}return l.response}async delete(e,t){const r=this.fullResourceName(e);const n=`${this.#$.cloudfunctions}/${r}`;const s=await this.#Z("DELETE",n);return await this.#X(s.name,{onPoll:t?.onPoll,onDebug:t?.onDebug})}async generateUploadURL(e){const t=`${this.#$.cloudfunctions}/${e}/functions:generateUploadUrl`;const r=JSON.stringify({environment:b.GEN_2});const n=await this.#Z("POST",t,r);return n}async get(e){const t=this.fullResourceName(e);const r=`${this.#$.cloudfunctions}/${t}`;const n=await this.#Z("GET",r);return n}async getSafe(e){try{return await this.get(e)}catch(e){const t=(0,C.errorMessage)(e);if(!t.includes("404")&&!t.includes("NOT_FOUND")){throw new Error(`Failed to lookup existing function - does the caller have `+`cloudfunctions.functions.get permissions? ${e}`)}return null}}async patch(e,t){const r=this.fullResourceName(e.name);e.name=r;if(t?.onDebug){t.onDebug((()=>`patch: computed Cloud Function:\n${JSON.stringify(e,null,2)}`))}const n=this.computeUpdateMask(e);if(t?.onDebug){t.onDebug((()=>`Computed updateMask: ${n}`))}const s=`${this.#$.cloudfunctions}/${r}?updateMask=${n}`;const A=JSON.stringify(e);const a=await this.#Z("PATCH",s,A);const c=await this.#X(a.name,{onPoll:t?.onPoll,onDebug:t?.onDebug});if(!c.response){throw new Error(`patch operation result did not include function`)}return c.response}async deployFromLocalSource(e,t,r){const n=(0,c.randomBytes)(12).toString("hex");const s=u.join((0,h.tmpdir)(),`cfsrc-${n}.zip`);try{await(0,y.zipDir)(t,s,r);if(r?.onZip)r.onZip(t,s)}catch(e){throw new Error(`Zip file ${s} creation failed: ${e}`)}const A=this.fullResourceName(e.name);e.name=A;const a=this.parentFromName(A);let l;try{l=await this.generateUploadURL(a);await this.uploadSource(l.uploadUrl,s)}catch(e){throw new Error(`Failed to upload zip file: ${e}`)}await(0,C.forceRemove)(s);if(!e.buildConfig){e.buildConfig={}}if(!e.buildConfig.source){e.buildConfig.source={}}e.buildConfig.source.storageSource=l.storageSource;const g=await this.getSafe(A);if(g){if(r?.onExisting)r.onExisting();const t=await this.patch(e,{onPoll:r?.onPoll,onDebug:r?.onDebug});return t}else{if(r?.onNew)r.onNew();const t=await this.create(e,{onPoll:r?.onPoll,onDebug:r?.onDebug});return t}}async uploadSource(e,t){const r=l.default.createReadStream(t);try{const t=await this.#K.request("PUT",e,r,{"content-type":"application/zip"});const n=await t.readBody();const s=t.message.statusCode||500;if(s>=400){throw new Error(`(${s}) ${n}`)}}catch(e){const t=(0,C.errorMessage)(e);throw new Error(`Failed to upload source: ${t}`)}}fullResourceName(e){if(!e){e=""}e=e.trim();if(!e){throw new Error(`Failed to parse resource name: name cannot be empty`)}if(e.includes("/")){if(e.match(Q)){return e}else{throw new Error(`Invalid resource name '${e}'`)}}const t=this.#q;if(!t){throw new Error(`Failed to get project ID to build resource name. Try setting 'project_id'.`)}const r=this.#z;if(!r){throw new Error(`Failed to get location (region) to build resource name. Try setting 'region'.`)}return`projects/${t}/locations/${r}/functions/${e}`}parentFromName(e){const t=e.split("/");if(t.length<3){throw new Error(`Invalid or missing name '${e}' (expected 'projects/p/locations/l/functions/f')`)}const r=t.slice(0,t.length-2).join("/");return r}computeUpdateMask(e){const t=[];if(e.name!==undefined)t.push("name");if(e.description!==undefined)t.push("description");if(e.environment!==undefined)t.push("environment");if(e.kmsKeyName!==undefined)t.push("kmsKeyName");if(e.labels!==undefined)t.push("labels");if(e.buildConfig?.runtime!==undefined)t.push("buildConfig.runtime");if(e.buildConfig?.entryPoint!==undefined)t.push("buildConfig.entryPoint");if(e.buildConfig?.source!==undefined)t.push("buildConfig.source");if(e.buildConfig?.dockerRepository!==undefined)t.push("buildConfig.dockerRepository");if(e.buildConfig?.environmentVariables!==undefined)t.push("buildConfig.environmentVariables");if(e.buildConfig?.serviceAccount!==undefined)t.push("buildConfig.serviceAccount");if(e.buildConfig?.workerPool!==undefined)t.push("buildConfig.workerPool");if(e.serviceConfig?.allTrafficOnLatestRevision!==undefined)t.push("serviceConfig.allTrafficOnLatestRevision");if(e.serviceConfig?.availableCpu!==undefined)t.push("serviceConfig.availableCpu");if(e.serviceConfig?.availableMemory!==undefined)t.push("serviceConfig.availableMemory");if(e.serviceConfig?.environmentVariables!==undefined)t.push("serviceConfig.environmentVariables");if(e.serviceConfig?.ingressSettings!==undefined)t.push("serviceConfig.ingressSettings");if(e.serviceConfig?.maxInstanceCount!==undefined)t.push("serviceConfig.maxInstanceCount");if(e.serviceConfig?.maxInstanceRequestConcurrency!==undefined)t.push("serviceConfig.maxInstanceRequestConcurrency");if(e.serviceConfig?.minInstanceCount!==undefined)t.push("serviceConfig.minInstanceCount");if(e.serviceConfig?.secretEnvironmentVariables!==undefined)t.push("serviceConfig.secretEnvironmentVariables");if(e.serviceConfig?.secretVolumes!==undefined)t.push("serviceConfig.secretVolumes");if(e.serviceConfig?.serviceAccountEmail!==undefined)t.push("serviceConfig.serviceAccountEmail");if(e.serviceConfig?.timeoutSeconds!==undefined)t.push("serviceConfig.timeoutSeconds");if(e.serviceConfig?.vpcConnector!==undefined)t.push("serviceConfig.vpcConnector");if(e.serviceConfig?.vpcConnectorEgressSettings!==undefined)t.push("serviceConfig.vpcConnectorEgressSettings");if(e.eventTrigger?.triggerRegion!==undefined)t.push("eventTrigger.triggerRegion");if(e.eventTrigger?.eventType!==undefined)t.push("eventTrigger.eventType");if(e.eventTrigger?.eventFilters!==undefined)t.push("eventTrigger.eventFilters");if(e.eventTrigger?.pubsubTopic!==undefined)t.push("eventTrigger.pubsubTopic");if(e.eventTrigger?.serviceAccountEmail!==undefined)t.push("eventTrigger.serviceAccountEmail");if(e.eventTrigger?.retryPolicy!==undefined)t.push("eventTrigger.retryPolicy");if(e.eventTrigger?.channel!==undefined)t.push("eventTrigger.channel");if(e.eventTrigger?.service!==undefined)t.push("eventTrigger.service");return t.join(",")}}t.CloudFunctionsClient=CloudFunctionsClient},7355:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SecretName=void 0;class SecretName{project;name;version;constructor(e){e=(e||"").trim();if(!e){throw new Error(`Missing secret name`)}const t=e.split("/");switch(t.length){case 6:{this.project=t[1];this.name=t[3];this.version=t[5];break}case 4:{this.project=t[1];this.name=t[3];this.version="latest";break}case 3:{this.project=t[0];this.name=t[1];this.version=t[2];break}case 2:{this.project=t[0];this.name=t[1];this.version="latest";break}default:{throw new TypeError(`Failed to parse secret reference "${e}": unknown format. Secrets `+`should be of the format "projects/p/secrets/s/versions/v".`)}}}selfLink(){return`projects/${this.project}/secrets/${this.name}/versions/${this.version}`}}t.SecretName=SecretName},4527:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{if(a.ignores(e.name)){if(r?.onZipIgnoreEntry)r.onZipIgnoreEntry(e);return false}return e};return new Promise(((s,A)=>{const a=h.create("zip",{zlib:{level:7}});a.on("entry",(e=>{if(r?.onZipAddEntry)r.onZipAddEntry(e)}));a.on("warning",(e=>A(e)));a.on("error",(e=>A(e)));n.on("finish",(()=>s(t)));a.pipe(n);a.directory(e,false,ignoreFn);a.finalize()}))}function formatEntry(e){const t=e.name;const r=e.mode||"000";const n=e.sourcePath||"unknown";const s=(e.type||"unknown").toUpperCase()[0];return`[${s}] (${r}) ${t} => ${n}`}function stringToInt(e){e=(e||"").trim().replace(/[_,]/g,"");if(e===""){return undefined}const t=parseInt(e);if(isNaN(t)){throw new Error(`input "${e}" is not a number`)}return t}function parseEventTriggerFilters(e){const t=(0,g.parseKVString)(e);if(t===undefined){return undefined}const r=[];for(const[e,n]of Object.entries(t)){if(n.startsWith("PATTERN:")){r.push({attribute:e,value:n.slice(8),operator:"match-path-pattern"})}else{r.push({attribute:e,value:n})}}return r}function parseSecrets(e){const t=(0,g.parseKVString)(e);if(t===undefined){return[undefined,undefined]}const r=[];const n=[];for(const[e,s]of Object.entries(t)){const t=new C.SecretName(s);if(e.startsWith("/")){const r=l.posix.dirname(e);const s=l.posix.basename(e);n.push({mountPath:r,projectId:t.project,secret:t.name,versions:[{path:s,version:t.version}]})}else{r.push({key:e,projectId:t.project,secret:t.name,version:t.version})}}return[r,n]}},2613:e=>{"use strict";e.exports=require("assert")},290:e=>{"use strict";e.exports=require("async_hooks")},181:e=>{"use strict";e.exports=require("buffer")},5317:e=>{"use strict";e.exports=require("child_process")},4236:e=>{"use strict";e.exports=require("console")},9140:e=>{"use strict";e.exports=require("constants")},6982:e=>{"use strict";e.exports=require("crypto")},1637:e=>{"use strict";e.exports=require("diagnostics_channel")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},1943:e=>{"use strict";e.exports=require("fs/promises")},8611:e=>{"use strict";e.exports=require("http")},5675:e=>{"use strict";e.exports=require("http2")},5692:e=>{"use strict";e.exports=require("https")},9278:e=>{"use strict";e.exports=require("net")},4589:e=>{"use strict";e.exports=require("node:assert")},4573:e=>{"use strict";e.exports=require("node:buffer")},7598:e=>{"use strict";e.exports=require("node:crypto")},8474:e=>{"use strict";e.exports=require("node:events")},3024:e=>{"use strict";e.exports=require("node:fs")},1455:e=>{"use strict";e.exports=require("node:fs/promises")},7067:e=>{"use strict";e.exports=require("node:http")},4708:e=>{"use strict";e.exports=require("node:https")},7030:e=>{"use strict";e.exports=require("node:net")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},7075:e=>{"use strict";e.exports=require("node:stream")},7830:e=>{"use strict";e.exports=require("node:stream/web")},6193:e=>{"use strict";e.exports=require("node:string_decoder")},3136:e=>{"use strict";e.exports=require("node:url")},7975:e=>{"use strict";e.exports=require("node:util")},8522:e=>{"use strict";e.exports=require("node:zlib")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},2987:e=>{"use strict";e.exports=require("perf_hooks")},932:e=>{"use strict";e.exports=require("process")},3480:e=>{"use strict";e.exports=require("querystring")},2203:e=>{"use strict";e.exports=require("stream")},3774:e=>{"use strict";e.exports=require("stream/web")},3193:e=>{"use strict";e.exports=require("string_decoder")},3557:e=>{"use strict";e.exports=require("timers")},4756:e=>{"use strict";e.exports=require("tls")},2018:e=>{"use strict";e.exports=require("tty")},7016:e=>{"use strict";e.exports=require("url")},9023:e=>{"use strict";e.exports=require("util")},8253:e=>{"use strict";e.exports=require("util/types")},1493:e=>{"use strict";e.exports=require("v8")},8167:e=>{"use strict";e.exports=require("worker_threads")},3106:e=>{"use strict";e.exports=require("zlib")},7182:(e,t,r)=>{"use strict";const n=r(7075).Writable;const s=r(7975).inherits;const A=r(4136);const a=r(612);const c=r(2271);const l=45;const u=Buffer.from("-");const h=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}n.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.headerFirst;this._dashes=0;this._parts=0;this._finished=false;this._realFinish=false;this._isPreamble=true;this._justMatched=false;this._firstWrite=true;this._inHeader=true;this._part=undefined;this._cb=undefined;this._ignoreData=false;this._partOpts={highWaterMark:e.partHwm};this._pause=false;const t=this;this._hparser=new c(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}s(Dicer,n);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{n.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,r){if(!this._hparser&&!this._bparser){return r()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new a(this._partOpts);if(this.listenerCount("preamble")!==0){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const n=r(8474).EventEmitter;const s=r(7975).inherits;const A=r(2393);const a=r(4136);const c=Buffer.from("\r\n\r\n");const l=/\r\n/g;const u=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){n.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=A(e,"maxHeaderPairs",2e3);this.maxHeaderSize=A(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new a(c);this.ss.on("info",(function(e,r,n,s){if(r&&!t.maxed){if(t.nread+s-n>=t.maxHeaderSize){s=t.maxHeaderSize-t.nread+n;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=s-n}t.buffer+=r.toString("binary",n,s)}if(e){t._finish()}}))}s(HeaderParser,n);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};HeaderParser.prototype.reset=function(){this.finished=false;this.buffer="";this.header={};this.ss.reset()};HeaderParser.prototype._finish=function(){if(this.buffer){this._parseHeader()}this.ss.matches=this.ss.maxMatches;const e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(l);const t=e.length;let r,n;for(var s=0;s{"use strict";const n=r(7975).inherits;const s=r(7075).Readable;function PartStream(e){s.call(this,e)}n(PartStream,s);PartStream.prototype._read=function(e){};e.exports=PartStream},4136:(e,t,r)=>{"use strict";const n=r(8474).EventEmitter;const s=r(7975).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>256){throw new Error("The needle cannot have a length bigger than 256.")}this.maxMatches=Infinity;this.matches=0;this._occ=new Array(256).fill(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var r=0;r=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const r=this._lookbehind_size+A;if(r>0){this.emit("info",false,this._lookbehind,0,r)}this._lookbehind.copy(this._lookbehind,0,r,this._lookbehind_size-r);this._lookbehind_size-=r;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}A+=(A>=0)*this._bufpos;if(e.indexOf(r,A)!==-1){A=e.indexOf(r,A);++this.matches;if(A>0){this.emit("info",true,e,this._bufpos,A)}else{this.emit("info",true)}return this._bufpos=A+n}else{A=t-n}while(A0){this.emit("info",false,e,this._bufpos,A{"use strict";const n=r(7075).Writable;const{inherits:s}=r(7975);const A=r(7182);const a=r(1192);const c=r(855);const l=r(8929);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...r}=e;this.opts={autoDestroy:false,...r};n.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}s(Busboy,n);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}n.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=l(e["content-type"]);const r={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(a.detect.test(t[0])){return new a(this,r)}if(c.detect.test(t[0])){return new c(this,r)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,r){this._parser.write(e,r)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=A},1192:(e,t,r)=>{"use strict";const{Readable:n}=r(7075);const{inherits:s}=r(7975);const A=r(7182);const a=r(8929);const c=r(2747);const l=r(692);const u=r(2393);const h=/^boundary$/i;const g=/^form-data$/i;const p=/^charset$/i;const C=/^filename$/i;const y=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let r;let n;const s=this;let I;const B=t.limits;const Q=t.isPartAFile||((e,t,r)=>t==="application/octet-stream"||r!==undefined);const b=t.parsedConType||[];const w=t.defCharset||"utf8";const S=t.preservePath;const k={highWaterMark:t.fileHwm};for(r=0,n=b.length;rN){s.parser.removeListener("part",onPart);s.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(U){const e=U;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(A){let u;let h;let I;let B;let b;let N;let T=0;if(A["content-type"]){I=a(A["content-type"][0]);if(I[0]){u=I[0].toLowerCase();for(r=0,n=I.length;rR){const n=R-T+e.length;if(n>0){r.push(e.slice(0,n))}r.truncated=true;r.bytesRead=R;t.removeAllListeners("data");r.emit("limit");return}else if(!r.push(e)){s._pause=true}r.bytesRead=T};P=function(){O=undefined;r.push(null)}}else{if(M===_){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++M;++x;let r="";let n=false;U=t;F=function(e){if((T+=e.length)>v){const s=v-(T-e.length);r+=e.toString("binary",0,s);n=true;t.removeAllListeners("data")}else{r+=e.toString("binary")}};P=function(){U=undefined;if(r.length){r=c(r,"binary",B)}e.emit("field",h,r,false,n,b,u);--x;checkFinished()}}t._readableState.sync=false;t.on("data",F);t.on("end",P)})).on("error",(function(e){if(O){O.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){P=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const r=this.parser.write(e);if(r&&!this._pause){t()}else{this._needDrain=!r;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){n.call(this,e);this.bytesRead=0;this.truncated=false}s(FileStream,n);FileStream.prototype._read=function(e){};e.exports=Multipart},855:(e,t,r)=>{"use strict";const n=r(1496);const s=r(2747);const A=r(2393);const a=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const r=t.limits;const s=t.parsedConType;this.boy=e;this.fieldSizeLimit=A(r,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=A(r,"fieldNameSize",100);this.fieldsLimit=A(r,"fields",Infinity);let c;for(var l=0,u=s.length;la){this._key+=this.decoder.write(e.toString("binary",a,r))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();a=r+1}else if(n!==undefined){++this._fields;let r;const A=this._keyTrunc;if(n>a){r=this._key+=this.decoder.write(e.toString("binary",a,n))}else{r=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(r.length){this.boy.emit("field",s(r,"binary",this.charset),"",A,false)}a=n+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(A>a){this._key+=this.decoder.write(e.toString("binary",a,A))}a=A;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(aa){this._val+=this.decoder.write(e.toString("binary",a,n))}this.boy.emit("field",s(this._key,"binary",this.charset),s(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc);this._state="key";this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();a=n+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(A>a){this._val+=this.decoder.write(e.toString("binary",a,A))}a=A;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(a0){this.boy.emit("field",s(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",s(this._key,"binary",this.charset),s(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},1496:e=>{"use strict";const t=/\+/g;const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Decoder(){this.buffer=undefined}Decoder.prototype.write=function(e){e=e.replace(t," ");let n="";let s=0;let A=0;const a=e.length;for(;sA){n+=e.substring(A,s);A=s}this.buffer="";++A}}if(A{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},2747:function(e){"use strict";const t=new TextDecoder("utf-8");const r=new Map([["utf-8",t],["utf8",t]]);function getDecoder(e){let t;while(true){switch(e){case"utf-8":case"utf8":return n.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return n.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return n.utf16le;case"base64":return n.base64;default:if(t===undefined){t=true;e=e.toLowerCase();continue}return n.other.bind(e)}}}const n={utf8:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.utf8Slice(0,e.length)},latin1:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){return e}return e.latin1Slice(0,e.length)},utf16le:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.ucs2Slice(0,e.length)},base64:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.base64Slice(0,e.length)},other:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}if(r.has(this.toString())){try{return r.get(this).decode(e)}catch{}}return typeof e==="string"?e:e.toString()}};function decodeText(e,t,r){if(e){return getDecoder(r)(e,t)}return e}e.exports=decodeText},2393:e=>{"use strict";e.exports=function getLimit(e,t,r){if(!e||e[t]===undefined||e[t]===null){return r}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},8929:(e,t,r)=>{"use strict";const n=r(2747);const s=/%[a-fA-F0-9][a-fA-F0-9]/g;const A={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"","%08":"\b","%09":"\t","%0a":"\n","%0A":"\n","%0b":"\v","%0B":"\v","%0c":"\f","%0C":"\f","%0d":"\r","%0D":"\r","%0e":"","%0E":"","%0f":"","%0F":"","%10":"","%11":"","%12":"","%13":"","%14":"","%15":"","%16":"","%17":"","%18":"","%19":"","%1a":"","%1A":"","%1b":"","%1B":"","%1c":"","%1C":"","%1d":"","%1D":"","%1e":"","%1E":"","%1f":"","%1F":"","%20":" ","%21":"!","%22":'"',"%23":"#","%24":"$","%25":"%","%26":"&","%27":"'","%28":"(","%29":")","%2a":"*","%2A":"*","%2b":"+","%2B":"+","%2c":",","%2C":",","%2d":"-","%2D":"-","%2e":".","%2E":".","%2f":"/","%2F":"/","%30":"0","%31":"1","%32":"2","%33":"3","%34":"4","%35":"5","%36":"6","%37":"7","%38":"8","%39":"9","%3a":":","%3A":":","%3b":";","%3B":";","%3c":"<","%3C":"<","%3d":"=","%3D":"=","%3e":">","%3E":">","%3f":"?","%3F":"?","%40":"@","%41":"A","%42":"B","%43":"C","%44":"D","%45":"E","%46":"F","%47":"G","%48":"H","%49":"I","%4a":"J","%4A":"J","%4b":"K","%4B":"K","%4c":"L","%4C":"L","%4d":"M","%4D":"M","%4e":"N","%4E":"N","%4f":"O","%4F":"O","%50":"P","%51":"Q","%52":"R","%53":"S","%54":"T","%55":"U","%56":"V","%57":"W","%58":"X","%59":"Y","%5a":"Z","%5A":"Z","%5b":"[","%5B":"[","%5c":"\\","%5C":"\\","%5d":"]","%5D":"]","%5e":"^","%5E":"^","%5f":"_","%5F":"_","%60":"`","%61":"a","%62":"b","%63":"c","%64":"d","%65":"e","%66":"f","%67":"g","%68":"h","%69":"i","%6a":"j","%6A":"j","%6b":"k","%6B":"k","%6c":"l","%6C":"l","%6d":"m","%6D":"m","%6e":"n","%6E":"n","%6f":"o","%6F":"o","%70":"p","%71":"q","%72":"r","%73":"s","%74":"t","%75":"u","%76":"v","%77":"w","%78":"x","%79":"y","%7a":"z","%7A":"z","%7b":"{","%7B":"{","%7c":"|","%7C":"|","%7d":"}","%7D":"}","%7e":"~","%7E":"~","%7f":"","%7F":"","%80":"€","%81":"","%82":"‚","%83":"ƒ","%84":"„","%85":"…","%86":"†","%87":"‡","%88":"ˆ","%89":"‰","%8a":"Š","%8A":"Š","%8b":"‹","%8B":"‹","%8c":"Œ","%8C":"Œ","%8d":"","%8D":"","%8e":"Ž","%8E":"Ž","%8f":"","%8F":"","%90":"","%91":"‘","%92":"’","%93":"“","%94":"”","%95":"•","%96":"–","%97":"—","%98":"˜","%99":"™","%9a":"š","%9A":"š","%9b":"›","%9B":"›","%9c":"œ","%9C":"œ","%9d":"","%9D":"","%9e":"ž","%9E":"ž","%9f":"Ÿ","%9F":"Ÿ","%a0":" ","%A0":" ","%a1":"¡","%A1":"¡","%a2":"¢","%A2":"¢","%a3":"£","%A3":"£","%a4":"¤","%A4":"¤","%a5":"¥","%A5":"¥","%a6":"¦","%A6":"¦","%a7":"§","%A7":"§","%a8":"¨","%A8":"¨","%a9":"©","%A9":"©","%aa":"ª","%Aa":"ª","%aA":"ª","%AA":"ª","%ab":"«","%Ab":"«","%aB":"«","%AB":"«","%ac":"¬","%Ac":"¬","%aC":"¬","%AC":"¬","%ad":"­","%Ad":"­","%aD":"­","%AD":"­","%ae":"®","%Ae":"®","%aE":"®","%AE":"®","%af":"¯","%Af":"¯","%aF":"¯","%AF":"¯","%b0":"°","%B0":"°","%b1":"±","%B1":"±","%b2":"²","%B2":"²","%b3":"³","%B3":"³","%b4":"´","%B4":"´","%b5":"µ","%B5":"µ","%b6":"¶","%B6":"¶","%b7":"·","%B7":"·","%b8":"¸","%B8":"¸","%b9":"¹","%B9":"¹","%ba":"º","%Ba":"º","%bA":"º","%BA":"º","%bb":"»","%Bb":"»","%bB":"»","%BB":"»","%bc":"¼","%Bc":"¼","%bC":"¼","%BC":"¼","%bd":"½","%Bd":"½","%bD":"½","%BD":"½","%be":"¾","%Be":"¾","%bE":"¾","%BE":"¾","%bf":"¿","%Bf":"¿","%bF":"¿","%BF":"¿","%c0":"À","%C0":"À","%c1":"Á","%C1":"Á","%c2":"Â","%C2":"Â","%c3":"Ã","%C3":"Ã","%c4":"Ä","%C4":"Ä","%c5":"Å","%C5":"Å","%c6":"Æ","%C6":"Æ","%c7":"Ç","%C7":"Ç","%c8":"È","%C8":"È","%c9":"É","%C9":"É","%ca":"Ê","%Ca":"Ê","%cA":"Ê","%CA":"Ê","%cb":"Ë","%Cb":"Ë","%cB":"Ë","%CB":"Ë","%cc":"Ì","%Cc":"Ì","%cC":"Ì","%CC":"Ì","%cd":"Í","%Cd":"Í","%cD":"Í","%CD":"Í","%ce":"Î","%Ce":"Î","%cE":"Î","%CE":"Î","%cf":"Ï","%Cf":"Ï","%cF":"Ï","%CF":"Ï","%d0":"Ð","%D0":"Ð","%d1":"Ñ","%D1":"Ñ","%d2":"Ò","%D2":"Ò","%d3":"Ó","%D3":"Ó","%d4":"Ô","%D4":"Ô","%d5":"Õ","%D5":"Õ","%d6":"Ö","%D6":"Ö","%d7":"×","%D7":"×","%d8":"Ø","%D8":"Ø","%d9":"Ù","%D9":"Ù","%da":"Ú","%Da":"Ú","%dA":"Ú","%DA":"Ú","%db":"Û","%Db":"Û","%dB":"Û","%DB":"Û","%dc":"Ü","%Dc":"Ü","%dC":"Ü","%DC":"Ü","%dd":"Ý","%Dd":"Ý","%dD":"Ý","%DD":"Ý","%de":"Þ","%De":"Þ","%dE":"Þ","%DE":"Þ","%df":"ß","%Df":"ß","%dF":"ß","%DF":"ß","%e0":"à","%E0":"à","%e1":"á","%E1":"á","%e2":"â","%E2":"â","%e3":"ã","%E3":"ã","%e4":"ä","%E4":"ä","%e5":"å","%E5":"å","%e6":"æ","%E6":"æ","%e7":"ç","%E7":"ç","%e8":"è","%E8":"è","%e9":"é","%E9":"é","%ea":"ê","%Ea":"ê","%eA":"ê","%EA":"ê","%eb":"ë","%Eb":"ë","%eB":"ë","%EB":"ë","%ec":"ì","%Ec":"ì","%eC":"ì","%EC":"ì","%ed":"í","%Ed":"í","%eD":"í","%ED":"í","%ee":"î","%Ee":"î","%eE":"î","%EE":"î","%ef":"ï","%Ef":"ï","%eF":"ï","%EF":"ï","%f0":"ð","%F0":"ð","%f1":"ñ","%F1":"ñ","%f2":"ò","%F2":"ò","%f3":"ó","%F3":"ó","%f4":"ô","%F4":"ô","%f5":"õ","%F5":"õ","%f6":"ö","%F6":"ö","%f7":"÷","%F7":"÷","%f8":"ø","%F8":"ø","%f9":"ù","%F9":"ù","%fa":"ú","%Fa":"ú","%fA":"ú","%FA":"ú","%fb":"û","%Fb":"û","%fB":"û","%FB":"û","%fc":"ü","%Fc":"ü","%fC":"ü","%FC":"ü","%fd":"ý","%Fd":"ý","%fD":"ý","%FD":"ý","%fe":"þ","%Fe":"þ","%fE":"þ","%FE":"þ","%ff":"ÿ","%Ff":"ÿ","%fF":"ÿ","%FF":"ÿ"};function encodedReplacer(e){return A[e]}const a=0;const c=1;const l=2;const u=3;function parseParams(e){const t=[];let r=a;let A="";let h=false;let g=false;let p=0;let C="";const y=e.length;for(var I=0;I{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GCE_LINUX_BIOS_PATHS=void 0;t.isGoogleCloudServerless=isGoogleCloudServerless;t.isGoogleComputeEngineLinux=isGoogleComputeEngineLinux;t.isGoogleComputeEngineMACAddress=isGoogleComputeEngineMACAddress;t.isGoogleComputeEngine=isGoogleComputeEngine;t.detectGCPResidency=detectGCPResidency;const n=r(9896);const s=r(857);t.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};const A=/^42:01/;function isGoogleCloudServerless(){const e=process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE;return!!e}function isGoogleComputeEngineLinux(){if((0,s.platform)()!=="linux")return false;try{(0,n.statSync)(t.GCE_LINUX_BIOS_PATHS.BIOS_DATE);const e=(0,n.readFileSync)(t.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(e)}catch{return false}}function isGoogleComputeEngineMACAddress(){const e=(0,s.networkInterfaces)();for(const t of Object.values(e)){if(!t)continue;for(const{mac:e}of t){if(A.test(e)){return true}}}return false}function isGoogleComputeEngine(){return isGoogleComputeEngineLinux()||isGoogleComputeEngineMACAddress()}function detectGCPResidency(){return isGoogleCloudServerless()||isGoogleComputeEngine()}},9595:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{switch(e){case"params":case"property":case"headers":break;case"qs":throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw new Error(`'${e}' is not a valid configuration option.`)}}))}async function metadataAccessor(e,r={},n=3,s=false){const A=new Headers(t.HEADERS);let a="";let u={};if(typeof e==="object"){const t=e;new Headers(t.headers).forEach(((e,t)=>A.set(t,e)));a=t.metadataKey;u=t.params||u;n=t.noResponseRetries||n;s=t.fastFail||s}else{a=e}if(typeof r==="string"){a+=`/${r}`}else{validate(r);if(r.property){a+=`/${r.property}`}new Headers(r.headers).forEach(((e,t)=>A.set(t,e)));u=r.params||u}const h=s?fastFailMetadataRequest:c.request;const p={url:`${getBaseUrl()}/${a}`,headers:A,retryConfig:{noResponseRetries:n},params:u,responseType:"text",timeout:requestTimeout()};g.info("instance request %j",p);const C=await h(p);g.info("instance metadata is %s",C.data);const y=C.headers.get(t.HEADER_NAME);if(y!==t.HEADER_VALUE){throw new RangeError(`Invalid response from metadata service: incorrect ${t.HEADER_NAME} header. Expected '${t.HEADER_VALUE}', got ${y?`'${y}'`:"no header"}`)}if(typeof C.data==="string"){try{return l.parse(C.data)}catch{}}return C.data}async function fastFailMetadataRequest(e){const r={...e,url:e.url?.toString().replace(getBaseUrl(),getBaseUrl(t.SECONDARY_HOST_ADDRESS))};const n=(0,c.request)(e);const s=(0,c.request)(r);return Promise.any([n,s])}function instance(e){return metadataAccessor("instance",e)}function project(e){return metadataAccessor("project",e)}function universe(e){return metadataAccessor("universe",e)}async function bulk(e){const t={};await Promise.all(e.map((e=>(async()=>{const r=await metadataAccessor(e);const n=e.metadataKey;t[n]=r})())));return t}function detectGCPAvailableRetries(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}let p;async function isAvailable(){if(process.env.METADATA_SERVER_DETECTION){const e=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(e in t.METADATA_SERVER_DETECTION)){throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${e}\`, but it should be \`${Object.keys(t.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`)}switch(e){case"assume-present":return true;case"none":return false;case"bios-only":return getGCPResidency();case"ping-only":}}try{if(p===undefined){p=metadataAccessor("instance",undefined,detectGCPAvailableRetries(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))}await p;return true}catch(e){const t=e;if(process.env.DEBUG_AUTH){console.info(t)}if(t.type==="request-timeout"){return false}if(t.response&&t.response.status===404){return false}else{if(!(t.response&&t.response.status===404)&&(!t.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(t.code.toString()))){let e="UNKNOWN";if(t.code)e=t.code.toString();process.emitWarning(`received unexpected error = ${t.message} code = ${e}`,"MetadataLookupWarning")}return false}}}function resetIsAvailableCache(){p=undefined}t.gcpResidencyCache=null;function getGCPResidency(){if(t.gcpResidencyCache===null){setGCPResidency()}return t.gcpResidencyCache}function setGCPResidency(e=null){t.gcpResidencyCache=e!==null?e:(0,u.detectGCPResidency)()}function requestTimeout(){return getGCPResidency()?0:3e3}a(r(6128),t)},2981:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Glob=void 0;const n=r(1409);const s=r(3136);const A=r(8958);const a=r(7813);const c=r(1157);const l=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Glob{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");this.withFileTypes=!!t.withFileTypes;this.signal=t.signal;this.follow=!!t.follow;this.dot=!!t.dot;this.dotRelative=!!t.dotRelative;this.nodir=!!t.nodir;this.mark=!!t.mark;if(!t.cwd){this.cwd=""}else if(t.cwd instanceof URL||t.cwd.startsWith("file://")){t.cwd=(0,s.fileURLToPath)(t.cwd)}this.cwd=t.cwd||"";this.root=t.root;this.magicalBraces=!!t.magicalBraces;this.nobrace=!!t.nobrace;this.noext=!!t.noext;this.realpath=!!t.realpath;this.absolute=t.absolute;this.includeChildMatches=t.includeChildMatches!==false;this.noglobstar=!!t.noglobstar;this.matchBase=!!t.matchBase;this.maxDepth=typeof t.maxDepth==="number"?t.maxDepth:Infinity;this.stat=!!t.stat;this.ignore=t.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof e==="string"){e=[e]}this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){e=e.map((e=>e.replace(/\\/g,"/")))}if(this.matchBase){if(t.noglobstar){throw new TypeError("base matching requires globstar")}e=e.map((e=>e.includes("/")?e:`./**/${e}`))}this.pattern=e;this.platform=t.platform||l;this.opts={...t,platform:this.platform};if(t.scurry){this.scurry=t.scurry;if(t.nocase!==undefined&&t.nocase!==t.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const e=t.platform==="win32"?A.PathScurryWin32:t.platform==="darwin"?A.PathScurryDarwin:t.platform?A.PathScurryPosix:A.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const r=this.platform==="darwin"||this.platform==="win32";const c={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const u=this.pattern.map((e=>new n.Minimatch(e,c)));const[h,g]=u.reduce(((e,t)=>{e[0].push(...t.set);e[1].push(...t.globParts);return e}),[[],[]]);this.patterns=h.map(((e,t)=>{const r=g[t];if(!r)throw new Error("invalid pattern object");return new a.Pattern(e,r,0,this.platform)}))}async walk(){return[...await new c.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new c.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new c.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new c.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}t.Glob=Glob},5197:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hasMagic=void 0;const n=r(1409);const hasMagic=(e,t={})=>{if(!Array.isArray(e)){e=[e]}for(const r of e){if(new n.Minimatch(r,t).hasMagic())return true}return false};t.hasMagic=hasMagic},5637:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Ignore=void 0;const n=r(1409);const s=r(7813);const A=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:r,noext:n,noglobstar:s,platform:a=A}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];this.platform=a;this.mmopts={dot:true,nobrace:t,nocase:r,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:true,nonegate:true};for(const t of e)this.add(t)}add(e){const t=new n.Minimatch(e,this.mmopts);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.glob=t.sync=t.iterate=t.iterateSync=t.stream=t.streamSync=t.Ignore=t.hasMagic=t.Glob=t.unescape=t.escape=void 0;t.globStreamSync=globStreamSync;t.globStream=globStream;t.globSync=globSync;t.globIterateSync=globIterateSync;t.globIterate=globIterate;const n=r(1409);const s=r(2981);const A=r(5197);var a=r(1409);Object.defineProperty(t,"escape",{enumerable:true,get:function(){return a.escape}});Object.defineProperty(t,"unescape",{enumerable:true,get:function(){return a.unescape}});var c=r(2981);Object.defineProperty(t,"Glob",{enumerable:true,get:function(){return c.Glob}});var l=r(5197);Object.defineProperty(t,"hasMagic",{enumerable:true,get:function(){return l.hasMagic}});var u=r(5637);Object.defineProperty(t,"Ignore",{enumerable:true,get:function(){return u.Ignore}});function globStreamSync(e,t={}){return new s.Glob(e,t).streamSync()}function globStream(e,t={}){return new s.Glob(e,t).stream()}function globSync(e,t={}){return new s.Glob(e,t).walkSync()}async function glob_(e,t={}){return new s.Glob(e,t).walk()}function globIterateSync(e,t={}){return new s.Glob(e,t).iterateSync()}function globIterate(e,t={}){return new s.Glob(e,t).iterate()}t.streamSync=globStreamSync;t.stream=Object.assign(globStream,{sync:globStreamSync});t.iterateSync=globIterateSync;t.iterate=Object.assign(globIterate,{sync:globIterateSync});t.sync=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});t.glob=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:t.sync,globStream:globStream,stream:t.stream,globStreamSync:globStreamSync,streamSync:t.streamSync,globIterate:globIterate,iterate:t.iterate,globIterateSync:globIterateSync,iterateSync:t.iterateSync,Glob:s.Glob,hasMagic:A.hasMagic,escape:n.escape,unescape:n.unescape});t.glob.glob=t.glob},7813:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Pattern=void 0;const n=r(1409);const isPatternList=e=>e.length>=1;const isGlobList=e=>e.length>=1;class Pattern{#ee;#te;#re;length;#ne;#ie;#se;#oe;#Ae;#ae;#ce=true;constructor(e,t,r,n){if(!isPatternList(e)){throw new TypeError("empty pattern list")}if(!isGlobList(t)){throw new TypeError("empty glob list")}if(t.length!==e.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=e.length;if(r<0||r>=this.length){throw new TypeError("index out of range")}this.#ee=e;this.#te=t;this.#re=r;this.#ne=n;if(this.#re===0){if(this.isUNC()){const[e,t,r,n,...s]=this.#ee;const[A,a,c,l,...u]=this.#te;if(s[0]===""){s.shift();u.shift()}const h=[e,t,r,n,""].join("/");const g=[A,a,c,l,""].join("/");this.#ee=[h,...s];this.#te=[g,...u];this.length=this.#ee.length}else if(this.isDrive()||this.isAbsolute()){const[e,...t]=this.#ee;const[r,...n]=this.#te;if(t[0]===""){t.shift();n.shift()}const s=e+"/";const A=r+"/";this.#ee=[s,...t];this.#te=[A,...n];this.length=this.#ee.length}}}pattern(){return this.#ee[this.#re]}isString(){return typeof this.#ee[this.#re]==="string"}isGlobstar(){return this.#ee[this.#re]===n.GLOBSTAR}isRegExp(){return this.#ee[this.#re]instanceof RegExp}globString(){return this.#se=this.#se||(this.#re===0?this.isAbsolute()?this.#te[0]+this.#te.slice(1).join("/"):this.#te.join("/"):this.#te.slice(this.#re).join("/"))}hasMore(){return this.length>this.#re+1}rest(){if(this.#ie!==undefined)return this.#ie;if(!this.hasMore())return this.#ie=null;this.#ie=new Pattern(this.#ee,this.#te,this.#re+1,this.#ne);this.#ie.#ae=this.#ae;this.#ie.#Ae=this.#Ae;this.#ie.#oe=this.#oe;return this.#ie}isUNC(){const e=this.#ee;return this.#Ae!==undefined?this.#Ae:this.#Ae=this.#ne==="win32"&&this.#re===0&&e[0]===""&&e[1]===""&&typeof e[2]==="string"&&!!e[2]&&typeof e[3]==="string"&&!!e[3]}isDrive(){const e=this.#ee;return this.#oe!==undefined?this.#oe:this.#oe=this.#ne==="win32"&&this.#re===0&&this.length>1&&typeof e[0]==="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){const e=this.#ee;return this.#ae!==undefined?this.#ae:this.#ae=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){const e=this.#ee[0];return typeof e==="string"&&this.isAbsolute()&&this.#re===0?e:""}checkFollowGlobstar(){return!(this.#re===0||!this.isGlobstar()||!this.#ce)}markFollowGlobstar(){if(this.#re===0||!this.isGlobstar()||!this.#ce)return false;this.#ce=false;return true}}t.Pattern=Pattern},7843:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Processor=t.SubWalks=t.MatchRecord=t.HasWalkedCache=void 0;const n=r(1409);class HasWalkedCache{store;constructor(e=new Map){this.store=e}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const r=e.fullpath();const n=this.store.get(r);if(n)n.add(t.globString());else this.store.set(r,new Set([t.globString()]))}}t.HasWalkedCache=HasWalkedCache;class MatchRecord{store=new Map;add(e,t,r){const n=(t?2:0)|(r?1:0);const s=this.store.get(e);this.store.set(e,s===undefined?n:n&s)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(t&2),!!(t&1)]))}}t.MatchRecord=MatchRecord;class SubWalks{store=new Map;add(e,t){if(!e.canReaddir()){return}const r=this.store.get(e);if(r){if(!r.find((e=>e.globString()===t.globString()))){r.push(t)}}else this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t){throw new Error("attempting to walk unknown path")}return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}t.SubWalks=SubWalks;class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(e,t){this.opts=e;this.follow=!!e.follow;this.dot=!!e.dot;this.hasWalkedCache=t?t.copy():new HasWalkedCache}processPatterns(e,t){this.patterns=t;const r=t.map((t=>[e,t]));for(let[e,t]of r){this.hasWalkedCache.storeWalked(e,t);const r=t.root();const s=t.isAbsolute()&&this.opts.absolute!==false;if(r){e=e.resolve(r==="/"&&this.opts.root!==undefined?this.opts.root:r);const n=t.rest();if(!n){this.matches.add(e,true,false);continue}else{t=n}}if(e.isENOENT())continue;let A;let a;let c=false;while(typeof(A=t.pattern())==="string"&&(a=t.rest())){const r=e.resolve(A);e=r;t=a;c=true}A=t.pattern();a=t.rest();if(c){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if(typeof A==="string"){const t=A===".."||A===""||A===".";this.matches.add(e.resolve(A),s,t);continue}else if(A===n.GLOBSTAR){if(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar()){this.subwalks.add(e,t)}const r=a?.pattern();const n=a?.rest();if(!a||(r===""||r===".")&&!n){this.matches.add(e,s,r===""||r===".")}else{if(r===".."){const t=e.parent||e;if(!n)this.matches.add(t,s,true);else if(!this.hasWalkedCache.hasWalked(t,n)){this.subwalks.add(t,n)}}}}else if(A instanceof RegExp){this.subwalks.add(e,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(e,t){const r=this.subwalks.get(e);const s=this.child();for(const e of t){for(const t of r){const r=t.isAbsolute();const A=t.pattern();const a=t.rest();if(A===n.GLOBSTAR){s.testGlobstar(e,t,a,r)}else if(A instanceof RegExp){s.testRegExp(e,A,a,r)}else{s.testString(e,A,a,r)}}}return s}testGlobstar(e,t,r,n){if(this.dot||!e.name.startsWith(".")){if(!t.hasMore()){this.matches.add(e,n,false)}if(e.canReaddir()){if(this.follow||!e.isSymbolicLink()){this.subwalks.add(e,t)}else if(e.isSymbolicLink()){if(r&&t.checkFollowGlobstar()){this.subwalks.add(e,r)}else if(t.markFollowGlobstar()){this.subwalks.add(e,t)}}}}if(r){const t=r.pattern();if(typeof t==="string"&&t!==".."&&t!==""&&t!=="."){this.testString(e,t,r.rest(),n)}else if(t===".."){const t=e.parent||e;this.subwalks.add(t,r)}else if(t instanceof RegExp){this.testRegExp(e,t,r.rest(),n)}}}testRegExp(e,t,r,n){if(!t.test(e.name))return;if(!r){this.matches.add(e,n,false)}else{this.subwalks.add(e,r)}}testString(e,t,r,n){if(!e.isNamed(t))return;if(!r){this.matches.add(e,n,false)}else{this.subwalks.add(e,r)}}}t.Processor=Processor},1157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GlobStream=t.GlobWalker=t.GlobUtil=void 0;const n=r(8275);const s=r(5637);const A=r(7843);const makeIgnore=(e,t)=>typeof e==="string"?new s.Ignore([e],t):Array.isArray(e)?new s.Ignore(e,t):e;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#le=[];#ue;#he;signal;maxDepth;includeChildMatches;constructor(e,t,r){this.patterns=e;this.path=t;this.opts=r;this.#he=!r.posix&&r.platform==="win32"?"\\":"/";this.includeChildMatches=r.includeChildMatches!==false;if(r.ignore||!this.includeChildMatches){this.#ue=makeIgnore(r.ignore??[],r);if(!this.includeChildMatches&&typeof this.#ue.add!=="function"){const e="cannot ignore child matches, ignore lacks add() method.";throw new Error(e)}}this.maxDepth=r.maxDepth||Infinity;if(r.signal){this.signal=r.signal;this.signal.addEventListener("abort",(()=>{this.#le.length=0}))}}#fe(e){return this.seen.has(e)||!!this.#ue?.ignored?.(e)}#de(e){return!!this.#ue?.childrenIgnored?.(e)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let e=undefined;while(!this.paused&&(e=this.#le.shift())){e()}}onResume(e){if(this.signal?.aborted)return;if(!this.paused){e()}else{this.#le.push(e)}}async matchCheck(e,t){if(t&&this.opts.nodir)return undefined;let r;if(this.opts.realpath){r=e.realpathCached()||await e.realpath();if(!r)return undefined;e=r}const n=e.isUnknown()||this.opts.stat;const s=n?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){const e=await s.realpath();if(e&&(e.isUnknown()||this.opts.stat)){await e.lstat()}}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===Infinity||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#fe(e)?e:undefined}matchCheckSync(e,t){if(t&&this.opts.nodir)return undefined;let r;if(this.opts.realpath){r=e.realpathCached()||e.realpathSync();if(!r)return undefined;e=r}const n=e.isUnknown()||this.opts.stat;const s=n?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){const e=s.realpathSync();if(e&&(e?.isUnknown()||this.opts.stat)){e.lstatSync()}}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#fe(e))return;if(!this.includeChildMatches&&this.#ue?.add){const t=`${e.relativePosix()}/**`;this.#ue.add(t)}const r=this.opts.absolute===undefined?t:this.opts.absolute;this.seen.add(e);const n=this.opts.mark&&e.isDirectory()?this.#he:"";if(this.opts.withFileTypes){this.matchEmit(e)}else if(r){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+n)}else{const t=this.opts.posix?e.relativePosix():e.relative();const r=this.opts.dotRelative&&!t.startsWith(".."+this.#he)?"."+this.#he:"";this.matchEmit(!t?"."+n:r+t+n)}}async match(e,t,r){const n=await this.matchCheck(e,r);if(n)this.matchFinish(n,t)}matchSync(e,t,r){const n=this.matchCheckSync(e,r);if(n)this.matchFinish(n,t)}walkCB(e,t,r){if(this.signal?.aborted)r();this.walkCB2(e,t,new A.Processor(this.opts),r)}walkCB2(e,t,r,n){if(this.#de(e))return n();if(this.signal?.aborted)n();if(this.paused){this.onResume((()=>this.walkCB2(e,t,r,n)));return}r.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;s++;this.match(e,t,n).then((()=>next()))}for(const e of r.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirCached();if(e.calledReaddir())this.walkCB3(e,t,r,next);else{e.readdirCB(((t,n)=>this.walkCB3(e,n,r,next)),true)}}next()}walkCB3(e,t,r,n){r=r.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;s++;this.match(e,t,n).then((()=>next()))}for(const[e,t]of r.subwalks.entries()){s++;this.walkCB2(e,t,r.child(),next)}next()}walkCBSync(e,t,r){if(this.signal?.aborted)r();this.walkCB2Sync(e,t,new A.Processor(this.opts),r)}walkCB2Sync(e,t,r,n){if(this.#de(e))return n();if(this.signal?.aborted)n();if(this.paused){this.onResume((()=>this.walkCB2Sync(e,t,r,n)));return}r.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;this.matchSync(e,t,n)}for(const e of r.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirSync();this.walkCB3Sync(e,t,r,next)}next()}walkCB3Sync(e,t,r,n){r=r.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;this.matchSync(e,t,n)}for(const[e,t]of r.subwalks.entries()){s++;this.walkCB2Sync(e,t,r.child(),next)}next()}}t.GlobUtil=GlobUtil;class GlobWalker extends GlobUtil{matches=new Set;constructor(e,t,r){super(e,t,r)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){t(this.signal.reason)}else{e(this.matches)}}))}));return this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason}));return this.matches}}t.GlobWalker=GlobWalker;class GlobStream extends GlobUtil{results;constructor(e,t,r){super(e,t,r);this.results=new n.Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e);if(!this.results.flowing)this.pause()}stream(){const e=this.path;if(e.isUnknown()){e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(e,this.patterns,(()=>this.results.end()))}return this.results}streamSync(){if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>this.results.end()));return this.results}}t.GlobStream=GlobStream},8895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertValidPattern=void 0;const r=1024*64;const assertValidPattern=e=>{if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>r){throw new TypeError("pattern is too long")}};t.assertValidPattern=assertValidPattern},3238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.AST=void 0;const n=r(5192);const s=r(9829);const A=new Set(["!","?","+","*","@"]);const isExtglobType=e=>A.has(e);const a="(?!(?:^|/)\\.\\.?(?:$|/))";const c="(?!\\.)";const l=new Set(["[","."]);const u=new Set(["..","."]);const h=new Set("().*{}+?[]^$\\!");const regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const g="[^/]";const p=g+"*?";const C=g+"+?";class AST{type;#ge;#pe;#Ee=false;#Ce=[];#ye;#Ie;#Be;#Qe=false;#me;#be;#we=false;constructor(e,t,r={}){this.type=e;if(e)this.#pe=true;this.#ye=t;this.#ge=this.#ye?this.#ye.#ge:this;this.#me=this.#ge===this?r:this.#ge.#me;this.#Be=this.#ge===this?[]:this.#ge.#Be;if(e==="!"&&!this.#ge.#Qe)this.#Be.push(this);this.#Ie=this.#ye?this.#ye.#Ce.length:0}get hasMagic(){if(this.#pe!==undefined)return this.#pe;for(const e of this.#Ce){if(typeof e==="string")continue;if(e.type||e.hasMagic)return this.#pe=true}return this.#pe}toString(){if(this.#be!==undefined)return this.#be;if(!this.type){return this.#be=this.#Ce.map((e=>String(e))).join("")}else{return this.#be=this.type+"("+this.#Ce.map((e=>String(e))).join("|")+")"}}#Se(){if(this!==this.#ge)throw new Error("should only call on root");if(this.#Qe)return this;this.toString();this.#Qe=true;let e;while(e=this.#Be.pop()){if(e.type!=="!")continue;let t=e;let r=t.#ye;while(r){for(let n=t.#Ie+1;!r.type&&ntypeof e==="string"?e:e.toJSON())):[this.type,...this.#Ce.map((e=>e.toJSON()))];if(this.isStart()&&!this.type)e.unshift([]);if(this.isEnd()&&(this===this.#ge||this.#ge.#Qe&&this.#ye?.type==="!")){e.push({})}return e}isStart(){if(this.#ge===this)return true;if(!this.#ye?.isStart())return false;if(this.#Ie===0)return true;const e=this.#ye;for(let t=0;t{const[n,s,A,a]=typeof t==="string"?AST.#ve(t,this.#pe,r):t.toRegExpSource(e);this.#pe=this.#pe||A;this.#Ee=this.#Ee||a;return n})).join("");let A="";if(this.isStart()){if(typeof this.#Ce[0]==="string"){const r=this.#Ce.length===1&&u.has(this.#Ce[0]);if(!r){const r=l;const s=t&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4));const u=!t&&!e&&r.has(n.charAt(0));A=s?a:u?c:""}}}let h="";if(this.isEnd()&&this.#ge.#Qe&&this.#ye?.type==="!"){h="(?:$|\\/)"}const g=A+n+h;return[g,(0,s.unescape)(n),this.#pe=!!this.#pe,this.#Ee]}const r=this.type==="*"||this.type==="+";const n=this.type==="!"?"(?:(?!(?:":"(?:";let A=this.#Re(t);if(this.isStart()&&this.isEnd()&&!A&&this.type!=="!"){const e=this.toString();this.#Ce=[e];this.type=null;this.#pe=undefined;return[e,(0,s.unescape)(this.toString()),false,false]}let h=!r||e||t||!c?"":this.#Re(true);if(h===A){h=""}if(h){A=`(?:${A})(?:${h})*?`}let g="";if(this.type==="!"&&this.#we){g=(this.isStart()&&!t?c:"")+C}else{const r=this.type==="!"?"))"+(this.isStart()&&!t&&!e?c:"")+p+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&h?")":this.type==="*"&&h?`)?`:`)${this.type}`;g=n+A+r}return[g,(0,s.unescape)(A),this.#pe=!!this.#pe,this.#Ee]}#Re(e){return this.#Ce.map((t=>{if(typeof t==="string"){throw new Error("string type in extglob ast??")}const[r,n,s,A]=t.toRegExpSource(e);this.#Ee=this.#Ee||A;return r})).filter((e=>!(this.isStart()&&this.isEnd())||!!e)).join("|")}static#ve(e,t,r=false){let A=false;let a="";let c=false;for(let s=0;s{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseClass=void 0;const r={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x"+"00-\\x"+"7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]};const braceEscape=e=>e.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=e=>e.join("");const parseClass=(e,t)=>{const n=t;if(e.charAt(n)!=="["){throw new Error("not in a brace expression")}const s=[];const A=[];let a=n+1;let c=false;let l=false;let u=false;let h=false;let g=n;let p="";e:while(ap){s.push(braceEscape(p)+"-"+braceEscape(t))}else if(t===p){s.push(braceEscape(t))}p="";a++;continue}if(e.startsWith("-]",a+1)){s.push(braceEscape(t+"-"));a+=2;continue}if(e.startsWith("-",a+1)){p=t;a+=2;continue}s.push(braceEscape(t));a++}if(g{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.escape=void 0;const escape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");t.escape=escape},1409:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.unescape=t.escape=t.AST=t.Minimatch=t.match=t.makeRe=t.braceExpand=t.defaults=t.filter=t.GLOBSTAR=t.sep=t.minimatch=void 0;const s=n(r(8497));const A=r(8895);const a=r(3238);const c=r(6726);const l=r(9829);const minimatch=(e,t,r={})=>{(0,A.assertValidPattern)(t);if(!r.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,r).match(e)};t.minimatch=minimatch;const u=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=e=>t=>!t.startsWith(".")&&t.endsWith(e);const starDotExtTestDot=e=>t=>t.endsWith(e);const starDotExtTestNocase=e=>{e=e.toLowerCase();return t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)};const starDotExtTestNocaseDot=e=>{e=e.toLowerCase();return t=>t.toLowerCase().endsWith(e)};const h=/^\*+\.\*+$/;const starDotStarTest=e=>!e.startsWith(".")&&e.includes(".");const starDotStarTestDot=e=>e!=="."&&e!==".."&&e.includes(".");const g=/^\.\*+$/;const dotStarTest=e=>e!=="."&&e!==".."&&e.startsWith(".");const p=/^\*+$/;const starTest=e=>e.length!==0&&!e.startsWith(".");const starTestDot=e=>e.length!==0&&e!=="."&&e!=="..";const C=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([e,t=""])=>{const r=qmarksTestNoExt([e]);if(!t)return r;t=t.toLowerCase();return e=>r(e)&&e.toLowerCase().endsWith(t)};const qmarksTestNocaseDot=([e,t=""])=>{const r=qmarksTestNoExtDot([e]);if(!t)return r;t=t.toLowerCase();return e=>r(e)&&e.toLowerCase().endsWith(t)};const qmarksTestDot=([e,t=""])=>{const r=qmarksTestNoExtDot([e]);return!t?r:e=>r(e)&&e.endsWith(t)};const qmarksTest=([e,t=""])=>{const r=qmarksTestNoExt([e]);return!t?r:e=>r(e)&&e.endsWith(t)};const qmarksTestNoExt=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")};const qmarksTestNoExtDot=([e])=>{const t=e.length;return e=>e.length===t&&e!=="."&&e!==".."};const y=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const I={win32:{sep:"\\"},posix:{sep:"/"}};t.sep=y==="win32"?I.win32.sep:I.posix.sep;t.minimatch.sep=t.sep;t.GLOBSTAR=Symbol("globstar **");t.minimatch.GLOBSTAR=t.GLOBSTAR;const B="[^/]";const Q=B+"*?";const b="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const w="(?:(?!(?:\\/|^)\\.).)*?";const filter=(e,r={})=>n=>(0,t.minimatch)(n,e,r);t.filter=filter;t.minimatch.filter=t.filter;const ext=(e,t={})=>Object.assign({},e,t);const defaults=e=>{if(!e||typeof e!=="object"||!Object.keys(e).length){return t.minimatch}const r=t.minimatch;const m=(t,n,s={})=>r(t,n,ext(e,s));return Object.assign(m,{Minimatch:class Minimatch extends r.Minimatch{constructor(t,r={}){super(t,ext(e,r))}static defaults(t){return r.defaults(ext(e,t)).Minimatch}},AST:class AST extends r.AST{constructor(t,r,n={}){super(t,r,ext(e,n))}static fromGlob(t,n={}){return r.AST.fromGlob(t,ext(e,n))}},unescape:(t,n={})=>r.unescape(t,ext(e,n)),escape:(t,n={})=>r.escape(t,ext(e,n)),filter:(t,n={})=>r.filter(t,ext(e,n)),defaults:t=>r.defaults(ext(e,t)),makeRe:(t,n={})=>r.makeRe(t,ext(e,n)),braceExpand:(t,n={})=>r.braceExpand(t,ext(e,n)),match:(t,n,s={})=>r.match(t,n,ext(e,s)),sep:r.sep,GLOBSTAR:t.GLOBSTAR})};t.defaults=defaults;t.minimatch.defaults=t.defaults;const braceExpand=(e,t={})=>{(0,A.assertValidPattern)(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return(0,s.default)(e)};t.braceExpand=braceExpand;t.minimatch.braceExpand=t.braceExpand;const makeRe=(e,t={})=>new Minimatch(e,t).makeRe();t.makeRe=makeRe;t.minimatch.makeRe=t.makeRe;const match=(e,t,r={})=>{const n=new Minimatch(t,r);e=e.filter((e=>n.match(e)));if(n.options.nonull&&!e.length){e.push(t)}return e};t.match=match;t.minimatch.match=t.match;const S=/[?*]|[+@!]\(.*?\)|\[|\]/;const regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,A.assertValidPattern)(e);t=t||{};this.options=t;this.pattern=e;this.platform=t.platform||y;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!t.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!t.nonegate;this.comment=false;this.empty=false;this.partial=!!t.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=t.windowsNoMagicRoot!==undefined?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase);this.globSet=[];this.globParts=[];this.set=[];this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1){return true}for(const e of this.set){for(const t of e){if(typeof t!=="string")return true}}return false}debug(...e){}make(){const e=this.pattern;const t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(t.debug){this.debug=(...e)=>console.error(...e)}this.debug(this.pattern,this.globSet);const r=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(r);this.debug(this.pattern,this.globParts);let n=this.globParts.map(((e,t,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=e[0]===""&&e[1]===""&&(e[2]==="?"||!S.test(e[2]))&&!S.test(e[3]);const r=/^[a-z]:/i.test(e[0]);if(t){return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))]}else if(r){return[e[0],...e.slice(1).map((e=>this.parse(e)))]}}return e.map((e=>this.parse(e)))}));this.debug(this.pattern,n);this.set=n.filter((e=>e.indexOf(false)===-1));if(this.isWindows){for(let e=0;e=2){e=this.firstPhasePreProcess(e);e=this.secondPhasePreProcess(e)}else if(t>=1){e=this.levelOneOptimize(e)}else{e=this.adjascentGlobstarOptimize(e)}return e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;while(-1!==(t=e.indexOf("**",t+1))){let r=t;while(e[r+1]==="**"){r++}if(r!==t){e.splice(t,r-t)}}return e}))}levelOneOptimize(e){return e.map((e=>{e=e.reduce(((e,t)=>{const r=e[e.length-1];if(t==="**"&&r==="**"){return e}if(t===".."){if(r&&r!==".."&&r!=="."&&r!=="**"){e.pop();return e}}e.push(t);return e}),[]);return e.length===0?[""]:e}))}levelTwoFileOptimize(e){if(!Array.isArray(e)){e=this.slashSplit(e)}let t=false;do{t=false;if(!this.preserveMultipleSlashes){for(let r=1;rn){r.splice(n+1,s-n)}let A=r[n+1];const a=r[n+2];const c=r[n+3];if(A!=="..")continue;if(!a||a==="."||a===".."||!c||c==="."||c===".."){continue}t=true;r.splice(n,1);const l=r.slice(0);l[n]="**";e.push(l);n--}if(!this.preserveMultipleSlashes){for(let e=1;ee.length))}partsMatch(e,t,r=false){let n=0;let s=0;let A=[];let a="";while(na){r=r.slice(c)}else if(a>c){e=e.slice(a)}}}}const{optimizationLevel:A=1}=this.options;if(A>=2){e=this.levelTwoFileOptimize(e)}this.debug("matchOne",this,{file:e,pattern:r});this.debug("matchOne",e.length,r.length);for(var a=0,c=0,l=e.length,u=r.length;a>> no match, partial?",e,p,r,C);if(p===l){return true}}return false}let A;if(typeof h==="string"){A=g===h;this.debug("string match",h,g,A)}else{A=h.test(g);this.debug("pattern match",h,g,A)}if(!A)return false}if(a===l&&c===u){return true}else if(a===l){return n}else if(c===u){return a===l-1&&e[a]===""}else{throw new Error("wtf?")}}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(e){(0,A.assertValidPattern)(e);const r=this.options;if(e==="**")return t.GLOBSTAR;if(e==="")return"";let n;let s=null;if(n=e.match(p)){s=r.dot?starTestDot:starTest}else if(n=e.match(u)){s=(r.nocase?r.dot?starDotExtTestNocaseDot:starDotExtTestNocase:r.dot?starDotExtTestDot:starDotExtTest)(n[1])}else if(n=e.match(C)){s=(r.nocase?r.dot?qmarksTestNocaseDot:qmarksTestNocase:r.dot?qmarksTestDot:qmarksTest)(n)}else if(n=e.match(h)){s=r.dot?starDotStarTestDot:starDotStarTest}else if(n=e.match(g)){s=dotStarTest}const c=a.AST.fromGlob(e,this.options).toMMPattern();if(s&&typeof c==="object"){Reflect.defineProperty(c,"test",{value:s})}return c}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const e=this.set;if(!e.length){this.regexp=false;return this.regexp}const r=this.options;const n=r.noglobstar?Q:r.dot?b:w;const s=new Set(r.nocase?["i"]:[]);let A=e.map((e=>{const r=e.map((e=>{if(e instanceof RegExp){for(const t of e.flags.split(""))s.add(t)}return typeof e==="string"?regExpEscape(e):e===t.GLOBSTAR?t.GLOBSTAR:e._src}));r.forEach(((e,s)=>{const A=r[s+1];const a=r[s-1];if(e!==t.GLOBSTAR||a===t.GLOBSTAR){return}if(a===undefined){if(A!==undefined&&A!==t.GLOBSTAR){r[s+1]="(?:\\/|"+n+"\\/)?"+A}else{r[s]=n}}else if(A===undefined){r[s-1]=a+"(?:\\/|"+n+")?"}else if(A!==t.GLOBSTAR){r[s-1]=a+"(?:\\/|\\/"+n+"\\/)"+A;r[s+1]=t.GLOBSTAR}}));return r.filter((e=>e!==t.GLOBSTAR)).join("/")})).join("|");const[a,c]=e.length>1?["(?:",")"]:["",""];A="^"+a+A+c+"$";if(this.negate)A="^(?!"+A+").+$";try{this.regexp=new RegExp(A,[...s].join(""))}catch(e){this.regexp=false}return this.regexp}slashSplit(e){if(this.preserveMultipleSlashes){return e.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(e)){return["",...e.split(/\/+/)]}else{return e.split(/\/+/)}}match(e,t=this.partial){this.debug("match",e,this.pattern);if(this.comment){return false}if(this.empty){return e===""}if(e==="/"&&t){return true}const r=this.options;if(this.isWindows){e=e.split("\\").join("/")}const n=this.slashSplit(e);this.debug(this.pattern,"split",n);const s=this.set;this.debug(this.pattern,"set",s);let A=n[n.length-1];if(!A){for(let e=n.length-2;!A&&e>=0;e--){A=n[e]}}for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unescape=void 0;const unescape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");t.unescape=unescape},2477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.LRUCache=void 0;const r=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const n=new Set;const s=typeof process==="object"&&!!process?process:{};const emitWarning=(e,t,r,n)=>{typeof s.emitWarning==="function"?s.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let A=globalThis.AbortController;let a=globalThis.AbortSignal;if(typeof A==="undefined"){a=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(e,t){this._onabort.push(t)}};A=class AbortController{constructor(){warnACPolyfill()}signal=new a;abort(e){if(this.signal.aborted)return;this.signal.reason=e;this.signal.aborted=true;for(const t of this.signal._onabort){t(e)}this.signal.onabort?.(e)}};let e=s.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!e)return;e=false;emitWarning("AbortController is not defined. If using lru-cache in "+"node 14, load an AbortController polyfill from the "+"`node-abort-controller` package. A minimal polyfill is "+"provided for use by LRUCache.fetch(), but it should not be "+"relied upon in other contexts (eg, passing it to other APIs that "+"use AbortController/AbortSignal might have undesirable effects). "+"You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",warnACPolyfill)}}const shouldWarn=e=>!n.has(e);const c=Symbol("type");const isPosInt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e);const getUintArray=e=>!isPosInt(e)?null:e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(e){super(e);this.fill(0)}}class Stack{heap;length;static#De=false;static create(e){const t=getUintArray(e);if(!t)return[];Stack.#De=true;const r=new Stack(e,t);Stack.#De=false;return r}constructor(e,t){if(!Stack.#De){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new t(e);this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class LRUCache{#_e;#Ne;#Te;#Fe;#Le;#Me;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#xe;#Oe;#Ue;#Pe;#Ge;#He;#Ye;#Je;#je;#Ve;#We;#qe;#ze;#Ke;#$e;#Ze;#Xe;static unsafeExposeInternals(e){return{starts:e.#ze,ttls:e.#Ke,sizes:e.#qe,keyMap:e.#Ue,keyList:e.#Pe,valList:e.#Ge,next:e.#He,prev:e.#Ye,get head(){return e.#Je},get tail(){return e.#je},free:e.#Ve,isBackgroundFetch:t=>e.#et(t),backgroundFetch:(t,r,n,s)=>e.#tt(t,r,n,s),moveToTail:t=>e.#rt(t),indexes:t=>e.#nt(t),rindexes:t=>e.#it(t),isStale:t=>e.#st(t)}}get max(){return this.#_e}get maxSize(){return this.#Ne}get calculatedSize(){return this.#Oe}get size(){return this.#xe}get fetchMethod(){return this.#Le}get memoMethod(){return this.#Me}get dispose(){return this.#Te}get disposeAfter(){return this.#Fe}constructor(e){const{max:t=0,ttl:r,ttlResolution:s=1,ttlAutopurge:A,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:l,dispose:u,disposeAfter:h,noDisposeOnSet:g,noUpdateTTL:p,maxSize:C=0,maxEntrySize:y=0,sizeCalculation:I,fetchMethod:B,memoMethod:Q,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:k,ignoreFetchAbort:v}=e;if(t!==0&&!isPosInt(t)){throw new TypeError("max option must be a nonnegative integer")}const R=t?getUintArray(t):Array;if(!R){throw new Error("invalid max value: "+t)}this.#_e=t;this.#Ne=C;this.maxEntrySize=y||this.#Ne;this.sizeCalculation=I;if(this.sizeCalculation){if(!this.#Ne&&!this.maxEntrySize){throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}if(Q!==undefined&&typeof Q!=="function"){throw new TypeError("memoMethod must be a function if defined")}this.#Me=Q;if(B!==undefined&&typeof B!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#Le=B;this.#Ze=!!B;this.#Ue=new Map;this.#Pe=new Array(t).fill(undefined);this.#Ge=new Array(t).fill(undefined);this.#He=new R(t);this.#Ye=new R(t);this.#Je=0;this.#je=0;this.#Ve=Stack.create(t);this.#xe=0;this.#Oe=0;if(typeof u==="function"){this.#Te=u}if(typeof h==="function"){this.#Fe=h;this.#We=[]}else{this.#Fe=undefined;this.#We=undefined}this.#$e=!!this.#Te;this.#Xe=!!this.#Fe;this.noDisposeOnSet=!!g;this.noUpdateTTL=!!p;this.noDeleteOnFetchRejection=!!b;this.allowStaleOnFetchRejection=!!S;this.allowStaleOnFetchAbort=!!k;this.ignoreFetchAbort=!!v;if(this.maxEntrySize!==0){if(this.#Ne!==0){if(!isPosInt(this.#Ne)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#ot()}this.allowStale=!!l;this.noDeleteOnStaleGet=!!w;this.updateAgeOnGet=!!a;this.updateAgeOnHas=!!c;this.ttlResolution=isPosInt(s)||s===0?s:1;this.ttlAutopurge=!!A;this.ttl=r||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#At()}if(this.#_e===0&&this.ttl===0&&this.#Ne===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#_e&&!this.#Ne){const e="LRU_CACHE_UNBOUNDED";if(shouldWarn(e)){n.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(t,"UnboundedCacheWarning",e,LRUCache)}}}getRemainingTTL(e){return this.#Ue.has(e)?Infinity:0}#At(){const e=new ZeroArray(this.#_e);const t=new ZeroArray(this.#_e);this.#Ke=e;this.#ze=t;this.#at=(n,s,A=r.now())=>{t[n]=s!==0?A:0;e[n]=s;if(s!==0&&this.ttlAutopurge){const e=setTimeout((()=>{if(this.#st(n)){this.#ct(this.#Pe[n],"expire")}}),s+1);if(e.unref){e.unref()}}};this.#lt=n=>{t[n]=e[n]!==0?r.now():0};this.#ut=(r,s)=>{if(e[s]){const A=e[s];const a=t[s];if(!A||!a)return;r.ttl=A;r.start=a;r.now=n||getNow();const c=r.now-a;r.remainingTTL=A-c}};let n=0;const getNow=()=>{const e=r.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);if(t.unref){t.unref()}}return e};this.getRemainingTTL=r=>{const s=this.#Ue.get(r);if(s===undefined){return 0}const A=e[s];const a=t[s];if(!A||!a){return Infinity}const c=(n||getNow())-a;return A-c};this.#st=r=>{const s=t[r];const A=e[r];return!!A&&!!s&&(n||getNow())-s>A}}#lt=()=>{};#ut=()=>{};#at=()=>{};#st=()=>false;#ot(){const e=new ZeroArray(this.#_e);this.#Oe=0;this.#qe=e;this.#ht=t=>{this.#Oe-=e[t];e[t]=0};this.#ft=(e,t,r,n)=>{if(this.#et(t)){return 0}if(!isPosInt(r)){if(n){if(typeof n!=="function"){throw new TypeError("sizeCalculation must be a function")}r=n(t,e);if(!isPosInt(r)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return r};this.#dt=(t,r,n)=>{e[t]=r;if(this.#Ne){const r=this.#Ne-e[t];while(this.#Oe>r){this.#D(true)}}this.#Oe+=e[t];if(n){n.entrySize=r;n.totalCalculatedSize=this.#Oe}}}#ht=e=>{};#dt=(e,t,r)=>{};#ft=(e,t,r,n)=>{if(r||n){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#nt({allowStale:e=this.allowStale}={}){if(this.#xe){for(let t=this.#je;true;){if(!this.#gt(t)){break}if(e||!this.#st(t)){yield t}if(t===this.#Je){break}else{t=this.#Ye[t]}}}}*#it({allowStale:e=this.allowStale}={}){if(this.#xe){for(let t=this.#Je;true;){if(!this.#gt(t)){break}if(e||!this.#st(t)){yield t}if(t===this.#je){break}else{t=this.#He[t]}}}}#gt(e){return e!==undefined&&this.#Ue.get(this.#Pe[e])===e}*entries(){for(const e of this.#nt()){if(this.#Ge[e]!==undefined&&this.#Pe[e]!==undefined&&!this.#et(this.#Ge[e])){yield[this.#Pe[e],this.#Ge[e]]}}}*rentries(){for(const e of this.#it()){if(this.#Ge[e]!==undefined&&this.#Pe[e]!==undefined&&!this.#et(this.#Ge[e])){yield[this.#Pe[e],this.#Ge[e]]}}}*keys(){for(const e of this.#nt()){const t=this.#Pe[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield t}}}*rkeys(){for(const e of this.#it()){const t=this.#Pe[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield t}}}*values(){for(const e of this.#nt()){const t=this.#Ge[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield this.#Ge[e]}}}*rvalues(){for(const e of this.#it()){const t=this.#Ge[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield this.#Ge[e]}}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#nt()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;if(e(s,this.#Pe[r],this)){return this.get(this.#Pe[r],t)}}}forEach(e,t=this){for(const r of this.#nt()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;e.call(t,s,this.#Pe[r],this)}}rforEach(e,t=this){for(const r of this.#it()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;e.call(t,s,this.#Pe[r],this)}}purgeStale(){let e=false;for(const t of this.#it({allowStale:true})){if(this.#st(t)){this.#ct(this.#Pe[t],"expire");e=true}}return e}info(e){const t=this.#Ue.get(e);if(t===undefined)return undefined;const n=this.#Ge[t];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)return undefined;const A={value:s};if(this.#Ke&&this.#ze){const e=this.#Ke[t];const n=this.#ze[t];if(e&&n){const t=e-(r.now()-n);A.ttl=t;A.start=Date.now()}}if(this.#qe){A.size=this.#qe[t]}return A}dump(){const e=[];for(const t of this.#nt({allowStale:true})){const n=this.#Pe[t];const s=this.#Ge[t];const A=this.#et(s)?s.__staleWhileFetching:s;if(A===undefined||n===undefined)continue;const a={value:A};if(this.#Ke&&this.#ze){a.ttl=this.#Ke[t];const e=r.now()-this.#ze[t];a.start=Math.floor(Date.now()-e)}if(this.#qe){a.size=this.#qe[t]}e.unshift([n,a])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t,r={}){if(t===undefined){this.delete(e);return this}const{ttl:n=this.ttl,start:s,noDisposeOnSet:A=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=r;let{noUpdateTTL:l=this.noUpdateTTL}=r;const u=this.#ft(e,t,r.size||0,a);if(this.maxEntrySize&&u>this.maxEntrySize){if(c){c.set="miss";c.maxEntrySizeExceeded=true}this.#ct(e,"set");return this}let h=this.#xe===0?undefined:this.#Ue.get(e);if(h===undefined){h=this.#xe===0?this.#je:this.#Ve.length!==0?this.#Ve.pop():this.#xe===this.#_e?this.#D(false):this.#xe;this.#Pe[h]=e;this.#Ge[h]=t;this.#Ue.set(e,h);this.#He[this.#je]=h;this.#Ye[h]=this.#je;this.#je=h;this.#xe++;this.#dt(h,u,c);if(c)c.set="add";l=false}else{this.#rt(h);const r=this.#Ge[h];if(t!==r){if(this.#Ze&&this.#et(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;if(t!==undefined&&!A){if(this.#$e){this.#Te?.(t,e,"set")}if(this.#Xe){this.#We?.push([t,e,"set"])}}}else if(!A){if(this.#$e){this.#Te?.(r,e,"set")}if(this.#Xe){this.#We?.push([r,e,"set"])}}this.#ht(h);this.#dt(h,u,c);this.#Ge[h]=t;if(c){c.set="replace";const e=r&&this.#et(r)?r.__staleWhileFetching:r;if(e!==undefined)c.oldValue=e}}else if(c){c.set="update"}}if(n!==0&&!this.#Ke){this.#At()}if(this.#Ke){if(!l){this.#at(h,n,s)}if(c)this.#ut(c,h)}if(!A&&this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}return this}pop(){try{while(this.#xe){const e=this.#Ge[this.#Je];this.#D(true);if(this.#et(e)){if(e.__staleWhileFetching){return e.__staleWhileFetching}}else if(e!==undefined){return e}}}finally{if(this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}}}#D(e){const t=this.#Je;const r=this.#Pe[t];const n=this.#Ge[t];if(this.#Ze&&this.#et(n)){n.__abortController.abort(new Error("evicted"))}else if(this.#$e||this.#Xe){if(this.#$e){this.#Te?.(n,r,"evict")}if(this.#Xe){this.#We?.push([n,r,"evict"])}}this.#ht(t);if(e){this.#Pe[t]=undefined;this.#Ge[t]=undefined;this.#Ve.push(t)}if(this.#xe===1){this.#Je=this.#je=0;this.#Ve.length=0}else{this.#Je=this.#He[t]}this.#Ue.delete(r);this.#xe--;return t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t;const s=this.#Ue.get(e);if(s!==undefined){const e=this.#Ge[s];if(this.#et(e)&&e.__staleWhileFetching===undefined){return false}if(!this.#st(s)){if(r){this.#lt(s)}if(n){n.has="hit";this.#ut(n,s)}return true}else if(n){n.has="stale";this.#ut(n,s)}}else if(n){n.has="miss"}return false}peek(e,t={}){const{allowStale:r=this.allowStale}=t;const n=this.#Ue.get(e);if(n===undefined||!r&&this.#st(n)){return}const s=this.#Ge[n];return this.#et(s)?s.__staleWhileFetching:s}#tt(e,t,r,n){const s=t===undefined?undefined:this.#Ge[t];if(this.#et(s)){return s}const a=new A;const{signal:c}=r;c?.addEventListener("abort",(()=>a.abort(c.reason)),{signal:a.signal});const l={signal:a.signal,options:r,context:n};const cb=(n,s=false)=>{const{aborted:A}=a.signal;const c=r.ignoreFetchAbort&&n!==undefined;if(r.status){if(A&&!s){r.status.fetchAborted=true;r.status.fetchError=a.signal.reason;if(c)r.status.fetchAbortIgnored=true}else{r.status.fetchResolved=true}}if(A&&!c&&!s){return fetchFail(a.signal.reason)}const h=u;if(this.#Ge[t]===u){if(n===undefined){if(h.__staleWhileFetching){this.#Ge[t]=h.__staleWhileFetching}else{this.#ct(e,"fetch")}}else{if(r.status)r.status.fetchUpdated=true;this.set(e,n,l.options)}}return n};const eb=e=>{if(r.status){r.status.fetchRejected=true;r.status.fetchError=e}return fetchFail(e)};const fetchFail=n=>{const{aborted:s}=a.signal;const A=s&&r.allowStaleOnFetchAbort;const c=A||r.allowStaleOnFetchRejection;const l=c||r.noDeleteOnFetchRejection;const h=u;if(this.#Ge[t]===u){const r=!l||h.__staleWhileFetching===undefined;if(r){this.#ct(e,"fetch")}else if(!A){this.#Ge[t]=h.__staleWhileFetching}}if(c){if(r.status&&h.__staleWhileFetching!==undefined){r.status.returnedStale=true}return h.__staleWhileFetching}else if(h.__returned===h){throw n}};const pcall=(t,n)=>{const A=this.#Le?.(e,s,l);if(A&&A instanceof Promise){A.then((e=>t(e===undefined?undefined:e)),n)}a.signal.addEventListener("abort",(()=>{if(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort){t(undefined);if(r.allowStaleOnFetchAbort){t=e=>cb(e,true)}}}))};if(r.status)r.status.fetchDispatched=true;const u=new Promise(pcall).then(cb,eb);const h=Object.assign(u,{__abortController:a,__staleWhileFetching:s,__returned:undefined});if(t===undefined){this.set(e,h,{...l.options,status:undefined});t=this.#Ue.get(e)}else{this.#Ge[t]=h}return h}#et(e){if(!this.#Ze)return false;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof A}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:A=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:y,forceRefresh:I=false,status:B,signal:Q}=t;if(!this.#Ze){if(B)B.fetch="get";return this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:B})}const b={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:A,noDisposeOnSet:a,size:c,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:C,ignoreFetchAbort:p,status:B,signal:Q};let w=this.#Ue.get(e);if(w===undefined){if(B)B.fetch="miss";const t=this.#tt(e,w,b,y);return t.__returned=t}else{const t=this.#Ge[w];if(this.#et(t)){const e=r&&t.__staleWhileFetching!==undefined;if(B){B.fetch="inflight";if(e)B.returnedStale=true}return e?t.__staleWhileFetching:t.__returned=t}const s=this.#st(w);if(!I&&!s){if(B)B.fetch="hit";this.#rt(w);if(n){this.#lt(w)}if(B)this.#ut(B,w);return t}const A=this.#tt(e,w,b,y);const a=A.__staleWhileFetching!==undefined;const c=a&&r;if(B){B.fetch=s?"stale":"refresh";if(c&&s)B.returnedStale=true}return c?A.__staleWhileFetching:A.__returned=A}}async forceFetch(e,t={}){const r=await this.fetch(e,t);if(r===undefined)throw new Error("fetch() returned undefined");return r}memo(e,t={}){const r=this.#Me;if(!r){throw new Error("no memoMethod provided to constructor")}const{context:n,forceRefresh:s,...A}=t;const a=this.get(e,A);if(!s&&a!==undefined)return a;const c=r(e,a,{options:A,context:n});this.set(e,c,A);return c}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:A}=t;const a=this.#Ue.get(e);if(a!==undefined){const t=this.#Ge[a];const c=this.#et(t);if(A)this.#ut(A,a);if(this.#st(a)){if(A)A.get="stale";if(!c){if(!s){this.#ct(e,"expire")}if(A&&r)A.returnedStale=true;return r?t:undefined}else{if(A&&r&&t.__staleWhileFetching!==undefined){A.returnedStale=true}return r?t.__staleWhileFetching:undefined}}else{if(A)A.get="hit";if(c){return t.__staleWhileFetching}this.#rt(a);if(n){this.#lt(a)}return t}}else if(A){A.get="miss"}}#pt(e,t){this.#Ye[t]=e;this.#He[e]=t}#rt(e){if(e!==this.#je){if(e===this.#Je){this.#Je=this.#He[e]}else{this.#pt(this.#Ye[e],this.#He[e])}this.#pt(this.#je,e);this.#je=e}}delete(e){return this.#ct(e,"delete")}#ct(e,t){let r=false;if(this.#xe!==0){const n=this.#Ue.get(e);if(n!==undefined){r=true;if(this.#xe===1){this.#Et(t)}else{this.#ht(n);const r=this.#Ge[n];if(this.#et(r)){r.__abortController.abort(new Error("deleted"))}else if(this.#$e||this.#Xe){if(this.#$e){this.#Te?.(r,e,t)}if(this.#Xe){this.#We?.push([r,e,t])}}this.#Ue.delete(e);this.#Pe[n]=undefined;this.#Ge[n]=undefined;if(n===this.#je){this.#je=this.#Ye[n]}else if(n===this.#Je){this.#Je=this.#He[n]}else{const e=this.#Ye[n];this.#He[e]=this.#He[n];const t=this.#He[n];this.#Ye[t]=this.#Ye[n]}this.#xe--;this.#Ve.push(n)}}}if(this.#Xe&&this.#We?.length){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}return r}clear(){return this.#Et("delete")}#Et(e){for(const t of this.#it({allowStale:true})){const r=this.#Ge[t];if(this.#et(r)){r.__abortController.abort(new Error("deleted"))}else{const n=this.#Pe[t];if(this.#$e){this.#Te?.(r,n,e)}if(this.#Xe){this.#We?.push([r,n,e])}}}this.#Ue.clear();this.#Ge.fill(undefined);this.#Pe.fill(undefined);if(this.#Ke&&this.#ze){this.#Ke.fill(0);this.#ze.fill(0)}if(this.#qe){this.#qe.fill(0)}this.#Je=0;this.#je=0;this.#Ve.length=0;this.#Oe=0;this.#xe=0;if(this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}}}t.LRUCache=LRUCache},8275:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Minipass=t.isWritable=t.isReadable=t.isStream=void 0;const s=typeof process==="object"&&process?process:{stdout:null,stderr:null};const A=r(8474);const a=n(r(7075));const c=r(6193);const isStream=e=>!!e&&typeof e==="object"&&(e instanceof Minipass||e instanceof a.default||(0,t.isReadable)(e)||(0,t.isWritable)(e));t.isStream=isStream;const isReadable=e=>!!e&&typeof e==="object"&&e instanceof A.EventEmitter&&typeof e.pipe==="function"&&e.pipe!==a.default.Writable.prototype.pipe;t.isReadable=isReadable;const isWritable=e=>!!e&&typeof e==="object"&&e instanceof A.EventEmitter&&typeof e.write==="function"&&typeof e.end==="function";t.isWritable=isWritable;const l=Symbol("EOF");const u=Symbol("maybeEmitEnd");const h=Symbol("emittedEnd");const g=Symbol("emittingEnd");const p=Symbol("emittedError");const C=Symbol("closed");const y=Symbol("read");const I=Symbol("flush");const B=Symbol("flushChunk");const Q=Symbol("encoding");const b=Symbol("decoder");const w=Symbol("flowing");const S=Symbol("paused");const k=Symbol("resume");const v=Symbol("buffer");const R=Symbol("pipes");const D=Symbol("bufferLength");const _=Symbol("bufferPush");const N=Symbol("bufferShift");const T=Symbol("objectMode");const F=Symbol("destroyed");const L=Symbol("error");const M=Symbol("emitData");const x=Symbol("emitEnd");const O=Symbol("emitEnd2");const U=Symbol("async");const P=Symbol("abort");const G=Symbol("aborted");const H=Symbol("signal");const Y=Symbol("dataListeners");const J=Symbol("discarded");const defer=e=>Promise.resolve().then(e);const nodefer=e=>e();const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBufferLike=e=>e instanceof ArrayBuffer||!!e&&typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{src;dest;opts;ondrain;constructor(e,t,r){this.src=e;this.dest=t;this.opts=r;this.ondrain=()=>e[k]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(e,t,r){super(e,t,r);this.proxyErrors=e=>t.emit("error",e);e.on("error",this.proxyErrors)}}const isObjectModeOptions=e=>!!e.objectMode;const isEncodingOptions=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer";class Minipass extends A.EventEmitter{[w]=false;[S]=false;[R]=[];[v]=[];[T];[Q];[U];[b];[l]=false;[h]=false;[g]=false;[C]=false;[p]=null;[D]=0;[F]=false;[H];[G]=false;[Y]=0;[J]=false;writable=true;readable=true;constructor(...e){const t=e[0]||{};super();if(t.objectMode&&typeof t.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(t)){this[T]=true;this[Q]=null}else if(isEncodingOptions(t)){this[Q]=t.encoding;this[T]=false}else{this[T]=false;this[Q]=null}this[U]=!!t.async;this[b]=this[Q]?new c.StringDecoder(this[Q]):null;if(t&&t.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[v]})}if(t&&t.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[R]})}const{signal:r}=t;if(r){this[H]=r;if(r.aborted){this[P]()}else{r.addEventListener("abort",(()=>this[P]()))}}}get bufferLength(){return this[D]}get encoding(){return this[Q]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[T]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[U]}set["async"](e){this[U]=this[U]||!!e}[P](){this[G]=true;this.emit("abort",this[H]?.reason);this.destroy(this[H]?.reason)}get aborted(){return this[G]}set aborted(e){}write(e,t,r){if(this[G])return false;if(this[l])throw new Error("write after end");if(this[F]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function"){r=t;t="utf8"}if(!t)t="utf8";const n=this[U]?defer:nodefer;if(!this[T]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(isArrayBufferLike(e)){e=Buffer.from(e)}else if(typeof e!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[T]){if(this[w]&&this[D]!==0)this[I](true);if(this[w])this.emit("data",e);else this[_](e);if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}if(!e.length){if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}if(typeof e==="string"&&!(t===this[Q]&&!this[b]?.lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[Q]){e=this[b].write(e)}if(this[w]&&this[D]!==0)this[I](true);if(this[w])this.emit("data",e);else this[_](e);if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}read(e){if(this[F])return null;this[J]=false;if(this[D]===0||e===0||e&&e>this[D]){this[u]();return null}if(this[T])e=null;if(this[v].length>1&&!this[T]){this[v]=[this[Q]?this[v].join(""):Buffer.concat(this[v],this[D])]}const t=this[y](e||null,this[v][0]);this[u]();return t}[y](e,t){if(this[T])this[N]();else{const r=t;if(e===r.length||e===null)this[N]();else if(typeof r==="string"){this[v][0]=r.slice(e);t=r.slice(0,e);this[D]-=e}else{this[v][0]=r.subarray(e);t=r.subarray(0,e);this[D]-=e}}this.emit("data",t);if(!this[v].length&&!this[l])this.emit("drain");return t}end(e,t,r){if(typeof e==="function"){r=e;e=undefined}if(typeof t==="function"){r=t;t="utf8"}if(e!==undefined)this.write(e,t);if(r)this.once("end",r);this[l]=true;this.writable=false;if(this[w]||!this[S])this[u]();return this}[k](){if(this[F])return;if(!this[Y]&&!this[R].length){this[J]=true}this[S]=false;this[w]=true;this.emit("resume");if(this[v].length)this[I]();else if(this[l])this[u]();else this.emit("drain")}resume(){return this[k]()}pause(){this[w]=false;this[S]=true;this[J]=false}get destroyed(){return this[F]}get flowing(){return this[w]}get paused(){return this[S]}[_](e){if(this[T])this[D]+=1;else this[D]+=e.length;this[v].push(e)}[N](){if(this[T])this[D]-=1;else this[D]-=this[v][0].length;return this[v].shift()}[I](e=false){do{}while(this[B](this[N]())&&this[v].length);if(!e&&!this[v].length&&!this[l])this.emit("drain")}[B](e){this.emit("data",e);return this[w]}pipe(e,t){if(this[F])return e;this[J]=false;const r=this[h];t=t||{};if(e===s.stdout||e===s.stderr)t.end=false;else t.end=t.end!==false;t.proxyErrors=!!t.proxyErrors;if(r){if(t.end)e.end()}else{this[R].push(!t.proxyErrors?new Pipe(this,e,t):new PipeProxyErrors(this,e,t));if(this[U])defer((()=>this[k]()));else this[k]()}return e}unpipe(e){const t=this[R].find((t=>t.dest===e));if(t){if(this[R].length===1){if(this[w]&&this[Y]===0){this[w]=false}this[R]=[]}else this[R].splice(this[R].indexOf(t),1);t.unpipe()}}addListener(e,t){return this.on(e,t)}on(e,t){const r=super.on(e,t);if(e==="data"){this[J]=false;this[Y]++;if(!this[R].length&&!this[w]){this[k]()}}else if(e==="readable"&&this[D]!==0){super.emit("readable")}else if(isEndish(e)&&this[h]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[p]){const e=t;if(this[U])defer((()=>e.call(this,this[p])));else e.call(this,this[p])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){const r=super.off(e,t);if(e==="data"){this[Y]=this.listeners("data").length;if(this[Y]===0&&!this[J]&&!this[R].length){this[w]=false}}return r}removeAllListeners(e){const t=super.removeAllListeners(e);if(e==="data"||e===undefined){this[Y]=0;if(!this[J]&&!this[R].length){this[w]=false}}return t}get emittedEnd(){return this[h]}[u](){if(!this[g]&&!this[h]&&!this[F]&&this[v].length===0&&this[l]){this[g]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[C])this.emit("close");this[g]=false}}emit(e,...t){const r=t[0];if(e!=="error"&&e!=="close"&&e!==F&&this[F]){return false}else if(e==="data"){return!this[T]&&!r?false:this[U]?(defer((()=>this[M](r))),true):this[M](r)}else if(e==="end"){return this[x]()}else if(e==="close"){this[C]=true;if(!this[h]&&!this[F])return false;const e=super.emit("close");this.removeAllListeners("close");return e}else if(e==="error"){this[p]=r;super.emit(L,r);const e=!this[H]||this.listeners("error").length?super.emit("error",r):false;this[u]();return e}else if(e==="resume"){const e=super.emit("resume");this[u]();return e}else if(e==="finish"||e==="prefinish"){const t=super.emit(e);this.removeAllListeners(e);return t}const n=super.emit(e,...t);this[u]();return n}[M](e){for(const t of this[R]){if(t.dest.write(e)===false)this.pause()}const t=this[J]?false:super.emit("data",e);this[u]();return t}[x](){if(this[h])return false;this[h]=true;this.readable=false;return this[U]?(defer((()=>this[O]())),true):this[O]()}[O](){if(this[b]){const e=this[b].end();if(e){for(const t of this[R]){t.dest.write(e)}if(!this[J])super.emit("data",e)}}for(const e of this[R]){e.end()}const e=super.emit("end");this.removeAllListeners("end");return e}async collect(){const e=Object.assign([],{dataLength:0});if(!this[T])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[T])e.dataLength+=t.length}));await t;return e}async concat(){if(this[T]){throw new Error("cannot concat in objectMode")}const e=await this.collect();return this[Q]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise(((e,t)=>{this.on(F,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[Symbol.asyncIterator](){this[J]=false;let e=false;const stop=async()=>{this.pause();e=true;return{value:undefined,done:true}};const next=()=>{if(e)return stop();const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[l])return stop();let r;let n;const onerr=e=>{this.off("data",ondata);this.off("end",onend);this.off(F,ondestroy);stop();n(e)};const ondata=e=>{this.off("error",onerr);this.off("end",onend);this.off(F,ondestroy);this.pause();r({value:e,done:!!this[l]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(F,ondestroy);stop();r({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,t)=>{n=t;r=e;this.once(F,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[J]=false;let e=false;const stop=()=>{this.pause();this.off(L,stop);this.off(F,stop);this.off("end",stop);e=true;return{done:true,value:undefined}};const next=()=>{if(e)return stop();const t=this.read();return t===null?stop():{done:false,value:t}};this.once("end",stop);this.once(L,stop);this.once(F,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(e){if(this[F]){if(e)this.emit("error",e);else this.emit(F);return this}this[F]=true;this[J]=true;this[v].length=0;this[D]=0;const t=this;if(typeof t.close==="function"&&!this[C])t.close();if(e)this.emit("error",e);else this.emit(F);return this}static get isStream(){return t.isStream}}t.Minipass=Minipass},8958:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.PathScurry=t.Path=t.PathScurryDarwin=t.PathScurryPosix=t.PathScurryWin32=t.PathScurryBase=t.PathPosix=t.PathWin32=t.PathBase=t.ChildrenCache=t.ResolveCache=void 0;const a=r(2477);const c=r(6760);const l=r(3136);const u=r(9896);const h=A(r(3024));const g=u.realpathSync.native;const p=r(1455);const C=r(8275);const y={lstatSync:u.lstatSync,readdir:u.readdir,readdirSync:u.readdirSync,readlinkSync:u.readlinkSync,realpathSync:g,promises:{lstat:p.lstat,readdir:p.readdir,readlink:p.readlink,realpath:p.realpath}};const fsFromOption=e=>!e||e===y||e===h?y:{...y,...e,promises:{...y.promises,...e.promises||{}}};const I=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=e=>e.replace(/\//g,"\\").replace(I,"$1\\");const B=/[\\\/]/;const Q=0;const b=1;const w=2;const S=4;const k=6;const v=8;const R=10;const D=12;const _=15;const N=~_;const T=16;const F=32;const L=64;const M=128;const x=256;const O=512;const U=L|M|O;const P=1023;const entToType=e=>e.isFile()?v:e.isDirectory()?S:e.isSymbolicLink()?R:e.isCharacterDevice()?w:e.isBlockDevice()?k:e.isSocket()?D:e.isFIFO()?b:Q;const G=new Map;const normalize=e=>{const t=G.get(e);if(t)return t;const r=e.normalize("NFKD");G.set(e,r);return r};const H=new Map;const normalizeNocase=e=>{const t=H.get(e);if(t)return t;const r=normalize(e.toLowerCase());H.set(e,r);return r};class ResolveCache extends a.LRUCache{constructor(){super({max:256})}}t.ResolveCache=ResolveCache;class ChildrenCache extends a.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}}t.ChildrenCache=ChildrenCache;const Y=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;isCWD=false;#Ct;#yt;get dev(){return this.#yt}#It;get mode(){return this.#It}#Bt;get nlink(){return this.#Bt}#Qt;get uid(){return this.#Qt}#mt;get gid(){return this.#mt}#bt;get rdev(){return this.#bt}#wt;get blksize(){return this.#wt}#St;get ino(){return this.#St}#xe;get size(){return this.#xe}#kt;get blocks(){return this.#kt}#vt;get atimeMs(){return this.#vt}#Rt;get mtimeMs(){return this.#Rt}#Dt;get ctimeMs(){return this.#Dt}#_t;get birthtimeMs(){return this.#_t}#Nt;get atime(){return this.#Nt}#Tt;get mtime(){return this.#Tt}#Ft;get ctime(){return this.#Ft}#Lt;get birthtime(){return this.#Lt}#Mt;#xt;#Ot;#Ut;#Pt;#Gt;#Ht;#Yt;#Jt;#jt;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Q,r,n,s,A,a){this.name=e;this.#Mt=s?normalizeNocase(e):normalize(e);this.#Ht=t&P;this.nocase=s;this.roots=n;this.root=r||this;this.#Yt=A;this.#Ot=a.fullpath;this.#Pt=a.relative;this.#Gt=a.relativePosix;this.parent=a.parent;if(this.parent){this.#Ct=this.parent.#Ct}else{this.#Ct=fsFromOption(a.fs)}}depth(){if(this.#xt!==undefined)return this.#xt;if(!this.parent)return this.#xt=0;return this.#xt=this.parent.depth()+1}childrenCache(){return this.#Yt}resolve(e){if(!e){return this}const t=this.getRootString(e);const r=e.substring(t.length);const n=r.split(this.splitSep);const s=t?this.getRoot(t).#Vt(n):this.#Vt(n);return s}#Vt(e){let t=this;for(const r of e){t=t.child(r)}return t}children(){const e=this.#Yt.get(this);if(e){return e}const t=Object.assign([],{provisional:0});this.#Yt.set(this,t);this.#Ht&=~T;return t}child(e,t){if(e===""||e==="."){return this}if(e===".."){return this.parent||this}const r=this.children();const n=this.nocase?normalizeNocase(e):normalize(e);for(const e of r){if(e.#Mt===n){return e}}const s=this.parent?this.sep:"";const A=this.#Ot?this.#Ot+s+e:undefined;const a=this.newChild(e,Q,{...t,parent:this,fullpath:A});if(!this.canReaddir()){a.#Ht|=M}r.push(a);return a}relative(){if(this.isCWD)return"";if(this.#Pt!==undefined){return this.#Pt}const e=this.name;const t=this.parent;if(!t){return this.#Pt=this.name}const r=t.relative();return r+(!r||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#Gt!==undefined)return this.#Gt;const e=this.name;const t=this.parent;if(!t){return this.#Gt=this.fullpathPosix()}const r=t.relativePosix();return r+(!r||!t.parent?"":"/")+e}fullpath(){if(this.#Ot!==undefined){return this.#Ot}const e=this.name;const t=this.parent;if(!t){return this.#Ot=this.name}const r=t.fullpath();const n=r+(!t.parent?"":this.sep)+e;return this.#Ot=n}fullpathPosix(){if(this.#Ut!==undefined)return this.#Ut;if(this.sep==="/")return this.#Ut=this.fullpath();if(!this.parent){const e=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(e)){return this.#Ut=`//?/${e}`}else{return this.#Ut=e}}const e=this.parent;const t=e.fullpathPosix();const r=t+(!t||!e.parent?"":"/")+this.name;return this.#Ut=r}isUnknown(){return(this.#Ht&_)===Q}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#Ht&_)===v}isDirectory(){return(this.#Ht&_)===S}isCharacterDevice(){return(this.#Ht&_)===w}isBlockDevice(){return(this.#Ht&_)===k}isFIFO(){return(this.#Ht&_)===b}isSocket(){return(this.#Ht&_)===D}isSymbolicLink(){return(this.#Ht&R)===R}lstatCached(){return this.#Ht&F?this:undefined}readlinkCached(){return this.#Jt}realpathCached(){return this.#jt}readdirCached(){const e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#Jt)return true;if(!this.parent)return false;const e=this.#Ht&_;return!(e!==Q&&e!==R||this.#Ht&x||this.#Ht&M)}calledReaddir(){return!!(this.#Ht&T)}isENOENT(){return!!(this.#Ht&M)}isNamed(e){return!this.nocase?this.#Mt===normalize(e):this.#Mt===normalizeNocase(e)}async readlink(){const e=this.#Jt;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=await this.#Ct.promises.readlink(this.fullpath());const t=(await this.parent.realpath())?.resolve(e);if(t){return this.#Jt=t}}catch(e){this.#Wt(e.code);return undefined}}readlinkSync(){const e=this.#Jt;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=this.#Ct.readlinkSync(this.fullpath());const t=this.parent.realpathSync()?.resolve(e);if(t){return this.#Jt=t}}catch(e){this.#Wt(e.code);return undefined}}#qt(e){this.#Ht|=T;for(let t=e.provisional;tt(null,e)))}readdirCB(e,t=false){if(!this.canReaddir()){if(t)e(null,[]);else queueMicrotask((()=>e(null,[])));return}const r=this.children();if(this.calledReaddir()){const n=r.slice(0,r.provisional);if(t)e(null,n);else queueMicrotask((()=>e(null,n)));return}this.#or.push(e);if(this.#Ar){return}this.#Ar=true;const n=this.fullpath();this.#Ct.readdir(n,{withFileTypes:true},((e,t)=>{if(e){this.#Xt(e.code);r.provisional=0}else{for(const e of t){this.#tr(e,r)}this.#qt(r)}this.#ar(r.slice(0,r.provisional));return}))}#cr;async readdir(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();if(this.#cr){await this.#cr}else{let resolve=()=>{};this.#cr=new Promise((e=>resolve=e));try{for(const r of await this.#Ct.promises.readdir(t,{withFileTypes:true})){this.#tr(r,e)}this.#qt(e)}catch(t){this.#Xt(t.code);e.provisional=0}this.#cr=undefined;resolve()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();try{for(const r of this.#Ct.readdirSync(t,{withFileTypes:true})){this.#tr(r,e)}this.#qt(e)}catch(t){this.#Xt(t.code);e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#Ht&U)return false;const e=_&this.#Ht;if(!(e===Q||e===S||e===R)){return false}return true}shouldWalk(e,t){return(this.#Ht&S)===S&&!(this.#Ht&U)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#jt)return this.#jt;if((O|x|M)&this.#Ht)return undefined;try{const e=await this.#Ct.promises.realpath(this.fullpath());return this.#jt=this.resolve(e)}catch(e){this.#$t()}}realpathSync(){if(this.#jt)return this.#jt;if((O|x|M)&this.#Ht)return undefined;try{const e=this.#Ct.realpathSync(this.fullpath());return this.#jt=this.resolve(e)}catch(e){this.#$t()}}[Y](e){if(e===this)return;e.isCWD=false;this.isCWD=true;const t=new Set([]);let r=[];let n=this;while(n&&n.parent){t.add(n);n.#Pt=r.join(this.sep);n.#Gt=r.join("/");n=n.parent;r.push("..")}n=e;while(n&&n.parent&&!t.has(n)){n.#Pt=undefined;n.#Gt=undefined;n=n.parent}}}t.PathBase=PathBase;class PathWin32 extends PathBase{sep="\\";splitSep=B;constructor(e,t=Q,r,n,s,A,a){super(e,t,r,n,s,A,a)}newChild(e,t=Q,r={}){return new PathWin32(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return c.win32.parse(e).root}getRoot(e){e=uncToDrive(e.toUpperCase());if(e===this.root.name){return this.root}for(const[t,r]of Object.entries(this.roots)){if(this.sameRoot(e,t)){return this.roots[e]=r}}return this.roots[e]=new PathScurryWin32(e,this).root}sameRoot(e,t=this.root.name){e=e.toUpperCase().replace(/\//g,"\\").replace(I,"$1\\");return e===t}}t.PathWin32=PathWin32;class PathPosix extends PathBase{splitSep="/";sep="/";constructor(e,t=Q,r,n,s,A,a){super(e,t,r,n,s,A,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Q,r={}){return new PathPosix(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}}t.PathPosix=PathPosix;class PathScurryBase{root;rootPath;roots;cwd;#lr;#ur;#Yt;nocase;#Ct;constructor(e=process.cwd(),t,r,{nocase:n,childrenCacheSize:s=16*1024,fs:A=y}={}){this.#Ct=fsFromOption(A);if(e instanceof URL||e.startsWith("file://")){e=(0,l.fileURLToPath)(e)}const a=t.resolve(e);this.roots=Object.create(null);this.rootPath=this.parseRootPath(a);this.#lr=new ResolveCache;this.#ur=new ResolveCache;this.#Yt=new ChildrenCache(s);const c=a.substring(this.rootPath.length).split(r);if(c.length===1&&!c[0]){c.pop()}if(n===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=n;this.root=this.newRoot(this.#Ct);this.roots[this.rootPath]=this.root;let u=this.root;let h=c.length-1;const g=t.sep;let p=this.rootPath;let C=false;for(const e of c){const t=h--;u=u.child(e,{relative:new Array(t).fill("..").join(g),relativePosix:new Array(t).fill("..").join("/"),fullpath:p+=(C?"":g)+e});C=true}this.cwd=u}depth(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.depth()}childrenCache(){return this.#Yt}resolve(...e){let t="";for(let r=e.length-1;r>=0;r--){const n=e[r];if(!n||n===".")continue;t=t?`${n}/${t}`:n;if(this.isAbsolute(n)){break}}const r=this.#lr.get(t);if(r!==undefined){return r}const n=this.cwd.resolve(t).fullpath();this.#lr.set(t,n);return n}resolvePosix(...e){let t="";for(let r=e.length-1;r>=0;r--){const n=e[r];if(!n||n===".")continue;t=t?`${n}/${t}`:n;if(this.isAbsolute(n)){break}}const r=this.#ur.get(t);if(r!==undefined){return r}const n=this.cwd.resolve(t).fullpathPosix();this.#ur.set(t,n);return n}relative(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relative()}relativePosix(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relativePosix()}basename(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.name}dirname(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r}=t;if(!e.canReaddir()){return[]}else{const t=await e.readdir();return r?t:t.map((e=>e.name))}}readdirSync(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true}=t;if(!e.canReaddir()){return[]}else if(r){return e.readdirSync()}else{return e.readdirSync().map((e=>e.name))}}async lstat(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstat()}lstatSync(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=await e.readlink();return t?r:r?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=e.readlinkSync();return t?r:r?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=await e.realpath();return t?r:r?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=e.realpathSync();return t?r:r?.fullpath()}async walk(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=[];if(!s||s(e)){a.push(r?e:e.fullpath())}const c=new Set;const walk=(e,t)=>{c.add(e);e.readdirCB(((e,l)=>{if(e){return t(e)}let u=l.length;if(!u)return t();const next=()=>{if(--u===0){t()}};for(const e of l){if(!s||s(e)){a.push(r?e:e.fullpath())}if(n&&e.isSymbolicLink()){e.realpath().then((e=>e?.isUnknown()?e.lstat():e)).then((e=>e?.shouldWalk(c,A)?walk(e,next):next()))}else{if(e.shouldWalk(c,A)){walk(e,next)}else{next()}}}}),true)};const l=e;return new Promise(((e,t)=>{walk(l,(r=>{if(r)return t(r);e(a)}))}))}walkSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=[];if(!s||s(e)){a.push(r?e:e.fullpath())}const c=new Set([e]);for(const e of c){const t=e.readdirSync();for(const e of t){if(!s||s(e)){a.push(r?e:e.fullpath())}let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(c,A)){c.add(t)}}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}return this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;if(!s||s(e)){yield r?e:e.fullpath()}const a=new Set([e]);for(const e of a){const t=e.readdirSync();for(const e of t){if(!s||s(e)){yield r?e:e.fullpath()}let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(a,A)){a.add(t)}}}}stream(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=new C.Minipass({objectMode:true});if(!s||s(e)){a.write(r?e:e.fullpath())}const c=new Set;const l=[e];let u=0;const process=()=>{let e=false;while(!e){const t=l.shift();if(!t){if(u===0)a.end();return}u++;c.add(t);const onReaddir=(t,g,p=false)=>{if(t)return a.emit("error",t);if(n&&!p){const e=[];for(const t of g){if(t.isSymbolicLink()){e.push(t.realpath().then((e=>e?.isUnknown()?e.lstat():e)))}}if(e.length){Promise.all(e).then((()=>onReaddir(null,g,true)));return}}for(const t of g){if(t&&(!s||s(t))){if(!a.write(r?t:t.fullpath())){e=true}}}u--;for(const e of g){const t=e.realpathCached()||e;if(t.shouldWalk(c,A)){l.push(t)}}if(e&&!a.flowing){a.once("drain",process)}else if(!h){process()}};let h=true;t.readdirCB(onReaddir,true);h=false}};process();return a}streamSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=new C.Minipass({objectMode:true});const c=new Set;if(!s||s(e)){a.write(r?e:e.fullpath())}const l=[e];let u=0;const process=()=>{let e=false;while(!e){const t=l.shift();if(!t){if(u===0)a.end();return}u++;c.add(t);const h=t.readdirSync();for(const t of h){if(!s||s(t)){if(!a.write(r?t:t.fullpath())){e=true}}}u--;for(const e of h){let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(c,A)){l.push(t)}}}if(e&&!a.flowing)a.once("drain",process)};process();return a}chdir(e=this.cwd){const t=this.cwd;this.cwd=typeof e==="string"?this.cwd.resolve(e):e;this.cwd[Y](t)}}t.PathScurryBase=PathScurryBase;class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(e=process.cwd(),t={}){const{nocase:r=true}=t;super(e,c.win32,"\\",{...t,nocase:r});this.nocase=r;for(let e=this.cwd;e;e=e.parent){e.nocase=this.nocase}}parseRootPath(e){return c.win32.parse(e).root.toUpperCase()}newRoot(e){return new PathWin32(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}}t.PathScurryWin32=PathScurryWin32;class PathScurryPosix extends PathScurryBase{sep="/";constructor(e=process.cwd(),t={}){const{nocase:r=false}=t;super(e,c.posix,"/",{...t,nocase:r});this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new PathPosix(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}}t.PathScurryPosix=PathScurryPosix;class PathScurryDarwin extends PathScurryPosix{constructor(e=process.cwd(),t={}){const{nocase:r=true}=t;super(e,{...t,nocase:r})}}t.PathScurryDarwin=PathScurryDarwin;t.Path=process.platform==="win32"?PathWin32:PathPosix;t.PathScurry=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix},4928:e=>{"use strict";function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}const t=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function ensureBuffer(e){if(Buffer.isBuffer(e)){return e}if(typeof e==="number"){return Buffer.alloc(e)}else if(typeof e==="string"){return Buffer.from(e)}else{throw new Error("input must be buffer, number, or string, received "+typeof e)}}function bufferizeInt(e){const t=ensureBuffer(4);t.writeInt32BE(e,0);return t}function _crc32(e,r){e=ensureBuffer(e);if(Buffer.isBuffer(r)){r=r.readUInt32BE(0)}let n=~~r^-1;for(var s=0;s>>8}return n^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};var r=crc32;const n=getDefaultExportFromCjs(r);e.exports=n},8823:(e,t,r)=>{"use strict";const n=r(6495);e.exports={pkg:n}},5470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.USER_AGENT=t.PRODUCT_NAME=t.pkg=void 0;const n=r(6066);t.pkg=n;const s="google-api-nodejs-client";t.PRODUCT_NAME=s;const A=`${s}/${n.version}`;t.USER_AGENT=A},920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GoogleToken=void 0;var n=_interopRequireWildcard(r(9896));var s=r(7842);var A=_interopRequireWildcard(r(3324));var a=_interopRequireWildcard(r(6928));var c=r(9023);function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var s,A,a={__proto__:null,default:e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return a;if(s=t?n:r){if(s.has(e))return s.get(e);s.set(e,a)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((A=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(A.get||A.set)?s(a,c,A):a[c]=e[c]);return a})(e,t)}function _typeof(e){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(e,t,r){return e.set(_assertClassBrand(e,t),r),r}function _classPrivateFieldGet(e,t){return e.get(_assertClassBrand(e,t))}function _assertClassBrand(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function _defineProperties(e,t){for(var r=0;r3?(s=y===n)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=C&&((s=r<2&&Cn||n>y)&&(a[4]=r,a[5]=n,p.n=y,c=0))}if(s||r>1)return A;throw g=!0,n}return function(s,h,C){if(u>1)throw TypeError("Generator is already running");for(g&&1===h&&d(h,C),c=h,l=C;(t=c<2?e:l)||!g;){a||(c?c<3?(c>1&&(p.n=-1),d(c,l)):p.n=l:p.v=l);try{if(u=2,a){if(c||(s="next"),t=a[s]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=a["return"])&&t.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+s+"' method"),c=1);a=e}else if((t=(g=p.n<0)?l:r.call(n,p))!==A)break}catch(t){a=e,c=1,l=t}finally{u=1}}return{value:t,done:g}}}(r,s,a),!0),l}var A={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var a=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,(function(){return this})),t),c=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(a);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,s,"GeneratorFunction")),e.prototype=Object.create(c),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(c,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,s,"GeneratorFunction"),_regeneratorDefine2(c),_regeneratorDefine2(c,s,"Generator"),_regeneratorDefine2(c,n,(function(){return this})),_regeneratorDefine2(c,"toString",(function(){return"[object Generator]"})),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,t,r,n){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}_regeneratorDefine2=function _regeneratorDefine(e,t,r,n){if(t)s?s(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var A=function o(t,r){_regeneratorDefine2(e,t,(function(e){return this._invoke(t,r,e)}))};A("next",0),A("throw",1),A("return",2)}},_regeneratorDefine2(e,t,r,n)}function asyncGeneratorStep(e,t,r,n,s,A,a){try{var c=e[A](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,s)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var A=e.apply(t,r);function _next(e){asyncGeneratorStep(A,n,s,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(A,n,s,_next,_throw,"throw",e)}_next(void 0)}))}}var l=n.readFile?(0,c.promisify)(n.readFile):_asyncToGenerator(_regenerator().m((function _callee(){return _regenerator().w((function(e){while(1)switch(e.n){case 0:throw new g("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return e.a(2)}}),_callee)})));var u="https://oauth2.googleapis.com/token";var h="https://oauth2.googleapis.com/revoke?token=";var g=function(e){function ErrorWithCode(e,t){var r;_classCallCheck(this,ErrorWithCode);r=_callSuper(this,ErrorWithCode,[e]);_defineProperty(r,"code",void 0);r.code=t;return r}_inherits(ErrorWithCode,e);return _createClass(ErrorWithCode)}(_wrapNativeSuper(Error));var p=new WeakMap;var C=new WeakSet;var y=t.GoogleToken=function(){function GoogleToken(e){_classCallCheck(this,GoogleToken);_classPrivateMethodInitSpec(this,C);_defineProperty(this,"expiresAt",void 0);_defineProperty(this,"key",void 0);_defineProperty(this,"keyFile",void 0);_defineProperty(this,"iss",void 0);_defineProperty(this,"sub",void 0);_defineProperty(this,"scope",void 0);_defineProperty(this,"rawToken",void 0);_defineProperty(this,"tokenExpires",void 0);_defineProperty(this,"email",void 0);_defineProperty(this,"additionalClaims",void 0);_defineProperty(this,"eagerRefreshThresholdMillis",void 0);_defineProperty(this,"transporter",{request:function request(e){return(0,s.request)(e)}});_classPrivateFieldInitSpec(this,p,void 0);_assertClassBrand(C,this,_configure).call(this,e)}return _createClass(GoogleToken,[{key:"accessToken",get:function get(){return this.rawToken?this.rawToken.access_token:undefined}},{key:"idToken",get:function get(){return this.rawToken?this.rawToken.id_token:undefined}},{key:"tokenType",get:function get(){return this.rawToken?this.rawToken.token_type:undefined}},{key:"refreshToken",get:function get(){return this.rawToken?this.rawToken.refresh_token:undefined}},{key:"hasExpired",value:function hasExpired(){var e=(new Date).getTime();if(this.rawToken&&this.expiresAt){return e>=this.expiresAt}else{return true}}},{key:"isTokenExpiring",value:function isTokenExpiring(){var e;var t=(new Date).getTime();var r=(e=this.eagerRefreshThresholdMillis)!==null&&e!==void 0?e:0;if(this.rawToken&&this.expiresAt){return this.expiresAt<=t+r}else{return true}}},{key:"getToken",value:function getToken(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(_typeof(e)==="object"){t=e;e=undefined}t=Object.assign({forceRefresh:false},t);if(e){var r=e;_assertClassBrand(C,this,_getTokenAsync).call(this,t).then((function(e){return r(null,e)}),e);return}return _assertClassBrand(C,this,_getTokenAsync).call(this,t)}},{key:"getCredentials",value:function(){var e=_asyncToGenerator(_regenerator().m((function _callee2(e){var t,r,n,s,A,c,u;return _regenerator().w((function(h){while(1)switch(h.n){case 0:t=a.extname(e);u=t;h.n=u===".json"?1:u===".der"?4:u===".crt"?4:u===".pem"?4:u===".p12"?6:u===".pfx"?6:7;break;case 1:h.n=2;return l(e,"utf8");case 2:r=h.v;n=JSON.parse(r);s=n.private_key;A=n.client_email;if(!(!s||!A)){h.n=3;break}throw new g("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return h.a(2,{privateKey:s,clientEmail:A});case 4:h.n=5;return l(e,"utf8");case 5:c=h.v;return h.a(2,{privateKey:c});case 6:throw new g("*.p12 certificates are not supported after v6.1.2. "+"Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");case 7:throw new g("Unknown certificate type. Type is determined based on file extension. "+"Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return h.a(2)}}),_callee2)})));function getCredentials(t){return e.apply(this,arguments)}return getCredentials}()},{key:"revokeToken",value:function revokeToken(e){if(e){_assertClassBrand(C,this,_revokeTokenAsync).call(this).then((function(){return e()}),e);return}return _assertClassBrand(C,this,_revokeTokenAsync).call(this)}}])}();function _getTokenAsync(e){return _getTokenAsync2.apply(this,arguments)}function _getTokenAsync2(){_getTokenAsync2=_asyncToGenerator(_regenerator().m((function _callee3(e){return _regenerator().w((function(t){while(1)switch(t.n){case 0:if(!(_classPrivateFieldGet(p,this)&&!e.forceRefresh)){t.n=1;break}return t.a(2,_classPrivateFieldGet(p,this));case 1:t.p=1;t.n=2;return _classPrivateFieldSet(p,this,_assertClassBrand(C,this,_getTokenAsyncInner).call(this,e));case 2:return t.a(2,t.v);case 3:t.p=3;_classPrivateFieldSet(p,this,undefined);return t.f(3);case 4:return t.a(2)}}),_callee3,this,[[1,,3,4]])})));return _getTokenAsync2.apply(this,arguments)}function _getTokenAsyncInner(e){return _getTokenAsyncInner2.apply(this,arguments)}function _getTokenAsyncInner2(){_getTokenAsyncInner2=_asyncToGenerator(_regenerator().m((function _callee4(e){var t;return _regenerator().w((function(r){while(1)switch(r.n){case 0:if(!(this.isTokenExpiring()===false&&e.forceRefresh===false)){r.n=1;break}return r.a(2,Promise.resolve(this.rawToken));case 1:if(!(!this.key&&!this.keyFile)){r.n=2;break}throw new Error("No key or keyFile set.");case 2:if(!(!this.key&&this.keyFile)){r.n=4;break}r.n=3;return this.getCredentials(this.keyFile);case 3:t=r.v;this.key=t.privateKey;this.iss=t.clientEmail||this.iss;if(!t.clientEmail){_assertClassBrand(C,this,_ensureEmail).call(this)}case 4:return r.a(2,_assertClassBrand(C,this,_requestToken).call(this))}}),_callee4,this)})));return _getTokenAsyncInner2.apply(this,arguments)}function _ensureEmail(){if(!this.iss){throw new g("email is required.","MISSING_CREDENTIALS")}}function _revokeTokenAsync(){return _revokeTokenAsync2.apply(this,arguments)}function _revokeTokenAsync2(){_revokeTokenAsync2=_asyncToGenerator(_regenerator().m((function _callee5(){var e;return _regenerator().w((function(t){while(1)switch(t.n){case 0:if(this.accessToken){t.n=1;break}throw new Error("No token to revoke.");case 1:e=h+this.accessToken;t.n=2;return this.transporter.request({url:e,retry:true});case 2:_assertClassBrand(C,this,_configure).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims});case 3:return t.a(2)}}),_callee5,this)})));return _revokeTokenAsync2.apply(this,arguments)}function _configure(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.keyFile=e.keyFile;this.key=e.key;this.rawToken=undefined;this.iss=e.email||e.iss;this.sub=e.sub;this.additionalClaims=e.additionalClaims;if(_typeof(e.scope)==="object"){this.scope=e.scope.join(" ")}else{this.scope=e.scope}this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis;if(e.transporter){this.transporter=e.transporter}}function _requestToken(){return _requestToken2.apply(this,arguments)}function _requestToken2(){_requestToken2=_asyncToGenerator(_regenerator().m((function _callee6(){var e,t,r,n,s,a,c,l,h,g;return _regenerator().w((function(p){while(1)switch(p.n){case 0:e=Math.floor((new Date).getTime()/1e3);t=this.additionalClaims||{};r=Object.assign({iss:this.iss,scope:this.scope,aud:u,exp:e+3600,iat:e,sub:this.sub},t);n=A.sign({header:{alg:"RS256"},payload:r,secret:this.key});p.p=1;p.n=2;return this.transporter.request({method:"POST",url:u,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:n}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:s=p.v;this.rawToken=s.data;this.expiresAt=s.data.expires_in===null||s.data.expires_in===undefined?undefined:(e+s.data.expires_in)*1e3;return p.a(2,this.rawToken);case 3:p.p=3;g=p.v;this.rawToken=undefined;this.tokenExpires=undefined;l=g.response&&(a=g.response)!==null&&a!==void 0&&a.data?(c=g.response)===null||c===void 0?void 0:c.data:{};if(l.error){h=l.error_description?": ".concat(l.error_description):"";g.message="".concat(l.error).concat(h)}throw g;case 4:return p.a(2)}}),_callee6,this,[[1,3]])})));return _requestToken2.apply(this,arguments)}},6495:e=>{"use strict";e.exports=JSON.parse('{"name":"gaxios","version":"7.1.1","description":"A simple common HTTP client specifically for Google APIs and services.","main":"build/cjs/src/index.js","types":"build/cjs/src/index.d.ts","files":["build/"],"exports":{".":{"import":{"types":"./build/esm/src/index.d.ts","default":"./build/esm/src/index.js"},"require":{"types":"./build/cjs/src/index.d.ts","default":"./build/cjs/src/index.js"}}},"scripts":{"lint":"gts check --no-inline-config","test":"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000","compile":"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs","fix":"gts fix","prepare":"npm run compile","pretest":"npm run compile","webpack":"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js","docs":"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","prelint":"cd samples; npm link ../; npm install","clean":"gts clean"},"repository":"googleapis/gaxios","keywords":["google"],"engines":{"node":">=18"},"author":"Google, LLC","license":"Apache-2.0","devDependencies":{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","assert":"^2.0.0","browserify":"^17.0.0","c8":"^10.0.0","cors":"^2.8.5","express":"^5.0.0","gts":"^6.0.0","is-docker":"^3.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^4.0.0","jsdoc-region-tag":"^3.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1","linkinator":"^6.1.2","mocha":"^11.1.0","multiparty":"^4.2.1","mv":"^2.1.1","ncp":"^2.0.0","nock":"^14.0.0-beta.13","null-loader":"^4.0.0","pack-n-play":"^3.0.0","puppeteer":"^24.0.0","sinon":"^20.0.0","stream-browserify":"^3.0.0","tmp":"0.2.3","ts-loader":"^9.5.2","typescript":"^5.8.3","webpack":"^5.35.0","webpack-cli":"^6.0.1"},"dependencies":{"extend":"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2"}}')},6066:e=>{"use strict";e.exports=JSON.parse('{"name":"google-auth-library","version":"10.3.0","author":"Google Inc.","description":"Google APIs Authentication Client Library for Node.js","engines":{"node":">=18"},"main":"./build/src/index.js","types":"./build/src/index.d.ts","repository":"googleapis/google-auth-library-nodejs.git","keywords":["google","api","google apis","client","client library"],"dependencies":{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11","gaxios":"^7.0.0","gcp-metadata":"^7.0.0","google-logging-utils":"^1.0.0","gtoken":"^8.0.0","jws":"^4.0.0"},"devDependencies":{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0","c8":"^10.0.0","codecov":"^3.0.2","gts":"^6.0.0","is-docker":"^3.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^4.0.0","jsdoc-region-tag":"^3.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1","keypair":"^1.0.4","linkinator":"^6.1.2","mocha":"^11.1.0","mv":"^2.1.1","ncp":"^2.0.0","nock":"^14.0.5","null-loader":"^4.0.0","puppeteer":"^24.0.0","sinon":"^21.0.0","ts-loader":"^8.0.0","typescript":"5.8.2","webpack":"^5.21.2","webpack-cli":"^4.0.0"},"files":["build/src","!build/src/**/*.map"],"scripts":{"test":"c8 mocha build/test","clean":"gts clean","prepare":"npm run compile","lint":"gts check --no-inline-config","compile":"tsc -p .","fix":"gts fix","pretest":"npm run compile -- --sourceMap","docs":"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap","webpack":"webpack","browser-test":"karma start","docs-test":"linkinator docs","predocs-test":"npm run docs","prelint":"cd samples; npm link ../; npm install"},"license":"Apache-2.0"}')},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"@google-github-actions/deploy-cloud-functions","version":"4.0.0","description":"Deploy a Cloud Function","main":"dist/index.js","scripts":{"build":"rm -rf dist/ && ncc build -m src/main.ts -o dist/main","docs":"./node_modules/.bin/actions-gen-readme","lint":"eslint .","format":"eslint . --fix","test":"node --require ts-node/register --test-reporter spec --test tests/**/*.test.ts"},"engines":{"node":">= 24.x","npm":">= 11.x"},"repository":{"type":"git","url":"https://github.com/google-github-actions/deploy-cloud-functions"},"keywords":["actions","gcf","functions","google cloud","cloud function"],"author":"Google LLC","license":"Apache-2.0","dependencies":{"@actions/core":"^1.11.1","@actions/http-client":"^2.2.3","@google-github-actions/actions-utils":"^1.0.1","archiver":"^7.0.1","google-auth-library":"^10.3.0","ignore":"^7.0.5"},"devDependencies":{"@eslint/eslintrc":"^3.3.1","@eslint/js":"^9.34.0","@types/archiver":"^6.0.3","@types/node":"^24.3.0","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.3","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","eslint":"^9.34.0","node-stream-zip":"^1.15.0","prettier":"^3.6.2","ts-node":"^10.9.2","typescript-eslint":"^8.42.0","typescript":"^5.9.2"}}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={id:e,loaded:false,exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}r.loaded=true;return r.exports}__nccwpck_require__.m=__webpack_modules__;(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(r,n){if(n&1)r=this(r);if(n&8)return r;if(typeof r==="object"&&r){if(n&4&&r.__esModule)return r;if(n&16&&typeof r.then==="function")return r}var s=Object.create(null);__nccwpck_require__.r(s);var A={};t=t||[null,e({}),e([]),e(e)];for(var a=n&2&&r;typeof a=="object"&&!~t.indexOf(a);a=e(a)){Object.getOwnPropertyNames(a).forEach((e=>A[e]=()=>r[e]))}A["default"]=()=>r;__nccwpck_require__.d(s,A);return s}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=e=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((t,r)=>{__nccwpck_require__.f[r](e,t);return t}),[]))})();(()=>{__nccwpck_require__.u=e=>""+e+".index.js"})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";(()=>{var e={792:1};var installChunk=t=>{var r=t.modules,n=t.ids,s=t.runtime;for(var A in r){if(__nccwpck_require__.o(r,A)){__nccwpck_require__.m[A]=r[A]}}if(s)s(__nccwpck_require__);for(var a=0;a{if(!e[t]){if(true){installChunk(require("./"+__nccwpck_require__.u(t)))}else e[t]=1}}})();var __webpack_exports__={};(()=>{"use strict";var exports=__webpack_exports__;Object.defineProperty(exports,"__esModule",{value:true});const core_1=__nccwpck_require__(7484);const actions_utils_1=__nccwpck_require__(6160);const client_1=__nccwpck_require__(9592);const util_1=__nccwpck_require__(4527);async function run(){try{const e=(0,actions_utils_1.presence)((0,core_1.getInput)("project_id"))||(0,actions_utils_1.presence)(process.env?.GCLOUD_PROJECT);const t=(0,actions_utils_1.presence)((0,core_1.getInput)("region"))||"us-central1";const r=(0,core_1.getInput)("universe")||"googleapis.com";const n=(0,core_1.getInput)("name",{required:true});const s=(0,actions_utils_1.presence)((0,core_1.getInput)("description"));const A=(0,actions_utils_1.toEnum)(client_1.Environment,(0,core_1.getInput)("environment")||client_1.Environment.GEN_2);const a=(0,actions_utils_1.presence)((0,core_1.getInput)("kms_key_name"));const c=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("labels"));const l=(0,actions_utils_1.presence)((0,core_1.getInput)("source_dir"))||process.cwd();const u=(0,core_1.getInput)("runtime",{required:true});const h=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("build_environment_variables"));const g=(0,actions_utils_1.presence)((0,core_1.getInput)("build_service_account"));const p=(0,actions_utils_1.presence)((0,core_1.getInput)("build_worker_pool"));const C=(0,actions_utils_1.presence)((0,core_1.getInput)("docker_repository"));const y=(0,actions_utils_1.presence)((0,core_1.getInput)("entry_point"));const I=(0,actions_utils_1.parseBoolean)((0,core_1.getInput)("all_traffic_on_latest_revision"),true);const B=(0,actions_utils_1.presence)((0,core_1.getInput)("cpu"));const Q=(0,actions_utils_1.presence)((0,core_1.getInput)("memory"))||"256Mi";const b=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("environment_variables"));const w=(0,actions_utils_1.toEnum)(client_1.IngressSettings,(0,core_1.getInput)("ingress_settings")||client_1.IngressSettings.ALLOW_ALL);const S=(0,actions_utils_1.presence)((0,core_1.getInput)("max_instance_count"));const k=(0,util_1.stringToInt)((0,core_1.getInput)("max_instance_request_concurrency"));const v=(0,actions_utils_1.presence)((0,core_1.getInput)("min_instance_count"));const[R,D]=(0,util_1.parseSecrets)((0,core_1.getInput)("secrets"));const _=(0,actions_utils_1.presence)((0,core_1.getInput)("service_account"));const N=(0,actions_utils_1.parseDuration)((0,core_1.getInput)("service_timeout"));const T=(0,actions_utils_1.presence)((0,core_1.getInput)("vpc_connector"));const F=(0,actions_utils_1.toEnum)(client_1.VpcConnectorEgressSettings,(0,core_1.getInput)("vpc_connector_egress_settings")||client_1.VpcConnectorEgressSettings.PRIVATE_RANGES_ONLY);const L=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_location"));const M=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_type"));const x=(0,util_1.parseEventTriggerFilters)((0,core_1.getInput)("event_trigger_filters"));const O=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_pubsub_topic"));const U=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_service_account"));const P=(0,actions_utils_1.parseBoolean)((0,core_1.getInput)("event_trigger_retry"),true)?client_1.RetryPolicy.RETRY_POLICY_RETRY:client_1.RetryPolicy.RETRY_POLICY_DO_NOT_RETRY;const G=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_channel"));if(N<=0){throw new Error(`The 'service_timeout' parameter must be > 0 seconds (got ${N})`)}const H=new client_1.CloudFunctionsClient({projectID:e,location:t,universe:r});const Y={name:n,description:s,environment:A,kmsKeyName:a,labels:c,buildConfig:{runtime:u,entryPoint:y,dockerRepository:C,environmentVariables:h,serviceAccount:g,workerPool:p},serviceConfig:{allTrafficOnLatestRevision:I,availableCpu:B,availableMemory:Q,environmentVariables:b,ingressSettings:w,maxInstanceCount:S?+S:undefined,maxInstanceRequestConcurrency:k,minInstanceCount:v?+v:undefined,secretEnvironmentVariables:R,secretVolumes:D,serviceAccountEmail:_,timeoutSeconds:N,vpcConnector:T,vpcConnectorEgressSettings:F},eventTrigger:{triggerRegion:L,eventType:M,eventFilters:x,pubsubTopic:O,serviceAccountEmail:U,retryPolicy:P,channel:G}};if(!Y.eventTrigger?.eventType){delete Y.eventTrigger}if(!Y.serviceConfig?.vpcConnector){delete Y.serviceConfig?.vpcConnectorEgressSettings}const J=await H.deployFromLocalSource(Y,l,{onZip:(e,t)=>{(0,core_1.info)(`Created zip file from '${e}' at '${t}'`)},onZipAddEntry:e=>{(0,core_1.debug)((0,util_1.formatEntry)(e))},onZipIgnoreEntry:e=>{(0,core_1.debug)(`Ignoring ${e.name}`)},onNew:()=>{(0,core_1.info)("Creating new Cloud Functions deployment")},onExisting:()=>{(0,core_1.info)("Updating existing Cloud Functions deployment")},onPoll:(()=>{let e=0;return()=>{if(e===0){process.stdout.write(`Deploying Cloud Function...`)}else{process.stdout.write(`.`)}e++}})(),onDebug:e=>{if((0,core_1.isDebug)()){(0,core_1.debug)(e())}}});if(J.state!=="ACTIVE"){throw new Error(`Cloud Function deployment finished, but the function not in the `+`"ACTIVE" status. The current status is "${J.state}", which `+`could indicate a failed deployment. Check the Cloud Function `+`logs for more information.`)}(0,core_1.setOutput)("name",J.name);(0,core_1.setOutput)("url",J.url)}catch(e){const t=(0,actions_utils_1.errorMessage)(e);(0,core_1.setFailed)(`google-github-actions/deploy-cloud-functions failed with: ${t}`)}}if(require.main===require.cache[eval("__filename")]){run()}})();module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 25ff454..d6a90bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@google-github-actions/deploy-cloud-functions", - "version": "3.0.9", + "version": "4.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@google-github-actions/deploy-cloud-functions", - "version": "3.0.9", + "version": "4.0.0", "license": "Apache-2.0", "dependencies": { "@actions/core": "^1.11.1", diff --git a/package.json b/package.json index 6a81e1b..842a56b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@google-github-actions/deploy-cloud-functions", - "version": "3.0.9", + "version": "4.0.0", "description": "Deploy a Cloud Function", "main": "dist/index.js", "scripts": {