shopify 3.94.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/run.js +5 -1
- package/dist/analytics-6IHHYAV6.js +1 -0
- package/dist/analytics-KKVP5DT3.js +1 -0
- package/dist/bootstrap.d.ts +5 -0
- package/dist/bootstrap.js +3 -0
- package/dist/chunk-22PCRFG4.js +1 -0
- package/dist/chunk-26D72ZNV.js +1 -0
- package/dist/chunk-2APPXD5Z.js +2 -0
- package/dist/chunk-2I4PRX2I.js +1 -0
- package/dist/chunk-2VQJQ36C.js +103 -0
- package/dist/chunk-323UTVMM.js +1 -0
- package/dist/chunk-3DQIVE24.js +9 -0
- package/dist/chunk-3F6NZK7S.js +2 -0
- package/dist/chunk-3LVGAQB4.js +1 -0
- package/dist/chunk-3TNEIDOD.js +1 -0
- package/dist/chunk-3VZEETAV.js +1 -0
- package/dist/chunk-4G7J6HIV.js +1 -0
- package/dist/chunk-4HHXSMD7.js +10 -0
- package/dist/chunk-4LNCYIS3.js +1 -0
- package/dist/chunk-4ZGSSQC6.js +1 -0
- package/dist/chunk-52GC6XUT.js +1 -0
- package/dist/chunk-5CH3B62S.js +2 -0
- package/dist/chunk-5Y7GIF2W.js +1 -0
- package/dist/chunk-66RJ5T7A.js +102 -0
- package/dist/chunk-6B53BWJW.js +1 -0
- package/dist/chunk-6BMMB2UO.js +1 -0
- package/dist/chunk-6HBRBQAN.js +6 -0
- package/dist/chunk-6M3ZYNGO.js +451 -0
- package/dist/chunk-6TZAAS5H.js +1 -0
- package/dist/chunk-72F3YBNA.js +1 -0
- package/dist/chunk-74HYYXXE.js +17 -0
- package/dist/chunk-75VPUOC5.js +1 -0
- package/dist/chunk-7BGM2GAH.js +1 -0
- package/dist/chunk-7UYZQN4V.js +18 -0
- package/dist/chunk-A74GETYC.js +1 -0
- package/dist/chunk-AIV5RI3X.js +1 -0
- package/dist/chunk-ALKTLKQ6.js +5 -0
- package/dist/chunk-B2EHO7ZC.js +847 -0
- package/dist/chunk-B2IVY4V5.js +1 -0
- package/dist/chunk-BDVAE5MS.js +28 -0
- package/dist/chunk-CERXUPGC.js +14 -0
- package/dist/chunk-D3TSJA5S.js +1 -0
- package/dist/chunk-D6JARNEH.js +1 -0
- package/dist/chunk-DFMQWJQ3.js +3 -0
- package/dist/chunk-DJONKJSZ.js +1 -0
- package/dist/chunk-DJQVNH7P.js +567 -0
- package/dist/chunk-DU4WR4OP.js +1 -0
- package/dist/chunk-ELVFJ7BR.js +4 -0
- package/dist/chunk-ELYP4KFP.js +8 -0
- package/dist/chunk-FFQ5EWII.js +294 -0
- package/dist/chunk-FUOIGXI4.js +1 -0
- package/dist/chunk-GD7FWXJ5.js +2 -0
- package/dist/chunk-GFEAKSGV.js +374 -0
- package/dist/chunk-GFJ7UV74.js +1 -0
- package/dist/chunk-GNPS5SBU.js +1 -0
- package/dist/chunk-GOJ2QHSR.js +1 -0
- package/dist/chunk-HSK7YMRE.js +359 -0
- package/dist/chunk-HUZUORYM.js +19 -0
- package/dist/chunk-HZA6IAA4.js +1 -0
- package/dist/chunk-IASVAERO.js +1 -0
- package/dist/chunk-IIIVWD4R.js +1 -0
- package/dist/chunk-INEU4XKS.js +6 -0
- package/dist/chunk-IOLVEXM6.js +1 -0
- package/dist/chunk-IU2ZQ6TE.js +2 -0
- package/dist/chunk-IX5ICOBV.js +7 -0
- package/dist/chunk-J3KVONB3.js +6 -0
- package/dist/chunk-JGXWQULI.js +1 -0
- package/dist/chunk-JHPRFW5B.js +19 -0
- package/dist/chunk-JLBH7RCF.js +4 -0
- package/dist/chunk-JPGO36XP.js +1 -0
- package/dist/chunk-JUVAGMIH.js +1 -0
- package/dist/chunk-JVIKCGDY.js +1 -0
- package/dist/chunk-K2WUCOQJ.js +32 -0
- package/dist/chunk-K5YV6UVF.js +4 -0
- package/dist/chunk-KBQ4LGFB.js +1 -0
- package/dist/chunk-KGXQS7LS.js +1 -0
- package/dist/chunk-KL5Z3T6L.js +1 -0
- package/dist/chunk-KLMDWDT2.js +1 -0
- package/dist/chunk-KNVM7N3U.js +1 -0
- package/dist/chunk-KWJ562F2.js +12 -0
- package/dist/chunk-LALIKZPS.js +5 -0
- package/dist/chunk-LAZJ47DZ.js +6 -0
- package/dist/chunk-LDGAHMS7.js +159 -0
- package/dist/chunk-LNHLDRC5.js +1 -0
- package/dist/chunk-LW7U753G.js +1 -0
- package/dist/chunk-LX3ZOW52.js +12 -0
- package/dist/chunk-LXFJDCNG.js +1 -0
- package/dist/chunk-MBAFWQSZ.js +7 -0
- package/dist/chunk-MOA33ZFO.js +1 -0
- package/dist/chunk-MQNYGGAM.js +1 -0
- package/dist/chunk-N5YIPQ6J.js +1 -0
- package/dist/chunk-N7RBSKYT.js +1 -0
- package/dist/chunk-NF2ABOOU.js +1 -0
- package/dist/chunk-NRAFVIU3.js +1 -0
- package/dist/chunk-OCOY5MV2.js +1 -0
- package/dist/chunk-ODNGDO4H.js +50 -0
- package/dist/chunk-OHY4ZL3U.js +2 -0
- package/dist/chunk-OLZHWPZP.js +1 -0
- package/dist/chunk-OUOYKNMY.js +1 -0
- package/dist/chunk-OXPWCC7I.js +64 -0
- package/dist/chunk-P5VVOLGV.js +1 -0
- package/dist/chunk-P6XE4MH5.js +1 -0
- package/dist/chunk-P7R7FBY2.js +3 -0
- package/dist/chunk-PD5ZHJWI.js +1 -0
- package/dist/chunk-PIBY5DDZ.js +1 -0
- package/dist/chunk-Q7ING5F5.js +1 -0
- package/dist/chunk-QFWIDATO.js +1 -0
- package/dist/chunk-QRRNOVJ3.js +1 -0
- package/dist/chunk-QSTEVZFQ.js +1 -0
- package/dist/chunk-R466TU3N.js +2 -0
- package/dist/chunk-RF2DPBA6.js +1 -0
- package/dist/chunk-RFG5RMPL.js +1 -0
- package/dist/chunk-RM5SJJN6.js +559 -0
- package/dist/chunk-RVNMVBPM.js +1 -0
- package/dist/chunk-SBEZBZM7.js +144 -0
- package/dist/chunk-SGQ6D3LU.js +15 -0
- package/dist/chunk-SRCQVUMC.js +1 -0
- package/dist/chunk-TFSBQ4RY.js +5 -0
- package/dist/chunk-TQYMC7TH.js +1 -0
- package/dist/chunk-UGDBJTLP.js +6 -0
- package/dist/chunk-UGXYQ23Y.js +1411 -0
- package/dist/chunk-UWJ73J4B.js +1 -0
- package/dist/chunk-V2CNCPIE.js +2 -0
- package/dist/chunk-VBUZWRUL.js +1 -0
- package/dist/chunk-VS3T5YOG.js +264 -0
- package/dist/chunk-VWYM4OWK.js +1 -0
- package/dist/chunk-VY6SNDKW.js +3 -0
- package/dist/chunk-WDC3KIZT.js +2 -0
- package/dist/chunk-WFXRSKRK.js +1 -0
- package/dist/chunk-WXVZJJOR.js +16 -0
- package/dist/chunk-WZBSLU4Q.js +6 -0
- package/dist/chunk-XBXMPFXM.js +1 -0
- package/dist/chunk-XEFQQPL4.js +1 -0
- package/dist/chunk-XLELNRFF.js +3 -0
- package/dist/chunk-XNO6DZYP.js +1 -0
- package/dist/chunk-Y5JKV2AI.js +1 -0
- package/dist/chunk-YC6G4MHD.js +3 -0
- package/dist/chunk-YI232QLS.js +1 -0
- package/dist/chunk-YMWHHINU.js +1 -0
- package/dist/chunk-YOZNRLFC.js +1 -0
- package/dist/chunk-YZDDTYTU.js +11 -0
- package/dist/chunk-Z35BTAM6.js +2 -0
- package/dist/chunk-ZR76GGZ6.js +5 -0
- package/dist/chunk-ZTMSBSYD.js +1 -0
- package/dist/chunk-ZV6NCNI4.js +586 -0
- package/dist/chunk-ZVJVDCIM.js +1 -0
- package/dist/cli/commands/app/app-logs/sources.js +2 -0
- package/dist/cli/commands/app/build.js +1 -0
- package/dist/cli/commands/app/bulk/cancel.js +1 -0
- package/dist/cli/commands/app/bulk/execute.js +9 -0
- package/dist/cli/commands/app/bulk/status.js +5 -0
- package/dist/cli/commands/app/config/link.js +4 -0
- package/dist/cli/commands/app/config/pull.js +1 -0
- package/dist/cli/commands/app/config/use.js +1 -0
- package/dist/cli/commands/app/config/validate.js +3 -0
- package/dist/cli/commands/app/demo/watcher.js +1 -0
- package/dist/cli/commands/app/deploy.js +22 -0
- package/dist/cli/commands/app/dev/clean.js +5 -0
- package/dist/cli/commands/app/dev.js +320 -0
- package/dist/cli/commands/app/env/pull.js +11 -0
- package/dist/cli/commands/app/env/show.js +1 -0
- package/dist/cli/commands/app/execute.js +1 -0
- package/dist/cli/commands/app/function/build.js +1 -0
- package/dist/cli/commands/app/function/info.js +16 -0
- package/dist/cli/commands/app/function/replay.js +5 -0
- package/dist/cli/commands/app/function/run.js +1 -0
- package/dist/cli/commands/app/function/schema.js +1 -0
- package/dist/cli/commands/app/function/typegen.js +1 -0
- package/dist/cli/commands/app/generate/extension.js +5 -0
- package/dist/cli/commands/app/import-custom-data-definitions.js +4 -0
- package/dist/cli/commands/app/import-extensions.js +1 -0
- package/dist/cli/commands/app/info.js +11 -0
- package/dist/cli/commands/app/init.js +10 -0
- package/dist/cli/commands/app/logs.js +2 -0
- package/dist/cli/commands/app/release.js +4 -0
- package/dist/cli/commands/app/versions/list.js +1 -0
- package/dist/cli/commands/app/webhook/trigger.js +25 -0
- package/dist/cli/commands/auth/login.js +1 -20
- package/dist/cli/commands/auth/logout.js +1 -12
- package/dist/cli/commands/cache/clear.js +1 -11
- package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -1
- package/dist/cli/commands/config/autoupgrade/constants.js +1 -6
- package/dist/cli/commands/config/autoupgrade/off.js +1 -22
- package/dist/cli/commands/config/autoupgrade/on.js +1 -22
- package/dist/cli/commands/config/autoupgrade/status.js +1 -30
- package/dist/cli/commands/debug/command-flags.js +1 -79
- package/dist/cli/commands/docs/generate.js +1 -157
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -25
- package/dist/cli/commands/doctor-release/theme/index.js +1 -56
- package/dist/cli/commands/help.js +1 -26
- package/dist/cli/commands/kitchen-sink/async.js +1 -16
- package/dist/cli/commands/kitchen-sink/index.js +1 -21
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -16
- package/dist/cli/commands/kitchen-sink/static.js +1 -16
- package/dist/cli/commands/notifications/generate.js +1 -11
- package/dist/cli/commands/notifications/list.js +1 -33
- package/dist/cli/commands/organization/list.js +1 -0
- package/dist/cli/commands/search.js +1 -27
- package/dist/cli/commands/theme/check.js +1 -0
- package/dist/cli/commands/theme/console.js +15 -0
- package/dist/cli/commands/theme/delete.js +7 -0
- package/dist/cli/commands/theme/dev.js +26 -0
- package/dist/cli/commands/theme/duplicate.js +32 -0
- package/dist/cli/commands/theme/info.js +1 -0
- package/dist/cli/commands/theme/init.js +8 -0
- package/dist/cli/commands/theme/language-server.js +1 -0
- package/dist/cli/commands/theme/list.js +1 -0
- package/dist/cli/commands/theme/metafields/pull.js +3 -0
- package/dist/cli/commands/theme/open.js +8 -0
- package/dist/cli/commands/theme/package.js +7 -0
- package/dist/cli/commands/theme/preview.js +1 -0
- package/dist/cli/commands/theme/profile.js +3 -0
- package/dist/cli/commands/theme/publish.js +7 -0
- package/dist/cli/commands/theme/pull.js +3 -0
- package/dist/cli/commands/theme/push.js +28 -0
- package/dist/cli/commands/theme/rename.js +6 -0
- package/dist/cli/commands/theme/share.js +3 -0
- package/dist/cli/commands/upgrade.js +1 -17
- package/dist/cli/commands/version.js +1 -10
- package/dist/command-registry.d.ts +8 -0
- package/dist/command-registry.js +1 -0
- package/dist/conf-store-U5ZITKJN.js +1 -0
- package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
- package/dist/deprecations-TU5UQJVV.js +1 -0
- package/dist/dist-2Z5TND4U.js +1 -0
- package/dist/dist-GYHFDHKP.js +1 -0
- package/dist/environments-Z5PR7DSI.js +1 -0
- package/dist/error-IJGNYKZ3.js +1 -0
- package/dist/error-handler-WSCGNS2P.js +1 -0
- package/dist/fs-5BDEA2KD.js +1 -0
- package/dist/hooks/app-init.d.ts +9 -0
- package/dist/hooks/app-init.js +1 -0
- package/dist/hooks/did-you-mean.d.ts +1 -0
- package/dist/hooks/did-you-mean.js +1 -0
- package/dist/hooks/hydrogen-init.d.ts +7 -0
- package/dist/hooks/hydrogen-init.js +1 -0
- package/dist/hooks/plugin-plugins.d.ts +1 -0
- package/dist/hooks/plugin-plugins.js +1 -0
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.d.ts +1 -0
- package/dist/hooks/public-metadata.js +1 -0
- package/dist/hooks/sensitive-metadata.d.ts +1 -0
- package/dist/hooks/sensitive-metadata.js +1 -0
- package/dist/hooks/tunnel-provider.d.ts +1 -0
- package/dist/hooks/tunnel-provider.js +1 -0
- package/dist/hooks/tunnel-start.d.ts +1 -0
- package/dist/hooks/tunnel-start.js +1 -0
- package/dist/http-proxy-node16-Q5DZMBHC.js +38 -0
- package/dist/index.js +254 -3668
- package/dist/is-global-V4ZRHQG2.js +1 -0
- package/dist/latest-version-EFWBOTWM.js +49 -0
- package/dist/lib-5L7UKDEK.js +1 -0
- package/dist/lib-C3VO2BQW.js +1 -0
- package/dist/lib-QB6I6CTC.js +1 -0
- package/dist/local-6QPX4GCJ.js +1 -0
- package/dist/local-storage-JLXBZVWO.js +1 -0
- package/dist/metadata-UDMOTRS7.js +1 -0
- package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
- package/dist/node-package-manager-HAFRYGUM.js +1 -0
- package/dist/notifications-system-MP7WDOCS.js +1 -0
- package/dist/npa-ICFSA3NL.js +1 -0
- package/dist/output-YGMHXEIS.js +1 -0
- package/dist/{path-HUAU3YBW.js → path-CWUNINMX.js} +1 -1
- package/dist/{prettier-PGDJ5B7I.js → prettier-NVRHEAFO.js} +1 -1
- package/dist/system-KLXD4FXF.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-K5CWIA4V.js +1 -0
- package/dist/ui-GHG3UGB3.js +1 -0
- package/dist/upgrade-OPZGPM5J.js +1 -0
- package/dist/version-D5PJZIRW.js +1 -0
- package/dist/version-KRQBMYCH.js +1 -0
- package/dist/workerd-L2EJKIAQ.js +18 -0
- package/oclif.manifest.json +5247 -6056
- package/package.json +17 -41
- package/dist/chunk-45T5XUIM.js +0 -1
- package/dist/chunk-52KHWFYF.js +0 -1
- package/dist/chunk-66TIGB4U.js +0 -415
- package/dist/chunk-675GKVCB.js +0 -3
- package/dist/chunk-7ES6PV7M.js +0 -847
- package/dist/chunk-BF7JM4FH.js +0 -396
- package/dist/chunk-FU2Y2M3M.js +0 -5
- package/dist/chunk-IDQ4X47Z.js +0 -3
- package/dist/chunk-JBSYWYIP.js +0 -2
- package/dist/chunk-PBKIXB7L.js +0 -63
- package/dist/chunk-SVA22NZQ.js +0 -607
- package/dist/error-handler-LC7FITE7.js +0 -1
- package/dist/http-proxy-node16-TTURN6MD.js +0 -38
- package/dist/lib-3WHF5XD3.js +0 -1
- package/dist/local-TWIGLQ7X.js +0 -1
- package/dist/node-package-manager-3UCLJPGW.js +0 -1
- package/dist/npa-OKDXXRCU.js +0 -1
- package/dist/ui-UYE67X4Y.js +0 -1
- package/dist/workerd-37BZZEVW.js +0 -18
- /package/dist/{chunk-KADPE3PY.js → chunk-7MUKLZOL.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ab as b,Bb as c,Cb as d,Db as e,zb as a}from"./chunk-GFEAKSGV.js";import"./chunk-CERXUPGC.js";import"./chunk-T4M5CWAO.js";import"./chunk-PRVQAHWI.js";import"./chunk-YC6G4MHD.js";import"./chunk-N7RBSKYT.js";import"./chunk-IU2ZQ6TE.js";import"./chunk-PIBY5DDZ.js";import"./chunk-VPRTJUIN.js";export{a as currentProcessIsGlobal,e as getProjectDir,d as inferPackageManagerForGlobalCLI,c as installGlobalCLIPrompt,b as installGlobalShopifyCLI};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import{a as cn}from"./chunk-KLMDWDT2.js";import{a as Oo}from"./chunk-FUOIGXI4.js";import{a as R,c as C,e as ee,g as f}from"./chunk-VPRTJUIN.js";var fn=C((Jt,Kt)=>{"use strict";f();Object.defineProperty(Jt,"__esModule",{value:!0});function Do(t){return t.encrypted}var Gt=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let n=typeof r.connect=="function",s=typeof r.secureConnect=="function",i=typeof r.close=="function",o=()=>{n&&r.connect(),Do(t)&&s&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),i&&t.once("close",r.close)};t.writable&&!t.connecting?o():t.connecting?t.once("connect",o):t.destroyed&&i&&r.close(t._hadError)};Jt.default=Gt;Kt.exports=Gt;Kt.exports.default=Gt});var yn=C((il,mn)=>{"use strict";f();var Jo=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),Ko=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),Yo=new Set([500,502,503,504]),Qo={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},Xo={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function te(t){let e=parseInt(t,10);return isFinite(e)?e:0}function Zo(t){return t?Yo.has(t.status):!0}function Xt(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let n of r){let[s,i]=n.split(/=/,2);e[s.trim()]=i===void 0?!0:i.trim().replace(/^"|"$/g,"")}return e}function ea(t){let e=[];for(let r in t){let n=t[r];e.push(n===!0?r:r+"="+n)}if(e.length)return e.join(", ")}mn.exports=class{constructor(e,r,{shared:n,cacheHeuristic:s,immutableMinTimeToLive:i,ignoreCargoCult:o,_fromObject:a}={}){if(a){this._fromObject(a);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=n!==!1,this._ignoreCargoCult=!!o,this._cacheHeuristic=s!==void 0?s:.1,this._immutableMinTtl=i!==void 0?i:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=Xt(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=Xt(e.headers["cache-control"]),this._ignoreCargoCult&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":ea(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&Ko.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||Jo.has(this._status)))}_hasExplicitExpiration(){return!!(this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires)}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){return!this.evaluateRequest(e).revalidation}_evaluateRequestHitResult(e){return{response:{headers:this.responseHeaders()},revalidation:e}}_evaluateRequestRevalidation(e,r){return{synchronous:r,headers:this.revalidationHeaders(e)}}_evaluateRequestMissResult(e){return{response:void 0,revalidation:this._evaluateRequestRevalidation(e,!0)}}evaluateRequest(e){if(this._assertRequestHasHeaders(e),this._rescc["must-revalidate"])return this._evaluateRequestMissResult(e);if(!this._requestMatches(e,!1))return this._evaluateRequestMissResult(e);let r=Xt(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)?this._evaluateRequestMissResult(e):r["max-age"]&&this.age()>te(r["max-age"])?this._evaluateRequestMissResult(e):r["min-fresh"]&&this.maxAge()-this.age()<te(r["min-fresh"])?this._evaluateRequestMissResult(e):this.stale()?"max-stale"in r&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge())?this._evaluateRequestHitResult(void 0):this.useStaleWhileRevalidate()?this._evaluateRequestHitResult(this._evaluateRequestRevalidation(e,!1)):this._evaluateRequestMissResult(e):this._evaluateRequestHitResult(void 0)}_requestMatches(e,r){return!!((!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e))}_allowsStoringAuthenticated(){return!!(this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"])}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let n of r)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let n in e)Qo[n]||(r[n]=e[n]);if(e.connection){let n=e.connection.trim().split(/\s*,\s*/);for(let s of n)delete r[s]}if(r.warning){let n=r.warning.split(/,/).filter(s=>!/^\s*1[0-9][0-9]/.test(s));n.length?r.warning=n.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return te(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return te(this._rescc["s-maxage"])}if(this._rescc["max-age"])return te(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<r?0:Math.max(e,(n-r)/1e3)}if(this._resHeaders["last-modified"]){let n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&r>n)return Math.max(e,(r-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+te(this._rescc["stale-if-error"]),n=e+te(this._rescc["stale-while-revalidate"]);return Math.round(Math.max(0,e,r,n)*1e3)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+te(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){let e=te(this._rescc["stale-while-revalidate"]);return e>0&&this.maxAge()+e>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._ignoreCargoCult=!!e.icc,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,icc:this._ignoreCargoCult,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let s=r["if-none-match"].split(/,/).filter(i=>!/^\s*W\//.test(i));s.length?r["if-none-match"]=s.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&Zo(r))return{policy:this,modified:!1,matches:!0};if(!r||!r.headers)throw Error("Response headers missing");let n=!1;r.status!==void 0&&r.status!=304?n=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?n=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(n=!0);let s={shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,ignoreCargoCult:this._ignoreCargoCult};if(!n)return{policy:new this.constructor(e,r,s),modified:r.status!=304,matches:!1};let i={};for(let a in this._resHeaders)i[a]=a in r.headers&&!Xo[a]?r.headers[a]:this._resHeaders[a];let o=Object.assign({},r,{status:this._status,method:this._method,headers:i});return{policy:new this.constructor(e,o,s),modified:!1,matches:!0}}}});var gn=C(Zt=>{f();Zt.stringify=function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",n=Array.isArray(e);r=n?"[":"{";var s=!0;for(var i in e){var o=typeof e[i]=="function"||!n&&typeof e[i]>"u";Object.hasOwnProperty.call(e,i)&&!o&&(s||(r+=","),s=!1,n?e[i]==null?r+="null":r+=t(e[i]):e[i]!==void 0&&(r+=t(i)+":"+t(e[i])))}return r+=n?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)};Zt.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var En=C((ml,wn)=>{"use strict";f();var ra=R("events"),bn=gn(),na=t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(R(e[r]))(t)}return new Map},_n=["sqlite","postgres","mysql","mongo","redis","tiered"],er=class extends ra{constructor(e,{emitErrors:r=!0,...n}={}){if(super(),this.opts={namespace:"keyv",serialize:bn.stringify,deserialize:bn.parse,...typeof e=="string"?{uri:e}:e,...n},!this.opts.store){let i={...this.opts};this.opts.store=na(i)}if(this.opts.compression){let i=this.opts.compression;this.opts.serialize=i.serialize.bind(i),this.opts.deserialize=i.deserialize.bind(i)}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",i=>this.emit("error",i)),this.opts.store.namespace=this.opts.namespace;let s=i=>async function*(){for await(let[o,a]of typeof i=="function"?i(this.opts.store.namespace):i){let u=await this.opts.deserialize(a);if(!(this.opts.store.namespace&&!o.includes(this.opts.store.namespace))){if(typeof u.expires=="number"&&Date.now()>u.expires){this.delete(o);continue}yield[this._getKeyUnprefix(o),u.value]}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=s(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=s(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return _n.includes(this.opts.store.opts.dialect)||_n.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:n}=this.opts,s=Array.isArray(e),i=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&n.getMany===void 0){let o=[];for(let a of i)o.push(Promise.resolve().then(()=>n.get(a)).then(u=>typeof u=="string"?this.opts.deserialize(u):this.opts.compression?this.opts.deserialize(u):u).then(u=>{if(u!=null)return typeof u.expires=="number"&&Date.now()>u.expires?this.delete(a).then(()=>{}):r&&r.raw?u:u.value}));return Promise.allSettled(o).then(a=>{let u=[];for(let l of a)u.push(l.value);return u})}return Promise.resolve().then(()=>s?n.getMany(i):n.get(i)).then(o=>typeof o=="string"?this.opts.deserialize(o):this.opts.compression?this.opts.deserialize(o):o).then(o=>{if(o!=null)return s?o.map((a,u)=>{if(typeof a=="string"&&(a=this.opts.deserialize(a)),a!=null){if(typeof a.expires=="number"&&Date.now()>a.expires){this.delete(e[u]).then(()=>{});return}return r&&r.raw?a:a.value}}):typeof o.expires=="number"&&Date.now()>o.expires?this.delete(e).then(()=>{}):r&&r.raw?o:o.value})}set(e,r,n){let s=this._getKeyPrefix(e);typeof n>"u"&&(n=this.opts.ttl),n===0&&(n=void 0);let{store:i}=this.opts;return Promise.resolve().then(()=>{let o=typeof n=="number"?Date.now()+n:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:o},this.opts.serialize(r)}).then(o=>i.set(s,o,n)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let s=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let i=[];for(let o of s)i.push(r.delete(o));return Promise.allSettled(i).then(o=>o.every(a=>a.value===!0))}return Promise.resolve().then(()=>r.deleteMany(s))}let n=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(n))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(async()=>typeof n.has=="function"?n.has(r):await n.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};wn.exports=er});var Rn=C((ql,On)=>{"use strict";f();var fa=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];On.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(fa)),n={};for(let s of r)s in e||(n[s]={get(){let i=t[s];return typeof i=="function"?i.bind(t):i},set(i){t[s]=i},enumerable:!0,configurable:!1});return Object.defineProperties(e,n),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var Pn=C((Ll,Cn)=>{"use strict";f();var{Transform:da,PassThrough:pa}=R("stream"),sr=R("zlib"),ma=Rn();Cn.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof sr.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let n=!0,s=new da({transform(a,u,l){n=!1,l(null,a)},flush(a){a()}}),i=new pa({autoDestroy:!1,destroy(a,u){t.destroy(),u(a)}}),o=r?sr.createBrotliDecompress():sr.createUnzip();return o.once("error",a=>{if(n&&!t.readable){i.end();return}i.destroy(a)}),ma(t,i),t.pipe(s).pipe(o).pipe(i),i}});var yr=C((Mf,zn)=>{"use strict";f();var mr=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[n,s]of this.oldCache.entries())this.onEviction(n,s);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};zn.exports=mr});var gr=C((Vf,Mn)=>{"use strict";f();Mn.exports=t=>{if(t.listenerCount("error")!==0)return t;t.__destroy=t._destroy,t._destroy=(...r)=>{let n=r.pop();t.__destroy(...r,async s=>{await Promise.resolve(),n(s)})};let e=r=>{Promise.resolve().then(()=>{t.emit("error",r)})};return t.once("error",e),Promise.resolve().then(()=>{t.off("error",e)}),t}});var le=C((Jf,Yn)=>{"use strict";f();var{URL:Wn}=R("url"),Ia=R("events"),Ha=R("tls"),Fa=R("http2"),Da=yr(),$a=gr(),K=Symbol("currentStreamCount"),Vn=Symbol("request"),Y=Symbol("cachedOriginSet"),ce=Symbol("gracefullyClosing"),xt=Symbol("length"),Gn=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],Ba=(t,e,r)=>{let n=0,s=t.length;for(;n<s;){let i=n+s>>>1;r(t[i],e)?n=i+1:s=i}return n},Ua=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,br=(t,e)=>{for(let r=0;r<t.length;r++){let n=t[r];n[Y].length>0&&n[Y].length<e[Y].length&&n[Y].every(s=>e[Y].includes(s))&&n[K]+e[K]<=e.remoteSettings.maxConcurrentStreams&&Kn(n)}},Jn=(t,e)=>{for(let r=0;r<t.length;r++){let n=t[r];if(e[Y].length>0&&e[Y].length<n[Y].length&&e[Y].every(s=>n[Y].includes(s))&&e[K]+n[K]<=n.remoteSettings.maxConcurrentStreams)return Kn(e),!0}return!1},Kn=t=>{t[ce]=!0,t[K]===0&&t.close()},Pe=class t extends Ia{constructor({timeout:e=0,maxSessions:r=Number.POSITIVE_INFINITY,maxEmptySessions:n=10,maxCachedTlsSessions:s=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxEmptySessions=n,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:1024*1024*32},this.tlsSessionCache=new Da({maxSize:s})}get protocol(){return"https:"}normalizeOptions(e){let r="";for(let n=0;n<Gn.length;n++){let s=Gn[n];r+=":",e&&e[s]!==void 0&&(r+=e[s])}return r}_processQueue(){if(this._sessionCount>=this.maxSessions){this.closeEmptySessions(this.maxSessions-this._sessionCount+1);return}for(let e in this.queue)for(let r in this.queue[e]){let n=this.queue[e][r];n.completed||(n.completed=!0,n())}}_isBetterSession(e,r){return e>r}_accept(e,r,n,s){let i=0;for(;i<r.length&&e[K]<e.remoteSettings.maxConcurrentStreams;)r[i].resolve(e),i++;r.splice(0,i),r.length>0&&(this.getSession(n,s,r),r.length=0)}getSession(e,r,n){return new Promise((s,i)=>{Array.isArray(n)&&n.length>0?(n=[...n],s()):n=[{resolve:s,reject:i}];try{if(typeof e=="string")e=new Wn(e);else if(!(e instanceof Wn))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(r){let{servername:d}=r,{hostname:g}=e;if(d&&g!==d)throw new Error(`Origin ${g} differs from servername ${d}`)}}catch(d){for(let g=0;g<n.length;g++)n[g].reject(d);return}let o=this.normalizeOptions(r),a=e.origin;if(o in this.sessions){let d=this.sessions[o],g=-1,m=-1,y;for(let b=0;b<d.length;b++){let p=d[b],v=p.remoteSettings.maxConcurrentStreams;if(v<g)break;if(!p[Y].includes(a))continue;let w=p[K];w>=v||p[ce]||p.destroyed||(y||(g=v),this._isBetterSession(w,m)&&(y=p,m=w))}if(y){this._accept(y,n,a,r);return}}if(o in this.queue){if(a in this.queue[o]){this.queue[o][a].listeners.push(...n);return}}else this.queue[o]={[xt]:0};let u=()=>{o in this.queue&&this.queue[o][a]===l&&(delete this.queue[o][a],--this.queue[o][xt]===0&&delete this.queue[o])},l=async()=>{this._sessionCount++;let d=`${a}:${o}`,g=!1,m;try{let y={...r};y.settings===void 0&&(y.settings=this.settings),y.session===void 0&&(y.session=this.tlsSessionCache.get(d)),m=await(y.createConnection||this.createConnection).call(this,e,y),y.createConnection=()=>m;let p=Fa.connect(e,y);p[K]=0,p[ce]=!1;let v=()=>{let{socket:S}=p,x;return S.servername===!1?(S.servername=S.remoteAddress,x=p.originSet,S.servername=!1):x=p.originSet,x},w=()=>p[K]<p.remoteSettings.maxConcurrentStreams;p.socket.once("session",S=>{this.tlsSessionCache.set(d,S)}),p.once("error",S=>{for(let x=0;x<n.length;x++)n[x].reject(S);this.tlsSessionCache.delete(d)}),p.setTimeout(this.timeout,()=>{p.destroy()}),p.once("close",()=>{if(this._sessionCount--,g){this._emptySessionCount--;let S=this.sessions[o];S.length===1?delete this.sessions[o]:S.splice(S.indexOf(p),1)}else{u();let S=new Error("Session closed without receiving a SETTINGS frame");S.code="HTTP2WRAPPER_NOSETTINGS";for(let x=0;x<n.length;x++)n[x].reject(S)}this._processQueue()});let P=()=>{let S=this.queue[o];if(!S)return;let x=p[Y];for(let T=0;T<x.length;T++){let N=x[T];if(N in S){let{listeners:A,completed:Z}=S[N],O=0;for(;O<A.length&&w();)A[O].resolve(p),O++;if(S[N].listeners.splice(0,O),S[N].listeners.length===0&&!Z&&(delete S[N],--S[xt]===0)){delete this.queue[o];break}if(!w())break}}};p.on("origin",()=>{p[Y]=v()||[],p[ce]=!1,Jn(this.sessions[o],p),!(p[ce]||!w())&&(P(),w()&&br(this.sessions[o],p))}),p.once("remoteSettings",()=>{if(l.destroyed){let S=new Error("Agent has been destroyed");for(let x=0;x<n.length;x++)n[x].reject(S);p.destroy();return}if(p.setLocalWindowSize&&p.setLocalWindowSize(1024*1024*4),p[Y]=v()||[],p.socket.encrypted){let S=p[Y][0];if(S!==a){let x=new Error(`Requested origin ${a} does not match server ${S}`);for(let T=0;T<n.length;T++)n[T].reject(x);p.destroy();return}}u();{let S=this.sessions;if(o in S){let x=S[o];x.splice(Ba(x,p,Ua),0,p)}else S[o]=[p]}g=!0,this._emptySessionCount++,this.emit("session",p),this._accept(p,n,a,r),p[K]===0&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),p.on("remoteSettings",()=>{w()&&(P(),w()&&br(this.sessions[o],p))})}),p[Vn]=p.request,p.request=(S,x)=>{if(p[ce])throw new Error("The session is gracefully closing. No new streams are allowed.");let T=p[Vn](S,x);return p.ref(),p[K]++===0&&this._emptySessionCount--,T.once("close",()=>{if(--p[K]===0&&(this._emptySessionCount++,p.unref(),this._emptySessionCount>this.maxEmptySessions||p[ce])){p.close();return}p.destroyed||p.closed||w()&&!Jn(this.sessions[o],p)&&(br(this.sessions[o],p),P(),p[K]===0&&this._processQueue())}),T}}catch(y){u(),this._sessionCount--;for(let b=0;b<n.length;b++)n[b].reject(y)}};l.listeners=n,l.completed=!1,l.destroyed=!1,this.queue[o][a]=l,this.queue[o][xt]++,this._processQueue()})}request(e,r,n,s){return new Promise((i,o)=>{this.getSession(e,r,[{reject:o,resolve:a=>{try{let u=a.request(n,s);$a(u),i(u)}catch(u){o(u)}}}])})}async createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let n=e.port||443,s=e.hostname;typeof r.servername>"u"&&(r.servername=s);let i=Ha.connect(n,s,r);return r.socket&&(i._peername={family:void 0,address:void 0,port:n}),i}closeEmptySessions(e=Number.POSITIVE_INFINITY){let r=0,{sessions:n}=this;for(let s in n){let i=n[s];for(let o=0;o<i.length;o++){let a=i[o];if(a[K]===0&&(r++,a.close(),r>=e))return r}}return r}destroy(e){let{sessions:r,queue:n}=this;for(let s in r){let i=r[s];for(let o=0;o<i.length;o++)i[o].destroy(e)}for(let s in n){let i=n[s];for(let o in i)i[o].destroyed=!0}this.queue={},this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}};Pe.kCurrentStreamCount=K;Pe.kGracefullyClosing=ce;Yn.exports={Agent:Pe,globalAgent:new Pe}});var wr=C((Yf,Qn)=>{"use strict";f();var{Readable:za}=R("stream"),_r=class extends za{constructor(e,r){super({emitClose:!1,autoDestroy:!0,highWaterMark:r}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this._dumped=!1}get connection(){return this.socket}set connection(e){this.socket=e}_destroy(e,r){this.readableEnded||(this.aborted=!0),r(),this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};Qn.exports=_r});var Zn=C((Xf,Xn)=>{"use strict";f();Xn.exports=(t,e,r)=>{for(let n of r)t.on(n,(...s)=>e.emit(n,...s))}});var Ze=C((td,es)=>{"use strict";f();var fe=(t,e,r)=>{es.exports[e]=class extends t{constructor(...s){super(typeof r=="string"?r:r(s)),this.name=`${super.name} [${e}]`,this.code=e}}};fe(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],n=Array.isArray(r);return n&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${n?"one of":"of"} type ${r}. Received ${typeof t[2]}`});fe(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);fe(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);fe(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);fe(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);fe(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`);fe(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")});var rs=C((nd,ts)=>{"use strict";f();ts.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var Er=C((id,ns)=>{"use strict";f();var{ERR_INVALID_HTTP_TOKEN:Ma}=Ze(),Wa=rs(),Va=/^[\^`\-\w!#$%&*+.|~]+$/;ns.exports=t=>{if(typeof t!="string"||!Va.test(t)&&!Wa(t))throw new Ma("Header name",t)}});var Sr=C((ad,ss)=>{"use strict";f();var{ERR_HTTP_INVALID_HEADER_VALUE:Ga,ERR_INVALID_CHAR:Ja}=Ze(),Ka=/[^\t\u0020-\u007E\u0080-\u00FF]/;ss.exports=(t,e)=>{if(typeof e>"u")throw new Ga(e,t);if(Ka.test(e))throw new Ja("header content",t)}});var as=C((ud,os)=>{"use strict";f();var{ERR_HTTP2_NO_SOCKET_MANIPULATION:is}=Ze(),Ya={has(t,e){let r=t.session===void 0?t:t.session.socket;return e in t||e in r},get(t,e){switch(e){case"on":case"once":case"end":case"emit":case"destroy":return t[e].bind(t);case"writable":case"destroyed":return t[e];case"readable":return t.destroyed?!1:t.readable;case"setTimeout":{let{session:r}=t;return r!==void 0?r.setTimeout.bind(r):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new is;default:{let r=t.session===void 0?t:t.session.socket,n=r[e];return typeof n=="function"?n.bind(r):n}}},getPrototypeOf(t){return t.session!==void 0?Reflect.getPrototypeOf(t.session.socket):Reflect.getPrototypeOf(t)},set(t,e,r){switch(e){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[e]=r,!0;case"setTimeout":{let{session:n}=t;return n===void 0?t.setTimeout=r:n.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new is;default:{let n=t.session===void 0?t:t.session.socket;return n[e]=r,!0}}}};os.exports=Ya});var Rr=C((ld,ds)=>{"use strict";f();var{URL:xr,urlToHttpOptions:cs}=R("url"),Qa=R("http2"),{Writable:Xa}=R("stream"),{Agent:Za,globalAgent:ec}=le(),tc=wr(),rc=Zn(),{ERR_INVALID_ARG_TYPE:vt,ERR_INVALID_PROTOCOL:nc,ERR_HTTP_HEADERS_SENT:us}=Ze(),sc=Er(),ic=Sr(),oc=as(),{HTTP2_HEADER_STATUS:hs,HTTP2_HEADER_METHOD:ls,HTTP2_HEADER_PATH:fs,HTTP2_HEADER_AUTHORITY:et,HTTP2_METHOD_CONNECT:ac}=Qa.constants,V=Symbol("headers"),Te=Symbol("origin"),tt=Symbol("session"),vr=Symbol("options"),Ot=Symbol("flushedHeaders"),Ae=Symbol("jobs"),rt=Symbol("pendingAgentPromise"),Or=class extends Xa{constructor(e,r,n){if(super({autoDestroy:!1,emitClose:!1}),typeof e=="string"?e=cs(new xr(e)):e instanceof xr?e=cs(e):e={...e},typeof r=="function"||r===void 0?(n=r,r=e):r=Object.assign(e,r),r.h2session){if(this[tt]=r.h2session,this[tt].destroyed)throw new Error("The session has been closed already");this.protocol=this[tt].socket.encrypted?"https:":"http:"}else if(r.agent===!1)this.agent=new Za({maxEmptySessions:0});else if(typeof r.agent>"u"||r.agent===null)this.agent=ec;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new vt("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new nc(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;let{timeout:s}=r;r.timeout=void 0,this[V]=Object.create(null),this[Ae]=[],this[rt]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",this.method==="CONNECT"&&(r.path==="/"||r.path===void 0)||(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;let{headers:i}=r;if(i)for(let a in i)this.setHeader(a,i[a]);r.auth&&!("authorization"in this[V])&&(this[V].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[vr]=r,this[Te]=new xr(`${this.protocol}//${r.servername||r.host}:${r.port}`);let o=r._reuseSocket;o&&(r.createConnection=(...a)=>o.destroyed?this.agent.createConnection(...a):o,this.agent.getSession(this[Te],this[vr]).catch(()=>{})),s&&this.setTimeout(s),n&&this.once("response",n),this[Ot]=!1}get method(){return this[V][ls]}set method(e){e&&(this[V][ls]=e.toUpperCase())}get path(){let e=this.method==="CONNECT"?et:fs;return this[V][e]}set path(e){if(e){let r=this.method==="CONNECT"?et:fs;this[V][r]=e}}get host(){return this[Te].hostname}set host(e){}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,n){if(this._mustNotHaveABody){n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let s=()=>this._request.write(e,r,n);this._request?s():this[Ae].push(s)}_final(e){this.flushHeaders();let r=()=>{if(this._mustNotHaveABody||this.method==="CONNECT"){e();return}this._request.end(e)};this._request?r():this[Ae].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}async _destroy(e,r){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit("close")});try{await this[rt]}catch(n){this.aborted&&(e=n)}r(e)}async flushHeaders(){if(this[Ot]||this.destroyed)return;this[Ot]=!0;let e=this.method===ac,r=n=>{if(this._request=n,this.destroyed){n.destroy();return}e||rc(n,this,["timeout","continue"]),n.once("error",i=>{this.destroy(i)}),n.once("aborted",()=>{let{res:i}=this;i?(i.aborted=!0,i.emit("aborted"),i.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"))});let s=(i,o,a)=>{let u=new tc(this.socket,n.readableHighWaterMark);this.res=u,u.url=`${this[Te].origin}${this.path}`,u.req=this,u.statusCode=i[hs],u.headers=i,u.rawHeaders=a,u.once("end",()=>{u.complete=!0,u.socket=null,u.connection=null}),e?(u.upgrade=!0,this.emit("connect",u,n,Buffer.alloc(0))?this.emit("close"):n.destroy()):(n.on("data",l=>{!u._dumped&&!u.push(l)&&n.pause()}),n.once("end",()=>{this.aborted||u.push(null)}),this.emit("response",u)||u._dump())};n.once("response",s),n.once("headers",i=>this.emit("information",{statusCode:i[hs]})),n.once("trailers",(i,o,a)=>{let{res:u}=this;if(u===null){s(i,o,a);return}u.trailers=i,u.rawTrailers=a}),n.once("close",()=>{let{aborted:i,res:o}=this;if(o){i&&(o.aborted=!0,o.emit("aborted"),o.destroy());let a=()=>{o.emit("close"),this.destroy(),this.emit("close")};o.readable?o.once("end",a):a();return}if(!this.destroyed){this.destroy(new Error("The HTTP/2 stream has been early terminated")),this.emit("close");return}this.destroy(),this.emit("close")}),this.socket=new Proxy(n,oc);for(let i of this[Ae])i();this[Ae].length=0,this.emit("socket",this.socket)};if(!(et in this[V])&&!e&&(this[V][et]=this[Te].host),this[tt])try{r(this[tt].request(this[V]))}catch(n){this.destroy(n)}else{this.reusedSocket=!0;try{let n=this.agent.request(this[Te],this[vr],this[V]);this[rt]=n,r(await n),this[rt]=!1}catch(n){this[rt]=!1,this.destroy(n)}}}get connection(){return this.socket}set connection(e){this.socket=e}getHeaderNames(){return Object.keys(this[V])}hasHeader(e){if(typeof e!="string")throw new vt("name","string",e);return!!this[V][e.toLowerCase()]}getHeader(e){if(typeof e!="string")throw new vt("name","string",e);return this[V][e.toLowerCase()]}get headersSent(){return this[Ot]}removeHeader(e){if(typeof e!="string")throw new vt("name","string",e);if(this.headersSent)throw new us("remove");delete this[V][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new us("set");sc(e),ic(e,r);let n=e.toLowerCase();if(n==="connection"){if(r.toLowerCase()==="keep-alive")return;throw new Error(`Invalid 'connection' header: ${r}`)}n==="host"&&this.method==="CONNECT"?this[V][et]=r:this[V][n]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let n=()=>this._request.setTimeout(e,r);return this._request?n():this[Ae].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};ds.exports=Or});var ms=C((dd,ps)=>{"use strict";f();var cc=R("tls");ps.exports=(t={},e=cc.connect)=>new Promise((r,n)=>{let s=!1,i,o=async()=>{await u,i.off("timeout",a),i.off("error",n),t.resolveSocket?(r({alpnProtocol:i.alpnProtocol,socket:i,timeout:s}),s&&(await Promise.resolve(),i.emit("timeout"))):(i.destroy(),r({alpnProtocol:i.alpnProtocol,timeout:s}))},a=async()=>{s=!0,o()},u=(async()=>{try{i=await e(t,o),i.on("error",n),i.once("timeout",a)}catch(l){n(l)}})()})});var gs=C((md,ys)=>{"use strict";f();var{isIP:uc}=R("net"),hc=R("assert"),lc=t=>{if(t[0]==="["){let r=t.indexOf("]");return hc(r!==-1),t.slice(1,r)}let e=t.indexOf(":");return e===-1?t:t.slice(0,e)};ys.exports=t=>{let e=lc(t);return uc(e)?"":e}});var Os=C((gd,nt)=>{"use strict";f();var{URL:bs,urlToHttpOptions:_s}=R("url"),ws=R("http"),Cr=R("https"),fc=ms(),dc=yr(),{Agent:pc,globalAgent:mc}=le(),yc=Rr(),gc=gs(),Es=gr(),Ss=new dc({maxSize:100}),bc=new Map,_c=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let n=()=>{t.emit("free",e,r)};e.on("free",n);let s=()=>{t.removeSocket(e,r)};e.on("close",s);let i=()=>{let{freeSockets:a}=t;for(let u of Object.values(a))if(u.includes(e)){e.destroy();return}};e.on("timeout",i);let o=()=>{t.removeSocket(e,r),e.off("close",s),e.off("free",n),e.off("timeout",i),e.off("agentRemove",o)};e.on("agentRemove",o),t.emit("free",e,r)},xs=(t,e=new Map,r=void 0)=>async n=>{let s=`${n.host}:${n.port}:${n.ALPNProtocols.sort()}`;if(!t.has(s)){if(e.has(s))return{alpnProtocol:(await e.get(s)).alpnProtocol};let{path:i}=n;n.path=n.socketPath;let o=fc(n,r);e.set(s,o);try{let a=await o;return t.set(s,a.alpnProtocol),e.delete(s),n.path=i,a}catch(a){throw e.delete(s),n.path=i,a}}return{alpnProtocol:t.get(s)}},vs=xs(Ss,bc);nt.exports=async(t,e,r)=>{if(typeof t=="string"?t=_s(new bs(t)):t instanceof bs?t=_s(t):t={...t},typeof e=="function"||e===void 0?(r=e,e=t):e=Object.assign(t,e),e.ALPNProtocols=e.ALPNProtocols||["h2","http/1.1"],!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let n=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||gc(e.headers&&e.headers.host||e.host),e.port=e.port||(n?443:80),e._defaultAgent=n?Cr.globalAgent:ws.globalAgent;let s=e.resolveProtocol||vs,{agent:i}=e;if(i!==void 0&&i!==!1&&i.constructor.name!=="Object")throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(n){e.resolveSocket=!0;let{socket:o,alpnProtocol:a,timeout:u}=await s(e);if(u){o&&o.destroy();let d=new Error(`Timed out resolving ALPN: ${e.timeout} ms`);throw d.code="ETIMEDOUT",d.ms=e.timeout,d}o&&e.createConnection&&(o.destroy(),o=void 0),delete e.resolveSocket;let l=a==="h2";if(i&&(i=l?i.http2:i.https,e.agent=i),i===void 0&&(i=l?mc:Cr.globalAgent),o)if(i===!1)o.destroy();else{let d=(l?pc:Cr.Agent).prototype.createConnection;i.createConnection===d?l?e._reuseSocket=o:_c(i,o,e):o.destroy()}if(l)return Es(new yc(e,r))}else i&&(e.agent=i.http);return e.headers&&(e.headers={...e.headers},e.headers[":authority"]&&(e.headers.host||(e.headers.host=e.headers[":authority"]),delete e.headers[":authority"]),delete e.headers[":method"],delete e.headers[":scheme"],delete e.headers[":path"]),Es(ws.request(e,r))};nt.exports.protocolCache=Ss;nt.exports.resolveProtocol=vs;nt.exports.createResolveProtocol=xs});var Pr=C((_d,Rs)=>{"use strict";f();var wc=R("stream"),Ec=R("tls"),Sc=new Ec.TLSSocket(new wc.PassThrough)._handle._parentWrap.constructor;Rs.exports=Sc});var Ar=C((Ed,Cs)=>{"use strict";f();var Tr=class extends Error{constructor(e,r=""){super(`The proxy server rejected the request with status code ${e} (${r||"empty status message"})`),this.statusCode=e,this.statusMessage=r}};Cs.exports=Tr});var Ts=C((xd,Ps)=>{"use strict";f();var xc=(t,e,r)=>{if(!r.some(s=>typeof s==="string"?typeof e===s:e instanceof s)){let s=r.map(i=>typeof i=="string"?i:i.name);throw new TypeError(`Expected '${t}' to be a type of ${s.join(" or ")}, got ${typeof e}`)}};Ps.exports=xc});var kr=C((Od,ks)=>{"use strict";f();var{URL:As}=R("url"),Rt=Ts();ks.exports=(t,e)=>{Rt("proxyOptions",e,["object"]),Rt("proxyOptions.headers",e.headers,["object","undefined"]),Rt("proxyOptions.raw",e.raw,["boolean","undefined"]),Rt("proxyOptions.url",e.url,[As,"string"]);let r=new As(e.url);t.proxyOptions={raw:!0,...e,headers:{...e.headers},url:r}}});var Ct=C((Cd,js)=>{"use strict";f();js.exports=t=>{let{username:e,password:r}=t.proxyOptions.url;if(e||r){let n=`${e}:${r}`,s=`Basic ${Buffer.from(n).toString("base64")}`;return{"proxy-authorization":s,authorization:s}}return{}}});var Hs=C((Td,Is)=>{"use strict";f();var vc=R("tls"),Oc=R("http"),qs=R("https"),Rc=Pr(),{globalAgent:Cc}=le(),Pc=Ar(),Ns=kr(),Tc=Ct(),Ls=(t,e,r)=>{(async()=>{try{let{proxyOptions:n}=t,{url:s,headers:i,raw:o}=n,a=await Cc.request(s,n,{...Tc(t),...i,":method":"CONNECT",":authority":`${e.host}:${e.port}`});a.once("error",r),a.once("response",u=>{let l=u[":status"];if(l!==200){r(new Pc(l,""));return}let d=t instanceof qs.Agent;if(o&&d){e.socket=a;let m=vc.connect(e);m.once("close",()=>{a.destroy()}),r(null,m);return}let g=new Rc(a);g.encrypted=!1,g._handle.getpeername=m=>{m.family=void 0,m.address=void 0,m.port=void 0},r(null,g)})}catch(n){r(n)}})()},jr=class extends Oc.Agent{constructor(e){super(e),Ns(this,e.proxyOptions)}createConnection(e,r){Ls(this,e,r)}},qr=class extends qs.Agent{constructor(e){super(e),Ns(this,e.proxyOptions)}createConnection(e,r){Ls(this,e,r)}};Is.exports={HttpOverHttp2:jr,HttpsOverHttp2:qr}});var Lr=C((kd,Fs)=>{"use strict";f();var{Agent:Ac}=le(),kc=Pr(),jc=Ar(),qc=kr(),Nr=class extends Ac{constructor(e){super(e),qc(this,e.proxyOptions)}async createConnection(e,r){let n=`${e.hostname}:${e.port||443}`,[s,i,o]=await this._getProxyStream(n);if(i!==200)throw new jc(i,o);if(this.proxyOptions.raw)r.socket=s;else{let a=new kc(s);return a.encrypted=!1,a._handle.getpeername=u=>{u.family=void 0,u.address=void 0,u.port=void 0},a}return super.createConnection(e,r)}};Fs.exports=Nr});var $s=C((qd,Ds)=>{"use strict";f();var{globalAgent:Nc}=le(),Lc=Lr(),Ic=Ct(),Hc=t=>new Promise((e,r)=>{t.once("error",r),t.once("response",n=>{t.off("error",r),e(n[":status"])})}),Ir=class extends Lc{async _getProxyStream(e){let{proxyOptions:r}=this,n={...Ic(this),...r.headers,":method":"CONNECT",":authority":e},s=await Nc.request(r.url,r,n),i=await Hc(s);return[s,i,""]}};Ds.exports=Ir});var Us=C((Ld,Bs)=>{"use strict";f();var Fc=R("http"),Dc=R("https"),$c=Lr(),Bc=Ct(),Uc=t=>new Promise((e,r)=>{let n=(s,i,o)=>{i.unshift(o),t.off("error",r),e([i,s.statusCode,s.statusMessage])};t.once("error",r),t.once("connect",n)}),Pt=class extends $c{async _getProxyStream(e){let{proxyOptions:r}=this,{url:n,headers:s}=this.proxyOptions,o=(n.protocol==="https:"?Dc:Fc).request({...r,hostname:n.hostname,port:n.port,path:e,headers:{...Bc(this),...s,host:e},method:"CONNECT"}).end();return Uc(o)}};Bs.exports={Http2OverHttp:Pt,Http2OverHttps:Pt}});var Ms=C((Hd,zs)=>{"use strict";f();var zc=R("http2"),{Agent:Mc,globalAgent:Wc}=le(),Hr=Rr(),Vc=wr(),Gc=Os(),{HttpOverHttp2:Jc,HttpsOverHttp2:Kc}=Hs(),Yc=$s(),{Http2OverHttp:Qc,Http2OverHttps:Xc}=Us(),Zc=Er(),eu=Sr(),tu=(t,e,r)=>new Hr(t,e,r),ru=(t,e,r)=>{let n=new Hr(t,e,r);return n.end(),n};zs.exports={...zc,ClientRequest:Hr,IncomingMessage:Vc,Agent:Mc,globalAgent:Wc,request:tu,get:ru,auto:Gc,proxies:{HttpOverHttp2:Jc,HttpsOverHttp2:Kc,Http2OverHttp2:Yc,Http2OverHttp:Qc,Http2OverHttps:Xc},validateHeaderName:Zc,validateHeaderValue:eu}});var zr=C(pe=>{f();pe.parse=pe.decode=qu;pe.stringify=pe.encode=si;pe.safe=je;pe.unsafe=Lt;var Ur=typeof process<"u"&&process.platform==="win32"?`\r
|
|
2
|
+
`:`
|
|
3
|
+
`;function si(t,e){var r=[],n="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var s=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(i,o,a){var u=t[i];u&&Array.isArray(u)?u.forEach(function(l){n+=je(i+"[]")+s+je(l)+`
|
|
4
|
+
`}):u&&typeof u=="object"?r.push(i):n+=je(i)+s+je(u)+Ur}),e.section&&n.length&&(n="["+je(e.section)+"]"+Ur+n),r.forEach(function(i,o,a){var u=ii(i).join("\\."),l=(e.section?e.section+".":"")+u,d=si(t[i],{section:l,whitespace:e.whitespace});n.length&&d.length&&(n+=Ur),n+=d}),n}function ii(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function qu(t){var e={},r=e,n=null,s=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,i=t.split(/[\r\n]+/g);return i.forEach(function(o,a,u){if(!(!o||o.match(/^\s*[;#]/))){var l=o.match(s);if(l){if(l[1]!==void 0){if(n=Lt(l[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var d=Lt(l[2]);if(d!=="__proto__"){var g=l[3]?Lt(l[4]):!0;switch(g){case"true":case"false":case"null":g=JSON.parse(g)}if(d.length>2&&d.slice(-2)==="[]"){if(d=d.substring(0,d.length-2),d==="__proto__")return;r[d]?Array.isArray(r[d])||(r[d]=[r[d]]):r[d]=[]}Array.isArray(r[d])?r[d].push(g):r[d]=g}}}}),Object.keys(e).filter(function(o,a,u){if(!e[o]||typeof e[o]!="object"||Array.isArray(e[o]))return!1;var l=ii(o),d=e,g=l.pop(),m=g.replace(/\\\./g,".");return l.forEach(function(y,b,p){y!=="__proto__"&&((!d[y]||typeof d[y]!="object")&&(d[y]={}),d=d[y])}),d===e&&m===g?!1:(d[m]=e[o],!0)}).forEach(function(o,a,u){delete e[o]}),e}function oi(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function je(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&oi(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Lt(t,e){if(t=(t||"").trim(),oi(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",s=0,i=t.length;s<i;s++){var o=t.charAt(s);if(r)"\\;#".indexOf(o)!==-1?n+=o:n+="\\"+o,r=!1;else{if(";#".indexOf(o)!==-1)break;o==="\\"?r=!0:n+=o}}return r&&(n+="\\"),n.trim()}return t}});var ui=C((am,ci)=>{"use strict";f();var Mr=1,ai=2;function Nu(){return""}function Lu(t,e,r){return t.slice(e,r).replace(/\S/g," ")}ci.exports=function(t,e){e=e||{};for(var r,n,s=!1,i=!1,o=0,a="",u=e.whitespace===!1?Nu:Lu,l=0;l<t.length;l++){if(r=t[l],n=t[l+1],!i&&r==='"'){var d=t[l-1]==="\\"&&t[l-2]!=="\\";d||(s=!s)}if(!s){if(!i&&r+n==="//")a+=t.slice(o,l),o=l,i=Mr,l++;else if(i===Mr&&r+n===`\r
|
|
5
|
+
`){l++,i=!1,a+=u(t,o,l),o=l;continue}else if(i===Mr&&r===`
|
|
6
|
+
`)i=!1,a+=u(t,o,l),o=l;else if(!i&&r+n==="/*"){a+=t.slice(o,l),o=l,i=ai,l++;continue}else if(i===ai&&r+n==="*/"){l++,i=!1,a+=u(t,o,l+1),o=l+1;continue}}}return a+(i?u(t.substr(o)):t.substr(o))}});var li=C(qe=>{"use strict";f();var hi=R("fs"),Iu=zr(),it=R("path"),Hu=ui(),Fu=qe.parse=function(t){return/^\s*{/.test(t)?JSON.parse(Hu(t)):Iu.parse(t)},Du=qe.file=function(){var t=[].slice.call(arguments).filter(function(s){return s!=null});for(var e in t)if(typeof t[e]!="string")return;var r=it.join.apply(null,t),n;try{return hi.readFileSync(r,"utf-8")}catch{return}},um=qe.json=function(){var t=Du.apply(null,arguments);return t?Fu(t):null},hm=qe.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var s in e)if(s.toLowerCase().indexOf(t.toLowerCase())===0){for(var i=s.substring(n).split("__"),o;(o=i.indexOf(""))>-1;)i.splice(o,1);var a=r;i.forEach(function(l,d){!l||typeof a!="object"||(d===i.length-1&&(a[l]=e[s]),a[l]===void 0&&(a[l]={}),a=a[l])})}return r},lm=qe.find=function(){var t=it.join.apply(null,[].slice.call(arguments));function e(r,n){var s=it.join(r,n);try{return hi.statSync(s),s}catch{if(it.dirname(r)!==r)return e(it.dirname(r),n)}}return e(process.cwd(),t)}});var gi=C((pm,yi)=>{"use strict";f();function di(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function pi(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function mi(t){var e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=mi(r):di(r)?e[n]=pi(r):e[n]=Wr({},r):e[n]=r}),e}function fi(t,e){return e==="__proto__"?void 0:t[e]}var Wr=yi.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,n,s;return e.forEach(function(i){typeof i!="object"||i===null||Array.isArray(i)||Object.keys(i).forEach(function(o){if(n=fi(t,o),r=fi(i,o),r!==t)if(typeof r!="object"||r===null){t[o]=r;return}else if(Array.isArray(r)){t[o]=mi(r);return}else if(di(r)){t[o]=pi(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[o]=Wr({},r);return}else{t[o]=Wr(n,r);return}})}),t}});var Ei=C((ym,wi)=>{"use strict";f();function $u(t,e){var r=t;e.slice(0,-1).forEach(function(s){r=r[s]||{}});var n=e[e.length-1];return n in r}function bi(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function _i(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}wi.exports=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(x){r.bools[x]=!0});var n={};function s(x){return n[x].some(function(T){return r.bools[T]})}Object.keys(e.alias||{}).forEach(function(x){n[x]=[].concat(e.alias[x]),n[x].forEach(function(T){n[T]=[x].concat(n[x].filter(function(N){return T!==N}))})}),[].concat(e.string).filter(Boolean).forEach(function(x){r.strings[x]=!0,n[x]&&[].concat(n[x]).forEach(function(T){r.strings[T]=!0})});var i=e.default||{},o={_:[]};function a(x,T){return r.allBools&&/^--[^=]+$/.test(T)||r.strings[x]||r.bools[x]||n[x]}function u(x,T,N){for(var A=x,Z=0;Z<T.length-1;Z++){var O=T[Z];if(_i(A,O))return;A[O]===void 0&&(A[O]={}),(A[O]===Object.prototype||A[O]===Number.prototype||A[O]===String.prototype)&&(A[O]={}),A[O]===Array.prototype&&(A[O]=[]),A=A[O]}var k=T[T.length-1];_i(A,k)||((A===Object.prototype||A===Number.prototype||A===String.prototype)&&(A={}),A===Array.prototype&&(A=[]),A[k]===void 0||r.bools[k]||typeof A[k]=="boolean"?A[k]=N:Array.isArray(A[k])?A[k].push(N):A[k]=[A[k],N])}function l(x,T,N){if(!(N&&r.unknownFn&&!a(x,N)&&r.unknownFn(N)===!1)){var A=!r.strings[x]&&bi(T)?Number(T):T;u(o,x.split("."),A),(n[x]||[]).forEach(function(Z){u(o,Z.split("."),A)})}}Object.keys(r.bools).forEach(function(x){l(x,i[x]===void 0?!1:i[x])});var d=[];t.indexOf("--")!==-1&&(d=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var g=0;g<t.length;g++){var m=t[g],y,b;if(/^--.+=/.test(m)){var p=m.match(/^--([^=]+)=([\s\S]*)$/);y=p[1];var v=p[2];r.bools[y]&&(v=v!=="false"),l(y,v,m)}else if(/^--no-.+/.test(m))y=m.match(/^--no-(.+)/)[1],l(y,!1,m);else if(/^--.+/.test(m))y=m.match(/^--(.+)/)[1],b=t[g+1],b!==void 0&&!/^(-|--)[^-]/.test(b)&&!r.bools[y]&&!r.allBools&&(!n[y]||!s(y))?(l(y,b,m),g+=1):/^(true|false)$/.test(b)?(l(y,b==="true",m),g+=1):l(y,r.strings[y]?"":!0,m);else if(/^-[^-]+/.test(m)){for(var w=m.slice(1,-1).split(""),P=!1,S=0;S<w.length;S++){if(b=m.slice(S+2),b==="-"){l(w[S],b,m);continue}if(/[A-Za-z]/.test(w[S])&&b[0]==="="){l(w[S],b.slice(1),m),P=!0;break}if(/[A-Za-z]/.test(w[S])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(b)){l(w[S],b,m),P=!0;break}if(w[S+1]&&w[S+1].match(/\W/)){l(w[S],m.slice(S+2),m),P=!0;break}else l(w[S],r.strings[w[S]]?"":!0,m)}y=m.slice(-1)[0],!P&&y!=="-"&&(t[g+1]&&!/^(-|--)[^-]/.test(t[g+1])&&!r.bools[y]&&(!n[y]||!s(y))?(l(y,t[g+1],m),g+=1):t[g+1]&&/^(true|false)$/.test(t[g+1])?(l(y,t[g+1]==="true",m),g+=1):l(y,r.strings[y]?"":!0,m))}else if((!r.unknownFn||r.unknownFn(m)!==!1)&&o._.push(r.strings._||!bi(m)?m:Number(m)),e.stopEarly){o._.push.apply(o._,t.slice(g+1));break}}return Object.keys(i).forEach(function(x){$u(o,x.split("."))||(u(o,x.split("."),i[x]),(n[x]||[]).forEach(function(T){u(o,T.split("."),i[x])}))}),e["--"]?o["--"]=d.slice():d.forEach(function(x){o._.push(x)}),o}});var Oi=C((bm,vi)=>{f();var ot=li(),Ne=R("path").join,Bu=gi(),Si="/etc",xi=process.platform==="win32",at=xi?process.env.USERPROFILE:process.env.HOME;vi.exports=function(t,e,r,n){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=Ei()(process.argv.slice(2))),e=(typeof e=="string"?ot.json(e):e)||{},n=n||ot.parse;var s=ot.env(t+"_"),i=[e],o=[];function a(u){if(!(o.indexOf(u)>=0)){var l=ot.file(u);l&&(i.push(n(l)),o.push(u))}}return xi||[Ne(Si,t,"config"),Ne(Si,t+"rc")].forEach(a),at&&[Ne(at,".config",t,"config"),Ne(at,".config",t),Ne(at,"."+t,"config"),Ne(at,"."+t+"rc")].forEach(a),a(ot.find("."+t+"rc")),s.config&&a(s.config),r.config&&a(r.config),Bu.apply(null,i.concat([s,r,o.length?{configs:o,config:o[o.length-1]}:void 0]))}});var Pi=C((Sm,Ci)=>{f();var ue=R("constants"),Uu=process.cwd,It=null,zu=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return It||(It=Uu.call(process)),It};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Gr=process.chdir,process.chdir=function(t){It=null,Gr.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Gr));var Gr;Ci.exports=Mu;function Mu(t){ue.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=i(t.chown),t.fchown=i(t.fchown),t.lchown=i(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(t.lchownSync),t.chmodSync=s(t.chmodSync),t.fchmodSync=s(t.fchmodSync),t.lchmodSync=s(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=u(t.statSync),t.fstatSync=u(t.fstatSync),t.lstatSync=u(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(d,g,m){m&&process.nextTick(m)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(d,g,m,y){y&&process.nextTick(y)},t.lchownSync=function(){}),zu==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:(function(d){function g(m,y,b){var p=Date.now(),v=0;d(m,y,function w(P){if(P&&(P.code==="EACCES"||P.code==="EPERM")&&Date.now()-p<6e4){setTimeout(function(){t.stat(y,function(S,x){S&&S.code==="ENOENT"?d(m,y,w):b(P)})},v),v<100&&(v+=10);return}b&&b(P)})}return Object.setPrototypeOf&&Object.setPrototypeOf(g,d),g})(t.rename)),t.read=typeof t.read!="function"?t.read:(function(d){function g(m,y,b,p,v,w){var P;if(w&&typeof w=="function"){var S=0;P=function(x,T,N){if(x&&x.code==="EAGAIN"&&S<10)return S++,d.call(t,m,y,b,p,v,P);w.apply(this,arguments)}}return d.call(t,m,y,b,p,v,P)}return Object.setPrototypeOf&&Object.setPrototypeOf(g,d),g})(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:(function(d){return function(g,m,y,b,p){for(var v=0;;)try{return d.call(t,g,m,y,b,p)}catch(w){if(w.code==="EAGAIN"&&v<10){v++;continue}throw w}}})(t.readSync);function e(d){d.lchmod=function(g,m,y){d.open(g,ue.O_WRONLY|ue.O_SYMLINK,m,function(b,p){if(b){y&&y(b);return}d.fchmod(p,m,function(v){d.close(p,function(w){y&&y(v||w)})})})},d.lchmodSync=function(g,m){var y=d.openSync(g,ue.O_WRONLY|ue.O_SYMLINK,m),b=!0,p;try{p=d.fchmodSync(y,m),b=!1}finally{if(b)try{d.closeSync(y)}catch{}else d.closeSync(y)}return p}}function r(d){ue.hasOwnProperty("O_SYMLINK")&&d.futimes?(d.lutimes=function(g,m,y,b){d.open(g,ue.O_SYMLINK,function(p,v){if(p){b&&b(p);return}d.futimes(v,m,y,function(w){d.close(v,function(P){b&&b(w||P)})})})},d.lutimesSync=function(g,m,y){var b=d.openSync(g,ue.O_SYMLINK),p,v=!0;try{p=d.futimesSync(b,m,y),v=!1}finally{if(v)try{d.closeSync(b)}catch{}else d.closeSync(b)}return p}):d.futimes&&(d.lutimes=function(g,m,y,b){b&&process.nextTick(b)},d.lutimesSync=function(){})}function n(d){return d&&function(g,m,y){return d.call(t,g,m,function(b){l(b)&&(b=null),y&&y.apply(this,arguments)})}}function s(d){return d&&function(g,m){try{return d.call(t,g,m)}catch(y){if(!l(y))throw y}}}function i(d){return d&&function(g,m,y,b){return d.call(t,g,m,y,function(p){l(p)&&(p=null),b&&b.apply(this,arguments)})}}function o(d){return d&&function(g,m,y){try{return d.call(t,g,m,y)}catch(b){if(!l(b))throw b}}}function a(d){return d&&function(g,m,y){typeof m=="function"&&(y=m,m=null);function b(p,v){v&&(v.uid<0&&(v.uid+=4294967296),v.gid<0&&(v.gid+=4294967296)),y&&y.apply(this,arguments)}return m?d.call(t,g,m,b):d.call(t,g,b)}}function u(d){return d&&function(g,m){var y=m?d.call(t,g,m):d.call(t,g);return y&&(y.uid<0&&(y.uid+=4294967296),y.gid<0&&(y.gid+=4294967296)),y}}function l(d){if(!d||d.code==="ENOSYS")return!0;var g=!process.getuid||process.getuid()!==0;return!!(g&&(d.code==="EINVAL"||d.code==="EPERM"))}}});var ki=C((vm,Ai)=>{f();var Ti=R("stream").Stream;Ai.exports=Wu;function Wu(t){return{ReadStream:e,WriteStream:r};function e(n,s){if(!(this instanceof e))return new e(n,s);Ti.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,s=s||{};for(var o=Object.keys(s),a=0,u=o.length;a<u;a++){var l=o[a];this[l]=s[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}t.open(this.path,this.flags,this.mode,function(d,g){if(d){i.emit("error",d),i.readable=!1;return}i.fd=g,i.emit("open",g),i._read()})}function r(n,s){if(!(this instanceof r))return new r(n,s);Ti.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var i=Object.keys(s),o=0,a=i.length;o<a;o++){var u=i[o];this[u]=s[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var qi=C((Rm,ji)=>{"use strict";f();ji.exports=Gu;var Vu=Object.getPrototypeOf||function(t){return t.__proto__};function Gu(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:Vu(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var Hi=C((Pm,Yr)=>{f();var $=R("fs"),Ju=Pi(),Ku=ki(),Yu=qi(),Ht=R("util"),G,Dt;typeof Symbol=="function"&&typeof Symbol.for=="function"?(G=Symbol.for("graceful-fs.queue"),Dt=Symbol.for("graceful-fs.previous")):(G="___graceful-fs.queue",Dt="___graceful-fs.previous");function Qu(){}function Ii(t,e){Object.defineProperty(t,G,{get:function(){return e}})}var me=Qu;Ht.debuglog?me=Ht.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(me=function(){var t=Ht.format.apply(Ht,arguments);t="GFS4: "+t.split(/\n/).join(`
|
|
7
|
+
GFS4: `),console.error(t)});$[G]||(Ni=global[G]||[],Ii($,Ni),$.close=(function(t){function e(r,n){return t.call($,r,function(s){s||Li(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Dt,{value:t}),e})($.close),$.closeSync=(function(t){function e(r){t.apply($,arguments),Li()}return Object.defineProperty(e,Dt,{value:t}),e})($.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){me($[G]),R("assert").equal($[G].length,0)}));var Ni;global[G]||Ii(global,$[G]);Yr.exports=Jr(Yu($));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!$.__patched&&(Yr.exports=Jr($),$.__patched=!0);function Jr(t){Ju(t),t.gracefulify=Jr,t.createReadStream=T,t.createWriteStream=N;var e=t.readFile;t.readFile=r;function r(O,k,j){return typeof k=="function"&&(j=k,k=null),z(O,k,j);function z(M,U,D,B){return e(M,U,function(L){L&&(L.code==="EMFILE"||L.code==="ENFILE")?Le([z,[M,U,D],L,B||Date.now(),Date.now()]):typeof D=="function"&&D.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=s;function s(O,k,j,z){return typeof j=="function"&&(z=j,j=null),M(O,k,j,z);function M(U,D,B,L,W){return n(U,D,B,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Le([M,[U,D,B,L],H,W||Date.now(),Date.now()]):typeof L=="function"&&L.apply(this,arguments)})}}var i=t.appendFile;i&&(t.appendFile=o);function o(O,k,j,z){return typeof j=="function"&&(z=j,j=null),M(O,k,j,z);function M(U,D,B,L,W){return i(U,D,B,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Le([M,[U,D,B,L],H,W||Date.now(),Date.now()]):typeof L=="function"&&L.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=u);function u(O,k,j,z){return typeof j=="function"&&(z=j,j=0),M(O,k,j,z);function M(U,D,B,L,W){return a(U,D,B,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Le([M,[U,D,B,L],H,W||Date.now(),Date.now()]):typeof L=="function"&&L.apply(this,arguments)})}}var l=t.readdir;t.readdir=g;var d=/^v[0-5]\./;function g(O,k,j){typeof k=="function"&&(j=k,k=null);var z=d.test(process.version)?function(D,B,L,W){return l(D,M(D,B,L,W))}:function(D,B,L,W){return l(D,B,M(D,B,L,W))};return z(O,k,j);function M(U,D,B,L){return function(W,H){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Le([z,[U,D,B],W,L||Date.now(),Date.now()]):(H&&H.sort&&H.sort(),typeof B=="function"&&B.call(this,W,H))}}}if(process.version.substr(0,4)==="v0.8"){var m=Ku(t);w=m.ReadStream,S=m.WriteStream}var y=t.ReadStream;y&&(w.prototype=Object.create(y.prototype),w.prototype.open=P);var b=t.WriteStream;b&&(S.prototype=Object.create(b.prototype),S.prototype.open=x),Object.defineProperty(t,"ReadStream",{get:function(){return w},set:function(O){w=O},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return S},set:function(O){S=O},enumerable:!0,configurable:!0});var p=w;Object.defineProperty(t,"FileReadStream",{get:function(){return p},set:function(O){p=O},enumerable:!0,configurable:!0});var v=S;Object.defineProperty(t,"FileWriteStream",{get:function(){return v},set:function(O){v=O},enumerable:!0,configurable:!0});function w(O,k){return this instanceof w?(y.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function P(){var O=this;Z(O.path,O.flags,O.mode,function(k,j){k?(O.autoClose&&O.destroy(),O.emit("error",k)):(O.fd=j,O.emit("open",j),O.read())})}function S(O,k){return this instanceof S?(b.apply(this,arguments),this):S.apply(Object.create(S.prototype),arguments)}function x(){var O=this;Z(O.path,O.flags,O.mode,function(k,j){k?(O.destroy(),O.emit("error",k)):(O.fd=j,O.emit("open",j))})}function T(O,k){return new t.ReadStream(O,k)}function N(O,k){return new t.WriteStream(O,k)}var A=t.open;t.open=Z;function Z(O,k,j,z){return typeof j=="function"&&(z=j,j=null),M(O,k,j,z);function M(U,D,B,L,W){return A(U,D,B,function(H,zh){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Le([M,[U,D,B,L],H,W||Date.now(),Date.now()]):typeof L=="function"&&L.apply(this,arguments)})}}return t}function Le(t){me("ENQUEUE",t[0].name,t[1]),$[G].push(t),Kr()}var Ft;function Li(){for(var t=Date.now(),e=0;e<$[G].length;++e)$[G][e].length>2&&($[G][e][3]=t,$[G][e][4]=t);Kr()}function Kr(){if(clearTimeout(Ft),Ft=void 0,$[G].length!==0){var t=$[G].shift(),e=t[0],r=t[1],n=t[2],s=t[3],i=t[4];if(s===void 0)me("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-s>=6e4){me("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-i,u=Math.max(i-s,1),l=Math.min(u*1.2,100);a>=l?(me("RETRY",e.name,r),e.apply(null,r.concat([s]))):$[G].push(t)}Ft===void 0&&(Ft=setTimeout(Kr,0))}}});var Fi=C(Ie=>{"use strict";f();var Xu=Ie&&Ie.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.readCAFileSync=void 0;var Zu=Xu(Hi());function eh(t){try{let e=Zu.default.readFileSync(t,"utf8"),r="-----END CERTIFICATE-----";return e.split(r).filter(s=>!!s.trim()).map(s=>`${s.trimLeft()}${r}`)}catch(e){if(e.code==="ENOENT")return;throw e}}Ie.readCAFileSync=eh});var Di=C(ye=>{"use strict";f();var th=ye&&ye.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rh=ye&&ye.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&th(e,t,r)};Object.defineProperty(ye,"__esModule",{value:!0});rh(Fi(),ye)});var Ui=C((Nm,Bi)=>{f();Bi.exports=$i;function ge(t,e){if(typeof Object.setPrototypeOf=="function")return Object.setPrototypeOf(t,e);t.__proto__=e}function $i(){this.list=[];var t=null;Object.defineProperty(this,"root",{get:function(){return t},set:function(e){t=e,this.list.length&&ge(this.list[this.list.length-1],e)},enumerable:!0,configurable:!0})}$i.prototype={get length(){return this.list.length},get keys(){var t=[];for(var e in this.list[0])t.push(e);return t},get snapshot(){var t={};return this.keys.forEach(function(e){t[e]=this.get(e)},this),t},get store(){return this.list[0]},push:function(t){return typeof t!="object"&&(t={valueOf:t}),this.list.length>=1&&ge(this.list[this.list.length-1],t),ge(t,this.root),this.list.push(t)},pop:function(){return this.list.length>=2&&ge(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(t){return ge(t,this.list[0]||this.root),this.list.unshift(t)},shift:function(){return this.list.length===1&&ge(this.list[0],this.root),this.list.shift()},get:function(t){return this.list[0][t]},set:function(t,e,r){return this.length||this.push({}),r&&this.list[0].hasOwnProperty(t)&&this.push({}),this.list[0][t]=e},forEach:function(t,e){for(var r in this.list[0])t.call(e,r,this.list[0][r])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var t=this.list.splice.apply(this.list,arguments),e=0,r=this.list.length;e<r;e++)ge(this.list[e],this.list[e+1]||this.root);return t}}});var Vi=C((ne,Wi)=>{f();var zi=Ui(),ct=R("path"),$t=R("fs"),Qr=zr(),Xr=R("events").EventEmitter,nh=R("url"),sh=R("http"),ne=Wi.exports=function(){for(var t=[].slice.call(arguments),e=new J;t.length;){var r=t.shift();r&&e.push(typeof r=="string"?oh(r):r)}return e},Im=ne.find=function(){var t=ct.join.apply(null,[].slice.call(arguments));function e(r,n){var s=ct.join(r,n);try{return $t.statSync(s),s}catch{if(ct.dirname(r)!==r)return e(ct.dirname(r),n)}}return e(__dirname,t)},ih=ne.parse=function(t,e,r){if(t=""+t,r)if(r==="json")if(this.emit)try{return JSON.parse(t)}catch(n){this.emit("error",n)}else return JSON.parse(t);else return Qr.parse(t);else try{return JSON.parse(t)}catch{return Qr.parse(t)}},oh=ne.json=function(){var t=[].slice.call(arguments).filter(function(n){return n!=null}),e=ct.join.apply(null,t),r;try{r=$t.readFileSync(e,"utf-8")}catch{return}return ih(r,e,"json")},Hm=ne.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var s in e)s.indexOf(t)===0&&(r[s.substring(n)]=e[s]);return r};ne.ConfigChain=J;function J(){Xr.apply(this),zi.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var Mi={constructor:{value:J}};Object.keys(Xr.prototype).forEach(function(t){Mi[t]=Object.getOwnPropertyDescriptor(Xr.prototype,t)});J.prototype=Object.create(zi.prototype,Mi);J.prototype.del=function(t,e){if(e){var r=this.sources[e];if(r=r&&r.data,!r)return this.emit("error",new Error("not found "+e));delete r[t]}else for(var n=0,s=this.list.length;n<s;n++)delete this.list[n][t];return this};J.prototype.set=function(t,e,r){var n;if(r){if(n=this.sources[r],n=n&&n.data,!n)return this.emit("error",new Error("not found "+r))}else if(n=this.list[0],!n)return this.emit("error",new Error("cannot set, no confs!"));return n[t]=e,this};J.prototype.get=function(t,e){return e?(e=this.sources[e],e&&(e=e.data),e&&Object.hasOwnProperty.call(e,t)?e[t]:void 0):this.list[0][t]};J.prototype.save=function(t,i,r){typeof i=="function"&&(r=i,i=null);var n=this.sources[t];if(!n||!(n.path||n.source)||!n.data)return this.emit("error",new Error("bad save target: "+t));if(n.source){var s=n.prefix||"";return Object.keys(n.data).forEach(function(a){n.source[s+a]=n.data[a]}),this}var i=i||n.type,o=n.data;return n.type==="json"?o=JSON.stringify(o):o=Qr.stringify(o),this._saving++,$t.writeFile(n.path,o,"utf8",function(a){if(this._saving--,a)return r?r(a):this.emit("error",a);this._saving===0&&(r&&r(),this.emit("save"))}.bind(this)),this};J.prototype.addFile=function(t,e,r){r=r||t;var n={__source__:r};return this.sources[r]={path:t,type:e},this.push(n),this._await(),$t.readFile(t,"utf8",function(s,i){s&&this.emit("error",s),this.addString(i,t,e,n)}.bind(this)),this};J.prototype.addEnv=function(t,e,r){r=r||"env";var n=ne.env(t,e);return this.sources[r]={data:n,source:e,prefix:t},this.add(n,r)};J.prototype.addUrl=function(t,e,r){this._await();var n=nh.format(t);r=r||n;var s={__source__:r};return this.sources[r]={href:n,type:e},this.push(s),sh.request(t,function(i){var o=[],a=i.headers["content-type"];e||(e=a.indexOf("json")!==-1?"json":a.indexOf("ini")!==-1?"ini":n.match(/\.json$/)?"json":n.match(/\.ini$/)?"ini":null,s.type=e),i.on("data",o.push.bind(o)).on("end",function(){this.addString(Buffer.concat(o),n,e,s)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this};J.prototype.addString=function(t,e,r,n){return t=this.parse(t,e,r),this.add(t,n),this};J.prototype.add=function(t,e){if(e&&typeof e=="object"){var r=this.list.indexOf(e);if(r===-1)return this.emit("error",new Error("bad marker"));this.splice(r,1,t),e=e.__source__,this.sources[e]=this.sources[e]||{},this.sources[e].data=t,this._resolve()}else typeof e=="string"&&(this.sources[e]=this.sources[e]||{},this.sources[e].data=t),this._await(),this.push(t),process.nextTick(this._resolve.bind(this));return this};J.prototype.parse=ne.parse;J.prototype._await=function(){this._awaiting++};J.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)}});var Ki=C((Dm,Ji)=>{f();Ji.exports=function(t){let e=t.indexOf(":");if(e===-1)return Gi(t);let r=t.substr(0,e),n=t.substr(e+1);return`${r}:${Gi(n)}`};function Gi(t){if(t=t.toLowerCase(),t==="_authtoken")return"_authToken";let e=t[0];for(let r=1;r<t.length;r++)e+=t[r]==="_"?"-":t[r];return e}});var Yi=C(Bt=>{"use strict";f();Object.defineProperty(Bt,"__esModule",{value:!0});Bt.envReplace=void 0;var ah=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function ch(t,e){return t.replace(ah,uh.bind(null,e))}Bt.envReplace=ch;function uh(t,e,r,n){if(r.length%2)return e.slice((r.length+1)/2);let s=lh(t,n);if(s===void 0)throw new Error(`Failed to replace env in config: ${e}`);return`${r.slice(r.length/2)}${s}`}var hh=/([^:-]+)(:?)-(.+)/;function lh(t,e){let r=e.match(hh);if(!r)return t[e];let[,n,s,i]=r;return Object.prototype.hasOwnProperty.call(t,n)?!t[n]&&s?i:t[n]:i}});var Qi=C(Ut=>{"use strict";f();Object.defineProperty(Ut,"__esModule",{value:!0});Ut.envReplace=void 0;var fh=Yi();Object.defineProperty(Ut,"envReplace",{enumerable:!0,get:function(){return fh.envReplace}})});var Xi=C(ut=>{"use strict";f();var dh=R("fs"),be=R("path"),{envReplace:Zr}=Qi(),ph=t=>typeof t!="string"?t:Zr(t,process.env),mh=(t,e,r)=>{if(typeof e!="string")return e;let n=[].concat(t[r]),s=n.indexOf(be)!==-1,i=n.indexOf(Boolean)!==-1,o=n.indexOf(String)!==-1,a=n.indexOf(Number)!==-1;if(e=`${e}`.trim(),/^".*"$/.test(e))try{e=JSON.parse(e)}catch{throw new Error(`Failed parsing JSON config key ${r}: ${e}`)}if(i&&!o&&e==="")return!0;switch(e){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}let u=Zr(e,process.env);if((r.endsWith(":tokenHelper")||r==="tokenHelper")&&u!==e)throw new Error(`It is not allowed to use environment variables in the value of the ${r} setting.`);return e=u,s&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(e)&&process.env.HOME&&(e=be.resolve(process.env.HOME,e.substr(2))),e=be.resolve(e)),a&&!isNaN(e)&&(e=Number(e)),e},yh=t=>{t=be.resolve(t);let e=!1;for(;be.basename(t)==="node_modules";)t=be.dirname(t),e=!0;if(e)return t;let r=(n,s)=>{let i=/^[a-zA-Z]:(\\|\/)?$/;if(n==="/"||process.platform==="win32"&&i.test(n))return s;try{let o=dh.readdirSync(n);if(o.includes("node_modules")||o.includes("package.json")||o.includes("package.json5")||o.includes("package.yaml")||o.includes("pnpm-workspace.yaml"))return n;let a=be.dirname(n);return a===n?s:r(a,s)}catch(o){if(n===s){if(o.code==="ENOENT")return s;throw o}return s}};return r(t,t)};ut.envReplace=Zr;ut.findPrefix=yh;ut.parseField=mh;ut.parseKey=ph});var to=C(eo=>{"use strict";f();var _e=R("path"),gh=R("stream").Stream,zt=R("url"),bh=()=>{},_h=()=>[],Zi=()=>{};eo.types={access:[null,"restricted","public"],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,"dev","development"],audit:Boolean,"auth-type":["legacy","sso","saml","oauth"],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:_e,cache:_e,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:["always",Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:_e,"global-style":Boolean,group:[Number,String],"https-proxy":[null,zt],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":_e,"init-author-name":String,"init-author-email":String,"init-author-url":["",zt],"init-license":String,"init-version":Zi,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":_h(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:gh,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,Zi],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,"dev","development","prod","production"],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:_e,production:Boolean,progress:Boolean,proxy:[null,!1,zt],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,zt],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,"auto","warn-only"],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,"oauth","saml"],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:_e,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:_e,umask:bh,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}});var so=C((Km,no)=>{"use strict";f();var{readCAFileSync:wh}=Di(),ro=R("fs"),en=R("path"),{ConfigChain:Eh}=Vi(),Sh=Ki(),tn=Xi(),rn=class extends Eh{constructor(e,r){super(e),this.root=e,this._parseField=tn.parseField.bind(null,r||to())}add(e,r){try{for(let[n,s]of Object.entries(e)){let i=tn.parseKey(n);i!==n&&delete e[n],e[i]=this._parseField(s,i)}}catch(n){throw n}return super.add(e,r)}addFile(e,r){r=r||e;let n={__source__:r};this.sources[r]={path:e,type:"ini"},this.push(n),this._await();try{let s=ro.readFileSync(e,"utf8");this.addString(s,e,"ini",n)}catch(s){if(s.code==="ENOENT")this.add({},n);else if(s.code!=="EISDIR")return`Issue while reading "${e}". ${s.message}`}}addEnv(e){e=e||process.env;let r={};return Object.keys(e).filter(n=>/^npm_config_/i.test(n)).forEach(n=>{if(!e[n])return;let s=Sh(n.substr(11)),i=e[n];r[s]=xh(s,i)}),super.addEnv("",r,"env")}loadPrefix(){let e=this.list[0];Object.defineProperty(this,"prefix",{enumerable:!0,set:n=>{let s=this.get("global");this[s?"globalPrefix":"localPrefix"]=n},get:()=>this.get("global")?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,"globalPrefix",{enumerable:!0,set:n=>{this.set("prefix",n)},get:()=>en.resolve(this.get("prefix"))});let r;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:n=>{r=n},get:()=>r}),Object.prototype.hasOwnProperty.call(e,"prefix"))r=en.resolve(e.prefix);else try{r=tn.findPrefix(process.cwd())}catch(n){throw n}return r}loadCAFile(e){if(!e)return;let r=wh(e);r&&this.set("ca",r)}loadUser(){let e=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}let r=en.resolve(this.get("prefix"));try{let n=ro.statSync(r);e.user=n.uid}catch(n){if(n.code==="ENOENT")return;throw n}}};function xh(t,e){function r(n){return n.indexOf(`
|
|
8
|
+
|
|
9
|
+
`)?n.split(`
|
|
10
|
+
|
|
11
|
+
`):n.split(",")}switch(t){case"hoist-pattern":case"public-hoist-pattern":return r(e)}return e}no.exports=rn});var ho=C(uo=>{"use strict";f();var ao=R("os"),se=R("path"),co=ao.tmpdir(),vh=process.getuid?process.getuid():process.pid,Oh=()=>!0,io=process.platform==="win32",oo={editor:()=>process.env.EDITOR||process.env.VISUAL||(io?"notepad.exe":"vi"),shell:()=>io?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},Rh={fromString:()=>process.umask()},He=ao.homedir();He?process.env.HOME=He:He=se.resolve(co,"npm-"+vh);var Ch=process.platform==="win32"?"npm-cache":".npm",Ph=process.platform==="win32"&&process.env.APPDATA||He,Th=se.resolve(Ph,Ch),Mt,we;Object.defineProperty(uo,"defaults",{get:function(){return Mt||(process.env.PREFIX?we=process.env.PREFIX:process.platform==="win32"?we=se.dirname(process.execPath):(we=se.dirname(se.dirname(process.execPath)),process.env.DESTDIR&&(we=se.join(process.env.DESTDIR,we))),Mt={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:Th,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:oo.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:se.resolve(we,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":se.resolve(He,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:we,production:!1,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:oo.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:co,unicode:Oh(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:se.resolve(He,".npmrc"),umask:process.umask?process.umask():Rh.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},Mt)}})});var fo=C((Zm,nn)=>{"use strict";f();var Ee=R("path"),Ah=so(),lo=ho();nn.exports=(t,e,r)=>{let n=new Ah(Object.assign({},lo.defaults,r),e);n.add(Object.assign({},t),"cli");let s=[],i=!1;if(R.resolve.paths){let l=R.resolve.paths("npm"),d;try{d=R.resolve("npm",{paths:l.slice(-1)})}catch{i=!0}d&&s.push(n.addFile(Ee.resolve(Ee.dirname(d),"..","npmrc"),"builtin"))}n.addEnv(),n.loadPrefix();let o=Ee.resolve(n.localPrefix,".npmrc"),a=n.get("userconfig");if(!n.get("global")&&o!==a?s.push(n.addFile(o,"project")):n.add({},"project"),n.get("workspace-prefix")&&n.get("workspace-prefix")!==o){let l=Ee.resolve(n.get("workspace-prefix"),".npmrc");s.push(n.addFile(l,"workspace"))}if(s.push(n.addFile(n.get("userconfig"),"user")),n.get("prefix")){let l=Ee.resolve(n.get("prefix"),"etc");n.root.globalconfig=Ee.resolve(l,"npmrc"),n.root.globalignorefile=Ee.resolve(l,"npmignore")}s.push(n.addFile(n.get("globalconfig"),"global")),n.loadUser();let u=n.get("cafile");return u&&n.loadCAFile(u),{config:n,warnings:s.filter(Boolean),failedToLoadBuiltInConfig:i}};Object.defineProperty(nn.exports,"defaults",{get(){return lo.defaults},enumerable:!0})});var Eo=C((ry,wo)=>{f();var po=fo(),mo=":_authToken",yo=":_auth",go=":username",bo=":_password";wo.exports=function(){let e,r;arguments.length>=2?(e=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?e=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:s=>n[s]}}:po()).config,e=e||r.npmrc.get("registry")||po.defaults.registry,_o(e,r)||jh(r.npmrc)};function kh(t,e){let r=new URL(e,new URL(t.startsWith("//")?`./${t}`:t,"resolve://"));if(r.protocol==="resolve:"){let{pathname:n,search:s,hash:i}=r;return n+s+i}return r.toString()}function _o(t,e){let r=t instanceof URL?t:new URL(t.startsWith("//")?`http:${t}`:t),n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";let s="//"+r.host+n.replace(/\/$/,""),i=Nh(s,e.npmrc);if(i)return i;if(!e.recursive)return/\/$/.test(t)?void 0:_o(new URL("./",r),e);r.pathname=kh(qh(n),"..")||"/"}}function jh(t){return t.get("_auth")?{token:Wt(t.get("_auth")),type:"Basic"}:void 0}function qh(t){return t[t.length-1]==="/"?t:t+"/"}function Nh(t,e){let r=Lh(e.get(t+mo)||e.get(t+"/"+mo));if(r)return r;let n=e.get(t+go)||e.get(t+"/"+go),s=e.get(t+bo)||e.get(t+"/"+bo),i=Ih(n,s);if(i)return i;let o=Hh(e.get(t+yo)||e.get(t+"/"+yo));if(o)return o}function Wt(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function Lh(t){return t?{token:Wt(t),type:"Bearer"}:void 0}function Ih(t,e){if(!t||!e)return;let r=Buffer.from(Wt(e),"base64").toString("utf8");return{token:Buffer.from(t+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:t}}function Hh(t){return t?{token:Wt(t),type:"Basic"}:void 0}});f();f();import{Agent as Fh}from"node:http";import{Agent as Dh}from"node:https";f();f();f();var un=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Ro(t){return un.includes(t)}var Co=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...un];function Po(t){return Co.includes(t)}var To=["null","undefined","string","number","bigint","boolean","symbol"];function Ao(t){return To.includes(t)}function Se(t){return e=>typeof e===t}var{toString:ko}=Object.prototype,Fe=t=>{let e=ko.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&c.domElement(t))return"HTMLElement";if(Po(e))return e},q=t=>e=>Fe(e)===t;function c(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(c.observable(t))return"Observable";if(c.array(t))return"Array";if(c.buffer(t))return"Buffer";let e=Fe(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}c.undefined=Se("undefined");c.string=Se("string");var jo=Se("number");c.number=t=>jo(t)&&!c.nan(t);c.positiveNumber=t=>c.number(t)&&t>0;c.negativeNumber=t=>c.number(t)&&t<0;c.bigint=Se("bigint");c.function_=Se("function");c.null_=t=>t===null;c.class_=t=>c.function_(t)&&t.toString().startsWith("class ");c.boolean=t=>t===!0||t===!1;c.symbol=Se("symbol");c.numericString=t=>c.string(t)&&!c.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));c.array=(t,e)=>Array.isArray(t)?c.function_(e)?t.every(r=>e(r)):!0:!1;c.buffer=t=>t?.constructor?.isBuffer?.(t)??!1;c.blob=t=>q("Blob")(t);c.nullOrUndefined=t=>c.null_(t)||c.undefined(t);c.object=t=>!c.null_(t)&&(typeof t=="object"||c.function_(t));c.iterable=t=>c.function_(t?.[Symbol.iterator]);c.asyncIterable=t=>c.function_(t?.[Symbol.asyncIterator]);c.generator=t=>c.iterable(t)&&c.function_(t?.next)&&c.function_(t?.throw);c.asyncGenerator=t=>c.asyncIterable(t)&&c.function_(t.next)&&c.function_(t.throw);c.nativePromise=t=>q("Promise")(t);var qo=t=>c.function_(t?.then)&&c.function_(t?.catch);c.promise=t=>c.nativePromise(t)||qo(t);c.generatorFunction=q("GeneratorFunction");c.asyncGeneratorFunction=t=>Fe(t)==="AsyncGeneratorFunction";c.asyncFunction=t=>Fe(t)==="AsyncFunction";c.boundFunction=t=>c.function_(t)&&!t.hasOwnProperty("prototype");c.regExp=q("RegExp");c.date=q("Date");c.error=q("Error");c.map=t=>q("Map")(t);c.set=t=>q("Set")(t);c.weakMap=t=>q("WeakMap")(t);c.weakSet=t=>q("WeakSet")(t);c.weakRef=t=>q("WeakRef")(t);c.int8Array=q("Int8Array");c.uint8Array=q("Uint8Array");c.uint8ClampedArray=q("Uint8ClampedArray");c.int16Array=q("Int16Array");c.uint16Array=q("Uint16Array");c.int32Array=q("Int32Array");c.uint32Array=q("Uint32Array");c.float32Array=q("Float32Array");c.float64Array=q("Float64Array");c.bigInt64Array=q("BigInt64Array");c.bigUint64Array=q("BigUint64Array");c.arrayBuffer=q("ArrayBuffer");c.sharedArrayBuffer=q("SharedArrayBuffer");c.dataView=q("DataView");c.enumCase=(t,e)=>Object.values(e).includes(t);c.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;c.urlInstance=t=>q("URL")(t);c.urlString=t=>{if(!c.string(t))return!1;try{return new URL(t),!0}catch{return!1}};c.truthy=t=>!!t;c.falsy=t=>!t;c.nan=t=>Number.isNaN(t);c.primitive=t=>c.null_(t)||Ao(typeof t);c.integer=t=>Number.isInteger(t);c.safeInteger=t=>Number.isSafeInteger(t);c.plainObject=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};c.typedArray=t=>Ro(Fe(t));var No=t=>c.safeInteger(t)&&t>=0;c.arrayLike=t=>!c.nullOrUndefined(t)&&!c.function_(t)&&No(t.length);c.tupleLike=(t,e)=>c.array(e)&&c.array(t)&&e.length===t.length?e.every((r,n)=>r(t[n])):!1;c.inRange=(t,e)=>{if(c.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(c.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var Lo=1,Io=["innerHTML","ownerDocument","style","attributes","nodeValue"];c.domElement=t=>c.object(t)&&t.nodeType===Lo&&c.string(t.nodeName)&&!c.plainObject(t)&&Io.every(e=>e in t);c.observable=t=>t?t===t[Symbol.observable]?.()||t===t["@@observable"]?.():!1;c.nodeStream=t=>c.object(t)&&c.function_(t.pipe)&&!c.observable(t);c.infinite=t=>t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY;var hn=t=>e=>c.integer(e)&&Math.abs(e%2)===t;c.evenInteger=hn(0);c.oddInteger=hn(1);c.emptyArray=t=>c.array(t)&&t.length===0;c.nonEmptyArray=t=>c.array(t)&&t.length>0;c.emptyString=t=>c.string(t)&&t.length===0;var Ho=t=>c.string(t)&&!/\S/.test(t);c.emptyStringOrWhitespace=t=>c.emptyString(t)||Ho(t);c.nonEmptyString=t=>c.string(t)&&t.length>0;c.nonEmptyStringAndNotWhitespace=t=>c.string(t)&&!c.emptyStringOrWhitespace(t);c.emptyObject=t=>c.object(t)&&!c.map(t)&&!c.set(t)&&Object.keys(t).length===0;c.nonEmptyObject=t=>c.object(t)&&!c.map(t)&&!c.set(t)&&Object.keys(t).length>0;c.emptySet=t=>c.set(t)&&t.size===0;c.nonEmptySet=t=>c.set(t)&&t.size>0;c.emptyMap=t=>c.map(t)&&t.size===0;c.nonEmptyMap=t=>c.map(t)&&t.size>0;c.propertyKey=t=>c.any([c.string,c.number,c.symbol],t);c.formData=t=>q("FormData")(t);c.urlSearchParams=t=>q("URLSearchParams")(t);var ln=(t,e,r)=>{if(!c.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};c.any=(t,...e)=>(c.array(t)?t:[t]).some(n=>ln(Array.prototype.some,n,e));c.all=(t,...e)=>ln(Array.prototype.every,t,e);var E=(t,e,r,n={})=>{if(!t){let{multipleValues:s}=n,i=s?`received values of types ${[...new Set(r.map(o=>`\`${c(o)}\``))].join(", ")}`:`received value of type \`${c(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${i}.`)}},_={undefined:t=>E(c.undefined(t),"undefined",t),string:t=>E(c.string(t),"string",t),number:t=>E(c.number(t),"number",t),positiveNumber:t=>E(c.positiveNumber(t),"positive number",t),negativeNumber:t=>E(c.negativeNumber(t),"negative number",t),bigint:t=>E(c.bigint(t),"bigint",t),function_:t=>E(c.function_(t),"Function",t),null_:t=>E(c.null_(t),"null",t),class_:t=>E(c.class_(t),"Class",t),boolean:t=>E(c.boolean(t),"boolean",t),symbol:t=>E(c.symbol(t),"symbol",t),numericString:t=>E(c.numericString(t),"string with a number",t),array:(t,e)=>{E(c.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>E(c.buffer(t),"Buffer",t),blob:t=>E(c.blob(t),"Blob",t),nullOrUndefined:t=>E(c.nullOrUndefined(t),"null or undefined",t),object:t=>E(c.object(t),"Object",t),iterable:t=>E(c.iterable(t),"Iterable",t),asyncIterable:t=>E(c.asyncIterable(t),"AsyncIterable",t),generator:t=>E(c.generator(t),"Generator",t),asyncGenerator:t=>E(c.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>E(c.nativePromise(t),"native Promise",t),promise:t=>E(c.promise(t),"Promise",t),generatorFunction:t=>E(c.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>E(c.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>E(c.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>E(c.boundFunction(t),"Function",t),regExp:t=>E(c.regExp(t),"RegExp",t),date:t=>E(c.date(t),"Date",t),error:t=>E(c.error(t),"Error",t),map:t=>E(c.map(t),"Map",t),set:t=>E(c.set(t),"Set",t),weakMap:t=>E(c.weakMap(t),"WeakMap",t),weakSet:t=>E(c.weakSet(t),"WeakSet",t),weakRef:t=>E(c.weakRef(t),"WeakRef",t),int8Array:t=>E(c.int8Array(t),"Int8Array",t),uint8Array:t=>E(c.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>E(c.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>E(c.int16Array(t),"Int16Array",t),uint16Array:t=>E(c.uint16Array(t),"Uint16Array",t),int32Array:t=>E(c.int32Array(t),"Int32Array",t),uint32Array:t=>E(c.uint32Array(t),"Uint32Array",t),float32Array:t=>E(c.float32Array(t),"Float32Array",t),float64Array:t=>E(c.float64Array(t),"Float64Array",t),bigInt64Array:t=>E(c.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>E(c.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>E(c.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>E(c.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>E(c.dataView(t),"DataView",t),enumCase:(t,e)=>E(c.enumCase(t,e),"EnumCase",t),urlInstance:t=>E(c.urlInstance(t),"URL",t),urlString:t=>E(c.urlString(t),"string with a URL",t),truthy:t=>E(c.truthy(t),"truthy",t),falsy:t=>E(c.falsy(t),"falsy",t),nan:t=>E(c.nan(t),"NaN",t),primitive:t=>E(c.primitive(t),"primitive",t),integer:t=>E(c.integer(t),"integer",t),safeInteger:t=>E(c.safeInteger(t),"integer",t),plainObject:t=>E(c.plainObject(t),"plain object",t),typedArray:t=>E(c.typedArray(t),"TypedArray",t),arrayLike:t=>E(c.arrayLike(t),"array-like",t),tupleLike:(t,e)=>E(c.tupleLike(t,e),"tuple-like",t),domElement:t=>E(c.domElement(t),"HTMLElement",t),observable:t=>E(c.observable(t),"Observable",t),nodeStream:t=>E(c.nodeStream(t),"Node.js Stream",t),infinite:t=>E(c.infinite(t),"infinite number",t),emptyArray:t=>E(c.emptyArray(t),"empty array",t),nonEmptyArray:t=>E(c.nonEmptyArray(t),"non-empty array",t),emptyString:t=>E(c.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>E(c.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>E(c.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>E(c.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>E(c.emptyObject(t),"empty object",t),nonEmptyObject:t=>E(c.nonEmptyObject(t),"non-empty object",t),emptySet:t=>E(c.emptySet(t),"empty set",t),nonEmptySet:t=>E(c.nonEmptySet(t),"non-empty set",t),emptyMap:t=>E(c.emptyMap(t),"empty map",t),nonEmptyMap:t=>E(c.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>E(c.propertyKey(t),"PropertyKey",t),formData:t=>E(c.formData(t),"FormData",t),urlSearchParams:t=>E(c.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>E(c.evenInteger(t),"even integer",t),oddInteger:t=>E(c.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>E(c.directInstanceOf(t,e),"T",t),inRange:(t,e)=>E(c.inRange(t,e),"in range",t),any:(t,...e)=>E(c.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>E(c.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(c,{class:{value:c.class_},function:{value:c.function_},null:{value:c.null_}});Object.defineProperties(_,{class:{value:_.class_},function:{value:_.function_},null:{value:_.null_}});var h=c;f();import{EventEmitter as Ru}from"node:events";f();var Vt=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},xe=class t{static fn(e){return(...r)=>new t((n,s,i)=>{r.push(i),e(...r).then(n,s)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,n)=>{this._reject=n;let s=a=>{(!this._isCanceled||!o.shouldReject)&&(this._isPending=!1,r(a))},i=a=>{this._isPending=!1,n(a)},o=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};Object.defineProperties(o,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(s,i,o)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new Vt(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(xe.prototype,Promise.prototype);f();function Fo(t){return h.object(t)&&"_onResponse"in t}var F=class extends Error{constructor(e,r,n){if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code??"ERR_GOT_REQUEST_ERROR",this.input=r.input,Fo(n)?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,h.string(r.stack)&&h.string(this.stack)){let s=this.stack.indexOf(this.message)+this.message.length,i=this.stack.slice(s).split(`
|
|
12
|
+
`).reverse(),o=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
|
13
|
+
`).reverse();for(;o.length>0&&o[0]===i[0];)i.shift();this.stack=`${this.stack.slice(0,s)}${i.reverse().join(`
|
|
14
|
+
`)}${o.reverse().join(`
|
|
15
|
+
`)}`}}},ht=class extends F{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}},ie=class extends F{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}},lt=class extends F{constructor(e,r){super(e.message,e,r),this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}},De=class extends F{constructor(e,r){super(e.message,e,r),this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}},ft=class extends F{constructor(e,r,n){super(e.message,e,n),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.event=e.event,this.timings=r}},$e=class extends F{constructor(e,r){super(e.message,e,r),this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}},dt=class extends F{constructor(e){super("Retrying",{},e),this.name="RetryError",this.code="ERR_RETRYING"}},pt=class extends F{constructor(e){super("This operation was aborted.",{},e),this.code="ERR_ABORTED",this.name="AbortError"}};f();import Xs from"node:process";import{Buffer as $r}from"node:buffer";import{Duplex as gu}from"node:stream";import{URL as bu,URLSearchParams as _u}from"node:url";import wu,{ServerResponse as Qs}from"node:http";f();var dn=ee(fn(),1);import{errorMonitor as $o}from"events";import{types as Bo}from"util";var Uo=t=>{if(t.timings)return t.timings;let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=o=>{o.once($o,()=>{e.error=Date.now(),e.phases.total=e.error-e.start})};r(t);let n=()=>{e.abort=Date.now(),e.phases.total=e.abort-e.start};t.prependOnceListener("abort",n);let s=o=>{if(e.socket=Date.now(),e.phases.wait=e.socket-e.start,Bo.isProxy(o))return;let a=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};o.prependOnceListener("lookup",a),(0,dn.default)(o,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(o.removeListener("lookup",a),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?s(t.socket):t.prependOnceListener("socket",s);let i=()=>{e.upload=Date.now(),e.phases.request=e.upload-(e.secureConnect??e.connect)};return t.writableFinished?i():t.prependOnceListener("finish",i),t.prependOnceListener("response",o=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,o.timings=e,r(o),o.prependOnceListener("end",()=>{t.off("abort",n),o.off("aborted",n),!e.phases.total&&(e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start)}),o.prependOnceListener("aborted",n)}),e},pn=Uo;f();import ia from"node:events";import yt from"node:url";import oa from"node:crypto";import aa,{PassThrough as ca}from"node:stream";f();var zo="text/plain",Mo="us-ascii",Yt=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),Wo=new Set(["https:","http:","file:"]),Vo=t=>{try{let{protocol:e}=new URL(t);return e.endsWith(":")&&!e.includes(".")&&!Wo.has(e)}catch{return!1}},Go=(t,{stripHash:e})=>{let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:n,data:s,hash:i}=r.groups,o=n.split(";"),a=o.at(-1)==="base64";a&&o.pop();let u=o.shift()?.toLowerCase()??"",d=[...o.map(m=>{let[y,b=""]=m.split("=").map(p=>p.trim());return y==="charset"&&(b=b.toLowerCase(),b===Mo)?"":`${y}${b?`=${b}`:""}`}).filter(Boolean)];a&&d.push("base64"),(d.length>0||u&&u!==zo)&&d.unshift(u);let g=e||!i?"":`#${i}`;return`data:${d.join(";")},${a?s.trim():s}${g}`};function Qt(t,e){if(e={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,removePath:!1,transformPath:!1,...e},typeof e.defaultProtocol=="string"&&!e.defaultProtocol.endsWith(":")&&(e.defaultProtocol=`${e.defaultProtocol}:`),t=t.trim(),/^data:/i.test(t))return Go(t,e);if(Vo(t))return t;let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let s=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&s.protocol==="https:"&&(s.protocol="http:"),e.forceHttps&&s.protocol==="http:"&&(s.protocol="https:"),e.stripAuthentication&&(s.username="",s.password=""),e.stripHash?s.hash="":e.stripTextFragment&&(s.hash=s.hash.replace(/#?:~:text.*?$/i,"")),s.pathname){let o=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,a=0,u="";for(;;){let d=o.exec(s.pathname);if(!d)break;let g=d[0],m=d.index,y=s.pathname.slice(a,m);u+=y.replace(/\/{2,}/g,"/"),u+=g,a=m+g.length}let l=s.pathname.slice(a,s.pathname.length);u+=l.replace(/\/{2,}/g,"/"),s.pathname=u}if(s.pathname)try{s.pathname=decodeURI(s.pathname).replace(/\\/g,"%5C")}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let o=s.pathname.split("/").filter(Boolean),a=o.at(-1);a&&Yt(a,e.removeDirectoryIndex)&&(o.pop(),s.pathname=o.length>0?`/${o.join("/")}/`:"/")}if(e.removePath&&(s.pathname="/"),e.transformPath&&typeof e.transformPath=="function"){let o=s.pathname.split("/").filter(Boolean),a=e.transformPath(o);s.pathname=a?.length>0?`/${a.join("/")}`:"/"}if(s.hostname&&(s.hostname=s.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(s.hostname)&&(s.hostname=s.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let o of[...s.searchParams.keys()])Yt(o,e.removeQueryParameters)&&s.searchParams.delete(o);if(!Array.isArray(e.keepQueryParameters)&&e.removeQueryParameters===!0&&(s.search=""),Array.isArray(e.keepQueryParameters)&&e.keepQueryParameters.length>0)for(let o of[...s.searchParams.keys()])Yt(o,e.keepQueryParameters)||s.searchParams.delete(o);if(e.sortQueryParameters){let o=s.search;s.searchParams.sort();try{s.search=decodeURIComponent(s.search)}catch{}let a=o.slice(1).split("&").filter(u=>u&&!u.includes("="));for(let u of a){let l=decodeURIComponent(u);s.search=s.search.replace(`?${l}=`,`?${l}`).replace(`&${l}=`,`&${l}`)}}e.removeTrailingSlash&&(s.pathname=s.pathname.replace(/\/$/,"")),e.removeExplicitPort&&s.port&&(s.port="");let i=t;return t=s.toString(),!e.removeSingleSlash&&s.pathname==="/"&&!i.endsWith("/")&&s.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||s.pathname==="/")&&s.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}var xn=ee(cn(),1),gt=ee(yn(),1);f();import{Readable as ta}from"node:stream";f();function ve(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLowerCase(),r]))}var Oe=class extends ta{statusCode;headers;body;url;constructor({statusCode:e,headers:r,body:n,url:s}){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Uint8Array))throw new TypeError("Argument `body` should be a buffer");if(typeof s!="string")throw new TypeError("Argument `url` should be a string");super({read(){this.push(n),this.push(null)}}),this.statusCode=e,this.headers=ve(r),this.body=n,this.url=s}};var Be=ee(En(),1);f();var sa=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];function tr(t,e){if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set([...Object.keys(t),...sa]),n={};for(let s of r)s in e||(n[s]={get(){let i=t[s];return typeof i=="function"?i.bind(t):i},set(i){t[s]=i},enumerable:!0,configurable:!1});return Object.defineProperties(e,n),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}f();var mt=class extends Error{constructor(e){super(e.message),Object.assign(this,e)}},re=class extends Error{constructor(e){super(e.message),Object.assign(this,e)}};var nr=class{constructor(e,r){this.hooks=new Map,this.request=()=>(n,s)=>{let i;if(typeof n=="string")i=rr(yt.parse(n)),n={};else if(n instanceof yt.URL)i=rr(yt.parse(n.toString())),n={};else{let[m,...y]=(n.path??"").split("?"),b=y.length>0?`?${y.join("?")}`:"";i=rr({...n,pathname:m,search:b})}n={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...n,...la(i)},n.headers=Object.fromEntries(ua(n.headers).map(([m,y])=>[m.toLowerCase(),y]));let o=new ia,a=Qt(yt.format(i),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),u=`${n.method}:${a}`;n.body&&n.method!==void 0&&["POST","PATCH","PUT"].includes(n.method)&&(n.body instanceof aa.Readable?n.cache=!1:u+=`:${oa.createHash("md5").update(n.body).digest("hex")}`);let l=!1,d=!1,g=m=>{d=!0;let y=!1,b=()=>{},p=new Promise(w=>{b=()=>{y||(y=!0,w())}}),v=async w=>{if(l){w.status=w.statusCode;let S=gt.default.fromObject(l.cachePolicy).revalidatedPolicy(m,w);if(!S.modified){w.resume(),await new Promise(T=>{w.once("end",T)});let x=Sn(S.policy.responseHeaders());w=new Oe({statusCode:l.statusCode,headers:x,body:l.body,url:l.url}),w.cachePolicy=S.policy,w.fromCache=!0}}w.fromCache||(w.cachePolicy=new gt.default(m,w,m),w.fromCache=!1);let P;m.cache&&w.cachePolicy.storable()?(P=ha(w),(async()=>{try{let S=xn.default.buffer(w);await Promise.race([p,new Promise(A=>w.once("end",A)),new Promise(A=>w.once("close",A))]);let x=await S,T={url:w.url,statusCode:w.fromCache?l.statusCode:w.statusCode,body:x,cachePolicy:w.cachePolicy.toObject()},N=m.strictTtl?w.cachePolicy.timeToLive():void 0;if(m.maxTtl&&(N=N?Math.min(N,m.maxTtl):m.maxTtl),this.hooks.size>0)for(let A of this.hooks.keys())T=await this.runHook(A,T,w);await this.cache.set(u,T,N)}catch(S){o.emit("error",new re(S))}})()):m.cache&&l&&(async()=>{try{await this.cache.delete(u)}catch(S){o.emit("error",new re(S))}})(),o.emit("response",P??w),typeof s=="function"&&s(P??w)};try{let w=this.cacheRequest(m,v);w.once("error",b),w.once("abort",b),w.once("destroy",b),o.emit("request",w)}catch(w){o.emit("error",new mt(w))}};return(async()=>{let m=async b=>{await Promise.resolve();let p=b.cache?await this.cache.get(u):void 0;if(p===void 0&&!b.forceRefresh){g(b);return}let v=gt.default.fromObject(p.cachePolicy);if(v.satisfiesWithoutRevalidation(b)&&!b.forceRefresh){let w=Sn(v.responseHeaders()),P=new Oe({statusCode:p.statusCode,headers:w,body:p.body,url:p.url});P.cachePolicy=v,P.fromCache=!0,o.emit("response",P),typeof s=="function"&&s(P)}else v.satisfiesWithoutRevalidation(b)&&Date.now()>=v.timeToLive()&&b.forceRefresh?(await this.cache.delete(u),b.headers=v.revalidationHeaders(b),g(b)):(l=p,b.headers=v.revalidationHeaders(b),g(b))},y=b=>o.emit("error",new re(b));if(this.cache instanceof Be.default){let b=this.cache;b.once("error",y),o.on("error",()=>b.removeListener("error",y)),o.on("response",()=>b.removeListener("error",y))}try{await m(n)}catch(b){n.automaticFailover&&!d&&g(n),o.emit("error",new re(b))}})(),o},this.addHook=(n,s)=>{this.hooks.has(n)||this.hooks.set(n,s)},this.removeHook=n=>this.hooks.delete(n),this.getHook=n=>this.hooks.get(n),this.runHook=async(n,...s)=>this.hooks.get(n)?.(...s),r instanceof Be.default?this.cache=r:typeof r=="string"?this.cache=new Be.default({uri:r,namespace:"cacheable-request"}):this.cache=new Be.default({store:r,namespace:"cacheable-request"}),this.request=this.request.bind(this),this.cacheRequest=e}},ua=Object.entries,ha=t=>{let e=new ca({autoDestroy:!1});return tr(t,e),t.pipe(e)},la=t=>{let e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e},rr=t=>({protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}),Sn=t=>{let e=[];for(let r of Object.keys(t))e[r.toLowerCase()]=t[r];return e},vn=nr;var Zs=ee(Pn(),1);var ei=ee(cn(),1);f();f();f();var Q=t=>typeof t=="function";var ya=t=>Q(t[Symbol.asyncIterator]);async function*ga(t){let e=t.getReader();for(;;){let{done:r,value:n}=await e.read();if(r)break;yield n}}var Tn=t=>{if(ya(t))return t;if(Q(t.getReader))return ga(t);throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.")};f();var An="abcdefghijklmnopqrstuvwxyz0123456789";function kn(){let t=16,e="";for(;t--;)e+=An[Math.random()*An.length<<0];return e}f();var ir=t=>String(t).replace(/\r|\n/g,(e,r,n)=>e==="\r"&&n[r+1]!==`
|
|
16
|
+
`||e===`
|
|
17
|
+
`&&n[r-1]!=="\r"?`\r
|
|
18
|
+
`:e);f();var ba=t=>Object.prototype.toString.call(t).slice(8,-1).toLowerCase();function or(t){if(ba(t)!=="object")return!1;let e=Object.getPrototypeOf(t);return e==null?!0:(e.constructor&&e.constructor.toString())===Object.toString()}f();function jn(t,e){if(typeof e=="string"){for(let[r,n]of Object.entries(t))if(e.toLowerCase()===r.toLowerCase())return n}}var qn=t=>new Proxy(t,{get:(e,r)=>jn(e,r),has:(e,r)=>jn(e,r)!==void 0});f();var Re=t=>!!(t&&Q(t.constructor)&&t[Symbol.toStringTag]==="FormData"&&Q(t.append)&&Q(t.getAll)&&Q(t.entries)&&Q(t[Symbol.iterator]));f();var ar=t=>String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22");f();var oe=t=>!!(t&&typeof t=="object"&&Q(t.constructor)&&t[Symbol.toStringTag]==="File"&&Q(t.stream)&&t.name!=null);var Ue=function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},I=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ze,ae,Me,bt,We,he,Ve,Ge,_t,cr,Nn,_a={enableAdditionalHeaders:!1},wt={writable:!1,configurable:!1},Et=class{constructor(e,r,n){if(ze.add(this),ae.set(this,`\r
|
|
19
|
+
`),Me.set(this,void 0),bt.set(this,void 0),We.set(this,"-".repeat(2)),he.set(this,new TextEncoder),Ve.set(this,void 0),Ge.set(this,void 0),_t.set(this,void 0),!Re(e))throw new TypeError("Expected first argument to be a FormData instance.");let s;if(or(r)?n=r:s=r,s||(s=kn()),typeof s!="string")throw new TypeError("Expected boundary argument to be a string.");if(n&&!or(n))throw new TypeError("Expected options argument to be an object.");Ue(this,Ge,Array.from(e.entries()),"f"),Ue(this,_t,{..._a,...n},"f"),Ue(this,Me,I(this,he,"f").encode(I(this,ae,"f")),"f"),Ue(this,bt,I(this,Me,"f").byteLength,"f"),this.boundary=`form-data-boundary-${s}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,Ue(this,Ve,I(this,he,"f").encode(`${I(this,We,"f")}${this.boundary}${I(this,We,"f")}${I(this,ae,"f").repeat(2)}`),"f");let i={"Content-Type":this.contentType},o=I(this,ze,"m",Nn).call(this);o&&(this.contentLength=o,i["Content-Length"]=o),this.headers=qn(Object.freeze(i)),Object.defineProperties(this,{boundary:wt,contentType:wt,contentLength:wt,headers:wt})}getContentLength(){return this.contentLength==null?void 0:Number(this.contentLength)}*values(){for(let[e,r]of I(this,Ge,"f")){let n=oe(r)?r:I(this,he,"f").encode(ir(r));yield I(this,ze,"m",cr).call(this,e,n),yield n,yield I(this,Me,"f")}yield I(this,Ve,"f")}async*encode(){for(let e of this.values())oe(e)?yield*Tn(e.stream()):yield e}[(ae=new WeakMap,Me=new WeakMap,bt=new WeakMap,We=new WeakMap,he=new WeakMap,Ve=new WeakMap,Ge=new WeakMap,_t=new WeakMap,ze=new WeakSet,cr=function(r,n){let s="";s+=`${I(this,We,"f")}${this.boundary}${I(this,ae,"f")}`,s+=`Content-Disposition: form-data; name="${ar(r)}"`,oe(n)&&(s+=`; filename="${ar(n.name)}"${I(this,ae,"f")}`,s+=`Content-Type: ${n.type||"application/octet-stream"}`);let i=oe(n)?n.size:n.byteLength;return I(this,_t,"f").enableAdditionalHeaders===!0&&i!=null&&!isNaN(i)&&(s+=`${I(this,ae,"f")}Content-Length: ${oe(n)?n.size:n.byteLength}`),I(this,he,"f").encode(`${s}${I(this,ae,"f").repeat(2)}`)},Nn=function(){let r=0;for(let[n,s]of I(this,Ge,"f")){let i=oe(s)?s:I(this,he,"f").encode(ir(s)),o=oe(i)?i.size:i.byteLength;if(o==null||isNaN(o))return;r+=I(this,ze,"m",cr).call(this,n,i).byteLength,r+=o,r+=I(this,bt,"f")}return String(r+I(this,Ve,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}};f();import{Buffer as wa}from"node:buffer";import{promisify as Ea}from"node:util";f();function Je(t){return h.nodeStream(t)&&h.function_(t.getBoundary)}async function ur(t,e){if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(h.string(t))return wa.byteLength(t);if(h.buffer(t))return t.length;if(Je(t))return Ea(t.getLength.bind(t))()}f();function Ke(t,e,r){let n={};for(let s of r){let i=(...o)=>{e.emit(s,...o)};n[s]=i,t.on(s,i)}return()=>{for(let[s,i]of Object.entries(n))t.off(s,i)}}f();import Sa from"node:net";f();function hr(){let t=[];return{once(e,r,n){e.once(r,n),t.push({origin:e,event:r,fn:n})},unhandleAll(){for(let e of t){let{origin:r,event:n,fn:s}=e;r.removeListener(n,s)}t.length=0}}}var Ln=Symbol("reentry"),xa=()=>{},Ye=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT"}};function lr(t,e,r){if(Ln in t)return xa;t[Ln]=!0;let n=[],{once:s,unhandleAll:i}=hr(),o=(p,v,w)=>{let P=setTimeout(v,p,p,w);P.unref?.();let S=()=>{clearTimeout(P)};return n.push(S),S},{host:a,hostname:u}=r,l=(p,v)=>{t.destroy(new Ye(p,v))},d=()=>{for(let p of n)p();i()};if(t.once("error",p=>{if(d(),t.listenerCount("error")===0)throw p}),typeof e.request<"u"){let p=o(e.request,l,"request");s(t,"response",v=>{s(v,"end",p)})}if(typeof e.socket<"u"){let{socket:p}=e,v=()=>{l(p,"socket")};t.setTimeout(p,v),n.push(()=>{t.removeListener("timeout",v)})}let g=typeof e.lookup<"u",m=typeof e.connect<"u",y=typeof e.secureConnect<"u",b=typeof e.send<"u";return(g||m||y||b)&&s(t,"socket",p=>{let{socketPath:v}=t;if(p.connecting){let w=!!(v??Sa.isIP(u??a??"")!==0);if(g&&!w&&typeof p.address().address>"u"){let P=o(e.lookup,l,"lookup");s(p,"lookup",P)}if(m){let P=()=>o(e.connect,l,"connect");w?s(p,"connect",P()):s(p,"lookup",S=>{S===null&&s(p,"connect",P())})}y&&r.protocol==="https:"&&s(p,"connect",()=>{let P=o(e.secureConnect,l,"secureConnect");s(p,"secureConnect",P)})}if(b){let w=()=>o(e.send,l,"send");p.connecting?s(p,"connect",()=>{s(t,"upload-complete",w())}):s(t,"upload-complete",w())}}),typeof e.response<"u"&&s(t,"upload-complete",()=>{let p=o(e.response,l,"response");s(t,"response",p)}),typeof e.read<"u"&&s(t,"response",p=>{let v=o(e.read,l,"read");s(p,"end",v)}),d}f();function fr(t){t=t;let e={protocol:t.protocol,hostname:h.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return h.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}f();var Qe=class{constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};f();var va=({attemptCount:t,retryOptions:e,error:r,retryAfter:n,computedValue:s})=>{if(r.name==="RetryError")return 1;if(t>e.limit)return 0;let i=e.methods.includes(r.options.method),o=e.errorCodes.includes(r.code),a=r.response&&e.statusCodes.includes(r.response.statusCode);if(!i||!o&&!a)return 0;if(r.response){if(n)return n>s?0:n;if(r.response.statusCode===413)return 0}let u=Math.random()*e.noise;return Math.min(2**(t-1)*1e3,e.backoffLimit)+u},In=va;f();import nu from"node:process";import{promisify as Ws,inspect as su}from"node:util";import{URL as Js,URLSearchParams as st}from"node:url";import{checkServerIdentity as iu}from"node:tls";import ou from"node:http";import au from"node:https";f();import{V4MAPPED as Oa,ADDRCONFIG as Ra,ALL as Un,promises as Ca,lookup as Pa}from"node:dns";import{promisify as dr}from"node:util";import Ta from"node:os";var{Resolver:Hn}=Ca,Ce=Symbol("cacheableLookupCreateConnection"),pr=Symbol("cacheableLookupInstance"),Fn=Symbol("expires"),Aa=typeof Un=="number",Dn=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},ka=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},$n=()=>{let t=!1,e=!1;for(let r of Object.values(Ta.networkInterfaces()))for(let n of r)if(!n.internal&&(n.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},ja=t=>Symbol.iterator in t,St=t=>t.catch(e=>{if(e.code==="ENODATA"||e.code==="ENOTFOUND"||e.code==="ENOENT")return[];throw e}),Bn={ttl:!0},qa={all:!0},Na={all:!0,family:4},La={all:!0,family:6},Xe=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:n=3600,errorTtl:s=.15,resolver:i=new Hn,lookup:o=Pa}={}){if(this.maxTtl=r,this.errorTtl=s,this._cache=e,this._resolver=i,this._dnsLookup=o&&dr(o),this.stats={cache:0,query:0},this._resolver instanceof Hn?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=dr(this._resolver.resolve4.bind(this._resolver)),this._resolve6=dr(this._resolver.resolve6.bind(this._resolver))),this._iface=$n(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=n,n>0){let a=setInterval(()=>{this._hostnamesToFallback.clear()},n*1e3);a.unref&&a.unref(),this._fallbackInterval=a}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,n){if(typeof r=="function"?(n=r,r={}):typeof r=="number"&&(r={family:r}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(s=>{r.all?n(null,s):n(null,s.address,s.family,s.expires,s.ttl,s.source)},n)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let n=await this.query(e);if(r.family===6){let s=n.filter(i=>i.family===6);r.hints&Oa&&(Aa&&r.hints&Un||s.length===0)?ka(n):n=s}else r.family===4&&(n=n.filter(s=>s.family===4));if(r.hints&Ra){let{_iface:s}=this;n=n.filter(i=>i.family===6?s.has6:s.has4)}if(n.length===0){let s=new Error(`cacheableLookup ENOTFOUND ${e}`);throw s.code="ENOTFOUND",s.hostname=e,s}return r.all?n:n[0]}async query(e){let r="cache",n=await this._cache.get(e);if(n&&this.stats.cache++,!n){let s=this._pending[e];if(s)this.stats.cache++,n=await s;else{r="query";let i=this.queryAndCache(e);this._pending[e]=i,this.stats.query++;try{n=await i}finally{delete this._pending[e]}}}return n=n.map(s=>({...s,source:r})),n}async _resolve(e){let[r,n]=await Promise.all([St(this._resolve4(e,Bn)),St(this._resolve6(e,Bn))]),s=0,i=0,o=0,a=Date.now();for(let u of r)u.family=4,u.expires=a+u.ttl*1e3,s=Math.max(s,u.ttl);for(let u of n)u.family=6,u.expires=a+u.ttl*1e3,i=Math.max(i,u.ttl);return r.length>0?n.length>0?o=Math.min(s,i):o=s:o=i,{entries:[...r,...n],cacheTtl:o}}async _lookup(e){try{let[r,n]=await Promise.all([St(this._dnsLookup(e,Na)),St(this._dnsLookup(e,La))]);return{entries:[...r,...n],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,n){if(this.maxTtl>0&&n>0){n=Math.min(n,this.maxTtl)*1e3,r[Fn]=Date.now()+n;try{await this._cache.set(e,r,n)}catch(s){this.lookupAsync=async()=>{let i=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw i.cause=s,i}}ja(this._cache)&&this._tick(n)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,qa);let r=await this._resolve(e);r.entries.length===0&&this._dnsLookup&&(r=await this._lookup(e),r.entries.length!==0&&this.fallbackDuration>0&&this._hostnamesToFallback.add(e));let n=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,n),r.entries}_tick(e){let r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let n=1/0,s=Date.now();for(let[i,o]of this._cache){let a=o[Fn];s>=a?this._cache.delete(i):a<n&&(n=a)}n!==1/0&&this._tick(n-s)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Dn(e),Ce in e)throw new Error("CacheableLookup has been already installed");e[Ce]=e.createConnection,e[pr]=this,e.createConnection=(r,n)=>("lookup"in r||(r.lookup=this.lookup),e[Ce](r,n))}uninstall(e){if(Dn(e),e[Ce]){if(e[pr]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[Ce],delete e[Ce],delete e[pr]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=$n(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};var Ks=ee(Ms(),1);f();function Fr(t){let e=[],r=t.split(",");for(let n of r){let[s,...i]=n.split(";"),o=s.trim();if(o[0]!=="<"||o[o.length-1]!==">")throw new Error(`Invalid format of the Link header reference: ${o}`);let a=o.slice(1,-1),u={};if(i.length===0)throw new Error(`Unexpected end of Link header parameters: ${i.join(";")}`);for(let l of i){let d=l.trim(),g=d.indexOf("=");if(g===-1)throw new Error(`Failed to parse Link header: ${t}`);let m=d.slice(0,g).trim(),y=d.slice(g+1).trim();u[m]=y}e.push({reference:a,parameters:u})}return e}var[Vs,cu]=nu.versions.node.split(".").map(Number);function uu(t){for(let e in t){let r=t[e];_.any([h.string,h.number,h.boolean,h.null_,h.undefined],r)}}var hu=new Map,Tt,lu=()=>Tt||(Tt=new Xe,Tt),fu={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform(t){return t.request.options.responseType==="json"?t.body:JSON.parse(t.body)},paginate({response:t}){let e=t.headers.link;if(typeof e!="string"||e.trim()==="")return!1;let n=Fr(e).find(s=>s.parameters.rel==="next"||s.parameters.rel==='"next"');return n?{url:new Js(n.reference,t.url)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!0},du=t=>{let{hooks:e,retry:r}=t,n={...t,context:{...t.context},cacheOptions:{...t.cacheOptions},https:{...t.https},agent:{...t.agent},headers:{...t.headers},retry:{...r,errorCodes:[...r.errorCodes],methods:[...r.methods],statusCodes:[...r.statusCodes]},timeout:{...t.timeout},hooks:{init:[...e.init],beforeRequest:[...e.beforeRequest],beforeError:[...e.beforeError],beforeRedirect:[...e.beforeRedirect],beforeRetry:[...e.beforeRetry],afterResponse:[...e.afterResponse]},searchParams:t.searchParams?new st(t.searchParams):void 0,pagination:{...t.pagination}};return n.url!==void 0&&(n.prefixUrl=""),n},pu=t=>{let{hooks:e,retry:r}=t,n={...t};return h.object(t.context)&&(n.context={...t.context}),h.object(t.cacheOptions)&&(n.cacheOptions={...t.cacheOptions}),h.object(t.https)&&(n.https={...t.https}),h.object(t.cacheOptions)&&(n.cacheOptions={...n.cacheOptions}),h.object(t.agent)&&(n.agent={...t.agent}),h.object(t.headers)&&(n.headers={...t.headers}),h.object(r)&&(n.retry={...r},h.array(r.errorCodes)&&(n.retry.errorCodes=[...r.errorCodes]),h.array(r.methods)&&(n.retry.methods=[...r.methods]),h.array(r.statusCodes)&&(n.retry.statusCodes=[...r.statusCodes])),h.object(t.timeout)&&(n.timeout={...t.timeout}),h.object(e)&&(n.hooks={...e},h.array(e.init)&&(n.hooks.init=[...e.init]),h.array(e.beforeRequest)&&(n.hooks.beforeRequest=[...e.beforeRequest]),h.array(e.beforeError)&&(n.hooks.beforeError=[...e.beforeError]),h.array(e.beforeRedirect)&&(n.hooks.beforeRedirect=[...e.beforeRedirect]),h.array(e.beforeRetry)&&(n.hooks.beforeRetry=[...e.beforeRetry]),h.array(e.afterResponse)&&(n.hooks.afterResponse=[...e.afterResponse])),h.object(t.pagination)&&(n.pagination={...t.pagination}),n},mu=t=>{let e=[t.timeout.socket,t.timeout.connect,t.timeout.lookup,t.timeout.request,t.timeout.secureConnect].filter(r=>typeof r=="number");if(e.length>0)return Math.min(...e)},Gs=(t,e,r)=>{let n=t.hooks?.init;if(n)for(let s of n)s(e,r)},X=class t{constructor(e,r,n){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),_.any([h.string,h.urlInstance,h.object,h.undefined],e),_.any([h.object,h.undefined],r),_.any([h.object,h.undefined],n),e instanceof t||r instanceof t)throw new TypeError("The defaults must be passed as the third argument");this._internals=du(n?._internals??n??fu),this._init=[...n?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(h.plainObject(e))try{this.merge(e),this.merge(r)}finally{this.url=e.url}else try{this.merge(r)}finally{if(r?.url!==void 0)if(e===void 0)this.url=r.url;else throw new TypeError("The `url` option is mutually exclusive with the `input` argument");else e!==void 0&&(this.url=e)}}catch(s){throw s.options=this,s}}merge(e){if(e){if(e instanceof t){for(let r of e._init)this.merge(r);return}e=pu(e),Gs(this,e,this),Gs(e,e,this),this._merging=!0,"isStream"in e&&(this.isStream=e.isStream);try{let r=!1;for(let n in e)if(!(n==="mutableDefaults"||n==="handlers")&&n!=="url"){if(!(n in this))throw new Error(`Unexpected option: ${n}`);this[n]=e[n],r=!0}r&&this._init.push(e)}finally{this._merging=!1}}}get request(){return this._internals.request}set request(e){_.any([h.function_,h.undefined],e),this._internals.request=e}get agent(){return this._internals.agent}set agent(e){_.plainObject(e);for(let r in e){if(!(r in this._internals.agent))throw new TypeError(`Unexpected agent option: ${r}`);_.any([h.object,h.undefined],e[r])}this._merging?Object.assign(this._internals.agent,e):this._internals.agent={...e}}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e}get decompress(){return this._internals.decompress}set decompress(e){_.boolean(e),this._internals.decompress=e}get timeout(){return this._internals.timeout}set timeout(e){_.plainObject(e);for(let r in e){if(!(r in this._internals.timeout))throw new Error(`Unexpected timeout option: ${r}`);_.any([h.number,h.undefined],e[r])}this._merging?Object.assign(this._internals.timeout,e):this._internals.timeout={...e}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){if(_.any([h.string,h.urlInstance],e),e===""){this._internals.prefixUrl="";return}if(e=e.toString(),e.endsWith("/")||(e+="/"),this._internals.prefixUrl&&this._internals.url){let{href:r}=this._internals.url;this._internals.url.href=e+r.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=e}get body(){return this._internals.body}set body(e){_.any([h.string,h.buffer,h.nodeStream,h.generator,h.asyncGenerator,Re,h.undefined],e),h.nodeStream(e)&&_.truthy(e.readable),e!==void 0&&(_.undefined(this._internals.form),_.undefined(this._internals.json)),this._internals.body=e}get form(){return this._internals.form}set form(e){_.any([h.plainObject,h.undefined],e),e!==void 0&&(_.undefined(this._internals.body),_.undefined(this._internals.json)),this._internals.form=e}get json(){return this._internals.json}set json(e){e!==void 0&&(_.undefined(this._internals.body),_.undefined(this._internals.form)),this._internals.json=e}get url(){return this._internals.url}set url(e){if(_.any([h.string,h.urlInstance,h.undefined],e),e===void 0){this._internals.url=void 0;return}if(h.string(e)&&e.startsWith("/"))throw new Error("`url` must not start with a slash");let r=`${this.prefixUrl}${e.toString()}`,n=new Js(r);if(this._internals.url=n,n.protocol==="unix:"&&(n.href=`http://unix${n.pathname}${n.search}`),n.protocol!=="http:"&&n.protocol!=="https:"){let s=new Error(`Unsupported protocol: ${n.protocol}`);throw s.code="ERR_UNSUPPORTED_PROTOCOL",s}if(this._internals.username&&(n.username=this._internals.username,this._internals.username=""),this._internals.password&&(n.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(n.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),n.hostname==="unix"){if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");let s=/(?<socketPath>.+?):(?<path>.+)/.exec(`${n.pathname}${n.search}`);if(s?.groups){let{socketPath:i,path:o}=s.groups;this._unixOptions={socketPath:i,path:o,host:""}}else this._unixOptions=void 0;return}this._unixOptions=void 0}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){if(_.any([h.object,h.undefined],e),e===void 0){this._internals.cookieJar=void 0;return}let{setCookie:r,getCookieString:n}=e;_.function_(r),_.function_(n),r.length===4&&n.length===0?(r=Ws(r.bind(e)),n=Ws(n.bind(e)),this._internals.cookieJar={setCookie:r,getCookieString:n}):this._internals.cookieJar=e}get signal(){return this._internals.signal}set signal(e){_.object(e),this._internals.signal=e}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){_.boolean(e),this._internals.ignoreInvalidCookies=e}get searchParams(){return this._internals.url?this._internals.url.searchParams:(this._internals.searchParams===void 0&&(this._internals.searchParams=new st),this._internals.searchParams)}set searchParams(e){_.any([h.string,h.object,h.undefined],e);let r=this._internals.url;if(e===void 0){this._internals.searchParams=void 0,r&&(r.search="");return}let n=this.searchParams,s;if(h.string(e))s=new st(e);else if(e instanceof st)s=e;else{uu(e),s=new st;for(let i in e){let o=e[i];o===null?s.append(i,""):o===void 0?n.delete(i):s.append(i,o)}}if(this._merging){for(let i of s.keys())n.delete(i);for(let[i,o]of s)n.append(i,o)}else r?r.search=n.toString():this._internals.searchParams=n}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){_.any([h.function_,h.undefined],e),this._internals.dnsLookup=e}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){_.any([h.object,h.boolean,h.undefined],e),e===!0?this._internals.dnsCache=lu():e===!1?this._internals.dnsCache=void 0:this._internals.dnsCache=e}get context(){return this._internals.context}set context(e){_.object(e),this._merging?Object.assign(this._internals.context,e):this._internals.context={...e}}get hooks(){return this._internals.hooks}set hooks(e){_.object(e);for(let r in e){if(!(r in this._internals.hooks))throw new Error(`Unexpected hook event: ${r}`);let n=r,s=e[n];if(_.any([h.array,h.undefined],s),s)for(let i of s)_.function_(i);if(this._merging)s&&this._internals.hooks[n].push(...s);else{if(!s)throw new Error(`Missing hook event: ${r}`);this._internals.hooks[r]=[...s]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){_.boolean(e),this._internals.followRedirect=e}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){_.number(e),this._internals.maxRedirects=e}get cache(){return this._internals.cache}set cache(e){_.any([h.object,h.string,h.boolean,h.undefined],e),e===!0?this._internals.cache=hu:e===!1?this._internals.cache=void 0:this._internals.cache=e}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){_.boolean(e),this._internals.throwHttpErrors=e}get username(){let e=this._internals.url,r=e?e.username:this._internals.username;return decodeURIComponent(r)}set username(e){_.string(e);let r=this._internals.url,n=encodeURIComponent(e);r?r.username=n:this._internals.username=n}get password(){let e=this._internals.url,r=e?e.password:this._internals.password;return decodeURIComponent(r)}set password(e){_.string(e);let r=this._internals.url,n=encodeURIComponent(e);r?r.password=n:this._internals.password=n}get http2(){return this._internals.http2}set http2(e){_.boolean(e),this._internals.http2=e}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){_.boolean(e),this._internals.allowGetBody=e}get headers(){return this._internals.headers}set headers(e){_.plainObject(e),this._merging?Object.assign(this._internals.headers,ve(e)):this._internals.headers=ve(e)}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){_.boolean(e),this._internals.methodRewriting=e}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(e!==void 0&&e!==4&&e!==6)throw new TypeError(`Invalid DNS lookup IP version: ${e}`);this._internals.dnsLookupIpVersion=e}get parseJson(){return this._internals.parseJson}set parseJson(e){_.function_(e),this._internals.parseJson=e}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){_.function_(e),this._internals.stringifyJson=e}get retry(){return this._internals.retry}set retry(e){if(_.plainObject(e),_.any([h.function_,h.undefined],e.calculateDelay),_.any([h.number,h.undefined],e.maxRetryAfter),_.any([h.number,h.undefined],e.limit),_.any([h.array,h.undefined],e.methods),_.any([h.array,h.undefined],e.statusCodes),_.any([h.array,h.undefined],e.errorCodes),_.any([h.number,h.undefined],e.noise),e.noise&&Math.abs(e.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);for(let n in e)if(!(n in this._internals.retry))throw new Error(`Unexpected retry option: ${n}`);this._merging?Object.assign(this._internals.retry,e):this._internals.retry={...e};let{retry:r}=this._internals;r.methods=[...new Set(r.methods.map(n=>n.toUpperCase()))],r.statusCodes=[...new Set(r.statusCodes)],r.errorCodes=[...new Set(r.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(e){_.any([h.string,h.undefined],e),this._internals.localAddress=e}get method(){return this._internals.method}set method(e){_.string(e),this._internals.method=e.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(e){_.any([h.function_,h.undefined],e),this._internals.createConnection=e}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){_.plainObject(e),_.any([h.boolean,h.undefined],e.shared),_.any([h.number,h.undefined],e.cacheHeuristic),_.any([h.number,h.undefined],e.immutableMinTimeToLive),_.any([h.boolean,h.undefined],e.ignoreCargoCult);for(let r in e)if(!(r in this._internals.cacheOptions))throw new Error(`Cache option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,e):this._internals.cacheOptions={...e}}get https(){return this._internals.https}set https(e){_.plainObject(e),_.any([h.boolean,h.undefined],e.rejectUnauthorized),_.any([h.function_,h.undefined],e.checkServerIdentity),_.any([h.string,h.object,h.array,h.undefined],e.certificateAuthority),_.any([h.string,h.object,h.array,h.undefined],e.key),_.any([h.string,h.object,h.array,h.undefined],e.certificate),_.any([h.string,h.undefined],e.passphrase),_.any([h.string,h.buffer,h.array,h.undefined],e.pfx),_.any([h.array,h.undefined],e.alpnProtocols),_.any([h.string,h.undefined],e.ciphers),_.any([h.string,h.buffer,h.undefined],e.dhparam),_.any([h.string,h.undefined],e.signatureAlgorithms),_.any([h.string,h.undefined],e.minVersion),_.any([h.string,h.undefined],e.maxVersion),_.any([h.boolean,h.undefined],e.honorCipherOrder),_.any([h.number,h.undefined],e.tlsSessionLifetime),_.any([h.string,h.undefined],e.ecdhCurve),_.any([h.string,h.buffer,h.array,h.undefined],e.certificateRevocationLists);for(let r in e)if(!(r in this._internals.https))throw new Error(`HTTPS option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.https,e):this._internals.https={...e}}get encoding(){return this._internals.encoding}set encoding(e){if(e===null)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");_.any([h.string,h.undefined],e),this._internals.encoding=e}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){_.boolean(e),this._internals.resolveBodyOnly=e}get isStream(){return this._internals.isStream}set isStream(e){_.boolean(e),this._internals.isStream=e}get responseType(){return this._internals.responseType}set responseType(e){if(e===void 0){this._internals.responseType="text";return}if(e!=="text"&&e!=="buffer"&&e!=="json")throw new Error(`Invalid \`responseType\` option: ${e}`);this._internals.responseType=e}get pagination(){return this._internals.pagination}set pagination(e){_.object(e),this._merging?Object.assign(this._internals.pagination,e):this._internals.pagination=e}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){_.boolean(e),this._internals.setHost=e}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){_.any([h.number,h.undefined],e),this._internals.maxHeaderSize=e}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){_.boolean(e),this._internals.enableUnixSockets=e}toJSON(){return{...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](e,r){return su(this._internals,r)}createNativeRequestOptions(){let e=this._internals,r=e.url,n;r.protocol==="https:"?n=e.http2?e.agent:e.agent.https:n=e.agent.http;let{https:s}=e,{pfx:i}=s;return h.array(i)&&h.plainObject(i[0])&&(i=i.map(o=>({buf:o.buffer,passphrase:o.passphrase}))),{...e.cacheOptions,...this._unixOptions,ALPNProtocols:s.alpnProtocols,ca:s.certificateAuthority,cert:s.certificate,key:s.key,passphrase:s.passphrase,pfx:s.pfx,rejectUnauthorized:s.rejectUnauthorized,checkServerIdentity:s.checkServerIdentity??iu,ciphers:s.ciphers,honorCipherOrder:s.honorCipherOrder,minVersion:s.minVersion,maxVersion:s.maxVersion,sigalgs:s.signatureAlgorithms,sessionTimeout:s.tlsSessionLifetime,dhparam:s.dhparam,ecdhCurve:s.ecdhCurve,crl:s.certificateRevocationLists,lookup:e.dnsLookup??e.dnsCache?.lookup,family:e.dnsLookupIpVersion,agent:n,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?mu(e):void 0,h2session:e.h2session}}getRequestFunction(){let e=this._internals.url,{request:r}=this._internals;return!r&&e?this.getFallbackRequestFunction():r}getFallbackRequestFunction(){let e=this._internals.url;if(e){if(e.protocol==="https:"){if(this._internals.http2){if(Vs<15||Vs===15&&cu<10){let r=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw r.code="EUNSUPPORTED",r}return Ks.default.auto}return au.request}return ou.request}}freeze(){let e=this._internals;Object.freeze(e),Object.freeze(e.hooks),Object.freeze(e.hooks.afterResponse),Object.freeze(e.hooks.beforeError),Object.freeze(e.hooks.beforeRedirect),Object.freeze(e.hooks.beforeRequest),Object.freeze(e.hooks.beforeRetry),Object.freeze(e.hooks.init),Object.freeze(e.https),Object.freeze(e.cacheOptions),Object.freeze(e.agent),Object.freeze(e.headers),Object.freeze(e.timeout),Object.freeze(e.retry),Object.freeze(e.retry.errorCodes),Object.freeze(e.retry.methods),Object.freeze(e.retry.statusCodes)}};f();var ke=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304},At=class extends F{constructor(e,r){let{options:n}=r.request;super(`${e.message} in "${n.url.toString()}"`,e,r.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE"}},Dr=(t,e,r,n)=>{let{rawBody:s}=t;try{if(e==="text")return s.toString(n);if(e==="json")return s.length===0?"":r(s.toString(n));if(e==="buffer")return s}catch(i){throw new At(i,t)}throw new At({message:`Unknown body type '${e}'`,name:"Error"},t)};f();function yu(t){return t.writable&&!t.writableEnded}var Ys=yu;f();function kt(t){return t.protocol==="unix:"||t.hostname==="unix"}var{buffer:Eu}=ei.default,Su=h.string(Xs.versions.brotli),xu=new Set(["GET","HEAD"]),Br=new Qe,vu=new Set([300,301,302,303,304,307,308]),Ou=["socket","connect","continue","information","upgrade"],jt=()=>{},de=class t extends gu{constructor(e,r,n){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=jt,this._triggerRead=!1,this._cancelTimeouts=jt,this._removeListeners=jt,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=jt,this.on("pipe",i=>{i?.headers&&Object.assign(this.options.headers,i.headers)}),this.on("newListener",i=>{if(i==="retry"&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")});try{if(this.options=new X(e,r,n),!this.options.url){if(this.options.prefixUrl==="")throw new TypeError("Missing `url` property");this.options.url=""}this.requestUrl=this.options.url}catch(i){let{options:o}=i;o&&(this.options=o),this.flush=async()=>{this.flush=async()=>{},this.destroy(i)};return}let{body:s}=this.options;if(h.nodeStream(s)&&s.once("error",i=>{this._flushed?this._beforeError(new De(i,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new De(i,this))}}),this.options.signal){let i=()=>{this.destroy(new pt(this))};this.options.signal.aborted?i():(this.options.signal.addEventListener("abort",i),this._removeListeners=()=>{this.options.signal.removeEventListener("abort",i)})}}async flush(){if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed){this._request?.destroy();return}for(let e of this._jobs)e();this._jobs.length=0,this._requestInitialized=!0}catch(e){this._beforeError(e)}}}_beforeError(e){if(this._stopReading)return;let{response:r,options:n}=this,s=this.retryCount+(e.name==="RetryError"?0:1);this._stopReading=!0,e instanceof F||(e=new F(e.message,e,this));let i=e;(async()=>{if(r?.readable&&!r.rawBody&&!this._request?.socket?.destroyed&&(r.setEncoding(this.readableEncoding),await this._setRawBody(r)&&(r.body=r.rawBody.toString())),this.listenerCount("retry")!==0){let o;try{let a;r&&"retry-after"in r.headers&&(a=Number(r.headers["retry-after"]),Number.isNaN(a)?(a=Date.parse(r.headers["retry-after"])-Date.now(),a<=0&&(a=1)):a*=1e3);let u=n.retry;o=await u.calculateDelay({attemptCount:s,retryOptions:u,error:i,retryAfter:a,computedValue:In({attemptCount:s,retryOptions:u,error:i,retryAfter:a,computedValue:u.maxRetryAfter??n.timeout.request??Number.POSITIVE_INFINITY})})}catch(a){this._error(new F(a.message,a,this));return}if(o){if(await new Promise(a=>{let u=setTimeout(a,o);this._stopRetry=()=>{clearTimeout(u),a()}}),this.destroyed)return;try{for(let a of this.options.hooks.beforeRetry)await a(i,this.retryCount+1)}catch(a){this._error(new F(a.message,e,this));return}if(this.destroyed)return;this.destroy(),this.emit("retry",this.retryCount+1,e,a=>{let u=new t(n.url,a,n);return u.retryCount=this.retryCount+1,Xs.nextTick(()=>{u.flush()}),u});return}}this._error(i)})()}_read(){this._triggerRead=!0;let{response:e}=this;if(e&&!this._stopReading){e.readableLength&&(this._triggerRead=!1);let r;for(;(r=e.read())!==null;){this._downloadedSize+=r.length;let n=this.downloadProgress;n.percent<1&&this.emit("downloadProgress",n),this.push(r)}}}_write(e,r,n){let s=()=>{this._writeRequest(e,r,n)};this._requestInitialized?s():this._jobs.push(s)}_final(e){let r=()=>{if(!this._request||this._request.destroyed){e();return}this._request.end(n=>{this._request._writableState?.errored||(n||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),e(n))})};this._requestInitialized?r():this._jobs.push(r)}_destroy(e,r){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){let{body:n}=this.options;h.nodeStream(n)&&n.destroy()}this._request&&this._request.destroy(),e!==null&&!h.undefined(e)&&!(e instanceof F)&&(e=new F(e.message,e,this)),r(e)}pipe(e,r){return e instanceof Qs&&this._pipedServerResponses.add(e),super.pipe(e,r)}unpipe(e){return e instanceof Qs&&this._pipedServerResponses.delete(e),super.unpipe(e),this}async _finalizeBody(){let{options:e}=this,{headers:r}=e,n=!h.undefined(e.form),s=!h.undefined(e.json),i=!h.undefined(e.body),o=xu.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=o,n||s||i){if(o)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);let a=!h.string(r["content-type"]);if(i){if(Re(e.body)){let l=new Et(e.body);a&&(r["content-type"]=l.headers["Content-Type"]),"Content-Length"in l.headers&&(r["content-length"]=l.headers["Content-Length"]),e.body=l.encode()}Je(e.body)&&a&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`)}else if(n){a&&(r["content-type"]="application/x-www-form-urlencoded");let{form:l}=e;e.form=void 0,e.body=new _u(l).toString()}else{a&&(r["content-type"]="application/json");let{json:l}=e;e.json=void 0,e.body=e.stringifyJson(l)}let u=await ur(e.body,e.headers);h.undefined(r["content-length"])&&h.undefined(r["transfer-encoding"])&&!o&&!h.undefined(u)&&(r["content-length"]=String(u))}e.responseType==="json"&&!("accept"in e.headers)&&(e.headers.accept="application/json"),this._bodySize=Number(r["content-length"])||void 0}async _onResponseBase(e){if(this.isAborted)return;let{options:r}=this,{url:n}=r;this._nativeResponse=e,r.decompress&&(e=(0,Zs.default)(e));let s=e.statusCode,i=e;i.statusMessage=i.statusMessage??wu.STATUS_CODES[s],i.url=r.url.toString(),i.requestUrl=this.requestUrl,i.redirectUrls=this.redirectUrls,i.request=this,i.isFromCache=this._nativeResponse.fromCache??!1,i.ip=this.ip,i.retryCount=this.retryCount,i.ok=ke(i),this._isFromCache=i.isFromCache,this._responseSize=Number(e.headers["content-length"])||void 0,this.response=i,e.once("end",()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress)}),e.once("error",a=>{this._aborted=!0,e.destroy(),this._beforeError(new $e(a,this))}),e.once("aborted",()=>{this._aborted=!0,this._beforeError(new $e({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let o=e.headers["set-cookie"];if(h.object(r.cookieJar)&&o){let a=o.map(async u=>r.cookieJar.setCookie(u,n.toString()));r.ignoreInvalidCookies&&(a=a.map(async u=>{try{await u}catch{}}));try{await Promise.all(a)}catch(u){this._beforeError(u);return}}if(!this.isAborted){if(r.followRedirect&&e.headers.location&&vu.has(s)){if(e.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=r.maxRedirects){this._beforeError(new ht(this));return}this._request=void 0;let a=new X(void 0,void 0,this.options),u=s===303&&a.method!=="GET"&&a.method!=="HEAD",l=s!==307&&s!==308,d=a.methodRewriting&&l;(u||d)&&(a.method="GET",a.body=void 0,a.json=void 0,a.form=void 0,delete a.headers["content-length"]);try{let g=$r.from(e.headers.location,"binary").toString(),m=new bu(g,n);if(!kt(n)&&kt(m)){this._beforeError(new F("Cannot redirect to UNIX socket",{},this));return}m.hostname!==n.hostname||m.port!==n.port?("host"in a.headers&&delete a.headers.host,"cookie"in a.headers&&delete a.headers.cookie,"authorization"in a.headers&&delete a.headers.authorization,(a.username||a.password)&&(a.username="",a.password="")):(m.username=a.username,m.password=a.password),this.redirectUrls.push(m),a.prefixUrl="",a.url=m;for(let y of a.hooks.beforeRedirect)await y(a,i);this.emit("redirect",a,i),this.options=a,await this._makeRequest()}catch(g){this._beforeError(g);return}return}if(r.isStream&&r.throwHttpErrors&&!ke(i)){this._beforeError(new ie(i));return}if(e.on("readable",()=>{this._triggerRead&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this._noPipe){await this._setRawBody()&&this.emit("response",e);return}this.emit("response",e);for(let a of this._pipedServerResponses)if(!a.headersSent){for(let u in e.headers){let l=r.decompress?u!=="content-encoding":!0,d=e.headers[u];l&&a.setHeader(u,d)}a.statusCode=s}}}async _setRawBody(e=this){if(e.readableEnded)return!1;try{let r=await Eu(e);if(!this.isAborted)return this.response.rawBody=r,!0}catch{}return!1}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:n,url:s}=r;pn(e),this.options.http2&&e.setTimeout(0),this._cancelTimeouts=lr(e,n,s);let i=r.cache?"cacheableResponse":"response";e.once(i,o=>{this._onResponse(o)}),e.once("error",o=>{this._aborted=!0,e.destroy(),o=o instanceof Ye?new ft(o,this.timings,this):new F(o.message,o,this),this._beforeError(o)}),this._unproxyEvents=Ke(e,this,Ou),this._request=e,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",e)}async _asyncWrite(e){return new Promise((r,n)=>{super.write(e,s=>{if(s){n(s);return}r()})})}_sendBody(){let{body:e}=this.options,r=this.redirectUrls.length===0?this:this._request??this;h.nodeStream(e)?e.pipe(r):h.generator(e)||h.asyncGenerator(e)?(async()=>{try{for await(let n of e)await this._asyncWrite(n);super.end()}catch(n){this._beforeError(n)}})():h.undefined(e)?(this._cannotHaveBody||this._noPipe)&&r.end():(this._writeRequest(e,void 0,()=>{}),r.end())}_prepareCache(e){if(!Br.has(e)){let r=new vn(((n,s)=>{let i=n._request(n,s);return h.promise(i)&&(i.once=(o,a)=>{if(o==="error")(async()=>{try{await i}catch(u){a(u)}})();else if(o==="abort")(async()=>{try{(await i).once("abort",a)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${o}`);return i}),i}),e);Br.set(e,r.request())}}async _createCacheableRequest(e,r){return new Promise((n,s)=>{Object.assign(r,fr(e));let i,o=Br.get(r.cache)(r,async a=>{if(a._readableState.autoDestroy=!1,i){let u=()=>{a.req&&(a.complete=a.req.res.complete)};a.prependOnceListener("end",u),u(),(await i).emit("cacheableResponse",a)}n(a)});o.once("error",s),o.once("request",async a=>{i=a,n(i)})})}async _makeRequest(){let{options:e}=this,{headers:r,username:n,password:s}=e,i=e.cookieJar;for(let l in r)if(h.undefined(r[l]))delete r[l];else if(h.null_(r[l]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${l}\` header`);if(e.decompress&&h.undefined(r["accept-encoding"])&&(r["accept-encoding"]=Su?"gzip, deflate, br":"gzip, deflate"),n||s){let l=$r.from(`${n}:${s}`).toString("base64");r.authorization=`Basic ${l}`}if(i){let l=await i.getCookieString(e.url.toString());h.nonEmptyString(l)&&(r.cookie=l)}e.prefixUrl="";let o;for(let l of e.hooks.beforeRequest){let d=await l(e);if(!h.undefined(d)){o=()=>d;break}}o||(o=e.getRequestFunction());let a=e.url;this._requestOptions=e.createNativeRequestOptions(),e.cache&&(this._requestOptions._request=o,this._requestOptions.cache=e.cache,this._requestOptions.body=e.body,this._prepareCache(e.cache));let u=e.cache?this._createCacheableRequest:o;try{let l=u(a,this._requestOptions);h.promise(l)&&(l=await l),h.undefined(l)&&(l=e.getFallbackRequestFunction()(a,this._requestOptions),h.promise(l)&&(l=await l)),Ys(l)?this._onRequest(l):this.writable?(this.once("finish",()=>{this._onResponse(l)}),this._sendBody()):this._onResponse(l)}catch(l){throw l instanceof re?new lt(l,this):l}}async _error(e){try{if(!(e instanceof ie&&!this.options.throwHttpErrors))for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new F(r.message,r,this)}this.destroy(e)}_writeRequest(e,r,n){!this._request||this._request.destroyed||this._request.write(e,r,s=>{if(!s&&!this._request.destroyed){this._uploadedSize+=$r.byteLength(e,r);let i=this.uploadProgress;i.percent<1&&this.emit("uploadProgress",i)}n(s)})}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??void 0}get downloadProgress(){let e;return this._responseSize?e=this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?e=1:e=0,{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;return this._bodySize?e=this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?e=1:e=0,{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}};f();var qt=class extends F{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}};var Cu=["request","response","redirect","uploadProgress","downloadProgress"];function Nt(t){let e,r,n,s=new Ru,i=new xe((a,u,l)=>{l(()=>{e.destroy()}),l.shouldReject=!1,l(()=>{u(new qt(e))});let d=g=>{l(()=>{});let m=t??new de(void 0,void 0,n);m.retryCount=g,m._noPipe=!0,e=m,m.once("response",async p=>{let v=(p.headers["content-encoding"]??"").toLowerCase(),w=v==="gzip"||v==="deflate"||v==="br",{options:P}=m;if(w&&!P.decompress)p.body=p.rawBody;else try{p.body=Dr(p,P.responseType,P.parseJson,P.encoding)}catch(S){if(p.body=p.rawBody.toString(),ke(p)){m._beforeError(S);return}}try{let S=P.hooks.afterResponse;for(let[x,T]of S.entries())if(p=await T(p,async N=>{throw P.merge(N),P.prefixUrl="",N.url&&(P.url=N.url),P.hooks.afterResponse=P.hooks.afterResponse.slice(0,x),new dt(m)}),!(h.object(p)&&h.number(p.statusCode)&&!h.nullOrUndefined(p.body)))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(S){m._beforeError(S);return}if(r=p,!ke(p)){m._beforeError(new ie(p));return}m.destroy(),a(m.options.resolveBodyOnly?p.body:p)});let y=p=>{if(i.isCanceled)return;let{options:v}=m;if(p instanceof ie&&!v.throwHttpErrors){let{response:w}=p;m.destroy(),a(m.options.resolveBodyOnly?w.body:w);return}u(p)};m.once("error",y);let b=m.options?.body;m.once("retry",(p,v)=>{t=void 0;let w=m.options.body;if(b===w&&h.nodeStream(w)){v.message="Cannot retry with consumed body stream",y(v);return}n=m.options,d(p)}),Ke(m,s,Cu),h.undefined(t)&&m.flush()};d(0)});i.on=(a,u)=>(s.on(a,u),i),i.off=(a,u)=>(s.off(a,u),i);let o=a=>{let u=(async()=>{await i;let{options:l}=r.request;return Dr(r,a,l.parseJson,l.encoding)})();return Object.defineProperties(u,Object.getOwnPropertyDescriptors(i)),u};return i.json=()=>{if(e.options){let{headers:a}=e.options;!e.writableFinished&&!("accept"in a)&&(a.accept="application/json")}return o("json")},i.buffer=()=>o("buffer"),i.text=()=>o("text"),i}var Pu=async t=>new Promise(e=>{setTimeout(e,t)}),Tu=t=>h.function_(t),Au=["get","post","put","patch","head","delete"],ti=t=>{t={options:new X(void 0,void 0,t.options),handlers:[...t.handlers],mutableDefaults:t.mutableDefaults},Object.defineProperty(t,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});let e=((n,s,i=t.options)=>{let o=new de(n,s,i),a,u=g=>(o.options=g,o._noPipe=!g.isStream,o.flush(),g.isStream?o:(a||(a=Nt(o)),a)),l=0,d=g=>{let y=(t.handlers[l++]??u)(g,d);if(h.promise(y)&&!o.options.isStream&&(a||(a=Nt(o)),y!==a)){let b=Object.getOwnPropertyDescriptors(a);for(let p in b)p in y&&delete b[p];Object.defineProperties(y,b),y.cancel=a.cancel}return y};return d(o.options)});e.extend=(...n)=>{let s=new X(void 0,void 0,t.options),i=[...t.handlers],o;for(let a of n)Tu(a)?(s.merge(a.defaults.options),i.push(...a.defaults.handlers),o=a.defaults.mutableDefaults):(s.merge(a),a.handlers&&i.push(...a.handlers),o=a.mutableDefaults);return ti({options:s,handlers:i,mutableDefaults:!!o})};let r=(async function*(n,s){let i=new X(n,s,t.options);i.resolveBodyOnly=!1;let{pagination:o}=i;_.function_(o.transform),_.function_(o.shouldContinue),_.function_(o.filter),_.function_(o.paginate),_.number(o.countLimit),_.number(o.requestLimit),_.number(o.backoff);let a=[],{countLimit:u}=o,l=0;for(;l<o.requestLimit;){l!==0&&await Pu(o.backoff);let d=await e(void 0,void 0,i),g=await o.transform(d),m=[];_.array(g);for(let b of g)if(o.filter({item:b,currentItems:m,allItems:a})&&(!o.shouldContinue({item:b,currentItems:m,allItems:a})||(yield b,o.stackAllItems&&a.push(b),m.push(b),--u<=0)))return;let y=o.paginate({response:d,currentItems:m,allItems:a});if(y===!1)return;y===d.request.options?i=d.request.options:(i.merge(y),_.any([h.urlInstance,h.undefined],y.url),y.url!==void 0&&(i.prefixUrl="",i.url=y.url)),l++}});e.paginate=r,e.paginate.all=(async(n,s)=>{let i=[];for await(let o of r(n,s))i.push(o);return i}),e.paginate.each=r,e.stream=((n,s)=>e(n,{...s,isStream:!0}));for(let n of Au)e[n]=((s,i)=>e(s,{...i,method:n})),e.stream[n]=((s,i)=>e(s,{...i,method:n,isStream:!0}));return t.mutableDefaults||(Object.freeze(t.handlers),t.options.freeze()),Object.defineProperty(e,"defaults",{value:t,writable:!1,configurable:!1,enumerable:!0}),e},ri=ti;var ku={options:new X,handlers:[],mutableDefaults:!1},ju=ri(ku),ni=ju;f();var Ri=ee(Oi(),1);function Vr(t){let e=(0,Ri.default)("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${t}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`}var So=ee(Eo(),1),xo=ee(Oo(),1),vo={keepAlive:!0,maxSockets:50},$h=new Fh(vo),Bh=new Dh(vo),sn=class extends Error{constructor(e){super(`Package \`${e}\` could not be found`),this.name="PackageNotFoundError"}},on=class extends Error{constructor(e,r){super(`Version \`${r}\` for package \`${e}\` could not be found`),this.name="VersionNotFoundError"}};async function an(t,e){e={version:"latest",...e};let r=t.split("/")[0],n=e.registryUrl||Vr(r),s=new URL(encodeURIComponent(t).replace(/^%40/,"@"),n),i=(0,So.default)(n.toString(),{recursive:!0}),o={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};e.fullMetadata&&delete o.accept,i&&(o.authorization=`${i.type} ${i.token}`);let a={headers:o,agent:{http:$h,https:Bh}};e.agent&&(a.agent=e.agent);let u;try{u=await ni(s,a).json()}catch(g){throw g?.response?.statusCode===404?new sn(t):g}if(e.allVersions)return u;let{version:l}=e,d=new on(t,l);if(u["dist-tags"][l]){let g=u.time;u=u.versions[u["dist-tags"][l]],u.time=g}else if(l){if(!u.versions[l]){let m=Object.keys(u.versions);if(l=xo.default.maxSatisfying(m,l),!l)throw d}let g=u.time;if(u=u.versions[l],u.time=g,!u)throw d}return u}async function Uh(t,e){let{version:r}=await an(t.toLowerCase(),e);return r}export{Uh as default};
|
|
20
|
+
/*! Bundled license information:
|
|
21
|
+
|
|
22
|
+
deep-extend/lib/deep-extend.js:
|
|
23
|
+
(*!
|
|
24
|
+
* @description Recursive object extending
|
|
25
|
+
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
|
26
|
+
* @license MIT
|
|
27
|
+
*
|
|
28
|
+
* The MIT License (MIT)
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
|
31
|
+
*
|
|
32
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
33
|
+
* this software and associated documentation files (the "Software"), to deal in
|
|
34
|
+
* the Software without restriction, including without limitation the rights to
|
|
35
|
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
36
|
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
37
|
+
* subject to the following conditions:
|
|
38
|
+
*
|
|
39
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
40
|
+
* copies or substantial portions of the Software.
|
|
41
|
+
*
|
|
42
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
43
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
44
|
+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
45
|
+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
46
|
+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
47
|
+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
48
|
+
*)
|
|
49
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-FFQ5EWII.js";import"./chunk-OLZHWPZP.js";import"./chunk-K2WUCOQJ.js";import"./chunk-P6XE4MH5.js";import"./chunk-Z35BTAM6.js";import"./chunk-LDGAHMS7.js";import"./chunk-ZR76GGZ6.js";import"./chunk-EENHXSWU.js";import"./chunk-FUOIGXI4.js";import"./chunk-6M3ZYNGO.js";import"./chunk-QYR5VPQA.js";import"./chunk-CERXUPGC.js";import"./chunk-PIBY5DDZ.js";import"./chunk-VPRTJUIN.js";export{a as commands};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a}from"./chunk-LDGAHMS7.js";import"./chunk-ZR76GGZ6.js";import"./chunk-EENHXSWU.js";import"./chunk-FUOIGXI4.js";import"./chunk-6M3ZYNGO.js";import"./chunk-QYR5VPQA.js";import"./chunk-PIBY5DDZ.js";import"./chunk-VPRTJUIN.js";export default a();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-7UYZQN4V.js";import"./chunk-Z35BTAM6.js";import"./chunk-75VPUOC5.js";import"./chunk-HZA6IAA4.js";import"./chunk-PD5ZHJWI.js";import"./chunk-LDGAHMS7.js";import"./chunk-ZR76GGZ6.js";import"./chunk-EENHXSWU.js";import"./chunk-FUOIGXI4.js";import"./chunk-6M3ZYNGO.js";import"./chunk-QYR5VPQA.js";import"./chunk-PIBY5DDZ.js";import"./chunk-VPRTJUIN.js";export{a as commands,b as hooks};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"./chunk-YC6G4MHD.js";import"./chunk-N7RBSKYT.js";import"./chunk-IU2ZQ6TE.js";import"./chunk-VPRTJUIN.js";export{i as alwaysLogAnalytics,j as alwaysLogMetrics,h as analyticsDisabled,l as canRunDoctorRelease,t as ciPlatform,r as cloudEnvironment,o as codespacePortForwardingDomain,n as codespaceURL,k as firstPartyDev,v as getThemeKitAccessDomain,m as gitpodURL,s as hasGit,b as homeDirectory,p as isCloudEnvironment,c as isDevelopment,g as isHostedAppsMode,e as isShopify,a as isTerminalInteractive,f as isUnitTest,d as isVerbose,u as macAddress,w as opentelemetryDomain,q as themeToken};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./chunk-4HHXSMD7.js";import"./chunk-5CH3B62S.js";import"./chunk-JPGO36XP.js";import"./chunk-LDGAHMS7.js";import"./chunk-ZR76GGZ6.js";import"./chunk-EENHXSWU.js";import"./chunk-FUOIGXI4.js";import"./chunk-6M3ZYNGO.js";import"./chunk-QYR5VPQA.js";import"./chunk-GFEAKSGV.js";import"./chunk-CERXUPGC.js";import"./chunk-T4M5CWAO.js";import"./chunk-PRVQAHWI.js";import"./chunk-YC6G4MHD.js";import"./chunk-N7RBSKYT.js";import"./chunk-IU2ZQ6TE.js";import"./chunk-PIBY5DDZ.js";import"./chunk-VPRTJUIN.js";export{a as LocalStorage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f}from"./chunk-IASVAERO.js";import"./chunk-YC6G4MHD.js";import"./chunk-N7RBSKYT.js";import"./chunk-IU2ZQ6TE.js";import"./chunk-VPRTJUIN.js";export{d as addPublicMetadata,e as addSensitiveMetadata,a as createRuntimeMetadataContainer,b as getAllPublicMetadata,c as getAllSensitiveMetadata,f as runWithTimer};
|