werkmeister 0.108.0 → 0.108.1
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/dist/{branch_cli-KDF4YHY4.js → branch_cli-PO6K6KVZ.js} +2 -2
- package/dist/{budget-TF2HKTPT.js → budget-G75EKDMY.js} +2 -2
- package/dist/{cache-6S4KQI3O.js → cache-HOGQSUTJ.js} +2 -2
- package/dist/{chunk-KWU72UOJ.js → chunk-27ODH2MC.js} +2 -2
- package/dist/{chunk-IY6RFHC7.js → chunk-2DL43TNW.js} +2 -2
- package/dist/{chunk-QUDQLSNB.js → chunk-2UXXIVL4.js} +2 -2
- package/dist/chunk-3EOYPJIC.js +143 -0
- package/dist/{chunk-UA753IRG.js → chunk-3FYIU4KN.js} +2 -2
- package/dist/{chunk-KRNIGJPI.js → chunk-3HKHFGR3.js} +2 -2
- package/dist/{chunk-ASW3U3ZR.js → chunk-3NV7EWN3.js} +2 -2
- package/dist/{chunk-BF73IXUO.js → chunk-3SDWYR2Z.js} +2 -2
- package/dist/{chunk-5BKKCP63.js → chunk-5I5YOVYE.js} +2 -2
- package/dist/{chunk-7WFEF4CS.js → chunk-67CERR52.js} +2 -2
- package/dist/{chunk-V2PIIVGU.js → chunk-7BATA4C6.js} +2 -2
- package/dist/{chunk-RUI3ASUX.js → chunk-7PS4235L.js} +2 -2
- package/dist/chunk-ABXPBRLA.js +4 -0
- package/dist/{chunk-NLBFNQYD.js → chunk-ACOBAMHH.js} +2 -2
- package/dist/{chunk-L47XRJIR.js → chunk-AHW6FVVE.js} +2 -2
- package/dist/{chunk-NNV27I25.js → chunk-ALRKTLJN.js} +2 -2
- package/dist/{chunk-4Y36CLQC.js → chunk-ANHJPOJA.js} +2 -2
- package/dist/{chunk-EN5P72FY.js → chunk-ANK3N5R3.js} +3 -3
- package/dist/{chunk-W2M4NOK3.js → chunk-AOPMV6DA.js} +2 -2
- package/dist/{chunk-3EVI63LY.js → chunk-AZK73LON.js} +2 -2
- package/dist/{chunk-EQ2CFYFK.js → chunk-BKSALZCI.js} +2 -2
- package/dist/{chunk-SWTIISES.js → chunk-DP62A54A.js} +2 -2
- package/dist/{chunk-HG4NTCCA.js → chunk-DTGJGJVU.js} +2 -2
- package/dist/{chunk-CXTKK6IG.js → chunk-DX6QWYFF.js} +3 -3
- package/dist/{chunk-U4DGRJSJ.js → chunk-EFEWALPR.js} +2 -2
- package/dist/{chunk-AIPFMLDE.js → chunk-FH2K64E2.js} +2 -2
- package/dist/{chunk-YESMWPFR.js → chunk-G3ZERVT2.js} +2 -2
- package/dist/{chunk-Z46H7HQJ.js → chunk-G7HTNF6W.js} +2 -2
- package/dist/{chunk-NHWPK7LM.js → chunk-GIXUCM4T.js} +2 -2
- package/dist/{chunk-V66OZHM6.js → chunk-HAY7UM5S.js} +2 -2
- package/dist/chunk-IOKJSLCB.js +7 -0
- package/dist/{chunk-HQOWRZLL.js → chunk-JBYDVM7W.js} +2 -2
- package/dist/{chunk-N5LPWHUO.js → chunk-JK5ICGYT.js} +2 -2
- package/dist/{chunk-CRN7SY2Z.js → chunk-JSU54VIW.js} +2 -2
- package/dist/{chunk-GRCOWTTQ.js → chunk-K72KOSPU.js} +2 -2
- package/dist/{chunk-W4HX6X6L.js → chunk-KNYDOPIZ.js} +2 -2
- package/dist/{chunk-PQNJZ2ZA.js → chunk-KTOOI637.js} +3 -3
- package/dist/{chunk-TEUWUJQM.js → chunk-LBRFJKYK.js} +3 -3
- package/dist/{chunk-OSFNGUNG.js → chunk-LPIZGCU7.js} +35 -35
- package/dist/{chunk-ULDJ3AOH.js → chunk-M2VMULRI.js} +2 -2
- package/dist/{chunk-R2TBVZ5P.js → chunk-M3CLXYD6.js} +2 -2
- package/dist/{chunk-M4IR6RNH.js → chunk-MBJUVOA7.js} +2 -2
- package/dist/chunk-MGQYFHMF.js +47 -0
- package/dist/{chunk-IU3Z3Z6O.js → chunk-N3FVVYZF.js} +2 -2
- package/dist/{chunk-5P7LGLCK.js → chunk-NA27SNUM.js} +2 -2
- package/dist/{chunk-JDENJPLP.js → chunk-NCXLIG5M.js} +2 -2
- package/dist/chunk-NOERIOUF.js +4 -0
- package/dist/chunk-PKQVK3UC.js +43 -0
- package/dist/{chunk-BXYOVO5O.js → chunk-PY6S7E7A.js} +2 -2
- package/dist/{chunk-KLWSWUMJ.js → chunk-Q5RFIBS7.js} +2 -2
- package/dist/{chunk-FVGDGOWC.js → chunk-RQHPJGBA.js} +2 -2
- package/dist/{chunk-LKLFA2YJ.js → chunk-SAA34YU7.js} +2 -2
- package/dist/{chunk-LPVTTQGH.js → chunk-SIIDGUKN.js} +2 -2
- package/dist/{chunk-ASSSMD25.js → chunk-SJT2GVA6.js} +2 -2
- package/dist/{chunk-AL7JKYWB.js → chunk-THBC3OCJ.js} +2 -2
- package/dist/{chunk-TDMKHBI5.js → chunk-TWMOT2DZ.js} +2 -2
- package/dist/{chunk-4YG3QIIH.js → chunk-UOULSXP5.js} +2 -2
- package/dist/{chunk-EOJKSRZP.js → chunk-V6UYUQPO.js} +2 -2
- package/dist/{chunk-ABQQTJHM.js → chunk-VIYZ2KHI.js} +2 -2
- package/dist/{chunk-HQAZV4MB.js → chunk-W7NN2ZPW.js} +2 -2
- package/dist/{chunk-ECYP65WX.js → chunk-WXRDRRNV.js} +2 -2
- package/dist/{chunk-2NLXAJPC.js → chunk-XKAIUA6G.js} +2 -2
- package/dist/{chunk-RCY2QMLR.js → chunk-XPGHK2UG.js} +2 -2
- package/dist/{chunk-AXDDUXWT.js → chunk-XSE5JD27.js} +2 -2
- package/dist/{chunk-7G7P6NEW.js → chunk-Y6P33YN6.js} +4 -4
- package/dist/{chunk-GTU66Z6G.js → chunk-YF7HVWW2.js} +2 -2
- package/dist/{chunk-H6Q5DGLD.js → chunk-Z6JKEVPT.js} +2 -2
- package/dist/{chunk-N77OKV4X.js → chunk-ZBQTWYD5.js} +2 -2
- package/dist/{chunk-TH6XDLU4.js → chunk-ZYDN3AH2.js} +2 -2
- package/dist/clean-QDAOGDLO.js +8 -0
- package/dist/close_out-PVAWA3VK.js +8 -0
- package/dist/code-VO5ENVZW.js +4 -0
- package/dist/{config-5UIJRYHK.js → config-SULANGRO.js} +2 -2
- package/dist/{connect-3TSUR3T3.js → connect-YSYXHJYC.js} +2 -2
- package/dist/{daemon-YWNTSFIE.js → daemon-LRMB4LLR.js} +2 -2
- package/dist/dashboard.js +16 -16
- package/dist/{detect-U6AQ7KL5.js → detect-5XI233YR.js} +2 -2
- package/dist/{down-PLV3ZWS5.js → down-VVC5Q24P.js} +3 -3
- package/dist/{fixture-DLV6RL7H.js → fixture-HIVPM4L5.js} +2 -2
- package/dist/form-cli.js +1 -1
- package/dist/hooks-XRCYSDAF.js +4 -0
- package/dist/{hooks_gen-TYJN6CZK.js → hooks_gen-AGDKXF55.js} +2 -2
- package/dist/infra-5GNDMAMW.js +4 -0
- package/dist/init_workspace-NO2DBXEQ.js +4 -0
- package/dist/{intercept-36AJXIFU.js → intercept-5GAJYWNL.js} +2 -2
- package/dist/{issue-SSBLSF64.js → issue-3A7ILSC5.js} +2 -2
- package/dist/lib/agent_state.js +1 -1
- package/dist/lib/gate.js +1 -1
- package/dist/lib/pr_guard.js +1 -1
- package/dist/list_workspaces-HV3NX2XG.js +7 -0
- package/dist/logs-CD7NCCHB.js +6 -0
- package/dist/main.js +3 -3
- package/dist/mcp-proxy.js +1 -1
- package/dist/mcp.js +19 -19
- package/dist/{metrics-IRDLDQ5H.js → metrics-NSATGKEW.js} +2 -2
- package/dist/migrate-Y7NXEOB6.js +4 -0
- package/dist/notes-DU4WZ3PA.js +4 -0
- package/dist/{open-CRUDRUXO.js → open-PY3O4KXQ.js} +2 -2
- package/dist/{optimize-O4L5ODO3.js → optimize-VDP4QL6F.js} +2 -2
- package/dist/pause-AXZG774K.js +4 -0
- package/dist/pr-PMIPKVYO.js +5 -0
- package/dist/proxy_reload-3IXEBWAA.js +6 -0
- package/dist/{registry-PSSN2RYH.js → registry-G3VKJJL3.js} +2 -2
- package/dist/remove-MMDOPPYO.js +7 -0
- package/dist/remove_workspace-WOPU3XVS.js +8 -0
- package/dist/restart-2LS37AEG.js +8 -0
- package/dist/resume-HB4WDNIL.js +8 -0
- package/dist/{safari-73W7GHAI.js → safari-E3DH3FTV.js} +2 -2
- package/dist/{sandbox-NHTI3UYM.js → sandbox-LJVYATDT.js} +2 -2
- package/dist/{serve-NMU4PWS7.js → serve-OLVG73DX.js} +2 -2
- package/dist/{services-WSPQYEJL.js → services-SZNASEHQ.js} +2 -2
- package/dist/{setup-MFSUAJSO.js → setup-SRWWBL4F.js} +3 -3
- package/dist/skills-Y464XSMM.js +4 -0
- package/dist/{slots-DS3EVCBQ.js → slots-EN4CP3DG.js} +2 -2
- package/dist/standards-32GLC5UY.js +4 -0
- package/dist/start_args-5LCCLMKP.js +4 -0
- package/dist/starting_prompt-AC3QATHX.js +4 -0
- package/dist/stats-PTLIGMDV.js +4 -0
- package/dist/{status-ZUGJIZV4.js → status-RGAS5OAC.js} +2 -2
- package/dist/{stop-JD2TEM7H.js → stop-7AENJ2WG.js} +2 -2
- package/dist/{telepresence-TRKFNIZU.js → telepresence-ULU7XOXT.js} +2 -2
- package/dist/{test-7TJUCWL7.js → test-AMDI6MFU.js} +2 -2
- package/dist/{tokens-TY75P3ZQ.js → tokens-CYXC225X.js} +2 -2
- package/dist/{up-SFZBAFWW.js → up-IO2S7DFA.js} +3 -3
- package/dist/{v4-B33Y37E5.js → v4-GASU2CWX.js} +2 -2
- package/dist/wait_load-WJCH3RQZ.js +4 -0
- package/dist/werkmeister-workspaces.vsix +0 -0
- package/dist/{workspace-WZOPFEHN.js → workspace-WVBUSFW7.js} +2 -2
- package/infra/schemas/services-fragment.schema.json +7 -2
- package/package.json +4 -4
- package/dist/chunk-B6FLIM6G.js +0 -43
- package/dist/chunk-J3Q5BUJY.js +0 -143
- package/dist/chunk-OTNCBBVB.js +0 -4
- package/dist/chunk-QQJGASRG.js +0 -7
- package/dist/chunk-V26LTREE.js +0 -47
- package/dist/chunk-Z45KOAD3.js +0 -4
- package/dist/clean-7MTMSPTO.js +0 -8
- package/dist/close_out-NF2WNJ6G.js +0 -8
- package/dist/code-XNWSMX3G.js +0 -4
- package/dist/hooks-3TDAN62Y.js +0 -4
- package/dist/infra-EO5DB4G2.js +0 -4
- package/dist/init_workspace-3CA3UGGB.js +0 -4
- package/dist/list_workspaces-RNE3XGTT.js +0 -7
- package/dist/logs-BLTMMJCL.js +0 -6
- package/dist/migrate-TIZJV45B.js +0 -4
- package/dist/notes-AUO2SOCZ.js +0 -4
- package/dist/pause-OQZGHFQP.js +0 -4
- package/dist/pr-QGN4CKXN.js +0 -5
- package/dist/proxy_reload-O6OUGGJ4.js +0 -6
- package/dist/remove-NCIKYFYM.js +0 -7
- package/dist/remove_workspace-G3VPIYVW.js +0 -8
- package/dist/restart-A25KOZQS.js +0 -8
- package/dist/resume-5ZY57XEK.js +0 -8
- package/dist/skills-66CFTGKO.js +0 -4
- package/dist/standards-42OJKSVC.js +0 -4
- package/dist/start_args-X4PF74EM.js +0 -4
- package/dist/starting_prompt-6SARQV5T.js +0 -4
- package/dist/stats-V5ESKTTI.js +0 -4
- package/dist/wait_load-4XN6LNA6.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
2
|
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
-
import{f as w}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=branch_cli-
|
|
3
|
+
import{f as w}from"./chunk-PKQVK3UC.js";import"./chunk-ACOBAMHH.js";import"./chunk-NA27SNUM.js";import"./chunk-ALRKTLJN.js";import"./chunk-MGQYFHMF.js";import"./chunk-AHW6FVVE.js";import"./chunk-MBJUVOA7.js";import"./chunk-JK5ICGYT.js";import"./chunk-M2VMULRI.js";import"./chunk-WXRDRRNV.js";import"./chunk-LPIZGCU7.js";import"./chunk-3HKHFGR3.js";import"./chunk-THBC3OCJ.js";import"./chunk-ZYDN3AH2.js";import"./chunk-GIXUCM4T.js";import"./chunk-TWMOT2DZ.js";import"./chunk-Y6P33YN6.js";import"./chunk-LBRFJKYK.js";import"./chunk-KTOOI637.js";import"./chunk-KNYDOPIZ.js";import"./chunk-Z6JKEVPT.js";import{h as E}from"./chunk-SJT2GVA6.js";import"./chunk-SIIDGUKN.js";import"./chunk-7PS4235L.js";import"./chunk-AOPMV6DA.js";import"./chunk-2DL43TNW.js";import"./chunk-V6UYUQPO.js";import"./chunk-FH2K64E2.js";import"./chunk-3SDWYR2Z.js";import"./chunk-G7HTNF6W.js";import{d as h}from"./chunk-5I5YOVYE.js";import"./chunk-YF7HVWW2.js";import"./chunk-JSU54VIW.js";import"./chunk-G3ZERVT2.js";import"./chunk-XKAIUA6G.js";import"./chunk-67CERR52.js";import{Z as d,ca as l}from"./chunk-XSE5JD27.js";import"./chunk-NOERIOUF.js";import{a,f as u}from"./chunk-VIYZ2KHI.js";u();import{execFileSync as g,spawn as k}from"node:child_process";import*as r from"node:fs";import*as t from"node:path";var x=["pr gate","feature up","feature stop","feature status"];function p(o){console.error(`branch-cli: ${o}`),process.exitCode=2}a(p,"refuse");async function S(o){if(!x.includes(o.slice(0,2).join(" ")))return p(`runs only ${x.map(e=>`\`${e}\``).join(", ")}; got \`${o.join(" ")}\``);let s=w(),c=E(s).find(e=>r.existsSync(t.join(e,"apps","cli","werkmeister")));if(!c)return p(`no werkmeister worktree in ${s}`);let i=t.join(c,"apps","cli","dist","main.js");if(!r.existsSync(i)){let e="";try{e=r.readFileSync(t.join(s,".env"),"utf8")}catch{}let n=/^FEATURE=(.+)$/m.exec(e)?.[1]?.trim()??"<feature>";return p(`${i} is not built. Build it in the container: docker exec -w /app ${l(n,"werkmeister-core")} pnpm turbo run build --filter=werkmeister`)}let m="?";try{m=g("git",["-C",c,"rev-parse","--short","HEAD"],{encoding:"utf8",env:h(),stdio:["ignore","pipe","ignore"]}).trim()}catch{}console.error(`branch-cli: running ${i} (worktree at ${m})`);let f=d(),$=[t.join(f,"node_modules"),process.env.NODE_PATH].filter(Boolean),j={...process.env,WERKMEISTER_ROOT:f,NODE_PATH:$.join(t.delimiter),WERKMEISTER_BRANCH_CLI:"1"};process.exitCode=await new Promise(e=>{let n=k(process.execPath,[i,...o],{stdio:"inherit",env:j});n.on("error",()=>e(1)),n.on("exit",R=>e(R??1))})}a(S,"run");export{S as run};
|
|
4
|
+
//# sourceMappingURL=branch_cli-PO6K6KVZ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
2
|
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
-
import{a as m}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=budget-
|
|
3
|
+
import{a as m}from"./chunk-Q5RFIBS7.js";import{e as d}from"./chunk-MGQYFHMF.js";import"./chunk-AHW6FVVE.js";import"./chunk-MBJUVOA7.js";import"./chunk-JK5ICGYT.js";import"./chunk-M2VMULRI.js";import"./chunk-LPIZGCU7.js";import"./chunk-3HKHFGR3.js";import"./chunk-THBC3OCJ.js";import"./chunk-ZYDN3AH2.js";import"./chunk-GIXUCM4T.js";import"./chunk-TWMOT2DZ.js";import"./chunk-Y6P33YN6.js";import"./chunk-LBRFJKYK.js";import"./chunk-KTOOI637.js";import"./chunk-KNYDOPIZ.js";import"./chunk-Z6JKEVPT.js";import"./chunk-SJT2GVA6.js";import"./chunk-SIIDGUKN.js";import"./chunk-7PS4235L.js";import"./chunk-AOPMV6DA.js";import"./chunk-2DL43TNW.js";import"./chunk-V6UYUQPO.js";import"./chunk-FH2K64E2.js";import"./chunk-3SDWYR2Z.js";import"./chunk-G7HTNF6W.js";import"./chunk-5I5YOVYE.js";import"./chunk-YF7HVWW2.js";import"./chunk-JSU54VIW.js";import"./chunk-G3ZERVT2.js";import"./chunk-XKAIUA6G.js";import"./chunk-67CERR52.js";import"./chunk-XSE5JD27.js";import"./chunk-NOERIOUF.js";import{a as s,f as u}from"./chunk-VIYZ2KHI.js";u();var f=2**30,g=s((n,t)=>Number.isFinite(n)?`${Number(n.toFixed(1))}${t}`:"no limit","limit");function w(n,t=process.platform){return n?`host load limit ${n}${{darwin:" (Docker VM load on macOS)",win32:" (Docker VM load on Windows)"}[t]??""}`:"host load limit off"}s(w,"hostLoadText");async function x(n){let{budget:t,hostLoad:l,leases:$,running:r,order:c,json:p}=await m();if(n.json){console.log(JSON.stringify(p));return}console.log(`Budget: ${g(t.memory/f," GiB")} memory, ${g(t.cpus," CPUs")}, ${w(l)}, preemption ${t.preempt?"on":"off"}`);let a=Object.entries($).sort(([,o],[,e])=>o.slot-e.slot);console.log(a.length?"Slots:":"Slots: none held");for(let[o,e]of a)console.log(` ${e.slot} ${o}${e.workspace?` ${e.workspace}`:""}`);console.log(r?r.length?"Running:":"Running: none":"Running: docker unavailable");for(let o of[...r??[]].sort((e,i)=>i.cost.cpus-e.cost.cpus))console.log(` ${d(o)}`);console.log(c.length?"Waiting:":"Waiting: none");for(let o of c){let e=o.services?`${o.services.join(", ")}${o.gate?" for a running feature":""}`:"whole feature",i=o.cost?` (${Number(o.cost.cpus.toFixed(1))} CPUs, ${(o.cost.memory/f).toFixed(1)} GiB)`:"",h=o.waitedMs?` waited ${Math.round(o.waitedMs/6e4)} min${o.holds?", gets the next free room":""}`:"";console.log(` ${o.position}. ${o.feature} ${e}${i}${h}`)}}s(x,"run");export{w as hostLoadText,x as run};
|
|
4
|
+
//# sourceMappingURL=budget-G75EKDMY.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
2
|
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
-
import"./chunk-
|
|
4
|
-
//# sourceMappingURL=cache-
|
|
3
|
+
import"./chunk-ABXPBRLA.js";import{d as s}from"./chunk-GIXUCM4T.js";import"./chunk-SIIDGUKN.js";import"./chunk-2DL43TNW.js";import"./chunk-FH2K64E2.js";import"./chunk-5I5YOVYE.js";import"./chunk-67CERR52.js";import{h as e,l as c}from"./chunk-XSE5JD27.js";import"./chunk-NOERIOUF.js";import{a as r,f as i}from"./chunk-VIYZ2KHI.js";i();async function u(o){o.action!=="prune"&&(c(`Unknown action \`${String(o.action)}\` \u2014 the only action is \`prune\`.`),process.exit(2));let t=await s({name:typeof o.name=="string"?o.name:void 0,reset:!!o.reset,force:!!o.force,dryRun:!!o.dry_run});t.length||console.log("No caches in the registry.");for(let n of t){let a=n.ok?`${e.GREEN}\u2713${e.RESET}`:`${e.RED}\u2717${e.RESET}`;console.log(`${a} ${n.name} (${n.action}): ${n.detail}`)}t.some(n=>!n.ok)&&process.exit(1)}r(u,"run");export{u as run};
|
|
4
|
+
//# sourceMappingURL=cache-HOGQSUTJ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
2
|
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
-
import{A,B as C,C as $,D as Y,E as Z,F as f,G as y,H as x,I as E,J as S,K as H,L as ee,M as te,N as re,O as N,P as oe,d as G,g as m,j as P,m as j,o as I,q as M,s as L,t as q,u as F,v as J,w as z,x as K,y as T}from"./chunk-RCY2QMLR.js";import{Ed as e,Gc as B}from"./chunk-EQ2CFYFK.js";import{a as ve}from"./chunk-FVGDGOWC.js";import{a as c,b as v,e as we,f as h}from"./chunk-ABQQTJHM.js";h();var U=we(ve(),1);h();function O(a){return(t,r,o)=>{let i=t.headers.host;if(!i){r.status(403).json({jsonrpc:"2.0",error:{code:-32e3,message:"Missing Host header"},id:null});return}let n;try{n=new URL(`http://${i}`).hostname}catch{r.status(403).json({jsonrpc:"2.0",error:{code:-32e3,message:`Invalid Host header: ${i}`},id:null});return}if(!a.includes(n)){r.status(403).json({jsonrpc:"2.0",error:{code:-32e3,message:`Invalid Host: ${n}`},id:null});return}o()}}c(O,"hostHeaderValidation");function se(){return O(["localhost","127.0.0.1","[::1]"])}c(se,"localhostHostValidation");function Ne(a={}){let{host:t="127.0.0.1",allowedHosts:r}=a,o=(0,U.default)();return o.use(U.default.json()),r?o.use(O(r)):["127.0.0.1","localhost","::1"].includes(t)?o.use(se()):(t==="0.0.0.0"||t==="::")&&console.warn(`Warning: Server is binding to ${t} without DNS rebinding protection. Consider using the allowedHosts option to restrict allowed hosts, or use authentication to protect your server.`),o}c(Ne,"createMcpExpressApp");h();h();var ae=Symbol.for("mcp.completable");function Q(a){return!!a&&typeof a=="object"&&ae in a}c(Q,"isCompletable");function ne(a){return a[ae]?.complete}c(ne,"getCompleter");var ie;(function(a){a.Completable="McpCompletable"})(ie||(ie={}));h();h();var ye=/^[A-Za-z0-9._-]{1,128}$/;function Se(a){let t=[];if(a.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(a.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${a.length})`]};if(a.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),a.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(a.startsWith("-")||a.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(a.startsWith(".")||a.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!ye.test(a)){let r=a.split("").filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,i,n)=>n.indexOf(o)===i);return t.push(`Tool name contains invalid characters: ${r.map(o=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}c(Se,"validateToolName");function _e(a,t){if(t.length>0){console.warn(`Tool name validation warning for "${a}":`);for(let r of t)console.warn(` - ${r}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}c(_e,"issueToolNameWarning");function V(a){let t=Se(a);return _e(a,t.warnings),t.isValid}c(V,"validateAndWarnToolName");h();var k=class{static{c(this,"ExperimentalMcpServerTasks")}constructor(t){this._mcpServer=t}registerToolTask(t,r,o){let i={taskSupport:"required",...r.execution};if(i.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,i,r._meta,o)}};h();var le=class{static{c(this,"McpServer")}constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new oe(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new k(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(w(T)),this.server.assertCanSetRequestHandler(w(C)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(T,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{let o={name:t,title:r.title,description:r.description,inputSchema:(()=>{let i=S(r.inputSchema);return i?N(i,{strictUnions:!0,pipeStrategy:"input"}):Re})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let i=S(r.outputSchema);i&&(o.outputSchema=N(i,{strictUnions:!0,pipeStrategy:"output"}))}return o})})),this.server.setRequestHandler(C,async(t,r)=>{try{let o=this._registeredTools[t.params.name];if(!o)throw new f(m.InvalidParams,`Tool ${t.params.name} not found`);if(!o.enabled)throw new f(m.InvalidParams,`Tool ${t.params.name} disabled`);let i=!!t.params.task,n=o.execution?.taskSupport,s="createTask"in o.handler;if((n==="required"||n==="optional")&&!s)throw new f(m.InternalError,`Tool ${t.params.name} has taskSupport '${n}' but was not registered with registerToolTask`);if(n==="required"&&!i)throw new f(m.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(n==="optional"&&!i&&s)return await this.handleAutomaticTaskPolling(o,t,r);let l=await this.validateToolInput(o,t.params.arguments,t.params.name),u=await this.executeToolHandler(o,l,r);return i||await this.validateToolOutput(o,u,t.params.name),u}catch(o){if(o instanceof f&&o.code===m.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,r,o){if(!t.inputSchema)return;let n=S(t.inputSchema)??t.inputSchema,s=await x(n,r);if(!s.success){let l="error"in s?s.error:"Unknown error",u=H(l);throw new f(m.InvalidParams,`Input validation error: Invalid arguments for tool ${o}: ${u}`)}return s.data}async validateToolOutput(t,r,o){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new f(m.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);let i=S(t.outputSchema),n=await x(i,r.structuredContent);if(!n.success){let s="error"in n?n.error:"Unknown error",l=H(s);throw new f(m.InvalidParams,`Output validation error: Invalid structured content for tool ${o}: ${l}`)}}async executeToolHandler(t,r,o){let i=t.handler;if("createTask"in i){if(!o.taskStore)throw new Error("No task store provided.");let s={...o,taskStore:o.taskStore};if(t.inputSchema){let l=i;return await Promise.resolve(l.createTask(r,s))}else{let l=i;return await Promise.resolve(l.createTask(s))}}if(t.inputSchema){let s=i;return await Promise.resolve(s(r,o))}else{let s=i;return await Promise.resolve(s(o))}}async handleAutomaticTaskPolling(t,r,o){if(!o.taskStore)throw new Error("No task store provided for task-capable tool.");let i=await this.validateToolInput(t,r.params.arguments,r.params.name),n=t.handler,s={...o,taskStore:o.taskStore},l=i?await Promise.resolve(n.createTask(i,s)):await Promise.resolve(n.createTask(s)),u=l.task.taskId,d=l.task,g=d.pollInterval??5e3;for(;d.status!=="completed"&&d.status!=="failed"&&d.status!=="cancelled";){await new Promise(be=>setTimeout(be,g));let p=await o.taskStore.getTask(u);if(!p)throw new f(m.InternalError,`Task ${u} not found during polling`);d=p}return await o.taskStore.getTaskResult(u)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(w($)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler($,async t=>{switch(t.params.ref.type){case"ref/prompt":return Y(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return Z(t),this.handleResourceCompletion(t,t.params.ref);default:throw new f(m.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let o=this._registeredPrompts[r.name];if(!o)throw new f(m.InvalidParams,`Prompt ${r.name} not found`);if(!o.enabled)throw new f(m.InvalidParams,`Prompt ${r.name} disabled`);if(!o.argsSchema)return _;let n=E(o.argsSchema)?.[t.params.argument.name];if(!Q(n))return _;let s=ne(n);if(!s)return _;let l=await s(t.params.argument.value,t.params.context);return de(l)}async handleResourceCompletion(t,r){let o=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===r.uri);if(!o){if(this._registeredResources[r.uri])return _;throw new f(m.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let i=o.resourceTemplate.completeCallback(t.params.argument.name);if(!i)return _;let n=await i(t.params.argument.value,t.params.context);return de(n)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(w(j)),this.server.assertCanSetRequestHandler(w(I)),this.server.assertCanSetRequestHandler(w(M)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(j,async(t,r)=>{let o=Object.entries(this._registeredResources).filter(([n,s])=>s.enabled).map(([n,s])=>({uri:n,name:s.name,...s.metadata})),i=[];for(let n of Object.values(this._registeredResourceTemplates)){if(!n.resourceTemplate.listCallback)continue;let s=await n.resourceTemplate.listCallback(r);for(let l of s.resources)i.push({...n.metadata,...l})}return{resources:[...o,...i]}}),this.server.setRequestHandler(I,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,o])=>({name:r,uriTemplate:o.resourceTemplate.uriTemplate.toString(),...o.metadata}))})),this.server.setRequestHandler(M,async(t,r)=>{let o=new URL(t.params.uri),i=this._registeredResources[o.toString()];if(i){if(!i.enabled)throw new f(m.InvalidParams,`Resource ${o} disabled`);return i.readCallback(o,r)}for(let n of Object.values(this._registeredResourceTemplates)){let s=n.resourceTemplate.uriTemplate.match(o.toString());if(s)return n.readCallback(o,s,r)}throw new f(m.InvalidParams,`Resource ${o} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(w(L)),this.server.assertCanSetRequestHandler(w(q)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(L,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?Te(r.argsSchema):void 0}))})),this.server.setRequestHandler(q,async(t,r)=>{let o=this._registeredPrompts[t.params.name];if(!o)throw new f(m.InvalidParams,`Prompt ${t.params.name} not found`);if(!o.enabled)throw new f(m.InvalidParams,`Prompt ${t.params.name} disabled`);if(o.argsSchema){let i=S(o.argsSchema),n=await x(i,t.params.arguments);if(!n.success){let u="error"in n?n.error:"Unknown error",d=H(u);throw new f(m.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${d}`)}let s=n.data,l=o.callback;return await Promise.resolve(l(s,r))}else{let i=o.callback;return await Promise.resolve(i(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...o){let i;typeof o[0]=="object"&&(i=o.shift());let n=o[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let s=this._createRegisteredResource(t,void 0,r,i,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let s=this._createRegisteredResourceTemplate(t,void 0,r,i,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(t,r,o,i){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let n=this._createRegisteredResource(t,o.title,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),n}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let n=this._createRegisteredResourceTemplate(t,o.title,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),n}}_createRegisteredResource(t,r,o,i,n){let s={name:t,title:r,metadata:i,readCallback:n,enabled:!0,disable:c(()=>s.update({enabled:!1}),"disable"),enable:c(()=>s.update({enabled:!0}),"enable"),remove:c(()=>s.update({uri:null}),"remove"),update:c(l=>{typeof l.uri<"u"&&l.uri!==o&&(delete this._registeredResources[o],l.uri&&(this._registeredResources[l.uri]=s)),typeof l.name<"u"&&(s.name=l.name),typeof l.title<"u"&&(s.title=l.title),typeof l.metadata<"u"&&(s.metadata=l.metadata),typeof l.callback<"u"&&(s.readCallback=l.callback),typeof l.enabled<"u"&&(s.enabled=l.enabled),this.sendResourceListChanged()},"update")};return this._registeredResources[o]=s,s}_createRegisteredResourceTemplate(t,r,o,i,n){let s={resourceTemplate:o,title:r,metadata:i,readCallback:n,enabled:!0,disable:c(()=>s.update({enabled:!1}),"disable"),enable:c(()=>s.update({enabled:!0}),"enable"),remove:c(()=>s.update({name:null}),"remove"),update:c(d=>{typeof d.name<"u"&&d.name!==t&&(delete this._registeredResourceTemplates[t],d.name&&(this._registeredResourceTemplates[d.name]=s)),typeof d.title<"u"&&(s.title=d.title),typeof d.template<"u"&&(s.resourceTemplate=d.template),typeof d.metadata<"u"&&(s.metadata=d.metadata),typeof d.callback<"u"&&(s.readCallback=d.callback),typeof d.enabled<"u"&&(s.enabled=d.enabled),this.sendResourceListChanged()},"update")};this._registeredResourceTemplates[t]=s;let l=o.uriTemplate.variableNames;return Array.isArray(l)&&l.some(d=>!!o.completeCallback(d))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(t,r,o,i,n){let s={title:r,description:o,argsSchema:i===void 0?void 0:y(i),callback:n,enabled:!0,disable:c(()=>s.update({enabled:!1}),"disable"),enable:c(()=>s.update({enabled:!0}),"enable"),remove:c(()=>s.update({name:null}),"remove"),update:c(l=>{typeof l.name<"u"&&l.name!==t&&(delete this._registeredPrompts[t],l.name&&(this._registeredPrompts[l.name]=s)),typeof l.title<"u"&&(s.title=l.title),typeof l.description<"u"&&(s.description=l.description),typeof l.argsSchema<"u"&&(s.argsSchema=y(l.argsSchema)),typeof l.callback<"u"&&(s.callback=l.callback),typeof l.enabled<"u"&&(s.enabled=l.enabled),this.sendPromptListChanged()},"update")};return this._registeredPrompts[t]=s,i&&Object.values(i).some(u=>{let d=u instanceof B?u._def?.innerType:u;return Q(d)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,o,i,n,s,l,u,d){V(t);let g={title:r,description:o,inputSchema:ce(i),outputSchema:ce(n),annotations:s,execution:l,_meta:u,handler:d,enabled:!0,disable:c(()=>g.update({enabled:!1}),"disable"),enable:c(()=>g.update({enabled:!0}),"enable"),remove:c(()=>g.update({name:null}),"remove"),update:c(p=>{typeof p.name<"u"&&p.name!==t&&(typeof p.name=="string"&&V(p.name),delete this._registeredTools[t],p.name&&(this._registeredTools[p.name]=g)),typeof p.title<"u"&&(g.title=p.title),typeof p.description<"u"&&(g.description=p.description),typeof p.paramsSchema<"u"&&(g.inputSchema=y(p.paramsSchema)),typeof p.outputSchema<"u"&&(g.outputSchema=y(p.outputSchema)),typeof p.callback<"u"&&(g.handler=p.callback),typeof p.annotations<"u"&&(g.annotations=p.annotations),typeof p._meta<"u"&&(g._meta=p._meta),typeof p.enabled<"u"&&(g.enabled=p.enabled),this.sendToolListChanged()},"update")};return this._registeredTools[t]=g,this.setToolRequestHandlers(),this.sendToolListChanged(),g}tool(t,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let o,i,n,s;if(typeof r[0]=="string"&&(o=r.shift()),r.length>1){let u=r[0];if(D(u))i=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!D(r[0])&&(s=r.shift());else if(typeof u=="object"&&u!==null){if(Object.values(u).some(d=>typeof d=="object"&&d!==null))throw new Error(`Tool ${t} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);s=r.shift()}}let l=r[0];return this._createRegisteredTool(t,void 0,o,i,n,s,{taskSupport:"forbidden"},void 0,l)}registerTool(t,r,o){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:i,description:n,inputSchema:s,outputSchema:l,annotations:u,_meta:d}=r;return this._createRegisteredTool(t,i,n,s,l,u,{taskSupport:"forbidden"},d,o)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let o;typeof r[0]=="string"&&(o=r.shift());let i;r.length>1&&(i=r.shift());let n=r[0],s=this._createRegisteredPrompt(t,void 0,o,i,n);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(t,r,o){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:i,description:n,argsSchema:s}=r,l=this._createRegisteredPrompt(t,i,n,s,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),l}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var Re={type:"object",properties:{}};function ue(a){return a!==null&&typeof a=="object"&&"parse"in a&&typeof a.parse=="function"&&"safeParse"in a&&typeof a.safeParse=="function"}c(ue,"isZodTypeLike");function pe(a){return"_def"in a||"_zod"in a||ue(a)}c(pe,"isZodSchemaInstance");function D(a){return typeof a!="object"||a===null||pe(a)?!1:Object.keys(a).length===0?!0:Object.values(a).some(ue)}c(D,"isZodRawShapeCompat");function ce(a){if(a){if(D(a))return y(a);if(!pe(a))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return a}}c(ce,"getZodSchemaObject");function Te(a){let t=E(a);return t?Object.entries(t).map(([r,o])=>{let i=ee(o),n=te(o);return{name:r,description:i,required:!n}}):[]}c(Te,"promptArgumentsFromSchema");function w(a){let r=E(a)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=re(r);if(typeof o=="string")return o;throw new Error("Schema method literal must be a string")}c(w,"getMethodValue");function de(a){return{completion:{values:a.slice(0,100),total:a.length,hasMore:a.length>100}}}c(de,"createCompletionResult");var _={completion:{values:[],hasMore:!1}};h();var he=class a{static{c(this,"InMemoryTransport")}constructor(){this._messageQueue=[]}static createLinkedPair(){let t=new a,r=new a;return t._otherTransport=r,r._otherTransport=t,[t,r]}async start(){for(;this._messageQueue.length>0;){let t=this._messageQueue.shift();this.onmessage?.(t.message,t.extra)}}async close(){let t=this._otherTransport;this._otherTransport=void 0,await t?.close(),this.onclose?.()}async send(t,r){if(!this._otherTransport)throw new Error("Not connected");this._otherTransport.onmessage?this._otherTransport.onmessage(t,{authInfo:r?.authInfo}):this._otherTransport._messageQueue.push({message:t,extra:{authInfo:r?.authInfo}})}};h();var kt=(a=>typeof v<"u"?v:typeof Proxy<"u"?new Proxy(a,{get:c((t,r)=>(typeof v<"u"?v:t)[r],"get")}):a)(function(a){if(typeof v<"u")return v.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var Ce=e.union([e.literal("light"),e.literal("dark")]).describe("Color theme preference for the host environment."),R=e.union([e.literal("inline"),e.literal("fullscreen"),e.literal("pip")]).describe("Display mode for UI presentation."),xe=e.union([e.literal("--color-background-primary"),e.literal("--color-background-secondary"),e.literal("--color-background-tertiary"),e.literal("--color-background-inverse"),e.literal("--color-background-ghost"),e.literal("--color-background-info"),e.literal("--color-background-danger"),e.literal("--color-background-success"),e.literal("--color-background-warning"),e.literal("--color-background-disabled"),e.literal("--color-text-primary"),e.literal("--color-text-secondary"),e.literal("--color-text-tertiary"),e.literal("--color-text-inverse"),e.literal("--color-text-ghost"),e.literal("--color-text-info"),e.literal("--color-text-danger"),e.literal("--color-text-success"),e.literal("--color-text-warning"),e.literal("--color-text-disabled"),e.literal("--color-border-primary"),e.literal("--color-border-secondary"),e.literal("--color-border-tertiary"),e.literal("--color-border-inverse"),e.literal("--color-border-ghost"),e.literal("--color-border-info"),e.literal("--color-border-danger"),e.literal("--color-border-success"),e.literal("--color-border-warning"),e.literal("--color-border-disabled"),e.literal("--color-ring-primary"),e.literal("--color-ring-secondary"),e.literal("--color-ring-inverse"),e.literal("--color-ring-info"),e.literal("--color-ring-danger"),e.literal("--color-ring-success"),e.literal("--color-ring-warning"),e.literal("--font-sans"),e.literal("--font-mono"),e.literal("--font-weight-normal"),e.literal("--font-weight-medium"),e.literal("--font-weight-semibold"),e.literal("--font-weight-bold"),e.literal("--font-text-xs-size"),e.literal("--font-text-sm-size"),e.literal("--font-text-md-size"),e.literal("--font-text-lg-size"),e.literal("--font-heading-xs-size"),e.literal("--font-heading-sm-size"),e.literal("--font-heading-md-size"),e.literal("--font-heading-lg-size"),e.literal("--font-heading-xl-size"),e.literal("--font-heading-2xl-size"),e.literal("--font-heading-3xl-size"),e.literal("--font-text-xs-line-height"),e.literal("--font-text-sm-line-height"),e.literal("--font-text-md-line-height"),e.literal("--font-text-lg-line-height"),e.literal("--font-heading-xs-line-height"),e.literal("--font-heading-sm-line-height"),e.literal("--font-heading-md-line-height"),e.literal("--font-heading-lg-line-height"),e.literal("--font-heading-xl-line-height"),e.literal("--font-heading-2xl-line-height"),e.literal("--font-heading-3xl-line-height"),e.literal("--border-radius-xs"),e.literal("--border-radius-sm"),e.literal("--border-radius-md"),e.literal("--border-radius-lg"),e.literal("--border-radius-xl"),e.literal("--border-radius-full"),e.literal("--border-width-regular"),e.literal("--shadow-hairline"),e.literal("--shadow-sm"),e.literal("--shadow-md"),e.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),Ee=e.record(xe.describe(`Style variables for theming MCP apps.
|
|
3
|
+
import{A,B as C,C as $,D as Y,E as Z,F as f,G as y,H as x,I as E,J as S,K as H,L as ee,M as te,N as re,O as N,P as oe,d as G,g as m,j as P,m as j,o as I,q as M,s as L,t as q,u as F,v as J,w as z,x as K,y as T}from"./chunk-XPGHK2UG.js";import{Ed as e,Gc as B}from"./chunk-BKSALZCI.js";import{a as ve}from"./chunk-RQHPJGBA.js";import{a as c,b as v,e as we,f as h}from"./chunk-VIYZ2KHI.js";h();var U=we(ve(),1);h();function O(a){return(t,r,o)=>{let i=t.headers.host;if(!i){r.status(403).json({jsonrpc:"2.0",error:{code:-32e3,message:"Missing Host header"},id:null});return}let n;try{n=new URL(`http://${i}`).hostname}catch{r.status(403).json({jsonrpc:"2.0",error:{code:-32e3,message:`Invalid Host header: ${i}`},id:null});return}if(!a.includes(n)){r.status(403).json({jsonrpc:"2.0",error:{code:-32e3,message:`Invalid Host: ${n}`},id:null});return}o()}}c(O,"hostHeaderValidation");function se(){return O(["localhost","127.0.0.1","[::1]"])}c(se,"localhostHostValidation");function Ne(a={}){let{host:t="127.0.0.1",allowedHosts:r}=a,o=(0,U.default)();return o.use(U.default.json()),r?o.use(O(r)):["127.0.0.1","localhost","::1"].includes(t)?o.use(se()):(t==="0.0.0.0"||t==="::")&&console.warn(`Warning: Server is binding to ${t} without DNS rebinding protection. Consider using the allowedHosts option to restrict allowed hosts, or use authentication to protect your server.`),o}c(Ne,"createMcpExpressApp");h();h();var ae=Symbol.for("mcp.completable");function Q(a){return!!a&&typeof a=="object"&&ae in a}c(Q,"isCompletable");function ne(a){return a[ae]?.complete}c(ne,"getCompleter");var ie;(function(a){a.Completable="McpCompletable"})(ie||(ie={}));h();h();var ye=/^[A-Za-z0-9._-]{1,128}$/;function Se(a){let t=[];if(a.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(a.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${a.length})`]};if(a.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),a.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(a.startsWith("-")||a.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(a.startsWith(".")||a.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!ye.test(a)){let r=a.split("").filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,i,n)=>n.indexOf(o)===i);return t.push(`Tool name contains invalid characters: ${r.map(o=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}c(Se,"validateToolName");function _e(a,t){if(t.length>0){console.warn(`Tool name validation warning for "${a}":`);for(let r of t)console.warn(` - ${r}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}c(_e,"issueToolNameWarning");function V(a){let t=Se(a);return _e(a,t.warnings),t.isValid}c(V,"validateAndWarnToolName");h();var k=class{static{c(this,"ExperimentalMcpServerTasks")}constructor(t){this._mcpServer=t}registerToolTask(t,r,o){let i={taskSupport:"required",...r.execution};if(i.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,i,r._meta,o)}};h();var le=class{static{c(this,"McpServer")}constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new oe(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new k(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(w(T)),this.server.assertCanSetRequestHandler(w(C)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(T,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{let o={name:t,title:r.title,description:r.description,inputSchema:(()=>{let i=S(r.inputSchema);return i?N(i,{strictUnions:!0,pipeStrategy:"input"}):Re})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let i=S(r.outputSchema);i&&(o.outputSchema=N(i,{strictUnions:!0,pipeStrategy:"output"}))}return o})})),this.server.setRequestHandler(C,async(t,r)=>{try{let o=this._registeredTools[t.params.name];if(!o)throw new f(m.InvalidParams,`Tool ${t.params.name} not found`);if(!o.enabled)throw new f(m.InvalidParams,`Tool ${t.params.name} disabled`);let i=!!t.params.task,n=o.execution?.taskSupport,s="createTask"in o.handler;if((n==="required"||n==="optional")&&!s)throw new f(m.InternalError,`Tool ${t.params.name} has taskSupport '${n}' but was not registered with registerToolTask`);if(n==="required"&&!i)throw new f(m.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(n==="optional"&&!i&&s)return await this.handleAutomaticTaskPolling(o,t,r);let l=await this.validateToolInput(o,t.params.arguments,t.params.name),u=await this.executeToolHandler(o,l,r);return i||await this.validateToolOutput(o,u,t.params.name),u}catch(o){if(o instanceof f&&o.code===m.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,r,o){if(!t.inputSchema)return;let n=S(t.inputSchema)??t.inputSchema,s=await x(n,r);if(!s.success){let l="error"in s?s.error:"Unknown error",u=H(l);throw new f(m.InvalidParams,`Input validation error: Invalid arguments for tool ${o}: ${u}`)}return s.data}async validateToolOutput(t,r,o){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new f(m.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);let i=S(t.outputSchema),n=await x(i,r.structuredContent);if(!n.success){let s="error"in n?n.error:"Unknown error",l=H(s);throw new f(m.InvalidParams,`Output validation error: Invalid structured content for tool ${o}: ${l}`)}}async executeToolHandler(t,r,o){let i=t.handler;if("createTask"in i){if(!o.taskStore)throw new Error("No task store provided.");let s={...o,taskStore:o.taskStore};if(t.inputSchema){let l=i;return await Promise.resolve(l.createTask(r,s))}else{let l=i;return await Promise.resolve(l.createTask(s))}}if(t.inputSchema){let s=i;return await Promise.resolve(s(r,o))}else{let s=i;return await Promise.resolve(s(o))}}async handleAutomaticTaskPolling(t,r,o){if(!o.taskStore)throw new Error("No task store provided for task-capable tool.");let i=await this.validateToolInput(t,r.params.arguments,r.params.name),n=t.handler,s={...o,taskStore:o.taskStore},l=i?await Promise.resolve(n.createTask(i,s)):await Promise.resolve(n.createTask(s)),u=l.task.taskId,d=l.task,g=d.pollInterval??5e3;for(;d.status!=="completed"&&d.status!=="failed"&&d.status!=="cancelled";){await new Promise(be=>setTimeout(be,g));let p=await o.taskStore.getTask(u);if(!p)throw new f(m.InternalError,`Task ${u} not found during polling`);d=p}return await o.taskStore.getTaskResult(u)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(w($)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler($,async t=>{switch(t.params.ref.type){case"ref/prompt":return Y(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return Z(t),this.handleResourceCompletion(t,t.params.ref);default:throw new f(m.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let o=this._registeredPrompts[r.name];if(!o)throw new f(m.InvalidParams,`Prompt ${r.name} not found`);if(!o.enabled)throw new f(m.InvalidParams,`Prompt ${r.name} disabled`);if(!o.argsSchema)return _;let n=E(o.argsSchema)?.[t.params.argument.name];if(!Q(n))return _;let s=ne(n);if(!s)return _;let l=await s(t.params.argument.value,t.params.context);return de(l)}async handleResourceCompletion(t,r){let o=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===r.uri);if(!o){if(this._registeredResources[r.uri])return _;throw new f(m.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let i=o.resourceTemplate.completeCallback(t.params.argument.name);if(!i)return _;let n=await i(t.params.argument.value,t.params.context);return de(n)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(w(j)),this.server.assertCanSetRequestHandler(w(I)),this.server.assertCanSetRequestHandler(w(M)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(j,async(t,r)=>{let o=Object.entries(this._registeredResources).filter(([n,s])=>s.enabled).map(([n,s])=>({uri:n,name:s.name,...s.metadata})),i=[];for(let n of Object.values(this._registeredResourceTemplates)){if(!n.resourceTemplate.listCallback)continue;let s=await n.resourceTemplate.listCallback(r);for(let l of s.resources)i.push({...n.metadata,...l})}return{resources:[...o,...i]}}),this.server.setRequestHandler(I,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,o])=>({name:r,uriTemplate:o.resourceTemplate.uriTemplate.toString(),...o.metadata}))})),this.server.setRequestHandler(M,async(t,r)=>{let o=new URL(t.params.uri),i=this._registeredResources[o.toString()];if(i){if(!i.enabled)throw new f(m.InvalidParams,`Resource ${o} disabled`);return i.readCallback(o,r)}for(let n of Object.values(this._registeredResourceTemplates)){let s=n.resourceTemplate.uriTemplate.match(o.toString());if(s)return n.readCallback(o,s,r)}throw new f(m.InvalidParams,`Resource ${o} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(w(L)),this.server.assertCanSetRequestHandler(w(q)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(L,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?Te(r.argsSchema):void 0}))})),this.server.setRequestHandler(q,async(t,r)=>{let o=this._registeredPrompts[t.params.name];if(!o)throw new f(m.InvalidParams,`Prompt ${t.params.name} not found`);if(!o.enabled)throw new f(m.InvalidParams,`Prompt ${t.params.name} disabled`);if(o.argsSchema){let i=S(o.argsSchema),n=await x(i,t.params.arguments);if(!n.success){let u="error"in n?n.error:"Unknown error",d=H(u);throw new f(m.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${d}`)}let s=n.data,l=o.callback;return await Promise.resolve(l(s,r))}else{let i=o.callback;return await Promise.resolve(i(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...o){let i;typeof o[0]=="object"&&(i=o.shift());let n=o[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let s=this._createRegisteredResource(t,void 0,r,i,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let s=this._createRegisteredResourceTemplate(t,void 0,r,i,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(t,r,o,i){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let n=this._createRegisteredResource(t,o.title,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),n}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let n=this._createRegisteredResourceTemplate(t,o.title,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),n}}_createRegisteredResource(t,r,o,i,n){let s={name:t,title:r,metadata:i,readCallback:n,enabled:!0,disable:c(()=>s.update({enabled:!1}),"disable"),enable:c(()=>s.update({enabled:!0}),"enable"),remove:c(()=>s.update({uri:null}),"remove"),update:c(l=>{typeof l.uri<"u"&&l.uri!==o&&(delete this._registeredResources[o],l.uri&&(this._registeredResources[l.uri]=s)),typeof l.name<"u"&&(s.name=l.name),typeof l.title<"u"&&(s.title=l.title),typeof l.metadata<"u"&&(s.metadata=l.metadata),typeof l.callback<"u"&&(s.readCallback=l.callback),typeof l.enabled<"u"&&(s.enabled=l.enabled),this.sendResourceListChanged()},"update")};return this._registeredResources[o]=s,s}_createRegisteredResourceTemplate(t,r,o,i,n){let s={resourceTemplate:o,title:r,metadata:i,readCallback:n,enabled:!0,disable:c(()=>s.update({enabled:!1}),"disable"),enable:c(()=>s.update({enabled:!0}),"enable"),remove:c(()=>s.update({name:null}),"remove"),update:c(d=>{typeof d.name<"u"&&d.name!==t&&(delete this._registeredResourceTemplates[t],d.name&&(this._registeredResourceTemplates[d.name]=s)),typeof d.title<"u"&&(s.title=d.title),typeof d.template<"u"&&(s.resourceTemplate=d.template),typeof d.metadata<"u"&&(s.metadata=d.metadata),typeof d.callback<"u"&&(s.readCallback=d.callback),typeof d.enabled<"u"&&(s.enabled=d.enabled),this.sendResourceListChanged()},"update")};this._registeredResourceTemplates[t]=s;let l=o.uriTemplate.variableNames;return Array.isArray(l)&&l.some(d=>!!o.completeCallback(d))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(t,r,o,i,n){let s={title:r,description:o,argsSchema:i===void 0?void 0:y(i),callback:n,enabled:!0,disable:c(()=>s.update({enabled:!1}),"disable"),enable:c(()=>s.update({enabled:!0}),"enable"),remove:c(()=>s.update({name:null}),"remove"),update:c(l=>{typeof l.name<"u"&&l.name!==t&&(delete this._registeredPrompts[t],l.name&&(this._registeredPrompts[l.name]=s)),typeof l.title<"u"&&(s.title=l.title),typeof l.description<"u"&&(s.description=l.description),typeof l.argsSchema<"u"&&(s.argsSchema=y(l.argsSchema)),typeof l.callback<"u"&&(s.callback=l.callback),typeof l.enabled<"u"&&(s.enabled=l.enabled),this.sendPromptListChanged()},"update")};return this._registeredPrompts[t]=s,i&&Object.values(i).some(u=>{let d=u instanceof B?u._def?.innerType:u;return Q(d)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,o,i,n,s,l,u,d){V(t);let g={title:r,description:o,inputSchema:ce(i),outputSchema:ce(n),annotations:s,execution:l,_meta:u,handler:d,enabled:!0,disable:c(()=>g.update({enabled:!1}),"disable"),enable:c(()=>g.update({enabled:!0}),"enable"),remove:c(()=>g.update({name:null}),"remove"),update:c(p=>{typeof p.name<"u"&&p.name!==t&&(typeof p.name=="string"&&V(p.name),delete this._registeredTools[t],p.name&&(this._registeredTools[p.name]=g)),typeof p.title<"u"&&(g.title=p.title),typeof p.description<"u"&&(g.description=p.description),typeof p.paramsSchema<"u"&&(g.inputSchema=y(p.paramsSchema)),typeof p.outputSchema<"u"&&(g.outputSchema=y(p.outputSchema)),typeof p.callback<"u"&&(g.handler=p.callback),typeof p.annotations<"u"&&(g.annotations=p.annotations),typeof p._meta<"u"&&(g._meta=p._meta),typeof p.enabled<"u"&&(g.enabled=p.enabled),this.sendToolListChanged()},"update")};return this._registeredTools[t]=g,this.setToolRequestHandlers(),this.sendToolListChanged(),g}tool(t,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let o,i,n,s;if(typeof r[0]=="string"&&(o=r.shift()),r.length>1){let u=r[0];if(D(u))i=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!D(r[0])&&(s=r.shift());else if(typeof u=="object"&&u!==null){if(Object.values(u).some(d=>typeof d=="object"&&d!==null))throw new Error(`Tool ${t} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);s=r.shift()}}let l=r[0];return this._createRegisteredTool(t,void 0,o,i,n,s,{taskSupport:"forbidden"},void 0,l)}registerTool(t,r,o){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:i,description:n,inputSchema:s,outputSchema:l,annotations:u,_meta:d}=r;return this._createRegisteredTool(t,i,n,s,l,u,{taskSupport:"forbidden"},d,o)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let o;typeof r[0]=="string"&&(o=r.shift());let i;r.length>1&&(i=r.shift());let n=r[0],s=this._createRegisteredPrompt(t,void 0,o,i,n);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(t,r,o){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:i,description:n,argsSchema:s}=r,l=this._createRegisteredPrompt(t,i,n,s,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),l}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var Re={type:"object",properties:{}};function ue(a){return a!==null&&typeof a=="object"&&"parse"in a&&typeof a.parse=="function"&&"safeParse"in a&&typeof a.safeParse=="function"}c(ue,"isZodTypeLike");function pe(a){return"_def"in a||"_zod"in a||ue(a)}c(pe,"isZodSchemaInstance");function D(a){return typeof a!="object"||a===null||pe(a)?!1:Object.keys(a).length===0?!0:Object.values(a).some(ue)}c(D,"isZodRawShapeCompat");function ce(a){if(a){if(D(a))return y(a);if(!pe(a))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return a}}c(ce,"getZodSchemaObject");function Te(a){let t=E(a);return t?Object.entries(t).map(([r,o])=>{let i=ee(o),n=te(o);return{name:r,description:i,required:!n}}):[]}c(Te,"promptArgumentsFromSchema");function w(a){let r=E(a)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=re(r);if(typeof o=="string")return o;throw new Error("Schema method literal must be a string")}c(w,"getMethodValue");function de(a){return{completion:{values:a.slice(0,100),total:a.length,hasMore:a.length>100}}}c(de,"createCompletionResult");var _={completion:{values:[],hasMore:!1}};h();var he=class a{static{c(this,"InMemoryTransport")}constructor(){this._messageQueue=[]}static createLinkedPair(){let t=new a,r=new a;return t._otherTransport=r,r._otherTransport=t,[t,r]}async start(){for(;this._messageQueue.length>0;){let t=this._messageQueue.shift();this.onmessage?.(t.message,t.extra)}}async close(){let t=this._otherTransport;this._otherTransport=void 0,await t?.close(),this.onclose?.()}async send(t,r){if(!this._otherTransport)throw new Error("Not connected");this._otherTransport.onmessage?this._otherTransport.onmessage(t,{authInfo:r?.authInfo}):this._otherTransport._messageQueue.push({message:t,extra:{authInfo:r?.authInfo}})}};h();var kt=(a=>typeof v<"u"?v:typeof Proxy<"u"?new Proxy(a,{get:c((t,r)=>(typeof v<"u"?v:t)[r],"get")}):a)(function(a){if(typeof v<"u")return v.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var Ce=e.union([e.literal("light"),e.literal("dark")]).describe("Color theme preference for the host environment."),R=e.union([e.literal("inline"),e.literal("fullscreen"),e.literal("pip")]).describe("Display mode for UI presentation."),xe=e.union([e.literal("--color-background-primary"),e.literal("--color-background-secondary"),e.literal("--color-background-tertiary"),e.literal("--color-background-inverse"),e.literal("--color-background-ghost"),e.literal("--color-background-info"),e.literal("--color-background-danger"),e.literal("--color-background-success"),e.literal("--color-background-warning"),e.literal("--color-background-disabled"),e.literal("--color-text-primary"),e.literal("--color-text-secondary"),e.literal("--color-text-tertiary"),e.literal("--color-text-inverse"),e.literal("--color-text-ghost"),e.literal("--color-text-info"),e.literal("--color-text-danger"),e.literal("--color-text-success"),e.literal("--color-text-warning"),e.literal("--color-text-disabled"),e.literal("--color-border-primary"),e.literal("--color-border-secondary"),e.literal("--color-border-tertiary"),e.literal("--color-border-inverse"),e.literal("--color-border-ghost"),e.literal("--color-border-info"),e.literal("--color-border-danger"),e.literal("--color-border-success"),e.literal("--color-border-warning"),e.literal("--color-border-disabled"),e.literal("--color-ring-primary"),e.literal("--color-ring-secondary"),e.literal("--color-ring-inverse"),e.literal("--color-ring-info"),e.literal("--color-ring-danger"),e.literal("--color-ring-success"),e.literal("--color-ring-warning"),e.literal("--font-sans"),e.literal("--font-mono"),e.literal("--font-weight-normal"),e.literal("--font-weight-medium"),e.literal("--font-weight-semibold"),e.literal("--font-weight-bold"),e.literal("--font-text-xs-size"),e.literal("--font-text-sm-size"),e.literal("--font-text-md-size"),e.literal("--font-text-lg-size"),e.literal("--font-heading-xs-size"),e.literal("--font-heading-sm-size"),e.literal("--font-heading-md-size"),e.literal("--font-heading-lg-size"),e.literal("--font-heading-xl-size"),e.literal("--font-heading-2xl-size"),e.literal("--font-heading-3xl-size"),e.literal("--font-text-xs-line-height"),e.literal("--font-text-sm-line-height"),e.literal("--font-text-md-line-height"),e.literal("--font-text-lg-line-height"),e.literal("--font-heading-xs-line-height"),e.literal("--font-heading-sm-line-height"),e.literal("--font-heading-md-line-height"),e.literal("--font-heading-lg-line-height"),e.literal("--font-heading-xl-line-height"),e.literal("--font-heading-2xl-line-height"),e.literal("--font-heading-3xl-line-height"),e.literal("--border-radius-xs"),e.literal("--border-radius-sm"),e.literal("--border-radius-md"),e.literal("--border-radius-lg"),e.literal("--border-radius-xl"),e.literal("--border-radius-full"),e.literal("--border-width-regular"),e.literal("--shadow-hairline"),e.literal("--shadow-sm"),e.literal("--shadow-md"),e.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),Ee=e.record(xe.describe(`Style variables for theming MCP apps.
|
|
4
4
|
|
|
5
5
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
6
6
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -39,4 +39,4 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
39
39
|
- "model": Tool visible to and callable by the agent
|
|
40
40
|
- "app": Tool callable by the app from this server only`),csp:e.never().optional(),permissions:e.never().optional()}),Zt=e.object({mimeTypes:e.array(e.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),er=e.object({method:e.literal("ui/download-file"),params:e.object({contents:e.array(e.union([F,J])).describe("Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),tr=e.object({method:e.literal("ui/message"),params:e.object({role:e.literal("user").describe('Message role, currently only "user" is supported.'),content:e.array(z).describe("Message content blocks (text, image, etc.).")})}),rr=e.object({method:e.literal("ui/notifications/sandbox-resource-ready"),params:e.object({html:e.string().describe("HTML content to load into the inner iframe."),sandbox:e.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:X.optional().describe("CSP configuration from resource metadata."),permissions:W.optional().describe("Sandbox permissions from resource metadata.")})}),or=e.object({method:e.literal("ui/notifications/tool-result"),params:A.describe("Standard MCP tool execution result.")}),ge=e.object({toolInfo:e.object({id:G.optional().describe("JSON-RPC id of the tools/call request."),tool:K.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Ce.optional().describe("Current color theme preference."),styles:ke.optional().describe("Style configuration for theming the app."),displayMode:R.optional().describe("How the UI is currently displayed."),availableDisplayModes:e.array(R).optional().describe("Display modes the host supports."),containerDimensions:e.union([e.object({height:e.number().describe("Fixed container height in pixels.")}),e.object({maxHeight:e.union([e.number(),e.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(e.union([e.object({width:e.number().describe("Fixed container width in pixels.")}),e.object({maxWidth:e.union([e.number(),e.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
41
41
|
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:e.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:e.string().optional().describe("User's timezone in IANA format."),userAgent:e.string().optional().describe("Host application identifier."),platform:e.union([e.literal("web"),e.literal("desktop"),e.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:e.object({touch:e.boolean().optional().describe("Whether the device supports touch input."),hover:e.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:e.object({top:e.number().describe("Top safe area inset in pixels."),right:e.number().describe("Right safe area inset in pixels."),bottom:e.number().describe("Bottom safe area inset in pixels."),left:e.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),sr=e.object({method:e.literal("ui/notifications/host-context-changed"),params:ge.describe("Partial context update containing only changed fields.")}),ir=e.object({method:e.literal("ui/update-model-context"),params:e.object({content:e.array(z).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:e.record(e.string(),e.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),ar=e.object({method:e.literal("ui/initialize"),params:e.object({appInfo:P.describe("App identification (name and version)."),appCapabilities:je.describe("Features and capabilities this app provides."),protocolVersion:e.string().describe("Protocol version this app supports.")})}),nr=e.object({protocolVersion:e.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:P.describe("Host application identification and version."),hostCapabilities:Pe.describe("Features and capabilities provided by the host."),hostContext:ge.describe("Rich context about the host environment.")}).passthrough();var fe="ui/resourceUri",Me="text/html;profile=mcp-app";function lr(a,t,r,o){let i=r._meta,n=i.ui,s=i[fe],l=i;return n?.resourceUri&&!s?l={...i,[fe]:n.resourceUri}:s&&!n?.resourceUri&&(l={...i,ui:{...n,resourceUri:s}}),a.registerTool(t,{...r,_meta:l},o)}c(lr,"K3");function cr(a,t,r,o,i){return a.registerResource(t,r,{mimeType:Me,...o},i)}c(cr,"N3");var Le="io.modelcontextprotocol/ui";function dr(a){if(a)return a.extensions?.[Le]}c(dr,"Y3");export{Ne as a,le as b,he as c,Me as d,lr as e,cr as f,dr as g};
|
|
42
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-27ODH2MC.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __sandboxCreateRequire } from "node:module";
|
|
2
2
|
const require = __sandboxCreateRequire(import.meta.url);
|
|
3
|
-
import{a as cr,b as hr}from"./chunk-AIPFMLDE.js";import{b as or,c as ar,d as sr,e as ur,f as fr,g as lr}from"./chunk-AXDDUXWT.js";import{a as i,b as L,c as S,e as Pi,f as c}from"./chunk-ABQQTJHM.js";var mr=S((Gs,vr)=>{"use strict";c();var I=L("fs"),re=L("path"),ki=I.lchown?"lchown":"chown",Ni=I.lchownSync?"lchownSync":"chownSync",pr=I.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),dr=i((e,t,r)=>{try{return I[Ni](e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},"lchownSync"),Mi=i((e,t,r)=>{try{return I.chownSync(e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},"chownSync"),Ai=pr?(e,t,r,n)=>o=>{!o||o.code!=="EISDIR"?n(o):I.chown(e,t,r,n)}:(e,t,r,n)=>n,ht=pr?(e,t,r)=>{try{return dr(e,t,r)}catch(n){if(n.code!=="EISDIR")throw n;Mi(e,t,r)}}:(e,t,r)=>dr(e,t,r),Di=process.version,yr=i((e,t,r)=>I.readdir(e,t,r),"readdir"),qi=i((e,t)=>I.readdirSync(e,t),"readdirSync");/^v4\./.test(Di)&&(yr=i((e,t,r)=>I.readdir(e,r),"readdir"));var Be=i((e,t,r,n)=>{I[ki](e,t,r,Ai(e,t,r,o=>{n(o&&o.code!=="ENOENT"?o:null)}))},"chown"),gr=i((e,t,r,n,o)=>{if(typeof t=="string")return I.lstat(re.resolve(e,t),(a,s)=>{if(a)return o(a.code!=="ENOENT"?a:null);s.name=t,gr(e,s,r,n,o)});if(t.isDirectory())dt(re.resolve(e,t.name),r,n,a=>{if(a)return o(a);let s=re.resolve(e,t.name);Be(s,r,n,o)});else{let a=re.resolve(e,t.name);Be(a,r,n,o)}},"chownrKid"),dt=i((e,t,r,n)=>{yr(e,{withFileTypes:!0},(o,a)=>{if(o){if(o.code==="ENOENT")return n();if(o.code!=="ENOTDIR"&&o.code!=="ENOTSUP")return n(o)}if(o||!a.length)return Be(e,t,r,n);let s=a.length,u=null,f=i(l=>{if(!u){if(l)return n(u=l);if(--s===0)return Be(e,t,r,n)}},"then");a.forEach(l=>gr(e,l,t,r,f))})},"chownr"),Ci=i((e,t,r,n)=>{if(typeof t=="string")try{let o=I.lstatSync(re.resolve(e,t));o.name=t,t=o}catch(o){if(o.code==="ENOENT")return;throw o}t.isDirectory()&&_r(re.resolve(e,t.name),r,n),ht(re.resolve(e,t.name),r,n)},"chownrKidSync"),_r=i((e,t,r)=>{let n;try{n=qi(e,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;if(o.code==="ENOTDIR"||o.code==="ENOTSUP")return ht(e,t,r);throw o}return n&&n.length&&n.forEach(o=>Ci(e,o,t,r)),ht(e,t,r)},"chownrSync");vr.exports=dt;dt.sync=_r});var pt=S((Ys,wr)=>{c();wr.exports=L("stream")});var Or=S((Js,Tr)=>{"use strict";c();function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}i(br,"ownKeys");function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?br(Object(r),!0).forEach(function(n){Ii(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):br(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}i(Er,"_objectSpread");function Ii(e,t,r){return t=Rr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(Ii,"_defineProperty");function ji(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i(ji,"_classCallCheck");function Sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Rr(n.key),n)}}i(Sr,"_defineProperties");function Bi(e,t,r){return t&&Sr(e.prototype,t),r&&Sr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}i(Bi,"_createClass");function Rr(e){var t=Fi(e,"string");return typeof t=="symbol"?t:String(t)}i(Rr,"_toPropertyKey");function Fi(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(Fi,"_toPrimitive");var Ui=L("buffer"),Fe=Ui.Buffer,Wi=L("util"),yt=Wi.inspect,Hi=yt&&yt.custom||"inspect";function $i(e,t,r){Fe.prototype.copy.call(e,t,r)}i($i,"copyBuffer");Tr.exports=function(){function e(){ji(this,e),this.head=null,this.tail=null,this.length=0}return i(e,"BufferList"),Bi(e,[{key:"push",value:i(function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},"push")},{key:"unshift",value:i(function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},"unshift")},{key:"shift",value:i(function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},"shift")},{key:"clear",value:i(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:i(function(r){if(this.length===0)return"";for(var n=this.head,o=""+n.data;n=n.next;)o+=r+n.data;return o},"join")},{key:"concat",value:i(function(r){if(this.length===0)return Fe.alloc(0);for(var n=Fe.allocUnsafe(r>>>0),o=this.head,a=0;o;)$i(o.data,n,a),a+=o.data.length,o=o.next;return n},"concat")},{key:"consume",value:i(function(r,n){var o;return r<this.head.data.length?(o=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?o=this.shift():o=n?this._getString(r):this._getBuffer(r),o},"consume")},{key:"first",value:i(function(){return this.head.data},"first")},{key:"_getString",value:i(function(r){var n=this.head,o=1,a=n.data;for(r-=a.length;n=n.next;){var s=n.data,u=r>s.length?s.length:r;if(u===s.length?a+=s:a+=s.slice(0,r),r-=u,r===0){u===s.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(u));break}++o}return this.length-=o,a},"_getString")},{key:"_getBuffer",value:i(function(r){var n=Fe.allocUnsafe(r),o=this.head,a=1;for(o.data.copy(n),r-=o.data.length;o=o.next;){var s=o.data,u=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,u),r-=u,r===0){u===s.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=s.slice(u));break}++a}return this.length-=a,n},"_getBuffer")},{key:Hi,value:i(function(r,n){return yt(this,Er(Er({},n),{},{depth:0,customInspect:!1}))},"value")}]),e}()});var _t=S((eu,Lr)=>{"use strict";c();function zi(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(gt,this,e)):process.nextTick(gt,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(Ue,r):(r._writableState.errorEmitted=!0,process.nextTick(xr,r,a)):process.nextTick(xr,r,a):t?(process.nextTick(Ue,r),t(a)):process.nextTick(Ue,r)}),this)}i(zi,"destroy");function xr(e,t){gt(e,t),Ue(e)}i(xr,"emitErrorAndCloseNT");function Ue(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}i(Ue,"emitCloseNT");function Gi(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}i(Gi,"undestroy");function gt(e,t){e.emit("error",t)}i(gt,"emitErrorNT");function Vi(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}i(Vi,"errorOrDestroy");Lr.exports={destroy:zi,undestroy:Gi,errorOrDestroy:Vi}});var K=S((nu,Nr)=>{"use strict";c();var kr={};function j(e,t,r){r||(r=Error);function n(a,s,u){return typeof t=="string"?t:t(a,s,u)}i(n,"getMessage");class o extends r{static{i(this,"NodeError")}constructor(s,u,f){super(n(s,u,f))}}o.prototype.name=r.name,o.prototype.code=e,kr[e]=o}i(j,"createErrorType");function Pr(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(n=>String(n)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}i(Pr,"oneOf");function Ki(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}i(Ki,"startsWith");function Yi(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}i(Yi,"endsWith");function Xi(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}i(Xi,"includes");j("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);j("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;typeof t=="string"&&Ki(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";let o;if(Yi(e," argument"))o=`The ${e} ${n} ${Pr(t,"type")}`;else{let a=Xi(e,".")?"property":"argument";o=`The "${e}" ${a} ${n} ${Pr(t,"type")}`}return o+=`. Received type ${typeof r}`,o},TypeError);j("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");j("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});j("ERR_STREAM_PREMATURE_CLOSE","Premature close");j("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});j("ERR_MULTIPLE_CALLBACK","Callback called multiple times");j("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");j("ERR_STREAM_WRITE_AFTER_END","write after end");j("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);j("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);j("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Nr.exports.codes=kr});var vt=S((au,Mr)=>{"use strict";c();var Ji=K().codes.ERR_INVALID_OPT_VALUE;function Zi(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}i(Zi,"highWaterMarkFrom");function Qi(e,t,r,n){var o=Zi(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var a=n?r:"highWaterMark";throw new Ji(a,o)}return Math.floor(o)}return e.objectMode?16:16*1024}i(Qi,"getHighWaterMark");Mr.exports={getHighWaterMark:Qi}});var Ar=S((fu,mt)=>{c();typeof Object.create=="function"?mt.exports=i(function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):mt.exports=i(function(t,r){if(r){t.super_=r;var n=i(function(){},"TempCtor");n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}},"inherits")});var Y=S((hu,bt)=>{c();try{if(wt=L("util"),typeof wt.inherits!="function")throw"";bt.exports=wt.inherits}catch{bt.exports=Ar()}var wt});var qr=S((pu,Dr)=>{c();Dr.exports=L("util").deprecate});var Rt=S((gu,Ur)=>{"use strict";c();Ur.exports=k;function Ir(e){var t=this;this.next=null,this.entry=null,this.finish=function(){xo(t,e)}}i(Ir,"CorkedRequest");var le;k.WritableState=Ee;var eo={deprecate:qr()},jr=pt(),He=L("buffer").Buffer,to=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function ro(e){return He.from(e)}i(ro,"_uint8ArrayToBuffer");function no(e){return He.isBuffer(e)||e instanceof to}i(no,"_isUint8Array");var St=_t(),io=vt(),oo=io.getHighWaterMark,X=K().codes,ao=X.ERR_INVALID_ARG_TYPE,so=X.ERR_METHOD_NOT_IMPLEMENTED,uo=X.ERR_MULTIPLE_CALLBACK,fo=X.ERR_STREAM_CANNOT_PIPE,lo=X.ERR_STREAM_DESTROYED,co=X.ERR_STREAM_NULL_VALUES,ho=X.ERR_STREAM_WRITE_AFTER_END,po=X.ERR_UNKNOWN_ENCODING,ce=St.errorOrDestroy;Y()(k,jr);function yo(){}i(yo,"nop");function Ee(e,t,r){le=le||ne(),e=e||{},typeof r!="boolean"&&(r=t instanceof le),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=oo(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){Eo(t,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ir(this)}i(Ee,"WritableState");Ee.prototype.getBuffer=i(function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r},"getBuffer");(function(){try{Object.defineProperty(Ee.prototype,"buffer",{get:eo.deprecate(i(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var We;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(We=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:i(function(t){return We.call(this,t)?!0:this!==k?!1:t&&t._writableState instanceof Ee},"value")})):We=i(function(t){return t instanceof this},"realHasInstance");function k(e){le=le||ne();var t=this instanceof le;if(!t&&!We.call(k,this))return new k(e);this._writableState=new Ee(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),jr.call(this)}i(k,"Writable");k.prototype.pipe=function(){ce(this,new fo)};function go(e,t){var r=new ho;ce(e,r),process.nextTick(t,r)}i(go,"writeAfterEnd");function _o(e,t,r,n){var o;return r===null?o=new co:typeof r!="string"&&!t.objectMode&&(o=new ao("chunk",["string","Buffer"],r)),o?(ce(e,o),process.nextTick(n,o),!1):!0}i(_o,"validChunk");k.prototype.write=function(e,t,r){var n=this._writableState,o=!1,a=!n.objectMode&&no(e);return a&&!He.isBuffer(e)&&(e=ro(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=yo),n.ending?go(this,r):(a||_o(this,n,e,r))&&(n.pendingcb++,o=mo(this,n,a,e,t,r)),o};k.prototype.cork=function(){this._writableState.corked++};k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Br(this,e))};k.prototype.setDefaultEncoding=i(function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new po(t);return this._writableState.defaultEncoding=t,this},"setDefaultEncoding");Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:i(function(){return this._writableState&&this._writableState.getBuffer()},"get")});function vo(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=He.from(t,r)),t}i(vo,"decodeChunk");Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:i(function(){return this._writableState.highWaterMark},"get")});function mo(e,t,r,n,o,a){if(!r){var s=vo(t,n,o);n!==s&&(r=!0,o="buffer",n=s)}var u=t.objectMode?1:n.length;t.length+=u;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Et(e,t,!1,u,n,o,a);return f}i(mo,"writeOrBuffer");function Et(e,t,r,n,o,a,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new lo("write")):r?e._writev(o,t.onwrite):e._write(o,a,t.onwrite),t.sync=!1}i(Et,"doWrite");function wo(e,t,r,n,o){--t.pendingcb,r?(process.nextTick(o,n),process.nextTick(be,e,t),e._writableState.errorEmitted=!0,ce(e,n)):(o(n),e._writableState.errorEmitted=!0,ce(e,n),be(e,t))}i(wo,"onwriteError");function bo(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}i(bo,"onwriteStateUpdate");function Eo(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(typeof o!="function")throw new uo;if(bo(r),t)wo(e,r,n,t,o);else{var a=Fr(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Br(e,r),n?process.nextTick(Cr,e,r,a,o):Cr(e,r,a,o)}}i(Eo,"onwrite");function Cr(e,t,r,n){r||So(e,t),t.pendingcb--,n(),be(e,t)}i(Cr,"afterWrite");function So(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}i(So,"onwriteDrain");function Br(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,Et(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Ir(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,l=r.encoding,g=r.callback,d=t.objectMode?1:f.length;if(Et(e,t,!1,d,f,l,g),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}i(Br,"clearBuffer");k.prototype._write=function(e,t,r){r(new so("_write()"))};k.prototype._writev=null;k.prototype.end=function(e,t,r){var n=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||Oo(this,n,r),this};Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:i(function(){return this._writableState.length},"get")});function Fr(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}i(Fr,"needFinish");function Ro(e,t){e._final(function(r){t.pendingcb--,r&&ce(e,r),t.prefinished=!0,e.emit("prefinish"),be(e,t)})}i(Ro,"callFinal");function To(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(Ro,e,t)):(t.prefinished=!0,e.emit("prefinish")))}i(To,"prefinish");function be(e,t){var r=Fr(t);if(r&&(To(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}i(be,"finishMaybe");function Oo(e,t,r){t.ending=!0,be(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}i(Oo,"endWritable");function xo(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}i(xo,"onCorkedFinish");Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get"),set:i(function(t){this._writableState&&(this._writableState.destroyed=t)},"set")});k.prototype.destroy=St.destroy;k.prototype._undestroy=St.undestroy;k.prototype._destroy=function(e,t){t(e)}});var ne=S((mu,Hr)=>{"use strict";c();var Lo=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Hr.exports=U;var Wr=xt(),Ot=Rt();Y()(U,Wr);for(Tt=Lo(Ot.prototype),$e=0;$e<Tt.length;$e++)ze=Tt[$e],U.prototype[ze]||(U.prototype[ze]=Ot.prototype[ze]);var Tt,ze,$e;function U(e){if(!(this instanceof U))return new U(e);Wr.call(this,e),Ot.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Po)))}i(U,"Duplex");Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:i(function(){return this._writableState.highWaterMark},"get")});Object.defineProperty(U.prototype,"writableBuffer",{enumerable:!1,get:i(function(){return this._writableState&&this._writableState.getBuffer()},"get")});Object.defineProperty(U.prototype,"writableLength",{enumerable:!1,get:i(function(){return this._writableState.length},"get")});function Po(){this._writableState.ended||process.nextTick(ko,this)}i(Po,"onend");function ko(e){e.end()}i(ko,"onEndNT");Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get"),set:i(function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)},"set")})});var Gr=S((Lt,zr)=>{c();var Ge=L("buffer"),W=Ge.Buffer;function $r(e,t){for(var r in e)t[r]=e[r]}i($r,"copyProps");W.from&&W.alloc&&W.allocUnsafe&&W.allocUnsafeSlow?zr.exports=Ge:($r(Ge,Lt),Lt.Buffer=ie);function ie(e,t,r){return W(e,t,r)}i(ie,"SafeBuffer");ie.prototype=Object.create(W.prototype);$r(W,ie);ie.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return W(e,t,r)};ie.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=W(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};ie.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return W(e)};ie.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Ge.SlowBuffer(e)}});var Nt=S(Kr=>{"use strict";c();var kt=Gr().Buffer,Vr=kt.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function No(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}i(No,"_normalizeEncoding");function Mo(e){var t=No(e);if(typeof t!="string"&&(kt.isEncoding===Vr||!Vr(e)))throw new Error("Unknown encoding: "+e);return t||e}i(Mo,"normalizeEncoding");Kr.StringDecoder=Se;function Se(e){this.encoding=Mo(e);var t;switch(this.encoding){case"utf16le":this.text=jo,this.end=Bo,t=4;break;case"utf8":this.fillLast=qo,t=4;break;case"base64":this.text=Fo,this.end=Uo,t=3;break;default:this.write=Wo,this.end=Ho;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=kt.allocUnsafe(t)}i(Se,"StringDecoder");Se.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Se.prototype.end=Io;Se.prototype.text=Co;Se.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Pt(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}i(Pt,"utf8CheckByte");function Ao(e,t,r){var n=t.length-1;if(n<r)return 0;var o=Pt(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||o===-2?0:(o=Pt(t[n]),o>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||o===-2?0:(o=Pt(t[n]),o>=0?(o>0&&(o===2?o=0:e.lastNeed=o-3),o):0))}i(Ao,"utf8CheckIncomplete");function Do(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}i(Do,"utf8CheckExtraBytes");function qo(e){var t=this.lastTotal-this.lastNeed,r=Do(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}i(qo,"utf8FillLast");function Co(e,t){var r=Ao(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}i(Co,"utf8Text");function Io(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}i(Io,"utf8End");function jo(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}i(jo,"utf16Text");function Bo(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}i(Bo,"utf16End");function Fo(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}i(Fo,"base64Text");function Uo(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}i(Uo,"base64End");function Wo(e){return e.toString(this.encoding)}i(Wo,"simpleWrite");function Ho(e){return e&&e.length?this.write(e):""}i(Ho,"simpleEnd")});var Ve=S((xu,Jr)=>{"use strict";c();var Yr=K().codes.ERR_STREAM_PREMATURE_CLOSE;function $o(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}i($o,"once");function zo(){}i(zo,"noop");function Go(e){return e.setHeader&&typeof e.abort=="function"}i(Go,"isRequest");function Xr(e,t,r){if(typeof t=="function")return Xr(e,null,t);t||(t={}),r=$o(r||zo);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,a=i(function(){e.writable||u()},"onlegacyfinish"),s=e._writableState&&e._writableState.finished,u=i(function(){o=!1,s=!0,n||r.call(e)},"onfinish"),f=e._readableState&&e._readableState.endEmitted,l=i(function(){n=!1,f=!0,o||r.call(e)},"onend"),g=i(function(w){r.call(e,w)},"onerror"),d=i(function(){var w;if(n&&!f)return(!e._readableState||!e._readableState.ended)&&(w=new Yr),r.call(e,w);if(o&&!s)return(!e._writableState||!e._writableState.ended)&&(w=new Yr),r.call(e,w)},"onclose"),y=i(function(){e.req.on("finish",u)},"onrequest");return Go(e)?(e.on("complete",u),e.on("abort",d),e.req?y():e.on("request",y)):o&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",u),t.error!==!1&&e.on("error",g),e.on("close",d),function(){e.removeListener("complete",u),e.removeListener("abort",d),e.removeListener("request",y),e.req&&e.req.removeListener("finish",u),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("end",l),e.removeListener("error",g),e.removeListener("close",d)}}i(Xr,"eos");Jr.exports=Xr});var Qr=S((ku,Zr)=>{"use strict";c();var Ke;function J(e,t,r){return t=Vo(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(J,"_defineProperty");function Vo(e){var t=Ko(e,"string");return typeof t=="symbol"?t:String(t)}i(Vo,"_toPropertyKey");function Ko(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(Ko,"_toPrimitive");var Yo=Ve(),Z=Symbol("lastResolve"),oe=Symbol("lastReject"),Re=Symbol("error"),Ye=Symbol("ended"),ae=Symbol("lastPromise"),Mt=Symbol("handlePromise"),se=Symbol("stream");function Q(e,t){return{value:e,done:t}}i(Q,"createIterResult");function Xo(e){var t=e[Z];if(t!==null){var r=e[se].read();r!==null&&(e[ae]=null,e[Z]=null,e[oe]=null,t(Q(r,!1)))}}i(Xo,"readAndResolve");function Jo(e){process.nextTick(Xo,e)}i(Jo,"onReadable");function Zo(e,t){return function(r,n){e.then(function(){if(t[Ye]){r(Q(void 0,!0));return}t[Mt](r,n)},n)}}i(Zo,"wrapForNext");var Qo=Object.getPrototypeOf(function(){}),ea=Object.setPrototypeOf((Ke={get stream(){return this[se]},next:i(function(){var t=this,r=this[Re];if(r!==null)return Promise.reject(r);if(this[Ye])return Promise.resolve(Q(void 0,!0));if(this[se].destroyed)return new Promise(function(s,u){process.nextTick(function(){t[Re]?u(t[Re]):s(Q(void 0,!0))})});var n=this[ae],o;if(n)o=new Promise(Zo(n,this));else{var a=this[se].read();if(a!==null)return Promise.resolve(Q(a,!1));o=new Promise(this[Mt])}return this[ae]=o,o},"next")},J(Ke,Symbol.asyncIterator,function(){return this}),J(Ke,"return",i(function(){var t=this;return new Promise(function(r,n){t[se].destroy(null,function(o){if(o){n(o);return}r(Q(void 0,!0))})})},"_return")),Ke),Qo),ta=i(function(t){var r,n=Object.create(ea,(r={},J(r,se,{value:t,writable:!0}),J(r,Z,{value:null,writable:!0}),J(r,oe,{value:null,writable:!0}),J(r,Re,{value:null,writable:!0}),J(r,Ye,{value:t._readableState.endEmitted,writable:!0}),J(r,Mt,{value:i(function(a,s){var u=n[se].read();u?(n[ae]=null,n[Z]=null,n[oe]=null,a(Q(u,!1))):(n[Z]=a,n[oe]=s)},"value"),writable:!0}),r));return n[ae]=null,Yo(t,function(o){if(o&&o.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[oe];a!==null&&(n[ae]=null,n[Z]=null,n[oe]=null,a(o)),n[Re]=o;return}var s=n[Z];s!==null&&(n[ae]=null,n[Z]=null,n[oe]=null,s(Q(void 0,!0))),n[Ye]=!0}),t.on("readable",Jo.bind(null,n)),n},"createReadableStreamAsyncIterator");Zr.exports=ta});var nn=S((Au,rn)=>{"use strict";c();function en(e,t,r,n,o,a,s){try{var u=e[a](s),f=u.value}catch(l){r(l);return}u.done?t(f):Promise.resolve(f).then(n,o)}i(en,"asyncGeneratorStep");function ra(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function s(f){en(a,n,o,s,u,"next",f)}i(s,"_next");function u(f){en(a,n,o,s,u,"throw",f)}i(u,"_throw"),s(void 0)})}}i(ra,"_asyncToGenerator");function tn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}i(tn,"ownKeys");function na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tn(Object(r),!0).forEach(function(n){ia(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}i(na,"_objectSpread");function ia(e,t,r){return t=oa(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(ia,"_defineProperty");function oa(e){var t=aa(e,"string");return typeof t=="symbol"?t:String(t)}i(oa,"_toPropertyKey");function aa(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(aa,"_toPrimitive");var sa=K().codes.ERR_INVALID_ARG_TYPE;function ua(e,t,r){var n;if(t&&typeof t.next=="function")n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new sa("iterable",["Iterable"],t);var o=new e(na({objectMode:!0},r)),a=!1;o._read=function(){a||(a=!0,s())};function s(){return u.apply(this,arguments)}i(s,"next");function u(){return u=ra(function*(){try{var f=yield n.next(),l=f.value,g=f.done;g?o.push(null):o.push(yield l)?s():a=!1}catch(d){o.destroy(d)}}),u.apply(this,arguments)}return i(u,"_next2"),o}i(ua,"from");rn.exports=ua});var xt=S((Iu,pn)=>{"use strict";c();pn.exports=R;var he;R.ReadableState=un;var Cu=L("events").EventEmitter,sn=i(function(t,r){return t.listeners(r).length},"EElistenerCount"),Oe=pt(),Xe=L("buffer").Buffer,fa=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function la(e){return Xe.from(e)}i(la,"_uint8ArrayToBuffer");function ca(e){return Xe.isBuffer(e)||e instanceof fa}i(ca,"_isUint8Array");var At=L("util"),m;At&&At.debuglog?m=At.debuglog("stream"):m=i(function(){},"debug");var ha=Or(),Ft=_t(),da=vt(),pa=da.getHighWaterMark,Je=K().codes,ya=Je.ERR_INVALID_ARG_TYPE,ga=Je.ERR_STREAM_PUSH_AFTER_EOF,_a=Je.ERR_METHOD_NOT_IMPLEMENTED,va=Je.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,de,Dt,qt;Y()(R,Oe);var Te=Ft.errorOrDestroy,Ct=["error","close","destroy","pause","resume"];function ma(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}i(ma,"prependListener");function un(e,t,r){he=he||ne(),e=e||{},typeof r!="boolean"&&(r=t instanceof he),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=pa(this,e,"readableHighWaterMark",r),this.buffer=new ha,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(de||(de=Nt().StringDecoder),this.decoder=new de(e.encoding),this.encoding=e.encoding)}i(un,"ReadableState");function R(e){if(he=he||ne(),!(this instanceof R))return new R(e);var t=this instanceof he;this._readableState=new un(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Oe.call(this)}i(R,"Readable");Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get"),set:i(function(t){this._readableState&&(this._readableState.destroyed=t)},"set")});R.prototype.destroy=Ft.destroy;R.prototype._undestroy=Ft.undestroy;R.prototype._destroy=function(e,t){t(e)};R.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Xe.from(e,t),t=""),n=!0),fn(this,e,t,!1,n)};R.prototype.unshift=function(e){return fn(this,e,null,!0,!1)};function fn(e,t,r,n,o){m("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,Ea(e,a);else{var s;if(o||(s=wa(a,t)),s)Te(e,s);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Xe.prototype&&(t=la(t)),n)a.endEmitted?Te(e,new va):It(e,a,t,!0);else if(a.ended)Te(e,new ga);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?It(e,a,t,!1):Bt(e,a)):It(e,a,t,!1)}else n||(a.reading=!1,Bt(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}i(fn,"readableAddChunk");function It(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ze(e)),Bt(e,t)}i(It,"addChunk");function wa(e,t){var r;return!ca(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new ya("chunk",["string","Buffer","Uint8Array"],t)),r}i(wa,"chunkInvalid");R.prototype.isPaused=function(){return this._readableState.flowing===!1};R.prototype.setEncoding=function(e){de||(de=Nt().StringDecoder);var t=new de(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var on=1073741824;function ba(e){return e>=on?e=on:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}i(ba,"computeNewHighWaterMark");function an(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=ba(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}i(an,"howMuchToRead");R.prototype.read=function(e){m("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return m("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?jt(this):Ze(this),null;if(e=an(e,t),e===0&&t.ended)return t.length===0&&jt(this),null;var n=t.needReadable;m("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,m("length less than watermark",n)),t.ended||t.reading?(n=!1,m("reading or ended",n)):n&&(m("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=an(r,t)));var o;return e>0?o=hn(e,t):o=null,o===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&jt(this)),o!==null&&this.emit("data",o),o};function Ea(e,t){if(m("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Ze(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ln(e)))}}i(Ea,"onEofChunk");function Ze(e){var t=e._readableState;m("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(m("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(ln,e))}i(Ze,"emitReadable");function ln(e){var t=e._readableState;m("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Ut(e)}i(ln,"emitReadable_");function Bt(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Sa,e,t))}i(Bt,"maybeReadMore");function Sa(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(m("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}i(Sa,"maybeReadMore_");R.prototype._read=function(e){Te(this,new _a("_read()"))};R.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,m("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=o?u:T;n.endEmitted?process.nextTick(a):r.once("end",a),e.on("unpipe",s);function s(b,p){m("onunpipe"),b===r&&p&&p.hasUnpiped===!1&&(p.hasUnpiped=!0,g())}i(s,"onunpipe");function u(){m("onend"),e.end()}i(u,"onend");var f=Ra(r);e.on("drain",f);var l=!1;function g(){m("cleanup"),e.removeListener("close",_),e.removeListener("finish",w),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",T),r.removeListener("data",d),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&f()}i(g,"cleanup"),r.on("data",d);function d(b){m("ondata");var p=e.write(b);m("dest.write",p),p===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&dn(n.pipes,e)!==-1)&&!l&&(m("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}i(d,"ondata");function y(b){m("onerror",b),T(),e.removeListener("error",y),sn(e,"error")===0&&Te(e,b)}i(y,"onerror"),ma(e,"error",y);function _(){e.removeListener("finish",w),T()}i(_,"onclose"),e.once("close",_);function w(){m("onfinish"),e.removeListener("close",_),T()}i(w,"onfinish"),e.once("finish",w);function T(){m("unpipe"),r.unpipe(e)}return i(T,"unpipe"),e.emit("pipe",r),n.flowing||(m("pipe resume"),r.resume()),e};function Ra(e){return i(function(){var r=e._readableState;m("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&sn(e,"data")&&(r.flowing=!0,Ut(e))},"pipeOnDrainFunctionResult")}i(Ra,"pipeOnDrain");R.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=dn(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};R.prototype.on=function(e,t){var r=Oe.prototype.on.call(this,e,t),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,m("on readable",n.length,n.reading),n.length?Ze(this):n.reading||process.nextTick(Ta,this)),r};R.prototype.addListener=R.prototype.on;R.prototype.removeListener=function(e,t){var r=Oe.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(cn,this),r};R.prototype.removeAllListeners=function(e){var t=Oe.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(cn,this),t};function cn(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}i(cn,"updateReadableListening");function Ta(e){m("readable nexttick read 0"),e.read(0)}i(Ta,"nReadingNextTick");R.prototype.resume=function(){var e=this._readableState;return e.flowing||(m("resume"),e.flowing=!e.readableListening,Oa(this,e)),e.paused=!1,this};function Oa(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(xa,e,t))}i(Oa,"resume");function xa(e,t){m("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Ut(e),t.flowing&&!t.reading&&e.read(0)}i(xa,"resume_");R.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ut(e){var t=e._readableState;for(m("flow",t.flowing);t.flowing&&e.read()!==null;);}i(Ut,"flow");R.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(m("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(m("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var u=t.push(s);u||(n=!0,e.pause())}});for(var o in e)this[o]===void 0&&typeof e[o]=="function"&&(this[o]=i(function(u){return i(function(){return e[u].apply(e,arguments)},"methodWrapReturnFunction")},"methodWrap")(o));for(var a=0;a<Ct.length;a++)e.on(Ct[a],this.emit.bind(this,Ct[a]));return this._read=function(s){m("wrapped _read",s),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(R.prototype[Symbol.asyncIterator]=function(){return Dt===void 0&&(Dt=Qr()),Dt(this)});Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:i(function(){return this._readableState.highWaterMark},"get")});Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:i(function(){return this._readableState&&this._readableState.buffer},"get")});Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:i(function(){return this._readableState.flowing},"get"),set:i(function(t){this._readableState&&(this._readableState.flowing=t)},"set")});R._fromList=hn;Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:i(function(){return this._readableState.length},"get")});function hn(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}i(hn,"fromList");function jt(e){var t=e._readableState;m("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(La,t,e))}i(jt,"endReadable");function La(e,t){if(m("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}i(La,"endReadableNT");typeof Symbol=="function"&&(R.from=function(e,t){return qt===void 0&&(qt=nn()),qt(R,e,t)});function dn(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}i(dn,"indexOf")});var Wt=S((Fu,gn)=>{"use strict";c();gn.exports=z;var Qe=K().codes,Pa=Qe.ERR_METHOD_NOT_IMPLEMENTED,ka=Qe.ERR_MULTIPLE_CALLBACK,Na=Qe.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ma=Qe.ERR_TRANSFORM_WITH_LENGTH_0,et=ne();Y()(z,et);function Aa(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new ka);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}i(Aa,"afterTransform");function z(e){if(!(this instanceof z))return new z(e);et.call(this,e),this._transformState={afterTransform:Aa.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Da)}i(z,"Transform");function Da(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){yn(e,t,r)}):yn(this,null,null)}i(Da,"prefinish");z.prototype.push=function(e,t){return this._transformState.needTransform=!1,et.prototype.push.call(this,e,t)};z.prototype._transform=function(e,t,r){r(new Pa("_transform()"))};z.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}};z.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};z.prototype._destroy=function(e,t){et.prototype._destroy.call(this,e,function(r){t(r)})};function yn(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Ma;if(e._transformState.transforming)throw new Na;return e.push(null)}i(yn,"done")});var mn=S((Hu,vn)=>{"use strict";c();vn.exports=xe;var _n=Wt();Y()(xe,_n);function xe(e){if(!(this instanceof xe))return new xe(e);_n.call(this,e)}i(xe,"PassThrough");xe.prototype._transform=function(e,t,r){r(null,e)}});var Rn=S((Gu,Sn)=>{"use strict";c();var Ht;function qa(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}i(qa,"once");var En=K().codes,Ca=En.ERR_MISSING_ARGS,Ia=En.ERR_STREAM_DESTROYED;function wn(e){if(e)throw e}i(wn,"noop");function ja(e){return e.setHeader&&typeof e.abort=="function"}i(ja,"isRequest");function Ba(e,t,r,n){n=qa(n);var o=!1;e.on("close",function(){o=!0}),Ht===void 0&&(Ht=Ve()),Ht(e,{readable:t,writable:r},function(s){if(s)return n(s);o=!0,n()});var a=!1;return function(s){if(!o&&!a){if(a=!0,ja(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(s||new Ia("pipe"))}}}i(Ba,"destroyer");function bn(e){e()}i(bn,"call");function Fa(e,t){return e.pipe(t)}i(Fa,"pipe");function Ua(e){return!e.length||typeof e[e.length-1]!="function"?wn:e.pop()}i(Ua,"popCallback");function Wa(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Ua(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Ca("streams");var o,a=t.map(function(s,u){var f=u<t.length-1,l=u>0;return Ba(s,f,l,function(g){o||(o=g),g&&a.forEach(bn),!f&&(a.forEach(bn),n(o))})});return t.reduce(Fa)}i(Wa,"pipeline");Sn.exports=Wa});var pe=S((B,Pe)=>{c();var Le=L("stream");process.env.READABLE_STREAM==="disable"&&Le?(Pe.exports=Le.Readable,Object.assign(Pe.exports,Le),Pe.exports.Stream=Le):(B=Pe.exports=xt(),B.Stream=Le||B,B.Readable=B,B.Writable=Rt(),B.Duplex=ne(),B.Transform=Wt(),B.PassThrough=mn(),B.finished=Ve(),B.pipeline=Rn())});var xn=S((Xu,On)=>{"use strict";c();var{Buffer:F}=L("buffer"),Tn=Symbol.for("BufferList");function x(e){if(!(this instanceof x))return new x(e);x._init.call(this,e)}i(x,"BufferList");x._init=i(function(t){Object.defineProperty(this,Tn,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},"_init");x.prototype._new=i(function(t){return new x(t)},"_new");x.prototype._offset=i(function(t){if(t===0)return[0,0];let r=0;for(let n=0;n<this._bufs.length;n++){let o=r+this._bufs[n].length;if(t<o||n===this._bufs.length-1)return[n,t-r];r=o}},"_offset");x.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let n=0;n<t;n++)r+=this._bufs[n].length;return r};x.prototype.get=i(function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]},"get");x.prototype.slice=i(function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)},"slice");x.prototype.copy=i(function(t,r,n,o){if((typeof n!="number"||n<0)&&(n=0),(typeof o!="number"||o>this.length)&&(o=this.length),n>=this.length||o<=0)return t||F.alloc(0);let a=!!t,s=this._offset(n),u=o-n,f=u,l=a&&r||0,g=s[1];if(n===0&&o===this.length){if(!a)return this._bufs.length===1?this._bufs[0]:F.concat(this._bufs,this.length);for(let d=0;d<this._bufs.length;d++)this._bufs[d].copy(t,l),l+=this._bufs[d].length;return t}if(f<=this._bufs[s[0]].length-g)return a?this._bufs[s[0]].copy(t,r,g,g+f):this._bufs[s[0]].slice(g,g+f);a||(t=F.allocUnsafe(u));for(let d=s[0];d<this._bufs.length;d++){let y=this._bufs[d].length-g;if(f>y)this._bufs[d].copy(t,l,g),l+=y;else{this._bufs[d].copy(t,l,g,g+f),l+=y;break}f-=y,g&&(g=0)}return t.length>l?t.slice(0,l):t},"copy");x.prototype.shallowSlice=i(function(t,r){if(t=t||0,r=typeof r!="number"?this.length:r,t<0&&(t+=this.length),r<0&&(r+=this.length),t===r)return this._new();let n=this._offset(t),o=this._offset(r),a=this._bufs.slice(n[0],o[0]+1);return o[1]===0?a.pop():a[a.length-1]=a[a.length-1].slice(0,o[1]),n[1]!==0&&(a[0]=a[0].slice(n[1])),this._new(a)},"shallowSlice");x.prototype.toString=i(function(t,r,n){return this.slice(r,n).toString(t)},"toString");x.prototype.consume=i(function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this},"consume");x.prototype.duplicate=i(function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t},"duplicate");x.prototype.append=i(function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(F.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(F.from(t));return this},"append");x.prototype._appendBuffer=i(function(t){this._bufs.push(t),this.length+=t.length},"appendBuffer");x.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t=="string"&&(r=t,t=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=F.from([e]):typeof e=="string"?e=F.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=F.from(e.buffer,e.byteOffset,e.byteLength):F.isBuffer(e)||(e=F.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),e.length===0)return t>this.length?this.length:t;let n=this._offset(t),o=n[0],a=n[1];for(;o<this._bufs.length;o++){let s=this._bufs[o];for(;a<s.length;)if(s.length-a>=e.length){let f=s.indexOf(e,a);if(f!==-1)return this._reverseOffset([o,f]);a=s.length-e.length+1}else{let f=this._reverseOffset([o,a]);if(this._match(f,e))return f;a++}a=0}return-1};x.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in e)(function(r){e[r]===null?x.prototype[r]=function(n,o){return this.slice(n,n+o)[r](0,o)}:x.prototype[r]=function(n=0){return this.slice(n,n+e[r])[r](0)}})(t)})();x.prototype._isBufferList=i(function(t){return t instanceof x||x.isBufferList(t)},"_isBufferList");x.isBufferList=i(function(t){return t!=null&&t[Tn]},"isBufferList");On.exports=x});var Ln=S((Qu,tt)=>{"use strict";c();var $t=pe().Duplex,Ha=Y(),ke=xn();function M(e){if(!(this instanceof M))return new M(e);if(typeof e=="function"){this._callback=e;let t=i(function(n){this._callback&&(this._callback(n),this._callback=null)},"piper").bind(this);this.on("pipe",i(function(n){n.on("error",t)},"onPipe")),this.on("unpipe",i(function(n){n.removeListener("error",t)},"onUnpipe")),e=null}ke._init.call(this,e),$t.call(this)}i(M,"BufferListStream");Ha(M,$t);Object.assign(M.prototype,ke.prototype);M.prototype._new=i(function(t){return new M(t)},"_new");M.prototype._write=i(function(t,r,n){this._appendBuffer(t),typeof n=="function"&&n()},"_write");M.prototype._read=i(function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},"_read");M.prototype.end=i(function(t){$t.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},"end");M.prototype._destroy=i(function(t,r){this._bufs.length=0,this.length=0,r(t)},"_destroy");M.prototype._isBufferList=i(function(t){return t instanceof M||t instanceof ke||M.isBufferList(t)},"_isBufferList");M.isBufferList=ke.isBufferList;tt.exports=M;tt.exports.BufferListStream=M;tt.exports.BufferList=ke});var Vt=S(ge=>{c();var $a=Buffer.alloc,za="0000000000000000000",Ga="7777777777777777777",Pn=48,kn=Buffer.from("ustar\0","binary"),Va=Buffer.from("00","binary"),Ka=Buffer.from("ustar ","binary"),Ya=Buffer.from(" \0","binary"),Xa=parseInt("7777",8),Ne=257,Gt=263,Ja=i(function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},"clamp"),Za=i(function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},"toType"),Qa=i(function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},"toTypeflag"),Nn=i(function(e,t,r,n){for(;r<n;r++)if(e[r]===t)return r;return n},"indexOf"),Mn=i(function(e){for(var t=256,r=0;r<148;r++)t+=e[r];for(var n=156;n<512;n++)t+=e[n];return t},"cksum"),ee=i(function(e,t){return e=e.toString(8),e.length>t?Ga.slice(0,t)+" ":za.slice(0,t-e.length)+e+" "},"encodeOct");function es(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=[],n=e.length-1;n>0;n--){var o=e[n];t?r.push(o):r.push(255-o)}var a=0,s=r.length;for(n=0;n<s;n++)a+=r[n]*Math.pow(256,n);return t?a:-1*a}i(es,"parse256");var te=i(function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return es(e);for(;t<e.length&&e[t]===32;)t++;for(var n=Ja(Nn(e,32,t,e.length),e.length,e.length);t<n&&e[t]===0;)t++;return n===t?0:parseInt(e.slice(t,n).toString(),8)},"decodeOct"),ye=i(function(e,t,r,n){return e.slice(t,Nn(e,0,t,t+r)).toString(n)},"decodeStr"),zt=i(function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e},"addLength");ge.decodeLongPath=function(e,t){return ye(e,0,e.length,t)};ge.encodePax=function(e){var t="";e.name&&(t+=zt(" path="+e.name+`
|
|
3
|
+
import{a as cr,b as hr}from"./chunk-FH2K64E2.js";import{b as or,c as ar,d as sr,e as ur,f as fr,g as lr}from"./chunk-XSE5JD27.js";import{a as i,b as L,c as S,e as Pi,f as c}from"./chunk-VIYZ2KHI.js";var mr=S((Gs,vr)=>{"use strict";c();var I=L("fs"),re=L("path"),ki=I.lchown?"lchown":"chown",Ni=I.lchownSync?"lchownSync":"chownSync",pr=I.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),dr=i((e,t,r)=>{try{return I[Ni](e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},"lchownSync"),Mi=i((e,t,r)=>{try{return I.chownSync(e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},"chownSync"),Ai=pr?(e,t,r,n)=>o=>{!o||o.code!=="EISDIR"?n(o):I.chown(e,t,r,n)}:(e,t,r,n)=>n,ht=pr?(e,t,r)=>{try{return dr(e,t,r)}catch(n){if(n.code!=="EISDIR")throw n;Mi(e,t,r)}}:(e,t,r)=>dr(e,t,r),Di=process.version,yr=i((e,t,r)=>I.readdir(e,t,r),"readdir"),qi=i((e,t)=>I.readdirSync(e,t),"readdirSync");/^v4\./.test(Di)&&(yr=i((e,t,r)=>I.readdir(e,r),"readdir"));var Be=i((e,t,r,n)=>{I[ki](e,t,r,Ai(e,t,r,o=>{n(o&&o.code!=="ENOENT"?o:null)}))},"chown"),gr=i((e,t,r,n,o)=>{if(typeof t=="string")return I.lstat(re.resolve(e,t),(a,s)=>{if(a)return o(a.code!=="ENOENT"?a:null);s.name=t,gr(e,s,r,n,o)});if(t.isDirectory())dt(re.resolve(e,t.name),r,n,a=>{if(a)return o(a);let s=re.resolve(e,t.name);Be(s,r,n,o)});else{let a=re.resolve(e,t.name);Be(a,r,n,o)}},"chownrKid"),dt=i((e,t,r,n)=>{yr(e,{withFileTypes:!0},(o,a)=>{if(o){if(o.code==="ENOENT")return n();if(o.code!=="ENOTDIR"&&o.code!=="ENOTSUP")return n(o)}if(o||!a.length)return Be(e,t,r,n);let s=a.length,u=null,f=i(l=>{if(!u){if(l)return n(u=l);if(--s===0)return Be(e,t,r,n)}},"then");a.forEach(l=>gr(e,l,t,r,f))})},"chownr"),Ci=i((e,t,r,n)=>{if(typeof t=="string")try{let o=I.lstatSync(re.resolve(e,t));o.name=t,t=o}catch(o){if(o.code==="ENOENT")return;throw o}t.isDirectory()&&_r(re.resolve(e,t.name),r,n),ht(re.resolve(e,t.name),r,n)},"chownrKidSync"),_r=i((e,t,r)=>{let n;try{n=qi(e,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;if(o.code==="ENOTDIR"||o.code==="ENOTSUP")return ht(e,t,r);throw o}return n&&n.length&&n.forEach(o=>Ci(e,o,t,r)),ht(e,t,r)},"chownrSync");vr.exports=dt;dt.sync=_r});var pt=S((Ys,wr)=>{c();wr.exports=L("stream")});var Or=S((Js,Tr)=>{"use strict";c();function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}i(br,"ownKeys");function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?br(Object(r),!0).forEach(function(n){Ii(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):br(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}i(Er,"_objectSpread");function Ii(e,t,r){return t=Rr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(Ii,"_defineProperty");function ji(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i(ji,"_classCallCheck");function Sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Rr(n.key),n)}}i(Sr,"_defineProperties");function Bi(e,t,r){return t&&Sr(e.prototype,t),r&&Sr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}i(Bi,"_createClass");function Rr(e){var t=Fi(e,"string");return typeof t=="symbol"?t:String(t)}i(Rr,"_toPropertyKey");function Fi(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(Fi,"_toPrimitive");var Ui=L("buffer"),Fe=Ui.Buffer,Wi=L("util"),yt=Wi.inspect,Hi=yt&&yt.custom||"inspect";function $i(e,t,r){Fe.prototype.copy.call(e,t,r)}i($i,"copyBuffer");Tr.exports=function(){function e(){ji(this,e),this.head=null,this.tail=null,this.length=0}return i(e,"BufferList"),Bi(e,[{key:"push",value:i(function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},"push")},{key:"unshift",value:i(function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},"unshift")},{key:"shift",value:i(function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},"shift")},{key:"clear",value:i(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:i(function(r){if(this.length===0)return"";for(var n=this.head,o=""+n.data;n=n.next;)o+=r+n.data;return o},"join")},{key:"concat",value:i(function(r){if(this.length===0)return Fe.alloc(0);for(var n=Fe.allocUnsafe(r>>>0),o=this.head,a=0;o;)$i(o.data,n,a),a+=o.data.length,o=o.next;return n},"concat")},{key:"consume",value:i(function(r,n){var o;return r<this.head.data.length?(o=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?o=this.shift():o=n?this._getString(r):this._getBuffer(r),o},"consume")},{key:"first",value:i(function(){return this.head.data},"first")},{key:"_getString",value:i(function(r){var n=this.head,o=1,a=n.data;for(r-=a.length;n=n.next;){var s=n.data,u=r>s.length?s.length:r;if(u===s.length?a+=s:a+=s.slice(0,r),r-=u,r===0){u===s.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(u));break}++o}return this.length-=o,a},"_getString")},{key:"_getBuffer",value:i(function(r){var n=Fe.allocUnsafe(r),o=this.head,a=1;for(o.data.copy(n),r-=o.data.length;o=o.next;){var s=o.data,u=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,u),r-=u,r===0){u===s.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=s.slice(u));break}++a}return this.length-=a,n},"_getBuffer")},{key:Hi,value:i(function(r,n){return yt(this,Er(Er({},n),{},{depth:0,customInspect:!1}))},"value")}]),e}()});var _t=S((eu,Lr)=>{"use strict";c();function zi(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(gt,this,e)):process.nextTick(gt,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(Ue,r):(r._writableState.errorEmitted=!0,process.nextTick(xr,r,a)):process.nextTick(xr,r,a):t?(process.nextTick(Ue,r),t(a)):process.nextTick(Ue,r)}),this)}i(zi,"destroy");function xr(e,t){gt(e,t),Ue(e)}i(xr,"emitErrorAndCloseNT");function Ue(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}i(Ue,"emitCloseNT");function Gi(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}i(Gi,"undestroy");function gt(e,t){e.emit("error",t)}i(gt,"emitErrorNT");function Vi(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}i(Vi,"errorOrDestroy");Lr.exports={destroy:zi,undestroy:Gi,errorOrDestroy:Vi}});var K=S((nu,Nr)=>{"use strict";c();var kr={};function j(e,t,r){r||(r=Error);function n(a,s,u){return typeof t=="string"?t:t(a,s,u)}i(n,"getMessage");class o extends r{static{i(this,"NodeError")}constructor(s,u,f){super(n(s,u,f))}}o.prototype.name=r.name,o.prototype.code=e,kr[e]=o}i(j,"createErrorType");function Pr(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(n=>String(n)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}i(Pr,"oneOf");function Ki(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}i(Ki,"startsWith");function Yi(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}i(Yi,"endsWith");function Xi(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}i(Xi,"includes");j("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);j("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;typeof t=="string"&&Ki(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";let o;if(Yi(e," argument"))o=`The ${e} ${n} ${Pr(t,"type")}`;else{let a=Xi(e,".")?"property":"argument";o=`The "${e}" ${a} ${n} ${Pr(t,"type")}`}return o+=`. Received type ${typeof r}`,o},TypeError);j("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");j("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});j("ERR_STREAM_PREMATURE_CLOSE","Premature close");j("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});j("ERR_MULTIPLE_CALLBACK","Callback called multiple times");j("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");j("ERR_STREAM_WRITE_AFTER_END","write after end");j("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);j("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);j("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Nr.exports.codes=kr});var vt=S((au,Mr)=>{"use strict";c();var Ji=K().codes.ERR_INVALID_OPT_VALUE;function Zi(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}i(Zi,"highWaterMarkFrom");function Qi(e,t,r,n){var o=Zi(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var a=n?r:"highWaterMark";throw new Ji(a,o)}return Math.floor(o)}return e.objectMode?16:16*1024}i(Qi,"getHighWaterMark");Mr.exports={getHighWaterMark:Qi}});var Ar=S((fu,mt)=>{c();typeof Object.create=="function"?mt.exports=i(function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):mt.exports=i(function(t,r){if(r){t.super_=r;var n=i(function(){},"TempCtor");n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}},"inherits")});var Y=S((hu,bt)=>{c();try{if(wt=L("util"),typeof wt.inherits!="function")throw"";bt.exports=wt.inherits}catch{bt.exports=Ar()}var wt});var qr=S((pu,Dr)=>{c();Dr.exports=L("util").deprecate});var Rt=S((gu,Ur)=>{"use strict";c();Ur.exports=k;function Ir(e){var t=this;this.next=null,this.entry=null,this.finish=function(){xo(t,e)}}i(Ir,"CorkedRequest");var le;k.WritableState=Ee;var eo={deprecate:qr()},jr=pt(),He=L("buffer").Buffer,to=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function ro(e){return He.from(e)}i(ro,"_uint8ArrayToBuffer");function no(e){return He.isBuffer(e)||e instanceof to}i(no,"_isUint8Array");var St=_t(),io=vt(),oo=io.getHighWaterMark,X=K().codes,ao=X.ERR_INVALID_ARG_TYPE,so=X.ERR_METHOD_NOT_IMPLEMENTED,uo=X.ERR_MULTIPLE_CALLBACK,fo=X.ERR_STREAM_CANNOT_PIPE,lo=X.ERR_STREAM_DESTROYED,co=X.ERR_STREAM_NULL_VALUES,ho=X.ERR_STREAM_WRITE_AFTER_END,po=X.ERR_UNKNOWN_ENCODING,ce=St.errorOrDestroy;Y()(k,jr);function yo(){}i(yo,"nop");function Ee(e,t,r){le=le||ne(),e=e||{},typeof r!="boolean"&&(r=t instanceof le),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=oo(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){Eo(t,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ir(this)}i(Ee,"WritableState");Ee.prototype.getBuffer=i(function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r},"getBuffer");(function(){try{Object.defineProperty(Ee.prototype,"buffer",{get:eo.deprecate(i(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var We;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(We=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:i(function(t){return We.call(this,t)?!0:this!==k?!1:t&&t._writableState instanceof Ee},"value")})):We=i(function(t){return t instanceof this},"realHasInstance");function k(e){le=le||ne();var t=this instanceof le;if(!t&&!We.call(k,this))return new k(e);this._writableState=new Ee(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),jr.call(this)}i(k,"Writable");k.prototype.pipe=function(){ce(this,new fo)};function go(e,t){var r=new ho;ce(e,r),process.nextTick(t,r)}i(go,"writeAfterEnd");function _o(e,t,r,n){var o;return r===null?o=new co:typeof r!="string"&&!t.objectMode&&(o=new ao("chunk",["string","Buffer"],r)),o?(ce(e,o),process.nextTick(n,o),!1):!0}i(_o,"validChunk");k.prototype.write=function(e,t,r){var n=this._writableState,o=!1,a=!n.objectMode&&no(e);return a&&!He.isBuffer(e)&&(e=ro(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=yo),n.ending?go(this,r):(a||_o(this,n,e,r))&&(n.pendingcb++,o=mo(this,n,a,e,t,r)),o};k.prototype.cork=function(){this._writableState.corked++};k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Br(this,e))};k.prototype.setDefaultEncoding=i(function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new po(t);return this._writableState.defaultEncoding=t,this},"setDefaultEncoding");Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:i(function(){return this._writableState&&this._writableState.getBuffer()},"get")});function vo(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=He.from(t,r)),t}i(vo,"decodeChunk");Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:i(function(){return this._writableState.highWaterMark},"get")});function mo(e,t,r,n,o,a){if(!r){var s=vo(t,n,o);n!==s&&(r=!0,o="buffer",n=s)}var u=t.objectMode?1:n.length;t.length+=u;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Et(e,t,!1,u,n,o,a);return f}i(mo,"writeOrBuffer");function Et(e,t,r,n,o,a,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new lo("write")):r?e._writev(o,t.onwrite):e._write(o,a,t.onwrite),t.sync=!1}i(Et,"doWrite");function wo(e,t,r,n,o){--t.pendingcb,r?(process.nextTick(o,n),process.nextTick(be,e,t),e._writableState.errorEmitted=!0,ce(e,n)):(o(n),e._writableState.errorEmitted=!0,ce(e,n),be(e,t))}i(wo,"onwriteError");function bo(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}i(bo,"onwriteStateUpdate");function Eo(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(typeof o!="function")throw new uo;if(bo(r),t)wo(e,r,n,t,o);else{var a=Fr(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Br(e,r),n?process.nextTick(Cr,e,r,a,o):Cr(e,r,a,o)}}i(Eo,"onwrite");function Cr(e,t,r,n){r||So(e,t),t.pendingcb--,n(),be(e,t)}i(Cr,"afterWrite");function So(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}i(So,"onwriteDrain");function Br(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,Et(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Ir(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,l=r.encoding,g=r.callback,d=t.objectMode?1:f.length;if(Et(e,t,!1,d,f,l,g),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}i(Br,"clearBuffer");k.prototype._write=function(e,t,r){r(new so("_write()"))};k.prototype._writev=null;k.prototype.end=function(e,t,r){var n=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||Oo(this,n,r),this};Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:i(function(){return this._writableState.length},"get")});function Fr(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}i(Fr,"needFinish");function Ro(e,t){e._final(function(r){t.pendingcb--,r&&ce(e,r),t.prefinished=!0,e.emit("prefinish"),be(e,t)})}i(Ro,"callFinal");function To(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(Ro,e,t)):(t.prefinished=!0,e.emit("prefinish")))}i(To,"prefinish");function be(e,t){var r=Fr(t);if(r&&(To(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}i(be,"finishMaybe");function Oo(e,t,r){t.ending=!0,be(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}i(Oo,"endWritable");function xo(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}i(xo,"onCorkedFinish");Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get"),set:i(function(t){this._writableState&&(this._writableState.destroyed=t)},"set")});k.prototype.destroy=St.destroy;k.prototype._undestroy=St.undestroy;k.prototype._destroy=function(e,t){t(e)}});var ne=S((mu,Hr)=>{"use strict";c();var Lo=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Hr.exports=U;var Wr=xt(),Ot=Rt();Y()(U,Wr);for(Tt=Lo(Ot.prototype),$e=0;$e<Tt.length;$e++)ze=Tt[$e],U.prototype[ze]||(U.prototype[ze]=Ot.prototype[ze]);var Tt,ze,$e;function U(e){if(!(this instanceof U))return new U(e);Wr.call(this,e),Ot.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Po)))}i(U,"Duplex");Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:i(function(){return this._writableState.highWaterMark},"get")});Object.defineProperty(U.prototype,"writableBuffer",{enumerable:!1,get:i(function(){return this._writableState&&this._writableState.getBuffer()},"get")});Object.defineProperty(U.prototype,"writableLength",{enumerable:!1,get:i(function(){return this._writableState.length},"get")});function Po(){this._writableState.ended||process.nextTick(ko,this)}i(Po,"onend");function ko(e){e.end()}i(ko,"onEndNT");Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get"),set:i(function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)},"set")})});var Gr=S((Lt,zr)=>{c();var Ge=L("buffer"),W=Ge.Buffer;function $r(e,t){for(var r in e)t[r]=e[r]}i($r,"copyProps");W.from&&W.alloc&&W.allocUnsafe&&W.allocUnsafeSlow?zr.exports=Ge:($r(Ge,Lt),Lt.Buffer=ie);function ie(e,t,r){return W(e,t,r)}i(ie,"SafeBuffer");ie.prototype=Object.create(W.prototype);$r(W,ie);ie.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return W(e,t,r)};ie.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=W(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};ie.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return W(e)};ie.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Ge.SlowBuffer(e)}});var Nt=S(Kr=>{"use strict";c();var kt=Gr().Buffer,Vr=kt.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function No(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}i(No,"_normalizeEncoding");function Mo(e){var t=No(e);if(typeof t!="string"&&(kt.isEncoding===Vr||!Vr(e)))throw new Error("Unknown encoding: "+e);return t||e}i(Mo,"normalizeEncoding");Kr.StringDecoder=Se;function Se(e){this.encoding=Mo(e);var t;switch(this.encoding){case"utf16le":this.text=jo,this.end=Bo,t=4;break;case"utf8":this.fillLast=qo,t=4;break;case"base64":this.text=Fo,this.end=Uo,t=3;break;default:this.write=Wo,this.end=Ho;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=kt.allocUnsafe(t)}i(Se,"StringDecoder");Se.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Se.prototype.end=Io;Se.prototype.text=Co;Se.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Pt(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}i(Pt,"utf8CheckByte");function Ao(e,t,r){var n=t.length-1;if(n<r)return 0;var o=Pt(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||o===-2?0:(o=Pt(t[n]),o>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||o===-2?0:(o=Pt(t[n]),o>=0?(o>0&&(o===2?o=0:e.lastNeed=o-3),o):0))}i(Ao,"utf8CheckIncomplete");function Do(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}i(Do,"utf8CheckExtraBytes");function qo(e){var t=this.lastTotal-this.lastNeed,r=Do(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}i(qo,"utf8FillLast");function Co(e,t){var r=Ao(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}i(Co,"utf8Text");function Io(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}i(Io,"utf8End");function jo(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}i(jo,"utf16Text");function Bo(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}i(Bo,"utf16End");function Fo(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}i(Fo,"base64Text");function Uo(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}i(Uo,"base64End");function Wo(e){return e.toString(this.encoding)}i(Wo,"simpleWrite");function Ho(e){return e&&e.length?this.write(e):""}i(Ho,"simpleEnd")});var Ve=S((xu,Jr)=>{"use strict";c();var Yr=K().codes.ERR_STREAM_PREMATURE_CLOSE;function $o(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}i($o,"once");function zo(){}i(zo,"noop");function Go(e){return e.setHeader&&typeof e.abort=="function"}i(Go,"isRequest");function Xr(e,t,r){if(typeof t=="function")return Xr(e,null,t);t||(t={}),r=$o(r||zo);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,a=i(function(){e.writable||u()},"onlegacyfinish"),s=e._writableState&&e._writableState.finished,u=i(function(){o=!1,s=!0,n||r.call(e)},"onfinish"),f=e._readableState&&e._readableState.endEmitted,l=i(function(){n=!1,f=!0,o||r.call(e)},"onend"),g=i(function(w){r.call(e,w)},"onerror"),d=i(function(){var w;if(n&&!f)return(!e._readableState||!e._readableState.ended)&&(w=new Yr),r.call(e,w);if(o&&!s)return(!e._writableState||!e._writableState.ended)&&(w=new Yr),r.call(e,w)},"onclose"),y=i(function(){e.req.on("finish",u)},"onrequest");return Go(e)?(e.on("complete",u),e.on("abort",d),e.req?y():e.on("request",y)):o&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",u),t.error!==!1&&e.on("error",g),e.on("close",d),function(){e.removeListener("complete",u),e.removeListener("abort",d),e.removeListener("request",y),e.req&&e.req.removeListener("finish",u),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("end",l),e.removeListener("error",g),e.removeListener("close",d)}}i(Xr,"eos");Jr.exports=Xr});var Qr=S((ku,Zr)=>{"use strict";c();var Ke;function J(e,t,r){return t=Vo(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(J,"_defineProperty");function Vo(e){var t=Ko(e,"string");return typeof t=="symbol"?t:String(t)}i(Vo,"_toPropertyKey");function Ko(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(Ko,"_toPrimitive");var Yo=Ve(),Z=Symbol("lastResolve"),oe=Symbol("lastReject"),Re=Symbol("error"),Ye=Symbol("ended"),ae=Symbol("lastPromise"),Mt=Symbol("handlePromise"),se=Symbol("stream");function Q(e,t){return{value:e,done:t}}i(Q,"createIterResult");function Xo(e){var t=e[Z];if(t!==null){var r=e[se].read();r!==null&&(e[ae]=null,e[Z]=null,e[oe]=null,t(Q(r,!1)))}}i(Xo,"readAndResolve");function Jo(e){process.nextTick(Xo,e)}i(Jo,"onReadable");function Zo(e,t){return function(r,n){e.then(function(){if(t[Ye]){r(Q(void 0,!0));return}t[Mt](r,n)},n)}}i(Zo,"wrapForNext");var Qo=Object.getPrototypeOf(function(){}),ea=Object.setPrototypeOf((Ke={get stream(){return this[se]},next:i(function(){var t=this,r=this[Re];if(r!==null)return Promise.reject(r);if(this[Ye])return Promise.resolve(Q(void 0,!0));if(this[se].destroyed)return new Promise(function(s,u){process.nextTick(function(){t[Re]?u(t[Re]):s(Q(void 0,!0))})});var n=this[ae],o;if(n)o=new Promise(Zo(n,this));else{var a=this[se].read();if(a!==null)return Promise.resolve(Q(a,!1));o=new Promise(this[Mt])}return this[ae]=o,o},"next")},J(Ke,Symbol.asyncIterator,function(){return this}),J(Ke,"return",i(function(){var t=this;return new Promise(function(r,n){t[se].destroy(null,function(o){if(o){n(o);return}r(Q(void 0,!0))})})},"_return")),Ke),Qo),ta=i(function(t){var r,n=Object.create(ea,(r={},J(r,se,{value:t,writable:!0}),J(r,Z,{value:null,writable:!0}),J(r,oe,{value:null,writable:!0}),J(r,Re,{value:null,writable:!0}),J(r,Ye,{value:t._readableState.endEmitted,writable:!0}),J(r,Mt,{value:i(function(a,s){var u=n[se].read();u?(n[ae]=null,n[Z]=null,n[oe]=null,a(Q(u,!1))):(n[Z]=a,n[oe]=s)},"value"),writable:!0}),r));return n[ae]=null,Yo(t,function(o){if(o&&o.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[oe];a!==null&&(n[ae]=null,n[Z]=null,n[oe]=null,a(o)),n[Re]=o;return}var s=n[Z];s!==null&&(n[ae]=null,n[Z]=null,n[oe]=null,s(Q(void 0,!0))),n[Ye]=!0}),t.on("readable",Jo.bind(null,n)),n},"createReadableStreamAsyncIterator");Zr.exports=ta});var nn=S((Au,rn)=>{"use strict";c();function en(e,t,r,n,o,a,s){try{var u=e[a](s),f=u.value}catch(l){r(l);return}u.done?t(f):Promise.resolve(f).then(n,o)}i(en,"asyncGeneratorStep");function ra(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function s(f){en(a,n,o,s,u,"next",f)}i(s,"_next");function u(f){en(a,n,o,s,u,"throw",f)}i(u,"_throw"),s(void 0)})}}i(ra,"_asyncToGenerator");function tn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}i(tn,"ownKeys");function na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tn(Object(r),!0).forEach(function(n){ia(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}i(na,"_objectSpread");function ia(e,t,r){return t=oa(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(ia,"_defineProperty");function oa(e){var t=aa(e,"string");return typeof t=="symbol"?t:String(t)}i(oa,"_toPropertyKey");function aa(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(aa,"_toPrimitive");var sa=K().codes.ERR_INVALID_ARG_TYPE;function ua(e,t,r){var n;if(t&&typeof t.next=="function")n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new sa("iterable",["Iterable"],t);var o=new e(na({objectMode:!0},r)),a=!1;o._read=function(){a||(a=!0,s())};function s(){return u.apply(this,arguments)}i(s,"next");function u(){return u=ra(function*(){try{var f=yield n.next(),l=f.value,g=f.done;g?o.push(null):o.push(yield l)?s():a=!1}catch(d){o.destroy(d)}}),u.apply(this,arguments)}return i(u,"_next2"),o}i(ua,"from");rn.exports=ua});var xt=S((Iu,pn)=>{"use strict";c();pn.exports=R;var he;R.ReadableState=un;var Cu=L("events").EventEmitter,sn=i(function(t,r){return t.listeners(r).length},"EElistenerCount"),Oe=pt(),Xe=L("buffer").Buffer,fa=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function la(e){return Xe.from(e)}i(la,"_uint8ArrayToBuffer");function ca(e){return Xe.isBuffer(e)||e instanceof fa}i(ca,"_isUint8Array");var At=L("util"),m;At&&At.debuglog?m=At.debuglog("stream"):m=i(function(){},"debug");var ha=Or(),Ft=_t(),da=vt(),pa=da.getHighWaterMark,Je=K().codes,ya=Je.ERR_INVALID_ARG_TYPE,ga=Je.ERR_STREAM_PUSH_AFTER_EOF,_a=Je.ERR_METHOD_NOT_IMPLEMENTED,va=Je.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,de,Dt,qt;Y()(R,Oe);var Te=Ft.errorOrDestroy,Ct=["error","close","destroy","pause","resume"];function ma(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}i(ma,"prependListener");function un(e,t,r){he=he||ne(),e=e||{},typeof r!="boolean"&&(r=t instanceof he),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=pa(this,e,"readableHighWaterMark",r),this.buffer=new ha,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(de||(de=Nt().StringDecoder),this.decoder=new de(e.encoding),this.encoding=e.encoding)}i(un,"ReadableState");function R(e){if(he=he||ne(),!(this instanceof R))return new R(e);var t=this instanceof he;this._readableState=new un(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Oe.call(this)}i(R,"Readable");Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get"),set:i(function(t){this._readableState&&(this._readableState.destroyed=t)},"set")});R.prototype.destroy=Ft.destroy;R.prototype._undestroy=Ft.undestroy;R.prototype._destroy=function(e,t){t(e)};R.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Xe.from(e,t),t=""),n=!0),fn(this,e,t,!1,n)};R.prototype.unshift=function(e){return fn(this,e,null,!0,!1)};function fn(e,t,r,n,o){m("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,Ea(e,a);else{var s;if(o||(s=wa(a,t)),s)Te(e,s);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Xe.prototype&&(t=la(t)),n)a.endEmitted?Te(e,new va):It(e,a,t,!0);else if(a.ended)Te(e,new ga);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?It(e,a,t,!1):Bt(e,a)):It(e,a,t,!1)}else n||(a.reading=!1,Bt(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}i(fn,"readableAddChunk");function It(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ze(e)),Bt(e,t)}i(It,"addChunk");function wa(e,t){var r;return!ca(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new ya("chunk",["string","Buffer","Uint8Array"],t)),r}i(wa,"chunkInvalid");R.prototype.isPaused=function(){return this._readableState.flowing===!1};R.prototype.setEncoding=function(e){de||(de=Nt().StringDecoder);var t=new de(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var on=1073741824;function ba(e){return e>=on?e=on:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}i(ba,"computeNewHighWaterMark");function an(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=ba(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}i(an,"howMuchToRead");R.prototype.read=function(e){m("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return m("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?jt(this):Ze(this),null;if(e=an(e,t),e===0&&t.ended)return t.length===0&&jt(this),null;var n=t.needReadable;m("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,m("length less than watermark",n)),t.ended||t.reading?(n=!1,m("reading or ended",n)):n&&(m("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=an(r,t)));var o;return e>0?o=hn(e,t):o=null,o===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&jt(this)),o!==null&&this.emit("data",o),o};function Ea(e,t){if(m("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Ze(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ln(e)))}}i(Ea,"onEofChunk");function Ze(e){var t=e._readableState;m("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(m("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(ln,e))}i(Ze,"emitReadable");function ln(e){var t=e._readableState;m("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Ut(e)}i(ln,"emitReadable_");function Bt(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Sa,e,t))}i(Bt,"maybeReadMore");function Sa(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(m("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}i(Sa,"maybeReadMore_");R.prototype._read=function(e){Te(this,new _a("_read()"))};R.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,m("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=o?u:T;n.endEmitted?process.nextTick(a):r.once("end",a),e.on("unpipe",s);function s(b,p){m("onunpipe"),b===r&&p&&p.hasUnpiped===!1&&(p.hasUnpiped=!0,g())}i(s,"onunpipe");function u(){m("onend"),e.end()}i(u,"onend");var f=Ra(r);e.on("drain",f);var l=!1;function g(){m("cleanup"),e.removeListener("close",_),e.removeListener("finish",w),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",T),r.removeListener("data",d),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&f()}i(g,"cleanup"),r.on("data",d);function d(b){m("ondata");var p=e.write(b);m("dest.write",p),p===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&dn(n.pipes,e)!==-1)&&!l&&(m("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}i(d,"ondata");function y(b){m("onerror",b),T(),e.removeListener("error",y),sn(e,"error")===0&&Te(e,b)}i(y,"onerror"),ma(e,"error",y);function _(){e.removeListener("finish",w),T()}i(_,"onclose"),e.once("close",_);function w(){m("onfinish"),e.removeListener("close",_),T()}i(w,"onfinish"),e.once("finish",w);function T(){m("unpipe"),r.unpipe(e)}return i(T,"unpipe"),e.emit("pipe",r),n.flowing||(m("pipe resume"),r.resume()),e};function Ra(e){return i(function(){var r=e._readableState;m("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&sn(e,"data")&&(r.flowing=!0,Ut(e))},"pipeOnDrainFunctionResult")}i(Ra,"pipeOnDrain");R.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=dn(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};R.prototype.on=function(e,t){var r=Oe.prototype.on.call(this,e,t),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,m("on readable",n.length,n.reading),n.length?Ze(this):n.reading||process.nextTick(Ta,this)),r};R.prototype.addListener=R.prototype.on;R.prototype.removeListener=function(e,t){var r=Oe.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(cn,this),r};R.prototype.removeAllListeners=function(e){var t=Oe.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(cn,this),t};function cn(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}i(cn,"updateReadableListening");function Ta(e){m("readable nexttick read 0"),e.read(0)}i(Ta,"nReadingNextTick");R.prototype.resume=function(){var e=this._readableState;return e.flowing||(m("resume"),e.flowing=!e.readableListening,Oa(this,e)),e.paused=!1,this};function Oa(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(xa,e,t))}i(Oa,"resume");function xa(e,t){m("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Ut(e),t.flowing&&!t.reading&&e.read(0)}i(xa,"resume_");R.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ut(e){var t=e._readableState;for(m("flow",t.flowing);t.flowing&&e.read()!==null;);}i(Ut,"flow");R.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(m("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(m("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var u=t.push(s);u||(n=!0,e.pause())}});for(var o in e)this[o]===void 0&&typeof e[o]=="function"&&(this[o]=i(function(u){return i(function(){return e[u].apply(e,arguments)},"methodWrapReturnFunction")},"methodWrap")(o));for(var a=0;a<Ct.length;a++)e.on(Ct[a],this.emit.bind(this,Ct[a]));return this._read=function(s){m("wrapped _read",s),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(R.prototype[Symbol.asyncIterator]=function(){return Dt===void 0&&(Dt=Qr()),Dt(this)});Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:i(function(){return this._readableState.highWaterMark},"get")});Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:i(function(){return this._readableState&&this._readableState.buffer},"get")});Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:i(function(){return this._readableState.flowing},"get"),set:i(function(t){this._readableState&&(this._readableState.flowing=t)},"set")});R._fromList=hn;Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:i(function(){return this._readableState.length},"get")});function hn(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}i(hn,"fromList");function jt(e){var t=e._readableState;m("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(La,t,e))}i(jt,"endReadable");function La(e,t){if(m("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}i(La,"endReadableNT");typeof Symbol=="function"&&(R.from=function(e,t){return qt===void 0&&(qt=nn()),qt(R,e,t)});function dn(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}i(dn,"indexOf")});var Wt=S((Fu,gn)=>{"use strict";c();gn.exports=z;var Qe=K().codes,Pa=Qe.ERR_METHOD_NOT_IMPLEMENTED,ka=Qe.ERR_MULTIPLE_CALLBACK,Na=Qe.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ma=Qe.ERR_TRANSFORM_WITH_LENGTH_0,et=ne();Y()(z,et);function Aa(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new ka);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}i(Aa,"afterTransform");function z(e){if(!(this instanceof z))return new z(e);et.call(this,e),this._transformState={afterTransform:Aa.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Da)}i(z,"Transform");function Da(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){yn(e,t,r)}):yn(this,null,null)}i(Da,"prefinish");z.prototype.push=function(e,t){return this._transformState.needTransform=!1,et.prototype.push.call(this,e,t)};z.prototype._transform=function(e,t,r){r(new Pa("_transform()"))};z.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}};z.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};z.prototype._destroy=function(e,t){et.prototype._destroy.call(this,e,function(r){t(r)})};function yn(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Ma;if(e._transformState.transforming)throw new Na;return e.push(null)}i(yn,"done")});var mn=S((Hu,vn)=>{"use strict";c();vn.exports=xe;var _n=Wt();Y()(xe,_n);function xe(e){if(!(this instanceof xe))return new xe(e);_n.call(this,e)}i(xe,"PassThrough");xe.prototype._transform=function(e,t,r){r(null,e)}});var Rn=S((Gu,Sn)=>{"use strict";c();var Ht;function qa(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}i(qa,"once");var En=K().codes,Ca=En.ERR_MISSING_ARGS,Ia=En.ERR_STREAM_DESTROYED;function wn(e){if(e)throw e}i(wn,"noop");function ja(e){return e.setHeader&&typeof e.abort=="function"}i(ja,"isRequest");function Ba(e,t,r,n){n=qa(n);var o=!1;e.on("close",function(){o=!0}),Ht===void 0&&(Ht=Ve()),Ht(e,{readable:t,writable:r},function(s){if(s)return n(s);o=!0,n()});var a=!1;return function(s){if(!o&&!a){if(a=!0,ja(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(s||new Ia("pipe"))}}}i(Ba,"destroyer");function bn(e){e()}i(bn,"call");function Fa(e,t){return e.pipe(t)}i(Fa,"pipe");function Ua(e){return!e.length||typeof e[e.length-1]!="function"?wn:e.pop()}i(Ua,"popCallback");function Wa(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Ua(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Ca("streams");var o,a=t.map(function(s,u){var f=u<t.length-1,l=u>0;return Ba(s,f,l,function(g){o||(o=g),g&&a.forEach(bn),!f&&(a.forEach(bn),n(o))})});return t.reduce(Fa)}i(Wa,"pipeline");Sn.exports=Wa});var pe=S((B,Pe)=>{c();var Le=L("stream");process.env.READABLE_STREAM==="disable"&&Le?(Pe.exports=Le.Readable,Object.assign(Pe.exports,Le),Pe.exports.Stream=Le):(B=Pe.exports=xt(),B.Stream=Le||B,B.Readable=B,B.Writable=Rt(),B.Duplex=ne(),B.Transform=Wt(),B.PassThrough=mn(),B.finished=Ve(),B.pipeline=Rn())});var xn=S((Xu,On)=>{"use strict";c();var{Buffer:F}=L("buffer"),Tn=Symbol.for("BufferList");function x(e){if(!(this instanceof x))return new x(e);x._init.call(this,e)}i(x,"BufferList");x._init=i(function(t){Object.defineProperty(this,Tn,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},"_init");x.prototype._new=i(function(t){return new x(t)},"_new");x.prototype._offset=i(function(t){if(t===0)return[0,0];let r=0;for(let n=0;n<this._bufs.length;n++){let o=r+this._bufs[n].length;if(t<o||n===this._bufs.length-1)return[n,t-r];r=o}},"_offset");x.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let n=0;n<t;n++)r+=this._bufs[n].length;return r};x.prototype.get=i(function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]},"get");x.prototype.slice=i(function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)},"slice");x.prototype.copy=i(function(t,r,n,o){if((typeof n!="number"||n<0)&&(n=0),(typeof o!="number"||o>this.length)&&(o=this.length),n>=this.length||o<=0)return t||F.alloc(0);let a=!!t,s=this._offset(n),u=o-n,f=u,l=a&&r||0,g=s[1];if(n===0&&o===this.length){if(!a)return this._bufs.length===1?this._bufs[0]:F.concat(this._bufs,this.length);for(let d=0;d<this._bufs.length;d++)this._bufs[d].copy(t,l),l+=this._bufs[d].length;return t}if(f<=this._bufs[s[0]].length-g)return a?this._bufs[s[0]].copy(t,r,g,g+f):this._bufs[s[0]].slice(g,g+f);a||(t=F.allocUnsafe(u));for(let d=s[0];d<this._bufs.length;d++){let y=this._bufs[d].length-g;if(f>y)this._bufs[d].copy(t,l,g),l+=y;else{this._bufs[d].copy(t,l,g,g+f),l+=y;break}f-=y,g&&(g=0)}return t.length>l?t.slice(0,l):t},"copy");x.prototype.shallowSlice=i(function(t,r){if(t=t||0,r=typeof r!="number"?this.length:r,t<0&&(t+=this.length),r<0&&(r+=this.length),t===r)return this._new();let n=this._offset(t),o=this._offset(r),a=this._bufs.slice(n[0],o[0]+1);return o[1]===0?a.pop():a[a.length-1]=a[a.length-1].slice(0,o[1]),n[1]!==0&&(a[0]=a[0].slice(n[1])),this._new(a)},"shallowSlice");x.prototype.toString=i(function(t,r,n){return this.slice(r,n).toString(t)},"toString");x.prototype.consume=i(function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this},"consume");x.prototype.duplicate=i(function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t},"duplicate");x.prototype.append=i(function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(F.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(F.from(t));return this},"append");x.prototype._appendBuffer=i(function(t){this._bufs.push(t),this.length+=t.length},"appendBuffer");x.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t=="string"&&(r=t,t=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=F.from([e]):typeof e=="string"?e=F.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=F.from(e.buffer,e.byteOffset,e.byteLength):F.isBuffer(e)||(e=F.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),e.length===0)return t>this.length?this.length:t;let n=this._offset(t),o=n[0],a=n[1];for(;o<this._bufs.length;o++){let s=this._bufs[o];for(;a<s.length;)if(s.length-a>=e.length){let f=s.indexOf(e,a);if(f!==-1)return this._reverseOffset([o,f]);a=s.length-e.length+1}else{let f=this._reverseOffset([o,a]);if(this._match(f,e))return f;a++}a=0}return-1};x.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in e)(function(r){e[r]===null?x.prototype[r]=function(n,o){return this.slice(n,n+o)[r](0,o)}:x.prototype[r]=function(n=0){return this.slice(n,n+e[r])[r](0)}})(t)})();x.prototype._isBufferList=i(function(t){return t instanceof x||x.isBufferList(t)},"_isBufferList");x.isBufferList=i(function(t){return t!=null&&t[Tn]},"isBufferList");On.exports=x});var Ln=S((Qu,tt)=>{"use strict";c();var $t=pe().Duplex,Ha=Y(),ke=xn();function M(e){if(!(this instanceof M))return new M(e);if(typeof e=="function"){this._callback=e;let t=i(function(n){this._callback&&(this._callback(n),this._callback=null)},"piper").bind(this);this.on("pipe",i(function(n){n.on("error",t)},"onPipe")),this.on("unpipe",i(function(n){n.removeListener("error",t)},"onUnpipe")),e=null}ke._init.call(this,e),$t.call(this)}i(M,"BufferListStream");Ha(M,$t);Object.assign(M.prototype,ke.prototype);M.prototype._new=i(function(t){return new M(t)},"_new");M.prototype._write=i(function(t,r,n){this._appendBuffer(t),typeof n=="function"&&n()},"_write");M.prototype._read=i(function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},"_read");M.prototype.end=i(function(t){$t.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},"end");M.prototype._destroy=i(function(t,r){this._bufs.length=0,this.length=0,r(t)},"_destroy");M.prototype._isBufferList=i(function(t){return t instanceof M||t instanceof ke||M.isBufferList(t)},"_isBufferList");M.isBufferList=ke.isBufferList;tt.exports=M;tt.exports.BufferListStream=M;tt.exports.BufferList=ke});var Vt=S(ge=>{c();var $a=Buffer.alloc,za="0000000000000000000",Ga="7777777777777777777",Pn=48,kn=Buffer.from("ustar\0","binary"),Va=Buffer.from("00","binary"),Ka=Buffer.from("ustar ","binary"),Ya=Buffer.from(" \0","binary"),Xa=parseInt("7777",8),Ne=257,Gt=263,Ja=i(function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},"clamp"),Za=i(function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},"toType"),Qa=i(function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},"toTypeflag"),Nn=i(function(e,t,r,n){for(;r<n;r++)if(e[r]===t)return r;return n},"indexOf"),Mn=i(function(e){for(var t=256,r=0;r<148;r++)t+=e[r];for(var n=156;n<512;n++)t+=e[n];return t},"cksum"),ee=i(function(e,t){return e=e.toString(8),e.length>t?Ga.slice(0,t)+" ":za.slice(0,t-e.length)+e+" "},"encodeOct");function es(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=[],n=e.length-1;n>0;n--){var o=e[n];t?r.push(o):r.push(255-o)}var a=0,s=r.length;for(n=0;n<s;n++)a+=r[n]*Math.pow(256,n);return t?a:-1*a}i(es,"parse256");var te=i(function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return es(e);for(;t<e.length&&e[t]===32;)t++;for(var n=Ja(Nn(e,32,t,e.length),e.length,e.length);t<n&&e[t]===0;)t++;return n===t?0:parseInt(e.slice(t,n).toString(),8)},"decodeOct"),ye=i(function(e,t,r,n){return e.slice(t,Nn(e,0,t,t+r)).toString(n)},"decodeStr"),zt=i(function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e},"addLength");ge.decodeLongPath=function(e,t){return ye(e,0,e.length,t)};ge.encodePax=function(e){var t="";e.name&&(t+=zt(" path="+e.name+`
|
|
4
4
|
`)),e.linkname&&(t+=zt(" linkpath="+e.linkname+`
|
|
5
5
|
`));var r=e.pax;if(r)for(var n in r)t+=zt(" "+n+"="+r[n]+`
|
|
6
6
|
`);return Buffer.from(t)};ge.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var n=parseInt(e.slice(0,r).toString(),10);if(!n)return t;var o=e.slice(r+1,n-1).toString(),a=o.indexOf("=");if(a===-1)return t;t[o.slice(0,a)]=o.slice(a+1),e=e.slice(n)}return t};ge.encode=function(e){var t=$a(512),r=e.name,n="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var o=r.indexOf("/");if(o===-1)return null;n+=n?"/"+r.slice(0,o):r.slice(0,o),r=r.slice(o+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(n)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(ee(e.mode&Xa,6),100),t.write(ee(e.uid,6),108),t.write(ee(e.gid,6),116),t.write(ee(e.size,11),124),t.write(ee(e.mtime.getTime()/1e3|0,11),136),t[156]=Pn+Qa(e.type),e.linkname&&t.write(e.linkname,157),kn.copy(t,Ne),Va.copy(t,Gt),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(ee(e.devmajor||0,6),329),t.write(ee(e.devminor||0,6),337),n&&t.write(n,345),t.write(ee(Mn(t),6),148),t)};ge.decode=function(e,t,r){var n=e[156]===0?0:e[156]-Pn,o=ye(e,0,100,t),a=te(e,100,8),s=te(e,108,8),u=te(e,116,8),f=te(e,124,12),l=te(e,136,12),g=Za(n),d=e[157]===0?null:ye(e,157,100,t),y=ye(e,265,32),_=ye(e,297,32),w=te(e,329,8),T=te(e,337,8),b=Mn(e);if(b===8*32)return null;if(b!==te(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(kn.compare(e,Ne,Ne+6)===0)e[345]&&(o=ye(e,345,155,t)+"/"+o);else if(!(Ka.compare(e,Ne,Ne+6)===0&&Ya.compare(e,Gt,Gt+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return n===0&&o&&o[o.length-1]==="/"&&(n=5),{name:o,mode:a,uid:s,gid:u,size:f,mtime:new Date(1e3*l),type:g,linkname:d,uname:y,gname:_,devmajor:w,devminor:T}}});var Bn=S((af,jn)=>{c();var Dn=L("util"),ts=Ln(),Me=Vt(),qn=pe().Writable,Cn=pe().PassThrough,In=i(function(){},"noop"),An=i(function(e){return e&=511,e&&512-e},"overflow"),rs=i(function(e,t){var r=new rt(e,t);return r.end(),r},"emptyStream"),ns=i(function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},"mixinPax"),rt=i(function(e,t){this._parent=e,this.offset=t,Cn.call(this,{autoDestroy:!1})},"Source");Dn.inherits(rt,Cn);rt.prototype.destroy=function(e){this._parent.destroy(e)};var G=i(function(e){if(!(this instanceof G))return new G(e);qn.call(this,e),e=e||{},this._offset=0,this._buffer=ts(),this._missing=0,this._partial=!1,this._onparse=In,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,n=i(function(){t._continue()},"oncontinue"),o=i(function(y){if(t._locked=!1,y)return t.destroy(y);t._stream||n()},"onunlock"),a=i(function(){t._stream=null;var y=An(t._header.size);y?t._parse(y,s):t._parse(512,d),t._locked||n()},"onstreamend"),s=i(function(){t._buffer.consume(An(t._header.size)),t._parse(512,d),n()},"ondrain"),u=i(function(){var y=t._header.size;t._paxGlobal=Me.decodePax(r.slice(0,y)),r.consume(y),a()},"onpaxglobalheader"),f=i(function(){var y=t._header.size;t._pax=Me.decodePax(r.slice(0,y)),t._paxGlobal&&(t._pax=Object.assign({},t._paxGlobal,t._pax)),r.consume(y),a()},"onpaxheader"),l=i(function(){var y=t._header.size;this._gnuLongPath=Me.decodeLongPath(r.slice(0,y),e.filenameEncoding),r.consume(y),a()},"ongnulongpath"),g=i(function(){var y=t._header.size;this._gnuLongLinkPath=Me.decodeLongPath(r.slice(0,y),e.filenameEncoding),r.consume(y),a()},"ongnulonglinkpath"),d=i(function(){var y=t._offset,_;try{_=t._header=Me.decode(r.slice(0,512),e.filenameEncoding,e.allowUnknownFormat)}catch(w){t.emit("error",w)}if(r.consume(512),!_){t._parse(512,d),n();return}if(_.type==="gnu-long-path"){t._parse(_.size,l),n();return}if(_.type==="gnu-long-link-path"){t._parse(_.size,g),n();return}if(_.type==="pax-global-header"){t._parse(_.size,u),n();return}if(_.type==="pax-header"){t._parse(_.size,f),n();return}if(t._gnuLongPath&&(_.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(_.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=_=ns(_,t._pax),t._pax=null),t._locked=!0,!_.size||_.type==="directory"){t._parse(512,d),t.emit("entry",_,rs(t,y),o);return}t._stream=new rt(t,y),t.emit("entry",_,t._stream,o),t._parse(_.size,a),n()},"onheader");this._onheader=d,this._parse(512,d)},"Extract");Dn.inherits(G,qn);G.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};G.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};G.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=In,this._overflow?this._write(this._overflow,void 0,e):e()}};G.prototype._write=function(e,t,r){if(!this._destroyed){var n=this._stream,o=this._buffer,a=this._missing;if(e.length&&(this._partial=!0),e.length<a)return this._missing-=e.length,this._overflow=null,n?n.write(e,r):(o.append(e),r());this._cb=r,this._missing=0;var s=null;e.length>a&&(s=e.slice(a),e=e.slice(0,a)),n?n.end(e):o.append(e),this._overflow=s,this._onparse()}};G.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};jn.exports=G});var Un=S((ff,Fn)=>{c();Fn.exports=L("fs").constants||L("constants")});var $n=S((cf,Hn)=>{c();Hn.exports=Wn;function Wn(e,t){if(e&&t)return Wn(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];var a=e.apply(this,n),s=n[n.length-1];return typeof a=="function"&&a!==s&&Object.keys(s).forEach(function(u){a[u]=s[u]}),a}i(r,"wrapper")}i(Wn,"wrappy")});var Yt=S((pf,Kt)=>{c();var zn=$n();Kt.exports=zn(nt);Kt.exports.strict=zn(Gn);nt.proto=nt(function(){Object.defineProperty(Function.prototype,"once",{value:i(function(){return nt(this)},"value"),configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:i(function(){return Gn(this)},"value"),configurable:!0})});function nt(e){var t=i(function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))},"f");return t.called=!1,t}i(nt,"once");function Gn(e){var t=i(function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},"f"),r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}i(Gn,"onceStrict")});var Xt=S((_f,Kn)=>{c();var is=Yt(),os=i(function(){},"noop"),as=global.Bare?queueMicrotask:process.nextTick.bind(process),ss=i(function(e){return e.setHeader&&typeof e.abort=="function"},"isRequest"),us=i(function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},"isChildProcess"),Vn=i(function(e,t,r){if(typeof t=="function")return Vn(e,null,t);t||(t={}),r=is(r||os);var n=e._writableState,o=e._readableState,a=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,u=!1,f=i(function(){e.writable||l()},"onlegacyfinish"),l=i(function(){s=!1,a||r.call(e)},"onfinish"),g=i(function(){a=!1,s||r.call(e)},"onend"),d=i(function(b){r.call(e,b?new Error("exited with error code: "+b):null)},"onexit"),y=i(function(b){r.call(e,b)},"onerror"),_=i(function(){as(w)},"onclose"),w=i(function(){if(!u){if(a&&!(o&&o.ended&&!o.destroyed))return r.call(e,new Error("premature close"));if(s&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},"onclosenexttick"),T=i(function(){e.req.on("finish",l)},"onrequest");return ss(e)?(e.on("complete",l),e.on("abort",_),e.req?T():e.on("request",T)):s&&!n&&(e.on("end",f),e.on("close",f)),us(e)&&e.on("exit",d),e.on("end",g),e.on("finish",l),t.error!==!1&&e.on("error",y),e.on("close",_),function(){u=!0,e.removeListener("complete",l),e.removeListener("abort",_),e.removeListener("request",T),e.req&&e.req.removeListener("finish",l),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",l),e.removeListener("exit",d),e.removeListener("end",g),e.removeListener("error",y),e.removeListener("close",_)}},"eos");Kn.exports=Vn});var Qn=S((wf,Zn)=>{c();var _e=Un(),Yn=Xt(),ot=Y(),fs=Buffer.alloc,Xn=pe().Readable,ve=pe().Writable,ls=L("string_decoder").StringDecoder,it=Vt(),cs=parseInt("755",8),hs=parseInt("644",8),Jn=fs(1024),Zt=i(function(){},"noop"),Jt=i(function(e,t){t&=511,t&&e.push(Jn.slice(0,512-t))},"overflow");function ds(e){switch(e&_e.S_IFMT){case _e.S_IFBLK:return"block-device";case _e.S_IFCHR:return"character-device";case _e.S_IFDIR:return"directory";case _e.S_IFIFO:return"fifo";case _e.S_IFLNK:return"symlink"}return"file"}i(ds,"modeToType");var at=i(function(e){ve.call(this),this.written=0,this._to=e,this._destroyed=!1},"Sink");ot(at,ve);at.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r();this._to._drain=r};at.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var st=i(function(){ve.call(this),this.linkname="",this._decoder=new ls("utf-8"),this._destroyed=!1},"LinkSink");ot(st,ve);st.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()};st.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Ae=i(function(){ve.call(this),this._destroyed=!1},"Void");ot(Ae,ve);Ae.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))};Ae.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var H=i(function(e){if(!(this instanceof H))return new H(e);Xn.call(this,e),this._drain=Zt,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null},"Pack");ot(H,Xn);H.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(r=t,t=null),r||(r=Zt);var n=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=ds(e.mode)),e.mode||(e.mode=e.type==="directory"?cs:hs),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof t=="string"&&(t=Buffer.from(t)),Buffer.isBuffer(t)){e.size=t.length,this._encode(e);var o=this.push(t);return Jt(n,e.size),o?process.nextTick(r):this._drain=r,new Ae}if(e.type==="symlink"&&!e.linkname){var a=new st;return Yn(a,function(u){if(u)return n.destroy(),r(u);e.linkname=a.linkname,n._encode(e),r()}),a}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(r),new Ae;var s=new at(this);return this._stream=s,Yn(s,function(u){if(n._stream=null,u)return n.destroy(),r(u);if(s.written!==e.size)return n.destroy(),r(new Error("size mismatch"));Jt(n,e.size),n._finalizing&&n.finalize(),r()}),s}};H.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(Jn),this.push(null))};H.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};H.prototype._encode=function(e){if(!e.pax){var t=it.encode(e);if(t){this.push(t);return}}this._encodePax(e)};H.prototype._encodePax=function(e){var t=it.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(it.encode(r)),this.push(t),Jt(this,t.length),r.size=e.size,r.type=e.type,this.push(it.encode(r))};H.prototype._read=function(e){var t=this._drain;this._drain=Zt,t()};Zn.exports=H});var ei=S(Qt=>{c();Qt.extract=Bn();Qt.pack=Qn()});var ni=S((Tf,ri)=>{c();var ps=Yt(),ys=Xt(),ut;try{ut=L("fs")}catch{}var De=i(function(){},"noop"),gs=typeof process>"u"?!1:/^v?\.0/.test(process.version),ft=i(function(e){return typeof e=="function"},"isFn"),_s=i(function(e){return!gs||!ut?!1:(e instanceof(ut.ReadStream||De)||e instanceof(ut.WriteStream||De))&&ft(e.close)},"isFS"),vs=i(function(e){return e.setHeader&&ft(e.abort)},"isRequest"),ms=i(function(e,t,r,n){n=ps(n);var o=!1;e.on("close",function(){o=!0}),ys(e,{readable:t,writable:r},function(s){if(s)return n(s);o=!0,n()});var a=!1;return function(s){if(!o&&!a){if(a=!0,_s(e))return e.close(De);if(vs(e))return e.abort();if(ft(e.destroy))return e.destroy();n(s||new Error("stream was destroyed"))}}},"destroyer"),ti=i(function(e){e()},"call"),ws=i(function(e,t){return e.pipe(t)},"pipe"),bs=i(function(){var e=Array.prototype.slice.call(arguments),t=ft(e[e.length-1]||De)&&e.pop()||De;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(o,a){var s=a<e.length-1,u=a>0;return ms(o,s,u,function(f){r||(r=f),f&&n.forEach(ti),!s&&(n.forEach(ti),t(r))})});return e.reduce(ws)},"pump");ri.exports=bs});var si=S((Lf,ai)=>{c();var lt=L("path"),ii=L("fs"),oi=parseInt("0777",8);ai.exports=me.mkdirp=me.mkdirP=me;function me(e,t,r,n){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var o=t.mode,a=t.fs||ii;o===void 0&&(o=oi&~process.umask()),n||(n=null);var s=r||function(){};e=lt.resolve(e),a.mkdir(e,o,function(u){if(!u)return n=n||e,s(null,n);switch(u.code){case"ENOENT":me(lt.dirname(e),t,function(f,l){f?s(f,l):me(e,t,s,l)});break;default:a.stat(e,function(f,l){f||!l.isDirectory()?s(u,n):s(null,n)});break}})}i(me,"mkdirP");me.sync=i(function e(t,r,n){(!r||typeof r!="object")&&(r={mode:r});var o=r.mode,a=r.fs||ii;o===void 0&&(o=oi&~process.umask()),n||(n=null),t=lt.resolve(t);try{a.mkdirSync(t,o),n=n||t}catch(u){switch(u.code){case"ENOENT":n=e(lt.dirname(t),r,n),e(t,r,n);break;default:var s;try{s=a.statSync(t)}catch{throw u}if(!s.isDirectory())throw u;break}}return n},"sync")});var gi=S(nr=>{c();var Es=mr(),fi=ei(),li=ni(),Ss=si(),ci=L("fs"),P=L("path"),Rs=L("os"),qe=Rs.platform()==="win32",Ce=i(function(){},"noop"),rr=i(function(e){return e},"echo"),er=qe?function(e){return e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:rr,Ts=i(function(e,t,r,n,o,a){for(var s=o||["."],u=0;u<s.length;u++)if(!tr(P.resolve(r,s[u]),r))throw new Error(s[u]+" is not a valid path");return i(function(l){if(!s.length)return l();var g=s.shift(),d=P.join(r,g);t.call(e,d,function(y,_){if(y)return l(y);if(!_.isDirectory())return l(null,g,_);e.readdir(d,function(w,T){if(w)return l(w);a&&T.sort();for(var b=0;b<T.length;b++)n(P.join(r,g,T[b]))||s.push(P.join(g,T[b]));l(null,g,_)})})},"loop")},"statAll"),hi=i(function(e,t){return function(r){r.name=r.name.split("/").slice(t).join("/");var n=r.linkname;return n&&(r.type==="link"||P.isAbsolute(n))&&(r.linkname=n.split("/").slice(t).join("/")),e(r)}},"strip");nr.pack=function(e,t){e||(e="."),t||(t={});var r=t.fs||ci,n=t.ignore||t.filter||Ce,o=t.map||Ce,a=t.mapStream||rr,s=Ts(r,t.dereference?r.stat:r.lstat,e,n,t.entries,t.sort),u=t.strict!==!1,f=typeof t.umask=="number"?~t.umask:~di(),l=typeof t.dmode=="number"?t.dmode:0,g=typeof t.fmode=="number"?t.fmode:0,d=t.pack||fi.pack(),y=t.finish||Ce;t.strip&&(o=hi(o,t.strip)),t.readable&&(l|=parseInt(555,8),g|=parseInt(444,8)),t.writable&&(l|=parseInt(333,8),g|=parseInt(222,8));var _=i(function(b,p){r.readlink(P.join(e,b),function(v,h){if(v)return d.destroy(v);p.linkname=er(h),d.entry(p,T)})},"onsymlink"),w=i(function(b,p,v){if(b)return d.destroy(b);if(!p)return t.finalize!==!1&&d.finalize(),y(d);if(v.isSocket())return T();var h={name:er(p),mode:(v.mode|(v.isDirectory()?l:g))&f,mtime:v.mtime,size:v.size,type:"file",uid:v.uid,gid:v.gid};if(v.isDirectory())return h.size=0,h.type="directory",h=o(h)||h,d.entry(h,T);if(v.isSymbolicLink())return h.size=0,h.type="symlink",h=o(h)||h,_(p,h);if(h=o(h)||h,!v.isFile())return u?d.destroy(new Error("unsupported type for "+p)):T();var O=d.entry(h,T);if(O){var A=a(r.createReadStream(P.join(e,p),{start:0,end:h.size>0?h.size-1:h.size}),h);A.on("error",function(V){O.destroy(V)}),li(A,O)}},"onstat"),T=i(function(b){if(b)return d.destroy(b);s(w)},"onnextentry");return T(),d};var Os=i(function(e){return e.length?e[e.length-1]:null},"head"),xs=i(function(){return process.getuid?process.getuid():-1},"processGetuid"),di=i(function(){return process.umask?process.umask():0},"processUmask");nr.extract=function(e,t){e||(e="."),t||(t={});var r=t.fs||ci,n=t.ignore||t.filter||Ce,o=t.map||Ce,a=t.mapStream||rr,s=t.chown!==!1&&!qe&&xs()===0,u=t.extract||fi.extract(),f=[],l=new Date,g=typeof t.umask=="number"?~t.umask:~di(),d=typeof t.dmode=="number"?t.dmode:0,y=typeof t.fmode=="number"?t.fmode:0,_=t.strict!==!1;t.strip&&(o=hi(o,t.strip)),t.readable&&(d|=parseInt(555,8),y|=parseInt(444,8)),t.writable&&(d|=parseInt(333,8),y|=parseInt(222,8));var w=i(function(p,v){for(var h;(h=Os(f))&&p.slice(0,h[0].length)!==h[0];)f.pop();if(!h)return v();r.utimes(h[0],l,h[1],v)},"utimesParent"),T=i(function(p,v,h){if(t.utimes===!1)return h();if(v.type==="directory")return r.utimes(p,l,v.mtime,h);if(v.type==="symlink")return w(p,h);r.utimes(p,l,v.mtime,function(O){if(O)return h(O);w(p,h)})},"utimes"),b=i(function(p,v,h){var O=v.type==="symlink",A=O?r.lchmod:r.chmod,V=O?r.lchown:r.chown;if(!A)return h();var ct=(v.mode|(v.type==="directory"?d:y))&g&parseInt(777,8);V&&s?V.call(r,p,v.uid,v.gid,we):we(null);function we(ue){if(ue)return h(ue);if(!A)return h();A.call(r,p,ct,h)}i(we,"onchown")},"chperm");return u.on("entry",function(p,v,h){p=o(p)||p,p.name=er(p.name);var O=P.join(e,P.join("/",p.name));if(n(O,p))return v.resume(),h();var A=i(function(D){if(D)return h(D);if(P.join(O,".")===P.join(e,"."))return h();T(O,p,function(q){if(q)return h(q);if(qe)return h();b(O,p,h)})},"stat"),V=i(function(){if(qe)return h();r.unlink(O,function(){var D=P.resolve(P.dirname(O),p.linkname);if(!tr(D,e))return h(new Error(O+" is not a valid symlink"));yi(r,D,P.resolve(e),function(q,C){if(q)return h(q);if(!C)return h(new Error(O+" is not a valid symlink"));r.symlink(p.linkname,O,A)})})},"onsymlink"),ct=i(function(){if(qe)return h();r.unlink(O,function(){var D=P.join(e,P.join("/",p.linkname));r.realpath(D,function(q,C){if(q||!tr(C,e))return h(new Error(O+" is not a valid hardlink"));r.link(C,O,function(fe){if(fe&&fe.code==="EPERM"&&t.hardlinkAsFilesFallback)return v=r.createReadStream(D),we();A(fe)})})})},"onlink"),we=i(function(){r.lstat(O,function(q,C){if(!q&&C.isSymbolicLink())return r.unlink(O,D);D()});function D(q){if(q)return h(q);var C=r.createWriteStream(O),fe=a(v,p);C.on("error",function(je){fe.destroy(je)}),li(fe,C,function(je){if(je)return h(je);C.on("close",A)})}i(D,"onwrite")},"onfile");if(p.type==="directory")return f.push([O,p.mtime]),ui(O,{fs:r,own:s,uid:p.uid,gid:p.gid},A);var ue=P.dirname(O);pi(r,ue,P.join(e,"."),function(D,q){if(D)return h(D);if(!q)return h(new Error(ue+" is not a valid path"));ui(ue,{fs:r,own:s,uid:p.uid,gid:p.gid},function(C){if(C)return h(C);switch(p.type){case"file":return we();case"link":return ct();case"symlink":return V()}if(_)return h(new Error("unsupported type for "+O+" ("+p.type+")"));v.resume(),h()})})}),t.finish&&u.on("finish",t.finish),u};function pi(e,t,r,n){if(t===r)return n(null,!0);e.lstat(t,function(o,a){if(o&&o.code!=="ENOENT")return n(o);if(o||a.isDirectory())return pi(e,P.join(t,".."),r,n);n(null,!1)})}i(pi,"validate");function yi(e,t,r,n){if(t===r)return n(null,!0);if(!t.startsWith(r+P.sep))return n(null,!1);e.lstat(t,function(o,a){if(o&&o.code!=="ENOENT"&&o.code!=="EPERM")return n(o);if(o||!a.isSymbolicLink())return yi(e,P.join(t,".."),r,n);n(null,!1)})}i(yi,"validateNotSymlink");function ui(e,t,r){Ss(e,{fs:t.fs},function(n,o){!n&&o&&t.own?Es(o,t.uid,t.gid,r):r(n)})}i(ui,"mkdirfix");function tr(e,t){return t=P.resolve(t),t===e||e.startsWith(t+P.sep)}i(tr,"inCwd")});c();var Ti=Pi(gi(),1);import{createHash as Ps}from"node:crypto";import{readFileSync as Ei}from"node:fs";import*as Si from"node:os";import*as $ from"node:path";import{PassThrough as vi,Readable as Ri}from"node:stream";import{StringDecoder as ks}from"node:string_decoder";c();import{createRequire as Ls}from"node:module";function _i(){return Ls(import.meta.url)("dockerode")}i(_i,"loadDockerode");function Ns(){return process.env.NODE_TEST_CONTEXT&&!process.env.WERKMEISTER_DOCKER_ENGINE?(process.stderr.write(`Docker engine reached in a test without useDockerEngine() (fixtures.mjs); using a dead socket
|
|
@@ -12,4 +12,4 @@ import{a as cr,b as hr}from"./chunk-AIPFMLDE.js";import{b as or,c as ar,d as sr,
|
|
|
12
12
|
safe-buffer/index.js:
|
|
13
13
|
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
14
14
|
*/
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-2DL43TNW.js.map
|