@visulima/vis 1.0.7 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE.md +210 -2733
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +1 -1
  5. package/dist/packem_chunks/CONFIG_FILES.js +1 -1
  6. package/dist/packem_chunks/bloom-sync.js +1 -1
  7. package/dist/packem_chunks/catalog.js +68 -68
  8. package/dist/packem_chunks/cli-exec.js +1 -1
  9. package/dist/packem_chunks/cli-main.js +163 -163
  10. package/dist/packem_chunks/devtools.js +1 -1
  11. package/dist/packem_chunks/dispatch.js +1 -1
  12. package/dist/packem_chunks/fix.js +1 -1
  13. package/dist/packem_chunks/handler.js +1 -1
  14. package/dist/packem_chunks/handler10.js +1 -1
  15. package/dist/packem_chunks/handler11.js +1 -1
  16. package/dist/packem_chunks/handler12.js +1 -1
  17. package/dist/packem_chunks/handler13.js +1 -1
  18. package/dist/packem_chunks/handler14.js +1 -1
  19. package/dist/packem_chunks/handler15.js +1 -1
  20. package/dist/packem_chunks/handler16.js +1 -1
  21. package/dist/packem_chunks/handler17.js +1 -1
  22. package/dist/packem_chunks/handler18.js +1 -1
  23. package/dist/packem_chunks/handler19.js +1 -1
  24. package/dist/packem_chunks/handler2.js +1 -1
  25. package/dist/packem_chunks/handler20.js +1 -1
  26. package/dist/packem_chunks/handler21.js +1 -1
  27. package/dist/packem_chunks/handler22.js +1 -1
  28. package/dist/packem_chunks/handler23.js +1 -1
  29. package/dist/packem_chunks/handler24.js +1 -1
  30. package/dist/packem_chunks/handler26.js +1 -1
  31. package/dist/packem_chunks/handler27.js +1 -1
  32. package/dist/packem_chunks/handler28.js +1 -1
  33. package/dist/packem_chunks/handler29.js +1 -1
  34. package/dist/packem_chunks/handler3.js +1 -1
  35. package/dist/packem_chunks/handler30.js +1 -1
  36. package/dist/packem_chunks/handler4.js +1 -1
  37. package/dist/packem_chunks/handler5.js +5 -5
  38. package/dist/packem_chunks/handler50.js +6 -6
  39. package/dist/packem_chunks/handler51.js +1 -1
  40. package/dist/packem_chunks/handler53.js +1 -1
  41. package/dist/packem_chunks/handler54.js +1 -1
  42. package/dist/packem_chunks/handler55.js +1 -1
  43. package/dist/packem_chunks/handler58.js +3 -3
  44. package/dist/packem_chunks/handler59.js +1 -1
  45. package/dist/packem_chunks/handler6.js +7 -7
  46. package/dist/packem_chunks/handler60.js +2 -2
  47. package/dist/packem_chunks/handler61.js +1 -1
  48. package/dist/packem_chunks/handler62.js +2 -2
  49. package/dist/packem_chunks/handler63.js +1 -1
  50. package/dist/packem_chunks/handler64.js +4 -4
  51. package/dist/packem_chunks/handler66.js +1 -1
  52. package/dist/packem_chunks/handler67.js +19 -19
  53. package/dist/packem_chunks/handler68.js +3 -3
  54. package/dist/packem_chunks/handler69.js +1 -1
  55. package/dist/packem_chunks/handler7.js +1 -1
  56. package/dist/packem_chunks/handler70.js +4 -4
  57. package/dist/packem_chunks/handler71.js +1 -1
  58. package/dist/packem_chunks/handler72.js +13 -13
  59. package/dist/packem_chunks/handler73.js +4 -4
  60. package/dist/packem_chunks/handler74.js +7 -7
  61. package/dist/packem_chunks/handler75.js +3 -27
  62. package/dist/packem_chunks/handler76.js +27 -3
  63. package/dist/packem_chunks/handler77.js +32 -32
  64. package/dist/packem_chunks/handler78.js +25 -23
  65. package/dist/packem_chunks/handler8.js +1 -1
  66. package/dist/packem_chunks/handler9.js +1 -1
  67. package/dist/packem_chunks/heal-accept.js +1 -1
  68. package/dist/packem_chunks/heal.js +1 -1
  69. package/dist/packem_chunks/help-command.js +56 -23
  70. package/dist/packem_chunks/index3.js +1 -1
  71. package/dist/packem_chunks/keys-refresh.js +1 -1
  72. package/dist/packem_chunks/lean.js +1 -1
  73. package/dist/packem_chunks/list.js +1 -1
  74. package/dist/packem_chunks/loader.js +1 -1
  75. package/dist/packem_chunks/sync.js +1 -1
  76. package/dist/packem_chunks/sync2.js +1 -1
  77. package/dist/packem_chunks/tripwire.js +1 -1
  78. package/dist/packem_chunks/ts-loader.js +1 -1
  79. package/dist/packem_chunks/verify-lockfile.js +1 -1
  80. package/dist/packem_shared/{affected-shas-DkrQVQla.js → affected-shas-BOeR4vEc.js} +1 -1
  81. package/dist/packem_shared/{ai-analysis-DWBi9tSU.js → ai-analysis-D7HOdUwd.js} +3 -3
  82. package/dist/packem_shared/{ai-fix-BocGeQu4.js → ai-fix-CLfWbyqY.js} +1 -1
  83. package/dist/packem_shared/{augment-BIUGEy1Q.js → augment-BVuj3ee7.js} +1 -1
  84. package/dist/packem_shared/{bin-BZ_m_tag.js → bin-CkfFJCAM.js} +1 -1
  85. package/dist/packem_shared/{build-scripts-CpTeQE1L.js → build-scripts-CfAqHBlq.js} +1 -1
  86. package/dist/packem_shared/{command-runtime-Buz4F5LM.js → command-runtime-DTbo12cP.js} +1 -1
  87. package/dist/packem_shared/{cyclonedx-DFlz2HRz.js → cyclonedx--L7NbMBH.js} +1 -1
  88. package/dist/packem_shared/{dependency-scan-173U3WXB.js → dependency-scan-DZcSlSFp.js} +1 -1
  89. package/dist/packem_shared/{docker-B2h5KRZH.js → docker-69ybb6g7.js} +1 -1
  90. package/dist/packem_shared/{en-BRcjb70R.js → en-C26W78--.js} +1 -1
  91. package/dist/packem_shared/{failure-log-C3c5AVfc.js → failure-log-BZQqxffZ.js} +1 -1
  92. package/dist/packem_shared/glob-DMbPwGSj-D2Hk3lFG.js +1 -0
  93. package/dist/packem_shared/{index-D75r1yKp.js → index-2LCHaVNX.js} +1 -1
  94. package/dist/packem_shared/{index-BtbefKtY.js → index-Bhzio2RB.js} +1 -1
  95. package/dist/packem_shared/{index-ZfYDID5E.js → index-Bq6YEpiq.js} +1 -1
  96. package/dist/packem_shared/{lifecycle-CG0Ccu4h.js → lifecycle-BcCMt9wn.js} +1 -1
  97. package/dist/packem_shared/{lockfile-D_JiWcwS.js → lockfile-Cwt0Nwr0.js} +1 -1
  98. package/dist/packem_shared/{manifests-mFrrpzXW.js → manifests-BshBdSb-.js} +1 -1
  99. package/dist/packem_shared/{min-release-age-Cdh1dLz1.js → min-release-age-hK604veF.js} +1 -1
  100. package/dist/packem_shared/{missing-package-json-sYPP3cm-.js → missing-package-json-Cu0iWMT2.js} +1 -1
  101. package/dist/packem_shared/{native-config-sync-DW8549FX.js → native-config-sync-DDKjAy0i.js} +1 -1
  102. package/dist/packem_shared/{package-version-DBJLduJL.js → package-version-TsxLc6w2.js} +2 -2
  103. package/dist/packem_shared/{packument-BFekEvwn.js → packument-CtVAoNo7.js} +1 -1
  104. package/dist/packem_shared/{pm-runner-D5NWL8yv.js → pm-runner-CfyxALPK.js} +1 -1
  105. package/dist/packem_shared/{provenance-ByHgofYo.js → provenance-CRBV9cko.js} +1 -1
  106. package/dist/packem_shared/{readJsonSync-DuMMeB3s-wlhgSHes.js → readJsonSync-DuMMeB3s-B9cGBVbJ.js} +1 -1
  107. package/dist/packem_shared/{registry-keys-BCD7Ir8g.js → registry-keys-Ci2keQNi.js} +1 -1
  108. package/dist/packem_shared/{resolve-explicit-CnEsy-zC.js → resolve-explicit-BX6aMYl-.js} +1 -1
  109. package/dist/packem_shared/{resolve-runtime-Z2n59SEd.js → resolve-runtime-COyiEML3.js} +1 -1
  110. package/dist/packem_shared/{run-file-u9hMNu8K.js → run-file-CTJfIZ0I.js} +1 -1
  111. package/dist/packem_shared/{runtime-check-B1OF152E.js → runtime-check-fzDkedMW.js} +1 -1
  112. package/dist/packem_shared/{s1ngularity-DkNDQiKU.js → s1ngularity-Cq1cCSpU.js} +1 -1
  113. package/dist/packem_shared/scan-progress-DQ9qIGzr.js +2 -0
  114. package/dist/packem_shared/{selectors-DiZWa7R4.js → selectors-B9dOMIMq.js} +1 -1
  115. package/dist/packem_shared/{signatures-kvrwi3Un.js → signatures-DvD1E8Xa.js} +1 -1
  116. package/dist/packem_shared/{target-options-BJIDkfDf.js → target-options-aPqByoww.js} +1 -1
  117. package/dist/packem_shared/{toolchain-CAbopPwK.js → toolchain-CiaW3bx4.js} +1 -1
  118. package/dist/packem_shared/{typosquats-DWB80Gyv.js → typosquats-CRnvlYPw.js} +1 -1
  119. package/dist/packem_shared/use-measured-height-DfNxp6nf.js +1 -0
  120. package/dist/packem_shared/{verify-BajubByH.js → verify-23b6IfSg.js} +1 -1
  121. package/dist/packem_shared/vis-update-app-De8JjZm0.js +1 -0
  122. package/dist/packem_shared/{watch-B8WT65yN.js → watch-B3P2dwoG.js} +1 -1
  123. package/dist/packem_shared/{watch-loop-CZazUnGB.js → watch-loop-B3_O8hF-.js} +1 -1
  124. package/dist/runtime/preload.js +1 -1
  125. package/index.d.ts +204 -204
  126. package/index.js +26 -26
  127. package/package.json +11 -10
  128. package/dist/packem_shared/MultiSpinner-B9U0-aE3-B-gIXhFk.js +0 -3
  129. package/dist/packem_shared/Table-BGIHvenQ-D2oJtNQj.js +0 -34
  130. package/dist/packem_shared/glob-DMbPwGSj-DFkUYBco.js +0 -1
  131. package/dist/packem_shared/scan-progress-CHdHWhVw.js +0 -2
  132. package/dist/packem_shared/spinner-DuJJvFTl.js +0 -1
  133. package/dist/packem_shared/tabs-CgxCvjCY.js +0 -1
  134. package/dist/packem_shared/use-measured-height-C4jA0yNy.js +0 -1
  135. package/dist/packem_shared/vis-update-app-M3dw6XRC.js +0 -1
@@ -1,4 +1,4 @@
1
- import{createRequire as Bt}from"node:module";import{F as X,m as B,e as K,H as $,u as He,y as Ut,v as Mt,i as jt}from"./index-D75r1yKp.js";import{N as Wt,a as ze}from"./readJsonSync-DuMMeB3s-wlhgSHes.js";import"./public-api-WqUCiyIe.js";import{a as ve,g as _t}from"./_commonjsHelpers-B5Y90VFO.js";import{r as Ht,a as zt}from"./clean-DWjQl14S.js";const Rt=Bt(import.meta.url),I=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=c=>{if(typeof I<"u"&&I.versions&&I.versions.node){const[e,t]=I.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return I.getBuiltinModule(c)}return Rt(c)},{dirname:It}=J("node:path"),We=J("node:url"),{fileURLToPath:kt}=We,_e=J("node:module"),{createRequire:Y}=_e,Yt=J("util"),O=c=>"Deno"in c,N=c=>"Bun"in c,vr=()=>{if(O(globalThis)){const c=globalThis.Deno,e=c.execPath();let t=e;try{const{importMeta:i}=globalThis;i?.url&&(t=i.url)}catch{}return[e,t,...c.args]}return N(globalThis)?globalThis.Bun.process.argv:process.argv},yr=()=>O(globalThis)?globalThis.Deno.cwd():N(globalThis)?globalThis.Bun.process.cwd():process.cwd(),br=()=>{if(O(globalThis)){const c=globalThis.Deno;return new Proxy(c.env.toObject(),{get:(e,t)=>typeof t=="string"?c.env.get(t):e[t],has:(e,t)=>typeof t=="string"?c.env.has(t):t in e,set:(e,t,i)=>typeof t=="string"?(i===void 0||c.env.set(t,i),!0):!1})}return N(globalThis)?globalThis.Bun.process.env:process.env},Cr=()=>O(globalThis)?[]:N(globalThis)?globalThis.Bun.process.execArgv:process.execArgv,Pr=()=>O(globalThis)?globalThis.Deno.execPath():N(globalThis)?globalThis.Bun.process.execPath:process.execPath,Dr=()=>{if(O(globalThis)){const c=globalThis.Deno.build?.os??"unknown";return c==="windows"?"win32":c}return N(globalThis)?globalThis.Bun.platform??"unknown":process.platform},wr=()=>{if(O(globalThis)){const c=globalThis.Deno.build?.arch??"unknown";return c==="x86_64"?"x64":c==="aarch64"?"arm64":c}return N(globalThis)?globalThis.Bun.process.arch:process.arch},xr=(c=0)=>{if(O(globalThis))throw globalThis.Deno.exit(c),new Error("Deno exit failed");if(N(globalThis))throw globalThis.Bun.process.exit(c),new Error("Bun exit failed");process.exit(c)},Ar=(c,e)=>{if(O(globalThis))return()=>{};if(N(globalThis)){try{const i=globalThis.Bun;if(i.process?.on)return i.process.on(c,e),()=>{i.process?.removeListener&&i.process.removeListener(c,e)}}catch{}return()=>{}}const t=process;return t.on(c,e),()=>{t.removeListener(c,e)}},qt=Y(import.meta.url),k=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ye=c=>{if(typeof k<"u"&&k.versions&&k.versions.node){const[e,t]=k.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return k.getBuiltinModule(c)}return qt(c)},{execFileSync:Vt}=Ye("node:child_process"),{existsSync:be,readFileSync:Kt}=Ye("node:fs"),Jt=["yarn.lock","package-lock.json","pnpm-lock.yaml","npm-shrinkwrap.json","bun.lock","bun.lockb"],Ce=new Set(["bun","npm","pnpm","yarn"]),qe=c=>{const e=Wt(Kt(c,"utf8"));return typeof e?.packageManager=="string"?e.packageManager:void 0},Xt=c=>{let e;if(Jt.forEach(i=>{!e&&be(B(c,i))&&(e=B(c,i))}),e)return e;const t=B(c,"package.json");if(be(t)&&qe(t)!==void 0)return t},Zt=c=>{if(!c)throw new K("Could not find a package manager");if(c.endsWith("package.json")){const e=qe(c);if(e){const t=["npm","yarn","pnpm","bun"].find(i=>e.startsWith(i));if(t)return{packageManager:t,path:$(c)}}}if(c.endsWith("yarn.lock"))return{packageManager:"yarn",path:$(c)};if(c.endsWith("package-lock.json")||c.endsWith("npm-shrinkwrap.json"))return{packageManager:"npm",path:$(c)};if(c.endsWith("pnpm-lock.yaml"))return{packageManager:"pnpm",path:$(c)};if(c.endsWith("bun.lock")||c.endsWith("bun.lockb"))return{packageManager:"bun",path:$(c)};throw new K("Could not find a package manager")},Qt=c=>{const e=X(Xt,{...c&&{cwd:c}});return Zt(e)},Er=c=>{if(!Ce.has(c))throw new Error(`Unsupported package manager "${c}". Expected one of: ${[...Ce].join(", ")}.`);return Vt(c,["--version"]).toString("utf8").trim()},ei=Y(import.meta.url),U=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ve=c=>{if(typeof U<"u"&&U.versions&&U.versions.node){const[e,t]=U.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return U.getBuiltinModule(c)}return ei(c)};Ve("node:fs");Ve("node:fs/promises");const ti={sha256:"sha256",sha384:"sha384",sha512:"sha512"},ii=1024,ri=/^[A-Z0-9+/]+={0,2}$/i,Pe="node_modules/",H=/^['"]/,z=/['"]$/,si=/^[a-z][a-zA-Z0-9]*:\s*$/m,ni=/resolution:\s*\{[^}]*integrity:\s*([^,}\s]+)/,oi=/^["']?((?:@[^/@"']+\/)?[^@"'\n]+)@[^\n]+\n((?:[\t ][^\n]*(?:\n|$))+)/gm,ai=/^\s+version:?\s+"?([^"\n]+)"?/m,li=/^\s+integrity[\s:]+"?([^"\s]+)"?/m,Z=c=>{if(c.length>ii)return;const e=c.indexOf("-");if(e<=0)return;const t=ti[c.slice(0,e).toLowerCase()];if(!t)return;const i=c.slice(e+1);if(ri.test(i))try{const s=Buffer.from(i,"base64");return s.length===0?void 0:{algorithm:t,hex:s.toString("hex")}}catch{return}},Q=(c,e,t)=>{const i=`${t.name}@${t.version}`;e.has(i)||(e.add(i),c.push(t))},x=(c,e,t)=>{t&&Object.keys(t).length>0&&(c[e]={...t})},R=c=>{if(!c)return;const e={};for(const[t,i]of Object.entries(c))e[t]=[i];return Object.keys(e).length>0?e:void 0},ci=c=>{const e=[],t=new Set;let i;try{i=JSON.parse(c)}catch{return e}if(!i.packages)return e;for(const[s,r]of Object.entries(i.packages)){if(!s||!r.version)continue;const o=s.lastIndexOf(Pe);if(o===-1)continue;const n=s.slice(o+Pe.length);if(n.length===0)continue;const a=n.split("/"),u=n.startsWith("@")?2:1;if(a.length!==u||a.some(v=>v.length===0))continue;const f=r.name??n;if(f.startsWith("."))continue;const g={name:f,version:r.version};if(r.integrity){const v=Z(r.integrity);v&&(g.integrity=v)}x(g,"dependencies",R(r.dependencies)),x(g,"peerDependencies",R(r.peerDependencies)),x(g,"optionalDependencies",R(r.optionalDependencies)),Q(e,t,g)}return e},Ke=c=>{let e=c.trim();e.startsWith("/")&&(e=e.slice(1)),e=e.replace(H,"").replace(z,"");const t=e.indexOf("(");t>0&&(e=e.slice(0,t));const i=e.lastIndexOf("@");if(i<=0)return;const s=e.slice(0,i),r=e.slice(i+1);if(!(!s||!r||r.startsWith("link:")||r.startsWith("workspace:")||r.startsWith("file:")))return{name:s,version:r}},Je=(c,e)=>{const t=new RegExp(String.raw`^${e}:\s*$`,"m").exec(c);if(!t)return;const i=t.index+t[0].length,s=si.exec(c.slice(i));return c.slice(i,s?i+s.index:c.length)},hi=c=>{const e=new Map,t=Je(c,"snapshots");if(!t)return e;const i=/^ {2}(['"]?[^\s:][^:\n]*?['"]?):\s*\n((?: {4}[^\n]*\n?)+)/gm;let s;for(;(s=i.exec(t)??void 0)!==void 0;){const r=Ke(s[1]);if(!r)continue;const o=`${r.name}@${r.version}`,n=s[2],a=e.get(o)??{};for(const u of["dependencies","peerDependencies","optionalDependencies"]){const f=q(n,u);if(!f)continue;const g=a[u]??{};for(const[v,y]of Object.entries(f)){const b=g[v]??[];for(const m of y)b.includes(m)||b.push(m);g[v]=b}a[u]=g}e.set(o,a)}return e},ui=c=>{const e=[],t=new Set,i=Je(c,"packages");if(!i)return e;const s=hi(c),r=/^ {2}(['"]?[^\s:][^:\n]*?['"]?):\s*\n((?: {4}[^\n]*\n?)+)/gm;let o;for(;(o=r.exec(i)??void 0)!==void 0;){const n=Ke(o[1]);if(!n)continue;const a=o[2],u=ni.exec(a),f={name:n.name,version:n.version};if(u?.[1]){const v=Z(u[1]);v&&(f.integrity=v)}const g=s.get(`${n.name}@${n.version}`);x(f,"dependencies",g?.dependencies??q(a,"dependencies")),x(f,"peerDependencies",g?.peerDependencies??q(a,"peerDependencies")),x(f,"optionalDependencies",g?.optionalDependencies??q(a,"optionalDependencies")),Q(e,t,f)}return e},q=(c,e)=>{const t=new RegExp(String.raw`^ {4}${e}:\s*\n((?: {6,}[^\n]*\n?)+)`,"m").exec(c);if(!t?.[1])return;const i={},s=/^ {6}([^\s:]+):\s*([^\n]+)/gm;let r;for(;(r=s.exec(t[1])??void 0)!==void 0;){const o=r[1].replace(H,"").replace(z,"");let n=r[2].trim();n=n.replace(H,"").replace(z,"");const a=n.indexOf("(");if(a>0&&(n=n.slice(0,a).trim()),!o||!n)continue;const u=i[o]??[];u.includes(n)||u.push(n),i[o]=u}return Object.keys(i).length>0?i:void 0},pi=c=>{const e=[],t=new Set,i=oi;i.lastIndex=0;let s;for(;(s=i.exec(c)??void 0)!==void 0;){const r=s[1].replace(H,"").replace(z,"");if(!r)continue;const o=s[2],n=ai.exec(o);if(!n?.[1])continue;const a={name:r,version:n[1].trim()},u=li.exec(o);if(u?.[1]){const f=Z(u[1]);f&&(a.integrity=f)}x(a,"dependencies",te(o,"dependencies")),x(a,"peerDependencies",te(o,"peerDependencies")),x(a,"optionalDependencies",te(o,"optionalDependencies")),Q(e,t,a)}return e},te=(c,e)=>{const t=new RegExp(String.raw`^ {2}${e}:\s*\n((?: {4,}[^\n]*\n?)+)`,"m").exec(c);if(!t?.[1])return;const i={},s=/^ {4}(['"]?[^\s:'"]+['"]?)\s*(?::\s*)?['"]([^'"\n]+)['"]/gm;let r;for(;(r=s.exec(t[1])??void 0)!==void 0;){const o=r[1].replace(H,"").replace(z,""),n=r[2];if(o&&n){const a=i[o]??[];a.includes(n)||a.push(n),i[o]=a}}return Object.keys(i).length>0?i:void 0},fi=/,(?=\s*[}\]])/g,di=c=>{const e=[],t=new Set;let i;try{i=JSON.parse(c.replaceAll(fi,""))}catch{return e}if(!i.packages)return e;for(const s of Object.values(i.packages)){const r=s[0];if(typeof r!="string")continue;const o=r.indexOf("@",1);if(o<=0)continue;const n=r.slice(0,o),a=r.slice(o+1);if(!n||!a||a.startsWith("workspace:")||a.startsWith("link:")||a.startsWith("file:"))continue;const u={name:n,version:a},f=s[3];if(typeof f=="string"&&f.length>0){const v=Z(f);v&&(u.integrity=v)}const g=s[2];if(g&&typeof g=="object"&&!Array.isArray(g)){const v=g;x(u,"dependencies",R(v.dependencies)),x(u,"peerDependencies",R(v.peerDependencies)),x(u,"optionalDependencies",R(v.optionalDependencies))}Q(e,t,u)}return e},$r=(c,e)=>{switch(e){case"bun":return di(c);case"npm":return ci(c);case"pnpm":return ui(c);case"yarn":return pi(c);default:return[]}},mi=Y(import.meta.url),M=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gi=c=>{if(typeof M<"u"&&M.versions&&M.versions.node){const[e,t]=M.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return M.getBuiltinModule(c)}return mi(c)},{existsSync:De,readFileSync:Li}=gi("node:fs"),Or=c=>{const e=X(["lerna.json","turbo.json"],{type:"file",...c&&{cwd:c}});if(e?.endsWith("lerna.json")){const i=ze(e);if(i.useWorkspaces||i.packages)return{path:$(e),strategy:"lerna"}}const t=e?.endsWith("turbo.json");try{const{packageManager:i,path:s}=Qt(c);if(["npm","yarn"].includes(i)){const r=B(s,"package.json");if(De(r)&&Li(B(s,"package.json"),"utf8").includes("workspaces"))return{path:s,strategy:t?"turbo":i}}else if(i==="pnpm"){const r=B(s,"pnpm-workspace.yaml");if(De(r))return{path:s,strategy:t?"turbo":"pnpm"}}}catch(i){if(!(i instanceof K))throw i}throw new Error(`No monorepo root could be found upwards from the directory ${String(c??process.cwd())} using lerna, yarn, pnpm, or npm as indicators.`)},Si=Y(import.meta.url),j=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vi=c=>{if(typeof j<"u"&&j.versions&&j.versions.node){const[e,t]=j.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return j.getBuiltinModule(c)}return Si(c)};vi("node:fs");var ie,we;function Xe(){return we||(we=1,ie=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","ALGLIB-Documentation","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Advanced-Cryptics-Dictionary","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","Artistic-dist","Aspell-RU","BOLA-1.1","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-2-Clause-pkgconf-disclaimer","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-Tso","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Mark-Modifications","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","Buddy","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CAPEC-tou","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CryptoSwift","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-DTD","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","ESA-PL-permissive-2.4","ESA-PL-strong-copyleft-2.4","ESA-PL-weak-copyleft-2.4","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRSD","FSFULLRWD","FSL-1.1-ALv2","FSL-1.1-MIT","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Game-Programming-Gems","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HDF5","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-SMC","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HPND-sell-variant-critical-systems","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ISO-permission","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-STK","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MMPL-1.0.1","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-TNT","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTIA-PD","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSC-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OSSP","OpenMDW-1.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","ParaType-Free-Font-1.3","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGMLUG-PM","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SOFA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SUL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TekHVC","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","UnRAR","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","Unlicense-libtelnet","Unlicense-libwhirlpool","VOSTROM","VSL-1.0","Vim","Vixie-Cron","W3C","W3C-19980720","W3C-20150513","WTFNMFPL","WTFPL","Watcom-1.0","Widget-Workshop","WordNet","Wsuipa","X11","X11-distribute-modifications-variant","X11-no-permit-persons","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","hyphen-bulgarian","iMatix","jove","libpng-1.6.35","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","man2html","metamail","mpi-permissive","mpich2","mplus","ngrep","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]),ie}var re,xe;function yi(){return xe||(xe=1,re=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]),re}var se,Ae;function bi(){return Ae||(Ae=1,se=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]),se}var ne,Ee;function Ci(){if(Ee)return ne;Ee=1;var c=[].concat(Xe()).concat(yi()),e=bi();return ne=function(t){var i=0;function s(){return i<t.length}function r(L){if(L instanceof RegExp){var h=t.slice(i),S=h.match(L);if(S)return i+=S[0].length,S[0]}else if(t.indexOf(L,i)===i)return i+=L.length,L}function o(){r(/[ ]*/)}function n(){for(var L,h=["WITH","AND","OR","(",")",":","+"],S=0;S<h.length&&(L=r(h[S]),!L);S++);if(L==="+"&&i>1&&t[i-2]===" ")throw new Error("Space before `+`");return L&&{type:"OPERATOR",string:L}}function a(){return r(/[A-Za-z0-9-.]+/)}function u(){var L=a();if(!L)throw new Error("Expected idstring at offset "+i);return L}function f(){if(r("DocumentRef-")){var L=u();return{type:"DOCUMENTREF",string:L}}}function g(){if(r("LicenseRef-")){var L=u();return{type:"LICENSEREF",string:L}}}function v(){var L=i,h=a();if(c.indexOf(h)!==-1)return{type:"LICENSE",string:h};if(e.indexOf(h)!==-1)return{type:"EXCEPTION",string:h};i=L}function y(){return n()||f()||g()||v()}for(var b=[];s()&&(o(),!!s());){var m=y();if(!m)throw new Error("Unexpected `"+t[i]+"` at offset "+i);b.push(m)}return b},ne}var oe,$e;function Pi(){return $e||($e=1,oe=function(c){var e=0;function t(){return e<c.length}function i(){return t()?c[e]:null}function s(){if(!t())throw new Error;e++}function r(m){var L=i();if(L&&L.type==="OPERATOR"&&m===L.string)return s(),L.string}function o(){if(r("WITH")){var m=i();if(m&&m.type==="EXCEPTION")return s(),m.string;throw new Error("Expected exception after `WITH`")}}function n(){var m=e,L="",h=i();if(h.type==="DOCUMENTREF"&&(s(),L+="DocumentRef-"+h.string+":",!r(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(h=i(),h.type==="LICENSEREF")return s(),L+="LicenseRef-"+h.string,{license:L};e=m}function a(){var m=i();if(m&&m.type==="LICENSE"){s();var L={license:m.string};r("+")&&(L.plus=!0);var h=o();return h&&(L.exception=h),L}}function u(){var m=r("(");if(m){var L=y();if(!r(")"))throw new Error("Expected `)`");return L}}function f(){return u()||n()||a()}function g(m,L){return function h(){var S=L();if(S){if(!r(m))return S;var C=h();if(!C)throw new Error("Expected expression");return{left:S,conjunction:m.toLowerCase(),right:C}}}}var v=g("AND",f),y=g("OR",v),b=y();if(!b||t())throw new Error("Syntax error");return b}),oe}var ae,Oe;function Ze(){if(Oe)return ae;Oe=1;var c=Ci(),e=Pi();return ae=function(t){return e(c(t))},ae}var le,Ne;function Di(){if(Ne)return le;Ne=1;var c=Ze(),e=Xe();function t(h){try{return c(h),!0}catch{return!1}}function i(h,S){var C=S[0].length-h[0].length;return C!==0?C:h[0].toUpperCase().localeCompare(S[0].toUpperCase())}var s=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(i),r=0,o=1,n=[function(h){return h.toUpperCase()},function(h){return h.trim()},function(h){return h.replace(/\./g,"")},function(h){return h.replace(/\s+/g,"")},function(h){return h.replace(/\s+/g,"-")},function(h){return h.replace("v","-")},function(h){return h.replace(/,?\s*(\d)/,"-$1")},function(h){return h.replace(/,?\s*(\d)/,"-$1.0")},function(h){return h.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(h){return h.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(h){return h[0].toUpperCase()+h.slice(1)},function(h){return h.replace("/","-")},function(h){return h.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(h){return h.indexOf("3.0")!==-1?h+"-or-later":h+"-only"},function(h){return h+"only"},function(h){return h.replace(/(\d)$/,"-$1.0")},function(h){return h.replace(/(-| )?(\d)$/,"-$2-Clause")},function(h){return h.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(h){return h.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(h){return h.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(h){return h.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(h){return h.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(h){return h.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(h){return"CC-"+h},function(h){return"CC-"+h+"-4.0"},function(h){return h.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(h){return"CC-"+h.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],a=e.map(function(h){var S=/^(.*)-\d+\.\d+$/.exec(h);return S?[S[0],S[1]]:[h,null]}).reduce(function(h,S){var C=S[1];return h[C]=h[C]||[],h[C].push(S[0]),h},{}),u=Object.keys(a).map(function(h){return[h,a[h]]}).filter(function(h){return h[1].length===1&&h[0]!==null&&h[0]!=="APL"}).map(function(h){return[h[0],h[1][0]]});a=void 0;var f=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(u).sort(i),g=0,v=1,y=function(h){for(var S=0;S<n.length;S++){var C=n[S](h).trim();if(C!==h&&t(C))return C}return null},b=function(h){for(var S=h.toUpperCase(),C=0;C<f.length;C++){var l=f[C];if(S.indexOf(l[g])>-1)return l[v]}return null},m=function(h,S){for(var C=0;C<s.length;C++){var l=s[C],p=l[r];if(h.indexOf(p)>-1){var d=h.replace(p,l[o]),P=S(d);if(P!==null)return P}}return null};le=function(h,S){S=S||{};var C=S.upgrade===void 0?!0:!!S.upgrade;function l(D){return C?L(D):D}var p=typeof h=="string"&&h.trim().length!==0;if(!p)throw Error("Invalid argument. Expected non-empty string.");if(h=h.trim(),t(h))return l(h);var d=h.replace(/\+$/,"").trim();if(t(d))return l(d);var P=y(h);return P!==null||(P=m(h,function(D){return t(D)?D:y(D)}),P!==null)||(P=b(h),P!==null)||(P=m(h,b),P!==null)?l(P):null};function L(h){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(h)!==-1?h+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(h)!==-1?h.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(h)!==-1?h+"-or-later":h}return le}var ce,Fe;function wi(){if(Fe)return ce;Fe=1;var c=Ze(),e=Di(),t='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',i=/^SEE LICEN[CS]E IN (.+)$/;function s(o,n){return n.slice(0,o.length)===o}function r(o){if(o.hasOwnProperty("license")){var n=o.license;return s("LicenseRef",n)||s("DocumentRef",n)}else return r(o.left)||r(o.right)}return ce=function(o){var n;try{n=c(o)}catch{var a;if(o==="UNLICENSED"||o==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(a=i.exec(o))return{validForOldPackages:!0,validForNewPackages:!0,inFile:a[1]};var u={validForOldPackages:!1,validForNewPackages:!1,warnings:[t]};if(o.trim().length!==0){var f=e(o);f&&u.warnings.push('license is similar to the valid expression "'+f+'"')}return u}return r(n)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[t]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}},ce}var Qe={hasSubscribers:!1},w=Qe,G=Qe;import("node:diagnostics_channel").then(c=>{w=c.channel("lru-cache:metrics"),G=c.tracingChannel("lru-cache")}).catch(()=>{});var xi=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,he=()=>w.hasSubscribers||G.hasSubscribers,et=new Set,Te=process||{},Ai=(c,e,t,i)=>{typeof Te.emitWarning=="function"?Te.emitWarning(c,e,t,i):console.error(`[${t}] ${e}: ${c}`)},Ei=c=>!et.has(c),T=c=>!!c&&c===Math.floor(c)&&c>0&&isFinite(c),tt=c=>T(c)?c<=Math.pow(2,8)?Uint8Array:c<=Math.pow(2,16)?Uint16Array:c<=Math.pow(2,32)?Uint32Array:c<=Number.MAX_SAFE_INTEGER?V:null:null,V=class extends Array{constructor(c){super(c),this.fill(0)}},$i=class _{heap;length;static#s=!1;static create(e){let t=tt(e);if(!t)return[];_.#s=!0;let i=new _(e,t);return _.#s=!1,i}constructor(e,t){if(!_.#s)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Oi=class it{#s;#c;#t;#$;#L;#B;#R;#S;get perf(){return this.#S}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#o;#v;#n;#r;#e;#u;#f;#h;#a;#y;#l;#b;#C;#d;#m;#P;#I;#p;#O;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#d,autopurgeTimers:e.#m,sizes:e.#b,keyMap:e.#n,keyList:e.#r,valList:e.#e,next:e.#u,prev:e.#f,get head(){return e.#h},get tail(){return e.#a},free:e.#y,isBackgroundFetch:t=>e.#i(t),backgroundFetch:(t,i,s,r)=>e.#M(t,i,s,r),moveToTail:t=>e.#G(t),indexes:t=>e.#D(t),rindexes:t=>e.#w(t),isStale:t=>e.#g(t)}}get max(){return this.#s}get maxSize(){return this.#c}get calculatedSize(){return this.#v}get size(){return this.#o}get fetchMethod(){return this.#B}get memoMethod(){return this.#R}get dispose(){return this.#t}get onInsert(){return this.#$}get disposeAfter(){return this.#L}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:n,allowStale:a,dispose:u,onInsert:f,disposeAfter:g,noDisposeOnSet:v,noUpdateTTL:y,maxSize:b=0,maxEntrySize:m=0,sizeCalculation:L,fetchMethod:h,memoMethod:S,noDeleteOnFetchRejection:C,noDeleteOnStaleGet:l,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:d,ignoreFetchAbort:P,backgroundFetchSize:D=1,perf:A}=e;if(this.backgroundFetchSize=D,A!==void 0&&typeof A?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#S=A??xi,t!==0&&!T(t))throw new TypeError("max option must be a nonnegative integer");let E=t?tt(t):Array;if(!E)throw new Error("invalid max value: "+t);if(this.#s=t,this.#c=b,this.maxEntrySize=m||this.#c,this.sizeCalculation=L,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=S,h!==void 0&&typeof h!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#B=h,this.#I=!!h,this.#n=new Map,this.#r=Array.from({length:t}).fill(void 0),this.#e=Array.from({length:t}).fill(void 0),this.#u=new E(t),this.#f=new E(t),this.#h=0,this.#a=0,this.#y=$i.create(t),this.#o=0,this.#v=0,typeof u=="function"&&(this.#t=u),typeof f=="function"&&(this.#$=f),typeof g=="function"?(this.#L=g,this.#l=[]):(this.#L=void 0,this.#l=void 0),this.#P=!!this.#t,this.#O=!!this.#$,this.#p=!!this.#L,this.noDisposeOnSet=!!v,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!C,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!d,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(this.#c!==0&&!T(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!T(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!l,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!n,this.ttlResolution=T(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!T(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#j()}if(this.#s===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#s&&!this.#c){let ee="LRU_CACHE_UNBOUNDED";Ei(ee)&&(et.add(ee),Ai("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ee,it))}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#j(){let e=new V(this.#s),t=new V(this.#s);this.#d=e,this.#C=t;let i=this.ttlAutopurge?Array.from({length:this.#s}):void 0;this.#m=i,this.#W=(n,a,u=this.#S.now())=>{t[n]=a!==0?u:0,e[n]=a,s(n,a)},this.#N=n=>{t[n]=e[n]!==0?this.#S.now():0,s(n,e[n])};let s=this.ttlAutopurge?(n,a)=>{if(i?.[n]&&(clearTimeout(i[n]),i[n]=void 0),a&&a!==0&&i){let u=setTimeout(()=>{this.#g(n)&&this.#x(this.#r[n],"expire")},a+1);u.unref&&u.unref(),i[n]=u}}:()=>{};this.#A=(n,a)=>{if(e[a]){let u=e[a],f=t[a];if(!u||!f)return;n.ttl=u,n.start=f,n.now=r||o();let g=n.now-f;n.remainingTTL=u-g}};let r=0,o=()=>{let n=this.#S.now();if(this.ttlResolution>0){r=n;let a=setTimeout(()=>r=0,this.ttlResolution);a.unref&&a.unref()}return n};this.getRemainingTTL=n=>{let a=this.#n.get(n);if(a===void 0)return 0;let u=e[a],f=t[a];if(!u||!f)return 1/0;let g=(r||o())-f;return u-g},this.#g=n=>{let a=t[n],u=e[n];return!!u&&!!a&&(r||o())-a>u}}#N=()=>{};#A=()=>{};#W=()=>{};#g=()=>!1;#V(){let e=new V(this.#s);this.#v=0,this.#b=e,this.#F=t=>{this.#v-=e[t],e[t]=0},this.#_=(t,i,s,r)=>{if(!T(s)){if(this.#i(i))return this.backgroundFetchSize;if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,t),!T(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return s},this.#k=(t,i,s)=>{if(e[t]=i,this.#c){let r=this.#c-e[t];for(;this.#v>r;)this.#U(!0)}this.#v+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#v)}}#F=e=>{};#k=(e,t,i)=>{};#_=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#D({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#a;this.#H(t)&&((e||!this.#g(t))&&(yield t),t!==this.#h);)t=this.#f[t]}*#w({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#h;this.#H(t)&&((e||!this.#g(t))&&(yield t),t!==this.#a);)t=this.#u[t]}#H(e){return e!==void 0&&this.#n.get(this.#r[e])===e}*entries(){for(let e of this.#D())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#i(this.#e[e])&&(yield[this.#r[e],this.#e[e]])}*rentries(){for(let e of this.#w())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#i(this.#e[e])&&(yield[this.#r[e],this.#e[e]])}*keys(){for(let e of this.#D()){let t=this.#r[e];t!==void 0&&!this.#i(this.#e[e])&&(yield t)}}*rkeys(){for(let e of this.#w()){let t=this.#r[e];t!==void 0&&!this.#i(this.#e[e])&&(yield t)}}*values(){for(let e of this.#D())this.#e[e]!==void 0&&!this.#i(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#w())this.#e[e]!==void 0&&!this.#i(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#D()){let s=this.#e[i],r=this.#i(s)?s.__staleWhileFetching:s;if(r!==void 0&&e(r,this.#r[i],this))return this.#T(this.#r[i],t)}}forEach(e,t=this){for(let i of this.#D()){let s=this.#e[i],r=this.#i(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#r[i],this)}}rforEach(e,t=this){for(let i of this.#w()){let s=this.#e[i],r=this.#i(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#r[i],this)}}purgeStale(){let e=!1;for(let t of this.#w({allowStale:!0}))this.#g(t)&&(this.#x(this.#r[t],"expire"),e=!0);return e}info(e){let t=this.#n.get(e);if(t===void 0)return;let i=this.#e[t],s=this.#i(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#d&&this.#C){let o=this.#d[t],n=this.#C[t];if(o&&n){let a=o-(this.#S.now()-n);r.ttl=a,r.start=Date.now()}}return this.#b&&(r.size=this.#b[t]),r}dump(){let e=[];for(let t of this.#D({allowStale:!0})){let i=this.#r[t],s=this.#e[t],r=this.#i(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let o={value:r};if(this.#d&&this.#C){o.ttl=this.#d[t];let n=this.#S.now()-this.#C[t];o.start=Math.floor(Date.now()-n)}this.#b&&(o.size=this.#b[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=this.#S.now()-s}this.#E(t,i.value,i)}}set(e,t,i={}){let{status:s=w.hasSubscribers?{}:void 0}=i;i.status=s,s&&(s.op="set",s.key=e,t!==void 0&&(s.value=t),s.cache=this);let r=this.#E(e,t,i);return s&&w.hasSubscribers&&w.publish(s),r}#E(e,t,i,s){let{ttl:r=this.ttl,start:o,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=i,f=this.#i(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:g=this.noUpdateTTL}=i;u&&!f&&(u.value=t);let v=this.#_(e,t,i.size||0,a,u);if(this.maxEntrySize&&v>this.maxEntrySize)return this.#x(e,"set"),u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this;let y=this.#o===0?void 0:this.#n.get(e);if(y===void 0)y=this.#o===0?this.#a:this.#y.length!==0?this.#y.pop():this.#o===this.#s?this.#U(!1):this.#o,this.#r[y]=e,this.#e[y]=t,this.#n.set(e,y),this.#u[this.#a]=y,this.#f[y]=this.#a,this.#a=y,this.#o++,this.#k(y,v,u),u&&(u.set="add"),g=!1,this.#O&&!f&&this.#$?.(t,e,"add");else{this.#G(y);let b=this.#e[y];if(t!==b){if(!n)if(this.#i(b)){b!==s&&b.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=b;m!==void 0&&m!==t&&(this.#P&&this.#t?.(m,e,"set"),this.#p&&this.#l?.push([m,e,"set"]))}else this.#P&&this.#t?.(b,e,"set"),this.#p&&this.#l?.push([b,e,"set"]);if(this.#F(y),this.#k(y,v,u),this.#e[y]=t,!f){let m=b&&this.#i(b)?b.__staleWhileFetching:b,L=m===void 0?"add":t!==m?"replace":"update";u&&(u.set=L,m!==void 0&&(u.oldValue=m)),this.#O&&this.onInsert?.(t,e,L)}}else f||(u&&(u.set="update"),this.#O&&this.onInsert?.(t,e,"update"))}if(r!==0&&!this.#d&&this.#j(),this.#d&&(g||this.#W(y,r,o),u&&this.#A(u,y)),!n&&this.#p&&this.#l){let b=this.#l,m;for(;m=b?.shift();)this.#L?.(...m)}return this}pop(){try{for(;this.#o;){let e=this.#e[this.#h];if(this.#U(!0),this.#i(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#l){let e=this.#l,t;for(;t=e?.shift();)this.#L?.(...t)}}}#U(e){let t=this.#h,i=this.#r[t],s=this.#e[t],r=this.#i(s);r&&s.__abortController.abort(new Error("evicted"));let o=r?s.__staleWhileFetching:s;return(this.#P||this.#p)&&o!==void 0&&(this.#P&&this.#t?.(o,i,"evict"),this.#p&&this.#l?.push([o,i,"evict"])),this.#F(t),this.#m?.[t]&&(clearTimeout(this.#m[t]),this.#m[t]=void 0),e&&(this.#r[t]=void 0,this.#e[t]=void 0,this.#y.push(t)),this.#o===1?(this.#h=this.#a=0,this.#y.length=0):this.#h=this.#u[t],this.#n.delete(i),this.#o--,t}has(e,t={}){let{status:i=w.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="has",i.key=e,i.cache=this);let s=this.#K(e,t);return w.hasSubscribers&&w.publish(i),s}#K(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,r=this.#n.get(e);if(r!==void 0){let o=this.#e[r];if(this.#i(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#g(r))s&&(s.has="stale",this.#A(s,r));else return i&&this.#N(r),s&&(s.has="hit",this.#A(s,r)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{status:i=he()?{}:void 0}=t;i&&(i.op="peek",i.key=e,i.cache=this),t.status=i;let s=this.#J(e,t);return w.hasSubscribers&&w.publish(i),s}#J(e,t){let{status:i,allowStale:s=this.allowStale}=t,r=this.#n.get(e);if(r===void 0||!s&&this.#g(r)){i&&(i.peek=r===void 0?"miss":"stale");return}let o=this.#e[r],n=this.#i(o)?o.__staleWhileFetching:o;return i&&(n!==void 0?(i.peek="hit",i.value=n):i.peek="miss"),n}#M(e,t,i,s){let r=t===void 0?void 0:this.#e[t];if(this.#i(r))return r;let o=new AbortController,{signal:n}=i;n?.addEventListener("abort",()=>o.abort(n.reason),{signal:o.signal});let a={signal:o.signal,options:i,context:s},u=(m,L=!1)=>{let{aborted:h}=o.signal,S=i.ignoreFetchAbort&&m!==void 0,C=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&m!==void 0);if(i.status&&(h&&!L?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),h&&!S&&!L)return g(o.signal.reason,C);let l=y,p=this.#e[t];return(p===y||p===void 0&&S&&L)&&(m===void 0?l.__staleWhileFetching!==void 0?this.#e[t]=l.__staleWhileFetching:this.#x(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#E(e,m,a.options,l))),m},f=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),g(m,!1)),g=(m,L)=>{let{aborted:h}=o.signal,S=h&&i.allowStaleOnFetchAbort,C=S||i.allowStaleOnFetchRejection,l=C||i.noDeleteOnFetchRejection,p=y;if(this.#e[t]===y&&(!l||!L&&p.__staleWhileFetching===void 0?this.#x(e,"fetch"):S||(this.#e[t]=p.__staleWhileFetching)),C)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw m},v=(m,L)=>{let h=this.#B?.(e,r,a);o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=S=>u(S,!0)))}),h&&h instanceof Promise?h.then(S=>m(S===void 0?void 0:S),L):h!==void 0&&m(h)};i.status&&(i.status.fetchDispatched=!0);let y=new Promise(v).then(u,f),b=Object.assign(y,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return t===void 0?(this.#E(e,b,{...a.options,status:void 0}),t=this.#n.get(e)):this.#e[t]=b,b}#i(e){if(!this.#I)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let i=G.hasSubscribers,{status:s=he()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let r=this.#z(e,t);return s&&i&&(s.trace=!0,G.tracePromise(()=>r,s).catch(()=>{})),r}async#z(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:n=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:v=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:b=this.allowStaleOnFetchAbort,context:m,forceRefresh:L=!1,status:h,signal:S}=t;if(h&&(h.op="fetch",h.key=e,L&&(h.forceRefresh=!0),h.cache=this),!this.#I)return h&&(h.fetch="get"),this.#T(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:h});let C={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:n,size:a,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:v,allowStaleOnFetchAbort:b,ignoreFetchAbort:y,status:h,signal:S},l=this.#n.get(e);if(l===void 0){h&&(h.fetch="miss");let p=this.#M(e,l,C,m);return p.__returned=p}else{let p=this.#e[l];if(this.#i(p)){let A=i&&p.__staleWhileFetching!==void 0;return h&&(h.fetch="inflight",A&&(h.returnedStale=!0)),A?p.__staleWhileFetching:p.__returned=p}let d=this.#g(l);if(!L&&!d)return h&&(h.fetch="hit"),this.#G(l),s&&this.#N(l),h&&this.#A(h,l),p;let P=this.#M(e,l,C,m),D=P.__staleWhileFetching!==void 0&&i;return h&&(h.fetch=d?"stale":"refresh",D&&d&&(h.returnedStale=!0)),D?P.__staleWhileFetching:P.__returned=P}}forceFetch(e,t={}){let i=G.hasSubscribers,{status:s=he()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let r=this.#X(e,t);return s&&i&&(s.trace=!0,G.tracePromise(()=>r,s).catch(()=>{})),r}async#X(e,t={}){let i=await this.#z(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let{status:i=w.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="memo",i.key=e,t.context&&(i.context=t.context),i.cache=this);let s=this.#Z(e,t);return i&&(i.value=s),w.hasSubscribers&&w.publish(i),s}#Z(e,t={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,status:r,forceRefresh:o,...n}=t;r&&o&&(r.forceRefresh=!0);let a=this.#T(e,n),u=o||a===void 0;if(r&&(r.memo=u?"miss":"hit",u||(r.value=a)),!u)return a;let f=i(e,a,{options:n,context:s});return r&&(r.value=f),this.#E(e,f,n),f}get(e,t={}){let{status:i=w.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="get",i.key=e,i.cache=this);let s=this.#T(e,t);return i&&(s!==void 0&&(i.value=s),w.hasSubscribers&&w.publish(i)),s}#T(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=t,n=this.#n.get(e);if(n===void 0){o&&(o.get="miss");return}let a=this.#e[n],u=this.#i(a);return o&&this.#A(o,n),this.#g(n)?u?(o&&(o.get="stale-fetching"),i&&a.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),a.__staleWhileFetching):void 0):(r||this.#x(e,"expire"),o&&(o.get="stale"),i?(o&&(o.returnedStale=!0),a):void 0):(o&&(o.get=u?"fetching":"hit"),this.#G(n),s&&this.#N(n),u?a.__staleWhileFetching:a)}#Y(e,t){this.#f[t]=e,this.#u[e]=t}#G(e){e!==this.#a&&(e===this.#h?this.#h=this.#u[e]:this.#Y(this.#f[e],this.#u[e]),this.#Y(this.#a,e),this.#a=e)}delete(e){return this.#x(e,"delete")}#x(e,t){w.hasSubscribers&&w.publish({op:"delete",delete:t,key:e,cache:this});let i=!1;if(this.#o!==0){let s=this.#n.get(e);if(s!==void 0)if(this.#m?.[s]&&(clearTimeout(this.#m?.[s]),this.#m[s]=void 0),i=!0,this.#o===1)this.#q(t);else{this.#F(s);let r=this.#e[s];if(this.#i(r)?r.__abortController.abort(new Error("deleted")):(this.#P||this.#p)&&(this.#P&&this.#t?.(r,e,t),this.#p&&this.#l?.push([r,e,t])),this.#n.delete(e),this.#r[s]=void 0,this.#e[s]=void 0,s===this.#a)this.#a=this.#f[s];else if(s===this.#h)this.#h=this.#u[s];else{let o=this.#f[s];this.#u[o]=this.#u[s];let n=this.#u[s];this.#f[n]=this.#f[s]}this.#o--,this.#y.push(s)}}if(this.#p&&this.#l?.length){let s=this.#l,r;for(;r=s?.shift();)this.#L?.(...r)}return i}clear(){return this.#q("delete")}#q(e){for(let t of this.#w({allowStale:!0})){let i=this.#e[t];if(this.#i(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#r[t];this.#P&&this.#t?.(i,s,e),this.#p&&this.#l?.push([i,s,e])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#d&&this.#C){this.#d.fill(0),this.#C.fill(0);for(let t of this.#m??[])t!==void 0&&clearTimeout(t);this.#m?.fill(void 0)}if(this.#b&&this.#b.fill(0),this.#h=0,this.#a=0,this.#y.length=0,this.#v=0,this.#o=0,this.#p&&this.#l){let t=this.#l,i;for(;i=t?.shift();)this.#L?.(...i)}}};const Ni=Object.defineProperty({__proto__:null,LRUCache:Oi},Symbol.toStringTag,{value:"Module"}),Fi=ve(Ni);var ue,Ge;function Ti(){if(Ge)return ue;Ge=1;const c=(...r)=>r.every(o=>o)?r.join(""):"",e=r=>r?encodeURIComponent(r):"",t=r=>r.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),i={sshtemplate:({domain:r,user:o,project:n,committish:a})=>`git@${r}:${o}/${n}.git${c("#",a)}`,sshurltemplate:({domain:r,user:o,project:n,committish:a})=>`git+ssh://git@${r}/${o}/${n}.git${c("#",a)}`,edittemplate:({domain:r,user:o,project:n,committish:a,editpath:u,path:f})=>`https://${r}/${o}/${n}${c("/",u,"/",e(a||"HEAD"),"/",f)}`,browsetemplate:({domain:r,user:o,project:n,committish:a,treepath:u})=>`https://${r}/${o}/${n}${c("/",u,"/",e(a))}`,browsetreetemplate:({domain:r,user:o,project:n,committish:a,treepath:u,path:f,fragment:g,hashformat:v})=>`https://${r}/${o}/${n}/${u}/${e(a||"HEAD")}/${f}${c("#",v(g||""))}`,browseblobtemplate:({domain:r,user:o,project:n,committish:a,blobpath:u,path:f,fragment:g,hashformat:v})=>`https://${r}/${o}/${n}/${u}/${e(a||"HEAD")}/${f}${c("#",v(g||""))}`,docstemplate:({domain:r,user:o,project:n,treepath:a,committish:u})=>`https://${r}/${o}/${n}${c("/",a,"/",e(u))}#readme`,httpstemplate:({auth:r,domain:o,user:n,project:a,committish:u})=>`git+https://${c(r,"@")}${o}/${n}/${a}.git${c("#",u)}`,filetemplate:({domain:r,user:o,project:n,committish:a,path:u})=>`https://${r}/${o}/${n}/raw/${e(a||"HEAD")}/${u}`,shortcuttemplate:({type:r,user:o,project:n,committish:a})=>`${r}:${o}/${n}${c("#",a)}`,pathtemplate:({user:r,project:o,committish:n})=>`${r}/${o}${c("#",n)}`,bugstemplate:({domain:r,user:o,project:n})=>`https://${r}/${o}/${n}/issues`,hashformat:t},s={};s.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:r,user:o,project:n,committish:a,path:u})=>`https://${c(r,"@")}raw.githubusercontent.com/${o}/${n}/${e(a||"HEAD")}/${u}`,gittemplate:({auth:r,domain:o,user:n,project:a,committish:u})=>`git://${c(r,"@")}${o}/${n}/${a}.git${c("#",u)}`,tarballtemplate:({domain:r,user:o,project:n,committish:a})=>`https://codeload.${r}/${o}/${n}/tar.gz/${e(a||"HEAD")}`,extract:r=>{let[,o,n,a,u]=r.pathname.split("/",5);if(!(a&&a!=="tree")&&(a||(u=r.hash.slice(1)),n&&n.endsWith(".git")&&(n=n.slice(0,-4)),!(!o||!n)))return{user:o,project:n,committish:u}}},s.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:r,user:o,project:n,committish:a,treepath:u,path:f,editpath:g})=>`https://${r}/${o}/${n}${c("/",u,"/",e(a||"HEAD"),"/",f,g)}`,tarballtemplate:({domain:r,user:o,project:n,committish:a})=>`https://${r}/${o}/${n}/get/${e(a||"HEAD")}.tar.gz`,extract:r=>{let[,o,n,a]=r.pathname.split("/",4);if(!["get"].includes(a)&&(n&&n.endsWith(".git")&&(n=n.slice(0,-4)),!(!o||!n)))return{user:o,project:n,committish:r.hash.slice(1)}}},s.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:({domain:r,user:o,project:n,committish:a})=>`https://${r}/api/v4/projects/${e(o+"/"+n)}/repository/archive.tar.gz?sha=${e(a||"HEAD")}`,extract:r=>{const o=r.pathname.slice(1);if(o.includes("/-/")||o.includes("/archive.tar.gz"))return;const n=o.split("/");let a=n.pop();a.endsWith(".git")&&(a=a.slice(0,-4));const u=n.join("/");if(!(!u||!a))return{user:u,project:a,committish:r.hash.slice(1)}}},s.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:r,project:o,committish:n})=>`git@${r}:${o}.git${c("#",n)}`,sshurltemplate:({domain:r,project:o,committish:n})=>`git+ssh://git@${r}/${o}.git${c("#",n)}`,edittemplate:({domain:r,user:o,project:n,committish:a,editpath:u})=>`https://${r}/${o}/${n}${c("/",e(a))}/${u}`,browsetemplate:({domain:r,project:o,committish:n})=>`https://${r}/${o}${c("/",e(n))}`,browsetreetemplate:({domain:r,project:o,committish:n,path:a,hashformat:u})=>`https://${r}/${o}${c("/",e(n))}${c("#",u(a))}`,browseblobtemplate:({domain:r,project:o,committish:n,path:a,hashformat:u})=>`https://${r}/${o}${c("/",e(n))}${c("#",u(a))}`,docstemplate:({domain:r,project:o,committish:n})=>`https://${r}/${o}${c("/",e(n))}`,httpstemplate:({domain:r,project:o,committish:n})=>`git+https://${r}/${o}.git${c("#",n)}`,filetemplate:({user:r,project:o,committish:n,path:a})=>`https://gist.githubusercontent.com/${r}/${o}/raw${c("/",e(n))}/${a}`,shortcuttemplate:({type:r,project:o,committish:n})=>`${r}:${o}${c("#",n)}`,pathtemplate:({project:r,committish:o})=>`${r}${c("#",o)}`,bugstemplate:({domain:r,project:o})=>`https://${r}/${o}`,gittemplate:({domain:r,project:o,committish:n})=>`git://${r}/${o}.git${c("#",n)}`,tarballtemplate:({project:r,committish:o})=>`https://codeload.github.com/gist/${r}/tar.gz/${e(o||"HEAD")}`,extract:r=>{let[,o,n,a]=r.pathname.split("/",4);if(a!=="raw"){if(!n){if(!o)return;n=o,o=null}return n.endsWith(".git")&&(n=n.slice(0,-4)),{user:o,project:n,committish:r.hash.slice(1)}}},hashformat:function(r){return r&&"file-"+t(r)}},s.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:r,user:o,project:n,committish:a,path:u})=>`https://${r}/${o}/${n}/blob/${e(a)||"HEAD"}/${u}`,httpstemplate:({domain:r,user:o,project:n,committish:a})=>`https://${r}/${o}/${n}${c("#",a)}`,tarballtemplate:({domain:r,user:o,project:n,committish:a})=>`https://${r}/${o}/${n}/archive/${e(a)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:r=>{let[,o,n,a]=r.pathname.split("/",4);if(!["archive"].includes(a)&&(n&&n.endsWith(".git")&&(n=n.slice(0,-4)),!(!o||!n)))return{user:o,project:n,committish:r.hash.slice(1)}}};for(const[r,o]of Object.entries(s))s[r]=Object.assign({},i,o);return ue=s,ue}var pe,Be;function rt(){if(Be)return pe;Be=1;const c=(s,r,o)=>{const n=s.indexOf(o);return s.lastIndexOf(r,n>-1?n:1/0)},e=s=>{try{return new URL(s)}catch{}},t=(s,r)=>{const o=s.indexOf(":"),n=s.slice(0,o+1);if(Object.prototype.hasOwnProperty.call(r,n)||s.substr(o,3)==="://")return s;const a=s.indexOf("@");return a>-1?a>o?`git+ssh://${s}`:s:`${s.slice(0,o+1)}//${s.slice(o+1)}`},i=s=>{const r=c(s,"@","#"),o=c(s,":","#");return o>r&&(s=s.slice(0,o)+"/"+s.slice(o+1)),c(s,":","#")===-1&&s.indexOf("//")===-1&&(s=`git+ssh://${s}`),s};return pe=(s,r)=>{const o=r?t(s,r):s;return e(o)||e(i(o))},pe}var fe,Re;function Gi(){if(Re)return fe;Re=1;const c=rt(),e=t=>{const i=t.indexOf("#"),s=t.indexOf("/"),r=t.indexOf("/",s+1),o=t.indexOf(":"),n=/\s/.exec(t),a=t.indexOf("@"),u=!n||i>-1&&n.index>i,f=a===-1||i>-1&&a>i,g=o===-1||i>-1&&o>i,v=r===-1||i>-1&&r>i,y=s>0,b=i>-1?t[i-1]!=="/":!t.endsWith("/"),m=!t.startsWith(".");return u&&y&&b&&m&&f&&g&&v};return fe=(t,i,{gitHosts:s,protocols:r})=>{if(!t)return;const o=e(t)?`github:${t}`:t,n=c(o,r);if(!n)return;const a=s.byShortcut[n.protocol],u=s.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],f=a||u;if(!f)return;const g=s[a||u];let v=null;r[n.protocol]?.auth&&(n.username||n.password)&&(v=`${n.username}${n.password?":"+n.password:""}`);let y=null,b=null,m=null,L=null;try{if(a){let h=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname;const S=h.indexOf("@");S>-1&&(h=h.slice(S+1));const C=h.lastIndexOf("/");C>-1?(b=decodeURIComponent(h.slice(0,C)),b||(b=null),m=decodeURIComponent(h.slice(C+1))):m=decodeURIComponent(h),m.endsWith(".git")&&(m=m.slice(0,-4)),n.hash&&(y=decodeURIComponent(n.hash.slice(1))),L="shortcut"}else{if(!g.protocols.includes(n.protocol))return;const h=g.extract(n);if(!h)return;b=h.user&&decodeURIComponent(h.user),m=decodeURIComponent(h.project),y=decodeURIComponent(h.committish),L=r[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(h){if(h instanceof URIError)return;throw h}return[f,b,v,m,y,L,i]},fe}var de,Ie;function Bi(){if(Ie)return de;Ie=1;const{LRUCache:c}=Fi,e=Ti(),t=Gi(),i=rt(),s=new c({max:1e3});function r(n){try{const{protocol:a,hostname:u,pathname:f}=new URL(n);if(!u)return null;const g=/(?:git\+)http:$/.test(a)?"http:":"https:",v=f.replace(/\.git$/,"");return`${g}//${u}${v}`}catch{return null}}class o{constructor(a,u,f,g,v,y,b={}){Object.assign(this,o.#s[a],{type:a,user:u,auth:f,project:g,committish:v,default:y,opts:b})}static#s={byShortcut:{},byDomain:{}};static#c={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(a,u){o.#s[a]=u,o.#s.byDomain[u.domain]=a,o.#s.byShortcut[`${a}:`]=a,o.#c[`${a}:`]={name:a}}static fromUrl(a,u){if(typeof a!="string")return;const f=a+JSON.stringify(u||{});if(!s.has(f)){const g=t(a,u,{gitHosts:o.#s,protocols:o.#c});s.set(f,g?new o(...g):void 0)}return s.get(f)}static fromManifest(a,u={}){if(!a||typeof a!="object")return;const f=a.repository,g=f&&(typeof f=="string"?f:typeof f=="object"&&typeof f.url=="string"?f.url:null);if(!g)throw new Error("no repository");const v=g&&o.fromUrl(g.replace(/^git\+/,""),u)||null;if(v)return v;const y=r(g);return o.fromUrl(y,u)||y}static parseUrl(a){return i(a)}#t(a,u){if(typeof a!="function")return null;const f={...this,...this.opts,...u};f.path||(f.path=""),f.path.startsWith("/")&&(f.path=f.path.slice(1)),f.noCommittish&&(f.committish=null);const g=a(f);return f.noGitPlus&&g.startsWith("git+")?g.slice(4):g}hash(){return this.committish?`#${this.committish}`:""}ssh(a){return this.#t(this.sshtemplate,a)}sshurl(a){return this.#t(this.sshurltemplate,a)}browse(a,...u){return typeof a!="string"?this.#t(this.browsetemplate,a):typeof u[0]!="string"?this.#t(this.browsetreetemplate,{...u[0],path:a}):this.#t(this.browsetreetemplate,{...u[1],fragment:u[0],path:a})}browseFile(a,...u){return typeof u[0]!="string"?this.#t(this.browseblobtemplate,{...u[0],path:a}):this.#t(this.browseblobtemplate,{...u[1],fragment:u[0],path:a})}docs(a){return this.#t(this.docstemplate,a)}bugs(a){return this.#t(this.bugstemplate,a)}https(a){return this.#t(this.httpstemplate,a)}git(a){return this.#t(this.gittemplate,a)}shortcut(a){return this.#t(this.shortcuttemplate,a)}path(a){return this.#t(this.pathtemplate,a)}tarball(a){return this.#t(this.tarballtemplate,{...a,noCommittish:!1})}file(a,u){return this.#t(this.filetemplate,{...u,path:a})}edit(a,u){return this.#t(this.edittemplate,{...u,path:a})}getDefaultRepresentation(){return this.default}toString(a){return this.default&&typeof this[this.default]=="function"?this[this.default](a):this.sshurl(a)}}for(const[n,a]of Object.entries(e))o.addHost(n,a);return de=o,de}var me,ke;function Ri(){if(ke)return me;ke=1,me=c;function c(e){if(!e||e==="ERROR: No README data found!")return;e=e.trim().split(`
1
+ import{createRequire as Bt}from"node:module";import{F as X,m as B,e as K,H as $,u as He,y as Ut,v as Mt,i as jt}from"./index-2LCHaVNX.js";import{N as Wt,a as ze}from"./readJsonSync-DuMMeB3s-B9cGBVbJ.js";import"./public-api-WqUCiyIe.js";import{a as ve,g as _t}from"./_commonjsHelpers-B5Y90VFO.js";import{r as Ht,a as zt}from"./clean-DWjQl14S.js";const Rt=Bt(import.meta.url),I=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=c=>{if(typeof I<"u"&&I.versions&&I.versions.node){const[e,t]=I.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return I.getBuiltinModule(c)}return Rt(c)},{dirname:It}=J("node:path"),We=J("node:url"),{fileURLToPath:kt}=We,_e=J("node:module"),{createRequire:Y}=_e,Yt=J("util"),O=c=>"Deno"in c,N=c=>"Bun"in c,vr=()=>{if(O(globalThis)){const c=globalThis.Deno,e=c.execPath();let t=e;try{const{importMeta:i}=globalThis;i?.url&&(t=i.url)}catch{}return[e,t,...c.args]}return N(globalThis)?globalThis.Bun.process.argv:process.argv},yr=()=>O(globalThis)?globalThis.Deno.cwd():N(globalThis)?globalThis.Bun.process.cwd():process.cwd(),br=()=>{if(O(globalThis)){const c=globalThis.Deno;return new Proxy(c.env.toObject(),{get:(e,t)=>typeof t=="string"?c.env.get(t):e[t],has:(e,t)=>typeof t=="string"?c.env.has(t):t in e,set:(e,t,i)=>typeof t=="string"?(i===void 0||c.env.set(t,i),!0):!1})}return N(globalThis)?globalThis.Bun.process.env:process.env},Cr=()=>O(globalThis)?[]:N(globalThis)?globalThis.Bun.process.execArgv:process.execArgv,Pr=()=>O(globalThis)?globalThis.Deno.execPath():N(globalThis)?globalThis.Bun.process.execPath:process.execPath,Dr=()=>{if(O(globalThis)){const c=globalThis.Deno.build?.os??"unknown";return c==="windows"?"win32":c}return N(globalThis)?globalThis.Bun.platform??"unknown":process.platform},wr=()=>{if(O(globalThis)){const c=globalThis.Deno.build?.arch??"unknown";return c==="x86_64"?"x64":c==="aarch64"?"arm64":c}return N(globalThis)?globalThis.Bun.process.arch:process.arch},xr=(c=0)=>{if(O(globalThis))throw globalThis.Deno.exit(c),new Error("Deno exit failed");if(N(globalThis))throw globalThis.Bun.process.exit(c),new Error("Bun exit failed");process.exit(c)},Ar=(c,e)=>{if(O(globalThis))return()=>{};if(N(globalThis)){try{const i=globalThis.Bun;if(i.process?.on)return i.process.on(c,e),()=>{i.process?.removeListener&&i.process.removeListener(c,e)}}catch{}return()=>{}}const t=process;return t.on(c,e),()=>{t.removeListener(c,e)}},qt=Y(import.meta.url),k=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ye=c=>{if(typeof k<"u"&&k.versions&&k.versions.node){const[e,t]=k.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return k.getBuiltinModule(c)}return qt(c)},{execFileSync:Vt}=Ye("node:child_process"),{existsSync:be,readFileSync:Kt}=Ye("node:fs"),Jt=["yarn.lock","package-lock.json","pnpm-lock.yaml","npm-shrinkwrap.json","bun.lock","bun.lockb"],Ce=new Set(["bun","npm","pnpm","yarn"]),qe=c=>{const e=Wt(Kt(c,"utf8"));return typeof e?.packageManager=="string"?e.packageManager:void 0},Xt=c=>{let e;if(Jt.forEach(i=>{!e&&be(B(c,i))&&(e=B(c,i))}),e)return e;const t=B(c,"package.json");if(be(t)&&qe(t)!==void 0)return t},Zt=c=>{if(!c)throw new K("Could not find a package manager");if(c.endsWith("package.json")){const e=qe(c);if(e){const t=["npm","yarn","pnpm","bun"].find(i=>e.startsWith(i));if(t)return{packageManager:t,path:$(c)}}}if(c.endsWith("yarn.lock"))return{packageManager:"yarn",path:$(c)};if(c.endsWith("package-lock.json")||c.endsWith("npm-shrinkwrap.json"))return{packageManager:"npm",path:$(c)};if(c.endsWith("pnpm-lock.yaml"))return{packageManager:"pnpm",path:$(c)};if(c.endsWith("bun.lock")||c.endsWith("bun.lockb"))return{packageManager:"bun",path:$(c)};throw new K("Could not find a package manager")},Qt=c=>{const e=X(Xt,{...c&&{cwd:c}});return Zt(e)},Er=c=>{if(!Ce.has(c))throw new Error(`Unsupported package manager "${c}". Expected one of: ${[...Ce].join(", ")}.`);return Vt(c,["--version"]).toString("utf8").trim()},ei=Y(import.meta.url),U=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ve=c=>{if(typeof U<"u"&&U.versions&&U.versions.node){const[e,t]=U.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return U.getBuiltinModule(c)}return ei(c)};Ve("node:fs");Ve("node:fs/promises");const ti={sha256:"sha256",sha384:"sha384",sha512:"sha512"},ii=1024,ri=/^[A-Z0-9+/]+={0,2}$/i,Pe="node_modules/",H=/^['"]/,z=/['"]$/,si=/^[a-z][a-zA-Z0-9]*:\s*$/m,ni=/resolution:\s*\{[^}]*integrity:\s*([^,}\s]+)/,oi=/^["']?((?:@[^/@"']+\/)?[^@"'\n]+)@[^\n]+\n((?:[\t ][^\n]*(?:\n|$))+)/gm,ai=/^\s+version:?\s+"?([^"\n]+)"?/m,li=/^\s+integrity[\s:]+"?([^"\s]+)"?/m,Z=c=>{if(c.length>ii)return;const e=c.indexOf("-");if(e<=0)return;const t=ti[c.slice(0,e).toLowerCase()];if(!t)return;const i=c.slice(e+1);if(ri.test(i))try{const s=Buffer.from(i,"base64");return s.length===0?void 0:{algorithm:t,hex:s.toString("hex")}}catch{return}},Q=(c,e,t)=>{const i=`${t.name}@${t.version}`;e.has(i)||(e.add(i),c.push(t))},x=(c,e,t)=>{t&&Object.keys(t).length>0&&(c[e]={...t})},R=c=>{if(!c)return;const e={};for(const[t,i]of Object.entries(c))e[t]=[i];return Object.keys(e).length>0?e:void 0},ci=c=>{const e=[],t=new Set;let i;try{i=JSON.parse(c)}catch{return e}if(!i.packages)return e;for(const[s,r]of Object.entries(i.packages)){if(!s||!r.version)continue;const o=s.lastIndexOf(Pe);if(o===-1)continue;const n=s.slice(o+Pe.length);if(n.length===0)continue;const a=n.split("/"),u=n.startsWith("@")?2:1;if(a.length!==u||a.some(v=>v.length===0))continue;const f=r.name??n;if(f.startsWith("."))continue;const g={name:f,version:r.version};if(r.integrity){const v=Z(r.integrity);v&&(g.integrity=v)}x(g,"dependencies",R(r.dependencies)),x(g,"peerDependencies",R(r.peerDependencies)),x(g,"optionalDependencies",R(r.optionalDependencies)),Q(e,t,g)}return e},Ke=c=>{let e=c.trim();e.startsWith("/")&&(e=e.slice(1)),e=e.replace(H,"").replace(z,"");const t=e.indexOf("(");t>0&&(e=e.slice(0,t));const i=e.lastIndexOf("@");if(i<=0)return;const s=e.slice(0,i),r=e.slice(i+1);if(!(!s||!r||r.startsWith("link:")||r.startsWith("workspace:")||r.startsWith("file:")))return{name:s,version:r}},Je=(c,e)=>{const t=new RegExp(String.raw`^${e}:\s*$`,"m").exec(c);if(!t)return;const i=t.index+t[0].length,s=si.exec(c.slice(i));return c.slice(i,s?i+s.index:c.length)},hi=c=>{const e=new Map,t=Je(c,"snapshots");if(!t)return e;const i=/^ {2}(['"]?[^\s:][^:\n]*?['"]?):\s*\n((?: {4}[^\n]*\n?)+)/gm;let s;for(;(s=i.exec(t)??void 0)!==void 0;){const r=Ke(s[1]);if(!r)continue;const o=`${r.name}@${r.version}`,n=s[2],a=e.get(o)??{};for(const u of["dependencies","peerDependencies","optionalDependencies"]){const f=q(n,u);if(!f)continue;const g=a[u]??{};for(const[v,y]of Object.entries(f)){const b=g[v]??[];for(const m of y)b.includes(m)||b.push(m);g[v]=b}a[u]=g}e.set(o,a)}return e},ui=c=>{const e=[],t=new Set,i=Je(c,"packages");if(!i)return e;const s=hi(c),r=/^ {2}(['"]?[^\s:][^:\n]*?['"]?):\s*\n((?: {4}[^\n]*\n?)+)/gm;let o;for(;(o=r.exec(i)??void 0)!==void 0;){const n=Ke(o[1]);if(!n)continue;const a=o[2],u=ni.exec(a),f={name:n.name,version:n.version};if(u?.[1]){const v=Z(u[1]);v&&(f.integrity=v)}const g=s.get(`${n.name}@${n.version}`);x(f,"dependencies",g?.dependencies??q(a,"dependencies")),x(f,"peerDependencies",g?.peerDependencies??q(a,"peerDependencies")),x(f,"optionalDependencies",g?.optionalDependencies??q(a,"optionalDependencies")),Q(e,t,f)}return e},q=(c,e)=>{const t=new RegExp(String.raw`^ {4}${e}:\s*\n((?: {6,}[^\n]*\n?)+)`,"m").exec(c);if(!t?.[1])return;const i={},s=/^ {6}([^\s:]+):\s*([^\n]+)/gm;let r;for(;(r=s.exec(t[1])??void 0)!==void 0;){const o=r[1].replace(H,"").replace(z,"");let n=r[2].trim();n=n.replace(H,"").replace(z,"");const a=n.indexOf("(");if(a>0&&(n=n.slice(0,a).trim()),!o||!n)continue;const u=i[o]??[];u.includes(n)||u.push(n),i[o]=u}return Object.keys(i).length>0?i:void 0},pi=c=>{const e=[],t=new Set,i=oi;i.lastIndex=0;let s;for(;(s=i.exec(c)??void 0)!==void 0;){const r=s[1].replace(H,"").replace(z,"");if(!r)continue;const o=s[2],n=ai.exec(o);if(!n?.[1])continue;const a={name:r,version:n[1].trim()},u=li.exec(o);if(u?.[1]){const f=Z(u[1]);f&&(a.integrity=f)}x(a,"dependencies",te(o,"dependencies")),x(a,"peerDependencies",te(o,"peerDependencies")),x(a,"optionalDependencies",te(o,"optionalDependencies")),Q(e,t,a)}return e},te=(c,e)=>{const t=new RegExp(String.raw`^ {2}${e}:\s*\n((?: {4,}[^\n]*\n?)+)`,"m").exec(c);if(!t?.[1])return;const i={},s=/^ {4}(['"]?[^\s:'"]+['"]?)\s*(?::\s*)?['"]([^'"\n]+)['"]/gm;let r;for(;(r=s.exec(t[1])??void 0)!==void 0;){const o=r[1].replace(H,"").replace(z,""),n=r[2];if(o&&n){const a=i[o]??[];a.includes(n)||a.push(n),i[o]=a}}return Object.keys(i).length>0?i:void 0},fi=/,(?=\s*[}\]])/g,di=c=>{const e=[],t=new Set;let i;try{i=JSON.parse(c.replaceAll(fi,""))}catch{return e}if(!i.packages)return e;for(const s of Object.values(i.packages)){const r=s[0];if(typeof r!="string")continue;const o=r.indexOf("@",1);if(o<=0)continue;const n=r.slice(0,o),a=r.slice(o+1);if(!n||!a||a.startsWith("workspace:")||a.startsWith("link:")||a.startsWith("file:"))continue;const u={name:n,version:a},f=s[3];if(typeof f=="string"&&f.length>0){const v=Z(f);v&&(u.integrity=v)}const g=s[2];if(g&&typeof g=="object"&&!Array.isArray(g)){const v=g;x(u,"dependencies",R(v.dependencies)),x(u,"peerDependencies",R(v.peerDependencies)),x(u,"optionalDependencies",R(v.optionalDependencies))}Q(e,t,u)}return e},$r=(c,e)=>{switch(e){case"bun":return di(c);case"npm":return ci(c);case"pnpm":return ui(c);case"yarn":return pi(c);default:return[]}},mi=Y(import.meta.url),M=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gi=c=>{if(typeof M<"u"&&M.versions&&M.versions.node){const[e,t]=M.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return M.getBuiltinModule(c)}return mi(c)},{existsSync:De,readFileSync:Li}=gi("node:fs"),Or=c=>{const e=X(["lerna.json","turbo.json"],{type:"file",...c&&{cwd:c}});if(e?.endsWith("lerna.json")){const i=ze(e);if(i.useWorkspaces||i.packages)return{path:$(e),strategy:"lerna"}}const t=e?.endsWith("turbo.json");try{const{packageManager:i,path:s}=Qt(c);if(["npm","yarn"].includes(i)){const r=B(s,"package.json");if(De(r)&&Li(B(s,"package.json"),"utf8").includes("workspaces"))return{path:s,strategy:t?"turbo":i}}else if(i==="pnpm"){const r=B(s,"pnpm-workspace.yaml");if(De(r))return{path:s,strategy:t?"turbo":"pnpm"}}}catch(i){if(!(i instanceof K))throw i}throw new Error(`No monorepo root could be found upwards from the directory ${String(c??process.cwd())} using lerna, yarn, pnpm, or npm as indicators.`)},Si=Y(import.meta.url),j=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vi=c=>{if(typeof j<"u"&&j.versions&&j.versions.node){const[e,t]=j.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return j.getBuiltinModule(c)}return Si(c)};vi("node:fs");var ie,we;function Xe(){return we||(we=1,ie=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","ALGLIB-Documentation","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Advanced-Cryptics-Dictionary","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","Artistic-dist","Aspell-RU","BOLA-1.1","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-2-Clause-pkgconf-disclaimer","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-Tso","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Mark-Modifications","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","Buddy","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CAPEC-tou","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CryptoSwift","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-DTD","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","ESA-PL-permissive-2.4","ESA-PL-strong-copyleft-2.4","ESA-PL-weak-copyleft-2.4","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRSD","FSFULLRWD","FSL-1.1-ALv2","FSL-1.1-MIT","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Game-Programming-Gems","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HDF5","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-SMC","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HPND-sell-variant-critical-systems","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ISO-permission","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-STK","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MMPL-1.0.1","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-TNT","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTIA-PD","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSC-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OSSP","OpenMDW-1.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","ParaType-Free-Font-1.3","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGMLUG-PM","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SOFA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SUL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TekHVC","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","UnRAR","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","Unlicense-libtelnet","Unlicense-libwhirlpool","VOSTROM","VSL-1.0","Vim","Vixie-Cron","W3C","W3C-19980720","W3C-20150513","WTFNMFPL","WTFPL","Watcom-1.0","Widget-Workshop","WordNet","Wsuipa","X11","X11-distribute-modifications-variant","X11-no-permit-persons","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","hyphen-bulgarian","iMatix","jove","libpng-1.6.35","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","man2html","metamail","mpi-permissive","mpich2","mplus","ngrep","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]),ie}var re,xe;function yi(){return xe||(xe=1,re=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]),re}var se,Ae;function bi(){return Ae||(Ae=1,se=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]),se}var ne,Ee;function Ci(){if(Ee)return ne;Ee=1;var c=[].concat(Xe()).concat(yi()),e=bi();return ne=function(t){var i=0;function s(){return i<t.length}function r(L){if(L instanceof RegExp){var h=t.slice(i),S=h.match(L);if(S)return i+=S[0].length,S[0]}else if(t.indexOf(L,i)===i)return i+=L.length,L}function o(){r(/[ ]*/)}function n(){for(var L,h=["WITH","AND","OR","(",")",":","+"],S=0;S<h.length&&(L=r(h[S]),!L);S++);if(L==="+"&&i>1&&t[i-2]===" ")throw new Error("Space before `+`");return L&&{type:"OPERATOR",string:L}}function a(){return r(/[A-Za-z0-9-.]+/)}function u(){var L=a();if(!L)throw new Error("Expected idstring at offset "+i);return L}function f(){if(r("DocumentRef-")){var L=u();return{type:"DOCUMENTREF",string:L}}}function g(){if(r("LicenseRef-")){var L=u();return{type:"LICENSEREF",string:L}}}function v(){var L=i,h=a();if(c.indexOf(h)!==-1)return{type:"LICENSE",string:h};if(e.indexOf(h)!==-1)return{type:"EXCEPTION",string:h};i=L}function y(){return n()||f()||g()||v()}for(var b=[];s()&&(o(),!!s());){var m=y();if(!m)throw new Error("Unexpected `"+t[i]+"` at offset "+i);b.push(m)}return b},ne}var oe,$e;function Pi(){return $e||($e=1,oe=function(c){var e=0;function t(){return e<c.length}function i(){return t()?c[e]:null}function s(){if(!t())throw new Error;e++}function r(m){var L=i();if(L&&L.type==="OPERATOR"&&m===L.string)return s(),L.string}function o(){if(r("WITH")){var m=i();if(m&&m.type==="EXCEPTION")return s(),m.string;throw new Error("Expected exception after `WITH`")}}function n(){var m=e,L="",h=i();if(h.type==="DOCUMENTREF"&&(s(),L+="DocumentRef-"+h.string+":",!r(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(h=i(),h.type==="LICENSEREF")return s(),L+="LicenseRef-"+h.string,{license:L};e=m}function a(){var m=i();if(m&&m.type==="LICENSE"){s();var L={license:m.string};r("+")&&(L.plus=!0);var h=o();return h&&(L.exception=h),L}}function u(){var m=r("(");if(m){var L=y();if(!r(")"))throw new Error("Expected `)`");return L}}function f(){return u()||n()||a()}function g(m,L){return function h(){var S=L();if(S){if(!r(m))return S;var C=h();if(!C)throw new Error("Expected expression");return{left:S,conjunction:m.toLowerCase(),right:C}}}}var v=g("AND",f),y=g("OR",v),b=y();if(!b||t())throw new Error("Syntax error");return b}),oe}var ae,Oe;function Ze(){if(Oe)return ae;Oe=1;var c=Ci(),e=Pi();return ae=function(t){return e(c(t))},ae}var le,Ne;function Di(){if(Ne)return le;Ne=1;var c=Ze(),e=Xe();function t(h){try{return c(h),!0}catch{return!1}}function i(h,S){var C=S[0].length-h[0].length;return C!==0?C:h[0].toUpperCase().localeCompare(S[0].toUpperCase())}var s=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(i),r=0,o=1,n=[function(h){return h.toUpperCase()},function(h){return h.trim()},function(h){return h.replace(/\./g,"")},function(h){return h.replace(/\s+/g,"")},function(h){return h.replace(/\s+/g,"-")},function(h){return h.replace("v","-")},function(h){return h.replace(/,?\s*(\d)/,"-$1")},function(h){return h.replace(/,?\s*(\d)/,"-$1.0")},function(h){return h.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(h){return h.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(h){return h[0].toUpperCase()+h.slice(1)},function(h){return h.replace("/","-")},function(h){return h.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(h){return h.indexOf("3.0")!==-1?h+"-or-later":h+"-only"},function(h){return h+"only"},function(h){return h.replace(/(\d)$/,"-$1.0")},function(h){return h.replace(/(-| )?(\d)$/,"-$2-Clause")},function(h){return h.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(h){return h.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(h){return h.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(h){return h.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(h){return h.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(h){return h.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(h){return"CC-"+h},function(h){return"CC-"+h+"-4.0"},function(h){return h.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(h){return"CC-"+h.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],a=e.map(function(h){var S=/^(.*)-\d+\.\d+$/.exec(h);return S?[S[0],S[1]]:[h,null]}).reduce(function(h,S){var C=S[1];return h[C]=h[C]||[],h[C].push(S[0]),h},{}),u=Object.keys(a).map(function(h){return[h,a[h]]}).filter(function(h){return h[1].length===1&&h[0]!==null&&h[0]!=="APL"}).map(function(h){return[h[0],h[1][0]]});a=void 0;var f=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(u).sort(i),g=0,v=1,y=function(h){for(var S=0;S<n.length;S++){var C=n[S](h).trim();if(C!==h&&t(C))return C}return null},b=function(h){for(var S=h.toUpperCase(),C=0;C<f.length;C++){var l=f[C];if(S.indexOf(l[g])>-1)return l[v]}return null},m=function(h,S){for(var C=0;C<s.length;C++){var l=s[C],p=l[r];if(h.indexOf(p)>-1){var d=h.replace(p,l[o]),P=S(d);if(P!==null)return P}}return null};le=function(h,S){S=S||{};var C=S.upgrade===void 0?!0:!!S.upgrade;function l(D){return C?L(D):D}var p=typeof h=="string"&&h.trim().length!==0;if(!p)throw Error("Invalid argument. Expected non-empty string.");if(h=h.trim(),t(h))return l(h);var d=h.replace(/\+$/,"").trim();if(t(d))return l(d);var P=y(h);return P!==null||(P=m(h,function(D){return t(D)?D:y(D)}),P!==null)||(P=b(h),P!==null)||(P=m(h,b),P!==null)?l(P):null};function L(h){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(h)!==-1?h+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(h)!==-1?h.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(h)!==-1?h+"-or-later":h}return le}var ce,Fe;function wi(){if(Fe)return ce;Fe=1;var c=Ze(),e=Di(),t='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',i=/^SEE LICEN[CS]E IN (.+)$/;function s(o,n){return n.slice(0,o.length)===o}function r(o){if(o.hasOwnProperty("license")){var n=o.license;return s("LicenseRef",n)||s("DocumentRef",n)}else return r(o.left)||r(o.right)}return ce=function(o){var n;try{n=c(o)}catch{var a;if(o==="UNLICENSED"||o==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(a=i.exec(o))return{validForOldPackages:!0,validForNewPackages:!0,inFile:a[1]};var u={validForOldPackages:!1,validForNewPackages:!1,warnings:[t]};if(o.trim().length!==0){var f=e(o);f&&u.warnings.push('license is similar to the valid expression "'+f+'"')}return u}return r(n)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[t]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}},ce}var Qe={hasSubscribers:!1},w=Qe,G=Qe;import("node:diagnostics_channel").then(c=>{w=c.channel("lru-cache:metrics"),G=c.tracingChannel("lru-cache")}).catch(()=>{});var xi=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,he=()=>w.hasSubscribers||G.hasSubscribers,et=new Set,Te=process||{},Ai=(c,e,t,i)=>{typeof Te.emitWarning=="function"?Te.emitWarning(c,e,t,i):console.error(`[${t}] ${e}: ${c}`)},Ei=c=>!et.has(c),T=c=>!!c&&c===Math.floor(c)&&c>0&&isFinite(c),tt=c=>T(c)?c<=Math.pow(2,8)?Uint8Array:c<=Math.pow(2,16)?Uint16Array:c<=Math.pow(2,32)?Uint32Array:c<=Number.MAX_SAFE_INTEGER?V:null:null,V=class extends Array{constructor(c){super(c),this.fill(0)}},$i=class _{heap;length;static#s=!1;static create(e){let t=tt(e);if(!t)return[];_.#s=!0;let i=new _(e,t);return _.#s=!1,i}constructor(e,t){if(!_.#s)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Oi=class it{#s;#c;#t;#$;#L;#B;#R;#S;get perf(){return this.#S}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#o;#v;#n;#r;#e;#u;#f;#h;#a;#y;#l;#b;#C;#d;#m;#P;#I;#p;#O;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#d,autopurgeTimers:e.#m,sizes:e.#b,keyMap:e.#n,keyList:e.#r,valList:e.#e,next:e.#u,prev:e.#f,get head(){return e.#h},get tail(){return e.#a},free:e.#y,isBackgroundFetch:t=>e.#i(t),backgroundFetch:(t,i,s,r)=>e.#M(t,i,s,r),moveToTail:t=>e.#G(t),indexes:t=>e.#D(t),rindexes:t=>e.#w(t),isStale:t=>e.#g(t)}}get max(){return this.#s}get maxSize(){return this.#c}get calculatedSize(){return this.#v}get size(){return this.#o}get fetchMethod(){return this.#B}get memoMethod(){return this.#R}get dispose(){return this.#t}get onInsert(){return this.#$}get disposeAfter(){return this.#L}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:n,allowStale:a,dispose:u,onInsert:f,disposeAfter:g,noDisposeOnSet:v,noUpdateTTL:y,maxSize:b=0,maxEntrySize:m=0,sizeCalculation:L,fetchMethod:h,memoMethod:S,noDeleteOnFetchRejection:C,noDeleteOnStaleGet:l,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:d,ignoreFetchAbort:P,backgroundFetchSize:D=1,perf:A}=e;if(this.backgroundFetchSize=D,A!==void 0&&typeof A?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#S=A??xi,t!==0&&!T(t))throw new TypeError("max option must be a nonnegative integer");let E=t?tt(t):Array;if(!E)throw new Error("invalid max value: "+t);if(this.#s=t,this.#c=b,this.maxEntrySize=m||this.#c,this.sizeCalculation=L,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=S,h!==void 0&&typeof h!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#B=h,this.#I=!!h,this.#n=new Map,this.#r=Array.from({length:t}).fill(void 0),this.#e=Array.from({length:t}).fill(void 0),this.#u=new E(t),this.#f=new E(t),this.#h=0,this.#a=0,this.#y=$i.create(t),this.#o=0,this.#v=0,typeof u=="function"&&(this.#t=u),typeof f=="function"&&(this.#$=f),typeof g=="function"?(this.#L=g,this.#l=[]):(this.#L=void 0,this.#l=void 0),this.#P=!!this.#t,this.#O=!!this.#$,this.#p=!!this.#L,this.noDisposeOnSet=!!v,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!C,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!d,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(this.#c!==0&&!T(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!T(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!l,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!n,this.ttlResolution=T(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!T(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#j()}if(this.#s===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#s&&!this.#c){let ee="LRU_CACHE_UNBOUNDED";Ei(ee)&&(et.add(ee),Ai("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ee,it))}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#j(){let e=new V(this.#s),t=new V(this.#s);this.#d=e,this.#C=t;let i=this.ttlAutopurge?Array.from({length:this.#s}):void 0;this.#m=i,this.#W=(n,a,u=this.#S.now())=>{t[n]=a!==0?u:0,e[n]=a,s(n,a)},this.#N=n=>{t[n]=e[n]!==0?this.#S.now():0,s(n,e[n])};let s=this.ttlAutopurge?(n,a)=>{if(i?.[n]&&(clearTimeout(i[n]),i[n]=void 0),a&&a!==0&&i){let u=setTimeout(()=>{this.#g(n)&&this.#x(this.#r[n],"expire")},a+1);u.unref&&u.unref(),i[n]=u}}:()=>{};this.#A=(n,a)=>{if(e[a]){let u=e[a],f=t[a];if(!u||!f)return;n.ttl=u,n.start=f,n.now=r||o();let g=n.now-f;n.remainingTTL=u-g}};let r=0,o=()=>{let n=this.#S.now();if(this.ttlResolution>0){r=n;let a=setTimeout(()=>r=0,this.ttlResolution);a.unref&&a.unref()}return n};this.getRemainingTTL=n=>{let a=this.#n.get(n);if(a===void 0)return 0;let u=e[a],f=t[a];if(!u||!f)return 1/0;let g=(r||o())-f;return u-g},this.#g=n=>{let a=t[n],u=e[n];return!!u&&!!a&&(r||o())-a>u}}#N=()=>{};#A=()=>{};#W=()=>{};#g=()=>!1;#V(){let e=new V(this.#s);this.#v=0,this.#b=e,this.#F=t=>{this.#v-=e[t],e[t]=0},this.#_=(t,i,s,r)=>{if(!T(s)){if(this.#i(i))return this.backgroundFetchSize;if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,t),!T(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return s},this.#k=(t,i,s)=>{if(e[t]=i,this.#c){let r=this.#c-e[t];for(;this.#v>r;)this.#U(!0)}this.#v+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#v)}}#F=e=>{};#k=(e,t,i)=>{};#_=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#D({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#a;this.#H(t)&&((e||!this.#g(t))&&(yield t),t!==this.#h);)t=this.#f[t]}*#w({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#h;this.#H(t)&&((e||!this.#g(t))&&(yield t),t!==this.#a);)t=this.#u[t]}#H(e){return e!==void 0&&this.#n.get(this.#r[e])===e}*entries(){for(let e of this.#D())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#i(this.#e[e])&&(yield[this.#r[e],this.#e[e]])}*rentries(){for(let e of this.#w())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#i(this.#e[e])&&(yield[this.#r[e],this.#e[e]])}*keys(){for(let e of this.#D()){let t=this.#r[e];t!==void 0&&!this.#i(this.#e[e])&&(yield t)}}*rkeys(){for(let e of this.#w()){let t=this.#r[e];t!==void 0&&!this.#i(this.#e[e])&&(yield t)}}*values(){for(let e of this.#D())this.#e[e]!==void 0&&!this.#i(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#w())this.#e[e]!==void 0&&!this.#i(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#D()){let s=this.#e[i],r=this.#i(s)?s.__staleWhileFetching:s;if(r!==void 0&&e(r,this.#r[i],this))return this.#T(this.#r[i],t)}}forEach(e,t=this){for(let i of this.#D()){let s=this.#e[i],r=this.#i(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#r[i],this)}}rforEach(e,t=this){for(let i of this.#w()){let s=this.#e[i],r=this.#i(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#r[i],this)}}purgeStale(){let e=!1;for(let t of this.#w({allowStale:!0}))this.#g(t)&&(this.#x(this.#r[t],"expire"),e=!0);return e}info(e){let t=this.#n.get(e);if(t===void 0)return;let i=this.#e[t],s=this.#i(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#d&&this.#C){let o=this.#d[t],n=this.#C[t];if(o&&n){let a=o-(this.#S.now()-n);r.ttl=a,r.start=Date.now()}}return this.#b&&(r.size=this.#b[t]),r}dump(){let e=[];for(let t of this.#D({allowStale:!0})){let i=this.#r[t],s=this.#e[t],r=this.#i(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let o={value:r};if(this.#d&&this.#C){o.ttl=this.#d[t];let n=this.#S.now()-this.#C[t];o.start=Math.floor(Date.now()-n)}this.#b&&(o.size=this.#b[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=this.#S.now()-s}this.#E(t,i.value,i)}}set(e,t,i={}){let{status:s=w.hasSubscribers?{}:void 0}=i;i.status=s,s&&(s.op="set",s.key=e,t!==void 0&&(s.value=t),s.cache=this);let r=this.#E(e,t,i);return s&&w.hasSubscribers&&w.publish(s),r}#E(e,t,i,s){let{ttl:r=this.ttl,start:o,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=i,f=this.#i(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:g=this.noUpdateTTL}=i;u&&!f&&(u.value=t);let v=this.#_(e,t,i.size||0,a,u);if(this.maxEntrySize&&v>this.maxEntrySize)return this.#x(e,"set"),u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this;let y=this.#o===0?void 0:this.#n.get(e);if(y===void 0)y=this.#o===0?this.#a:this.#y.length!==0?this.#y.pop():this.#o===this.#s?this.#U(!1):this.#o,this.#r[y]=e,this.#e[y]=t,this.#n.set(e,y),this.#u[this.#a]=y,this.#f[y]=this.#a,this.#a=y,this.#o++,this.#k(y,v,u),u&&(u.set="add"),g=!1,this.#O&&!f&&this.#$?.(t,e,"add");else{this.#G(y);let b=this.#e[y];if(t!==b){if(!n)if(this.#i(b)){b!==s&&b.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=b;m!==void 0&&m!==t&&(this.#P&&this.#t?.(m,e,"set"),this.#p&&this.#l?.push([m,e,"set"]))}else this.#P&&this.#t?.(b,e,"set"),this.#p&&this.#l?.push([b,e,"set"]);if(this.#F(y),this.#k(y,v,u),this.#e[y]=t,!f){let m=b&&this.#i(b)?b.__staleWhileFetching:b,L=m===void 0?"add":t!==m?"replace":"update";u&&(u.set=L,m!==void 0&&(u.oldValue=m)),this.#O&&this.onInsert?.(t,e,L)}}else f||(u&&(u.set="update"),this.#O&&this.onInsert?.(t,e,"update"))}if(r!==0&&!this.#d&&this.#j(),this.#d&&(g||this.#W(y,r,o),u&&this.#A(u,y)),!n&&this.#p&&this.#l){let b=this.#l,m;for(;m=b?.shift();)this.#L?.(...m)}return this}pop(){try{for(;this.#o;){let e=this.#e[this.#h];if(this.#U(!0),this.#i(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#l){let e=this.#l,t;for(;t=e?.shift();)this.#L?.(...t)}}}#U(e){let t=this.#h,i=this.#r[t],s=this.#e[t],r=this.#i(s);r&&s.__abortController.abort(new Error("evicted"));let o=r?s.__staleWhileFetching:s;return(this.#P||this.#p)&&o!==void 0&&(this.#P&&this.#t?.(o,i,"evict"),this.#p&&this.#l?.push([o,i,"evict"])),this.#F(t),this.#m?.[t]&&(clearTimeout(this.#m[t]),this.#m[t]=void 0),e&&(this.#r[t]=void 0,this.#e[t]=void 0,this.#y.push(t)),this.#o===1?(this.#h=this.#a=0,this.#y.length=0):this.#h=this.#u[t],this.#n.delete(i),this.#o--,t}has(e,t={}){let{status:i=w.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="has",i.key=e,i.cache=this);let s=this.#K(e,t);return w.hasSubscribers&&w.publish(i),s}#K(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,r=this.#n.get(e);if(r!==void 0){let o=this.#e[r];if(this.#i(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#g(r))s&&(s.has="stale",this.#A(s,r));else return i&&this.#N(r),s&&(s.has="hit",this.#A(s,r)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{status:i=he()?{}:void 0}=t;i&&(i.op="peek",i.key=e,i.cache=this),t.status=i;let s=this.#J(e,t);return w.hasSubscribers&&w.publish(i),s}#J(e,t){let{status:i,allowStale:s=this.allowStale}=t,r=this.#n.get(e);if(r===void 0||!s&&this.#g(r)){i&&(i.peek=r===void 0?"miss":"stale");return}let o=this.#e[r],n=this.#i(o)?o.__staleWhileFetching:o;return i&&(n!==void 0?(i.peek="hit",i.value=n):i.peek="miss"),n}#M(e,t,i,s){let r=t===void 0?void 0:this.#e[t];if(this.#i(r))return r;let o=new AbortController,{signal:n}=i;n?.addEventListener("abort",()=>o.abort(n.reason),{signal:o.signal});let a={signal:o.signal,options:i,context:s},u=(m,L=!1)=>{let{aborted:h}=o.signal,S=i.ignoreFetchAbort&&m!==void 0,C=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&m!==void 0);if(i.status&&(h&&!L?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),h&&!S&&!L)return g(o.signal.reason,C);let l=y,p=this.#e[t];return(p===y||p===void 0&&S&&L)&&(m===void 0?l.__staleWhileFetching!==void 0?this.#e[t]=l.__staleWhileFetching:this.#x(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#E(e,m,a.options,l))),m},f=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),g(m,!1)),g=(m,L)=>{let{aborted:h}=o.signal,S=h&&i.allowStaleOnFetchAbort,C=S||i.allowStaleOnFetchRejection,l=C||i.noDeleteOnFetchRejection,p=y;if(this.#e[t]===y&&(!l||!L&&p.__staleWhileFetching===void 0?this.#x(e,"fetch"):S||(this.#e[t]=p.__staleWhileFetching)),C)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw m},v=(m,L)=>{let h=this.#B?.(e,r,a);o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=S=>u(S,!0)))}),h&&h instanceof Promise?h.then(S=>m(S===void 0?void 0:S),L):h!==void 0&&m(h)};i.status&&(i.status.fetchDispatched=!0);let y=new Promise(v).then(u,f),b=Object.assign(y,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return t===void 0?(this.#E(e,b,{...a.options,status:void 0}),t=this.#n.get(e)):this.#e[t]=b,b}#i(e){if(!this.#I)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let i=G.hasSubscribers,{status:s=he()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let r=this.#z(e,t);return s&&i&&(s.trace=!0,G.tracePromise(()=>r,s).catch(()=>{})),r}async#z(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:n=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:v=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:b=this.allowStaleOnFetchAbort,context:m,forceRefresh:L=!1,status:h,signal:S}=t;if(h&&(h.op="fetch",h.key=e,L&&(h.forceRefresh=!0),h.cache=this),!this.#I)return h&&(h.fetch="get"),this.#T(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:h});let C={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:n,size:a,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:v,allowStaleOnFetchAbort:b,ignoreFetchAbort:y,status:h,signal:S},l=this.#n.get(e);if(l===void 0){h&&(h.fetch="miss");let p=this.#M(e,l,C,m);return p.__returned=p}else{let p=this.#e[l];if(this.#i(p)){let A=i&&p.__staleWhileFetching!==void 0;return h&&(h.fetch="inflight",A&&(h.returnedStale=!0)),A?p.__staleWhileFetching:p.__returned=p}let d=this.#g(l);if(!L&&!d)return h&&(h.fetch="hit"),this.#G(l),s&&this.#N(l),h&&this.#A(h,l),p;let P=this.#M(e,l,C,m),D=P.__staleWhileFetching!==void 0&&i;return h&&(h.fetch=d?"stale":"refresh",D&&d&&(h.returnedStale=!0)),D?P.__staleWhileFetching:P.__returned=P}}forceFetch(e,t={}){let i=G.hasSubscribers,{status:s=he()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let r=this.#X(e,t);return s&&i&&(s.trace=!0,G.tracePromise(()=>r,s).catch(()=>{})),r}async#X(e,t={}){let i=await this.#z(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let{status:i=w.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="memo",i.key=e,t.context&&(i.context=t.context),i.cache=this);let s=this.#Z(e,t);return i&&(i.value=s),w.hasSubscribers&&w.publish(i),s}#Z(e,t={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,status:r,forceRefresh:o,...n}=t;r&&o&&(r.forceRefresh=!0);let a=this.#T(e,n),u=o||a===void 0;if(r&&(r.memo=u?"miss":"hit",u||(r.value=a)),!u)return a;let f=i(e,a,{options:n,context:s});return r&&(r.value=f),this.#E(e,f,n),f}get(e,t={}){let{status:i=w.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="get",i.key=e,i.cache=this);let s=this.#T(e,t);return i&&(s!==void 0&&(i.value=s),w.hasSubscribers&&w.publish(i)),s}#T(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=t,n=this.#n.get(e);if(n===void 0){o&&(o.get="miss");return}let a=this.#e[n],u=this.#i(a);return o&&this.#A(o,n),this.#g(n)?u?(o&&(o.get="stale-fetching"),i&&a.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),a.__staleWhileFetching):void 0):(r||this.#x(e,"expire"),o&&(o.get="stale"),i?(o&&(o.returnedStale=!0),a):void 0):(o&&(o.get=u?"fetching":"hit"),this.#G(n),s&&this.#N(n),u?a.__staleWhileFetching:a)}#Y(e,t){this.#f[t]=e,this.#u[e]=t}#G(e){e!==this.#a&&(e===this.#h?this.#h=this.#u[e]:this.#Y(this.#f[e],this.#u[e]),this.#Y(this.#a,e),this.#a=e)}delete(e){return this.#x(e,"delete")}#x(e,t){w.hasSubscribers&&w.publish({op:"delete",delete:t,key:e,cache:this});let i=!1;if(this.#o!==0){let s=this.#n.get(e);if(s!==void 0)if(this.#m?.[s]&&(clearTimeout(this.#m?.[s]),this.#m[s]=void 0),i=!0,this.#o===1)this.#q(t);else{this.#F(s);let r=this.#e[s];if(this.#i(r)?r.__abortController.abort(new Error("deleted")):(this.#P||this.#p)&&(this.#P&&this.#t?.(r,e,t),this.#p&&this.#l?.push([r,e,t])),this.#n.delete(e),this.#r[s]=void 0,this.#e[s]=void 0,s===this.#a)this.#a=this.#f[s];else if(s===this.#h)this.#h=this.#u[s];else{let o=this.#f[s];this.#u[o]=this.#u[s];let n=this.#u[s];this.#f[n]=this.#f[s]}this.#o--,this.#y.push(s)}}if(this.#p&&this.#l?.length){let s=this.#l,r;for(;r=s?.shift();)this.#L?.(...r)}return i}clear(){return this.#q("delete")}#q(e){for(let t of this.#w({allowStale:!0})){let i=this.#e[t];if(this.#i(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#r[t];this.#P&&this.#t?.(i,s,e),this.#p&&this.#l?.push([i,s,e])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#d&&this.#C){this.#d.fill(0),this.#C.fill(0);for(let t of this.#m??[])t!==void 0&&clearTimeout(t);this.#m?.fill(void 0)}if(this.#b&&this.#b.fill(0),this.#h=0,this.#a=0,this.#y.length=0,this.#v=0,this.#o=0,this.#p&&this.#l){let t=this.#l,i;for(;i=t?.shift();)this.#L?.(...i)}}};const Ni=Object.defineProperty({__proto__:null,LRUCache:Oi},Symbol.toStringTag,{value:"Module"}),Fi=ve(Ni);var ue,Ge;function Ti(){if(Ge)return ue;Ge=1;const c=(...r)=>r.every(o=>o)?r.join(""):"",e=r=>r?encodeURIComponent(r):"",t=r=>r.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),i={sshtemplate:({domain:r,user:o,project:n,committish:a})=>`git@${r}:${o}/${n}.git${c("#",a)}`,sshurltemplate:({domain:r,user:o,project:n,committish:a})=>`git+ssh://git@${r}/${o}/${n}.git${c("#",a)}`,edittemplate:({domain:r,user:o,project:n,committish:a,editpath:u,path:f})=>`https://${r}/${o}/${n}${c("/",u,"/",e(a||"HEAD"),"/",f)}`,browsetemplate:({domain:r,user:o,project:n,committish:a,treepath:u})=>`https://${r}/${o}/${n}${c("/",u,"/",e(a))}`,browsetreetemplate:({domain:r,user:o,project:n,committish:a,treepath:u,path:f,fragment:g,hashformat:v})=>`https://${r}/${o}/${n}/${u}/${e(a||"HEAD")}/${f}${c("#",v(g||""))}`,browseblobtemplate:({domain:r,user:o,project:n,committish:a,blobpath:u,path:f,fragment:g,hashformat:v})=>`https://${r}/${o}/${n}/${u}/${e(a||"HEAD")}/${f}${c("#",v(g||""))}`,docstemplate:({domain:r,user:o,project:n,treepath:a,committish:u})=>`https://${r}/${o}/${n}${c("/",a,"/",e(u))}#readme`,httpstemplate:({auth:r,domain:o,user:n,project:a,committish:u})=>`git+https://${c(r,"@")}${o}/${n}/${a}.git${c("#",u)}`,filetemplate:({domain:r,user:o,project:n,committish:a,path:u})=>`https://${r}/${o}/${n}/raw/${e(a||"HEAD")}/${u}`,shortcuttemplate:({type:r,user:o,project:n,committish:a})=>`${r}:${o}/${n}${c("#",a)}`,pathtemplate:({user:r,project:o,committish:n})=>`${r}/${o}${c("#",n)}`,bugstemplate:({domain:r,user:o,project:n})=>`https://${r}/${o}/${n}/issues`,hashformat:t},s={};s.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:r,user:o,project:n,committish:a,path:u})=>`https://${c(r,"@")}raw.githubusercontent.com/${o}/${n}/${e(a||"HEAD")}/${u}`,gittemplate:({auth:r,domain:o,user:n,project:a,committish:u})=>`git://${c(r,"@")}${o}/${n}/${a}.git${c("#",u)}`,tarballtemplate:({domain:r,user:o,project:n,committish:a})=>`https://codeload.${r}/${o}/${n}/tar.gz/${e(a||"HEAD")}`,extract:r=>{let[,o,n,a,u]=r.pathname.split("/",5);if(!(a&&a!=="tree")&&(a||(u=r.hash.slice(1)),n&&n.endsWith(".git")&&(n=n.slice(0,-4)),!(!o||!n)))return{user:o,project:n,committish:u}}},s.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:r,user:o,project:n,committish:a,treepath:u,path:f,editpath:g})=>`https://${r}/${o}/${n}${c("/",u,"/",e(a||"HEAD"),"/",f,g)}`,tarballtemplate:({domain:r,user:o,project:n,committish:a})=>`https://${r}/${o}/${n}/get/${e(a||"HEAD")}.tar.gz`,extract:r=>{let[,o,n,a]=r.pathname.split("/",4);if(!["get"].includes(a)&&(n&&n.endsWith(".git")&&(n=n.slice(0,-4)),!(!o||!n)))return{user:o,project:n,committish:r.hash.slice(1)}}},s.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:({domain:r,user:o,project:n,committish:a})=>`https://${r}/api/v4/projects/${e(o+"/"+n)}/repository/archive.tar.gz?sha=${e(a||"HEAD")}`,extract:r=>{const o=r.pathname.slice(1);if(o.includes("/-/")||o.includes("/archive.tar.gz"))return;const n=o.split("/");let a=n.pop();a.endsWith(".git")&&(a=a.slice(0,-4));const u=n.join("/");if(!(!u||!a))return{user:u,project:a,committish:r.hash.slice(1)}}},s.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:r,project:o,committish:n})=>`git@${r}:${o}.git${c("#",n)}`,sshurltemplate:({domain:r,project:o,committish:n})=>`git+ssh://git@${r}/${o}.git${c("#",n)}`,edittemplate:({domain:r,user:o,project:n,committish:a,editpath:u})=>`https://${r}/${o}/${n}${c("/",e(a))}/${u}`,browsetemplate:({domain:r,project:o,committish:n})=>`https://${r}/${o}${c("/",e(n))}`,browsetreetemplate:({domain:r,project:o,committish:n,path:a,hashformat:u})=>`https://${r}/${o}${c("/",e(n))}${c("#",u(a))}`,browseblobtemplate:({domain:r,project:o,committish:n,path:a,hashformat:u})=>`https://${r}/${o}${c("/",e(n))}${c("#",u(a))}`,docstemplate:({domain:r,project:o,committish:n})=>`https://${r}/${o}${c("/",e(n))}`,httpstemplate:({domain:r,project:o,committish:n})=>`git+https://${r}/${o}.git${c("#",n)}`,filetemplate:({user:r,project:o,committish:n,path:a})=>`https://gist.githubusercontent.com/${r}/${o}/raw${c("/",e(n))}/${a}`,shortcuttemplate:({type:r,project:o,committish:n})=>`${r}:${o}${c("#",n)}`,pathtemplate:({project:r,committish:o})=>`${r}${c("#",o)}`,bugstemplate:({domain:r,project:o})=>`https://${r}/${o}`,gittemplate:({domain:r,project:o,committish:n})=>`git://${r}/${o}.git${c("#",n)}`,tarballtemplate:({project:r,committish:o})=>`https://codeload.github.com/gist/${r}/tar.gz/${e(o||"HEAD")}`,extract:r=>{let[,o,n,a]=r.pathname.split("/",4);if(a!=="raw"){if(!n){if(!o)return;n=o,o=null}return n.endsWith(".git")&&(n=n.slice(0,-4)),{user:o,project:n,committish:r.hash.slice(1)}}},hashformat:function(r){return r&&"file-"+t(r)}},s.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:r,user:o,project:n,committish:a,path:u})=>`https://${r}/${o}/${n}/blob/${e(a)||"HEAD"}/${u}`,httpstemplate:({domain:r,user:o,project:n,committish:a})=>`https://${r}/${o}/${n}${c("#",a)}`,tarballtemplate:({domain:r,user:o,project:n,committish:a})=>`https://${r}/${o}/${n}/archive/${e(a)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:r=>{let[,o,n,a]=r.pathname.split("/",4);if(!["archive"].includes(a)&&(n&&n.endsWith(".git")&&(n=n.slice(0,-4)),!(!o||!n)))return{user:o,project:n,committish:r.hash.slice(1)}}};for(const[r,o]of Object.entries(s))s[r]=Object.assign({},i,o);return ue=s,ue}var pe,Be;function rt(){if(Be)return pe;Be=1;const c=(s,r,o)=>{const n=s.indexOf(o);return s.lastIndexOf(r,n>-1?n:1/0)},e=s=>{try{return new URL(s)}catch{}},t=(s,r)=>{const o=s.indexOf(":"),n=s.slice(0,o+1);if(Object.prototype.hasOwnProperty.call(r,n)||s.substr(o,3)==="://")return s;const a=s.indexOf("@");return a>-1?a>o?`git+ssh://${s}`:s:`${s.slice(0,o+1)}//${s.slice(o+1)}`},i=s=>{const r=c(s,"@","#"),o=c(s,":","#");return o>r&&(s=s.slice(0,o)+"/"+s.slice(o+1)),c(s,":","#")===-1&&s.indexOf("//")===-1&&(s=`git+ssh://${s}`),s};return pe=(s,r)=>{const o=r?t(s,r):s;return e(o)||e(i(o))},pe}var fe,Re;function Gi(){if(Re)return fe;Re=1;const c=rt(),e=t=>{const i=t.indexOf("#"),s=t.indexOf("/"),r=t.indexOf("/",s+1),o=t.indexOf(":"),n=/\s/.exec(t),a=t.indexOf("@"),u=!n||i>-1&&n.index>i,f=a===-1||i>-1&&a>i,g=o===-1||i>-1&&o>i,v=r===-1||i>-1&&r>i,y=s>0,b=i>-1?t[i-1]!=="/":!t.endsWith("/"),m=!t.startsWith(".");return u&&y&&b&&m&&f&&g&&v};return fe=(t,i,{gitHosts:s,protocols:r})=>{if(!t)return;const o=e(t)?`github:${t}`:t,n=c(o,r);if(!n)return;const a=s.byShortcut[n.protocol],u=s.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],f=a||u;if(!f)return;const g=s[a||u];let v=null;r[n.protocol]?.auth&&(n.username||n.password)&&(v=`${n.username}${n.password?":"+n.password:""}`);let y=null,b=null,m=null,L=null;try{if(a){let h=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname;const S=h.indexOf("@");S>-1&&(h=h.slice(S+1));const C=h.lastIndexOf("/");C>-1?(b=decodeURIComponent(h.slice(0,C)),b||(b=null),m=decodeURIComponent(h.slice(C+1))):m=decodeURIComponent(h),m.endsWith(".git")&&(m=m.slice(0,-4)),n.hash&&(y=decodeURIComponent(n.hash.slice(1))),L="shortcut"}else{if(!g.protocols.includes(n.protocol))return;const h=g.extract(n);if(!h)return;b=h.user&&decodeURIComponent(h.user),m=decodeURIComponent(h.project),y=decodeURIComponent(h.committish),L=r[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(h){if(h instanceof URIError)return;throw h}return[f,b,v,m,y,L,i]},fe}var de,Ie;function Bi(){if(Ie)return de;Ie=1;const{LRUCache:c}=Fi,e=Ti(),t=Gi(),i=rt(),s=new c({max:1e3});function r(n){try{const{protocol:a,hostname:u,pathname:f}=new URL(n);if(!u)return null;const g=/(?:git\+)http:$/.test(a)?"http:":"https:",v=f.replace(/\.git$/,"");return`${g}//${u}${v}`}catch{return null}}class o{constructor(a,u,f,g,v,y,b={}){Object.assign(this,o.#s[a],{type:a,user:u,auth:f,project:g,committish:v,default:y,opts:b})}static#s={byShortcut:{},byDomain:{}};static#c={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(a,u){o.#s[a]=u,o.#s.byDomain[u.domain]=a,o.#s.byShortcut[`${a}:`]=a,o.#c[`${a}:`]={name:a}}static fromUrl(a,u){if(typeof a!="string")return;const f=a+JSON.stringify(u||{});if(!s.has(f)){const g=t(a,u,{gitHosts:o.#s,protocols:o.#c});s.set(f,g?new o(...g):void 0)}return s.get(f)}static fromManifest(a,u={}){if(!a||typeof a!="object")return;const f=a.repository,g=f&&(typeof f=="string"?f:typeof f=="object"&&typeof f.url=="string"?f.url:null);if(!g)throw new Error("no repository");const v=g&&o.fromUrl(g.replace(/^git\+/,""),u)||null;if(v)return v;const y=r(g);return o.fromUrl(y,u)||y}static parseUrl(a){return i(a)}#t(a,u){if(typeof a!="function")return null;const f={...this,...this.opts,...u};f.path||(f.path=""),f.path.startsWith("/")&&(f.path=f.path.slice(1)),f.noCommittish&&(f.committish=null);const g=a(f);return f.noGitPlus&&g.startsWith("git+")?g.slice(4):g}hash(){return this.committish?`#${this.committish}`:""}ssh(a){return this.#t(this.sshtemplate,a)}sshurl(a){return this.#t(this.sshurltemplate,a)}browse(a,...u){return typeof a!="string"?this.#t(this.browsetemplate,a):typeof u[0]!="string"?this.#t(this.browsetreetemplate,{...u[0],path:a}):this.#t(this.browsetreetemplate,{...u[1],fragment:u[0],path:a})}browseFile(a,...u){return typeof u[0]!="string"?this.#t(this.browseblobtemplate,{...u[0],path:a}):this.#t(this.browseblobtemplate,{...u[1],fragment:u[0],path:a})}docs(a){return this.#t(this.docstemplate,a)}bugs(a){return this.#t(this.bugstemplate,a)}https(a){return this.#t(this.httpstemplate,a)}git(a){return this.#t(this.gittemplate,a)}shortcut(a){return this.#t(this.shortcuttemplate,a)}path(a){return this.#t(this.pathtemplate,a)}tarball(a){return this.#t(this.tarballtemplate,{...a,noCommittish:!1})}file(a,u){return this.#t(this.filetemplate,{...u,path:a})}edit(a,u){return this.#t(this.edittemplate,{...u,path:a})}getDefaultRepresentation(){return this.default}toString(a){return this.default&&typeof this[this.default]=="function"?this[this.default](a):this.sshurl(a)}}for(const[n,a]of Object.entries(e))o.addHost(n,a);return de=o,de}var me,ke;function Ri(){if(ke)return me;ke=1,me=c;function c(e){if(!e||e==="ERROR: No README data found!")return;e=e.trim().split(`
2
2
  `);let t=0;for(;e[t]&&e[t].trim().match(/^(#|$)/);)t++;const i=e.length;let s=t+1;for(;s<i&&e[s].trim();)s++;return e.slice(t,s).join(" ").trim()}return me}var st={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},nt={web:"url",name:"url"},ot={server:"start",tests:"test"};const Ii={topLevel:st,bugs:nt,script:ot},ki=Object.defineProperty({__proto__:null,bugs:nt,default:Ii,script:ot,topLevel:st},Symbol.toStringTag,{value:"Module"}),Ui=ve(ki);var ge,Ue;function Mi(){if(Ue)return ge;Ue=1;var{URL:c}=We,e=Ht(),t=zt(),i=wi(),s=Bi(),{isBuiltin:r}=_e,o=["dependencies","devDependencies","optionalDependencies"],n=Ri(),a=Ui,u=l=>l.includes("@")&&l.indexOf("@")<l.lastIndexOf(".");ge={warn:function(){},fixRepositoryField:function(l){if(l.repositories&&(this.warn("repositories"),l.repository=l.repositories[0]),!l.repository)return this.warn("missingRepository");typeof l.repository=="string"&&(l.repository={type:"git",url:l.repository});var p=l.repository.url||"";if(p){var d=s.fromUrl(p);d&&(p=l.repository.url=d.getDefaultRepresentation()==="shortcut"?d.https():d.toString())}p.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",p)},fixTypos:function(l){Object.keys(a.topLevel).forEach(function(p){Object.prototype.hasOwnProperty.call(l,p)&&this.warn("typo",p,a.topLevel[p])},this)},fixScriptsField:function(l){if(l.scripts){if(typeof l.scripts!="object"){this.warn("nonObjectScripts"),delete l.scripts;return}Object.keys(l.scripts).forEach(function(p){typeof l.scripts[p]!="string"?(this.warn("nonStringScript"),delete l.scripts[p]):a.script[p]&&!l.scripts[a.script[p]]&&this.warn("typo",p,a.script[p],"scripts")},this)}},fixFilesField:function(l){var p=l.files;p&&!Array.isArray(p)?(this.warn("nonArrayFiles"),delete l.files):l.files&&(l.files=l.files.filter(function(d){return!d||typeof d!="string"?(this.warn("invalidFilename",d),!1):!0},this))},fixBinField:function(l){if(l.bin&&typeof l.bin=="string"){var p={},d;(d=l.name.match(/^@[^/]+[/](.*)$/))?p[d[1]]=l.bin:p[l.name]=l.bin,l.bin=p}},fixManField:function(l){l.man&&typeof l.man=="string"&&(l.man=[l.man])},fixBundleDependenciesField:function(l){var p="bundledDependencies",d="bundleDependencies";l[p]&&!l[d]&&(l[d]=l[p],delete l[p]),l[d]&&!Array.isArray(l[d])?(this.warn("nonArrayBundleDependencies"),delete l[d]):l[d]&&(l[d]=l[d].filter(function(P){return!P||typeof P!="string"?(this.warn("nonStringBundleDependency",P),!1):(l.dependencies||(l.dependencies={}),Object.prototype.hasOwnProperty.call(l.dependencies,P)||(this.warn("nonDependencyBundleDependency",P),l.dependencies[P]="*"),!0)},this))},fixDependencies:function(l){S(l,this.warn),L(l),this.fixBundleDependenciesField(l),["dependencies","devDependencies"].forEach(function(p){if(p in l){if(!l[p]||typeof l[p]!="object"){this.warn("nonObjectDependencies",p),delete l[p];return}Object.keys(l[p]).forEach(function(d){var P=l[p][d];typeof P!="string"&&(this.warn("nonStringDependency",d,JSON.stringify(P)),delete l[p][d]);var D=s.fromUrl(l[p][d]);D&&(l[p][d]=D.toString())},this)}},this)},fixModulesField:function(l){l.modules&&(this.warn("deprecatedModules"),delete l.modules)},fixKeywordsField:function(l){typeof l.keywords=="string"&&(l.keywords=l.keywords.split(/,\s+/)),l.keywords&&!Array.isArray(l.keywords)?(delete l.keywords,this.warn("nonArrayKeywords")):l.keywords&&(l.keywords=l.keywords.filter(function(p){return typeof p!="string"||!p?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(l,p){var d=!p;if(!l.version)return l.version="",!0;if(!e(l.version,d))throw new Error('Invalid version: "'+l.version+'"');return l.version=t(l.version,d),!0},fixPeople:function(l){y(l,b),y(l,m)},fixNameField:function(l,p){typeof p=="boolean"?p={strict:p}:typeof p>"u"&&(p={});var d=p.strict;if(!l.name&&!d){l.name="";return}if(typeof l.name!="string")throw new Error("name field must be a string.");d||(l.name=l.name.trim()),v(l.name,d,p.allowLegacyCase),r(l.name)&&this.warn("conflictingName",l.name)},fixDescriptionField:function(l){l.description&&typeof l.description!="string"&&(this.warn("nonStringDescription"),delete l.description),l.readme&&!l.description&&(l.description=n(l.readme)),l.description===void 0&&delete l.description,l.description||this.warn("missingDescription")},fixReadmeField:function(l){l.readme||(this.warn("missingReadme"),l.readme="ERROR: No README data found!")},fixBugsField:function(l){if(!l.bugs&&l.repository&&l.repository.url){var p=s.fromUrl(l.repository.url);p&&p.bugs()&&(l.bugs={url:p.bugs()})}else if(l.bugs){if(typeof l.bugs=="string")u(l.bugs)?l.bugs={email:l.bugs}:c.canParse(l.bugs)?l.bugs={url:l.bugs}:this.warn("nonEmailUrlBugsString");else{C(l.bugs,this.warn);var d=l.bugs;l.bugs={},d.url&&(c.canParse(d.url)?l.bugs.url=d.url:this.warn("nonUrlBugsUrlField")),d.email&&(typeof d.email=="string"&&u(d.email)?l.bugs.email=d.email:this.warn("nonEmailBugsEmailField"))}!l.bugs.email&&!l.bugs.url&&(delete l.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(l){if(!l.homepage&&l.repository&&l.repository.url){var p=s.fromUrl(l.repository.url);p&&p.docs()&&(l.homepage=p.docs())}if(l.homepage){if(typeof l.homepage!="string")return this.warn("nonUrlHomepage"),delete l.homepage;c.canParse(l.homepage)||(l.homepage="http://"+l.homepage)}},fixLicenseField:function(l){const p=l.license||l.licence;if(!p)return this.warn("missingLicense");if(typeof p!="string"||p.length<1||p.trim()==="")return this.warn("invalidLicense");if(!i(p).validForNewPackages)return this.warn("invalidLicense")}};function f(l){if(l.charAt(0)!=="@")return!1;var p=l.slice(1).split("/");return p.length!==2?!1:p[0]&&p[1]&&p[0]===encodeURIComponent(p[0])&&p[1]===encodeURIComponent(p[1])}function g(l){return!l.match(/[/@\s+%:]/)&&l===encodeURIComponent(l)}function v(l,p,d){if(l.charAt(0)==="."||!(f(l)||g(l))||p&&!d&&l!==l.toLowerCase()||l.toLowerCase()==="node_modules"||l.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(l))}function y(l,p){return l.author&&(l.author=p(l.author)),["maintainers","contributors"].forEach(function(d){Array.isArray(l[d])&&(l[d]=l[d].map(p))}),l}function b(l){if(typeof l=="string")return l;var p=l.name||"",d=l.url||l.web,P=d?" ("+d+")":"",D=l.email||l.mail,A=D?" <"+D+">":"";return p+A+P}function m(l){if(typeof l!="string")return l;var p=l.match(/^([^(<]+)/),d=l.match(/\(([^()]+)\)/),P=l.match(/<([^<>]+)>/),D={};return p&&p[0].trim()&&(D.name=p[0].trim()),P&&(D.email=P[1]),d&&(D.url=d[1]),D}function L(l){var p=l.optionalDependencies;if(p){var d=l.dependencies||{};Object.keys(p).forEach(function(P){d[P]=p[P]}),l.dependencies=d}}function h(l,p,d){if(!l)return{};if(typeof l=="string"&&(l=l.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(l))return l;d("deprecatedArrayDependencies",p);var P={};return l.filter(function(D){return typeof D=="string"}).forEach(function(D){D=D.trim().split(/(:?[@\s><=])/);var A=D.shift(),E=D.join("");E=E.trim(),E=E.replace(/^@/,""),P[A]=E}),P}function S(l,p){o.forEach(function(d){l[d]&&(l[d]=h(l[d],d,p))})}function C(l,p){l&&Object.keys(l).forEach(function(d){a.bugs[d]&&(p("typo",d,a.bugs[d],"bugs"),l[a.bugs[d]]=l[d],delete l[d])})}return ge}var at="'repositories' (plural) Not supported. Please pick one as the 'repository' field",lt="No repository field.",ct="Probably broken git url: %s",ht="scripts must be an object",ut="script values must be string commands",pt="Invalid 'files' member",ft="Invalid filename in 'files' list: %s",dt="Invalid 'bundleDependencies' list. Must be array of package names",mt="Invalid bundleDependencies member: %s",gt="Non-dependency in bundleDependencies: %s",Lt="%s field must be an object",St="Invalid dependency: %s %s",vt="specifying %s as array is deprecated",yt="modules field is deprecated",bt="keywords should be an array of strings",Ct="keywords should be an array of strings",Pt="%s is also the name of a node core module.",Dt="'description' field should be a string",wt="No description",xt="No README data",At="No license field.",Et="Bug string field must be url, email, or {email,url}",$t="bugs.url field must be a string url. Deleted.",Ot="bugs.email field must be a string email. Deleted.",Nt="Normalized value of bugs field is an empty object. Deleted.",Ft="homepage field must be a string url. Deleted.",Tt="license should be a valid SPDX license expression",Gt="%s should probably be %s.";const ji={repositories:at,missingRepository:lt,brokenGitUrl:ct,nonObjectScripts:ht,nonStringScript:ut,nonArrayFiles:pt,invalidFilename:ft,nonArrayBundleDependencies:dt,nonStringBundleDependency:mt,nonDependencyBundleDependency:gt,nonObjectDependencies:Lt,nonStringDependency:St,deprecatedArrayDependencies:vt,deprecatedModules:yt,nonArrayKeywords:bt,nonStringKeyword:Ct,conflictingName:Pt,nonStringDescription:Dt,missingDescription:wt,missingReadme:xt,missingLicense:At,nonEmailUrlBugsString:Et,nonUrlBugsUrlField:$t,nonEmailBugsEmailField:Ot,emptyNormalizedBugs:Nt,nonUrlHomepage:Ft,invalidLicense:Tt,typo:Gt},Wi=Object.defineProperty({__proto__:null,brokenGitUrl:ct,conflictingName:Pt,default:ji,deprecatedArrayDependencies:vt,deprecatedModules:yt,emptyNormalizedBugs:Nt,invalidFilename:ft,invalidLicense:Tt,missingDescription:wt,missingLicense:At,missingReadme:xt,missingRepository:lt,nonArrayBundleDependencies:dt,nonArrayFiles:pt,nonArrayKeywords:bt,nonDependencyBundleDependency:gt,nonEmailBugsEmailField:Ot,nonEmailUrlBugsString:Et,nonObjectDependencies:Lt,nonObjectScripts:ht,nonStringBundleDependency:mt,nonStringDependency:St,nonStringDescription:Dt,nonStringKeyword:Ct,nonStringScript:ut,nonUrlBugsUrlField:$t,nonUrlHomepage:Ft,repositories:at,typo:Gt},Symbol.toStringTag,{value:"Module"}),_i=ve(Wi);var Le,Me;function Hi(){if(Me)return Le;Me=1;var c=Yt,e=_i;Le=function(){var i=Array.prototype.slice.call(arguments,0),s=i.shift();if(s==="typo")return t.apply(null,i);var r=e[s]?e[s]:s+": '%s'";return i.unshift(r),c.format.apply(null,i)};function t(i,s,r){return r&&(i=r+"['"+i+"']",s=r+"['"+s+"']"),c.format(e.typo,i,s)}return Le}var Se,je;function zi(){if(je)return Se;je=1,Se=r;var c=Mi();r.fixer=c;var e=Hi(),t=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],i=["dependencies","people","typos"],s=t.map(function(n){return o(n)+"Field"});s=s.concat(i);function r(n,a,u){a===!0&&(a=null,u=!0),u||(u=!1),(!a||n.private)&&(a=function(){}),n.scripts&&n.scripts.install==="node-gyp rebuild"&&!n.scripts.preinstall&&(n.gypfile=!0),c.warn=function(){a(e.apply(null,arguments))},s.forEach(function(f){c["fix"+o(f)](n,u)}),n._id=n.name+"@"+n.version}function o(n){return n.charAt(0).toUpperCase()+n.slice(1)}return Se}var Yi=zi();const qi=_t(Yi),Vi=(c,e,t)=>{const i=$(c),s=$(e),r=s===i?".":Ut(i,s);return t.some(o=>{const n=o.startsWith("./")?o.slice(2):o,a=r.startsWith("./")?r.slice(2):r;if(n==="."&&a===".")return!0;if(n.endsWith("/**")){const u=n.slice(0,-3);return a===u||a.startsWith(`${u}/`)}if(n.endsWith("/*")){const u=n.slice(0,-2);return u===""?a!=="."&&!a.includes("/"):a.startsWith(`${u}/`)||a===u}return a===n||a.startsWith(`${n}/`)})},Ki=c=>{const e=X("pnpm-workspace.yaml",{cwd:$(c),type:"file"});if(!e)return;const t=He(e),i=Array.isArray(t.packages)?t.packages:[];if(!Vi(e,c,i))return;const s={};return t.catalog&&typeof t.catalog=="object"&&(s.catalog=t.catalog),t.catalogs&&typeof t.catalogs=="object"&&(s.catalogs=t.catalogs),Object.keys(s).length>0?s:void 0},Ji=(c,e,t)=>{if(e==="catalog:")return t.catalog?.[c];if(e.startsWith("catalog:")){const i=e.slice(8);return t.catalogs?.[i]?.[c]}},Xi=(c,e)=>{for(const[t,i]of Object.entries(c)){if(typeof i!="string")continue;const s=Ji(t,i,e);s&&(c[t]=s)}},Zi=(c,e)=>{const t=["dependencies","devDependencies","peerDependencies","optionalDependencies"];for(const i of t){if(!c[i]||typeof c[i]!="object")continue;const s=c[i];Xi(s,e)}},Qi=Y(import.meta.url),W=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ye=c=>{if(typeof W<"u"&&W.versions&&W.versions.node){const[e,t]=W.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return W.getBuiltinModule(c)}return Qi(c)};ye("node:fs");ye("node:readline");ye("node:util");const er=/, ([^,]*)$/,tr=new Map,ir=(c,e={})=>`${c}|s${String(e.strict?1:0)}|c${String(e.resolveCatalogs?1:0)}|j${String(e.json5===!1?0:1)}|y${String(e.yaml===!1?0:1)}|w${String(e.ignoreWarnings?1:0)}`;class rr extends Error{constructor(e){super(`The following warnings were encountered while normalizing package data:
3
3
  - ${e.join(`
4
- - `)}`),this.name="PackageJsonValidationError"}}const sr=(c,e,t=[])=>{const i=[];if(qi(c,s=>{i.push(s)},e),e&&i.length>0){const s=i.filter(r=>!t.some(o=>o instanceof RegExp?o.test(r):o===r));if(s.length>0)throw new rr(s)}return c},nr=c=>He(c),or=c=>{const e=Mt(c);return jt.parse(e)},ar=(c,e)=>e?.yaml!==!1&&(c.endsWith(".yaml")||c.endsWith(".yml"))?nr(c):e?.json5!==!1&&c.endsWith(".json5")?or(c):ze(c),lr=(c,e={})=>{const t={type:"file"};c&&(t.cwd=c);const i=["package.json"];e.yaml!==!1&&i.push("package.yaml","package.yml"),e.json5!==!1&&i.push("package.json5");const s=X(i,t);if(!s)throw new K(`No such file or directory, for ${i.join(", ").replace(er," or $1")} found.`);const r=e.cache&&typeof e.cache!="boolean"?e.cache:tr,o=ir(s,e);if(e.cache&&r.has(o))return r.get(o);const n=ar(s,e);if(e.resolveCatalogs){const u=Ki(s);u&&Zi(n,u)}sr(n,e.strict??!1,e.ignoreWarnings);const a={packageJson:n,path:s};return e.cache&&r.set(o,a),a};var cr="1.0.6";const hr={version:cr},ur=hr.version,pr="@visulima/vis";let F;const Nr=()=>{if(F!==void 0)return F;const c=process.env.VIS_VERSION;if(c)return F=c,F;try{const{packageJson:e}=lr(It(kt(import.meta.url)),{json5:!1,yaml:!1});if(e.name===pr&&typeof e.version=="string")return F=e.version,F}catch{}return F=ur,F};export{$r as D,Qt as P,Or as S,Er as T,yr as a,wr as b,Cr as c,Dr as g,Pr as h,vr as i,Nr as m,xr as p,br as t,Ar as u};
4
+ - `)}`),this.name="PackageJsonValidationError"}}const sr=(c,e,t=[])=>{const i=[];if(qi(c,s=>{i.push(s)},e),e&&i.length>0){const s=i.filter(r=>!t.some(o=>o instanceof RegExp?o.test(r):o===r));if(s.length>0)throw new rr(s)}return c},nr=c=>He(c),or=c=>{const e=Mt(c);return jt.parse(e)},ar=(c,e)=>e?.yaml!==!1&&(c.endsWith(".yaml")||c.endsWith(".yml"))?nr(c):e?.json5!==!1&&c.endsWith(".json5")?or(c):ze(c),lr=(c,e={})=>{const t={type:"file"};c&&(t.cwd=c);const i=["package.json"];e.yaml!==!1&&i.push("package.yaml","package.yml"),e.json5!==!1&&i.push("package.json5");const s=X(i,t);if(!s)throw new K(`No such file or directory, for ${i.join(", ").replace(er," or $1")} found.`);const r=e.cache&&typeof e.cache!="boolean"?e.cache:tr,o=ir(s,e);if(e.cache&&r.has(o))return r.get(o);const n=ar(s,e);if(e.resolveCatalogs){const u=Ki(s);u&&Zi(n,u)}sr(n,e.strict??!1,e.ignoreWarnings);const a={packageJson:n,path:s};return e.cache&&r.set(o,a),a};var cr="1.0.8";const hr={version:cr},ur=hr.version,pr="@visulima/vis";let F;const Nr=()=>{if(F!==void 0)return F;const c=process.env.VIS_VERSION;if(c)return F=c,F;try{const{packageJson:e}=lr(It(kt(import.meta.url)),{json5:!1,yaml:!1});if(e.name===pr&&typeof e.version=="string")return F=e.version,F}catch{}return F=ur,F};export{$r as D,Qt as P,Or as S,Er as T,yr as a,wr as b,Cr as c,Dr as g,Pr as h,vr as i,Nr as m,xr as p,br as t,Ar as u};
@@ -1 +1 @@
1
- import{createRequire as b}from"node:module";import{f as w,a as T,m}from"./index-D75r1yKp.js";import{s as j}from"./index-BAe6e0XE.js";import{g as S}from"./en-BRcjb70R.js";import{a as C}from"./readJsonSync-DuMMeB3s-wlhgSHes.js";const h=b(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,s]=u.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return u.getBuiltinModule(t)}return h(t)},{rmSync:p,writeFileSync:_}=k("node:fs"),f=3,R=1800*1e3,U=15e3,g=()=>m(S(),"packuments"),y=t=>m(g(),`${encodeURIComponent(t)}.json`),$=t=>{const e=y(t);if(w(e))try{const s=C(e);if(s.cacheVersion!==f){p(e,{force:!0});return}if(Date.now()-s.createdAt>s.ttlMs){p(e,{force:!0});return}return s.packument}catch{p(e,{force:!0});return}},z=(t,e,s)=>{T(g());const n={cacheVersion:f,createdAt:Date.now(),packument:e,ttlMs:s};_(y(t),JSON.stringify(n),"utf8")},F=t=>{const e={},s=t.versions??{};for(const[c,r]of Object.entries(s)){const i=r.dist,o={version:c};if(r._npmUser!==void 0&&(o._npmUser=r._npmUser),r.maintainers!==void 0&&(o.maintainers=r.maintainers),r.bin!==void 0&&(o.bin=r.bin),i!==void 0){const a={};i.signatures!==void 0&&(a.signatures=i.signatures),i.attestations!==void 0&&(a.attestations=i.attestations),typeof i.integrity=="string"&&(a.integrity=i.integrity),typeof i.tarball=="string"&&(a.tarball=i.tarball),typeof i.unpackedSize=="number"&&Number.isFinite(i.unpackedSize)&&i.unpackedSize>=0&&(a.unpackedSize=i.unpackedSize),typeof i.fileCount=="number"&&Number.isInteger(i.fileCount)&&i.fileCount>=0&&(a.fileCount=i.fileCount),o.dist=a}r.repository!==void 0&&(o.repository=r.repository),r.license!==void 0&&(o.license=r.license),typeof r.readme=="string"&&(o.readme=r.readme),typeof r.readmeFilename=="string"&&(o.readmeFilename=r.readmeFilename),typeof r.private=="boolean"&&(o.private=r.private),typeof r.deprecated=="string"&&(o.deprecated=r.deprecated),r.scripts!==void 0&&typeof r.scripts=="object"&&(o.scripts=r.scripts),e[c]=o}const n={name:typeof t.name=="string"?t.name:"",versions:e};return t["dist-tags"]!==void 0&&(n["dist-tags"]=t["dist-tags"]),t.time!==void 0&&(n.time=t.time),typeof t.readme=="string"&&(n.readme=t.readme),n},M=t=>{const e={Accept:"application/json"};return t!==void 0&&t!==""&&(e.Authorization=`Bearer ${t}`),e},A=async(t,e)=>{if(e.registryUrl!==void 0)return{authToken:e.authToken,url:e.registryUrl};if(e.workspaceRoot!==void 0){const{getRegistryForPackage:s,loadNpmrc:n}=await import("../packem_chunks/catalog.js").then(o=>o.a3),c=n(e.workspaceRoot),{token:r,url:i}=s(t,c);return{authToken:e.authToken??r,url:i}}return{authToken:e.authToken,url:"https://registry.npmjs.org"}},P=async(t,e={})=>{const s=e.cacheTtlMs??R,n=$(t);if(n!==void 0)return n;if(e.offline)return;const c=await A(t,e),r=`${c.url.endsWith("/")?c.url.slice(0,-1):c.url}/${t.replace("/","%2f")}`,i=new AbortController,o=setTimeout(()=>{i.abort()},U),a=()=>{i.abort()};e.signal?.addEventListener("abort",a,{once:!0});try{const d=await fetch(r,{headers:M(c.authToken),signal:i.signal});if(d.status===404)return;if(!d.ok)throw new Error(`Registry returned ${String(d.status)} for ${t}`);const v=await d.json(),l=F(v);return z(t,l,s),l}finally{clearTimeout(o),e.signal?.removeEventListener("abort",a)}},q=(t,e)=>{const s=Object.keys(t.versions);if(s.length===0)return;if(e===void 0||e===""||e==="latest")return t["dist-tags"]?.latest??s.at(-1);const n=t["dist-tags"]?.[e];return n!==void 0?n:Object.hasOwn(t.versions,e)?e:j.maxSatisfying(s,e)??void 0};export{P as g,q as r};
1
+ import{createRequire as b}from"node:module";import{f as w,a as T,m}from"./index-2LCHaVNX.js";import{s as j}from"./index-BAe6e0XE.js";import{g as S}from"./en-C26W78--.js";import{a as C}from"./readJsonSync-DuMMeB3s-B9cGBVbJ.js";const h=b(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,s]=u.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return u.getBuiltinModule(t)}return h(t)},{rmSync:p,writeFileSync:_}=k("node:fs"),f=3,R=1800*1e3,U=15e3,g=()=>m(S(),"packuments"),y=t=>m(g(),`${encodeURIComponent(t)}.json`),$=t=>{const e=y(t);if(w(e))try{const s=C(e);if(s.cacheVersion!==f){p(e,{force:!0});return}if(Date.now()-s.createdAt>s.ttlMs){p(e,{force:!0});return}return s.packument}catch{p(e,{force:!0});return}},z=(t,e,s)=>{T(g());const n={cacheVersion:f,createdAt:Date.now(),packument:e,ttlMs:s};_(y(t),JSON.stringify(n),"utf8")},F=t=>{const e={},s=t.versions??{};for(const[c,r]of Object.entries(s)){const i=r.dist,o={version:c};if(r._npmUser!==void 0&&(o._npmUser=r._npmUser),r.maintainers!==void 0&&(o.maintainers=r.maintainers),r.bin!==void 0&&(o.bin=r.bin),i!==void 0){const a={};i.signatures!==void 0&&(a.signatures=i.signatures),i.attestations!==void 0&&(a.attestations=i.attestations),typeof i.integrity=="string"&&(a.integrity=i.integrity),typeof i.tarball=="string"&&(a.tarball=i.tarball),typeof i.unpackedSize=="number"&&Number.isFinite(i.unpackedSize)&&i.unpackedSize>=0&&(a.unpackedSize=i.unpackedSize),typeof i.fileCount=="number"&&Number.isInteger(i.fileCount)&&i.fileCount>=0&&(a.fileCount=i.fileCount),o.dist=a}r.repository!==void 0&&(o.repository=r.repository),r.license!==void 0&&(o.license=r.license),typeof r.readme=="string"&&(o.readme=r.readme),typeof r.readmeFilename=="string"&&(o.readmeFilename=r.readmeFilename),typeof r.private=="boolean"&&(o.private=r.private),typeof r.deprecated=="string"&&(o.deprecated=r.deprecated),r.scripts!==void 0&&typeof r.scripts=="object"&&(o.scripts=r.scripts),e[c]=o}const n={name:typeof t.name=="string"?t.name:"",versions:e};return t["dist-tags"]!==void 0&&(n["dist-tags"]=t["dist-tags"]),t.time!==void 0&&(n.time=t.time),typeof t.readme=="string"&&(n.readme=t.readme),n},M=t=>{const e={Accept:"application/json"};return t!==void 0&&t!==""&&(e.Authorization=`Bearer ${t}`),e},A=async(t,e)=>{if(e.registryUrl!==void 0)return{authToken:e.authToken,url:e.registryUrl};if(e.workspaceRoot!==void 0){const{getRegistryForPackage:s,loadNpmrc:n}=await import("../packem_chunks/catalog.js").then(o=>o.a0),c=n(e.workspaceRoot),{token:r,url:i}=s(t,c);return{authToken:e.authToken??r,url:i}}return{authToken:e.authToken,url:"https://registry.npmjs.org"}},P=async(t,e={})=>{const s=e.cacheTtlMs??R,n=$(t);if(n!==void 0)return n;if(e.offline)return;const c=await A(t,e),r=`${c.url.endsWith("/")?c.url.slice(0,-1):c.url}/${t.replace("/","%2f")}`,i=new AbortController,o=setTimeout(()=>{i.abort()},U),a=()=>{i.abort()};e.signal?.addEventListener("abort",a,{once:!0});try{const d=await fetch(r,{headers:M(c.authToken),signal:i.signal});if(d.status===404)return;if(!d.ok)throw new Error(`Registry returned ${String(d.status)} for ${t}`);const v=await d.json(),l=F(v);return z(t,l,s),l}finally{clearTimeout(o),e.signal?.removeEventListener("abort",a)}},q=(t,e)=>{const s=Object.keys(t.versions);if(s.length===0)return;if(e===void 0||e===""||e==="latest")return t["dist-tags"]?.latest??s.at(-1);const n=t["dist-tags"]?.[e];return n!==void 0?n:Object.hasOwn(t.versions,e)?e:j.maxSatisfying(s,e)??void 0};export{P as g,q as r};
@@ -1 +1 @@
1
- import{createRequire as N}from"node:module";import{f as j,m as v,H as S,j as R,v as J}from"./index-D75r1yKp.js";import{withEnhancedPath as z,collectNodeModulesBinDirs as H}from"@visulima/task-runner";import{s as $}from"./index-BAe6e0XE.js";import{resolveDlx as F,whichBin as V,detectPackageManager as Y,execPmCommandInteractive as G,resolveAdd as K,resolveRemove as Q,resolveDedupe as X,resolveWhy as Z,resolveLink as ee,resolveUnlink as ne,resolvePmCommand as se,resolveInstall as re,resolveExec as ae}from"#native";const T=N(import.meta.url),b=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,B=e=>{if(typeof b<"u"&&b.versions&&b.versions.node){const[n,s]=b.versions.node.split(".").map(Number);if(n>22||n===22&&s>=3||n===20&&s>=16)return b.getBuiltinModule(e)}return T(e)},{spawn:q,spawnSync:E}=B("node:child_process"),h=(e,n,s,r)=>{for(const a of n)e.push("--filter",a);s&&e.push("--recursive"),r&&e.push("--workspace-root")},oe=e=>{const n=[],s=[];return h(n,e.filter,e.recursive,e.workspaceRoot),e.silent&&n.push("--silent"),e.frozenLockfile&&n.push("--frozen-lockfile"),n.push("install"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.force&&n.push("--force"),e.ignoreScripts&&n.push("--ignore-scripts"),e.lockfileOnly&&n.push("--lockfile-only"),e.noOptional&&n.push("--no-optional"),e.offline&&n.push("--offline"),{args:n,bin:"aube",warnings:s}},ie=e=>{const n=[],s=[];return h(n,e.filter,!1,!1),n.push("add"),e.saveDev&&n.push("--save-dev"),e.exact&&n.push("--save-exact"),e.global&&n.push("--global"),e.optional&&n.push("--save-optional"),e.peer&&n.push("--save-peer"),e.workspace&&s.push("aube has no flag for the `workspace:` protocol; it auto-detects local workspace members during add. Ignoring --workspace."),e.workspaceRoot&&n.push("--workspace"),n.push(...e.packages),{args:n,bin:"aube",warnings:s}},te=e=>{const n=[];return h(n,e.filter,e.recursive,!1),n.push("remove"),e.saveDev&&n.push("--save-dev"),e.global&&n.push("--global"),e.workspaceRoot&&n.push("--workspace"),n.push(...e.packages),{args:n,bin:"aube",warnings:[]}},pe=e=>{const n=["dedupe"];return e&&n.push("--check"),{args:n,bin:"aube",warnings:[]}},ue=e=>{const n=[],s=[];h(n,e.filter,e.recursive,!1),n.push("why"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.json&&n.push("--json"),e.long&&n.push("--long"),e.parseable&&n.push("--parseable"),e.depth!==void 0&&s.push("aube why does not accept --depth; ignoring."),e.noOptional&&s.push("aube why does not accept --no-optional; ignoring."),e.global&&s.push("aube why does not accept --global; ignoring.");const[r,...a]=e.packages;return r===void 0?s.push("aube why requires a package name; none provided."):(a.length>0&&s.push("aube why takes a single package; using the first."),n.push(r)),{args:n,bin:"aube",warnings:s}},ce=e=>{const n=[];e.silent&&n.push("--silent"),n.push("dlx");for(const s of e.additionalPackages)n.push("--package",s);return e.shellMode&&n.push("--shell-mode"),n.push(e.package),n.push(...e.args),{args:n,bin:"aube",warnings:[]}},le=e=>{const n=[];return h(n,e.filter,e.recursive,e.workspaceRoot),n.push("exec"),e.parallel&&n.push("--parallel"),e.reverse&&n.push("--reverse"),e.shellMode&&n.push("--shell-mode"),n.push(e.command),n.push(...e.args),{args:n,bin:"aube",warnings:[]}},ge=e=>{const n=["link"];return e!==null&&n.push(e),{args:n,bin:"aube",warnings:[]}},de=(e,n)=>{const s=[],r=[];return n&&s.push("--recursive"),s.push("unlink"),e.length>1&&r.push("aube unlink takes a single package; using the first."),e.length>0&&s.push(e[0]),{args:s,bin:"aube",warnings:r}},he=e=>{const n=["view","--",e.package],s=[],[r,...a]=e.fields;return r!==void 0?(a.length>0&&s.push("aube view only supports a single field; using the first."),e.json&&s.push("aube view does not support --json with a field selector; printing the field without --json."),n.push(r)):e.json&&n.push("--json"),{args:n,bin:"aube",warnings:s}},Je=e=>{const n=[],s=[];return h(n,e.filters,e.recursive,e.workspaceRoot),n.push("update"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.global&&n.push("--global"),e.interactive&&n.push("--interactive"),e.latest&&n.push("--latest"),e.noOptional&&n.push("--no-optional"),e.noSave&&n.push("--no-save"),n.push(...e.packages),{args:n,bin:"aube",warnings:s}},fe=new Set(["fund","ping","search","token"]),me=(e,n)=>fe.has(e)?{args:[e,...n],bin:"npm",warnings:[`'${e}' is not natively supported by aube. Delegating to npm.`]}:{args:[e,...n],bin:"aube",warnings:[]},k=256*1024,be=e=>{const n=e?{...process.env,...e}:{...process.env};return process.stderr.isTTY&&n.FORCE_COLOR===void 0&&n.NO_COLOR===void 0&&(n.FORCE_COLOR="1"),n},W=e=>e!==""&&!/[\s"&()<>^|%!]/u.test(e)?e:`"${e.replaceAll(/(\\*)"/gu,String.raw`$1$1\"`).replace(/(\\+)$/u,"$1$1").replaceAll(/[&()<>^|%!]/gu,String.raw`^$&`)}"`,ke=async(e,n,s)=>new Promise((r,a)=>{const o=process.platform==="win32",i=q(o?W(e):e,o?n.map(t=>W(t)):[...n],{cwd:s.cwd,env:be(s.env),shell:o,stdio:["inherit","pipe","pipe"],windowsHide:!0});let u=[],l=0;const g=t=>{if(u.push(t),l+=t.length,!(l<=k)){for(;u.length>1&&l-u[0].length>k;)l-=u.shift().length;if(u.length===1&&l>k){const d=u[0];u[0]=d.subarray(d.length-k),l=k}}},m=()=>Buffer.concat(u).toString("utf8");i.stdout?.on("data",t=>{process.stdout.write(t),g(t)}),i.stderr?.on("data",t=>{process.stderr.write(t),g(t)}),i.on("error",a),i.on("close",t=>{const d=m();u=[],r({code:t??1,output:d})})}),w=e=>{const n=$.coerce(e);return n?$.gte(n,"11.0.0"):!1},c=e=>e.name==="yarn"&&!e.version.startsWith("1."),x=e=>e.name==="yarn"&&e.version.startsWith("1."),we=e=>e[0]==="rm"?["remove",...e.slice(1)]:e,ve=(e,n,s)=>{switch(n){case"audit":return c(e)?{args:["npm","audit",...s],bin:"yarn",kind:"rewrite"}:{kind:"passthrough"};case"config":{if(c(e)){const[r,...a]=s;return r==="delete"?{args:["config","unset",...a],bin:"yarn",kind:"rewrite",warning:"yarn berry uses `config unset`, not `config delete`."}:{kind:"passthrough"}}return e.name==="bun"?{kind:"skip",warning:"bun has no `config` CLI. Edit bunfig.toml or .npmrc directly."}:e.name==="deno"?{kind:"skip",warning:"deno has no registry-config CLI. Edit deno.json directly."}:{kind:"passthrough"}}case"dist-tag":return x(e)?{args:["tag",...s],bin:"yarn",kind:"rewrite",warning:"yarn 1 has no `dist-tag`; using `yarn tag`."}:c(e)?{args:["npm","tag",...we(s)],bin:"yarn",kind:"rewrite"}:e.name==="bun"||e.name==="deno"?{kind:"skip",warning:`${e.name} has no \`dist-tag\`. Use \`npm dist-tag\` instead.`}:{kind:"passthrough"};case"login":case"logout":return c(e)?{args:["npm",n,...s],bin:"yarn",kind:"rewrite"}:e.name==="bun"?{args:[n,...s],bin:"npm",kind:"rewrite",warning:`bun has no \`${n}\`; falling back to \`npm ${n}\` (writes ~/.npmrc, which bun reads).`}:e.name==="deno"?{kind:"skip",warning:`deno has no \`${n}\`. JSR uses browser OAuth via \`deno publish\`.`}:{kind:"passthrough"};case"owner":return e.name==="pnpm"&&w(e.version)?{args:["owner",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `owner`; falling back to `npm owner`."}:c(e)?{args:["owner",...s],bin:"npm",kind:"rewrite",warning:"yarn berry has no `owner` (not in `yarn npm`); falling back to `npm owner`."}:e.name==="bun"?{args:["owner",...s],bin:"npm",kind:"rewrite",warning:"bun has no `owner`; falling back to `npm owner`."}:e.name==="deno"?{kind:"skip",warning:"deno has no `owner`. JSR uses scope-member roles via the web UI."}:{kind:"passthrough"};case"ping":return e.name==="pnpm"&&w(e.version)?{args:["ping",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `ping`; falling back to `npm ping`."}:{kind:"passthrough"};case"plugin":return c(e)?{kind:"passthrough"}:{kind:"skip",warning:`${e.name} does not support yarn-style plugins. Skipping (no-op).`};case"prune":return x(e)?{kind:"skip",warning:"yarn 1 has no `prune`. Use `yarn install --production` for a prod-only tree."}:c(e)?{kind:"skip",warning:"yarn berry has no `prune`. Use `yarn workspaces focus --production` instead."}:e.name==="bun"||e.name==="deno"?{kind:"skip",warning:`${e.name} has no \`prune\`. Pruning happens automatically on install.`}:{kind:"passthrough"};case"publish":return c(e)?{args:["npm","publish",...s],bin:"yarn",kind:"rewrite"}:{kind:"passthrough"};case"rebuild":return x(e)?{kind:"skip",warning:"yarn 1 has no `rebuild`. Re-install instead."}:e.name==="bun"?{kind:"skip",warning:"bun has no `rebuild`. Use `bun install --force` instead."}:e.name==="deno"?{kind:"skip",warning:"deno has no `rebuild`."}:{kind:"passthrough"};case"search":return e.name==="pnpm"&&w(e.version)?{args:["search",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `search`; falling back to `npm search`."}:{kind:"passthrough"};case"token":return e.name==="pnpm"&&w(e.version)?{args:["token",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `token`; falling back to `npm token`."}:{kind:"passthrough"};case"whoami":return e.name==="pnpm"&&w(e.version)?{args:["whoami",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `whoami`; falling back to `npm whoami`."}:c(e)?{args:["npm","whoami",...s],bin:"yarn",kind:"rewrite"}:e.name==="bun"?{args:["pm","whoami",...s],bin:"bun",kind:"rewrite"}:e.name==="deno"?{kind:"skip",warning:"deno has no `whoami`. JSR uses browser auth."}:{kind:"passthrough"};default:return{kind:"passthrough"}}},O=e=>V(e)!==null,ye=e=>{const n=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"],["bun.lock","bun"],["bun.lockb","bun"],["deno.lock","deno"]];let s=e;for(;;){for(const[a,o]of n)if(j(v(s,a)))return o;const r=S(s);if(r===s||R(s).root===s)return;s=r}},ze=(e,n)=>{if(n.name!=="aube")return;const s=ye(e);if(s!==void 0)return`Resolved installer is aube but the workspace has a ${s} lockfile. Aube reads and writes ${s}'s lockfile format in place, but its byte output may differ subtly — expect a one-time churn diff on the first install, and ongoing drift if your team mixes tools on the same lockfile. To pin the choice across the team, set \`install.backend\` in vis.config; to bypass aube for this run, pass --no-aube.`},C=e=>{if(j(e))try{return JSON.parse(J(e,{buffer:!1}))}catch{return}},$e=e=>{let n=e;for(;;){const s=v(n,"package.json"),r=C(s);if(r&&typeof r.packageManager=="string"&&r.packageManager.length>0)return r.packageManager;const a=S(n);if(a===n||R(n).root===n)return;n=a}},P=new Set(["npm","pnpm","yarn"]),M=(e,n,s)=>s===!1||!P.has(n)||!O("corepack")?!1:s===!0?!0:$e(e)!==void 0,He=(e,n)=>{const s=n.backend,r=process.env.VIS_INSTALLER,a=s??r??n.configBackend,o=n.configCorepack??"auto";if(a&&a!=="auto"){if(a==="aube"&&!O("aube"))throw new Error('install.backend is set to "aube" but the `aube` binary is not on PATH. Install it via `npm i -g @endevco/aube`, `mise use -g aube`, or `brew install endevco/tap/aube`.');return{name:a,useCorepack:M(e,a,o),version:"latest"}}if(O("aube"))return{name:"aube",useCorepack:!1,version:"latest"};const i=je(e);return{...i,useCorepack:M(e,i.name,o)}},je=e=>{if(!j(e))throw new Error(`Could not detect package manager in ${e}. Directory does not exist.`);const n=Y(e);return{name:n.name,version:n.version||"latest"}},L=(e,n)=>n.useCorepack!==!0||!P.has(n.name)||e.bin==="corepack"||e.bin!==n.name?e:{...e,args:[n.name,...e.args],bin:"corepack"},xe=(e,n,s)=>{if(s===void 0)return G(e.bin,e.args,n);const r=E(e.bin,e.args,{cwd:n,env:{...process.env,...s},stdio:"inherit"});if(r.error)throw r.error;return r.status??1},p=(e,n,s,r,a={})=>{const o=L(n,e);for(const i of o.warnings)r.warn(`warning: ${i}`);return a.dry?(r.log(`[dry-run] ${o.bin} ${o.args.join(" ")}`),0):xe(o,s,a.env)},f=(e,n,s,r,a={})=>p(e,n(),s,r,a),Oe=(e,n)=>n==="aube"||n==="deno"?e:{...e,args:[...e.args,"--prefer-offline"]},Se=(e,n,s)=>n!=="yarn"||s.startsWith("1.")||!e.args.includes("--immutable")||e.args.includes("--immutable-cache")?e:{...e,args:[...e.args,"--immutable-cache"]},I=(e,n,s)=>{let r=e.name==="aube"?oe(n):re(e.name,e.version,{...n,silent:n.silent||s.silent===!0});return s.preferOffline&&(r=Oe(r,e.name)),s.ciMode&&(r=Se(r,e.name,e.version)),r},Fe=(e,n,s,r,a={})=>{const o=I(e,n,a);return D(e,o,s,r,{dry:a.dry,env:a.env})},Ve=async(e,n,s,r,a={})=>{const o=L(I(e,n,a),e);for(const i of o.warnings)r.warn(`warning: ${i}`);return a.dry?(r.log(`[dry-run] ${o.bin} ${o.args.join(" ")}`),{code:0,output:""}):ke(o.bin,o.args,{cwd:s,env:a.env?{...process.env,...a.env}:process.env})},A=(e,n)=>{const s=n==="deno"?"--quiet":"--silent";return{...e,args:[...e.args,s]}},Re=(e,n)=>n==="yarn"||n==="aube"?null:{...e,args:[...e.args,"--dry-run"]},D=(e,n,s,r,a)=>{if(a.dry!==!0)return p(e,n,s,r,a);const o=Re(n,e.name);return o===null?p(e,n,s,r,a):p(e,o,s,r,{env:a.env})},Ce=(e,n)=>n==="aube"?{...e,args:[...e.args,"--ignore-scripts"]}:n==="deno"?e:{...e,args:[...e.args,"--ignore-scripts"]},De=(e,n,s,r,a={})=>{let o=e.name==="aube"?ie(n):K(e.name,e.version,n);a.ignoreScripts&&(o=Ce(o,e.name)),a.silent&&(o=A(o,e.name));const i=D(e,o,s,r,{dry:a.dry,env:a.env});return i===0&&a.autoInstallPeers&&Ee(e,n,s,r,a),i},_e=e=>{if(e.startsWith("@")){const s=e.indexOf("/");if(s===-1)return e;const r=e.indexOf("@",s);return r===-1?e:e.slice(0,r)}const n=e.indexOf("@");return n===-1?e:e.slice(0,n)},We=(e,n)=>{let s=e;for(;;){const r=v(s,"node_modules",n,"package.json"),a=C(r);if(a)return a;const o=S(s);if(o===s||R(s).root===s)return;s=o}},Me=e=>{const n=C(v(e,"package.json")),s=new Set;if(!n)return s;for(const r of["dependencies","devDependencies","peerDependencies","optionalDependencies"]){const a=n[r];if(a)for(const o of Object.keys(a))s.add(o)}return s},Ee=(e,n,s,r,a)=>{if(e.name==="deno")return;const o=Me(s),i=new Map;for(const g of n.packages){const m=_e(g),t=We(s,m);if(!t?.peerDependencies)continue;const d=t.peerDependenciesMeta??{};for(const[y,U]of Object.entries(t.peerDependencies))d[y]?.optional||o.has(y)||i.has(y)||i.set(y,U)}if(i.size===0)return;const u=[...i.entries()].map(([g,m])=>`${g}@${m}`);r.log(`auto-installing peer dependencies: ${u.join(", ")}`);const l={exact:!1,filter:n.filter,global:!1,optional:!1,packages:u,peer:!1,saveDev:n.saveDev,workspace:!1,workspaceRoot:n.workspaceRoot};De(e,l,s,r,{ignoreScripts:a.ignoreScripts})},Ye=(e,n,s,r,a={})=>{let o=e.name==="aube"?te(n):Q(e.name,e.version,n);return a.silent&&(o=A(o,e.name)),D(e,o,s,r,{dry:a.dry,env:a.env})},Ge=(e,n,s,r,a={})=>e.name==="aube"?p(e,pe(n),s,r,a):f(e,()=>X(e.name,e.version,n),s,r,a),Ke=(e,n,s,r,a={})=>e.name==="aube"?p(e,ue(n),s,r,a):f(e,()=>Z(e.name,e.version,n),s,r,a),Pe=(e,n)=>{if(e.name==="aube")return he(n);const s=[],r=[],a=e.name;switch(e.name){case"bun":{const o=$.coerce(e.version);o&&$.lt(o,"1.3.0")&&r.push(`bun ${e.version} does not support \`bun pm view\` (added in bun 1.3). Upgrade bun, or run \`npm view ${n.package}\` instead.`),s.push("pm","view","--",n.package,...n.fields),n.json&&s.push("--json");break}case"deno":{const o=n.package.startsWith("npm:")||n.package.startsWith("jsr:")||n.package.startsWith("https://")||n.package.startsWith("http://")||n.package.startsWith("file:")?n.package:`npm:${n.package}`;s.push("info","--",o),n.json&&s.push("--json"),n.fields.length>0&&r.push("deno info does not accept field selectors; ignoring.");break}case"npm":case"pnpm":{s.push("view","--",n.package,...n.fields),n.json&&s.push("--json");break}case"yarn":{if(e.version.startsWith("1.")){s.push("info","--",n.package);const[o,...i]=n.fields;o!==void 0&&(i.length>0&&r.push("yarn v1 only supports querying one field at a time; using the first."),s.push(o)),n.json&&s.push("--json")}else s.push("npm","info","--",n.package),n.fields.length>0&&r.push("yarn berry does not support field arguments to 'npm info'; ignoring."),n.json&&s.push("--json");break}default:{const o=e.name;throw new Error(`Unsupported package manager: ${o}`)}}return{args:s,bin:a,warnings:r}},Qe=(e,n,s,r,a={})=>p(e,Pe(e,n),s,r,a),Xe=(e,n,s,r,a={})=>e.name==="aube"?p(e,ge(n),s,r,a):f(e,()=>ee(e.name,e.version,n),s,r,a),Ze=(e,n,s,r,a,o={})=>e.name==="aube"?p(e,de(n,s),r,a,o):f(e,()=>ne(e.name,e.version,n,s),r,a,o),Le=(e,n,s)=>{if(e.args.includes("--offline")||e.args.includes("--cached-only"))return e;const r=(a,o)=>{const i=[...e.args];return i.splice(o,0,a),{...e,args:i}};switch(n){case"aube":case"pnpm":return r("--offline",1);case"bun":return{...e,warnings:[...e.warnings,"bun x does not support --offline. Pre-install the package via `vis install` so bun x resolves from the local cache."]};case"deno":return r("--cached-only",1);case"npm":return r("--offline",1);case"yarn":return s.startsWith("1.")?r("--offline",0):{...e,warnings:[...e.warnings,"yarn berry has no --offline flag for dlx. Configure `enableNetwork: false` in .yarnrc.yml or set `enableMirror: true` for offline-first behavior."]};default:{const a=n;return{...e,warnings:[...e.warnings,`applyDlxOffline: unsupported pm ${String(a)}`]}}}},en=(e,n,s,r,a={})=>{let o=e.name==="aube"?ce(n):F(e.name,e.version,n);return a.offline&&(o=Le(o,e.name,e.version)),p(e,o,s,r,{dry:a.dry,env:a.env})},_=process.platform==="win32",Ie=_?[".exe",".cmd",".bat",".ps1",""]:[""],Ae=(e,n)=>{if(!(e.includes("/")||e.includes("\\")))for(const s of H(n))for(const r of Ie){const a=v(s,`${e}${r}`);if(j(a))return _?a.replaceAll("/","\\"):a}},nn=(e,n,s)=>{const r=Ae(e,s);if(r===void 0||_&&!r.toLowerCase().endsWith(".exe"))return null;const a=E(r,n,{cwd:s,env:z({...process.env},s),stdio:"inherit"});if(a.error)throw a.error;return a.status??1},sn=(e,n,s,r,a={})=>e.name==="aube"?p(e,le(n),s,r,a):f(e,()=>ae(e.name,e.version,n),s,r,a),rn=(e,n,s,r,a,o={})=>{if(e.name==="aube")return p(e,me(n,s),r,a,o);const i=ve(e,n,s);return i.kind==="skip"?(a.warn(`warning: ${i.warning}`),0):i.kind==="rewrite"?p(e,{args:i.args,bin:i.bin,warnings:i.warning?[i.warning]:[]},r,a,o):f(e,()=>se(e.name,e.version,n,s),r,a,o)};export{Ze as $,je as A,Ve as C,Ye as E,ze as I,nn as L,Ge as M,sn as N,Ke as P,Xe as S,rn as U,en as W,Qe as a,He as h,De as j,ke as s,Je as v,Fe as y};
1
+ import{createRequire as N}from"node:module";import{f as j,m as v,H as S,j as R,v as J}from"./index-2LCHaVNX.js";import{withEnhancedPath as z,collectNodeModulesBinDirs as H}from"@visulima/task-runner";import{s as $}from"./index-BAe6e0XE.js";import{resolveDlx as F,whichBin as V,detectPackageManager as Y,execPmCommandInteractive as G,resolveAdd as K,resolveRemove as Q,resolveDedupe as X,resolveWhy as Z,resolveLink as ee,resolveUnlink as ne,resolvePmCommand as se,resolveInstall as re,resolveExec as ae}from"#native";const T=N(import.meta.url),b=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,B=e=>{if(typeof b<"u"&&b.versions&&b.versions.node){const[n,s]=b.versions.node.split(".").map(Number);if(n>22||n===22&&s>=3||n===20&&s>=16)return b.getBuiltinModule(e)}return T(e)},{spawn:q,spawnSync:E}=B("node:child_process"),h=(e,n,s,r)=>{for(const a of n)e.push("--filter",a);s&&e.push("--recursive"),r&&e.push("--workspace-root")},oe=e=>{const n=[],s=[];return h(n,e.filter,e.recursive,e.workspaceRoot),e.silent&&n.push("--silent"),e.frozenLockfile&&n.push("--frozen-lockfile"),n.push("install"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.force&&n.push("--force"),e.ignoreScripts&&n.push("--ignore-scripts"),e.lockfileOnly&&n.push("--lockfile-only"),e.noOptional&&n.push("--no-optional"),e.offline&&n.push("--offline"),{args:n,bin:"aube",warnings:s}},ie=e=>{const n=[],s=[];return h(n,e.filter,!1,!1),n.push("add"),e.saveDev&&n.push("--save-dev"),e.exact&&n.push("--save-exact"),e.global&&n.push("--global"),e.optional&&n.push("--save-optional"),e.peer&&n.push("--save-peer"),e.workspace&&s.push("aube has no flag for the `workspace:` protocol; it auto-detects local workspace members during add. Ignoring --workspace."),e.workspaceRoot&&n.push("--workspace"),n.push(...e.packages),{args:n,bin:"aube",warnings:s}},te=e=>{const n=[];return h(n,e.filter,e.recursive,!1),n.push("remove"),e.saveDev&&n.push("--save-dev"),e.global&&n.push("--global"),e.workspaceRoot&&n.push("--workspace"),n.push(...e.packages),{args:n,bin:"aube",warnings:[]}},pe=e=>{const n=["dedupe"];return e&&n.push("--check"),{args:n,bin:"aube",warnings:[]}},ue=e=>{const n=[],s=[];h(n,e.filter,e.recursive,!1),n.push("why"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.json&&n.push("--json"),e.long&&n.push("--long"),e.parseable&&n.push("--parseable"),e.depth!==void 0&&s.push("aube why does not accept --depth; ignoring."),e.noOptional&&s.push("aube why does not accept --no-optional; ignoring."),e.global&&s.push("aube why does not accept --global; ignoring.");const[r,...a]=e.packages;return r===void 0?s.push("aube why requires a package name; none provided."):(a.length>0&&s.push("aube why takes a single package; using the first."),n.push(r)),{args:n,bin:"aube",warnings:s}},ce=e=>{const n=[];e.silent&&n.push("--silent"),n.push("dlx");for(const s of e.additionalPackages)n.push("--package",s);return e.shellMode&&n.push("--shell-mode"),n.push(e.package),n.push(...e.args),{args:n,bin:"aube",warnings:[]}},le=e=>{const n=[];return h(n,e.filter,e.recursive,e.workspaceRoot),n.push("exec"),e.parallel&&n.push("--parallel"),e.reverse&&n.push("--reverse"),e.shellMode&&n.push("--shell-mode"),n.push(e.command),n.push(...e.args),{args:n,bin:"aube",warnings:[]}},ge=e=>{const n=["link"];return e!==null&&n.push(e),{args:n,bin:"aube",warnings:[]}},de=(e,n)=>{const s=[],r=[];return n&&s.push("--recursive"),s.push("unlink"),e.length>1&&r.push("aube unlink takes a single package; using the first."),e.length>0&&s.push(e[0]),{args:s,bin:"aube",warnings:r}},he=e=>{const n=["view","--",e.package],s=[],[r,...a]=e.fields;return r!==void 0?(a.length>0&&s.push("aube view only supports a single field; using the first."),e.json&&s.push("aube view does not support --json with a field selector; printing the field without --json."),n.push(r)):e.json&&n.push("--json"),{args:n,bin:"aube",warnings:s}},Je=e=>{const n=[],s=[];return h(n,e.filters,e.recursive,e.workspaceRoot),n.push("update"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.global&&n.push("--global"),e.interactive&&n.push("--interactive"),e.latest&&n.push("--latest"),e.noOptional&&n.push("--no-optional"),e.noSave&&n.push("--no-save"),n.push(...e.packages),{args:n,bin:"aube",warnings:s}},fe=new Set(["fund","ping","search","token"]),me=(e,n)=>fe.has(e)?{args:[e,...n],bin:"npm",warnings:[`'${e}' is not natively supported by aube. Delegating to npm.`]}:{args:[e,...n],bin:"aube",warnings:[]},k=256*1024,be=e=>{const n=e?{...process.env,...e}:{...process.env};return process.stderr.isTTY&&n.FORCE_COLOR===void 0&&n.NO_COLOR===void 0&&(n.FORCE_COLOR="1"),n},W=e=>e!==""&&!/[\s"&()<>^|%!]/u.test(e)?e:`"${e.replaceAll(/(\\*)"/gu,String.raw`$1$1\"`).replace(/(\\+)$/u,"$1$1").replaceAll(/[&()<>^|%!]/gu,String.raw`^$&`)}"`,ke=async(e,n,s)=>new Promise((r,a)=>{const o=process.platform==="win32",i=q(o?W(e):e,o?n.map(t=>W(t)):[...n],{cwd:s.cwd,env:be(s.env),shell:o,stdio:["inherit","pipe","pipe"],windowsHide:!0});let u=[],l=0;const g=t=>{if(u.push(t),l+=t.length,!(l<=k)){for(;u.length>1&&l-u[0].length>k;)l-=u.shift().length;if(u.length===1&&l>k){const d=u[0];u[0]=d.subarray(d.length-k),l=k}}},m=()=>Buffer.concat(u).toString("utf8");i.stdout?.on("data",t=>{process.stdout.write(t),g(t)}),i.stderr?.on("data",t=>{process.stderr.write(t),g(t)}),i.on("error",a),i.on("close",t=>{const d=m();u=[],r({code:t??1,output:d})})}),w=e=>{const n=$.coerce(e);return n?$.gte(n,"11.0.0"):!1},c=e=>e.name==="yarn"&&!e.version.startsWith("1."),x=e=>e.name==="yarn"&&e.version.startsWith("1."),we=e=>e[0]==="rm"?["remove",...e.slice(1)]:e,ve=(e,n,s)=>{switch(n){case"audit":return c(e)?{args:["npm","audit",...s],bin:"yarn",kind:"rewrite"}:{kind:"passthrough"};case"config":{if(c(e)){const[r,...a]=s;return r==="delete"?{args:["config","unset",...a],bin:"yarn",kind:"rewrite",warning:"yarn berry uses `config unset`, not `config delete`."}:{kind:"passthrough"}}return e.name==="bun"?{kind:"skip",warning:"bun has no `config` CLI. Edit bunfig.toml or .npmrc directly."}:e.name==="deno"?{kind:"skip",warning:"deno has no registry-config CLI. Edit deno.json directly."}:{kind:"passthrough"}}case"dist-tag":return x(e)?{args:["tag",...s],bin:"yarn",kind:"rewrite",warning:"yarn 1 has no `dist-tag`; using `yarn tag`."}:c(e)?{args:["npm","tag",...we(s)],bin:"yarn",kind:"rewrite"}:e.name==="bun"||e.name==="deno"?{kind:"skip",warning:`${e.name} has no \`dist-tag\`. Use \`npm dist-tag\` instead.`}:{kind:"passthrough"};case"login":case"logout":return c(e)?{args:["npm",n,...s],bin:"yarn",kind:"rewrite"}:e.name==="bun"?{args:[n,...s],bin:"npm",kind:"rewrite",warning:`bun has no \`${n}\`; falling back to \`npm ${n}\` (writes ~/.npmrc, which bun reads).`}:e.name==="deno"?{kind:"skip",warning:`deno has no \`${n}\`. JSR uses browser OAuth via \`deno publish\`.`}:{kind:"passthrough"};case"owner":return e.name==="pnpm"&&w(e.version)?{args:["owner",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `owner`; falling back to `npm owner`."}:c(e)?{args:["owner",...s],bin:"npm",kind:"rewrite",warning:"yarn berry has no `owner` (not in `yarn npm`); falling back to `npm owner`."}:e.name==="bun"?{args:["owner",...s],bin:"npm",kind:"rewrite",warning:"bun has no `owner`; falling back to `npm owner`."}:e.name==="deno"?{kind:"skip",warning:"deno has no `owner`. JSR uses scope-member roles via the web UI."}:{kind:"passthrough"};case"ping":return e.name==="pnpm"&&w(e.version)?{args:["ping",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `ping`; falling back to `npm ping`."}:{kind:"passthrough"};case"plugin":return c(e)?{kind:"passthrough"}:{kind:"skip",warning:`${e.name} does not support yarn-style plugins. Skipping (no-op).`};case"prune":return x(e)?{kind:"skip",warning:"yarn 1 has no `prune`. Use `yarn install --production` for a prod-only tree."}:c(e)?{kind:"skip",warning:"yarn berry has no `prune`. Use `yarn workspaces focus --production` instead."}:e.name==="bun"||e.name==="deno"?{kind:"skip",warning:`${e.name} has no \`prune\`. Pruning happens automatically on install.`}:{kind:"passthrough"};case"publish":return c(e)?{args:["npm","publish",...s],bin:"yarn",kind:"rewrite"}:{kind:"passthrough"};case"rebuild":return x(e)?{kind:"skip",warning:"yarn 1 has no `rebuild`. Re-install instead."}:e.name==="bun"?{kind:"skip",warning:"bun has no `rebuild`. Use `bun install --force` instead."}:e.name==="deno"?{kind:"skip",warning:"deno has no `rebuild`."}:{kind:"passthrough"};case"search":return e.name==="pnpm"&&w(e.version)?{args:["search",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `search`; falling back to `npm search`."}:{kind:"passthrough"};case"token":return e.name==="pnpm"&&w(e.version)?{args:["token",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `token`; falling back to `npm token`."}:{kind:"passthrough"};case"whoami":return e.name==="pnpm"&&w(e.version)?{args:["whoami",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `whoami`; falling back to `npm whoami`."}:c(e)?{args:["npm","whoami",...s],bin:"yarn",kind:"rewrite"}:e.name==="bun"?{args:["pm","whoami",...s],bin:"bun",kind:"rewrite"}:e.name==="deno"?{kind:"skip",warning:"deno has no `whoami`. JSR uses browser auth."}:{kind:"passthrough"};default:return{kind:"passthrough"}}},O=e=>V(e)!==null,ye=e=>{const n=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"],["bun.lock","bun"],["bun.lockb","bun"],["deno.lock","deno"]];let s=e;for(;;){for(const[a,o]of n)if(j(v(s,a)))return o;const r=S(s);if(r===s||R(s).root===s)return;s=r}},ze=(e,n)=>{if(n.name!=="aube")return;const s=ye(e);if(s!==void 0)return`Resolved installer is aube but the workspace has a ${s} lockfile. Aube reads and writes ${s}'s lockfile format in place, but its byte output may differ subtly — expect a one-time churn diff on the first install, and ongoing drift if your team mixes tools on the same lockfile. To pin the choice across the team, set \`install.backend\` in vis.config; to bypass aube for this run, pass --no-aube.`},C=e=>{if(j(e))try{return JSON.parse(J(e,{buffer:!1}))}catch{return}},$e=e=>{let n=e;for(;;){const s=v(n,"package.json"),r=C(s);if(r&&typeof r.packageManager=="string"&&r.packageManager.length>0)return r.packageManager;const a=S(n);if(a===n||R(n).root===n)return;n=a}},P=new Set(["npm","pnpm","yarn"]),M=(e,n,s)=>s===!1||!P.has(n)||!O("corepack")?!1:s===!0?!0:$e(e)!==void 0,He=(e,n)=>{const s=n.backend,r=process.env.VIS_INSTALLER,a=s??r??n.configBackend,o=n.configCorepack??"auto";if(a&&a!=="auto"){if(a==="aube"&&!O("aube"))throw new Error('install.backend is set to "aube" but the `aube` binary is not on PATH. Install it via `npm i -g @endevco/aube`, `mise use -g aube`, or `brew install endevco/tap/aube`.');return{name:a,useCorepack:M(e,a,o),version:"latest"}}if(O("aube"))return{name:"aube",useCorepack:!1,version:"latest"};const i=je(e);return{...i,useCorepack:M(e,i.name,o)}},je=e=>{if(!j(e))throw new Error(`Could not detect package manager in ${e}. Directory does not exist.`);const n=Y(e);return{name:n.name,version:n.version||"latest"}},L=(e,n)=>n.useCorepack!==!0||!P.has(n.name)||e.bin==="corepack"||e.bin!==n.name?e:{...e,args:[n.name,...e.args],bin:"corepack"},xe=(e,n,s)=>{if(s===void 0)return G(e.bin,e.args,n);const r=E(e.bin,e.args,{cwd:n,env:{...process.env,...s},stdio:"inherit"});if(r.error)throw r.error;return r.status??1},p=(e,n,s,r,a={})=>{const o=L(n,e);for(const i of o.warnings)r.warn(`warning: ${i}`);return a.dry?(r.log(`[dry-run] ${o.bin} ${o.args.join(" ")}`),0):xe(o,s,a.env)},f=(e,n,s,r,a={})=>p(e,n(),s,r,a),Oe=(e,n)=>n==="aube"||n==="deno"?e:{...e,args:[...e.args,"--prefer-offline"]},Se=(e,n,s)=>n!=="yarn"||s.startsWith("1.")||!e.args.includes("--immutable")||e.args.includes("--immutable-cache")?e:{...e,args:[...e.args,"--immutable-cache"]},I=(e,n,s)=>{let r=e.name==="aube"?oe(n):re(e.name,e.version,{...n,silent:n.silent||s.silent===!0});return s.preferOffline&&(r=Oe(r,e.name)),s.ciMode&&(r=Se(r,e.name,e.version)),r},Fe=(e,n,s,r,a={})=>{const o=I(e,n,a);return D(e,o,s,r,{dry:a.dry,env:a.env})},Ve=async(e,n,s,r,a={})=>{const o=L(I(e,n,a),e);for(const i of o.warnings)r.warn(`warning: ${i}`);return a.dry?(r.log(`[dry-run] ${o.bin} ${o.args.join(" ")}`),{code:0,output:""}):ke(o.bin,o.args,{cwd:s,env:a.env?{...process.env,...a.env}:process.env})},A=(e,n)=>{const s=n==="deno"?"--quiet":"--silent";return{...e,args:[...e.args,s]}},Re=(e,n)=>n==="yarn"||n==="aube"?null:{...e,args:[...e.args,"--dry-run"]},D=(e,n,s,r,a)=>{if(a.dry!==!0)return p(e,n,s,r,a);const o=Re(n,e.name);return o===null?p(e,n,s,r,a):p(e,o,s,r,{env:a.env})},Ce=(e,n)=>n==="aube"?{...e,args:[...e.args,"--ignore-scripts"]}:n==="deno"?e:{...e,args:[...e.args,"--ignore-scripts"]},De=(e,n,s,r,a={})=>{let o=e.name==="aube"?ie(n):K(e.name,e.version,n);a.ignoreScripts&&(o=Ce(o,e.name)),a.silent&&(o=A(o,e.name));const i=D(e,o,s,r,{dry:a.dry,env:a.env});return i===0&&a.autoInstallPeers&&Ee(e,n,s,r,a),i},_e=e=>{if(e.startsWith("@")){const s=e.indexOf("/");if(s===-1)return e;const r=e.indexOf("@",s);return r===-1?e:e.slice(0,r)}const n=e.indexOf("@");return n===-1?e:e.slice(0,n)},We=(e,n)=>{let s=e;for(;;){const r=v(s,"node_modules",n,"package.json"),a=C(r);if(a)return a;const o=S(s);if(o===s||R(s).root===s)return;s=o}},Me=e=>{const n=C(v(e,"package.json")),s=new Set;if(!n)return s;for(const r of["dependencies","devDependencies","peerDependencies","optionalDependencies"]){const a=n[r];if(a)for(const o of Object.keys(a))s.add(o)}return s},Ee=(e,n,s,r,a)=>{if(e.name==="deno")return;const o=Me(s),i=new Map;for(const g of n.packages){const m=_e(g),t=We(s,m);if(!t?.peerDependencies)continue;const d=t.peerDependenciesMeta??{};for(const[y,U]of Object.entries(t.peerDependencies))d[y]?.optional||o.has(y)||i.has(y)||i.set(y,U)}if(i.size===0)return;const u=[...i.entries()].map(([g,m])=>`${g}@${m}`);r.log(`auto-installing peer dependencies: ${u.join(", ")}`);const l={exact:!1,filter:n.filter,global:!1,optional:!1,packages:u,peer:!1,saveDev:n.saveDev,workspace:!1,workspaceRoot:n.workspaceRoot};De(e,l,s,r,{ignoreScripts:a.ignoreScripts})},Ye=(e,n,s,r,a={})=>{let o=e.name==="aube"?te(n):Q(e.name,e.version,n);return a.silent&&(o=A(o,e.name)),D(e,o,s,r,{dry:a.dry,env:a.env})},Ge=(e,n,s,r,a={})=>e.name==="aube"?p(e,pe(n),s,r,a):f(e,()=>X(e.name,e.version,n),s,r,a),Ke=(e,n,s,r,a={})=>e.name==="aube"?p(e,ue(n),s,r,a):f(e,()=>Z(e.name,e.version,n),s,r,a),Pe=(e,n)=>{if(e.name==="aube")return he(n);const s=[],r=[],a=e.name;switch(e.name){case"bun":{const o=$.coerce(e.version);o&&$.lt(o,"1.3.0")&&r.push(`bun ${e.version} does not support \`bun pm view\` (added in bun 1.3). Upgrade bun, or run \`npm view ${n.package}\` instead.`),s.push("pm","view","--",n.package,...n.fields),n.json&&s.push("--json");break}case"deno":{const o=n.package.startsWith("npm:")||n.package.startsWith("jsr:")||n.package.startsWith("https://")||n.package.startsWith("http://")||n.package.startsWith("file:")?n.package:`npm:${n.package}`;s.push("info","--",o),n.json&&s.push("--json"),n.fields.length>0&&r.push("deno info does not accept field selectors; ignoring.");break}case"npm":case"pnpm":{s.push("view","--",n.package,...n.fields),n.json&&s.push("--json");break}case"yarn":{if(e.version.startsWith("1.")){s.push("info","--",n.package);const[o,...i]=n.fields;o!==void 0&&(i.length>0&&r.push("yarn v1 only supports querying one field at a time; using the first."),s.push(o)),n.json&&s.push("--json")}else s.push("npm","info","--",n.package),n.fields.length>0&&r.push("yarn berry does not support field arguments to 'npm info'; ignoring."),n.json&&s.push("--json");break}default:{const o=e.name;throw new Error(`Unsupported package manager: ${o}`)}}return{args:s,bin:a,warnings:r}},Qe=(e,n,s,r,a={})=>p(e,Pe(e,n),s,r,a),Xe=(e,n,s,r,a={})=>e.name==="aube"?p(e,ge(n),s,r,a):f(e,()=>ee(e.name,e.version,n),s,r,a),Ze=(e,n,s,r,a,o={})=>e.name==="aube"?p(e,de(n,s),r,a,o):f(e,()=>ne(e.name,e.version,n,s),r,a,o),Le=(e,n,s)=>{if(e.args.includes("--offline")||e.args.includes("--cached-only"))return e;const r=(a,o)=>{const i=[...e.args];return i.splice(o,0,a),{...e,args:i}};switch(n){case"aube":case"pnpm":return r("--offline",1);case"bun":return{...e,warnings:[...e.warnings,"bun x does not support --offline. Pre-install the package via `vis install` so bun x resolves from the local cache."]};case"deno":return r("--cached-only",1);case"npm":return r("--offline",1);case"yarn":return s.startsWith("1.")?r("--offline",0):{...e,warnings:[...e.warnings,"yarn berry has no --offline flag for dlx. Configure `enableNetwork: false` in .yarnrc.yml or set `enableMirror: true` for offline-first behavior."]};default:{const a=n;return{...e,warnings:[...e.warnings,`applyDlxOffline: unsupported pm ${String(a)}`]}}}},en=(e,n,s,r,a={})=>{let o=e.name==="aube"?ce(n):F(e.name,e.version,n);return a.offline&&(o=Le(o,e.name,e.version)),p(e,o,s,r,{dry:a.dry,env:a.env})},_=process.platform==="win32",Ie=_?[".exe",".cmd",".bat",".ps1",""]:[""],Ae=(e,n)=>{if(!(e.includes("/")||e.includes("\\")))for(const s of H(n))for(const r of Ie){const a=v(s,`${e}${r}`);if(j(a))return _?a.replaceAll("/","\\"):a}},nn=(e,n,s)=>{const r=Ae(e,s);if(r===void 0||_&&!r.toLowerCase().endsWith(".exe"))return null;const a=E(r,n,{cwd:s,env:z({...process.env},s),stdio:"inherit"});if(a.error)throw a.error;return a.status??1},sn=(e,n,s,r,a={})=>e.name==="aube"?p(e,le(n),s,r,a):f(e,()=>ae(e.name,e.version,n),s,r,a),rn=(e,n,s,r,a,o={})=>{if(e.name==="aube")return p(e,me(n,s),r,a,o);const i=ve(e,n,s);return i.kind==="skip"?(a.warn(`warning: ${i.warning}`),0):i.kind==="rewrite"?p(e,{args:i.args,bin:i.bin,warnings:i.warning?[i.warning]:[]},r,a,o):f(e,()=>se(e.name,e.version,n,s),r,a,o)};export{Ze as $,je as A,Ve as C,Ye as E,ze as I,nn as L,Ge as M,sn as N,Ke as P,Xe as S,rn as U,en as W,Qe as a,He as h,De as j,ke as s,Je as v,Fe as y};
@@ -1 +1 @@
1
- import{s as c}from"./index-BAe6e0XE.js";import{g as m}from"./packument-BFekEvwn.js";import{i as v}from"../packem_chunks/cli-main.js";const h=8,u=async(t,r,e)=>{if(t.length===0)return[];const o=Math.max(1,Math.min(r,t.length)),s=Array.from({length:t.length});let n=0;const i=async()=>{for(;n<t.length;){const a=n;n+=1;const f=t[a];s[a]=await e(f,a)}};return await Promise.all(Array.from({length:o},()=>i())),s},l=(t,r)=>t.versions[r]?.dist?.attestations?.provenance!==void 0,p=(t,r)=>c.valid(r)?Object.keys(t.versions).filter(e=>c.valid(e)!==null&&c.lt(e,r)).filter(e=>c.satisfies(e,"*",{includePrerelease:!1})).filter(e=>l(t,e)).sort((e,o)=>c.lt(e,o)?1:-1)[0]:void 0,y=async(t,r={})=>{if(v("provenance"))return[];const e=new Set(r.allowlist),o=r.concurrency??h;return(await u(t,o,async({name:s,version:n})=>{if(e.has(s))return;const i=await m(s,{workspaceRoot:r.workspaceRoot});if(i===void 0||l(i,n))return;const a=p(i,n);if(a!==void 0)return{packageName:s,priorVersionWithProvenance:a,version:n}})).filter(s=>s!==void 0)};export{h as D,p as f,u as m,y as r};
1
+ import{s as c}from"./index-BAe6e0XE.js";import{g as m}from"./packument-CtVAoNo7.js";import{i as v}from"../packem_chunks/cli-main.js";const h=8,u=async(t,r,e)=>{if(t.length===0)return[];const o=Math.max(1,Math.min(r,t.length)),s=Array.from({length:t.length});let n=0;const i=async()=>{for(;n<t.length;){const a=n;n+=1;const f=t[a];s[a]=await e(f,a)}};return await Promise.all(Array.from({length:o},()=>i())),s},l=(t,r)=>t.versions[r]?.dist?.attestations?.provenance!==void 0,p=(t,r)=>c.valid(r)?Object.keys(t.versions).filter(e=>c.valid(e)!==null&&c.lt(e,r)).filter(e=>c.satisfies(e,"*",{includePrerelease:!1})).filter(e=>l(t,e)).sort((e,o)=>c.lt(e,o)?1:-1)[0]:void 0,y=async(t,r={})=>{if(v("provenance"))return[];const e=new Set(r.allowlist),o=r.concurrency??h;return(await u(t,o,async({name:s,version:n})=>{if(e.has(s))return;const i=await m(s,{workspaceRoot:r.workspaceRoot});if(i===void 0||l(i,n))return;const a=p(i,n);if(a!==void 0)return{packageName:s,priorVersionWithProvenance:a,version:n}})).filter(s=>s!==void 0)};export{h as D,p as f,u as m,y as r};
@@ -1 +1 @@
1
- import{s as a,z as l,U as s,v as f,L as d}from"./index-D75r1yKp.js";const m=e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,p=(e,o,c)=>s(e,{start:o},{tabWidth:!1,...c}),g=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,h=(e,o)=>{const c=g.exec(o);if(!c)return;const[,i,t,n]=c;if(t&&n)return{column:Number(n),line:Number(t)};let r=Number(i);return r===e.length&&(r=e.length-1),l(e,r)},N=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,b=e=>e.replace(N,(o,c,i)=>`"${i}"(${m(i)})`);function w(e,o,c,i){let t;try{return JSON.parse(e,o)}catch(u){t=u.message}let n;e?(n=h(e,t),t=b(t)):t+=" while parsing empty string";const r=new a(t);throw r.fileName=c,n&&(r.codeFrame=p(e,n,i)),r}function S(e,o,c){const i=f(e,{buffer:!0,encoding:void 0});let t=new TextDecoder().decode(i);const{beforeParse:n,color:r}={};return typeof n=="function"&&(t=n(t)),w(t,o,d(e),{color:r})}export{w as N,S as a};
1
+ import{s as a,z as l,U as s,v as f,L as d}from"./index-2LCHaVNX.js";const m=e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,p=(e,o,c)=>s(e,{start:o},{tabWidth:!1,...c}),g=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,h=(e,o)=>{const c=g.exec(o);if(!c)return;const[,i,t,n]=c;if(t&&n)return{column:Number(n),line:Number(t)};let r=Number(i);return r===e.length&&(r=e.length-1),l(e,r)},N=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,b=e=>e.replace(N,(o,c,i)=>`"${i}"(${m(i)})`);function w(e,o,c,i){let t;try{return JSON.parse(e,o)}catch(u){t=u.message}let n;e?(n=h(e,t),t=b(t)):t+=" while parsing empty string";const r=new a(t);throw r.fileName=c,n&&(r.codeFrame=p(e,n,i)),r}function S(e,o,c){const i=f(e,{buffer:!0,encoding:void 0});let t=new TextDecoder().decode(i);const{beforeParse:n,color:r}={};return typeof n=="function"&&(t=n(t)),w(t,o,d(e),{color:r})}export{w as N,S as a};
@@ -1 +1 @@
1
- import{createRequire as g}from"node:module";import{f as l,m,a as v}from"./index-D75r1yKp.js";import{g as b}from"./en-BRcjb70R.js";import{a as j}from"./readJsonSync-DuMMeB3s-wlhgSHes.js";const h=g(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[t,r]=o.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return o.getBuiltinModule(e)}return h(e)},{rmSync:u,writeFileSync:k}=_("node:fs"),C=1440*60*1e3,R=15e3,w="https://registry.npmjs.org/-/npm/v1/keys",p=()=>m(b(),"registry-keys"),i=()=>m(p(),"npmjs.json"),A=()=>{const e=i();if(l(e))try{const t=j(e),r=Date.now()-t.createdAt>t.ttlMs;return{entry:t,expired:r}}catch{u(e,{force:!0});return}},M=(e,t)=>{v(p());const r={createdAt:Date.now(),keys:e,ttlMs:t};k(i(),JSON.stringify(r),"utf8")},q=async(e={})=>{const t=e.ttlMs??C,r=e.keysUrl??process.env.VIS_NPM_KEYS_URL??w,s=A();if(s!==void 0&&!s.expired&&e.forceRefresh!==!0)return{fromCache:!0,keys:s.entry.keys};const n=new AbortController,d=setTimeout(()=>{n.abort()},R),a=()=>{n.abort()};e.signal?.addEventListener("abort",a,{once:!0});try{const c=await fetch(r,{headers:{Accept:"application/json"},signal:n.signal});if(!c.ok)return s!==void 0?{fromCache:!0,keys:s.entry.keys,stale:!0}:void 0;const y=await c.json(),f=Array.isArray(y.keys)?y.keys:[];return M(f,t),{fromCache:!1,keys:f}}catch{return s!==void 0?{fromCache:!0,keys:s.entry.keys,stale:!0}:void 0}finally{clearTimeout(d),e.signal?.removeEventListener("abort",a)}},x=()=>{const e=i();return l(e)?(u(e,{force:!0}),!0):!1};export{x as c,q as f};
1
+ import{createRequire as g}from"node:module";import{f as l,m,a as v}from"./index-2LCHaVNX.js";import{g as b}from"./en-C26W78--.js";import{a as j}from"./readJsonSync-DuMMeB3s-B9cGBVbJ.js";const h=g(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[t,r]=o.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return o.getBuiltinModule(e)}return h(e)},{rmSync:u,writeFileSync:k}=_("node:fs"),C=1440*60*1e3,R=15e3,w="https://registry.npmjs.org/-/npm/v1/keys",p=()=>m(b(),"registry-keys"),i=()=>m(p(),"npmjs.json"),A=()=>{const e=i();if(l(e))try{const t=j(e),r=Date.now()-t.createdAt>t.ttlMs;return{entry:t,expired:r}}catch{u(e,{force:!0});return}},M=(e,t)=>{v(p());const r={createdAt:Date.now(),keys:e,ttlMs:t};k(i(),JSON.stringify(r),"utf8")},q=async(e={})=>{const t=e.ttlMs??C,r=e.keysUrl??process.env.VIS_NPM_KEYS_URL??w,s=A();if(s!==void 0&&!s.expired&&e.forceRefresh!==!0)return{fromCache:!0,keys:s.entry.keys};const n=new AbortController,d=setTimeout(()=>{n.abort()},R),a=()=>{n.abort()};e.signal?.addEventListener("abort",a,{once:!0});try{const c=await fetch(r,{headers:{Accept:"application/json"},signal:n.signal});if(!c.ok)return s!==void 0?{fromCache:!0,keys:s.entry.keys,stale:!0}:void 0;const y=await c.json(),f=Array.isArray(y.keys)?y.keys:[];return M(f,t),{fromCache:!1,keys:f}}catch{return s!==void 0?{fromCache:!0,keys:s.entry.keys,stale:!0}:void 0}finally{clearTimeout(d),e.signal?.removeEventListener("abort",a)}},x=()=>{const e=i();return l(e)?(u(e,{force:!0}),!0):!1};export{x as c,q as f};