UNPKG

scaffoldly

Version:

Toolchain and libraries for Scaffoldly

8 lines 36.7 MB
"use strict";var Tjr=Object.create;var VU=Object.defineProperty;var Pjr=Object.getOwnPropertyDescriptor;var Ojr=Object.getOwnPropertyNames;var kjr=Object.getPrototypeOf,Njr=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(e&&(t=e(e=0)),t);var x=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),na=(e,t)=>{for(var r in t)VU(e,r,{get:t[r],enumerable:!0})},gWe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ojr(t))!Njr.call(e,s)&&s!==r&&VU(e,s,{get:()=>t[s],enumerable:!(n=Pjr(t,s))||n.enumerable});return e};var gt=(e,t,r)=>(r=e!=null?Tjr(kjr(e)):{},gWe(t||!e||!e.__esModule?VU(r,"default",{value:e,enumerable:!0}):r,e)),Ys=e=>gWe(VU({},"__esModule",{value:!0}),e);var wWe=x((KZs,FWe)=>{"use strict";function yWe(e){return Array.isArray(e)?e:[e]}var jAe="",bWe=" ",QAe="\\",$jr=/^\s+$/,Vjr=/(?:[^\\]|^)\\$/,Wjr=/^\\!/,zjr=/^\\#/,Kjr=/\r?\n/g,Yjr=/^\.*\/|^\.+$/,UAe="/",DWe="node-ignore";typeof Symbol<"u"&&(DWe=Symbol.for("node-ignore"));var _We=DWe,Jjr=(e,t,r)=>Object.defineProperty(e,t,{value:r}),Xjr=/([0-z])-([0-z])/g,xWe=()=>!1,Zjr=e=>e.replace(Xjr,(t,r,n)=>r.charCodeAt(0)<=n.charCodeAt(0)?t:jAe),eHr=e=>{let{length:t}=e;return e.slice(0,t-t%2)},tHr=[[/^\uFEFF/,()=>jAe],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?bWe:jAe)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+bWe}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let n=r.replace(/\\\*/g,"[^\\/]*");return t+n}],[/\\\\\\(?=[$.|*+(){^])/g,()=>QAe],[/\\\\/g,()=>QAe],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,n,s)=>t===QAe?`\\[${r}${eHr(n)}${s}`:s==="]"&&n.length%2===0?`[${Zjr(r)}${n}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],vWe=Object.create(null),rHr=(e,t)=>{let r=vWe[e];return r||(r=tHr.reduce((n,[s,i])=>n.replace(s,i.bind(e)),e),vWe[e]=r),t?new RegExp(r,"i"):new RegExp(r)},GAe=e=>typeof e=="string",nHr=e=>e&&GAe(e)&&!$jr.test(e)&&!Vjr.test(e)&&e.indexOf("#")!==0,sHr=e=>e.split(Kjr),HAe=class{constructor(t,r,n,s){this.origin=t,this.pattern=r,this.negative=n,this.regex=s}},iHr=(e,t)=>{let r=e,n=!1;e.indexOf("!")===0&&(n=!0,e=e.substr(1)),e=e.replace(Wjr,"!").replace(zjr,"#");let s=rHr(e,t);return new HAe(r,e,n,s)},oHr=(e,t)=>{throw new t(e)},ag=(e,t,r)=>GAe(e)?e?ag.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),BWe=e=>Yjr.test(e);ag.isNotRelative=BWe;ag.convert=e=>e;var qAe=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:n=!1}={}){Jjr(this,_We,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[_We]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(nHr(t)){let r=iHr(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,yWe(GAe(t)?sHr(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let n=!1,s=!1;return this._rules.forEach(i=>{let{negative:o}=i;if(s===o&&n!==s||o&&!n&&!s&&!r)return;i.regex.test(t)&&(n=!o,s=o)}),{ignored:n,unignored:s}}_test(t,r,n,s){let i=t&&ag.convert(t);return ag(i,t,this._allowRelativePaths?xWe:oHr),this._t(i,r,n,s)}_t(t,r,n,s){if(t in r)return r[t];if(s||(s=t.split(UAe)),s.pop(),!s.length)return r[t]=this._testOne(t,n);let i=this._t(s.join(UAe)+UAe,r,n,s);return r[t]=i.ignored?i:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return yWe(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},KU=e=>new qAe(e),aHr=e=>ag(e&&ag.convert(e),e,xWe);KU.isPathValid=aHr;KU.default=KU;FWe.exports=KU;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");ag.convert=e;let t=/^[a-z]:\//i;ag.isNotRelative=r=>t.test(r)||BWe(r)}});var JU=x(Px=>{"use strict";Object.defineProperty(Px,"__esModule",{value:!0});Px.toCommandProperties=Px.toCommandValue=void 0;function cHr(e){return e==null?"":typeof e=="string"||e instanceof String?e:JSON.stringify(e)}Px.toCommandValue=cHr;function lHr(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}}Px.toCommandProperties=lHr});var OWe=x(Ym=>{"use strict";var dHr=Ym&&Ym.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),fHr=Ym&&Ym.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),hHr=Ym&&Ym.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&dHr(t,e,r);return fHr(t,e),t};Object.defineProperty(Ym,"__esModule",{value:!0});Ym.issue=Ym.issueCommand=void 0;var mHr=hHr(require("os")),TWe=JU();function PWe(e,t,r){let n=new WAe(e,t,r);process.stdout.write(n.toString()+mHr.EOL)}Ym.issueCommand=PWe;function AHr(e,t=""){PWe(e,{},t)}Ym.issue=AHr;var RWe="::",WAe=class{constructor(t,r,n){t||(t="missing.command"),this.command=t,this.properties=r,this.message=n}toString(){let t=RWe+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let s=this.properties[n];s&&(r?r=!1:t+=",",t+=`${n}=${EHr(s)}`)}}return t+=`${RWe}${pHr(this.message)}`,t}};function pHr(e){return TWe.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function EHr(e){return TWe.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});function WS(){return XU>ZU.length-16&&(kWe.default.randomFillSync(ZU),XU=0),ZU.slice(XU,XU+=16)}var kWe,ZU,XU,zAe=w(()=>{"use strict";kWe=gt(require("crypto")),ZU=new Uint8Array(256),XU=ZU.length});var NWe,LWe=w(()=>{"use strict";NWe=/^(?:[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 gHr(e){return typeof e=="string"&&NWe.test(e)}var w2,zS=w(()=>{"use strict";LWe();w2=gHr});function CHr(e,t=0){let r=(ll[e[t+0]]+ll[e[t+1]]+ll[e[t+2]]+ll[e[t+3]]+"-"+ll[e[t+4]]+ll[e[t+5]]+"-"+ll[e[t+6]]+ll[e[t+7]]+"-"+ll[e[t+8]]+ll[e[t+9]]+"-"+ll[e[t+10]]+ll[e[t+11]]+ll[e[t+12]]+ll[e[t+13]]+ll[e[t+14]]+ll[e[t+15]]).toLowerCase();if(!w2(r))throw TypeError("Stringified UUID is invalid");return r}var ll,S2,KS=w(()=>{"use strict";zS();ll=[];for(let e=0;e<256;++e)ll.push((e+256).toString(16).substr(1));S2=CHr});function yHr(e,t,r){let n=t&&r||0,s=t||new Array(16);e=e||{};let i=e.node||MWe,o=e.clockseq!==void 0?e.clockseq:KAe;if(i==null||o==null){let f=e.random||(e.rng||WS)();i==null&&(i=MWe=[f[0]|1,f[1],f[2],f[3],f[4],f[5]]),o==null&&(o=KAe=(f[6]<<8|f[7])&16383)}let a=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:JAe+1,c=a-YAe+(u-JAe)/1e4;if(c<0&&e.clockseq===void 0&&(o=o+1&16383),(c<0||a>YAe)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");YAe=a,JAe=u,KAe=o,a+=122192928e5;let l=((a&268435455)*1e4+u)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=l&255;let d=a/4294967296*1e4&268435455;s[n++]=d>>>8&255,s[n++]=d&255,s[n++]=d>>>24&15|16,s[n++]=d>>>16&255,s[n++]=o>>>8|128,s[n++]=o&255;for(let f=0;f<6;++f)s[n+f]=i[f];return t||S2(s)}var MWe,KAe,YAe,JAe,QWe,UWe=w(()=>{"use strict";zAe();KS();YAe=0,JAe=0;QWe=yHr});function bHr(e){if(!w2(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var ej,XAe=w(()=>{"use strict";zS();ej=bHr});function _Hr(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}function tj(e,t,r){function n(s,i,o,a){if(typeof s=="string"&&(s=_Hr(s)),typeof i=="string"&&(i=ej(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+s.length);if(u.set(i),u.set(s,i.length),u=r(u),u[6]=u[6]&15|t,u[8]=u[8]&63|128,o){a=a||0;for(let c=0;c<16;++c)o[a+c]=u[c];return o}return S2(u)}try{n.name=e}catch{}return n.DNS=vHr,n.URL=DHr,n}var vHr,DHr,ZAe=w(()=>{"use strict";KS();XAe();vHr="6ba7b810-9dad-11d1-80b4-00c04fd430c8",DHr="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});function xHr(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),jWe.default.createHash("md5").update(e).digest()}var jWe,HWe,qWe=w(()=>{"use strict";jWe=gt(require("crypto"));HWe=xHr});var BHr,GWe,$We=w(()=>{"use strict";ZAe();qWe();BHr=tj("v3",48,HWe),GWe=BHr});function FHr(e,t,r){e=e||{};let n=e.random||(e.rng||WS)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let s=0;s<16;++s)t[r+s]=n[s];return t}return S2(n)}var VWe,WWe=w(()=>{"use strict";zAe();KS();VWe=FHr});function wHr(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),zWe.default.createHash("sha1").update(e).digest()}var zWe,KWe,YWe=w(()=>{"use strict";zWe=gt(require("crypto"));KWe=wHr});var SHr,JWe,XWe=w(()=>{"use strict";ZAe();YWe();SHr=tj("v5",80,KWe),JWe=SHr});var ZWe,eze=w(()=>{"use strict";ZWe="00000000-0000-0000-0000-000000000000"});function IHr(e){if(!w2(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var tze,rze=w(()=>{"use strict";zS();tze=IHr});var nze={};na(nze,{NIL:()=>ZWe,parse:()=>ej,stringify:()=>S2,v1:()=>QWe,v3:()=>GWe,v4:()=>VWe,v5:()=>JWe,validate:()=>w2,version:()=>tze});var sze=w(()=>{"use strict";UWe();$We();WWe();XWe();eze();rze();zS();KS();XAe()});var uze=x(Jm=>{"use strict";var RHr=Jm&&Jm.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),THr=Jm&&Jm.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),oze=Jm&&Jm.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&RHr(t,e,r);return THr(t,e),t};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.prepareKeyValueMessage=Jm.issueFileCommand=void 0;var ize=oze(require("fs")),epe=oze(require("os")),PHr=(sze(),Ys(nze)),aze=JU();function OHr(e,t){let r=process.env[`GITHUB_${e}`];if(!r)throw new Error(`Unable to find environment variable for file command ${e}`);if(!ize.existsSync(r))throw new Error(`Missing file at path: ${r}`);ize.appendFileSync(r,`${aze.toCommandValue(t)}${epe.EOL}`,{encoding:"utf8"})}Jm.issueFileCommand=OHr;function kHr(e,t){let r=`ghadelimiter_${PHr.v4()}`,n=aze.toCommandValue(t);if(e.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${e}<<${r}${epe.EOL}${n}${epe.EOL}${r}`}Jm.prepareKeyValueMessage=kHr});var lze=x(Ox=>{"use strict";Object.defineProperty(Ox,"__esModule",{value:!0});Ox.checkBypass=Ox.getProxyUrl=void 0;function NHr(e){let t=e.protocol==="https:";if(cze(e))return;let r=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new URL(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new URL(`http://${r}`)}else return}Ox.getProxyUrl=NHr;function cze(e){if(!e.hostname)return!1;let t=e.hostname;if(LHr(t))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;e.port?n=Number(e.port):e.protocol==="http:"?n=80:e.protocol==="https:"&&(n=443);let s=[e.hostname.toUpperCase()];typeof n=="number"&&s.push(`${s[0]}:${n}`);for(let i of r.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}Ox.checkBypass=cze;function LHr(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 mze=x(kx=>{"use strict";var Qei=require("net"),MHr=require("tls"),tpe=require("http"),dze=require("https"),QHr=require("events"),Uei=require("assert"),UHr=require("util");kx.httpOverHttp=jHr;kx.httpsOverHttp=HHr;kx.httpOverHttps=qHr;kx.httpsOverHttps=GHr;function jHr(e){var t=new lg(e);return t.request=tpe.request,t}function HHr(e){var t=new lg(e);return t.request=tpe.request,t.createSocket=fze,t.defaultPort=443,t}function qHr(e){var t=new lg(e);return t.request=dze.request,t}function GHr(e){var t=new lg(e);return t.request=dze.request,t.createSocket=fze,t.defaultPort=443,t}function lg(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||tpe.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",function(n,s,i,o){for(var a=hze(s,i,o),u=0,c=t.requests.length;u<c;++u){var l=t.requests[u];if(l.host===a.host&&l.port===a.port){t.requests.splice(u,1),l.request.onSocket(n);return}}n.destroy(),t.removeSocket(n)})}UHr.inherits(lg,QHr.EventEmitter);lg.prototype.addRequest=function(t,r,n,s){var i=this,o=rpe({request:t},i.options,hze(r,n,s));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",u),a.on("close",c),a.on("agentRemove",c),t.onSocket(a);function u(){i.emit("free",a,o)}function c(l){i.removeSocket(a),a.removeListener("free",u),a.removeListener("close",c),a.removeListener("agentRemove",c)}})};lg.prototype.createSocket=function(t,r){var n=this,s={};n.sockets.push(s);var i=rpe({},n.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")),I2("making CONNECT request");var o=n.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",u),o.once("connect",c),o.once("error",l),o.end();function a(d){d.upgrade=!0}function u(d,f,h){process.nextTick(function(){c(d,f,h)})}function c(d,f,h){if(o.removeAllListeners(),f.removeAllListeners(),d.statusCode!==200){I2("tunneling socket could not be established, statusCode=%d",d.statusCode),f.destroy();var m=new Error("tunneling socket could not be established, statusCode="+d.statusCode);m.code="ECONNRESET",t.request.emit("error",m),n.removeSocket(s);return}if(h.length>0){I2("got illegal response body from proxy"),f.destroy();var m=new Error("got illegal response body from proxy");m.code="ECONNRESET",t.request.emit("error",m),n.removeSocket(s);return}return I2("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=f,r(f)}function l(d){o.removeAllListeners(),I2(`tunneling socket could not be established, cause=%s `,d.message,d.stack);var f=new Error("tunneling socket could not be established, cause="+d.message);f.code="ECONNRESET",t.request.emit("error",f),n.removeSocket(s)}};lg.prototype.removeSocket=function(t){var r=this.sockets.indexOf(t);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(s){n.request.onSocket(s)})}};function fze(e,t){var r=this;lg.prototype.createSocket.call(r,e,function(n){var s=e.request.getHeader("host"),i=rpe({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):e.host}),o=MHr.connect(0,i);r.sockets[r.sockets.indexOf(n)]=o,t(o)})}function hze(e,t,r){return typeof e=="string"?{host:e,port:t,localAddress:r}:e}function rpe(e){for(var t=1,r=arguments.length;t<r;++t){var n=arguments[t];if(typeof n=="object")for(var s=Object.keys(n),i=0,o=s.length;i<o;++i){var a=s[i];n[a]!==void 0&&(e[a]=n[a])}}return e}var I2;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?I2=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)}:I2=function(){};kx.debug=I2});var pze=x((Hei,Aze)=>{"use strict";Aze.exports=mze()});var fo=x((qei,Eze)=>{"use strict";Eze.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 Zi=x((Gei,gze)=>{"use strict";var pu=class extends Error{constructor(t){super(t),this.name="UndiciError",this.code="UND_ERR"}},npe=class e extends pu{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="ConnectTimeoutError",this.message=t||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},spe=class e extends pu{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="HeadersTimeoutError",this.message=t||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},ipe=class e extends pu{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="HeadersOverflowError",this.message=t||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},ope=class e extends pu{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="BodyTimeoutError",this.message=t||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},ape=class e extends pu{constructor(t,r,n,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=r,this.statusCode=r,this.headers=n}},upe=class e extends pu{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="InvalidArgumentError",this.message=t||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},cpe=class e extends pu{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"}},lpe=class e extends pu{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="AbortError",this.message=t||"Request aborted",this.code="UND_ERR_ABORTED"}},dpe=class e extends pu{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="InformationalError",this.message=t||"Request information",this.code="UND_ERR_INFO"}},fpe=class e extends pu{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"}},hpe=class e extends pu{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"}},mpe=class e extends pu{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="ClientDestroyedError",this.message=t||"The client is destroyed",this.code="UND_ERR_DESTROYED"}},Ape=class e extends pu{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="ClientClosedError",this.message=t||"The client is closed",this.code="UND_ERR_CLOSED"}},ppe=class e extends pu{constructor(t,r){super(t),Error.captureStackTrace(this,e),this.name="SocketError",this.message=t||"Socket error",this.code="UND_ERR_SOCKET",this.socket=r}},rj=class e extends pu{constructor(t){super(t),Error.captureStackTrace(this,e),this.name="NotSupportedError",this.message=t||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}},Epe=class extends pu{constructor(t){super(t),Error.captureStackTrace(this,rj),this.name="MissingUpstreamError",this.message=t||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}},gpe=class e extends Error{constructor(t,r,n){super(t),Error.captureStackTrace(this,e),this.name="HTTPParserError",this.code=r?`HPE_${r}`:void 0,this.data=n?n.toString():void 0}},Cpe=class e extends pu{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"}},ype=class e extends pu{constructor(t,r,{headers:n,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=r,this.data=s,this.headers=n}};gze.exports={HTTPParserError:gpe,UndiciError:pu,HeadersTimeoutError:spe,HeadersOverflowError:ipe,BodyTimeoutError:ope,RequestContentLengthMismatchError:fpe,ConnectTimeoutError:npe,ResponseStatusCodeError:ape,InvalidArgumentError:upe,InvalidReturnValueError:cpe,RequestAbortedError:lpe,ClientDestroyedError:mpe,ClientClosedError:Ape,InformationalError:dpe,SocketError:ppe,NotSupportedError:rj,ResponseContentLengthMismatchError:hpe,BalancedPoolMissingUpstreamError:Epe,ResponseExceededMaxSizeError:Cpe,RequestRetryError:ype}});var yze=x(($ei,Cze)=>{"use strict";var nj={},bpe=["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<bpe.length;++e){let t=bpe[e],r=t.toLowerCase();nj[t]=nj[r]=r}Object.setPrototypeOf(nj,null);Cze.exports={wellknownHeaderNames:bpe,headerNameLowerCasedRecord:nj}});var Cs=x((Vei,Rze)=>{"use strict";var Dze=require("assert"),{kDestroyed:xze,kBodyUsed:bze}=fo(),{IncomingMessage:$Hr}=require("http"),Nx=require("stream"),VHr=require("net"),{InvalidArgumentError:dl}=Zi(),{Blob:_ze}=require("buffer"),sj=require("util"),{stringify:WHr}=require("querystring"),{headerNameLowerCasedRecord:zHr}=yze(),[_pe,vze]=process.versions.node.split(".").map(e=>Number(e));function KHr(){}function vpe(e){return e&&typeof e=="object"&&typeof e.pipe=="function"&&typeof e.on=="function"}function Bze(e){return _ze&&e instanceof _ze||e&&typeof e=="object"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function YHr(e,t){if(e.includes("?")||e.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let r=WHr(t);return r&&(e+="?"+r),e}function Fze(e){if(typeof e=="string"){if(e=new URL(e),!/^https?:/.test(e.origin||e.protocol))throw new dl("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||typeof e!="object")throw new dl("Invalid URL: The URL argument must be a non-null object.");if(!/^https?:/.test(e.origin||e.protocol))throw new dl("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 dl("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 dl("Invalid URL path: the path must be a string or null/undefined.");if(e.pathname!=null&&typeof e.pathname!="string")throw new dl("Invalid URL pathname: the pathname must be a string or null/undefined.");if(e.hostname!=null&&typeof e.hostname!="string")throw new dl("Invalid URL hostname: the hostname must be a string or null/undefined.");if(e.origin!=null&&typeof e.origin!="string")throw new dl("Invalid URL origin: the origin must be a string or null/undefined.");let t=e.port!=null?e.port:e.protocol==="https:"?443:80,r=e.origin!=null?e.origin:`${e.protocol}//${e.hostname}:${t}`,n=e.path!=null?e.path:`${e.pathname||""}${e.search||""}`;r.endsWith("/")&&(r=r.substring(0,r.length-1)),n&&!n.startsWith("/")&&(n=`/${n}`),e=new URL(r+n)}return e}function JHr(e){if(e=Fze(e),e.pathname!=="/"||e.search||e.hash)throw new dl("invalid url");return e}function XHr(e){if(e[0]==="["){let r=e.indexOf("]");return Dze(r!==-1),e.substring(1,r)}let t=e.indexOf(":");return t===-1?e:e.substring(0,t)}function ZHr(e){if(!e)return null;Dze.strictEqual(typeof e,"string");let t=XHr(e);return VHr.isIP(t)?"":t}function eqr(e){return JSON.parse(JSON.stringify(e))}function tqr(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}function rqr(e){return e!=null&&(typeof e[Symbol.iterator]=="function"||typeof e[Symbol.asyncIterator]=="function")}function nqr(e){if(e==null)return 0;if(vpe(e)){let t=e._readableState;return t&&t.objectMode===!1&&t.ended===!0&&Number.isFinite(t.length)?t.length:null}else{if(Bze(e))return e.size!=null?e.size:null;if(Sze(e))return e.byteLength}return null}function Dpe(e){return!e||!!(e.destroyed||e[xze])}function wze(e){let t=e&&e._readableState;return Dpe(e)&&t&&!t.endEmitted}function sqr(e,t){e==null||!vpe(e)||Dpe(e)||(typeof e.destroy=="function"?(Object.getPrototypeOf(e).constructor===$Hr&&(e.socket=null),e.destroy(t)):t&&process.nextTick((r,n)=>{r.emit("error",n)},e,t),e.destroyed!==!0&&(e[xze]=!0))}var iqr=/timeout=(\d+)/;function oqr(e){let t=e.toString().match(iqr);return t?parseInt(t[1],10)*1e3:null}function aqr(e){return zHr[e]||e.toLowerCase()}function uqr(e,t={}){if(!Array.isArray(e))return e;for(let r=0;r<e.length;r+=2){let n=e[r].toString().toLowerCase(),s=t[n];s?(Array.isArray(s)||(s=[s],t[n]=s),s.push(e[r+1].toString("utf8"))):Array.isArray(e[r+1])?t[n]=e[r+1].map(i=>i.toString("utf8")):t[n]=e[r+1].toString("utf8")}return"content-length"in t&&"content-disposition"in t&&(t["content-disposition"]=Buffer.from(t["content-disposition"]).toString("latin1")),t}function cqr(e){let t=[],r=!1,n=-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),r=!0):i.length===19&&(i==="content-disposition"||i.toLowerCase()==="content-disposition")?n=t.push(i,o)-1:t.push(i,o)}return r&&n!==-1&&(t[n]=Buffer.from(t[n]).toString("latin1")),t}function Sze(e){return e instanceof Uint8Array||Buffer.isBuffer(e)}function lqr(e,t,r){if(!e||typeof e!="object")throw new dl("handler must be an object");if(typeof e.onConnect!="function")throw new dl("invalid onConnect method");if(typeof e.onError!="function")throw new dl("invalid onError method");if(typeof e.onBodySent!="function"&&e.onBodySent!==void 0)throw new dl("invalid onBodySent method");if(r||t==="CONNECT"){if(typeof e.onUpgrade!="function")throw new dl("invalid onUpgrade method")}else{if(typeof e.onHeaders!="function")throw new dl("invalid onHeaders method");if(typeof e.onData!="function")throw new dl("invalid onData method");if(typeof e.onComplete!="function")throw new dl("invalid onComplete method")}}function dqr(e){return!!(e&&(Nx.isDisturbed?Nx.isDisturbed(e)||e[bze]:e[bze]||e.readableDidRead||e._readableState&&e._readableState.dataEmitted||wze(e)))}function fqr(e){return!!(e&&(Nx.isErrored?Nx.isErrored(e):/state: 'errored'/.test(sj.inspect(e))))}function hqr(e){return!!(e&&(Nx.isReadable?Nx.isReadable(e):/state: 'readable'/.test(sj.inspect(e))))}function mqr(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*Aqr(e){for await(let t of e)yield Buffer.isBuffer(t)?t:Buffer.from(t)}var YS;function pqr(e){if(YS||(YS=require("stream/web").ReadableStream),YS.from)return YS.from(Aqr(e));let t;return new YS({async start(){t=e[Symbol.asyncIterator]()},async pull(r){let{done:n,value:s}=await t.next();if(n)queueMicrotask(()=>{r.close()});else{let i=Buffer.isBuffer(s)?s:Buffer.from(s);r.enqueue(new Uint8Array(i))}return r.desiredSize>0},async cancel(r){await t.return()}},0)}function Eqr(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 gqr(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 Cqr(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 yqr=!!String.prototype.toWellFormed;function bqr(e){return yqr?`${e}`.toWellFormed():sj.toUSVString?sj.toUSVString(e):`${e}`}function _qr(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 Ize=Object.create(null);Ize.enumerable=!0;Rze.exports={kEnumerableProperty:Ize,nop:KHr,isDisturbed:dqr,isErrored:fqr,isReadable:hqr,toUSVString:bqr,isReadableAborted:wze,isBlobLike:Bze,parseOrigin:JHr,parseURL:Fze,getServerName:ZHr,isStream:vpe,isIterable:rqr,isAsyncIterable:tqr,isDestroyed:Dpe,headerNameToString:aqr,parseRawHeaders:cqr,parseHeaders:uqr,parseKeepAliveTimeout:oqr,destroy:sqr,bodyLength:nqr,deepClone:eqr,ReadableStreamFrom:pqr,isBuffer:Sze,validateHandler:lqr,getSocketInfo:mqr,isFormDataLike:Eqr,buildURL:YHr,throwIfAborted:gqr,addAbortListener:Cqr,parseRangeHeader:_qr,nodeMajor:_pe,nodeMinor:vze,nodeHasAutoSelectFamily:_pe>18||_pe===18&&vze>=13,safeHTTPMethods:["GET","HEAD","OPTIONS","TRACE"]}});var Oze=x((Wei,Pze)=>{"use strict";var xpe=Date.now(),R2,T2=[];function vqr(){xpe=Date.now();let e=T2.length,t=0;for(;t<e;){let r=T2[t];r.state===0?r.state=xpe+r.delay:r.state>0&&xpe>=r.state&&(r.state=-1,r.callback(r.opaque)),r.state===-1?(r.state=-2,t!==e-1?T2[t]=T2.pop():T2.pop(),e-=1):t+=1}T2.length>0&&Tze()}function Tze(){R2&&R2.refresh?R2.refresh():(clearTimeout(R2),R2=setTimeout(vqr,1e3),R2.unref&&R2.unref())}var ij=class{constructor(t,r,n){this.callback=t,this.delay=r,this.opaque=n,this.state=-2,this.refresh()}refresh(){this.state===-2&&(T2.push(this),(!R2||T2.length===1)&&Tze()),this.state=0}clear(){this.state=-1}};Pze.exports={setTimeout(e,t,r){return t<1e3?setTimeout(e,t,r):new ij(e,t,r)},clearTimeout(e){e instanceof ij?e.clear():clearTimeout(e)}}});var Bpe=x((zei,kze)=>{"use strict";var Dqr=require("events").EventEmitter,xqr=require("util").inherits;function o5(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 r=0;r<t-1;++r)this._occ[e[r]]=t-1-r}xqr(o5,Dqr);o5.prototype.reset=function(){this._lookbehind_size=0,this.matches=0,this._bufpos=0};o5.prototype.push=function(e,t){Buffer.isBuffer(e)||(e=Buffer.from(e,"binary"));let r=e.length;this._bufpos=t||0;let n;for(;n!==r&&this.matches<this.maxMatches;)n=this._sbmh_feed(e);return n};o5.prototype._sbmh_feed=function(e){let t=e.length,r=this._needle,n=r.length,s=r[n-1],i=-this._lookbehind_size,o;if(i<0){for(;i<0&&i<=t-n;){if(o=this._sbmh_lookup_char(e,i+n-1),o===s&&this._sbmh_memcmp(e,i,n-1))return this._lookbehind_size=0,++this.matches,this.emit("info",!0),this._bufpos=i+n;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(r,i)!==-1)return i=e.indexOf(r,i),++this.matches,i>0?this.emit("info",!0,e,this._bufpos,i):this.emit("info",!0),this._bufpos=i+n;for(i=t-n;i<t&&(e[i]!==r[0]||Buffer.compare(e.subarray(i,i+t-i),r.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};o5.prototype._sbmh_lookup_char=function(e,t){return t<0?this._lookbehind[this._lookbehind_size+t]:e[t]};o5.prototype._sbmh_memcmp=function(e,t,r){for(var n=0;n<r;++n)if(this._sbmh_lookup_char(e,t+n)!==this._needle[n])return!1;return!0};kze.exports=o5});var Mze=x((Kei,Lze)=>{"use strict";var Bqr=require("util").inherits,Nze=require("stream").Readable;function Fpe(e){Nze.call(this,e)}Bqr(Fpe,Nze);Fpe.prototype._read=function(e){};Lze.exports=Fpe});var oj=x((Yei,Qze)=>{"use strict";Qze.exports=function(t,r,n){if(!t||t[r]===void 0||t[r]===null)return n;if(typeof t[r]!="number"||isNaN(t[r]))throw new TypeError("Limit "+r+" is not a valid number");return t[r]}});var qze=x((Jei,Hze)=>{"use strict";var jze=require("events").EventEmitter,Fqr=require("util").inherits,Uze=oj(),wqr=Bpe(),Sqr=Buffer.from(`\r \r `),Iqr=/\r\n/g,Rqr=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function Lx(e){jze.call(this),e=e||{};let t=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=Uze(e,"maxHeaderPairs",2e3),this.maxHeaderSize=Uze(e,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new wqr(Sqr),this.ss.on("info",function(r,n,s,i){n&&!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+=n.toString("binary",s,i)),r&&t._finish()})}Fqr(Lx,jze);Lx.prototype.push=function(e){let t=this.ss.push(e);if(this.finished)return t};Lx.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};Lx.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)};Lx.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let e=this.buffer.split(Iqr),t=e.length,r,n;for(var s=0;s<t;++s){if(e[s].length===0)continue;if((e[s][0]===" "||e[s][0]===" ")&&n){this.header[n][this.header[n].length-1]+=e[s];continue}let i=e[s].indexOf(":");if(i===-1||i===0)return;if(r=Rqr.exec(e[s]),n=r[1].toLowerCase(),this.header[n]=this.header[n]||[],this.header[n].push(r[2]||""),++this.npairs===this.maxHeaderPairs)break}};Hze.exports=Lx});var Spe=x((Xei,$ze)=>{"use strict";var wpe=require("stream").Writable,Tqr=require("util").inherits,Pqr=Bpe(),Gze=Mze(),Oqr=qze(),kqr=45,Nqr=Buffer.from("-"),Lqr=Buffer.from(`\r `),Mqr=function(){};function xp(e){if(!(this instanceof xp))return new xp(e);if(wpe.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 Oqr(e),this._hparser.on("header",function(r){t._inHeader=!1,t._part.emit("header",r)})}Tqr(xp,wpe);xp.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 r=t._isPreamble?"Preamble":"Part";t._part.emit("error",new Error(r+" 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 wpe.prototype.emit.apply(this,arguments)};xp.prototype._write=function(e,t,r){if(!this._hparser&&!this._bparser)return r();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new Gze(this._partOpts),this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._ignore());let n=this._hparser.push(e);if(!this._inHeader&&n!==void 0&&n<e.length)e=e.slice(n);else return r()}this._firstWrite&&(this._bparser.push(Lqr),this._firstWrite=!1),this._bparser.push(e),this._pause?this._cb=r:r()};xp.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};xp.prototype.setBoundary=function(e){let t=this;this._bparser=new Pqr(`\r --`+e),this._bparser.on("info",function(r,n,s,i){t._oninfo(r,n,s,i)})};xp.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",Mqr),this._part.resume())};xp.prototype._oninfo=function(e,t,r,n){let s,i=this,o=0,a,u=!0;if(!this._part&&this._justMatched&&t){for(;this._dashes<2&&r+o<n;)if(t[r+o]===kqr)++o,++this._dashes;else{this._dashes&&(s=Nqr),this._dashes=0;break}if(this._dashes===2&&(r+o<n&&this.listenerCount("trailer")!==0&&this.emit("trailer",t.slice(r+o,n)),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 Gze(this._partOpts),this._part._read=function(c){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&&r<n&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(s&&(u=this._part.push(s)),u=this._part.push(t.slice(r,n)),u||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(s&&this._hparser.push(s),a=this._hparser.push(t.slice(r,n)),!this._inHeader&&a!==void 0&&a<n&&this._oninfo(!1,t,r+a,n))),e&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:r!==n&&(++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)};xp.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let e=this._cb;this._cb=void 0,e()}};$ze.exports=xp});var aj=x((Ipe,zze)=>{"use strict";var Vze=new TextDecoder("utf-8"),Wze=new Map([["utf-8",Vze],["utf8",Vze]]);function Qqr(e){let t;for(;;)switch(e){case"utf-8":case"utf8":return JS.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 JS.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return JS.utf16le;case"base64":return JS.base64;default:if(t===void 0){t=!0,e=e.toLowerCase();continue}return JS.other.bind(e)}}var JS={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)),Wze.has(Ipe.toString()))try{return Wze.get(Ipe).decode(e)}catch{}return typeof e=="string"?e:e.toString()}};function Uqr(e,t,r){return e&&Qqr(r)(e,t)}zze.exports=Uqr});var Tpe=x((Zei,Zze)=>{"use strict";var uj=aj(),Kze=/%[a-fA-F0-9][a-fA-F0-9]/g,jqr={"%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 Yze(e){return jqr[e]}var cj=0,Jze=1,Rpe=2,Xze=3;function Hqr(e){let t=[],r=cj,n="",s=!1,i=!1,o=0,a="",u=e.length;for(var c=0;c<u;++c){let l=e[c];if(l==="\\"&&s)if(i)i=!1;else{i=!0;continue}else if(l==='"')if(i)i=!1;else{s?(s=!1,r=cj):s=!0;continue}else if(i&&s&&(a+="\\"),i=!1,(r===Rpe||r===Xze)&&l==="'"){r===Rpe?(r=Xze,n=a.substring(1)):r=Jze,a="";continue}else if(r===cj&&(l==="*"||l==="=")&&t.length){r=l==="*"?Rpe:Jze,t[o]=[a,void 0],a="";continue}else if(!s&&l===";"){r=cj,n?(a.length&&(a=uj(a.replace(Kze,Yze),"binary",n)),n=""):a.length&&(a=uj(a,"binary","utf8")),t[o]===void 0?t[o]=a:t[o][1]=a,a="",++o;continue}else if(!s&&(l===" "||l===" "))continue;a+=l}return n&&a.length?a=uj(a.replace(Kze,Yze),"binary",n):a&&(a=uj(a,"binar