UNPKG

scaffoldly

Version:

Toolchain and libraries for Scaffoldly

8 lines 26.8 MB
"use strict";var zsn=Object.create;var xQ=Object.defineProperty;var Ksn=Object.getOwnPropertyDescriptor;var Ysn=Object.getOwnPropertyNames;var Jsn=Object.getPrototypeOf,Xsn=Object.prototype.hasOwnProperty;var I=(e,t)=>()=>(e&&(t=e(e=0)),t);var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ao=(e,t)=>{for(var n in t)xQ(e,n,{get:t[n],enumerable:!0})},_Be=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ysn(t))!Xsn.call(e,s)&&s!==n&&xQ(e,s,{get:()=>t[s],enumerable:!(r=Ksn(t,s))||r.enumerable});return e};var ot=(e,t,n)=>(n=e!=null?zsn(Jsn(e)):{},_Be(t||!e||!e.__esModule?xQ(n,"default",{value:e,enumerable:!0}):n,e)),ls=e=>_Be(xQ({},"__esModule",{value:!0}),e);var BBe=y((jVr,DBe)=>{"use strict";function xBe(e){return Array.isArray(e)?e:[e]}var Nte="",IBe=" ",Ote="\\",ain=/^\s+$/,cin=/(?:[^\\]|^)\\$/,lin=/^\\!/,din=/^\\#/,fin=/\r?\n/g,uin=/^\.*\/|^\.+$/,kte="/",wBe="node-ignore";typeof Symbol<"u"&&(wBe=Symbol.for("node-ignore"));var vBe=wBe,hin=(e,t,n)=>Object.defineProperty(e,t,{value:n}),min=/([0-z])-([0-z])/g,RBe=()=>!1,Ain=e=>e.replace(min,(t,n,r)=>n.charCodeAt(0)<=r.charCodeAt(0)?t:Nte),pin=e=>{let{length:t}=e;return e.slice(0,t-t%2)},gin=[[/^\uFEFF/,()=>Nte],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(n.indexOf("\\")===0?IBe:Nte)],[/(\\+?)\s/g,(e,t)=>{let{length:n}=t;return t.slice(0,n-n%2)+IBe}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>{let r=n.replace(/\\\*/g,"[^\\/]*");return t+r}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Ote],[/\\\\/g,()=>Ote],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,s)=>t===Ote?`\\[${n}${pin(r)}${s}`:s==="]"&&r.length%2===0?`[${Ain(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],SBe=Object.create(null),yin=(e,t)=>{let n=SBe[e];return n||(n=gin.reduce((r,[s,i])=>r.replace(s,i.bind(e)),e),SBe[e]=n),t?new RegExp(n,"i"):new RegExp(n)},Qte=e=>typeof e=="string",Ein=e=>e&&Qte(e)&&!ain.test(e)&&!cin.test(e)&&e.indexOf("#")!==0,bin=e=>e.split(fin),Lte=class{constructor(t,n,r,s){this.origin=t,this.pattern=n,this.negative=r,this.regex=s}},_in=(e,t)=>{let n=e,r=!1;e.indexOf("!")===0&&(r=!0,e=e.substr(1)),e=e.replace(lin,"!").replace(din,"#");let s=yin(e,t);return new Lte(n,e,r,s)},Cin=(e,t)=>{throw new t(e)},Ip=(e,t,n)=>Qte(e)?e?Ip.isNotRelative(e)?n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:n("path must not be empty",TypeError):n(`path must be a string, but got \`${t}\``,TypeError),TBe=e=>uin.test(e);Ip.isNotRelative=TBe;Ip.convert=e=>e;var Fte=class{constructor({ignorecase:t=!0,ignoreCase:n=t,allowRelativePaths:r=!1}={}){hin(this,vBe,!0),this._rules=[],this._ignoreCase=n,this._allowRelativePaths=r,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[vBe]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(Ein(t)){let n=_in(t,this._ignoreCase);this._added=!0,this._rules.push(n)}}add(t){return this._added=!1,xBe(Qte(t)?bin(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,n){let r=!1,s=!1;return this._rules.forEach(i=>{let{negative:o}=i;if(s===o&&r!==s||o&&!r&&!s&&!n)return;i.regex.test(t)&&(r=!o,s=o)}),{ignored:r,unignored:s}}_test(t,n,r,s){let i=t&&Ip.convert(t);return Ip(i,t,this._allowRelativePaths?RBe:Cin),this._t(i,n,r,s)}_t(t,n,r,s){if(t in n)return n[t];if(s||(s=t.split(kte)),s.pop(),!s.length)return n[t]=this._testOne(t,r);let i=this._t(s.join(kte)+kte,n,r,s);return n[t]=i.ignored?i:this._testOne(t,r)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return xBe(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},SQ=e=>new Fte(e),xin=e=>Ip(e&&Ip.convert(e),e,RBe);SQ.isPathValid=xin;SQ.default=SQ;DBe.exports=SQ;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=n=>/^\\\\\?\\/.test(n)||/["<>|\u0000-\u001F]+/u.test(n)?n:n.replace(/\\/g,"/");Ip.convert=e;let t=/^[a-z]:\//i;Ip.isNotRelative=n=>t.test(n)||TBe(n)}});var RQ=y(Hx=>{"use strict";Object.defineProperty(Hx,"__esModule",{value:!0});Hx.toCommandProperties=Hx.toCommandValue=void 0;function vin(e){return e==null?"":typeof e=="string"||e instanceof String?e:JSON.stringify(e)}Hx.toCommandValue=vin;function Sin(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}}Hx.toCommandProperties=Sin});var FBe=y(Su=>{"use strict";var win=Su&&Su.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Rin=Su&&Su.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Tin=Su&&Su.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.hasOwnProperty.call(e,n)&&win(t,e,n);return Rin(t,e),t};Object.defineProperty(Su,"__esModule",{value:!0});Su.issue=Su.issueCommand=void 0;var Din=Tin(require("os")),NBe=RQ();function LBe(e,t,n){let r=new Mte(e,t,n);process.stdout.write(r.toString()+Din.EOL)}Su.issueCommand=LBe;function Bin(e,t=""){LBe(e,{},t)}Su.issue=Bin;var kBe="::",Mte=class{constructor(t,n,r){t||(t="missing.command"),this.command=t,this.properties=n,this.message=r}toString(){let t=kBe+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let n=!0;for(let r in this.properties)if(this.properties.hasOwnProperty(r)){let s=this.properties[r];s&&(n?n=!1:t+=",",t+=`${r}=${Oin(s)}`)}}return t+=`${kBe}${Pin(this.message)}`,t}};function Pin(e){return NBe.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function Oin(e){return NBe.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});function n1(){return TQ>DQ.length-16&&(QBe.default.randomFillSync(DQ),TQ=0),DQ.slice(TQ,TQ+=16)}var QBe,DQ,TQ,Hte=I(()=>{"use strict";QBe=ot(require("crypto")),DQ=new Uint8Array(256),TQ=DQ.length});var MBe,HBe=I(()=>{"use strict";MBe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function kin(e){return typeof e=="string"&&MBe.test(e)}var ky,r1=I(()=>{"use strict";HBe();ky=kin});function Nin(e,t=0){let n=(qc[e[t+0]]+qc[e[t+1]]+qc[e[t+2]]+qc[e[t+3]]+"-"+qc[e[t+4]]+qc[e[t+5]]+"-"+qc[e[t+6]]+qc[e[t+7]]+"-"+qc[e[t+8]]+qc[e[t+9]]+"-"+qc[e[t+10]]+qc[e[t+11]]+qc[e[t+12]]+qc[e[t+13]]+qc[e[t+14]]+qc[e[t+15]]).toLowerCase();if(!ky(n))throw TypeError("Stringified UUID is invalid");return n}var qc,Ny,s1=I(()=>{"use strict";r1();qc=[];for(let e=0;e<256;++e)qc.push((e+256).toString(16).substr(1));Ny=Nin});function Lin(e,t,n){let r=t&&n||0,s=t||new Array(16);e=e||{};let i=e.node||GBe,o=e.clockseq!==void 0?e.clockseq:Gte;if(i==null||o==null){let h=e.random||(e.rng||n1)();i==null&&(i=GBe=[h[0]|1,h[1],h[2],h[3],h[4],h[5]]),o==null&&(o=Gte=(h[6]<<8|h[7])&16383)}let a=e.msecs!==void 0?e.msecs:Date.now(),c=e.nsecs!==void 0?e.nsecs:qte+1,l=a-Ute+(c-qte)/1e4;if(l<0&&e.clockseq===void 0&&(o=o+1&16383),(l<0||a>Ute)&&e.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Ute=a,qte=c,Gte=o,a+=122192928e5;let d=((a&268435455)*1e4+c)%4294967296;s[r++]=d>>>24&255,s[r++]=d>>>16&255,s[r++]=d>>>8&255,s[r++]=d&255;let f=a/4294967296*1e4&268435455;s[r++]=f>>>8&255,s[r++]=f&255,s[r++]=f>>>24&15|16,s[r++]=f>>>16&255,s[r++]=o>>>8|128,s[r++]=o&255;for(let h=0;h<6;++h)s[r+h]=i[h];return t||Ny(s)}var GBe,Gte,Ute,qte,UBe,qBe=I(()=>{"use strict";Hte();s1();Ute=0,qte=0;UBe=Lin});function Fin(e){if(!ky(e))throw TypeError("Invalid UUID");let t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}var BQ,$te=I(()=>{"use strict";r1();BQ=Fin});function Qin(e){e=unescape(encodeURIComponent(e));let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}function PQ(e,t,n){function r(s,i,o,a){if(typeof s=="string"&&(s=Qin(s)),typeof i=="string"&&(i=BQ(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+s.length);if(c.set(i),c.set(s,i.length),c=n(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,o){a=a||0;for(let l=0;l<16;++l)o[a+l]=c[l];return o}return Ny(c)}try{r.name=e}catch{}return r.DNS=Min,r.URL=Hin,r}var Min,Hin,jte=I(()=>{"use strict";s1();$te();Min="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Hin="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});function Gin(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),$Be.default.createHash("md5").update(e).digest()}var $Be,jBe,VBe=I(()=>{"use strict";$Be=ot(require("crypto"));jBe=Gin});var Uin,WBe,zBe=I(()=>{"use strict";jte();VBe();Uin=PQ("v3",48,jBe),WBe=Uin});function qin(e,t,n){e=e||{};let r=e.random||(e.rng||n1)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let s=0;s<16;++s)t[n+s]=r[s];return t}return Ny(r)}var KBe,YBe=I(()=>{"use strict";Hte();s1();KBe=qin});function $in(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),JBe.default.createHash("sha1").update(e).digest()}var JBe,XBe,ZBe=I(()=>{"use strict";JBe=ot(require("crypto"));XBe=$in});var jin,ePe,tPe=I(()=>{"use strict";jte();ZBe();jin=PQ("v5",80,XBe),ePe=jin});var nPe,rPe=I(()=>{"use strict";nPe="00000000-0000-0000-0000-000000000000"});function Vin(e){if(!ky(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var sPe,iPe=I(()=>{"use strict";r1();sPe=Vin});var oPe={};ao(oPe,{NIL:()=>nPe,parse:()=>BQ,stringify:()=>Ny,v1:()=>UBe,v3:()=>WBe,v4:()=>KBe,v5:()=>ePe,validate:()=>ky,version:()=>sPe});var aPe=I(()=>{"use strict";qBe();zBe();YBe();tPe();rPe();iPe();r1();s1();$te()});var fPe=y(wu=>{"use strict";var Win=wu&&wu.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),zin=wu&&wu.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),lPe=wu&&wu.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.hasOwnProperty.call(e,n)&&Win(t,e,n);return zin(t,e),t};Object.defineProperty(wu,"__esModule",{value:!0});wu.prepareKeyValueMessage=wu.issueFileCommand=void 0;var cPe=lPe(require("fs")),Vte=lPe(require("os")),Kin=(aPe(),ls(oPe)),dPe=RQ();function Yin(e,t){let n=process.env[`GITHUB_${e}`];if(!n)throw new Error(`Unable to find environment variable for file command ${e}`);if(!cPe.existsSync(n))throw new Error(`Missing file at path: ${n}`);cPe.appendFileSync(n,`${dPe.toCommandValue(t)}${Vte.EOL}`,{encoding:"utf8"})}wu.issueFileCommand=Yin;function Jin(e,t){let n=`ghadelimiter_${Kin.v4()}`,r=dPe.toCommandValue(t);if(e.includes(n))throw new Error(`Unexpected input: name should not contain the delimiter "${n}"`);if(r.includes(n))throw new Error(`Unexpected input: value should not contain the delimiter "${n}"`);return`${e}<<${n}${Vte.EOL}${r}${Vte.EOL}${n}`}wu.prepareKeyValueMessage=Jin});var hPe=y(Gx=>{"use strict";Object.defineProperty(Gx,"__esModule",{value:!0});Gx.checkBypass=Gx.getProxyUrl=void 0;function Xin(e){let t=e.protocol==="https:";if(uPe(e))return;let n=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(n)try{return new URL(n)}catch{if(!n.startsWith("http://")&&!n.startsWith("https://"))return new URL(`http://${n}`)}else return}Gx.getProxyUrl=Xin;function uPe(e){if(!e.hostname)return!1;let t=e.hostname;if(Zin(t))return!0;let n=process.env.no_proxy||process.env.NO_PROXY||"";if(!n)return!1;let r;e.port?r=Number(e.port):e.protocol==="http:"?r=80:e.protocol==="https:"&&(r=443);let s=[e.hostname.toUpperCase()];typeof r=="number"&&s.push(`${s[0]}:${r}`);for(let i of n.split(",").map(o=>o.trim().toUpperCase()).filter(o=>o))if(i==="*"||s.some(o=>o===i||o.endsWith(`.${i}`)||i.startsWith(".")&&o.endsWith(`${i}`)))return!0;return!1}Gx.checkBypass=uPe;function Zin(e){let t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}});var gPe=y(Ux=>{"use strict";var N9r=require("net"),eon=require("tls"),Wte=require("http"),mPe=require("https"),ton=require("events"),L9r=require("assert"),non=require("util");Ux.httpOverHttp=ron;Ux.httpsOverHttp=son;Ux.httpOverHttps=ion;Ux.httpsOverHttps=oon;function ron(e){var t=new wp(e);return t.request=Wte.request,t}function son(e){var t=new wp(e);return t.request=Wte.request,t.createSocket=APe,t.defaultPort=443,t}function ion(e){var t=new wp(e);return t.request=mPe.request,t}function oon(e){var t=new wp(e);return t.request=mPe.request,t.createSocket=APe,t.defaultPort=443,t}function wp(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||Wte.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",function(r,s,i,o){for(var a=pPe(s,i,o),c=0,l=t.requests.length;c<l;++c){var d=t.requests[c];if(d.host===a.host&&d.port===a.port){t.requests.splice(c,1),d.request.onSocket(r);return}}r.destroy(),t.removeSocket(r)})}non.inherits(wp,ton.EventEmitter);wp.prototype.addRequest=function(t,n,r,s){var i=this,o=zte({request:t},i.options,pPe(n,r,s));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",c),a.on("close",l),a.on("agentRemove",l),t.onSocket(a);function c(){i.emit("free",a,o)}function l(d){i.removeSocket(a),a.removeListener("free",c),a.removeListener("close",l),a.removeListener("agentRemove",l)}})};wp.prototype.createSocket=function(t,n){var r=this,s={};r.sockets.push(s);var i=zte({},r.proxyOptions,{method:"CONNECT",path:t.host+":"+t.port,agent:!1,headers:{host:t.host+":"+t.port}});t.localAddress&&(i.localAddress=t.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),Ly("making CONNECT request");var o=r.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",c),o.once("connect",l),o.once("error",d),o.end();function a(f){f.upgrade=!0}function c(f,h,m){process.nextTick(function(){l(f,h,m)})}function l(f,h,m){if(o.removeAllListeners(),h.removeAllListeners(),f.statusCode!==200){Ly("tunneling socket could not be established, statusCode=%d",f.statusCode),h.destroy();var p=new Error("tunneling socket could not be established, statusCode="+f.statusCode);p.code="ECONNRESET",t.request.emit("error",p),r.removeSocket(s);return}if(m.length>0){Ly("got illegal response body from proxy"),h.destroy();var p=new Error("got illegal response body from proxy");p.code="ECONNRESET",t.request.emit("error",p),r.removeSocket(s);return}return Ly("tunneling connection has established"),r.sockets[r.sockets.indexOf(s)]=h,n(h)}function d(f){o.removeAllListeners(),Ly(`tunneling socket could not be established, cause=%s `,f.message,f.stack);var h=new Error("tunneling socket could not be established, cause="+f.message);h.code="ECONNRESET",t.request.emit("error",h),r.removeSocket(s)}};wp.prototype.removeSocket=function(t){var n=this.sockets.indexOf(t);if(n!==-1){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createSocket(r,function(s){r.request.onSocket(s)})}};function APe(e,t){var n=this;wp.prototype.createSocket.call(n,e,function(r){var s=e.request.getHeader("host"),i=zte({},n.options,{socket:r,servername:s?s.replace(/:.*$/,""):e.host}),o=eon.connect(0,i);n.sockets[n.sockets.indexOf(r)]=o,t(o)})}function pPe(e,t,n){return typeof e=="string"?{host:e,port:t,localAddress:n}:e}function zte(e){for(var t=1,n=arguments.length;t<n;++t){var r=arguments[t];if(typeof r=="object")for(var s=Object.keys(r),i=0,o=s.length;i<o;++i){var a=s[i];r[a]!==void 0&&(e[a]=r[a])}}return e}var Ly;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Ly=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:Ly=function(){};Ux.debug=Ly});var EPe=y((Q9r,yPe)=>{"use strict";yPe.exports=gPe()});var fi=y((M9r,bPe)=>{"use strict";bPe.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kHeadersList:Symbol("headers list"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable")}});var ni=y((H9r,_Pe)=>{"use strict";var ca=class extends Error{constructor(t){super(t),this.name="UndiciError",this.code="UND_ERR"}},Kte=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="ConnectTimeoutError",this.message=t||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},Yte=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="HeadersTimeoutError",this.message=t||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},Jte=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="HeadersOverflowError",this.message=t||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},Xte=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="BodyTimeoutError",this.message=t||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},Zte=class e extends ca{constructor(t,n,r,s){super(t),Error.captureStackTrace(this,e),this.name="ResponseStatusCodeError",this.message=t||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=s,this.status=n,this.statusCode=n,this.headers=r}},ene=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="InvalidArgumentError",this.message=t||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},tne=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="InvalidReturnValueError",this.message=t||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}},nne=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="AbortError",this.message=t||"Request aborted",this.code="UND_ERR_ABORTED"}},rne=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="InformationalError",this.message=t||"Request information",this.code="UND_ERR_INFO"}},sne=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="RequestContentLengthMismatchError",this.message=t||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}},ine=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="ResponseContentLengthMismatchError",this.message=t||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}},one=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="ClientDestroyedError",this.message=t||"The client is destroyed",this.code="UND_ERR_DESTROYED"}},ane=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="ClientClosedError",this.message=t||"The client is closed",this.code="UND_ERR_CLOSED"}},cne=class e extends ca{constructor(t,n){super(t),Error.captureStackTrace(this,e),this.name="SocketError",this.message=t||"Socket error",this.code="UND_ERR_SOCKET",this.socket=n}},OQ=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="NotSupportedError",this.message=t||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}},lne=class extends ca{constructor(t){super(t),Error.captureStackTrace(this,OQ),this.name="MissingUpstreamError",this.message=t||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}},dne=class e extends Error{constructor(t,n,r){super(t),Error.captureStackTrace(this,e),this.name="HTTPParserError",this.code=n?`HPE_${n}`:void 0,this.data=r?r.toString():void 0}},fne=class e extends ca{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="ResponseExceededMaxSizeError",this.message=t||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}},une=class e extends ca{constructor(t,n,{headers:r,data:s}){super(t),Error.captureStackTrace(this,e),this.name="RequestRetryError",this.message=t||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=n,this.data=s,this.headers=r}};_Pe.exports={HTTPParserError:dne,UndiciError:ca,HeadersTimeoutError:Yte,HeadersOverflowError:Jte,BodyTimeoutError:Xte,RequestContentLengthMismatchError:sne,ConnectTimeoutError:Kte,ResponseStatusCodeError:Zte,InvalidArgumentError:ene,InvalidReturnValueError:tne,RequestAbortedError:nne,ClientDestroyedError:one,ClientClosedError:ane,InformationalError:rne,SocketError:cne,NotSupportedError:OQ,ResponseContentLengthMismatchError:ine,BalancedPoolMissingUpstreamError:lne,ResponseExceededMaxSizeError:fne,RequestRetryError:une}});var xPe=y((G9r,CPe)=>{"use strict";var kQ={},hne=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let e=0;e<hne.length;++e){let t=hne[e],n=t.toLowerCase();kQ[t]=kQ[n]=n}Object.setPrototypeOf(kQ,null);CPe.exports={wellknownHeaderNames:hne,headerNameLowerCasedRecord:kQ}});var Ur=y((U9r,kPe)=>{"use strict";var wPe=require("assert"),{kDestroyed:RPe,kBodyUsed:IPe}=fi(),{IncomingMessage:aon}=require("http"),qx=require("stream"),con=require("net"),{InvalidArgumentError:$c}=ni(),{Blob:vPe}=require("buffer"),NQ=require("util"),{stringify:lon}=require("querystring"),{headerNameLowerCasedRecord:don}=xPe(),[mne,SPe]=process.versions.node.split(".").map(e=>Number(e));function fon(){}function Ane(e){return e&&typeof e=="object"&&typeof e.pipe=="function"&&typeof e.on=="function"}function TPe(e){return vPe&&e instanceof vPe||e&&typeof e=="object"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function uon(e,t){if(e.includes("?")||e.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let n=lon(t);return n&&(e+="?"+n),e}function DPe(e){if(typeof e=="string"){if(e=new URL(e),!/^https?:/.test(e.origin||e.protocol))throw new $c("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||typeof e!="object")throw new $c("Invalid URL: The URL argument must be a non-null object.");if(!/^https?:/.test(e.origin||e.protocol))throw new $c("Invalid URL protocol: the URL must start with `http:` or `https:`.");if(!(e instanceof URL)){if(e.port!=null&&e.port!==""&&!Number.isFinite(parseInt(e.port)))throw new $c("Invalid URL: port must be a valid integer or a string representation of an integer.");if(e.path!=null&&typeof e.path!="string")throw new $c("Invalid URL path: the path must be a string or null/undefined.");if(e.pathname!=null&&typeof e.pathname!="string")throw new $c("Invalid URL pathname: the pathname must be a string or null/undefined.");if(e.hostname!=null&&typeof e.hostname!="string")throw new $c("Invalid URL hostname: the hostname must be a string or null/undefined.");if(e.origin!=null&&typeof e.origin!="string")throw new $c("Invalid URL origin: the origin must be a string or null/undefined.");let t=e.port!=null?e.port:e.protocol==="https:"?443:80,n=e.origin!=null?e.origin:`${e.protocol}//${e.hostname}:${t}`,r=e.path!=null?e.path:`${e.pathname||""}${e.search||""}`;n.endsWith("/")&&(n=n.substring(0,n.length-1)),r&&!r.startsWith("/")&&(r=`/${r}`),e=new URL(n+r)}return e}function hon(e){if(e=DPe(e),e.pathname!=="/"||e.search||e.hash)throw new $c("invalid url");return e}function mon(e){if(e[0]==="["){let n=e.indexOf("]");return wPe(n!==-1),e.substring(1,n)}let t=e.indexOf(":");return t===-1?e:e.substring(0,t)}function Aon(e){if(!e)return null;wPe.strictEqual(typeof e,"string");let t=mon(e);return con.isIP(t)?"":t}function pon(e){return JSON.parse(JSON.stringify(e))}function gon(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}function yon(e){return e!=null&&(typeof e[Symbol.iterator]=="function"||typeof e[Symbol.asyncIterator]=="function")}function Eon(e){if(e==null)return 0;if(Ane(e)){let t=e._readableState;return t&&t.objectMode===!1&&t.ended===!0&&Number.isFinite(t.length)?t.length:null}else{if(TPe(e))return e.size!=null?e.size:null;if(PPe(e))return e.byteLength}return null}function pne(e){return!e||!!(e.destroyed||e[RPe])}function BPe(e){let t=e&&e._readableState;return pne(e)&&t&&!t.endEmitted}function bon(e,t){e==null||!Ane(e)||pne(e)||(typeof e.destroy=="function"?(Object.getPrototypeOf(e).constructor===aon&&(e.socket=null),e.destroy(t)):t&&process.nextTick((n,r)=>{n.emit("error",r)},e,t),e.destroyed!==!0&&(e[RPe]=!0))}var _on=/timeout=(\d+)/;function Con(e){let t=e.toString().match(_on);return t?parseInt(t[1],10)*1e3:null}function xon(e){return don[e]||e.toLowerCase()}function Ion(e,t={}){if(!Array.isArray(e))return e;for(let n=0;n<e.length;n+=2){let r=e[n].toString().toLowerCase(),s=t[r];s?(Array.isArray(s)||(s=[s],t[r]=s),s.push(e[n+1].toString("utf8"))):Array.isArray(e[n+1])?t[r]=e[n+1].map(i=>i.toString("utf8")):t[r]=e[n+1].toString("utf8")}return"content-length"in t&&"content-disposition"in t&&(t["content-disposition"]=Buffer.from(t["content-disposition"]).toString("latin1")),t}function von(e){let t=[],n=!1,r=-1;for(let s=0;s<e.length;s+=2){let i=e[s+0].toString(),o=e[s+1].toString("utf8");i.length===14&&(i==="content-length"||i.toLowerCase()==="content-length")?(t.push(i,o),n=!0):i.length===19&&(i==="content-disposition"||i.toLowerCase()==="content-disposition")?r=t.push(i,o)-1:t.push(i,o)}return n&&r!==-1&&(t[r]=Buffer.from(t[r]).toString("latin1")),t}function PPe(e){return e instanceof Uint8Array||Buffer.isBuffer(e)}function Son(e,t,n){if(!e||typeof e!="object")throw new $c("handler must be an object");if(typeof e.onConnect!="function")throw new $c("invalid onConnect method");if(typeof e.onError!="function")throw new $c("invalid onError method");if(typeof e.onBodySent!="function"&&e.onBodySent!==void 0)throw new $c("invalid onBodySent method");if(n||t==="CONNECT"){if(typeof e.onUpgrade!="function")throw new $c("invalid onUpgrade method")}else{if(typeof e.onHeaders!="function")throw new $c("invalid onHeaders method");if(typeof e.onData!="function")throw new $c("invalid onData method");if(typeof e.onComplete!="function")throw new $c("invalid onComplete method")}}function won(e){return!!(e&&(qx.isDisturbed?qx.isDisturbed(e)||e[IPe]:e[IPe]||e.readableDidRead||e._readableState&&e._readableState.dataEmitted||BPe(e)))}function Ron(e){return!!(e&&(qx.isErrored?qx.isErrored(e):/state: 'errored'/.test(NQ.inspect(e))))}function Ton(e){return!!(e&&(qx.isReadable?qx.isReadable(e):/state: 'readable'/.test(NQ.inspect(e))))}function Don(e){return{localAddress:e.localAddress,localPort:e.localPort,remoteAddress:e.remoteAddress,remotePort:e.remotePort,remoteFamily:e.remoteFamily,timeout:e.timeout,bytesWritten:e.bytesWritten,bytesRead:e.bytesRead}}async function*Bon(e){for await(let t of e)yield Buffer.isBuffer(t)?t:Buffer.from(t)}var i1;function Pon(e){if(i1||(i1=require("stream/web").ReadableStream),i1.from)return i1.from(Bon(e));let t;return new i1({async start(){t=e[Symbol.asyncIterator]()},async pull(n){let{done:r,value:s}=await t.next();if(r)queueMicrotask(()=>{n.close()});else{let i=Buffer.isBuffer(s)?s:Buffer.from(s);n.enqueue(new Uint8Array(i))}return n.desiredSize>0},async cancel(n){await t.return()}},0)}function Oon(e){return e&&typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&e[Symbol.toStringTag]==="FormData"}function kon(e){if(e){if(typeof e.throwIfAborted=="function")e.throwIfAborted();else if(e.aborted){let t=new Error("The operation was aborted");throw t.name="AbortError",t}}}function Non(e,t){return"addEventListener"in e?(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)):(e.addListener("abort",t),()=>e.removeListener("abort",t))}var Lon=!!String.prototype.toWellFormed;function Fon(e){return Lon?`${e}`.toWellFormed():NQ.toUSVString?NQ.toUSVString(e):`${e}`}function Qon(e){if(e==null||e==="")return{start:0,end:null,size:null};let t=e?e.match(/^bytes (\d+)-(\d+)\/(\d+)?$/):null;return t?{start:parseInt(t[1]),end:t[2]?parseInt(t[2]):null,size:t[3]?parseInt(t[3]):null}:null}var OPe=Object.create(null);OPe.enumerable=!0;kPe.exports={kEnumerableProperty:OPe,nop:fon,isDisturbed:won,isErrored:Ron,isReadable:Ton,toUSVString:Fon,isReadableAborted:BPe,isBlobLike:TPe,parseOrigin:hon,parseURL:DPe,getServerName:Aon,isStream:Ane,isIterable:yon,isAsyncIterable:gon,isDestroyed:pne,headerNameToString:xon,parseRawHeaders:von,parseHeaders:Ion,parseKeepAliveTimeout:Con,destroy:bon,bodyLength:Eon,deepClone:pon,ReadableStreamFrom:Pon,isBuffer:PPe,validateHandler:Son,getSocketInfo:Don,isFormDataLike:Oon,buildURL:uon,throwIfAborted:kon,addAbortListener:Non,parseRangeHeader:Qon,nodeMajor:mne,nodeMinor:SPe,nodeHasAutoSelectFamily:mne>18||mne===18&&SPe>=13,safeHTTPMethods:["GET","HEAD","OPTIONS","TRACE"]}});var FPe=y((q9r,LPe)=>{"use strict";var gne=Date.now(),Fy,Qy=[];function Mon(){gne=Date.now();let e=Qy.length,t=0;for(;t<e;){let n=Qy[t];n.state===0?n.state=gne+n.delay:n.state>0&&gne>=n.state&&(n.state=-1,n.callback(n.opaque)),n.state===-1?(n.state=-2,t!==e-1?Qy[t]=Qy.pop():Qy.pop(),e-=1):t+=1}Qy.length>0&&NPe()}function NPe(){Fy&&Fy.refresh?Fy.refresh():(clearTimeout(Fy),Fy=setTimeout(Mon,1e3),Fy.unref&&Fy.unref())}var LQ=class{constructor(t,n,r){this.callback=t,this.delay=n,this.opaque=r,this.state=-2,this.refresh()}refresh(){this.state===-2&&(Qy.push(this),(!Fy||Qy.length===1)&&NPe()),this.state=0}clear(){this.state=-1}};LPe.exports={setTimeout(e,t,n){return t<1e3?setTimeout(e,t,n):new LQ(e,t,n)},clearTimeout(e){e instanceof LQ?e.clear():clearTimeout(e)}}});var yne=y(($9r,QPe)=>{"use strict";var Hon=require("events").EventEmitter,Gon=require("util").inherits;function Rb(e){if(typeof e=="string"&&(e=Buffer.from(e)),!Buffer.isBuffer(e))throw new TypeError("The needle has to be a String or a Buffer.");let 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=1/0,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 n=0;n<t-1;++n)this._occ[e[n]]=t-1-n}Gon(Rb,Hon);Rb.prototype.reset=function(){this._lookbehind_size=0,this.matches=0,this._bufpos=0};Rb.prototype.push=function(e,t){Buffer.isBuffer(e)||(e=Buffer.from(e,"binary"));let n=e.length;this._bufpos=t||0;let r;for(;r!==n&&this.matches<this.maxMatches;)r=this._sbmh_feed(e);return r};Rb.prototype._sbmh_feed=function(e){let t=e.length,n=this._needle,r=n.length,s=n[r-1],i=-this._lookbehind_size,o;if(i<0){for(;i<0&&i<=t-r;){if(o=this._sbmh_lookup_char(e,i+r-1),o===s&&this._sbmh_memcmp(e,i,r-1))return this._lookbehind_size=0,++this.matches,this.emit("info",!0),this._bufpos=i+r;i+=this._occ[o]}if(i<0)for(;i<0&&!this._sbmh_memcmp(e,i,t-i);)++i;if(i>=0)this.emit("info",!1,this._lookbehind,0,this._lookbehind_size),this._lookbehind_size=0;else{let a=this._lookbehind_size+i;return a>0&&this.emit("info",!1,this._lookbehind,0,a),this._lookbehind.copy(this._lookbehind,0,a,this._lookbehind_size-a),this._lookbehind_size-=a,e.copy(this._lookbehind,this._lookbehind_size),this._lookbehind_size+=t,this._bufpos=t,t}}if(i+=(i>=0)*this._bufpos,e.indexOf(n,i)!==-1)return i=e.indexOf(n,i),++this.matches,i>0?this.emit("info",!0,e,this._bufpos,i):this.emit("info",!0),this._bufpos=i+r;for(i=t-r;i<t&&(e[i]!==n[0]||Buffer.compare(e.subarray(i,i+t-i),n.subarray(0,t-i))!==0);)++i;return i<t&&(e.copy(this._lookbehind,0,i,i+(t-i)),this._lookbehind_size=t-i),i>0&&this.emit("info",!1,e,this._bufpos,i<t?i:t),this._bufpos=t,t};Rb.prototype._sbmh_lookup_char=function(e,t){return t<0?this._lookbehind[this._lookbehind_size+t]:e[t]};Rb.prototype._sbmh_memcmp=function(e,t,n){for(var r=0;r<n;++r)if(this._sbmh_lookup_char(e,t+r)!==this._needle[r])return!1;return!0};QPe.exports=Rb});var GPe=y((j9r,HPe)=>{"use strict";var Uon=require("util").inherits,MPe=require("stream").Readable;function Ene(e){MPe.call(this,e)}Uon(Ene,MPe);Ene.prototype._read=function(e){};HPe.exports=Ene});var FQ=y((V9r,UPe)=>{"use strict";UPe.exports=function(t,n,r){if(!t||t[n]===void 0||t[n]===null)return r;if(typeof t[n]!="number"||isNaN(t[n]))throw new TypeError("Limit "+n+" is not a valid number");return t[n]}});var VPe=y((W9r,jPe)=>{"use strict";var $Pe=require("events").EventEmitter,qon=require("util").inherits,qPe=FQ(),$on=yne(),jon=Buffer.from(`\r \r `),Von=/\r\n/g,Won=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function $x(e){$Pe.call(this),e=e||{};let t=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=qPe(e,"maxHeaderPairs",2e3),this.maxHeaderSize=qPe(e,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new $on(jon),this.ss.on("info",function(n,r,s,i){r&&!t.maxed&&(t.nread+i-s>=t.maxHeaderSize?(i=t.maxHeaderSize-t.nread+s,t.nread=t.maxHeaderSize,t.maxed=!0):t.nread+=i-s,t.buffer+=r.toString("binary",s,i)),n&&t._finish()})}qon($x,$Pe);$x.prototype.push=function(e){let t=this.ss.push(e);if(this.finished)return t};$x.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};$x.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let e=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",e)};$x.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let e=this.buffer.split(Von),t=e.length,n,r;for(var s=0;s<t;++s){if(e[s].length===0)continue;if((e[s][0]===" "||e[s][0]===" ")&&r){this.header[r][this.header[r].length-1]+=e[s];continue}let i=e[s].indexOf(":");if(i===-1||i===0)return;if(n=Won.exec(e[s]),r=n[1].toLowerCase(),this.header[r]=this.header[r]||[],this.header[r].push(n[2]||""),++this.npairs===this.maxHeaderPairs)break}};jPe.exports=$x});var _ne=y((z9r,zPe)=>{"use strict";var bne=require("stream").Writable,zon=require("util").inherits,Kon=yne(),WPe=GPe(),Yon=VPe(),Jon=45,Xon=Buffer.from("-"),Zon=Buffer.from(`\r `),ean=function(){};function Qh(e){if(!(this instanceof Qh))return new Qh(e);if(bne.call(this,e),!e||!e.headerFirst&&typeof e.boundary!="string")throw new TypeError("Boundary required");typeof e.boundary=="string"?this.setBoundary(e.boundary):this._bparser=void 0,this._headerFirst=e.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:e.partHwm},this._pause=!1;let t=this;this._hparser=new Yon(e),this._hparser.on("header",function(n){t._inHeader=!1,t._part.emit("header",n)})}zon(Qh,bne);Qh.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){let t=this;process.nextTick(function(){if(t.emit("error",new Error("Unexpected end of multipart data")),t._part&&!t._ignoreData){let n=t._isPreamble?"Preamble":"Part";t._part.emit("error",new Error(n+" terminated early due to unexpected end of multipart data")),t._part.push(null),process.nextTick(function(){t._realFinish=!0,t.emit("finish"),t._realFinish=!1});return}t._realFinish=!0,t.emit("finish"),t._realFinish=!1})}}else bne.prototype.emit.apply(this,arguments)};Qh.prototype._write=function(e,t,n){if(!this._hparser&&!this._bparser)return n();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new WPe(this._partOpts),this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(e);if(!this._inHeader&&r!==void 0&&r<e.length)e=e.slice(r);else return n()}this._firstWrite&&(this._bparser.push(Zon),this._firstWrite=!1),this._bparser.push(e),this._pause?this._cb=n:n()};Qh.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Qh.prototype.setBoundary=function(e){let t=this;this._bparser=new Kon(`\r --`+e),this._bparser.on("info",function(n,r,s,i){t._oninfo(n,r,s,i)})};Qh.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",ean),this._part.resume())};Qh.prototype._oninfo=function(e,t,n,r){let s,i=this,o=0,a,c=!0;if(!this._part&&this._justMatched&&t){for(;this._dashes<2&&n+o<r;)if(t[n+o]===Jon)++o,++this._dashes;else{this._dashes&&(s=Xon),this._dashes=0;break}if(this._dashes===2&&(n+o<r&&this.listenerCount("trailer")!==0&&this.emit("trailer",t.slice(n+o,r)),this.reset(),this._finished=!0,i._parts===0&&(i._realFinish=!0,i.emit("finish"),i._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new WPe(this._partOpts),this._part._read=function(l){i._unpause()},this._isPreamble&&this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._isPreamble!==!0&&this.listenerCount("part")!==0?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),t&&n<r&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(s&&(c=this._part.push(s)),c=this._part.push(t.slice(n,r)),c||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(s&&this._hparser.push(s),a=this._hparser.push(t.slice(n,r)),!this._inHeader&&a!==void 0&&a<r&&this._oninfo(!1,t,n+a,r))),e&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:n!==r&&(++this._parts,this._part.on("end",function(){--i._parts===0&&(i._finished?(i._realFinish=!0,i.emit("finish"),i._realFinish=!1):i._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};Qh.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let e=this._cb;this._cb=void 0,e()}};zPe.exports=Qh});var QQ=y((Cne,JPe)=>{"use strict";var KPe=new TextDecoder("utf-8"),YPe=new Map([["utf-8",KPe],["utf8",KPe]]);function tan(e){let t;for(;;)switch(e){case"utf-8":case"utf8":return o1.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 o1.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return o1.utf16le;case"base64":return o1.base64;default:if(t===void 0){t=!0,e=e.toLowerCase();continue}return o1.other.bind(e)}}var o1={utf8:(e,t)=>e.length===0?"":(typeof e=="string"&&(e=Buffer.from(e,t)),e.utf8Slice(0,e.length)),latin1:(e,t)=>e.length===0?"":typeof e=="string"?e:e.latin1Slice(0,e.length),utf16le:(e,t)=>e.length===0?"":(typeof e=="string"&&(e=Buffer.from(e,t)),e.ucs2Slice(0,e.length)),base64:(e,t)=>e.length===0?"":(typeof e=="string"&&(e=Buffer.from(e,t)),e.base64Slice(0,e.length)),other:(e,t)=>{if(e.length===0)return"";if(typeof e=="string"&&(e=Buffer.from(e,t)),YPe.has(Cne.toString()))try{return YPe.get(Cne).decode(e)}catch{}return typeof e=="string"?e:e.toString()}};function nan(e,t,n){return e&&tan(n)(e,t)}JPe.exports=nan});var Ine=y((K9r,nOe)=>{"use strict";var MQ=QQ(),XPe=/%[a-fA-F0-9][a-fA-F0-9]/g,ran={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"\x07","%08":"\b","%09":" ","%0a":` `,"%0A":` `,"%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":"\x1B","%1B":"\x1B","%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":"\x7F","%7F":"\x7F","%80":"\x80","%81":"\x81","%82":"\x82","%83":"\x83","%84":"\x84","%85":"\x85","%86":"\x86","%87":"\x87","%88":"\x88","%89":"\x89","%8a":"\x8A","%8A":"\x8A","%8b":"\x8B","%8B":"\x8B","%8c":"\x8C","%8C":"\x8C","%8d":"\x8D","%8D":"\x8D","%8e":"\x8E","%8E":"\x8E","%8f":"\x8F","%8F":"\x8F","%90":"\x90","%91":"\x91","%92":"\x92","%93":"\x93","%94":"\x94","%95":"\x95","%96":"\x96","%97":"\x97","%98":"\x98","%99":"\x99","%9a":"\x9A","%9A":"\x9A","%9b":"\x9B","%9B":"\x9B","%9c":"\x9C","%9C":"\x9C","%9d":"\x9D","%9D":"\x9D","%9e":"\x9E","%9E":"\x9E","%9f":"\x9F","%9F":"\x9F","%a0":"\xA0","%A0":"\xA0","%a1":"\xA1","%A1":"\xA1","%a2":"\xA2","%A2":"\xA2","%a3":"\xA3","%A3":"\xA3","%a4":"\xA4","%A4":"\xA4","%a5":"\xA5","%A5":"\xA5","%a6":"\xA6","%A6":"\xA6","%a7":"\xA7","%A7":"\xA7","%a8":"\xA8","%A8":"\xA8","%a9":"\xA9","%A9":"\xA9","%aa":"\xAA","%Aa":"\xAA","%aA":"\xAA","%AA":"\xAA","%ab":"\xAB","%Ab":"\xAB","%aB":"\xAB","%AB":"\xAB","%ac":"\xAC","%Ac":"\xAC","%aC":"\xAC","%AC":"\xAC","%ad":"\xAD","%Ad":"\xAD","%aD":"\xAD","%AD":"\xAD","%ae":"\xAE","%Ae":"\xAE","%aE":"\xAE","%AE":"\xAE","%af":"\xAF","%Af":"\xAF","%aF":"\xAF","%AF":"\xAF","%b0":"\xB0","%B0":"\xB0","%b1":"\xB1","%B1":"\xB1","%b2":"\xB2","%B2":"\xB2","%b3":"\xB3","%B3":"\xB3","%b4":"\xB4","%B4":"\xB4","%b5":"\xB5","%B5":"\xB5","%b6":"\xB6","%B6":"\xB6","%b7":"\xB7","%B7":"\xB7","%b8":"\xB8","%B8":"\xB8","%b9":"\xB9","%B9":"\xB9","%ba":"\xBA","%Ba":"\xBA","%bA":"\xBA","%BA":"\xBA","%bb":"\xBB","%Bb":"\xBB","%bB":"\xBB","%BB":"\xBB","%bc":"\xBC","%Bc":"\xBC","%bC":"\xBC","%BC":"\xBC","%bd":"\xBD","%Bd":"\xBD","%bD":"\xBD","%BD":"\xBD","%be":"\xBE","%Be":"\xBE","%bE":"\xBE","%BE":"\xBE","%bf":"\xBF","%Bf":"\xBF","%bF":"\xBF","%BF":"\xBF","%c0":"\xC0","%C0":"\xC0","%c1":"\xC1","%C1":"\xC1","%c2":"\xC2","%C2":"\xC2","%c3":"\xC3","%C3":"\xC3","%c4":"\xC4","%C4":"\xC4","%c5":"\xC5","%C5":"\xC5","%c6":"\xC6","%C6":"\xC6","%c7":"\xC7","%C7":"\xC7","%c8":"\xC8","%C8":"\xC8","%c9":"\xC9","%C9":"\xC9","%ca":"\xCA","%Ca":"\xCA","%cA":"\xCA","%CA":"\xCA","%cb":"\xCB","%Cb":"\xCB","%cB":"\xCB","%CB":"\xCB","%cc":"\xCC","%Cc":"\xCC","%cC":"\xCC","%CC":"\xCC","%cd":"\xCD","%Cd":"\xCD","%cD":"\xCD","%CD":"\xCD","%ce":"\xCE","%Ce":"\xCE","%cE":"\xCE","%CE":"\xCE","%cf":"\xCF","%Cf":"\xCF","%cF":"\xCF","%CF":"\xCF","%d0":"\xD0","%D0":"\xD0","%d1":"\xD1","%D1":"\xD1","%d2":"\xD2","%D2":"\xD2","%d3":"\xD3","%D3":"\xD3","%d4":"\xD4","%D4":"\xD4","%d5":"\xD5","%D5":"\xD5","%d6":"\xD6","%D6":"\xD6","%d7":"\xD7","%D7":"\xD7","%d8":"\xD8","%D8":"\xD8","%d9":"\xD9","%D9":"\xD9","%da":"\xDA","%Da":"\xDA","%dA":"\xDA","%DA":"\xDA","%db":"\xDB","%Db":"\xDB","%dB":"\xDB","%DB":"\xDB","%dc":"\xDC","%Dc":"\xDC","%dC":"\xDC","%DC":"\xDC","%dd":"\xDD","%Dd":"\xDD","%dD":"\xDD","%DD":"\xDD","%de":"\xDE","%De":"\xDE","%dE":"\xDE","%DE":"\xDE","%df":"\xDF","%Df":"\xDF","%dF":"\xDF","%DF":"\xDF","%e0":"\xE0","%E0":"\xE0","%e1":"\xE1","%E1":"\xE1","%e2":"\xE2","%E2":"\xE2","%e3":"\xE3","%E3":"\xE3","%e4":"\xE4","%E4":"\xE4","%e5":"\xE5","%E5":"\xE5","%e6":"\xE6","%E6":"\xE6","%e7":"\xE7","%E7":"\xE7","%e8":"\xE8","%E8":"\xE8","%e9":"\xE9","%E9":"\xE9","%ea":"\xEA","%Ea":"\xEA","%eA":"\xEA","%EA":"\xEA","%eb":"\xEB","%Eb":"\xEB","%eB":"\xEB","%EB":"\xEB","%ec":"\xEC","%Ec":"\xEC","%eC":"\xEC","%EC":"\xEC","%ed":"\xED","%Ed":"\xED","%eD":"\xED","%ED":"\xED","%ee":"\xEE","%Ee":"\xEE","%eE":"\xEE","%EE":"\xEE","%ef":"\xEF","%Ef":"\xEF","%eF":"\xEF","%EF":"\xEF","%f0":"\xF0","%F0":"\xF0","%f1":"\xF1","%F1":"\xF1","%f2":"\xF2","%F2":"\xF2","%f3":"\xF3","%F3":"\xF3","%f4":"\xF4","%F4":"\xF4","%f5":"\xF5","%F5":"\xF5","%f6":"\xF6","%F6":"\xF6","%f7":"\xF7","%F7":"\xF7","%f8":"\xF8","%F8":"\xF8","%f9":"\xF9","%F9":"\xF9","%fa":"\xFA","%Fa":"\xFA","%fA":"\xFA","%FA":"\xFA","%fb":"\xFB","%Fb":"\xFB","%fB":"\xFB","%FB":"\xFB","%fc":"\xFC","%Fc":"\xFC","%fC":"\xFC","%FC":"\xFC","%fd":"\xFD","%Fd":"\xFD","%fD":"\xFD","%FD":"\xFD","%fe":"\xFE","%Fe":"\xFE","%fE":"\xFE","%FE":"\xFE","%ff":"\xFF","%Ff":"\xFF","%fF":"\xFF","%FF":"\xFF"};function ZPe(e){return ran[e]}var HQ=0,eOe=1,xne=2,tOe=3;function san(e){let t=[],n=HQ,r="",s=!1,i=!1,o=0,a="",c=e.length;for(var l=0;l<c;++l){let d=e[l];if(d==="\\"&&s)if(i)i=!1;else{i=!0;continue}else if(d==='"')if(i)i=!1;else{s?(s=!1,n=HQ):s=!0;continue}else if(i&&s&&(a+="\\"),i=!1,(n===xne||n===tOe)&&d==="'"){n===xne?(n=tOe,r=a.substring(1)):n=eOe,a="";continue}else if(n===HQ&&(d==="*"||d==="=")&&t.length){n=d==="*"?xne:eOe,t[o]=[a,void 0],a="";continue}else if(!s&&d===";"){n=HQ,r?(a.length&&(a=MQ(a.replace(XPe,ZPe),"binary",r)),r=""):a.length&&(a=MQ(a,"binary","utf8")),t[o]===void 0?t[o]=a:t[o][1]=a,a="",++o;continue}else if(!s&&(d===" "||d===" "))continue;a+=d}return r&&a.length?a=MQ(a.replace(XPe,ZPe),"binary",r):a&&(a=MQ(a,"binar