@visulima/vis 1.0.0-alpha.29 → 1.0.0-alpha.30

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 (118) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/binx.js +1 -1
  4. package/dist/packem_chunks/bin.js +368 -367
  5. package/dist/packem_chunks/bloom-status.js +1 -1
  6. package/dist/packem_chunks/bloom-sync.js +1 -1
  7. package/dist/packem_chunks/config.js +15 -15
  8. package/dist/packem_chunks/doctor-probe.js +1 -1
  9. package/dist/packem_chunks/fix.js +1 -1
  10. package/dist/packem_chunks/handler.js +1 -1
  11. package/dist/packem_chunks/handler10.js +1 -1
  12. package/dist/packem_chunks/handler11.js +4 -4
  13. package/dist/packem_chunks/handler12.js +1 -1
  14. package/dist/packem_chunks/handler13.js +2 -2
  15. package/dist/packem_chunks/handler14.js +1 -1
  16. package/dist/packem_chunks/handler15.js +1 -1
  17. package/dist/packem_chunks/handler16.js +1 -1
  18. package/dist/packem_chunks/handler17.js +1 -1
  19. package/dist/packem_chunks/handler18.js +1 -1
  20. package/dist/packem_chunks/handler19.js +1 -1
  21. package/dist/packem_chunks/handler2.js +1 -1
  22. package/dist/packem_chunks/handler20.js +1 -1
  23. package/dist/packem_chunks/handler21.js +2 -2
  24. package/dist/packem_chunks/handler22.js +2 -2
  25. package/dist/packem_chunks/handler23.js +1 -1
  26. package/dist/packem_chunks/handler25.js +1 -1
  27. package/dist/packem_chunks/handler26.js +1 -1
  28. package/dist/packem_chunks/handler27.js +1 -1
  29. package/dist/packem_chunks/handler28.js +1 -1
  30. package/dist/packem_chunks/handler29.js +1 -1
  31. package/dist/packem_chunks/handler30.js +7 -7
  32. package/dist/packem_chunks/handler32.js +1 -1
  33. package/dist/packem_chunks/handler33.js +1 -1
  34. package/dist/packem_chunks/handler34.js +4 -4
  35. package/dist/packem_chunks/handler35.js +1 -1
  36. package/dist/packem_chunks/handler36.js +1 -1
  37. package/dist/packem_chunks/handler37.js +5 -5
  38. package/dist/packem_chunks/handler38.js +4 -4
  39. package/dist/packem_chunks/handler39.js +1 -1
  40. package/dist/packem_chunks/handler4.js +1 -1
  41. package/dist/packem_chunks/handler40.js +2 -2
  42. package/dist/packem_chunks/handler41.js +6 -6
  43. package/dist/packem_chunks/handler42.js +13 -13
  44. package/dist/packem_chunks/handler43.js +5 -5
  45. package/dist/packem_chunks/handler44.js +5 -5
  46. package/dist/packem_chunks/handler45.js +1 -1
  47. package/dist/packem_chunks/handler46.js +12 -12
  48. package/dist/packem_chunks/handler47.js +40 -40
  49. package/dist/packem_chunks/handler48.js +15 -15
  50. package/dist/packem_chunks/handler49.js +3 -3
  51. package/dist/packem_chunks/handler5.js +1 -1
  52. package/dist/packem_chunks/handler50.js +9 -9
  53. package/dist/packem_chunks/handler51.js +1 -1
  54. package/dist/packem_chunks/handler52.js +1 -1
  55. package/dist/packem_chunks/handler6.js +1 -1
  56. package/dist/packem_chunks/handler7.js +1 -1
  57. package/dist/packem_chunks/handler8.js +1 -1
  58. package/dist/packem_chunks/handler9.js +1 -1
  59. package/dist/packem_chunks/heal-accept.js +1 -1
  60. package/dist/packem_chunks/heal.js +1 -1
  61. package/dist/packem_chunks/help-command.js +7 -7
  62. package/dist/packem_chunks/index.js +6 -6
  63. package/dist/packem_chunks/keys-refresh.js +1 -1
  64. package/dist/packem_chunks/list.js +2 -2
  65. package/dist/packem_chunks/loader.js +1 -1
  66. package/dist/packem_chunks/loader2.js +1 -1
  67. package/dist/packem_chunks/prune.js +1 -1
  68. package/dist/packem_chunks/run.js +1 -1
  69. package/dist/packem_chunks/status.js +1 -1
  70. package/dist/packem_chunks/sync.js +1 -1
  71. package/dist/packem_chunks/sync2.js +1 -1
  72. package/dist/packem_chunks/tripwire.js +2 -2
  73. package/dist/packem_chunks/verify-lockfile.js +1 -1
  74. package/dist/packem_shared/Table-DoSoazT6-DwnyTUsA.js +12 -0
  75. package/dist/packem_shared/{advisories-DpgSuWDH.js → advisories-BxXiKFbL.js} +1 -1
  76. package/dist/packem_shared/{affected-shas-BkXXecyi.js → affected-shas-BdnlfiV1.js} +1 -1
  77. package/dist/packem_shared/{ai-fix-CfFWatGY.js → ai-fix-BkPUHA0z.js} +1 -1
  78. package/dist/packem_shared/{applyDefaults-DLvOqXGX.js → applyDefaults-BogleaFi.js} +1 -1
  79. package/dist/packem_shared/build-scripts-DE6U8jVq.js +1 -0
  80. package/dist/packem_shared/{cyclonedx-B04lIvwu.js → cyclonedx-BpGVHqSW.js} +1 -1
  81. package/dist/packem_shared/{dependency-scan-B9wTcLxf.js → dependency-scan-BUbOcMwX.js} +1 -1
  82. package/dist/packem_shared/{docker-DxA80dRx.js → docker-CTE3s4LW.js} +1 -1
  83. package/dist/packem_shared/{failure-log-n3j_-w8s.js → failure-log-34Wl3npC.js} +1 -1
  84. package/dist/packem_shared/glob-D_7bct6p-D8itOHsr.js +1 -0
  85. package/dist/packem_shared/{index-BfG9_znI.js → index-D1xC1Y_R.js} +1 -1
  86. package/dist/packem_shared/index-hoWfZmNo.js +30 -0
  87. package/dist/packem_shared/{lifecycle-NHIKDiCh.js → lifecycle-CXaqPGAQ.js} +2 -2
  88. package/dist/packem_shared/lockfile-CrT86D6d.js +1 -0
  89. package/dist/packem_shared/{lockfile-DAuTDwow.js → lockfile-Cu2BH6bl.js} +1 -1
  90. package/dist/packem_shared/{manifests-B7wUR3Rk.js → manifests-BzWpKW8F.js} +1 -1
  91. package/dist/packem_shared/{min-release-age-YyNI7gqV.js → min-release-age-BPVXwPUg.js} +2 -2
  92. package/dist/packem_shared/{native-config-sync-CgRIIRZV.js → native-config-sync-BRZZetn3.js} +8 -8
  93. package/dist/packem_shared/{osv-bloom-BQSIHt5h.js → osv-bloom-DSZcHLsM.js} +1 -1
  94. package/dist/packem_shared/{pm-runner-Ta_yz2uP.js → pm-runner-DmKT2FqF.js} +1 -1
  95. package/dist/packem_shared/{provenance-DoEp2uOo.js → provenance-DkCA8BrN.js} +1 -1
  96. package/dist/packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js +1 -0
  97. package/dist/packem_shared/{registry-keys-CD1xHavV.js → registry-keys-Mixm4eAY.js} +1 -1
  98. package/dist/packem_shared/{resolve-explicit-DpSc7RN2.js → resolve-explicit-D5E72FfN.js} +1 -1
  99. package/dist/packem_shared/runtime-check-CilFOqUU.js +1 -0
  100. package/dist/packem_shared/{s1ngularity-CIX7UcT5.js → s1ngularity-Qxc6tRRI.js} +1 -1
  101. package/dist/packem_shared/{scan-progress-CTVVf9WW.js → scan-progress-DVtCtI2z.js} +1 -1
  102. package/dist/packem_shared/{selectors-BU8aTRQm.js → selectors-DkgYFzdq.js} +1 -1
  103. package/dist/packem_shared/{signatures-BHM7cnqB.js → signatures-byuFrtAH.js} +1 -1
  104. package/dist/packem_shared/{toolchain-juKl-WgV.js → toolchain-DoG6b_G_.js} +2 -2
  105. package/dist/packem_shared/{typosquats-DRKU6d2S.js → typosquats-BiDxQj7R.js} +1 -1
  106. package/dist/packem_shared/{verify-DA80ja1b.js → verify-cLcZwKqe.js} +1 -1
  107. package/dist/packem_shared/{watch-DdR-pFzX.js → watch-DEL0yol9.js} +1 -1
  108. package/dist/packem_shared/{watch-loop-C8csFvRU.js → watch-loop-C31Ar7BX.js} +3 -3
  109. package/index.d.ts +201 -201
  110. package/index.js +26 -26
  111. package/package.json +10 -10
  112. package/dist/packem_shared/Table-3pFgIUZ2-DABgc6rj.js +0 -12
  113. package/dist/packem_shared/build-scripts-D-ysm_bS.js +0 -1
  114. package/dist/packem_shared/glob-MHJQjR39-CQ2GC0b_.js +0 -1
  115. package/dist/packem_shared/index-BDF8gawl.js +0 -29
  116. package/dist/packem_shared/lockfile-CoeFxWAv.js +0 -1
  117. package/dist/packem_shared/readFileSync-4c_c6Qey-6SWMDNdw.js +0 -1
  118. package/dist/packem_shared/runtime-check-Cbtb_Utb.js +0 -1
@@ -1,2 +1,2 @@
1
- var m=Object.defineProperty;var a=(o,r)=>m(o,"name",{value:r,configurable:!0});import{e as l,E as f,I as u}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{p as i}from"./bin.js";import{g as $}from"../packem_shared/osv-bloom-BQSIHt5h.js";var d=Object.defineProperty,n=a((o,r)=>d(o,"name",{value:r,configurable:!0}),"s");const c=n(o=>{if(!o)return"never";const r=Date.parse(o);if(Number.isNaN(r))return o;const t=Date.now()-r;if(t<0)return o;const e=Math.floor(t/6e4);if(e<1)return"just now";if(e<60)return`${e}m ago`;const s=Math.floor(e/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},"formatRelative"),p=n(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),g=n(async({options:o,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const t=await $(r,o.cacheDir);if(o.format==="json"){process.stdout.write(`${JSON.stringify(t,void 0,2)}
1
+ var m=Object.defineProperty;var a=(o,r)=>m(o,"name",{value:r,configurable:!0});import{e as l,E as f,I as u}from"../packem_shared/Table-DoSoazT6-DwnyTUsA.js";import{p as i}from"./bin.js";import{g as $}from"../packem_shared/osv-bloom-DSZcHLsM.js";var d=Object.defineProperty,n=a((o,r)=>d(o,"name",{value:r,configurable:!0}),"s");const c=n(o=>{if(!o)return"never";const r=Date.parse(o);if(Number.isNaN(r))return o;const t=Date.now()-r;if(t<0)return o;const e=Math.floor(t/6e4);if(e<1)return"just now";if(e<60)return`${e}m ago`;const s=Math.floor(e/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},"formatRelative"),p=n(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),g=n(async({options:o,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const t=await $(r,o.cacheDir);if(o.format==="json"){process.stdout.write(`${JSON.stringify(t,void 0,2)}
2
2
  `);return}if(i.info(`Cache: ${t.cacheDir}`),!t.present){i.warn(`No osv-bloom filter yet. Run ${l("vis advisories bloom sync")} to populate.`);return}if(t.manifest){const{manifest:e}=t;i.info(`Built: ${e.builtAtRfc3339} (${c(e.builtAtRfc3339)})`),i.info(`Fetch: ${t.fetchedAtIso??f("—")} (${c(t.fetchedAtIso)})`),i.info(`Filter: ${u(p(e.bloomByteLen))} m=${e.bloomMBits.toLocaleString()} bits k=${String(e.bloomKHashes)}`),i.info(`Set: ${e.entryCount.toLocaleString()} entries from ${e.advisoryCount.toLocaleString()} advisories (target FPR ${e.targetFpr})`),i.info(f(`Digest: ${e.setDigestSha256}`))}else i.warn("filter.bin present but manifest.json missing — `vis advisories bloom sync` will rewrite the cache.")},"execute"),y=g;export{y as advisoriesBloomStatusExecute};
@@ -1,2 +1,2 @@
1
- var D=Object.defineProperty;var f=(o,t)=>D(o,"name",{value:t,configurable:!0});import{E as d}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{p as n}from"./bin.js";import{s as b}from"../packem_shared/scan-progress-CTVVf9WW.js";import{s as y,D as h}from"../packem_shared/osv-bloom-BQSIHt5h.js";var v=Object.defineProperty,a=f((o,t)=>v(o,"name",{value:t,configurable:!0}),"s");const w=a(o=>o?.security?.audit?.advisories?.bloom??{},"readBloomConfig"),p=a(o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,"formatDuration"),$=a(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),B=a(async({options:o,visConfig:t,workspaceRoot:c})=>{if(!c)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const l=o.format==="json",m=w(t),u=o.source??m.source??h,s=b([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!l});let e,r;try{s.start("bloom");const i=Date.now();e=await y({allowedHosts:m.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:u,workspaceRoot:c}),e.upToDate?s.finish("bloom","ok",`up to date · ${p(Date.now()-i)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${$(e.bytesOnDisk)} · ${p(e.durationMs)}`)}catch(i){r=i instanceof Error?i.message:String(i),s.finish("bloom","error",r)}finally{s.stop()}l?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:r??null,manifest:e?.manifest??null,source:u,upToDate:e?.upToDate??!1},void 0,2)}
1
+ var D=Object.defineProperty;var f=(o,t)=>D(o,"name",{value:t,configurable:!0});import{E as d}from"../packem_shared/Table-DoSoazT6-DwnyTUsA.js";import{p as n}from"./bin.js";import{s as b}from"../packem_shared/scan-progress-DVtCtI2z.js";import{s as y,D as h}from"../packem_shared/osv-bloom-DSZcHLsM.js";var v=Object.defineProperty,a=f((o,t)=>v(o,"name",{value:t,configurable:!0}),"s");const w=a(o=>o?.security?.audit?.advisories?.bloom??{},"readBloomConfig"),p=a(o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,"formatDuration"),$=a(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),B=a(async({options:o,visConfig:t,workspaceRoot:c})=>{if(!c)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const l=o.format==="json",m=w(t),u=o.source??m.source??h,s=b([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!l});let e,r;try{s.start("bloom");const i=Date.now();e=await y({allowedHosts:m.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:u,workspaceRoot:c}),e.upToDate?s.finish("bloom","ok",`up to date · ${p(Date.now()-i)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${$(e.bytesOnDisk)} · ${p(e.durationMs)}`)}catch(i){r=i instanceof Error?i.message:String(i),s.finish("bloom","error",r)}finally{s.stop()}l?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:r??null,manifest:e?.manifest??null,source:u,upToDate:e?.upToDate??!1},void 0,2)}
2
2
  `):e&&(n.info(d(`Cache: ${e.cacheDir}`)),n.info(d(`Built: ${e.manifest.builtAtRfc3339}`)),r||n.success(e.upToDate?"osv-bloom prefilter up to date.":"osv-bloom prefilter synced.")),r&&(process.exitCode=1)},"execute"),x=B;export{x as advisoriesBloomSyncExecute};
@@ -1,19 +1,19 @@
1
- var jo=Object.defineProperty;var v=(e,t)=>jo(e,"name",{value:t,configurable:!0});import{createRequire as Oo}from"node:module";import{f as Sn,$ as To,U as Cn,i as X,_ as an,K as it,s as So,M as U,a as Mn}from"../packem_shared/readFileSync-4c_c6Qey-6SWMDNdw.js";import{createJiti as _n}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const ko=Oo(import.meta.url),Ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Kr=v(e=>{if(typeof Ze<"u"&&Ze.versions&&Ze.versions.node){const[t,n]=Ze.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ze.getBuiltinModule(e)}return ko(e)},"__cjs_getBuiltinModule"),{createHash:An}=Kr("node:crypto"),{readdirSync:Tn,readFileSync:Po,copyFileSync:Eo,unlinkSync:Ao}=Kr("node:fs"),{createRequire:st}=Kr("node:module");var Co=Object.defineProperty,Q=v((e,t)=>Co(e,"name",{value:t,configurable:!0}),"L"),Mo=Object.defineProperty,A=Q((e,t)=>Mo(e,"name",{value:t,configurable:!0}),"y");const _o=st(import.meta.url),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zo=A(e=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[t,n]=be.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return be.getBuiltinModule(e)}return _o(e)},"__cjs_getBuiltinModule"),{env:ve,cwd:zn}=be,{createRequire:je}=zo("node:module"),Nn=0,$e=2,Bn=Symbol("findUpStop");var No=Object.defineProperty,Bo=A((e,t)=>No(e,"name",{value:t,configurable:!0}),"t$4"),Ro=Object.defineProperty,Io=Bo((e,t)=>Ro(e,"name",{value:t,configurable:!0}),"t"),Do=Object.defineProperty,Fo=Io((e,t)=>Do(e,"name",{value:t,configurable:!0}),"n");const Hr=Fo(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var Wo=Object.defineProperty,Lo=A((e,t)=>Wo(e,"name",{value:t,configurable:!0}),"i$4"),Uo=Object.defineProperty,Vo=Lo((e,t)=>Uo(e,"name",{value:t,configurable:!0}),"r"),qo=Object.defineProperty,Zo=Vo((e,t)=>qo(e,"name",{value:t,configurable:!0}),"i");const cn=Zo(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var Go=Object.defineProperty,Ko=A((e,t)=>Go(e,"name",{value:t,configurable:!0}),"i$3"),Ho=Object.defineProperty,Rn=Ko((e,t)=>Ho(e,"name",{value:t,configurable:!0}),"s");const Jo=je(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xo=Rn(e=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[t,n]=Ge.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ge.getBuiltinModule(e)}return Jo(e)},"__cjs_getBuiltinModule"),{lstatSync:un,mkdirSync:Qo}=Xo("node:fs");var Yo=Object.defineProperty,es=Rn((e,t)=>Yo(e,"name",{value:t,configurable:!0}),"o");const ts=es(e=>{Hr(e);try{const t=un(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(cn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Qo(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const n=un(e);if(!n.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(cn(n))}'`,{cause:t})}},"ensureDirSync");var rs=Object.defineProperty,ns=A((e,t)=>rs(e,"name",{value:t,configurable:!0}),"$e$1"),os=Object.defineProperty,Jr=ns((e,t)=>os(e,"name",{value:t,configurable:!0}),"W"),ss=Object.defineProperty,y=Jr((e,t)=>ss(e,"name",{value:t,configurable:!0}),"u$1");let ln=y(()=>{var e=(()=>{var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=y((r,o)=>{for(var i in o)t(r,i,{get:o[i],enumerable:!0})},"ne"),g=y((r,o,i,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of s(o))!u.call(r,a)&&a!==i&&t(r,a,{get:y(()=>o[a],"get"),enumerable:!(c=n(o,a))||c.enumerable});return r},"ae"),h=y(r=>g(t({},"__esModule",{value:!0}),r),"oe"),w={};l(w,{zeptomatch:y(()=>qe,"zeptomatch")});var O=y(r=>{const o=new Set,i=[r];for(let c=0;c<i.length;c++){const a=i[c];if(o.has(a))continue;o.add(a);const{children:f}=a;if(f?.length)for(let p=0,m=f.length;p<m;p++)i.push(f[p])}return Array.from(o)},"M"),j=y(r=>{let o="";const i=O(r);for(let c=0,a=i.length;c<a;c++){const f=i[c];if(!f.regex)continue;const p=f.regex.flags;if(o||(o=p),o!==p)throw new Error(`Inconsistent RegExp flags used: "${o}" and "${p}"`)}return o},"se"),$=y((r,o,i)=>{const c=i.get(r);if(c!==void 0)return c;const a=r.partial??o;let f="";if(r.regex&&(f+=a?"(?:$|":"",f+=r.regex.source),r.children?.length){const p=E(r.children.map(m=>$(m,o,i)).filter(Boolean));if(p?.length){const m=r.children.some(G=>!G.regex||!(G.partial??o)),k=p.length>1||a&&(!f.length||m);f+=k?a?"(?:$|":"(?:":"",f+=p.join("|"),f+=k?")":""}}return r.regex&&(f+=a?")":""),i.set(r,f),f},"O"),M=y((r,o)=>{const i=new Map,c=O(r);for(let a=c.length-1;a>=0;a--){const f=$(c[a],o,i);if(!(a>0))return f}return""},"ie"),E=y(r=>Array.from(new Set(r)),"ue"),P=y((r,o,i)=>P.compile(r,i).test(o),"R");P.compile=(r,o)=>{const i=o?.partial??!1,c=M(r,i),a=j(r);return new RegExp(`^(?:${c})$`,a)};var V=P,q=y((r,o)=>{const i=V.compile(r,o),c=`${i.source.slice(0,-1)}[\\\\/]?$`,a=i.flags;return new RegExp(c,a)},"le"),se=q,ke=y(r=>{const o=r.map(c=>c.source).join("|")||"$^",i=r[0]?.flags;return new RegExp(o,i)},"ve"),Pe=ke,te=y(r=>Array.isArray(r),"j"),B=y(r=>typeof r=="function","_"),Ee=y(r=>r.length===0,"he"),Ae=(()=>{const{toString:r}=Function.prototype,o=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return i=>(i.length===0||i.length===1)&&o.test(r.call(i))})(),Pt=y(r=>typeof r=="number","de"),Et=y(r=>typeof r=="object"&&r!==null,"xe"),At=y(r=>r instanceof RegExp,"me"),Tt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return o=>r.test(o.source)})(),St=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return o=>r.test(o.source)&&!o.flags.includes("i")})(),Te=y(r=>typeof r=="string","A"),_=y(r=>r===void 0,"f"),Ct=y(r=>{const o=new Map;return i=>{const c=o.get(i);if(c!==void 0)return c;const a=r(i);return o.set(i,a),a}},"ye"),Se=y((r,o,i={})=>{const c={cache:{},input:r,index:0,indexBacktrackMax:0,options:i,output:[]},a=z(o)(c),f=Math.max(c.index,c.indexBacktrackMax);if(a&&c.index===r.length)return c.output;throw new Error(`Failed to parse at index ${f}`)},"I"),d=y((r,o)=>te(r)?Mt(r,o):Te(r)?Ce(r,o):_t(r,o),"i"),Mt=y((r,o)=>{const i={};for(const c of r){if(c.length!==1)throw new Error(`Invalid character: "${c}"`);const a=c.charCodeAt(0);i[a]=!0}return c=>{const a=c.input;let f=c.index,p=f;for(;p<a.length&&a.charCodeAt(p)in i;)p+=1;if(p>f){if(!_(o)&&!c.options.silent){const m=a.slice(f,p),k=B(o)?o(m,a,`${f}`):o;_(k)||c.output.push(k)}c.index=p}return!0}},"we"),_t=y((r,o)=>{if(St(r))return Ce(r.source,o);{const i=r.source,c=r.flags.replace(/y|$/,"y"),a=new RegExp(i,c);return Tt(r)&&B(o)&&!Ae(o)?zt(a,o):Nt(a,o)}},"$e"),zt=y((r,o)=>i=>{const c=i.index,a=i.input;r.lastIndex=c;const f=r.exec(a);if(f){const p=r.lastIndex;if(!i.options.silent){const m=o(...f,a,`${c}`);_(m)||i.output.push(m)}return i.index=p,!0}else return!1},"Ee"),Nt=y((r,o)=>i=>{const c=i.index,a=i.input;if(r.lastIndex=c,r.test(a)){const f=r.lastIndex;if(!_(o)&&!i.options.silent){const p=B(o)?o(a.slice(c,f),a,`${c}`):o;_(p)||i.output.push(p)}return i.index=f,!0}else return!1},"Ce"),Ce=y((r,o)=>i=>{const c=i.index,a=i.input;if(a.startsWith(r,c)){if(!_(o)&&!i.options.silent){const f=B(o)?o(r,a,`${c}`):o;_(f)||i.output.push(f)}return i.index+=r.length,!0}else return!1},"F"),ue=y((r,o,i,c)=>{const a=z(r),f=o>1;return fe(le(_e(p=>{let m=0;for(;m<i;){const k=p.index;if(!a(p)||(m+=1,p.index===k))break}return m>=o},f),c))},"k"),Me=y((r,o)=>ue(r,0,1,o),"L"),re=y((r,o)=>ue(r,0,1/0,o),"$"),Bt=y((r,o)=>ue(r,1,1/0,o),"Re"),F=y((r,o)=>{const i=r.map(z);return fe(le(_e(c=>{for(let a=0,f=i.length;a<f;a++)if(!i[a](c))return!1;return!0}),o))},"x"),S=y((r,o)=>{const i=r.map(z);return fe(le(c=>{for(let a=0,f=i.length;a<f;a++)if(i[a](c))return!0;return!1},o))},"p"),_e=y((r,o=!0,i=!1)=>{const c=z(r);return o?a=>{const f=a.index,p=a.output.length,m=c(a);return!m&&!i&&(a.indexBacktrackMax=Math.max(a.indexBacktrackMax,a.index)),(!m||i)&&(a.index=f,a.output.length!==p&&(a.output.length=p)),m}:c},"q"),le=y((r,o)=>{const i=z(r);return o?c=>{if(c.options.silent)return i(c);const a=c.output.length;if(i(c)){const f=c.output.splice(a,1/0),p=o(f);return _(p)||c.output.push(p),!0}else return!1}:i},"B"),fe=(()=>{let r=0;return o=>{const i=z(o),c=r+=1;return a=>{var f;if(a.options.memoization===!1)return i(a);const p=a.index,m=(f=a.cache)[c]||(f[c]={indexMax:-1,queue:[]}),k=m.queue;if(p<=m.indexMax){const K=m.store||(m.store=new Map);if(k.length){for(let L=0,Fr=k.length;L<Fr;L+=2){const Wr=k[L*2],Lr=k[L*2+1];K.set(Wr,Lr)}k.length=0}const C=K.get(p);if(C===!1)return!1;if(Pt(C))return a.index=C,!0;if(C)return a.index=C.index,C.output?.length&&a.output.push(...C.output),!0}const G=a.output.length,Dr=i(a);if(m.indexMax=Math.max(m.indexMax,p),Dr){const K=a.index,C=a.output.length;if(C>G){const L=a.output.slice(G,C);k.push(p,{index:K,output:L})}else k.push(p,K);return!0}else return k.push(p,!1),!1}}})(),ze=y(r=>{let o;return i=>(o||(o=z(r())),o(i))},"G"),z=Ct(r=>{if(B(r))return Ee(r)?ze(r):r;if(Te(r)||At(r))return d(r);if(te(r))return F(r);if(Et(r))return S(Object.values(r));throw new Error("Invalid rule")}),R=y(r=>r,"d"),Rt=y(r=>typeof r=="string","ke"),It=y(r=>{const o=new WeakMap,i=new WeakMap;return(c,a)=>{const f=a?.partial?i:o,p=f.get(c);if(p!==void 0)return p;const m=r(c,a);return f.set(c,m),m}},"Be"),Dt=y(r=>{const o={},i={};return(c,a)=>{const f=a?.partial?i:o;return f[c]??(f[c]=r(c,a))}},"Pe"),Ft=d(/\\./,R),Wt=d(/./,R),Lt=d(/\*\*\*+/,"*"),Ut=d(/([^/{[(!])\*\*/,(r,o)=>`${o}*`),Vt=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,o)=>`${o}*`),qt=re(S([Ft,Lt,Ut,Vt,Wt])),Zt=qt,Gt=y(r=>Se(r,Zt,{memoization:!1}).join(""),"Ie"),Kt=Gt,Ne="abcdefghijklmnopqrstuvwxyz",Ht=y(r=>{let o="";for(;r>0;){const i=(r-1)%26;o=Ne[i]+o,r=Math.floor((r-1)/26)}return o},"Le"),Be=y(r=>{let o=0;for(let i=0,c=r.length;i<c;i++)o=o*26+Ne.indexOf(r[i])+1;return o},"V"),pe=y((r,o)=>{if(o<r)return pe(o,r);const i=[];for(;r<=o;)i.push(r++);return i},"b"),Jt=y((r,o,i)=>pe(r,o).map(c=>String(c).padStart(i,"0")),"qe"),Re=y((r,o)=>pe(Be(r),Be(o)).map(Ht),"W"),x=y(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),Z=y(r=>({children:r}),"y"),W=(()=>{const r=y((o,i,c)=>{if(c.has(o))return;c.add(o);const{children:a}=o;if(!a.length)a.push(i);else for(let f=0,p=a.length;f<p;f++)r(a[f],i,c)},"e");return o=>{if(!o.length)return Z([]);for(let i=o.length-1;i>=1;i--){const c=new Set,a=o[i-1],f=o[i];r(a,f,c)}return o[0]}})(),N=y(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),Xt=d(/\\./,x),Qt=d(/[$.*+?^(){}[\]\|]/,r=>x(`\\${r}`)),Yt=d(/[\\\/]/,N),er=d(/[^$.*+?^(){}[\]\|\\\/]+/,x),tr=d(/^(?:!!)*!(.*)$/,(r,o)=>x(`(?!^${qe.compile(o).source}$).*?`)),rr=d(/^(!!)+/),nr=S([tr,rr]),or=d(/\/(\*\*\/)+/,()=>Z([W([N(),x(".+?"),N()]),N()])),sr=d(/^(\*\*\/)+/,()=>Z([x("^"),W([x(".*?"),N()])])),ir=d(/\/(\*\*)$/,()=>Z([W([N(),x(".*?")]),x("$")])),ar=d(/\*\*/,()=>x(".*?")),Ie=S([or,sr,ir,ar]),cr=d(/\*\/(?!\*\*\/|\*$)/,()=>W([x("[^\\\\/]*?"),N()])),ur=d(/\*/,()=>x("[^\\\\/]*")),De=S([cr,ur]),Fe=d("?",()=>x("[^\\\\/]")),lr=d("[",R),fr=d("]",R),pr=d(/[!^]/,"^\\\\/"),dr=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),gr=d(/\\./,R),hr=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),mr=d(/[\\\/]/,"\\\\/"),yr=d(/[^$.*+?^(){}[\]\|\\\/]+/,R),br=S([gr,hr,mr,dr,yr]),We=F([lr,Me(pr),re(br),fr],r=>x(r.join(""))),vr=d("{","(?:"),$r=d("}",")"),wr=d(/(\d+)\.\.(\d+)/,(r,o,i)=>Jt(+o,+i,Math.min(o.length,i.length)).join("|")),xr=d(/([a-z]+)\.\.([a-z]+)/,(r,o,i)=>Re(o,i).join("|")),jr=d(/([A-Z]+)\.\.([A-Z]+)/,(r,o,i)=>Re(o.toLowerCase(),i.toLowerCase()).join("|").toUpperCase()),Or=S([wr,xr,jr]),Le=F([vr,Or,$r],r=>x(r.join(""))),kr=d("{"),Pr=d("}"),Er=d(","),Ar=d(/\\./,x),Tr=d(/[$.*+?^(){[\]\|]/,r=>x(`\\${r}`)),Sr=d(/[\\\/]/,N),Cr=d(/[^$.*+?^(){}[\]\|\\\/,]+/,x),Mr=ze(()=>Ve),_r=d("",()=>x("(?:)")),zr=Bt(S([Ie,De,Fe,We,Le,Mr,Ar,Tr,Sr,Cr]),W),Ue=S([zr,_r]),Ve=F([kr,Me(F([Ue,re(F([Er,Ue]))])),Pr],Z),Nr=re(S([nr,Ie,De,Fe,We,Le,Ve,Xt,Qt,Yt,er]),W),Br=Nr,Rr=y(r=>Se(r,Br,{memoization:!1})[0],"kr"),Ir=Rr,de=y((r,o,i)=>de.compile(r,i).test(o),"N");de.compile=(()=>{const r=Dt((i,c)=>se(Ir(Kt(i)),c)),o=It((i,c)=>Pe(i.map(a=>r(a,c))));return(i,c)=>Rt(i)?r(i,c):o(i,c)})();var qe=de;return h(w)})();return e.default||e},"_lazyMatch"),Ur;const is=y((e,t)=>(Ur||(Ur=ln(),ln=null),Ur(e,t)),"default");var as=Object.defineProperty,cs=Jr((e,t)=>as(e,"name",{value:t,configurable:!0}),"t$1");const us=/^[A-Z]:\//i,Y=cs((e="")=>e&&e.replaceAll("\\","/").replace(us,t=>t.toUpperCase()),"normalizeWindowsPath");var ls=Object.defineProperty,I=Jr((e,t)=>ls(e,"name",{value:t,configurable:!0}),"r");const fs=/^[/\\]{2}/,ps=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,In=/^[A-Z]:$/i,fn=/^\/([A-Z]:)?$/i,ds=/.(\.[^./]+)$/,gs=/^[/\\]|^[a-z]:[/\\]/i,hs=/\/$/,ms=I(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Dn=I((e,t)=>{let n="",s=0,u=-1,l=0,g;for(let h=0;h<=e.length;++h){if(h<e.length)g=e[h];else{if(g==="/")break;g="/"}if(g==="/"){if(!(u===h-1||l===1))if(l===2){if(n.length<2||s!==2||!n.endsWith(".")||n.at(-2)!=="."){if(n.length>2){const w=n.lastIndexOf("/");w===-1?(n="",s=0):(n=n.slice(0,w),s=n.length-1-n.lastIndexOf("/")),u=h,l=0;continue}else if(n.length>0){n="",s=0,u=h,l=0;continue}}t&&(n+=n.length>0?"/..":"..",s=2)}else n.length>0?n+=`/${e.slice(u+1,h)}`:n=e.slice(u+1,h),s=h-u-1;u=h,l=0}else g==="."&&l!==-1?++l:l=-1}return n},"normalizeString"),ge=I(e=>ps.test(e),"isAbsolute"),Fn=I(function(e){if(e.length===0)return".";e=Y(e);const t=fs.exec(e),n=ge(e),s=e.at(-1)==="/";return e=Dn(e,!n),e.length===0?n?"/":s?"./":".":(s&&(e+="/"),In.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!ge(e)?`/${e}`:e)},"normalize"),Wn=I((...e)=>{let t="";for(const n of e)if(n)if(t.length>0){const s=t.at(-1)==="/",u=n[0]==="/";s&&u?t+=n.slice(1):t+=s||u?n:`/${n}`}else t+=n;return Fn(t)},"join"),ne=I(function(...e){e=e.map(s=>Y(s));let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const u=s>=0?e[s]:ms();!u||u.length===0||(t=`${u}/${t}`,n=ge(u))}return t=Dn(t,!n),n&&!ge(t)?`/${t}`:t.length>0?t:"."},"resolve");I(function(e){return Y(e)},"toNamespacedPath");const Ln=I(function(e){return ds.exec(Y(e))?.[1]??""},"extname");I(function(e,t){const n=ne(e).replace(fn,"$1").split("/"),s=ne(t).replace(fn,"$1").split("/");if(s[0][1]===":"&&n[0][1]===":"&&n[0]!==s[0])return s.join("/");const u=[...n];for(const l of u){if(s[0]!==l)break;n.shift(),s.shift()}return[...n.map(()=>".."),...s].join("/")},"relative");const Xr=I(e=>{const t=Y(e).replace(hs,"").split("/").slice(0,-1);return t.length===1&&In.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(ge(e)?"/":".")},"dirname");I(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return Y(e.root?ne(...t):t.join("/"))},"format");const ys=I((e,t)=>{const n=Y(e).split("/").pop();return t&&n.endsWith(t)?n.slice(0,-t.length):n},"basename"),Un=I(function(e){const t=gs.exec(e)?.[0]?.replaceAll("\\","/")??"",n=ys(e),s=Ln(n);return{base:n,dir:Xr(e),ext:s,name:n.slice(0,n.length-s.length),root:t}},"parse");I((e,t)=>is(t,Fn(e)),"matchesGlob");var bs=Object.defineProperty,he=A((e,t)=>bs(e,"name",{value:t,configurable:!0}),"n$2"),vs=Object.defineProperty,oe=he((e,t)=>vs(e,"name",{value:t,configurable:!0}),"a");const $s=je(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ws=oe(e=>{if(typeof Ke<"u"&&Ke.versions&&Ke.versions.node){const[t,n]=Ke.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ke.getBuiltinModule(e)}return $s(e)},"__cjs_getBuiltinModule"),{fileURLToPath:xs}=ws("node:url");var js=Object.defineProperty,we=oe((e,t)=>js(e,"name",{value:t,configurable:!0}),"t$1");function Oe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}v(Oe,"Ie");Q(Oe,"De");A(Oe,"m$5");he(Oe,"d");oe(Oe,"getDefaultExportFromCjs");we(Oe,"getDefaultExportFromCjs");function at(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}v(at,"We");Q(at,"mr");A(at,"h");he(at,"O");oe(at,"getDefaultExportFromNamespaceIfPresent");we(at,"getDefaultExportFromNamespaceIfPresent");function ct(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}v(ct,"Fe");Q(ct,"$r");A(ct,"x");he(ct,"P");oe(ct,"getDefaultExportFromNamespaceIfNotNamed");we(ct,"getDefaultExportFromNamespaceIfNotNamed");function ut(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=we(oe(he(A(Q(v(function s(){var u=!1;try{u=this instanceof s}catch{}return u?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"l"),"l"),"a"),"s"),"a"),"a");n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var u=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,u.get?u:{enumerable:!0,get:we(function(){return e[s]},"get")})}),n}v(ut,"Ze");Q(ut,"br");A(ut,"y$3");he(ut,"_");oe(ut,"getAugmentedNamespace");we(ut,"getAugmentedNamespace");var pn,dn;function lt(){return dn||(dn=1,pn=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),pn}v(lt,"qe");Q(lt,"xr");A(lt,"w$1");he(lt,"k");oe(lt,"requireBinaryExtensions");var Os=lt();const ks=Oe(Os);var Ps=Object.defineProperty,ee=oe((e,t)=>Ps(e,"name",{value:t,configurable:!0}),"r");const Es=new Set(ks),As=new Set(["/","\\",void 0]),gn=Symbol.for("pathe:normalizedAlias"),Ts=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,Ss=ee((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),ht=ee((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),Vn=ee(e=>{if(e[gn])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([n],[s])=>Ss(n,s)));for(const n in t)for(const s in t)s===n||n.startsWith(s)||t[n].startsWith(s)&&As.has(t[n][s.length])&&(t[n]=t[s]+t[n].slice(s.length));return Object.defineProperty(t,gn,{enumerable:!1,value:!0}),t},"normalizeAliases");ee((e,t)=>{e=Y(e),t=Vn(t);for(const[n,s]of Object.entries(t)){if(!e.startsWith(n))continue;const u=ht(n)?n.slice(0,-1):n;if(ht(e[u.length]))return Wn(s,e.slice(n.length))}return e},"resolveAlias");ee(e=>Ts.exec(e)?.[2],"filename");ee((e,t)=>{e=Y(e),t=Vn(t);for(const[n,s]of Object.entries(t).toReversed()){if(!e.startsWith(s))continue;const u=ht(s)?s.slice(0,-1):s;if(ht(e[u.length]))return Wn(n,e.slice(s.length))}return e},"reverseResolveAlias");const Cs=/^(?:\.?\.[/\\]|\.\.\B)/,Ms=/^(?:msys|cygwin)$/;ee(e=>Cs.test(e)||e==="..","isRelative");ee(e=>Es.has(Ln(e).slice(1).toLowerCase()),"isBinaryPath");const xe=ee(e=>Y(e instanceof URL?xs(e):e),"toPath");ee(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:Ms.test(e)},"isWindows");var _s=Object.defineProperty,zs=A((e,t)=>_s(e,"name",{value:t,configurable:!0}),"p"),Ns=Object.defineProperty,qn=zs((e,t)=>Ns(e,"name",{value:t,configurable:!0}),"a");const Bs=je(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zn=qn(e=>{if(typeof He<"u"&&He.versions&&He.versions.node){const[t,n]=He.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return He.getBuiltinModule(e)}return Bs(e)},"__cjs_getBuiltinModule"),{stat:Rs,lstat:Is}=Zn("node:fs/promises"),{fileURLToPath:Ds}=Zn("node:url");var Fs=Object.defineProperty,hn=qn((e,t)=>Fs(e,"name",{value:t,configurable:!0}),"n");const Ws=hn(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const n=t.cwd?xe(t.cwd):process.cwd();let s=ne(n);const{root:u}=Un(s),l=xe(t.stopAt??u),g=ne(s,l),h=t.type??"file",w=hn(async function(j){return typeof e=="function"?[await e(j)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const O=t.allowSymlinks?Rs:Is;for(;s&&s!==g&&s!==u;){const j=await w(s);for(let $ of j){if($===Bn)return;if($===void 0)continue;Buffer.isBuffer($)?$=$.toString():$ instanceof URL&&($=Ds($));const M=ge($)?$:ne(s,$);try{const E=await O(M);if(h==="file"&&E.isFile()||h==="directory"&&E.isDirectory())return M}catch{}}s=Xr(s)}},"findUp");var Ls=Object.defineProperty,Us=A((e,t)=>Ls(e,"name",{value:t,configurable:!0}),"u$2"),Vs=Object.defineProperty,Gn=Us((e,t)=>Vs(e,"name",{value:t,configurable:!0}),"i");const qs=je(import.meta.url),Je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Kn=Gn(e=>{if(typeof Je<"u"&&Je.versions&&Je.versions.node){const[t,n]=Je.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Je.getBuiltinModule(e)}return qs(e)},"__cjs_getBuiltinModule"),{statSync:Zs,lstatSync:Gs}=Kn("node:fs"),{fileURLToPath:Ks}=Kn("node:url");var Hs=Object.defineProperty,mn=Gn((e,t)=>Hs(e,"name",{value:t,configurable:!0}),"o");const Js=mn((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const n=t.cwd?xe(t.cwd):process.cwd();let s=ne(n);const{root:u}=Un(s),l=xe(t.stopAt??u),g=ne(s,l),h=t.type??"file",w=mn(function(j){return typeof e=="function"?[e(j)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const O=t.allowSymlinks?Zs:Gs;for(;s&&s!==g&&s!==u;){for(let j of w(s)){if(j===Bn)return;if(j===void 0)continue;Buffer.isBuffer(j)?j=j.toString():j instanceof URL&&(j=Ks(j));const $=ge(j)?j:ne(s,j);try{const M=O($);if(h==="file"&&M.isFile()||h==="directory"&&M.isDirectory())return $}catch{}}s=Xr(s)}},"findUpSync");var Xs=Object.defineProperty,Hn=A((e,t)=>Xs(e,"name",{value:t,configurable:!0}),"t$2"),Qs=Object.defineProperty,Qr=Hn((e,t)=>Qs(e,"name",{value:t,configurable:!0}),"s");const Ys=je(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ei=Qr(e=>{if(typeof Xe<"u"&&Xe.versions&&Xe.versions.node){const[t,n]=Xe.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Xe.getBuiltinModule(e)}return Ys(e)},"__cjs_getBuiltinModule"),{access:ti}=ei("node:fs/promises");var ri=Object.defineProperty,ni=Qr((e,t)=>ri(e,"name",{value:t,configurable:!0}),"o");async function H(e,t=Nn){Hr(e),e=xe(e);try{return await ti(e,t),!0}catch{return!1}}v(H,"W$1");Q(H,"Z");A(H,"i$1");Hn(H,"d");Qr(H,"m");ni(H,"isAccessible");var oi=Object.defineProperty,Jn=A((e,t)=>oi(e,"name",{value:t,configurable:!0}),"t$1"),si=Object.defineProperty,Yr=Jn((e,t)=>si(e,"name",{value:t,configurable:!0}),"t");const ii=je(import.meta.url),Qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ai=Yr(e=>{if(typeof Qe<"u"&&Qe.versions&&Qe.versions.node){const[t,n]=Qe.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Qe.getBuiltinModule(e)}return ii(e)},"__cjs_getBuiltinModule"),{accessSync:ci}=ai("node:fs");var ui=Object.defineProperty,li=Yr((e,t)=>ui(e,"name",{value:t,configurable:!0}),"o");function J(e,t=Nn){Hr(e),e=xe(e);try{return ci(e,t),!0}catch{return!1}}v(J,"F$3");Q(J,"H");A(J,"i");Jn(J,"d");Yr(J,"m");li(J,"isAccessibleSync");var fi=Object.defineProperty,Xn=A((e,t)=>fi(e,"name",{value:t,configurable:!0}),"o"),pi=Object.defineProperty,Qn=Xn((e,t)=>pi(e,"name",{value:t,configurable:!0}),"o"),di=Object.defineProperty,gi=Qn((e,t)=>di(e,"name",{value:t,configurable:!0}),"o");let Yn=class extends Error{static{v(this,"rr")}static{Q(this,"tn")}static{A(this,"s")}static{Xn(this,"u")}static{Qn(this,"n")}static{gi(this,"NotFoundError")}constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}};var hi=Object.defineProperty,mi=A((e,t)=>hi(e,"name",{value:t,configurable:!0}),"$e"),yi=Object.defineProperty,en=mi((e,t)=>yi(e,"name",{value:t,configurable:!0}),"W"),bi=Object.defineProperty,b=en((e,t)=>bi(e,"name",{value:t,configurable:!0}),"u$1");let yn=b(()=>{var e=(()=>{var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=b((r,o)=>{for(var i in o)t(r,i,{get:o[i],enumerable:!0})},"ne"),g=b((r,o,i,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of s(o))!u.call(r,a)&&a!==i&&t(r,a,{get:b(()=>o[a],"get"),enumerable:!(c=n(o,a))||c.enumerable});return r},"ae"),h=b(r=>g(t({},"__esModule",{value:!0}),r),"oe"),w={};l(w,{zeptomatch:b(()=>qe,"zeptomatch")});var O=b(r=>{const o=new Set,i=[r];for(let c=0;c<i.length;c++){const a=i[c];if(o.has(a))continue;o.add(a);const{children:f}=a;if(f?.length)for(let p=0,m=f.length;p<m;p++)i.push(f[p])}return Array.from(o)},"M"),j=b(r=>{let o="";const i=O(r);for(let c=0,a=i.length;c<a;c++){const f=i[c];if(!f.regex)continue;const p=f.regex.flags;if(o||(o=p),o!==p)throw new Error(`Inconsistent RegExp flags used: "${o}" and "${p}"`)}return o},"se"),$=b((r,o,i)=>{const c=i.get(r);if(c!==void 0)return c;const a=r.partial??o;let f="";if(r.regex&&(f+=a?"(?:$|":"",f+=r.regex.source),r.children?.length){const p=E(r.children.map(m=>$(m,o,i)).filter(Boolean));if(p?.length){const m=r.children.some(G=>!G.regex||!(G.partial??o)),k=p.length>1||a&&(!f.length||m);f+=k?a?"(?:$|":"(?:":"",f+=p.join("|"),f+=k?")":""}}return r.regex&&(f+=a?")":""),i.set(r,f),f},"O"),M=b((r,o)=>{const i=new Map,c=O(r);for(let a=c.length-1;a>=0;a--){const f=$(c[a],o,i);if(!(a>0))return f}return""},"ie"),E=b(r=>Array.from(new Set(r)),"ue"),P=b((r,o,i)=>P.compile(r,i).test(o),"R");P.compile=(r,o)=>{const i=o?.partial??!1,c=M(r,i),a=j(r);return new RegExp(`^(?:${c})$`,a)};var V=P,q=b((r,o)=>{const i=V.compile(r,o),c=`${i.source.slice(0,-1)}[\\\\/]?$`,a=i.flags;return new RegExp(c,a)},"le"),se=q,ke=b(r=>{const o=r.map(c=>c.source).join("|")||"$^",i=r[0]?.flags;return new RegExp(o,i)},"ve"),Pe=ke,te=b(r=>Array.isArray(r),"j"),B=b(r=>typeof r=="function","_"),Ee=b(r=>r.length===0,"he"),Ae=(()=>{const{toString:r}=Function.prototype,o=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return i=>(i.length===0||i.length===1)&&o.test(r.call(i))})(),Pt=b(r=>typeof r=="number","de"),Et=b(r=>typeof r=="object"&&r!==null,"xe"),At=b(r=>r instanceof RegExp,"me"),Tt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return o=>r.test(o.source)})(),St=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return o=>r.test(o.source)&&!o.flags.includes("i")})(),Te=b(r=>typeof r=="string","A"),_=b(r=>r===void 0,"f"),Ct=b(r=>{const o=new Map;return i=>{const c=o.get(i);if(c!==void 0)return c;const a=r(i);return o.set(i,a),a}},"ye"),Se=b((r,o,i={})=>{const c={cache:{},input:r,index:0,indexBacktrackMax:0,options:i,output:[]},a=z(o)(c),f=Math.max(c.index,c.indexBacktrackMax);if(a&&c.index===r.length)return c.output;throw new Error(`Failed to parse at index ${f}`)},"I"),d=b((r,o)=>te(r)?Mt(r,o):Te(r)?Ce(r,o):_t(r,o),"i"),Mt=b((r,o)=>{const i={};for(const c of r){if(c.length!==1)throw new Error(`Invalid character: "${c}"`);const a=c.charCodeAt(0);i[a]=!0}return c=>{const a=c.input;let f=c.index,p=f;for(;p<a.length&&a.charCodeAt(p)in i;)p+=1;if(p>f){if(!_(o)&&!c.options.silent){const m=a.slice(f,p),k=B(o)?o(m,a,`${f}`):o;_(k)||c.output.push(k)}c.index=p}return!0}},"we"),_t=b((r,o)=>{if(St(r))return Ce(r.source,o);{const i=r.source,c=r.flags.replace(/y|$/,"y"),a=new RegExp(i,c);return Tt(r)&&B(o)&&!Ae(o)?zt(a,o):Nt(a,o)}},"$e"),zt=b((r,o)=>i=>{const c=i.index,a=i.input;r.lastIndex=c;const f=r.exec(a);if(f){const p=r.lastIndex;if(!i.options.silent){const m=o(...f,a,`${c}`);_(m)||i.output.push(m)}return i.index=p,!0}else return!1},"Ee"),Nt=b((r,o)=>i=>{const c=i.index,a=i.input;if(r.lastIndex=c,r.test(a)){const f=r.lastIndex;if(!_(o)&&!i.options.silent){const p=B(o)?o(a.slice(c,f),a,`${c}`):o;_(p)||i.output.push(p)}return i.index=f,!0}else return!1},"Ce"),Ce=b((r,o)=>i=>{const c=i.index,a=i.input;if(a.startsWith(r,c)){if(!_(o)&&!i.options.silent){const f=B(o)?o(r,a,`${c}`):o;_(f)||i.output.push(f)}return i.index+=r.length,!0}else return!1},"F"),ue=b((r,o,i,c)=>{const a=z(r),f=o>1;return fe(le(_e(p=>{let m=0;for(;m<i;){const k=p.index;if(!a(p)||(m+=1,p.index===k))break}return m>=o},f),c))},"k"),Me=b((r,o)=>ue(r,0,1,o),"L"),re=b((r,o)=>ue(r,0,1/0,o),"$"),Bt=b((r,o)=>ue(r,1,1/0,o),"Re"),F=b((r,o)=>{const i=r.map(z);return fe(le(_e(c=>{for(let a=0,f=i.length;a<f;a++)if(!i[a](c))return!1;return!0}),o))},"x"),S=b((r,o)=>{const i=r.map(z);return fe(le(c=>{for(let a=0,f=i.length;a<f;a++)if(i[a](c))return!0;return!1},o))},"p"),_e=b((r,o=!0,i=!1)=>{const c=z(r);return o?a=>{const f=a.index,p=a.output.length,m=c(a);return!m&&!i&&(a.indexBacktrackMax=Math.max(a.indexBacktrackMax,a.index)),(!m||i)&&(a.index=f,a.output.length!==p&&(a.output.length=p)),m}:c},"q"),le=b((r,o)=>{const i=z(r);return o?c=>{if(c.options.silent)return i(c);const a=c.output.length;if(i(c)){const f=c.output.splice(a,1/0),p=o(f);return _(p)||c.output.push(p),!0}else return!1}:i},"B"),fe=(()=>{let r=0;return o=>{const i=z(o),c=r+=1;return a=>{var f;if(a.options.memoization===!1)return i(a);const p=a.index,m=(f=a.cache)[c]||(f[c]={indexMax:-1,queue:[]}),k=m.queue;if(p<=m.indexMax){const K=m.store||(m.store=new Map);if(k.length){for(let L=0,Fr=k.length;L<Fr;L+=2){const Wr=k[L*2],Lr=k[L*2+1];K.set(Wr,Lr)}k.length=0}const C=K.get(p);if(C===!1)return!1;if(Pt(C))return a.index=C,!0;if(C)return a.index=C.index,C.output?.length&&a.output.push(...C.output),!0}const G=a.output.length,Dr=i(a);if(m.indexMax=Math.max(m.indexMax,p),Dr){const K=a.index,C=a.output.length;if(C>G){const L=a.output.slice(G,C);k.push(p,{index:K,output:L})}else k.push(p,K);return!0}else return k.push(p,!1),!1}}})(),ze=b(r=>{let o;return i=>(o||(o=z(r())),o(i))},"G"),z=Ct(r=>{if(B(r))return Ee(r)?ze(r):r;if(Te(r)||At(r))return d(r);if(te(r))return F(r);if(Et(r))return S(Object.values(r));throw new Error("Invalid rule")}),R=b(r=>r,"d"),Rt=b(r=>typeof r=="string","ke"),It=b(r=>{const o=new WeakMap,i=new WeakMap;return(c,a)=>{const f=a?.partial?i:o,p=f.get(c);if(p!==void 0)return p;const m=r(c,a);return f.set(c,m),m}},"Be"),Dt=b(r=>{const o={},i={};return(c,a)=>{const f=a?.partial?i:o;return f[c]??(f[c]=r(c,a))}},"Pe"),Ft=d(/\\./,R),Wt=d(/./,R),Lt=d(/\*\*\*+/,"*"),Ut=d(/([^/{[(!])\*\*/,(r,o)=>`${o}*`),Vt=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,o)=>`${o}*`),qt=re(S([Ft,Lt,Ut,Vt,Wt])),Zt=qt,Gt=b(r=>Se(r,Zt,{memoization:!1}).join(""),"Ie"),Kt=Gt,Ne="abcdefghijklmnopqrstuvwxyz",Ht=b(r=>{let o="";for(;r>0;){const i=(r-1)%26;o=Ne[i]+o,r=Math.floor((r-1)/26)}return o},"Le"),Be=b(r=>{let o=0;for(let i=0,c=r.length;i<c;i++)o=o*26+Ne.indexOf(r[i])+1;return o},"V"),pe=b((r,o)=>{if(o<r)return pe(o,r);const i=[];for(;r<=o;)i.push(r++);return i},"b"),Jt=b((r,o,i)=>pe(r,o).map(c=>String(c).padStart(i,"0")),"qe"),Re=b((r,o)=>pe(Be(r),Be(o)).map(Ht),"W"),x=b(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),Z=b(r=>({children:r}),"y"),W=(()=>{const r=b((o,i,c)=>{if(c.has(o))return;c.add(o);const{children:a}=o;if(!a.length)a.push(i);else for(let f=0,p=a.length;f<p;f++)r(a[f],i,c)},"e");return o=>{if(!o.length)return Z([]);for(let i=o.length-1;i>=1;i--){const c=new Set,a=o[i-1],f=o[i];r(a,f,c)}return o[0]}})(),N=b(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),Xt=d(/\\./,x),Qt=d(/[$.*+?^(){}[\]\|]/,r=>x(`\\${r}`)),Yt=d(/[\\\/]/,N),er=d(/[^$.*+?^(){}[\]\|\\\/]+/,x),tr=d(/^(?:!!)*!(.*)$/,(r,o)=>x(`(?!^${qe.compile(o).source}$).*?`)),rr=d(/^(!!)+/),nr=S([tr,rr]),or=d(/\/(\*\*\/)+/,()=>Z([W([N(),x(".+?"),N()]),N()])),sr=d(/^(\*\*\/)+/,()=>Z([x("^"),W([x(".*?"),N()])])),ir=d(/\/(\*\*)$/,()=>Z([W([N(),x(".*?")]),x("$")])),ar=d(/\*\*/,()=>x(".*?")),Ie=S([or,sr,ir,ar]),cr=d(/\*\/(?!\*\*\/|\*$)/,()=>W([x("[^\\\\/]*?"),N()])),ur=d(/\*/,()=>x("[^\\\\/]*")),De=S([cr,ur]),Fe=d("?",()=>x("[^\\\\/]")),lr=d("[",R),fr=d("]",R),pr=d(/[!^]/,"^\\\\/"),dr=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),gr=d(/\\./,R),hr=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),mr=d(/[\\\/]/,"\\\\/"),yr=d(/[^$.*+?^(){}[\]\|\\\/]+/,R),br=S([gr,hr,mr,dr,yr]),We=F([lr,Me(pr),re(br),fr],r=>x(r.join(""))),vr=d("{","(?:"),$r=d("}",")"),wr=d(/(\d+)\.\.(\d+)/,(r,o,i)=>Jt(+o,+i,Math.min(o.length,i.length)).join("|")),xr=d(/([a-z]+)\.\.([a-z]+)/,(r,o,i)=>Re(o,i).join("|")),jr=d(/([A-Z]+)\.\.([A-Z]+)/,(r,o,i)=>Re(o.toLowerCase(),i.toLowerCase()).join("|").toUpperCase()),Or=S([wr,xr,jr]),Le=F([vr,Or,$r],r=>x(r.join(""))),kr=d("{"),Pr=d("}"),Er=d(","),Ar=d(/\\./,x),Tr=d(/[$.*+?^(){[\]\|]/,r=>x(`\\${r}`)),Sr=d(/[\\\/]/,N),Cr=d(/[^$.*+?^(){}[\]\|\\\/,]+/,x),Mr=ze(()=>Ve),_r=d("",()=>x("(?:)")),zr=Bt(S([Ie,De,Fe,We,Le,Mr,Ar,Tr,Sr,Cr]),W),Ue=S([zr,_r]),Ve=F([kr,Me(F([Ue,re(F([Er,Ue]))])),Pr],Z),Nr=re(S([nr,Ie,De,Fe,We,Le,Ve,Xt,Qt,Yt,er]),W),Br=Nr,Rr=b(r=>Se(r,Br,{memoization:!1})[0],"kr"),Ir=Rr,de=b((r,o,i)=>de.compile(r,i).test(o),"N");de.compile=(()=>{const r=Dt((i,c)=>se(Ir(Kt(i)),c)),o=It((i,c)=>Pe(i.map(a=>r(a,c))));return(i,c)=>Rt(i)?r(i,c):o(i,c)})();var qe=de;return h(w)})();return e.default||e},"_lazyMatch"),Vr;const vi=b((e,t)=>(Vr||(Vr=yn(),yn=null),Vr(e,t)),"default");var $i=Object.defineProperty,wi=en((e,t)=>$i(e,"name",{value:t,configurable:!0}),"t$1");const xi=/^[A-Z]:\//i,me=wi((e="")=>e&&e.replaceAll("\\","/").replace(xi,t=>t.toUpperCase()),"normalizeWindowsPath");var ji=Object.defineProperty,D=en((e,t)=>ji(e,"name",{value:t,configurable:!0}),"r");const Oi=/^[/\\]{2}/,ki=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,eo=/^[A-Z]:$/i,bn=/^\/([A-Z]:)?$/i,Pi=/.(\.[^./]+)$/,Ei=/^[/\\]|^[a-z]:[/\\]/i,Ai=/\/$/,Ti=D(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),to=D((e,t)=>{let n="",s=0,u=-1,l=0,g;for(let h=0;h<=e.length;++h){if(h<e.length)g=e[h];else{if(g==="/")break;g="/"}if(g==="/"){if(!(u===h-1||l===1))if(l===2){if(n.length<2||s!==2||!n.endsWith(".")||n.at(-2)!=="."){if(n.length>2){const w=n.lastIndexOf("/");w===-1?(n="",s=0):(n=n.slice(0,w),s=n.length-1-n.lastIndexOf("/")),u=h,l=0;continue}else if(n.length>0){n="",s=0,u=h,l=0;continue}}t&&(n+=n.length>0?"/..":"..",s=2)}else n.length>0?n+=`/${e.slice(u+1,h)}`:n=e.slice(u+1,h),s=h-u-1;u=h,l=0}else g==="."&&l!==-1?++l:l=-1}return n},"normalizeString"),rt=D(e=>ki.test(e),"isAbsolute"),ro=D(function(e){if(e.length===0)return".";e=me(e);const t=Oi.exec(e),n=rt(e),s=e.at(-1)==="/";return e=to(e,!n),e.length===0?n?"/":s?"./":".":(s&&(e+="/"),eo.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!rt(e)?`/${e}`:e)},"normalize"),ie=D((...e)=>{let t="";for(const n of e)if(n)if(t.length>0){const s=t.at(-1)==="/",u=n[0]==="/";s&&u?t+=n.slice(1):t+=s||u?n:`/${n}`}else t+=n;return ro(t)},"join"),Gr=D(function(...e){e=e.map(s=>me(s));let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const u=s>=0?e[s]:Ti();!u||u.length===0||(t=`${u}/${t}`,n=rt(u))}return t=to(t,!n),n&&!rt(t)?`/${t}`:t.length>0?t:"."},"resolve");D(function(e){return me(e)},"toNamespacedPath");const Si=D(function(e){return Pi.exec(me(e))?.[1]??""},"extname");D(function(e,t){const n=Gr(e).replace(bn,"$1").split("/"),s=Gr(t).replace(bn,"$1").split("/");if(s[0][1]===":"&&n[0][1]===":"&&n[0]!==s[0])return s.join("/");const u=[...n];for(const l of u){if(s[0]!==l)break;n.shift(),s.shift()}return[...n.map(()=>".."),...s].join("/")},"relative");const tn=D(e=>{const t=me(e).replace(Ai,"").split("/").slice(0,-1);return t.length===1&&eo.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(rt(e)?"/":".")},"dirname");D(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return me(e.root?Gr(...t):t.join("/"))},"format");const Ci=D((e,t)=>{const n=me(e).split("/").pop();return t&&n.endsWith(t)?n.slice(0,-t.length):n},"basename");D(function(e){const t=Ei.exec(e)?.[0]?.replaceAll("\\","/")??"",n=Ci(e),s=Si(n);return{base:n,dir:tn(e),ext:s,name:n.slice(0,n.length-s.length),root:t}},"parse");D((e,t)=>vi(t,ro(e)),"matchesGlob");var Mi=Object.defineProperty,rn=A((e,t)=>Mi(e,"name",{value:t,configurable:!0}),"a");const mt=rn((e,t)=>(t?.create&&ts(e),e),"useDirectory");rn(async(e,t)=>{if(ve.CACHE_DIR&&!["0","1","false","true"].includes(ve.CACHE_DIR))return mt(ie(ve.CACHE_DIR,e),t);const n=await Ws("package.json",{cwd:t?.cwd??zn(),type:"file"});if(!n){if(t?.throwError)throw new Yn("No such file or directory found.");return}const s=ie(tn(n),"node_modules"),u=ie(s,".cache"),l=ie(u,e);if(!(!await H(l,$e)&&await H(l))&&!(!await H(u,$e)&&await H(u))&&!(!await H(s,$e)&&await H(s)))return mt(l,t)},"findCacheDirectory");const _i=rn((e,t)=>{if(ve.CACHE_DIR&&!["0","1","false","true"].includes(ve.CACHE_DIR))return mt(ie(ve.CACHE_DIR,e),t);const n=Js("package.json",{cwd:t?.cwd??zn(),type:"file"});if(!n){if(t?.throwError)throw new Yn("No such file or directory found.");return}const s=ie(tn(n),"node_modules"),u=ie(s,".cache"),l=ie(u,e);if(!(!J(l,$e)&&J(l))&&!(!J(u,$e)&&J(u))&&!(!J(s,$e)&&J(s)))return mt(l,t)},"findCacheDirectorySync"),no=_i;var zi=Object.defineProperty,Ni=v((e,t)=>zi(e,"name",{value:t,configurable:!0}),"i$7"),Bi=Object.defineProperty,Ri=Ni((e,t)=>Bi(e,"name",{value:t,configurable:!0}),"r"),Ii=Object.defineProperty,Di=Ri((e,t)=>Ii(e,"name",{value:t,configurable:!0}),"i");const vn=Di(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var Fi=Object.defineProperty,Wi=v((e,t)=>Fi(e,"name",{value:t,configurable:!0}),"i$6"),Li=Object.defineProperty,oo=Wi((e,t)=>Li(e,"name",{value:t,configurable:!0}),"s");const Ui=st(import.meta.url),Ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vi=oo(e=>{if(typeof Ye<"u"&&Ye.versions&&Ye.versions.node){const[t,n]=Ye.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ye.getBuiltinModule(e)}return Ui(e)},"__cjs_getBuiltinModule"),{lstatSync:$n,mkdirSync:qi}=Vi("node:fs");var Zi=Object.defineProperty,Gi=oo((e,t)=>Zi(e,"name",{value:t,configurable:!0}),"o");const yt=Gi(e=>{Sn(e);try{const t=$n(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(vn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{qi(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const n=$n(e);if(!n.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(vn(n))}'`,{cause:t})}},"ensureDirSync");var Ki=Object.defineProperty,Hi=v((e,t)=>Ki(e,"name",{value:t,configurable:!0}),"x$2"),Ji=Object.defineProperty,so=Hi((e,t)=>Ji(e,"name",{value:t,configurable:!0}),"$"),Xi=Object.defineProperty,Qi=so((e,t)=>Xi(e,"name",{value:t,configurable:!0}),"A"),Yi=Object.defineProperty,nn=Qi((e,t)=>Yi(e,"name",{value:t,configurable:!0}),"$"),ea=Object.defineProperty,ta=nn((e,t)=>ea(e,"name",{value:t,configurable:!0}),"r$1");const ra=ta(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
- `),"normalizeLF"),na=globalThis.process??Object.create(null),wn={versions:{}},xn=new Proxy(na,{get(e,t){if(t in e)return e[t];if(t in wn)return wn[t]}});var oa=Object.defineProperty,sa=nn((e,t)=>oa(e,"name",{value:t,configurable:!0}),"b");const ia=sa((e,t,n,s)=>{const u={column:0,line:-1,...e.start},l={...u,...e.end},g=u.line,h=u.column,w=l.line,O=l.column;let j=Math.max(g-(n+1),0),$=Math.min(t.length,w+s);g===-1&&(j=0),w===-1&&($=t.length);const M=w-g,E={};if(M)for(let P=0;P<=M;P++){const V=P+g;if(!h)E[V]=!0;else if(P===0){const q=t[V-1]?.length;E[V]=[h,(q??0)-h+1]}else if(P===M)E[V]=[0,O];else{const q=t[V-P]?.length;E[V]=[0,q]}}else h===O?E[g]=h?[h,0]:!0:E[g]=[h,(O??0)-(h??0)];return{end:$,markerLines:E,start:j}},"getMarkerLines");var aa=Object.defineProperty,gt=nn((e,t)=>aa(e,"name",{value:t,configurable:!0}),"t");const ca=xn.platform==="win32"&&!xn.env?.WT_SESSION?">":"❯",ua=gt((e,t,n)=>{const s={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...n,color:{gutter:gt(P=>P,"gutter"),marker:gt(P=>P,"marker"),message:gt(P=>P,"message"),...n?.color}},u=typeof t.start.column=="number";let l=ra(e).split(`
3
- `);typeof s.tabWidth=="number"&&(l=l.map(P=>P.replaceAll(" "," ".repeat(s.tabWidth))));const{end:g,markerLines:h,start:w}=ia(t,l,s.linesAbove,s.linesBelow),O=String(g).length,{gutter:j,marker:$,message:M}=s.color;let E=l.slice(w,g).map((P,V)=>{const q=w+1+V,se=h[q],ke=String(q).padStart(O),Pe=!h[q+1],te=` ${ke}${s.showGutter?" |":""}`;if(se){let B="";if(Array.isArray(se)){const Ee=P.replaceAll(/[^\t]/g," ").slice(0,Math.max(se[0]-1,0)),Ae=se[1]||1;B=[`
4
- `,s.prefix+j(te.replaceAll(/\d/g," "))," ",Ee,$("^").repeat(Ae)].join(""),Pe&&s.message&&(B+=` ${M(s.message)}`)}return[s.prefix+$(ca),j(te),P.length>0?` ${P}`:"",B].join("")}return`${s.prefix} ${j(te)}${P.length>0?` ${P}`:""}`}).join(`
5
- `);return s.message&&!u&&(E=`${s.prefix+" ".repeat(O+1)+s.message}
6
- ${E}`),E},"codeFrame");var la=Object.defineProperty,fa=so((e,t)=>la(e,"name",{value:t,configurable:!0}),"s"),pa=Object.defineProperty,da=fa((e,t)=>pa(e,"name",{value:t,configurable:!0}),"o"),ga=Object.defineProperty,on=da((e,t)=>ga(e,"name",{value:t,configurable:!0}),"l");const jn=on((e,t)=>{let n=0,s=t.length-2;for(;n<s;){const u=n+(s-n>>1);if(e<t[u])s=u-1;else if(e>=t[u+1])n=u+1;else{n=u;break}}return n},"binarySearch"),ha=/\n|\r(?!\n)/,ma=on(e=>e.split(ha).reduce((t,n)=>(t.push(t.at(-1)+n.length+1),t),[0]),"getLineStartIndexes"),ya=on((e,t,n)=>{const s=n?.skipChecks??!1;if(!s&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!s&&(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const l=ma(e),g=jn(t,l);return{column:t-l[g]+1,line:g+1}}const u=jn(t,e);return{column:t-e[u]+1,line:u+1}},"indexToLineColumn");var ba=Object.defineProperty,io=v((e,t)=>ba(e,"name",{value:t,configurable:!0}),"t$6"),va=Object.defineProperty,ao=io((e,t)=>va(e,"name",{value:t,configurable:!0}),"t"),$a=Object.defineProperty,wa=ao((e,t)=>$a(e,"name",{value:t,configurable:!0}),"i");let xa=class extends Error{static{v(this,"m")}static{io(this,"m")}static{ao(this,"t")}static{wa(this,"JSONError")}fileName;codeFrame;name="JSONError";#e;constructor(t){super(),this.#e=t}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
1
+ var Un=Object.defineProperty;var h=(e,t)=>Un(e,"name",{value:t,configurable:!0});import{createRequire as Kn}from"node:module";import{n as Ut,B as Yn,U as Kt,l as R,_ as Et,K as Oe,s as Qn,M as S,a as Ht}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{createJiti as Zt}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const Hn=Kn(import.meta.url),ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rt=h(e=>{if(typeof ge<"u"&&ge.versions&&ge.versions.node){const[t,r]=ge.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ge.getBuiltinModule(e)}return Hn(e)},"__cjs_getBuiltinModule"),{createHash:qt}=rt("node:crypto"),{readdirSync:Gt,readFileSync:Zn,copyFileSync:Jn,unlinkSync:Xn}=rt("node:fs"),{createRequire:ke}=rt("node:module");var eo=Object.defineProperty,D=h((e,t)=>eo(e,"name",{value:t,configurable:!0}),"O$2"),to=Object.defineProperty,O=D((e,t)=>to(e,"name",{value:t,configurable:!0}),"h");const ro=ke(import.meta.url),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,no=O(e=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[t,r]=se.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return se.getBuiltinModule(e)}return ro(e)},"__cjs_getBuiltinModule"),{env:ie,cwd:Jt}=se,{createRequire:ue}=no("node:module"),Xt=0,ae=2,Yt=Symbol("findUpStop");var oo=Object.defineProperty,so=O((e,t)=>oo(e,"name",{value:t,configurable:!0}),"e$1");const nt=so(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"t");var io=Object.defineProperty,ao=O((e,t)=>io(e,"name",{value:t,configurable:!0}),"r");const Pt=ao(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"r");var co=Object.defineProperty,Qt=O((e,t)=>co(e,"name",{value:t,configurable:!0}),"s$4");const uo=ue(import.meta.url),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lo=Qt(e=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[t,r]=he.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return he.getBuiltinModule(e)}return uo(e)},"u"),{lstatSync:At,mkdirSync:fo}=lo("node:fs"),po=Qt(e=>{nt(e);try{const t=At(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Pt(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{fo(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=At(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Pt(r))}'`,{cause:t})}},"g");var go=Object.defineProperty,ho=O((e,t)=>go(e,"name",{value:t,configurable:!0}),"$e"),mo=Object.defineProperty,ot=ho((e,t)=>mo(e,"name",{value:t,configurable:!0}),"W"),yo=Object.defineProperty,g=ot((e,t)=>yo(e,"name",{value:t,configurable:!0}),"u$1");let Ct=g(()=>{var e=(()=>{var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,c=g((o,s)=>{for(var a in s)t(o,a,{get:s[a],enumerable:!0})},"ne"),f=g((o,s,a,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let u of n(s))!i.call(o,u)&&u!==a&&t(o,u,{get:g(()=>s[u],"get"),enumerable:!(l=r(s,u))||l.enumerable});return o},"ae"),d=g(o=>f(t({},"__esModule",{value:!0}),o),"oe"),v={};c(v,{zeptomatch:g(()=>Tt,"zeptomatch")});var w=g(o=>{const s=new Set,a=[o];for(let l=0;l<a.length;l++){const u=a[l];if(s.has(u))continue;s.add(u);const{children:p}=u;if(p?.length)for(let m=0,x=p.length;m<x;m++)a.push(p[m])}return Array.from(s)},"M"),$=g(o=>{let s="";const a=w(o);for(let l=0,u=a.length;l<u;l++){const p=a[l];if(!p.regex)continue;const m=p.regex.flags;if(s||(s=m),s!==m)throw new Error(`Inconsistent RegExp flags used: "${s}" and "${m}"`)}return s},"se"),y=g((o,s,a)=>{const l=a.get(o);if(l!==void 0)return l;const u=o.partial??s;let p="";if(o.regex&&(p+=u?"(?:$|":"",p+=o.regex.source),o.children?.length){const m=T(o.children.map(x=>y(x,s,a)).filter(Boolean));if(m?.length){const x=o.children.some(pe=>!pe.regex||!(pe.partial??s)),A=m.length>1||u&&(!p.length||x);p+=A?u?"(?:$|":"(?:":"",p+=m.join("|"),p+=A?")":""}}return o.regex&&(p+=u?")":""),a.set(o,p),p},"O"),P=g((o,s)=>{const a=new Map,l=w(o);for(let u=l.length-1;u>=0;u--){const p=y(l[u],s,a);if(!(u>0))return p}return""},"ie"),T=g(o=>Array.from(new Set(o)),"ue"),j=g((o,s,a)=>j.compile(o,a).test(s),"R");j.compile=(o,s)=>{const a=s?.partial??!1,l=P(o,a),u=$(o);return new RegExp(`^(?:${l})$`,u)};var N=j,F=g((o,s)=>{const a=N.compile(o,s),l=`${a.source.slice(0,-1)}[\\\\/]?$`,u=a.flags;return new RegExp(l,u)},"le"),ee=F,Fe=g(o=>{const s=o.map(l=>l.source).join("|")||"$^",a=o[0]?.flags;return new RegExp(s,a)},"ve"),We=Fe,te=g(o=>Array.isArray(o),"j"),W=g(o=>typeof o=="function","_"),Le=g(o=>o.length===0,"he"),Ve=(()=>{const{toString:o}=Function.prototype,s=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return a=>(a.length===0||a.length===1)&&s.test(o.call(a))})(),Pr=g(o=>typeof o=="number","de"),Ar=g(o=>typeof o=="object"&&o!==null,"xe"),Cr=g(o=>o instanceof RegExp,"me"),Sr=(()=>{const o=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return s=>o.test(s.source)})(),Nr=(()=>{const o=/^[a-zA-Z0-9_-]+$/;return s=>o.test(s.source)&&!s.flags.includes("i")})(),lt=g(o=>typeof o=="string","A"),U=g(o=>o===void 0,"f"),Mr=g(o=>{const s=new Map;return a=>{const l=s.get(a);if(l!==void 0)return l;const u=o(a);return s.set(a,u),u}},"ye"),ft=g((o,s,a={})=>{const l={cache:{},input:o,index:0,indexBacktrackMax:0,options:a,output:[]},u=K(s)(l),p=Math.max(l.index,l.indexBacktrackMax);if(u&&l.index===o.length)return l.output;throw new Error(`Failed to parse at index ${p}`)},"I"),b=g((o,s)=>te(o)?zr(o,s):lt(o)?pt(o,s):_r(o,s),"i"),zr=g((o,s)=>{const a={};for(const l of o){if(l.length!==1)throw new Error(`Invalid character: "${l}"`);const u=l.charCodeAt(0);a[u]=!0}return l=>{const u=l.input;let p=l.index,m=p;for(;m<u.length&&u.charCodeAt(m)in a;)m+=1;if(m>p){if(!U(s)&&!l.options.silent){const x=u.slice(p,m),A=W(s)?s(x,u,`${p}`):s;U(A)||l.output.push(A)}l.index=m}return!0}},"we"),_r=g((o,s)=>{if(Nr(o))return pt(o.source,s);{const a=o.source,l=o.flags.replace(/y|$/,"y"),u=new RegExp(a,l);return Sr(o)&&W(s)&&!Ve(s)?Rr(u,s):Dr(u,s)}},"$e"),Rr=g((o,s)=>a=>{const l=a.index,u=a.input;o.lastIndex=l;const p=o.exec(u);if(p){const m=o.lastIndex;if(!a.options.silent){const x=s(...p,u,`${l}`);U(x)||a.output.push(x)}return a.index=m,!0}else return!1},"Ee"),Dr=g((o,s)=>a=>{const l=a.index,u=a.input;if(o.lastIndex=l,o.test(u)){const p=o.lastIndex;if(!U(s)&&!a.options.silent){const m=W(s)?s(u.slice(l,p),u,`${l}`):s;U(m)||a.output.push(m)}return a.index=p,!0}else return!1},"Ce"),pt=g((o,s)=>a=>{const l=a.index,u=a.input;if(u.startsWith(o,l)){if(!U(s)&&!a.options.silent){const p=W(s)?s(o,u,`${l}`):s;U(p)||a.output.push(p)}return a.index+=o.length,!0}else return!1},"F"),qe=g((o,s,a,l)=>{const u=K(o),p=s>1;return Ue(Ge(gt(m=>{let x=0;for(;x<a;){const A=m.index;if(!u(m)||(x+=1,m.index===A))break}return x>=s},p),l))},"k"),dt=g((o,s)=>qe(o,0,1,s),"L"),Me=g((o,s)=>qe(o,0,1/0,s),"$"),Br=g((o,s)=>qe(o,1,1/0,s),"Re"),re=g((o,s)=>{const a=o.map(K);return Ue(Ge(gt(l=>{for(let u=0,p=a.length;u<p;u++)if(!a[u](l))return!1;return!0}),s))},"x"),M=g((o,s)=>{const a=o.map(K);return Ue(Ge(l=>{for(let u=0,p=a.length;u<p;u++)if(a[u](l))return!0;return!1},s))},"p"),gt=g((o,s=!0,a=!1)=>{const l=K(o);return s?u=>{const p=u.index,m=u.output.length,x=l(u);return!x&&!a&&(u.indexBacktrackMax=Math.max(u.indexBacktrackMax,u.index)),(!x||a)&&(u.index=p,u.output.length!==m&&(u.output.length=m)),x}:l},"q"),Ge=g((o,s)=>{const a=K(o);return s?l=>{if(l.options.silent)return a(l);const u=l.output.length;if(a(l)){const p=l.output.splice(u,1/0),m=s(p);return U(m)||l.output.push(m),!0}else return!1}:a},"B"),Ue=(()=>{let o=0;return s=>{const a=K(s),l=o+=1;return u=>{var p;if(u.options.memoization===!1)return a(u);const m=u.index,x=(p=u.cache)[l]||(p[l]={indexMax:-1,queue:[]}),A=x.queue;if(m<=x.indexMax){const de=x.store||(x.store=new Map);if(A.length){for(let oe=0,Vn=A.length;oe<Vn;oe+=2){const qn=A[oe*2],Gn=A[oe*2+1];de.set(qn,Gn)}A.length=0}const z=de.get(m);if(z===!1)return!1;if(Pr(z))return u.index=z,!0;if(z)return u.index=z.index,z.output?.length&&u.output.push(...z.output),!0}const pe=u.output.length,Ln=a(u);if(x.indexMax=Math.max(x.indexMax,m),Ln){const de=u.index,z=u.output.length;if(z>pe){const oe=u.output.slice(pe,z);A.push(m,{index:de,output:oe})}else A.push(m,de);return!0}else return A.push(m,!1),!1}}})(),ht=g(o=>{let s;return a=>(s||(s=K(o())),s(a))},"G"),K=Mr(o=>{if(W(o))return Le(o)?ht(o):o;if(lt(o)||Cr(o))return b(o);if(te(o))return re(o);if(Ar(o))return M(Object.values(o));throw new Error("Invalid rule")}),J=g(o=>o,"d"),Ir=g(o=>typeof o=="string","ke"),Fr=g(o=>{const s=new WeakMap,a=new WeakMap;return(l,u)=>{const p=u?.partial?a:s,m=p.get(l);if(m!==void 0)return m;const x=o(l,u);return p.set(l,x),x}},"Be"),Wr=g(o=>{const s={},a={};return(l,u)=>{const p=u?.partial?a:s;return p[l]??(p[l]=o(l,u))}},"Pe"),Lr=b(/\\./,J),Vr=b(/./,J),qr=b(/\*\*\*+/,"*"),Gr=b(/([^/{[(!])\*\*/,(o,s)=>`${s}*`),Ur=b(/(^|.)\*\*(?=[^*/)\]}])/,(o,s)=>`${s}*`),Kr=Me(M([Lr,qr,Gr,Ur,Vr])),Hr=Kr,Zr=g(o=>ft(o,Hr,{memoization:!1}).join(""),"Ie"),Jr=Zr,mt="abcdefghijklmnopqrstuvwxyz",Xr=g(o=>{let s="";for(;o>0;){const a=(o-1)%26;s=mt[a]+s,o=Math.floor((o-1)/26)}return s},"Le"),yt=g(o=>{let s=0;for(let a=0,l=o.length;a<l;a++)s=s*26+mt.indexOf(o[a])+1;return s},"V"),Ke=g((o,s)=>{if(s<o)return Ke(s,o);const a=[];for(;o<=s;)a.push(o++);return a},"b"),Yr=g((o,s,a)=>Ke(o,s).map(l=>String(l).padStart(a,"0")),"qe"),bt=g((o,s)=>Ke(yt(o),yt(s)).map(Xr),"W"),E=g(o=>({partial:!1,regex:new RegExp(o,"s"),children:[]}),"c"),fe=g(o=>({children:o}),"y"),ne=(()=>{const o=g((s,a,l)=>{if(l.has(s))return;l.add(s);const{children:u}=s;if(!u.length)u.push(a);else for(let p=0,m=u.length;p<m;p++)o(u[p],a,l)},"e");return s=>{if(!s.length)return fe([]);for(let a=s.length-1;a>=1;a--){const l=new Set,u=s[a-1],p=s[a];o(u,p,l)}return s[0]}})(),H=g(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),Qr=b(/\\./,E),en=b(/[$.*+?^(){}[\]\|]/,o=>E(`\\${o}`)),tn=b(/[\\\/]/,H),rn=b(/[^$.*+?^(){}[\]\|\\\/]+/,E),nn=b(/^(?:!!)*!(.*)$/,(o,s)=>E(`(?!^${Tt.compile(s).source}$).*?`)),on=b(/^(!!)+/),sn=M([nn,on]),an=b(/\/(\*\*\/)+/,()=>fe([ne([H(),E(".+?"),H()]),H()])),cn=b(/^(\*\*\/)+/,()=>fe([E("^"),ne([E(".*?"),H()])])),un=b(/\/(\*\*)$/,()=>fe([ne([H(),E(".*?")]),E("$")])),ln=b(/\*\*/,()=>E(".*?")),vt=M([an,cn,un,ln]),fn=b(/\*\/(?!\*\*\/|\*$)/,()=>ne([E("[^\\\\/]*?"),H()])),pn=b(/\*/,()=>E("[^\\\\/]*")),$t=M([fn,pn]),wt=b("?",()=>E("[^\\\\/]")),dn=b("[",J),gn=b("]",J),hn=b(/[!^]/,"^\\\\/"),mn=b(/[a-z]-[a-z]|[0-9]-[0-9]/i,J),yn=b(/\\./,J),bn=b(/[$.*+?^(){}[\|]/,o=>`\\${o}`),vn=b(/[\\\/]/,"\\\\/"),$n=b(/[^$.*+?^(){}[\]\|\\\/]+/,J),wn=M([yn,bn,vn,mn,$n]),xt=re([dn,dt(hn),Me(wn),gn],o=>E(o.join(""))),xn=b("{","(?:"),jn=b("}",")"),kn=b(/(\d+)\.\.(\d+)/,(o,s,a)=>Yr(+s,+a,Math.min(s.length,a.length)).join("|")),On=b(/([a-z]+)\.\.([a-z]+)/,(o,s,a)=>bt(s,a).join("|")),Tn=b(/([A-Z]+)\.\.([A-Z]+)/,(o,s,a)=>bt(s.toLowerCase(),a.toLowerCase()).join("|").toUpperCase()),En=M([kn,On,Tn]),jt=re([xn,En,jn],o=>E(o.join(""))),Pn=b("{"),An=b("}"),Cn=b(","),Sn=b(/\\./,E),Nn=b(/[$.*+?^(){[\]\|]/,o=>E(`\\${o}`)),Mn=b(/[\\\/]/,H),zn=b(/[^$.*+?^(){}[\]\|\\\/,]+/,E),_n=ht(()=>Ot),Rn=b("",()=>E("(?:)")),Dn=Br(M([vt,$t,wt,xt,jt,_n,Sn,Nn,Mn,zn]),ne),kt=M([Dn,Rn]),Ot=re([Pn,dt(re([kt,Me(re([Cn,kt]))])),An],fe),Bn=Me(M([sn,vt,$t,wt,xt,jt,Ot,Qr,en,tn,rn]),ne),In=Bn,Fn=g(o=>ft(o,In,{memoization:!1})[0],"kr"),Wn=Fn,He=g((o,s,a)=>He.compile(o,a).test(s),"N");He.compile=(()=>{const o=Wr((a,l)=>ee(Wn(Jr(a)),l)),s=Fr((a,l)=>We(a.map(u=>o(u,l))));return(a,l)=>Ir(a)?o(a,l):s(a,l)})();var Tt=He;return d(v)})();return e.default||e},"_lazyMatch"),Ze;const bo=g((e,t)=>(Ze||(Ze=Ct(),Ct=null),Ze(e,t)),"default");var vo=Object.defineProperty,$o=ot((e,t)=>vo(e,"name",{value:t,configurable:!0}),"t$1");const wo=/^[A-Z]:\//i,B=$o((e="")=>e&&e.replaceAll("\\","/").replace(wo,t=>t.toUpperCase()),"normalizeWindowsPath");var xo=Object.defineProperty,C=ot((e,t)=>xo(e,"name",{value:t,configurable:!0}),"r");const jo=/^[/\\]{2}/,ko=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,er=/^[A-Z]:$/i,St=/^\/([A-Z]:)?$/i,Oo=/.(\.[^./]+)$/,To=/^[/\\]|^[a-z]:[/\\]/i,Eo=/\/$/,Po=C(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),tr=C((e,t)=>{let r="",n=0,i=-1,c=0,f;for(let d=0;d<=e.length;++d){if(d<e.length)f=e[d];else{if(f==="/")break;f="/"}if(f==="/"){if(!(i===d-1||c===1))if(c===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const v=r.lastIndexOf("/");v===-1?(r="",n=0):(r=r.slice(0,v),n=r.length-1-r.lastIndexOf("/")),i=d,c=0;continue}else if(r.length>0){r="",n=0,i=d,c=0;continue}}t&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${e.slice(i+1,d)}`:r=e.slice(i+1,d),n=d-i-1;i=d,c=0}else f==="."&&c!==-1?++c:c=-1}return r},"normalizeString"),X=C(e=>ko.test(e),"isAbsolute"),rr=C(function(e){if(e.length===0)return".";e=B(e);const t=jo.exec(e),r=X(e),n=e.at(-1)==="/";return e=tr(e,!r),e.length===0?r?"/":n?"./":".":(n&&(e+="/"),er.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!X(e)?`/${e}`:e)},"normalize"),_=C((...e)=>{let t="";for(const r of e)if(r)if(t.length>0){const n=t.at(-1)==="/",i=r[0]==="/";n&&i?t+=r.slice(1):t+=n||i?r:`/${r}`}else t+=r;return rr(t)},"join"),q=C(function(...e){e=e.map(n=>B(n));let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:Po();!i||i.length===0||(t=`${i}/${t}`,r=X(i))}return t=tr(t,!r),r&&!X(t)?`/${t}`:t.length>0?t:"."},"resolve");C(function(e){return B(e)},"toNamespacedPath");const nr=C(function(e){return Oo.exec(B(e))?.[1]??""},"extname");C(function(e,t){const r=q(e).replace(St,"$1").split("/"),n=q(t).replace(St,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const i=[...r];for(const c of i){if(n[0]!==c)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},"relative");const Te=C(e=>{const t=B(e).replace(Eo,"").split("/").slice(0,-1);return t.length===1&&er.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(X(e)?"/":".")},"dirname");C(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return B(e.root?q(...t):t.join("/"))},"format");const Ao=C((e,t)=>{const r=B(e).split("/").pop();return t&&r.endsWith(t)?r.slice(0,-t.length):r},"basename"),or=C(function(e){const t=To.exec(e)?.[0]?.replaceAll("\\","/")??"",r=Ao(e),n=nr(r);return{base:r,dir:Te(e),ext:n,name:r.slice(0,r.length-n.length),root:t}},"parse");C((e,t)=>bo(t,rr(e)),"matchesGlob");var Co=Object.defineProperty,Y=O((e,t)=>Co(e,"name",{value:t,configurable:!0}),"n$3"),So=Object.defineProperty,G=Y((e,t)=>So(e,"name",{value:t,configurable:!0}),"a");const No=ue(import.meta.url),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Mo=G(e=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[t,r]=me.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return me.getBuiltinModule(e)}return No(e)},"__cjs_getBuiltinModule"),{fileURLToPath:zo}=Mo("node:url");var _o=Object.defineProperty,ce=G((e,t)=>_o(e,"name",{value:t,configurable:!0}),"t$1");function le(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}h(le,"le");D(le,"pe");O(le,"m$2");Y(le,"d");G(le,"getDefaultExportFromCjs");ce(le,"getDefaultExportFromCjs");function Ee(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}h(Ee,"ge");D(Ee,"Oe");O(Ee,"h$2");Y(Ee,"O");G(Ee,"getDefaultExportFromNamespaceIfPresent");ce(Ee,"getDefaultExportFromNamespaceIfPresent");function Pe(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}h(Pe,"me");D(Pe,"Ee");O(Pe,"x");Y(Pe,"P");G(Pe,"getDefaultExportFromNamespaceIfNotNamed");ce(Pe,"getDefaultExportFromNamespaceIfNotNamed");function Ae(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=ce(G(Y(O(D(h(function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"c"),"c"),"a"),"s"),"a"),"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:ce(function(){return e[n]},"get")})}),r}h(Ae,"he");D(Ae,"ke");O(Ae,"y$1");Y(Ae,"_");G(Ae,"getAugmentedNamespace");ce(Ae,"getAugmentedNamespace");var Nt,Mt;function Ce(){return Mt||(Mt=1,Nt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Nt}h(Ce,"ye");D(Ce,"Ae");O(Ce,"w");Y(Ce,"k");G(Ce,"requireBinaryExtensions");var Ro=Ce();const Do=le(Ro);var Bo=Object.defineProperty,I=G((e,t)=>Bo(e,"name",{value:t,configurable:!0}),"r");const Io=new Set(Do),Fo=new Set(["/","\\",void 0]),zt=Symbol.for("pathe:normalizedAlias"),Wo=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,Lo=I((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),_e=I((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),sr=I(e=>{if(e[zt])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([r],[n])=>Lo(r,n)));for(const r in t)for(const n in t)n===r||r.startsWith(n)||t[r].startsWith(n)&&Fo.has(t[r][n.length])&&(t[r]=t[n]+t[r].slice(n.length));return Object.defineProperty(t,zt,{enumerable:!1,value:!0}),t},"normalizeAliases");I((e,t)=>{e=B(e),t=sr(t);for(const[r,n]of Object.entries(t)){if(!e.startsWith(r))continue;const i=_e(r)?r.slice(0,-1):r;if(_e(e[i.length]))return _(n,e.slice(r.length))}return e},"resolveAlias");I(e=>Wo.exec(e)?.[2],"filename");I((e,t)=>{e=B(e),t=sr(t);for(const[r,n]of Object.entries(t).toReversed()){if(!e.startsWith(n))continue;const i=_e(n)?n.slice(0,-1):n;if(_e(e[i.length]))return _(r,e.slice(n.length))}return e},"reverseResolveAlias");const Vo=/^(?:\.?\.[/\\]|\.\.\B)/,qo=/^(?:msys|cygwin)$/;I(e=>Vo.test(e)||e==="..","isRelative");I(e=>Io.has(nr(e).slice(1).toLowerCase()),"isBinaryPath");const Z=I(e=>B(e instanceof URL?zo(e):e),"toPath");I(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:qo.test(e)},"isWindows");var Go=Object.defineProperty,Ye=O((e,t)=>Go(e,"name",{value:t,configurable:!0}),"n$2");const Uo=ue(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ko=Ye(e=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[t,r]=ye.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ye.getBuiltinModule(e)}return Uo(e)},"h"),{stat:Ho,lstat:Zo}=Ko("node:fs/promises"),Jo=Ye(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?Z(t.cwd):process.cwd();let n=q(r);const{root:i}=or(n),c=Z(t.stopAt??i),f=q(n,c),d=t.type??"file",v=Ye(async function($){return typeof e=="function"?[await e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"d");t.allowSymlinks??=!0;const w=t.allowSymlinks?Ho:Zo;for(;n&&n!==f&&n!==i;){const $=await v(n);for(let y of $){if(y===Yt)return;if(y===void 0)continue;Buffer.isBuffer(y)?y=y.toString():y instanceof URL&&(y=Z(y));const P=X(y)?y:q(n,y);try{const T=await w(P);if(d==="file"&&T.isFile()||d==="directory"&&T.isDirectory())return P}catch{}}n=Te(n)}},"k");var Xo=Object.defineProperty,Qe=O((e,t)=>Xo(e,"name",{value:t,configurable:!0}),"n$1");const Yo=ue(import.meta.url),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Qo=Qe(e=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[t,r]=be.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return be.getBuiltinModule(e)}return Yo(e)},"h"),{statSync:es,lstatSync:ts}=Qo("node:fs"),rs=Qe((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?Z(t.cwd):process.cwd();let n=q(r);const{root:i}=or(n),c=Z(t.stopAt??i),f=q(n,c),d=t.type??"file",v=Qe(function($){return typeof e=="function"?[e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"m");t.allowSymlinks??=!0;const w=t.allowSymlinks?es:ts;for(;n&&n!==f&&n!==i;){for(let $ of v(n)){if($===Yt)return;if($===void 0)continue;Buffer.isBuffer($)?$=$.toString():$ instanceof URL&&($=Z($));const y=X($)?$:q(n,$);try{const P=w(y);if(d==="file"&&P.isFile()||d==="directory"&&P.isDirectory())return y}catch{}}n=Te(n)}},"F");var ns=Object.defineProperty,ir=O((e,t)=>ns(e,"name",{value:t,configurable:!0}),"t$2");const os=ue(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ss=ir(e=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[t,r]=ve.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ve.getBuiltinModule(e)}return os(e)},"i"),{access:is}=ss("node:fs/promises");async function L(e,t=Xt){nt(e),e=Z(e);try{return await is(e,t),!0}catch{return!1}}h(L,"R$3");D(L,"D");O(L,"l$2");ir(L,"d");var as=Object.defineProperty,ar=O((e,t)=>as(e,"name",{value:t,configurable:!0}),"s");const cs=ue(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,us=ar(e=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[t,r]=$e.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return $e.getBuiltinModule(e)}return cs(e)},"i"),{accessSync:ls}=us("node:fs");function V(e,t=Xt){nt(e),e=Z(e);try{return ls(e,t),!0}catch{return!1}}h(V,"D$2");D(V,"I");O(V,"l$1");ar(V,"d");var fs=Object.defineProperty,ps=O((e,t)=>fs(e,"name",{value:t,configurable:!0}),"o");class cr extends Error{static{h(this,"dt")}static{D(this,"pt")}static{O(this,"n")}static{ps(this,"o")}constructor(t){super(`ENOENT: ${t}`)}get code(){return"ENOENT"}set code(t){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(t){throw new Error("Cannot overwrite name of NotFoundError")}}var ds=Object.defineProperty,st=O((e,t)=>ds(e,"name",{value:t,configurable:!0}),"a");const Re=st((e,t)=>(t?.create&&po(e),e),"useDirectory");st(async(e,t)=>{if(ie.CACHE_DIR&&!["0","1","false","true"].includes(ie.CACHE_DIR))return Re(_(ie.CACHE_DIR,e),t);const r=await Jo("package.json",{cwd:t?.cwd??Jt(),type:"file"});if(!r){if(t?.throwError)throw new cr("No such file or directory found.");return}const n=_(Te(r),"node_modules"),i=_(n,".cache"),c=_(i,e);if(!(!await L(c,ae)&&await L(c))&&!(!await L(i,ae)&&await L(i))&&!(!await L(n,ae)&&await L(n)))return Re(c,t)},"findCacheDirectory");const gs=st((e,t)=>{if(ie.CACHE_DIR&&!["0","1","false","true"].includes(ie.CACHE_DIR))return Re(_(ie.CACHE_DIR,e),t);const r=rs("package.json",{cwd:t?.cwd??Jt(),type:"file"});if(!r){if(t?.throwError)throw new cr("No such file or directory found.");return}const n=_(Te(r),"node_modules"),i=_(n,".cache"),c=_(i,e);if(!(!V(c,ae)&&V(c))&&!(!V(i,ae)&&V(i))&&!(!V(n,ae)&&V(n)))return Re(c,t)},"findCacheDirectorySync"),ur=gs;var hs=Object.defineProperty,ms=h((e,t)=>hs(e,"name",{value:t,configurable:!0}),"r$3");const _t=ms(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"r");var ys=Object.defineProperty,lr=h((e,t)=>ys(e,"name",{value:t,configurable:!0}),"s$5");const bs=ke(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vs=lr(e=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[t,r]=we.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return we.getBuiltinModule(e)}return bs(e)},"u"),{lstatSync:Rt,mkdirSync:$s}=vs("node:fs"),De=lr(e=>{Ut(e);try{const t=Rt(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_t(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{$s(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=Rt(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_t(r))}'`,{cause:t})}},"g");var ws=Object.defineProperty,fr=h((e,t)=>ws(e,"name",{value:t,configurable:!0}),"x$1"),xs=Object.defineProperty,it=fr((e,t)=>xs(e,"name",{value:t,configurable:!0}),"$"),js=Object.defineProperty,ks=it((e,t)=>js(e,"name",{value:t,configurable:!0}),"r$1");const Os=ks(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
+ `),"normalizeLF"),Ts=globalThis.process??Object.create(null),Dt={versions:{}},Bt=new Proxy(Ts,{get(e,t){if(t in e)return e[t];if(t in Dt)return Dt[t]}});var Es=Object.defineProperty,Ps=it((e,t)=>Es(e,"name",{value:t,configurable:!0}),"b");const As=Ps((e,t,r,n)=>{const i={column:0,line:-1,...e.start},c={...i,...e.end},f=i.line,d=i.column,v=c.line,w=c.column;let $=Math.max(f-(r+1),0),y=Math.min(t.length,v+n);f===-1&&($=0),v===-1&&(y=t.length);const P=v-f,T={};if(P)for(let j=0;j<=P;j++){const N=j+f;if(!d)T[N]=!0;else if(j===0){const F=t[N-1]?.length;T[N]=[d,(F??0)-d+1]}else if(j===P)T[N]=[0,w];else{const F=t[N-j]?.length;T[N]=[0,F]}}else d===w?T[f]=d?[d,0]:!0:T[f]=[d,(w??0)-(d??0)];return{end:y,markerLines:T,start:$}},"getMarkerLines");var Cs=Object.defineProperty,ze=it((e,t)=>Cs(e,"name",{value:t,configurable:!0}),"t");const Ss=Bt.platform==="win32"&&!Bt.env?.WT_SESSION?">":"❯",Ns=ze((e,t,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:ze(j=>j,"gutter"),marker:ze(j=>j,"marker"),message:ze(j=>j,"message"),...r?.color}},i=typeof t.start.column=="number";let c=Os(e).split(`
3
+ `);typeof n.tabWidth=="number"&&(c=c.map(j=>j.replaceAll(" "," ".repeat(n.tabWidth))));const{end:f,markerLines:d,start:v}=As(t,c,n.linesAbove,n.linesBelow),w=String(f).length,{gutter:$,marker:y,message:P}=n.color;let T=c.slice(v,f).map((j,N)=>{const F=v+1+N,ee=d[F],Fe=String(F).padStart(w),We=!d[F+1],te=` ${Fe}${n.showGutter?" |":""}`;if(ee){let W="";if(Array.isArray(ee)){const Le=j.replaceAll(/[^\t]/g," ").slice(0,Math.max(ee[0]-1,0)),Ve=ee[1]||1;W=[`
4
+ `,n.prefix+$(te.replaceAll(/\d/g," "))," ",Le,y("^").repeat(Ve)].join(""),We&&n.message&&(W+=` ${P(n.message)}`)}return[n.prefix+y(Ss),$(te),j.length>0?` ${j}`:"",W].join("")}return`${n.prefix} ${$(te)}${j.length>0?` ${j}`:""}`}).join(`
5
+ `);return n.message&&!i&&(T=`${n.prefix+" ".repeat(w+1)+n.message}
6
+ ${T}`),T},"codeFrame");var Ms=Object.defineProperty,zs=fr((e,t)=>Ms(e,"name",{value:t,configurable:!0}),"N"),_s=Object.defineProperty,at=zs((e,t)=>_s(e,"name",{value:t,configurable:!0}),"l");const It=at((e,t)=>{let r=0,n=t.length-2;for(;r<n;){const i=r+(n-r>>1);if(e<t[i])n=i-1;else if(e>=t[i+1])r=i+1;else{r=i;break}}return r},"binarySearch"),Rs=/\n|\r(?!\n)/,Ds=at(e=>e.split(Rs).reduce((t,r)=>(t.push(t.at(-1)+r.length+1),t),[0]),"getLineStartIndexes"),Bs=at((e,t,r)=>{const n=r?.skipChecks??!1;if(!n&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!n&&(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const c=Ds(e),f=It(t,c);return{column:t-c[f]+1,line:f+1}}const i=It(t,e);return{column:t-e[i]+1,line:i+1}},"indexToLineColumn");var Is=Object.defineProperty,Fs=h((e,t)=>Is(e,"name",{value:t,configurable:!0}),"r$2");let Ws=class extends Error{static{h(this,"a")}static{Fs(this,"r")}fileName;codeFrame;name="JSONError";#e;constructor(t){super(),this.#e=t}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
7
7
 
8
8
  ${this.codeFrame}
9
- `:""}`}set message(t){this.#e=t}};var ja=Object.defineProperty,co=v((e,t)=>ja(e,"name",{value:t,configurable:!0}),"u$3"),Oa=Object.defineProperty,uo=co((e,t)=>Oa(e,"name",{value:t,configurable:!0}),"s"),ka=Object.defineProperty,ft=uo((e,t)=>ka(e,"name",{value:t,configurable:!0}),"a");const Pa=ft(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),Ea=ft((e,t,n)=>ua(e,{start:t},{tabWidth:!1,...n}),"generateCodeFrame"),Aa=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Ta=ft((e,t)=>{const n=Aa.exec(t);if(!n)return;const[,s,u,l]=n;if(u&&l)return{column:Number(l),line:Number(u)};let g=Number(s);return g===e.length&&(g=e.length-1),ya(e,g)},"getErrorLocation"),Sa=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Ca=ft(e=>e.replace(Sa,(t,n,s)=>`"${s}"(${Pa(s)})`),"addCodePointToUnexpectedToken");function bt(e,t,n,s){typeof t=="string"&&(typeof n=="object"&&(s=n),n=t,t=void 0);let u;try{return JSON.parse(e,t)}catch(h){u=h.message}let l;e?(l=Ta(e,u),u=Ca(u)):u+=" while parsing empty string";const g=new xa(u);throw g.fileName=n,l&&(g.codeFrame=Ea(e,l,s)),g}v(bt,"d$5");co(bt,"w");uo(bt,"E");ft(bt,"parseJson");var Ma=Object.defineProperty,lo=v((e,t)=>Ma(e,"name",{value:t,configurable:!0}),"t$5"),_a=Object.defineProperty,fo=lo((e,t)=>_a(e,"name",{value:t,configurable:!0}),"t"),za=Object.defineProperty,Na=fo((e,t)=>za(e,"name",{value:t,configurable:!0}),"r");function pt(e,t,n){typeof t=="object"&&(n=t,t=void 0);const s=To(e,{buffer:!0,encoding:void 0});let u=new TextDecoder().decode(s);const{beforeParse:l,color:g}=n??{};return typeof l=="function"&&(u=l(u)),bt(u,t,Cn(e),{color:g})}v(pt,"n$3");lo(pt,"s");fo(pt,"J");Na(pt,"readJsonSync");var Ba=Object.defineProperty,Ra=v((e,t)=>Ba(e,"name",{value:t,configurable:!0}),"a$3"),Ia=Object.defineProperty,Da=Ra((e,t)=>Ia(e,"name",{value:t,configurable:!0}),"t"),Fa=Object.defineProperty,Wa=Da((e,t)=>Fa(e,"name",{value:t,configurable:!0}),"e");const La=Wa(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"assertValidFileContents");var Ua=Object.defineProperty,Va=v((e,t)=>Ua(e,"name",{value:t,configurable:!0}),"t$3"),qa=Object.defineProperty,Za=Va((e,t)=>qa(e,"name",{value:t,configurable:!0}),"r"),Ga=Object.defineProperty,Ka=Za((e,t)=>Ga(e,"name",{value:t,configurable:!0}),"f");const Ha=new TextEncoder,Ja=Ka(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return Ha.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"toUint8Array");var Xa=Object.defineProperty,Qa=v((e,t)=>Xa(e,"name",{value:t,configurable:!0}),"m$1"),Ya=Object.defineProperty,po=Qa((e,t)=>Ya(e,"name",{value:t,configurable:!0}),"s");const ec=st(import.meta.url),et=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tc=po(e=>{if(typeof et<"u"&&et.versions&&et.versions.node){const[t,n]=et.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return et.getBuiltinModule(e)}return ec(e)},"__cjs_getBuiltinModule"),{mkdirSync:rc,writeFileSync:nc,statSync:oc,renameSync:On,chownSync:sc,chmodSync:ic,unlinkSync:ac}=tc("node:fs");var cc=Object.defineProperty,uc=po((e,t)=>cc(e,"name",{value:t,configurable:!0}),"n");const lc=uc((e,t,n)=>{n={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...n},Sn(e),La(t),e=Cn(e);const s=`${e}.tmp`;try{const u=X(e,an);if(!u&&n.recursive){const g=it(e);X(g,an)||rc(g,{recursive:!0})}let l;if(nc(s,typeof t=="string"?Buffer.from(t,n.encoding??"utf8"):Ja(t),{flag:n.flag}),u&&!n.overwrite&&(l=oc(e),n.chown??={gid:l.gid,uid:l.uid},On(e,`${e}.bak`)),n.chown)try{sc(s,n.chown.uid,n.chown.gid)}catch{}ic(s,l&&!n.mode?l.mode:n.mode??438),On(s,e)}catch(u){throw new Error(`Failed to write file at: ${e} - ${u.message}`,{cause:u})}finally{X(s)&&ac(`${e}.tmp`)}},"writeFileSync");var fc=Object.defineProperty,ae=v((e,t)=>fc(e,"name",{value:t,configurable:!0}),"i$2"),pc=Object.defineProperty,ce=ae((e,t)=>pc(e,"name",{value:t,configurable:!0}),"s"),dc=Object.defineProperty,ye=ce((e,t)=>dc(e,"name",{value:t,configurable:!0}),"i");const gc=/^(?:( )+|\t+)/,dt="space";function nt(e,t,n){return e&&t===dt&&n===1}v(nt,"d$3");ae(nt,"g");ce(nt,"I");ye(nt,"shouldIgnoreSingleSpace");function ot(e,t){const n=new Map;let s=0,u,l;for(const g of e.split(/\n/g)){if(!g)continue;const h=g.match(gc);if(h===null)s=0,u="";else{const w=h[0].length,O=h[1]?dt:"tab";if(nt(t,O,w))continue;O!==u&&(s=0),u=O;let j=1,$=0;const M=w-s;if(s=w,M===0)j=0,$=1;else{const P=Math.abs(M);if(nt(t,O,P))continue;l=vt(O,P)}const E=n.get(l);n.set(l,E===void 0?[1,0]:[E[0]+j,E[1]+$])}}return n}v(ot,"p");ae(ot,"y");ce(ot,"h");ye(ot,"makeIndentsMap");function vt(e,t){return(e===dt?"s":"t")+String(t)}v(vt,"b$1");ae(vt,"v");ce(vt,"m");ye(vt,"encodeIndentsKey");function $t(e){const t=e[0]==="s"?dt:"tab",n=Number(e.slice(1));return{type:t,amount:n}}v($t,"v");ae($t,"M");ce($t,"_");ye($t,"decodeIndentsKey");function wt(e){let t,n=0,s=0;for(const[u,[l,g]]of e)(l>n||l===n&&g>s)&&(n=l,s=g,t=u);return t}v(wt,"I");ae(wt,"S");ce(wt,"k");ye(wt,"getMostUsedKey");function xt(e,t){return(e===dt?" ":" ").repeat(t)}v(xt,"h$1");ae(xt,"k");ce(xt,"D");ye(xt,"makeIndentString");function jt(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=ot(e,!0);t.size===0&&(t=ot(e,!1));const n=wt(t);let s,u=0,l="";return n!==void 0&&({type:s,amount:u}=$t(n),l=xt(s,u)),{amount:u,type:s,indent:l}}v(jt,"M");ae(jt,"x");ce(jt,"C");ye(jt,"detectIndent");var hc=Object.defineProperty,mc=v((e,t)=>hc(e,"name",{value:t,configurable:!0}),"a$1"),yc=Object.defineProperty,go=mc((e,t)=>yc(e,"name",{value:t,configurable:!0}),"i");const bc=st(import.meta.url),tt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vc=go(e=>{if(typeof tt<"u"&&tt.versions&&tt.versions.node){const[t,n]=tt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return tt.getBuiltinModule(e)}return bc(e)},"__cjs_getBuiltinModule"),{readFileSync:$c}=vc("node:fs");var wc=Object.defineProperty,xc=go((e,t)=>wc(e,"name",{value:t,configurable:!0}),"r");const ho=xc((e,t,n={})=>{const{detectIndent:s,indent:u,replacer:l,stringify:g=JSON.stringify,...h}={indent:" ",...n};let w=u,O=`
10
- `;if(X(e,So))try{const $=$c(e,"utf8");if(s){const{indent:M}=jt($);w=M}O=$.endsWith(`
9
+ `:""}`}set message(t){this.#e=t}};var Ls=Object.defineProperty,Se=h((e,t)=>Ls(e,"name",{value:t,configurable:!0}),"a$2");const Vs=Se(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"p"),qs=Se((e,t,r)=>Ns(e,{start:t},{tabWidth:!1,...r}),"m"),Gs=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Us=Se((e,t)=>{const r=Gs.exec(t);if(!r)return;const[,n,i,c]=r;if(i&&c)return{column:Number(c),line:Number(i)};let f=Number(n);return f===e.length&&(f=e.length-1),Bs(e,f)},"d"),Ks=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Hs=Se(e=>e.replace(Ks,(t,r,n)=>`"${n}"(${Vs(n)})`),"h");function pr(e,t,r,n){typeof t=="string"&&(typeof r=="object"&&(n=r),r=t,t=void 0);let i;try{return JSON.parse(e,t)}catch(d){i=d.message}let c;e?(c=Us(e,i),i=Hs(i)):i+=" while parsing empty string";const f=new Ws(i);throw f.fileName=r,c&&(f.codeFrame=qs(e,c,n)),f}h(pr,"$$1");Se(pr,"$");var Zs=Object.defineProperty,Js=h((e,t)=>Zs(e,"name",{value:t,configurable:!0}),"c$1");function ct(e,t,r){typeof t=="object"&&(r=t,t=void 0);const n=Yn(e,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:c,color:f}=r??{};return typeof c=="function"&&(i=c(i)),pr(i,t,Kt(e),{color:f})}h(ct,"s$4");Js(ct,"a");var Xs=Object.defineProperty,Ys=h((e,t)=>Xs(e,"name",{value:t,configurable:!0}),"e$2");const Qs=Ys(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"e");var ei=Object.defineProperty,ti=h((e,t)=>ei(e,"name",{value:t,configurable:!0}),"n$1");const ri=new TextEncoder,ni=ti(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return ri.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"r");var oi=Object.defineProperty,dr=h((e,t)=>oi(e,"name",{value:t,configurable:!0}),"c");const si=ke(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ii=dr(e=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[t,r]=xe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return xe.getBuiltinModule(e)}return si(e)},"l"),{mkdirSync:ai,writeFileSync:ci,statSync:ui,renameSync:Ft,chownSync:li,chmodSync:fi,unlinkSync:pi}=ii("node:fs"),di=dr((e,t,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},Ut(e),Qs(t),e=Kt(e);const n=`${e}.tmp`;try{const i=R(e,Et);if(!i&&r.recursive){const f=Oe(e);R(f,Et)||ai(f,{recursive:!0})}let c;if(ci(n,typeof t=="string"?Buffer.from(t,r.encoding??"utf8"):ni(t),{flag:r.flag}),i&&!r.overwrite&&(c=ui(e),r.chown??={gid:c.gid,uid:c.uid},Ft(e,`${e}.bak`)),r.chown)try{li(n,r.chown.uid,r.chown.gid)}catch{}fi(n,c&&!r.mode?c.mode:r.mode??438),Ft(n,e)}catch(i){throw new Error(`Failed to write file at: ${e} - ${i.message}`,{cause:i})}finally{R(n)&&pi(`${e}.tmp`)}},"E");var gi=Object.defineProperty,Q=h((e,t)=>gi(e,"name",{value:t,configurable:!0}),"i$2");const hi=/^(?:( )+|\t+)/,Ne="space";function et(e,t,r){return e&&t===Ne&&r===1}h(et,"d$3");Q(et,"d");function tt(e,t){const r=new Map;let n=0,i,c;for(const f of e.split(/\n/g)){if(!f)continue;const d=f.match(hi);if(d===null)n=0,i="";else{const v=d[0].length,w=d[1]?Ne:"tab";if(et(t,w,v))continue;w!==i&&(n=0),i=w;let $=1,y=0;const P=v-n;if(n=v,P===0)$=0,y=1;else{const j=Math.abs(P);if(et(t,w,j))continue;c=gr(w,j)}const T=r.get(c);r.set(c,T===void 0?[1,0]:[T[0]+$,T[1]+y])}}return r}h(tt,"h$1");Q(tt,"h");function gr(e,t){return(e===Ne?"s":"t")+String(t)}h(gr,"x");Q(gr,"w");function hr(e){const t=e[0]==="s"?Ne:"tab",r=Number(e.slice(1));return{type:t,amount:r}}h(hr,"E$1");Q(hr,"E");function mr(e){let t,r=0,n=0;for(const[i,[c,f]]of e)(c>r||c===r&&f>n)&&(r=c,n=f,t=i);return t}h(mr,"M");Q(mr,"v");function yr(e,t){return(e===Ne?" ":" ").repeat(t)}h(yr,"k");Q(yr,"x");function br(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=tt(e,!0);t.size===0&&(t=tt(e,!1));const r=mr(t);let n,i=0,c="";return r!==void 0&&({type:n,amount:i}=hr(r),c=yr(n,i)),{amount:i,type:n,indent:c}}h(br,"z$1");Q(br,"M");var mi=Object.defineProperty,vr=h((e,t)=>mi(e,"name",{value:t,configurable:!0}),"s$2");const yi=ke(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bi=vr(e=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[t,r]=je.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return je.getBuiltinModule(e)}return yi(e)},"g"),{readFileSync:vi}=bi("node:fs"),$r=vr((e,t,r={})=>{const{detectIndent:n,indent:i,replacer:c,stringify:f=JSON.stringify,...d}={indent:" ",...r};let v=i,w=`
10
+ `;if(R(e,Qn))try{const y=vi(e,"utf8");if(n){const{indent:P}=br(y);v=P}w=y.endsWith(`
11
11
  `)?`
12
- `:""}catch($){if($.code!=="ENOENT")throw $}const j=g(t,l,w);lc(e,`${j}${O}`,h)},"writeJsonSync");var jc=Object.defineProperty,Oc=v((e,t)=>jc(e,"name",{value:t,configurable:!0}),"s$1");class Ot extends Error{static{v(this,"VisConfigError")}static{Oc(this,"VisConfigError")}chain;constructor(t,n,s){super(t,s),this.name=this.constructor.name,this.chain=n}}var kc=Object.defineProperty,Pc=v((e,t)=>kc(e,"name",{value:t,configurable:!0}),"e");class Ec extends Ot{static{v(this,"VisConfigCycleError")}static{Pc(this,"VisConfigCycleError")}constructor(t,n){const s=[...n,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${s}`,n)}}var Ac=Object.defineProperty,Tc=v((e,t)=>Ac(e,"name",{value:t,configurable:!0}),"s");class mo extends Ot{static{v(this,"VisConfigDeprecatedKeyError")}static{Tc(this,"VisConfigDeprecatedKeyError")}filePath;removedKeys;constructor(t,n,s){const u=[`${t} uses removed keys.`,""];for(const l of s){const g=l.location?` (at ${l.location})`:"";u.push(` • ${l.name}${g} → renamed to \`${l.renamedTo}\``);for(const h of l.children??[])u.push(` ↳ ${h.name} → renamed to \`${h.renamedTo}\``)}u.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(u.join(`
13
- `),n),this.filePath=t,this.removedKeys=s}}var Sc=Object.defineProperty,Cc=v((e,t)=>Sc(e,"name",{value:t,configurable:!0}),"t$1");class kn extends Ot{static{v(this,"VisConfigLoadError")}static{Cc(this,"VisConfigLoadError")}constructor(t,n,s){const u=s instanceof Error?s.message:String(s),l=n.length>0?`
14
- Chain: ${n.join(" → ")}`:"";super(`Failed to load ${t}: ${u}${l}`,n,{cause:s})}}var Mc=Object.defineProperty,yo=v((e,t)=>Mc(e,"name",{value:t,configurable:!0}),"t");const _c=yo(e=>e.join(" → "),"formatChain");class qr extends Ot{static{v(this,"VisConfigNotFoundError")}static{yo(this,"VisConfigNotFoundError")}constructor(t,n,s){const u=n.length>0?n[n.length-1]:"<unknown>",l=s.length>0?`
12
+ `:""}catch(y){if(y.code!=="ENOENT")throw y}const $=f(t,c,v);di(e,`${$}${w}`,d)},"R");var $i=Object.defineProperty,wi=h((e,t)=>$i(e,"name",{value:t,configurable:!0}),"s$1");class Be extends Error{static{h(this,"VisConfigError")}static{wi(this,"VisConfigError")}chain;constructor(t,r,n){super(t,n),this.name=this.constructor.name,this.chain=r}}var xi=Object.defineProperty,ji=h((e,t)=>xi(e,"name",{value:t,configurable:!0}),"e");class ki extends Be{static{h(this,"VisConfigCycleError")}static{ji(this,"VisConfigCycleError")}constructor(t,r){const n=[...r,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${n}`,r)}}var Oi=Object.defineProperty,Ti=h((e,t)=>Oi(e,"name",{value:t,configurable:!0}),"s");class wr extends Be{static{h(this,"VisConfigDeprecatedKeyError")}static{Ti(this,"VisConfigDeprecatedKeyError")}filePath;removedKeys;constructor(t,r,n){const i=[`${t} uses removed keys.`,""];for(const c of n){const f=c.location?` (at ${c.location})`:"";i.push(` • ${c.name}${f} → renamed to \`${c.renamedTo}\``);for(const d of c.children??[])i.push(` ↳ ${d.name} → renamed to \`${d.renamedTo}\``)}i.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(i.join(`
13
+ `),r),this.filePath=t,this.removedKeys=n}}var Ei=Object.defineProperty,Pi=h((e,t)=>Ei(e,"name",{value:t,configurable:!0}),"t$1");class Wt extends Be{static{h(this,"VisConfigLoadError")}static{Pi(this,"VisConfigLoadError")}constructor(t,r,n){const i=n instanceof Error?n.message:String(n),c=r.length>0?`
14
+ Chain: ${r.join(" → ")}`:"";super(`Failed to load ${t}: ${i}${c}`,r,{cause:n})}}var Ai=Object.defineProperty,xr=h((e,t)=>Ai(e,"name",{value:t,configurable:!0}),"t");const Ci=xr(e=>e.join(" → "),"formatChain");class Je extends Be{static{h(this,"VisConfigNotFoundError")}static{xr(this,"VisConfigNotFoundError")}constructor(t,r,n){const i=r.length>0?r[r.length-1]:"<unknown>",c=n.length>0?`
15
15
  Tried:
16
- ${s.join(`
17
- `)}`:"";super(`Cannot resolve "${t}" extended from ${u}.${l}
18
- Chain: ${_c(n)}`,n)}}var zc=Object.defineProperty,bo=v((e,t)=>zc(e,"name",{value:t,configurable:!0}),"i$1");const Pn="@inherit",Nc=["aliases","dependsOn","inputs","outputs"],Bc=bo((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(Pn))return[...t];const n=[];for(const s of t){if(s===Pn){e!==void 0&&n.push(...e);continue}n.push(s)}return n},"mergeArrayWithInherit"),Rc=bo((e,t)=>{const n={...e,...t};for(const s of Nc){const u=e?.[s],l=t?.[s],g=Bc(u,l);g===void 0?delete n[s]:n[s]=g}return n},"mergeTargetWithInherit");var Ic=Object.defineProperty,kt=v((e,t)=>Ic(e,"name",{value:t,configurable:!0}),"o");const Dc=kt(e=>{const t=[];if(Object.hasOwn(e,"targetDefaults")&&t.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&t.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:n}=e,s=[];if(Array.isArray(n))for(const[u,l]of n.entries())l&&typeof l=="object"&&(Object.hasOwn(l,"scope")&&s.push({location:`taskDefaults[${u}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(l,"targets")&&s.push({location:`taskDefaults[${u}].targets`,name:"targets",renamedTo:"tasks"}));t.push({children:s.length>0?s:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[n,s]of e.scopedTasks.entries())s&&typeof s=="object"&&(Object.hasOwn(s,"scope")&&t.push({location:`scopedTasks[${n}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(s,"targets")&&t.push({location:`scopedTasks[${n}].targets`,name:"targets",renamedTo:"tasks"}));return t},"detectDeprecatedConfigKeys"),Fc=kt(e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],"detectDeprecatedTaskKeys"),Wc=kt((e,t,n)=>{if(!n||typeof n!="object")return;const s=Dc(n);if(s.length>0)throw new mo(e,t,s)},"assertNoDeprecatedConfigKeys"),Lc=kt((e,t,n)=>{if(!n||typeof n!="object")return;const s=Fc(n);if(s.length>0)throw new mo(e,t,s)},"assertNoDeprecatedTaskKeys");var Uc=Object.defineProperty,T=v((e,t)=>Uc(e,"name",{value:t,configurable:!0}),"r");const vo=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],Vc=new Set(vo),$o=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],qc=new Set($o),du=2880,Zr={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},Zc=T(e=>{if(!e)return{...Zr};const t=Zr.policies??{},n=e.policies??{},s={...t,...n};for(const u of Object.keys(t)){const l=t[u],g=n[u];l!==void 0&&g!==void 0&&(s[u]={...l,...g})}return{...Zr,...e,policies:s}},"mergeSecurityDefaults"),En=T(e=>({...e,security:Zc(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),Gc=T(e=>{let t;try{t=Tn(e)}catch{return}const n=new Set(t.filter(s=>Vc.has(s)));for(const s of vo)if(n.has(s))return U(e,s)},"findVisConfigFile"),Kc=T(e=>{let t;try{t=Tn(e)}catch{return}const n=new Set(t.filter(s=>qc.has(s)));for(const s of $o)if(n.has(s))return U(e,s)},"findVisTaskConfigFile"),sn=T(e=>An("sha256").update(Po(e)).digest("hex"),"hashFileContents"),Hc=T(e=>{const t=An("sha256"),n=[...e].sort();for(const s of n)t.update(s),t.update(":"),t.update(sn(s)),t.update(`
19
- `);return t.digest("hex")},"hashConfigChain"),Jc=T(e=>{const t=U(e,"node_modules");if(X(t)){const s=U(t,".cache","vis");return yt(s),U(s,"vis-config-cache.json")}const n=no("vis",{create:!0,cwd:e});return n?U(n,"vis-config-cache.json"):void 0},"getConfigCachePath"),Xc=T((e,t)=>{if(X(e))try{const n=pt(e);if(n.hash===t)return n.config}catch{}},"readConfigCache"),Qc=T((e,t,n)=>{try{yt(it(e)),ho(e,{config:n,hash:t})}catch{}},"writeConfigCache"),Yc=T(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),eu=T((e,t,n)=>{if(Mn(e))throw new qr(e,[...n,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const s=[];if(e.startsWith("./")||e.startsWith("../")){const u=it(t),l=U(u,e);if(s.push(l),X(l))return l;throw new qr(e,[...n,t],s)}try{return st(t).resolve(e)}catch{throw s.push(`require.resolve("${e}") from ${t}`),new qr(e,[...n,t],s)}},"resolveExtendsSpecifier"),wo=T(async(e,t,n)=>{const s=sn(t),u=t.slice(t.lastIndexOf(".")),l=U(it(t),`.vis-config-tmp-${s}${u}`);Eo(t,l);let g;try{g=await e.import(l,{default:!0,try:!0})??{}}catch(h){throw new kn(t,n,h)}finally{try{Ao(l)}catch{}}try{return(typeof g=="function"?await g()??{}:g)??{}}catch(h){throw new kn(t,n,h)}},"loadRawConfig"),tu=T((e,t)=>{const n={...e,...t};if(e.tasks||t.tasks){const s=new Set([...Object.keys(e.tasks??{}),...Object.keys(t.tasks??{})]),u={};for(const l of s)u[l]=Rc(e.tasks?.[l],t.tasks?.[l]);n.tasks=u}if((e.scopedTasks||t.scopedTasks)&&(n.scopedTasks=[...e.scopedTasks??[],...t.scopedTasks??[]]),(e.fileGroups||t.fileGroups)&&(n.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(n.taskGroups={...e.taskGroups,...t.taskGroups}),e.security||t.security){const s=e.security?.policies??{},u=t.security?.policies??{},l={...s,...u};for(const g of Object.keys(s)){const h=s[g],w=u[g];h!==void 0&&w!==void 0&&(l[g]={...h,...w})}n.security={...e.security,...t.security,acceptedRisks:{...e.security?.acceptedRisks,...t.security?.acceptedRisks},policies:l}}return(e.update||t.update)&&(n.update={...e.update,...t.update}),(e.taskRunner||t.taskRunner)&&(n.taskRunner={...e.taskRunner,...t.taskRunner}),delete n.extends,n},"mergeVisConfigs"),xo=T(async(e,t,n,s,u,l)=>{if(s.has(t))throw new Ec(t,n);if(!u.has(t)){s.add(t);try{const g=await wo(e,t,n);Wc(t,n,g);const h=Yc(g.extends);for(const w of h){const O=eu(w,t,n);await xo(e,O,[...n,t],s,u,l)}u.set(t,g),l.push(t)}finally{s.delete(t)}}},"resolveConfigChain"),gu=T(async(e,t)=>{let n;if(t?.explicitConfigPath){const $=Mn(t.explicitConfigPath)?t.explicitConfigPath:U(e,t.explicitConfigPath);if(!X($))throw new Error(`Cannot find config file at ${$}`);n=$}else n=Gc(e);if(!n)return En({});const s=_n(e,{fsCache:!1,moduleCache:!1}),u=new Set,l=new Map,g=[];await xo(s,n,[],u,l,g);const h=Hc(g),w=Jc(e);if(w){const $=Xc(w,h);if($)return $}let O={};for(const $ of g)O=tu(O,l.get($));const j=En(O);return w&&Qc(w,h,j),j},"loadVisConfig"),ru=T(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),nu=T((e,t)=>{const n=U(e,"node_modules"),s=ru(t);if(X(n)){const l=U(n,".cache","vis","task-configs");return yt(l),U(l,`${s}.json`)}const u=no("vis",{create:!0,cwd:e});return u?U(u,"task-configs",`${s}.json`):void 0},"getVisTaskCachePath"),ou=T((e,t)=>{if(X(e))try{const n=pt(e);if(n.hash===t)return n.config}catch{}},"readVisTaskCache"),su=T((e,t,n)=>{try{yt(it(e)),ho(e,{config:n,hash:t})}catch{}},"writeVisTaskCache"),hu=T(async(e,t,n)=>{const s=Kc(t);if(!s)return;const u=sn(s),l=nu(e,n);if(l){const O=ou(l,u);if(O)return O}const g=_n(t,{fsCache:!1,moduleCache:!1}),h=await wo(g,s,[]);Lc(s,[],h);const w=h;return l&&su(l,u,w),w},"loadVisTaskConfig"),mu=T(e=>e,"defineTaskConfig"),yu=T(e=>e,"defineConfig");export{Kc as G,du as H,jt as M,$o as V,mu as a,yt as b,yu as c,no as d,gu as e,vn as f,bt as g,vo as h,Ja as i,Gc as j,Rc as k,Zr as l,En as m,pt as n,lc as q,hu as r,La as s,ho as w};
16
+ ${n.join(`
17
+ `)}`:"";super(`Cannot resolve "${t}" extended from ${i}.${c}
18
+ Chain: ${Ci(r)}`,r)}}var Si=Object.defineProperty,jr=h((e,t)=>Si(e,"name",{value:t,configurable:!0}),"i$1");const Lt="@inherit",Ni=["aliases","dependsOn","inputs","outputs"],Mi=jr((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(Lt))return[...t];const r=[];for(const n of t){if(n===Lt){e!==void 0&&r.push(...e);continue}r.push(n)}return r},"mergeArrayWithInherit"),zi=jr((e,t)=>{const r={...e,...t};for(const n of Ni){const i=e?.[n],c=t?.[n],f=Mi(i,c);f===void 0?delete r[n]:r[n]=f}return r},"mergeTargetWithInherit");var _i=Object.defineProperty,Ie=h((e,t)=>_i(e,"name",{value:t,configurable:!0}),"o");const Ri=Ie(e=>{const t=[];if(Object.hasOwn(e,"targetDefaults")&&t.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&t.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:r}=e,n=[];if(Array.isArray(r))for(const[i,c]of r.entries())c&&typeof c=="object"&&(Object.hasOwn(c,"scope")&&n.push({location:`taskDefaults[${i}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(c,"targets")&&n.push({location:`taskDefaults[${i}].targets`,name:"targets",renamedTo:"tasks"}));t.push({children:n.length>0?n:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[r,n]of e.scopedTasks.entries())n&&typeof n=="object"&&(Object.hasOwn(n,"scope")&&t.push({location:`scopedTasks[${r}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(n,"targets")&&t.push({location:`scopedTasks[${r}].targets`,name:"targets",renamedTo:"tasks"}));return t},"detectDeprecatedConfigKeys"),Di=Ie(e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],"detectDeprecatedTaskKeys"),Bi=Ie((e,t,r)=>{if(!r||typeof r!="object")return;const n=Ri(r);if(n.length>0)throw new wr(e,t,n)},"assertNoDeprecatedConfigKeys"),Ii=Ie((e,t,r)=>{if(!r||typeof r!="object")return;const n=Di(r);if(n.length>0)throw new wr(e,t,n)},"assertNoDeprecatedTaskKeys");var Fi=Object.defineProperty,k=h((e,t)=>Fi(e,"name",{value:t,configurable:!0}),"r");const kr=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],Wi=new Set(kr),Or=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],Li=new Set(Or),la=2880,Xe={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},Vi=k(e=>{if(!e)return{...Xe};const t=Xe.policies??{},r=e.policies??{},n={...t,...r};for(const i of Object.keys(t)){const c=t[i],f=r[i];c!==void 0&&f!==void 0&&(n[i]={...c,...f})}return{...Xe,...e,policies:n}},"mergeSecurityDefaults"),Vt=k(e=>({...e,security:Vi(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),qi=k(e=>{let t;try{t=Gt(e)}catch{return}const r=new Set(t.filter(n=>Wi.has(n)));for(const n of kr)if(r.has(n))return S(e,n)},"findVisConfigFile"),Gi=k(e=>{let t;try{t=Gt(e)}catch{return}const r=new Set(t.filter(n=>Li.has(n)));for(const n of Or)if(r.has(n))return S(e,n)},"findVisTaskConfigFile"),ut=k(e=>qt("sha256").update(Zn(e)).digest("hex"),"hashFileContents"),Ui=k(e=>{const t=qt("sha256"),r=[...e].sort();for(const n of r)t.update(n),t.update(":"),t.update(ut(n)),t.update(`
19
+ `);return t.digest("hex")},"hashConfigChain"),Ki=k(e=>{const t=S(e,"node_modules");if(R(t)){const n=S(t,".cache","vis");return De(n),S(n,"vis-config-cache.json")}const r=ur("vis",{create:!0,cwd:e});return r?S(r,"vis-config-cache.json"):void 0},"getConfigCachePath"),Hi=k((e,t)=>{if(R(e))try{const r=ct(e);if(r.hash===t)return r.config}catch{}},"readConfigCache"),Zi=k((e,t,r)=>{try{De(Oe(e)),$r(e,{config:r,hash:t})}catch{}},"writeConfigCache"),Ji=k(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),Xi=k((e,t,r)=>{if(Ht(e))throw new Je(e,[...r,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const n=[];if(e.startsWith("./")||e.startsWith("../")){const i=Oe(t),c=S(i,e);if(n.push(c),R(c))return c;throw new Je(e,[...r,t],n)}try{return ke(t).resolve(e)}catch{throw n.push(`require.resolve("${e}") from ${t}`),new Je(e,[...r,t],n)}},"resolveExtendsSpecifier"),Tr=k(async(e,t,r)=>{const n=ut(t),i=t.slice(t.lastIndexOf(".")),c=S(Oe(t),`.vis-config-tmp-${n}${i}`);Jn(t,c);let f;try{f=await e.import(c,{default:!0,try:!0})??{}}catch(d){throw new Wt(t,r,d)}finally{try{Xn(c)}catch{}}try{return(typeof f=="function"?await f()??{}:f)??{}}catch(d){throw new Wt(t,r,d)}},"loadRawConfig"),Yi=k((e,t)=>{const r={...e,...t};if(e.tasks||t.tasks){const n=new Set([...Object.keys(e.tasks??{}),...Object.keys(t.tasks??{})]),i={};for(const c of n)i[c]=zi(e.tasks?.[c],t.tasks?.[c]);r.tasks=i}if((e.scopedTasks||t.scopedTasks)&&(r.scopedTasks=[...e.scopedTasks??[],...t.scopedTasks??[]]),(e.fileGroups||t.fileGroups)&&(r.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(r.taskGroups={...e.taskGroups,...t.taskGroups}),e.security||t.security){const n=e.security?.policies??{},i=t.security?.policies??{},c={...n,...i};for(const f of Object.keys(n)){const d=n[f],v=i[f];d!==void 0&&v!==void 0&&(c[f]={...d,...v})}r.security={...e.security,...t.security,acceptedRisks:{...e.security?.acceptedRisks,...t.security?.acceptedRisks},policies:c}}return(e.update||t.update)&&(r.update={...e.update,...t.update}),(e.taskRunner||t.taskRunner)&&(r.taskRunner={...e.taskRunner,...t.taskRunner}),delete r.extends,r},"mergeVisConfigs"),Er=k(async(e,t,r,n,i,c)=>{if(n.has(t))throw new ki(t,r);if(!i.has(t)){n.add(t);try{const f=await Tr(e,t,r);Bi(t,r,f);const d=Ji(f.extends);for(const v of d){const w=Xi(v,t,r);await Er(e,w,[...r,t],n,i,c)}i.set(t,f),c.push(t)}finally{n.delete(t)}}},"resolveConfigChain"),fa=k(async(e,t)=>{let r;if(t?.explicitConfigPath){const y=Ht(t.explicitConfigPath)?t.explicitConfigPath:S(e,t.explicitConfigPath);if(!R(y))throw new Error(`Cannot find config file at ${y}`);r=y}else r=qi(e);if(!r)return Vt({});const n=Zt(e,{fsCache:!1,moduleCache:!1}),i=new Set,c=new Map,f=[];await Er(n,r,[],i,c,f);const d=Ui(f),v=Ki(e);if(v){const y=Hi(v,d);if(y)return y}let w={};for(const y of f)w=Yi(w,c.get(y));const $=Vt(w);return v&&Zi(v,d,$),$},"loadVisConfig"),Qi=k(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),ea=k((e,t)=>{const r=S(e,"node_modules"),n=Qi(t);if(R(r)){const c=S(r,".cache","vis","task-configs");return De(c),S(c,`${n}.json`)}const i=ur("vis",{create:!0,cwd:e});return i?S(i,"task-configs",`${n}.json`):void 0},"getVisTaskCachePath"),ta=k((e,t)=>{if(R(e))try{const r=ct(e);if(r.hash===t)return r.config}catch{}},"readVisTaskCache"),ra=k((e,t,r)=>{try{De(Oe(e)),$r(e,{config:r,hash:t})}catch{}},"writeVisTaskCache"),pa=k(async(e,t,r)=>{const n=Gi(t);if(!n)return;const i=ut(n),c=ea(e,r);if(c){const w=ta(c,i);if(w)return w}const f=Zt(t,{fsCache:!1,moduleCache:!1}),d=await Tr(f,n,[]);Ii(n,[],d);const v=d;return c&&ra(c,i,v),v},"loadVisTaskConfig"),da=k(e=>e,"defineTaskConfig"),ga=k(e=>e,"defineConfig");export{pr as $,di as E,Gi as G,la as H,Or as V,da as a,ur as b,ga as c,De as d,fa as e,$r as f,_t as g,kr as h,Qs as i,qi as j,ni as k,Xe as l,Vt as m,zi as n,pa as r,ct as s,br as z};
@@ -1,2 +1,2 @@
1
- var h=Object.defineProperty;var p=(e,t)=>h(e,"name",{value:t,configurable:!0});import{I as g,T as l,j as m,E as n,q as b,e as d}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{ReapiRemoteCache as f,resolveTurboEnvCompat as k}from"@visulima/task-runner";import{p as $}from"./bin.js";var w=Object.defineProperty,s=p((e,t)=>w(e,"name",{value:t,configurable:!0}),"s");const y=s((e,t)=>t==="http"||t==="reapi"?t:e.startsWith("grpc://")||e.startsWith("grpcs://")?"reapi":"http","inferBackend"),S=s(async(e,t)=>{const o=Date.now(),a=new AbortController,r=setTimeout(()=>{a.abort()},t);try{const i=await fetch(e,{method:"HEAD",signal:a.signal});return{backend:"http",durationMs:Date.now()-o,httpStatus:i.status,ok:!0,url:e}}catch(i){return{backend:"http",durationMs:Date.now()-o,error:i instanceof Error?i.message:String(i),ok:!1,url:e}}finally{clearTimeout(r)}},"probeHttp"),C=s(async(e,t)=>{const o=Date.now(),a=new f({...e,timeout:t});try{return{backend:"reapi",capabilities:await a.probeCapabilities(),durationMs:Date.now()-o,ok:!0,url:e.url}}catch(r){return{backend:"reapi",durationMs:Date.now()-o,error:r instanceof Error?r.message:String(r),ok:!1,url:e.url}}finally{try{await a.close()}catch{}}},"probeReapi"),D=s(e=>{const t=[],o=e.ok?g("OK"):l("FAIL");if(t.push(`${m("Remote cache")} ${o}`),t.push(` ${n("URL:")} ${b(e.url)}`),t.push(` ${n("Backend:")} ${e.backend}`),t.push(` ${n("Latency:")} ${String(e.durationMs)}ms`),e.httpStatus!==void 0&&t.push(` ${n("Status:")} ${String(e.httpStatus)}`),e.capabilities){const a=e.capabilities.digestFunctions.length>0?e.capabilities.digestFunctions.join(", "):d("(none advertised)");t.push(` ${n("Digests:")} ${a}`),t.push(` ${n("Batch:")} ${String(e.capabilities.maxBatchTotalSizeBytes)} bytes`)}return e.error&&t.push(` ${n("Error:")} ${l(e.error)}`),t.join(`
1
+ var h=Object.defineProperty;var p=(e,t)=>h(e,"name",{value:t,configurable:!0});import{I as g,T as l,j as m,E as n,q as b,e as d}from"../packem_shared/Table-DoSoazT6-DwnyTUsA.js";import{ReapiRemoteCache as f,resolveTurboEnvCompat as k}from"@visulima/task-runner";import{p as $}from"./bin.js";var w=Object.defineProperty,s=p((e,t)=>w(e,"name",{value:t,configurable:!0}),"s");const y=s((e,t)=>t==="http"||t==="reapi"?t:e.startsWith("grpc://")||e.startsWith("grpcs://")?"reapi":"http","inferBackend"),S=s(async(e,t)=>{const o=Date.now(),a=new AbortController,r=setTimeout(()=>{a.abort()},t);try{const i=await fetch(e,{method:"HEAD",signal:a.signal});return{backend:"http",durationMs:Date.now()-o,httpStatus:i.status,ok:!0,url:e}}catch(i){return{backend:"http",durationMs:Date.now()-o,error:i instanceof Error?i.message:String(i),ok:!1,url:e}}finally{clearTimeout(r)}},"probeHttp"),C=s(async(e,t)=>{const o=Date.now(),a=new f({...e,timeout:t});try{return{backend:"reapi",capabilities:await a.probeCapabilities(),durationMs:Date.now()-o,ok:!0,url:e.url}}catch(r){return{backend:"reapi",durationMs:Date.now()-o,error:r instanceof Error?r.message:String(r),ok:!1,url:e.url}}finally{try{await a.close()}catch{}}},"probeReapi"),D=s(e=>{const t=[],o=e.ok?g("OK"):l("FAIL");if(t.push(`${m("Remote cache")} ${o}`),t.push(` ${n("URL:")} ${b(e.url)}`),t.push(` ${n("Backend:")} ${e.backend}`),t.push(` ${n("Latency:")} ${String(e.durationMs)}ms`),e.httpStatus!==void 0&&t.push(` ${n("Status:")} ${String(e.httpStatus)}`),e.capabilities){const a=e.capabilities.digestFunctions.length>0?e.capabilities.digestFunctions.join(", "):d("(none advertised)");t.push(` ${n("Digests:")} ${a}`),t.push(` ${n("Batch:")} ${String(e.capabilities.maxBatchTotalSizeBytes)} bytes`)}return e.error&&t.push(` ${n("Error:")} ${l(e.error)}`),t.join(`
2
2
  `)},"formatTable"),T=s(async({logger:e,options:t,visConfig:o})=>{const a=k((o??{}).taskRunner?.remoteCache),r=t.url??a?.url,i=t.format??"table",u=t.timeout??5e3;if(!r){$.error("No remote cache configured. Set taskRunner.remoteCache.url in vis.config.ts, pass --url=..., or export TURBO_API."),process.exitCode=1;return}const c=y(r,t.backend)==="reapi"?await C({...a??{url:r},backend:"reapi",url:r},u):await S(r,u);i==="json"?e.log(JSON.stringify(c,null,2)):e.log(D(c)),c.ok||(process.exitCode=1)},"cacheDoctorExecute");export{T as cacheDoctorExecute};
@@ -1,4 +1,4 @@
1
- var O=Object.defineProperty;var v=(e,t)=>O(e,"name",{value:t,configurable:!0});import{createRequire as q}from"node:module";import{j as $,E as P,e as R,q as D,T as j,I}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{z as _}from"../packem_shared/readFileSync-4c_c6Qey-6SWMDNdw.js";import{r as W,a as B,b as L,c as w}from"../packem_shared/ai-fix-CfFWatGY.js";import{p}from"./bin.js";import{l as N}from"../packem_shared/failure-log-n3j_-w8s.js";const A=q(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=v(e=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[t,r]=m.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return m.getBuiltinModule(e)}return A(e)},"__cjs_getBuiltinModule"),{createInterface:z}=J("node:readline");var M=Object.defineProperty,l=v((e,t)=>M(e,"name",{value:t,configurable:!0}),"c");const U={"ambiguous-match":"ambiguous match",applied:"applied",error:"error","missing-file":"missing file","no-match":"no match","outside-workspace":"outside workspace"},S=l((e,t,r)=>{const o=W(e,t,r),s=_(e,o);return s===""||s.startsWith("..")?o:s},"formatDisplayPath"),E=l((e,t,r)=>{const o=[$(`Fix proposal (${e.provider}, confidence: ${e.confidence})`),"",e.explanation||P("<no explanation>")];if(e.cannotFix)return o.push(""),o.push(R(`Cannot fix automatically: ${e.cannotFix}`)),o.join(`
1
+ var O=Object.defineProperty;var v=(e,t)=>O(e,"name",{value:t,configurable:!0});import{createRequire as q}from"node:module";import{j as $,E as P,e as R,q as D,T as j,I}from"../packem_shared/Table-DoSoazT6-DwnyTUsA.js";import{z as _}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{r as W,a as B,b as L,c as w}from"../packem_shared/ai-fix-BkPUHA0z.js";import{p}from"./bin.js";import{l as N}from"../packem_shared/failure-log-34Wl3npC.js";const A=q(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=v(e=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[t,r]=m.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return m.getBuiltinModule(e)}return A(e)},"__cjs_getBuiltinModule"),{createInterface:z}=J("node:readline");var M=Object.defineProperty,l=v((e,t)=>M(e,"name",{value:t,configurable:!0}),"c");const U={"ambiguous-match":"ambiguous match",applied:"applied",error:"error","missing-file":"missing file","no-match":"no match","outside-workspace":"outside workspace"},S=l((e,t,r)=>{const o=W(e,t,r),s=_(e,o);return s===""||s.startsWith("..")?o:s},"formatDisplayPath"),E=l((e,t,r)=>{const o=[$(`Fix proposal (${e.provider}, confidence: ${e.confidence})`),"",e.explanation||P("<no explanation>")];if(e.cannotFix)return o.push(""),o.push(R(`Cannot fix automatically: ${e.cannotFix}`)),o.join(`
2
2
  `);if(e.patches.length===0)return o.push(""),o.push(R("No patches were proposed.")),o.join(`
3
3
  `);o.push(""),o.push($(`Patches (${String(e.patches.length)}):`));for(const[s,i]of e.patches.entries()){const a=S(t,r,i.file);o.push(""),o.push(D(`[${String(s+1)}] ${a}`)),i.reason&&o.push(P(` reason: ${i.reason}`));for(const c of i.oldString.split(`
4
4
  `))o.push(j(` - ${c}`));for(const c of i.newString.split(`
@@ -1 +1 @@
1
- var O=Object.defineProperty;var v=(r,e)=>O(r,"name",{value:e,configurable:!0});import{createTaskGraph as E}from"@visulima/task-runner";import{C as R,S}from"./bin.js";import{r as C,f as P}from"../packem_shared/selectors-BU8aTRQm.js";var x=Object.defineProperty,d=v((r,e)=>x(r,"name",{value:e,configurable:!0}),"u");const G=d((r,e,n)=>{const c=[],t=new Set,i=d((o,f)=>{if(t.has(o))return;t.add(o);const m=e[o]??[];for(const u of m)i(u,f+1);const s=n[o],h=" ".repeat(f);c.push(`${h}${o}${s?.cache===!1?" (no-cache)":""}`)},"walk");for(const o of r)i(o,0);return c},"renderPlan"),J=d((r,e,n)=>({roots:r,tasks:Object.fromEntries(Object.entries(n).map(([c,t])=>[c,{cache:t.cache,dependsOn:e[c]??[],outputs:t.outputs,parallelism:t.parallelism,projectRoot:t.projectRoot,target:t.target}]))}),"toJson"),D=d(async({argument:r,logger:e,options:n,process:c,visConfig:t,workspaceRoot:i})=>{const o=r[0];if(!o)throw new Error("Missing selector. Usage: vis action-graph <selector>");if(!i)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{config:f,packageJsons:m,workspace:s}=R(i,t),h=S(i,s,m),u=await C(o,s,c.cwd,i),{target:l}=u;let j=u.projects;n.query&&(j=P(j,s,n.query));const k=j.filter(p=>s.projects[p]?.targets?.[l]!==void 0);if(k.length===0){e.info(`No projects have a "${l}" target.`);return}const y=k.map(p=>{const w=s.projects[p],g=w.targets?.[l],b={project:p,target:l};return{cache:g?.cache,id:`${p}:${l}`,outputs:g?.outputs??[],overrides:{command:g?.command},parallelism:g?.parallelism,projectRoot:w.root,target:b}}),a=E(y,{projectGraph:h,targetDefaults:f.tasks,workspace:s});if(n.json){e.info(JSON.stringify(J(a.roots,a.dependencies,a.tasks),null,2));return}const $=G(a.roots,a.dependencies,a.tasks);e.info(`Execution plan (${Object.keys(a.tasks).length} task(s), ${a.roots.length} root(s)):`),e.info("");for(const p of $)e.info(p)},"execute");export{D as default};
1
+ var O=Object.defineProperty;var v=(r,e)=>O(r,"name",{value:e,configurable:!0});import{createTaskGraph as E}from"@visulima/task-runner";import{C as R,S}from"./bin.js";import{r as C,f as P}from"../packem_shared/selectors-DkgYFzdq.js";var x=Object.defineProperty,d=v((r,e)=>x(r,"name",{value:e,configurable:!0}),"u");const G=d((r,e,n)=>{const c=[],t=new Set,i=d((o,f)=>{if(t.has(o))return;t.add(o);const m=e[o]??[];for(const u of m)i(u,f+1);const s=n[o],h=" ".repeat(f);c.push(`${h}${o}${s?.cache===!1?" (no-cache)":""}`)},"walk");for(const o of r)i(o,0);return c},"renderPlan"),J=d((r,e,n)=>({roots:r,tasks:Object.fromEntries(Object.entries(n).map(([c,t])=>[c,{cache:t.cache,dependsOn:e[c]??[],outputs:t.outputs,parallelism:t.parallelism,projectRoot:t.projectRoot,target:t.target}]))}),"toJson"),D=d(async({argument:r,logger:e,options:n,process:c,visConfig:t,workspaceRoot:i})=>{const o=r[0];if(!o)throw new Error("Missing selector. Usage: vis action-graph <selector>");if(!i)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{config:f,packageJsons:m,workspace:s}=R(i,t),h=S(i,s,m),u=await C(o,s,c.cwd,i),{target:l}=u;let j=u.projects;n.query&&(j=P(j,s,n.query));const k=j.filter(p=>s.projects[p]?.targets?.[l]!==void 0);if(k.length===0){e.info(`No projects have a "${l}" target.`);return}const y=k.map(p=>{const w=s.projects[p],g=w.targets?.[l],b={project:p,target:l};return{cache:g?.cache,id:`${p}:${l}`,outputs:g?.outputs??[],overrides:{command:g?.command},parallelism:g?.parallelism,projectRoot:w.root,target:b}}),a=E(y,{projectGraph:h,targetDefaults:f.tasks,workspace:s});if(n.json){e.info(JSON.stringify(J(a.roots,a.dependencies,a.tasks),null,2));return}const $=G(a.roots,a.dependencies,a.tasks);e.info(`Execution plan (${Object.keys(a.tasks).length} task(s), ${a.roots.length} root(s)):`),e.info("");for(const p of $)e.info(p)},"execute");export{D as default};
@@ -1 +1 @@
1
- var d=Object.defineProperty;var n=(o,r)=>d(o,"name",{value:r,configurable:!0});import{R as m,N as g}from"../packem_shared/pm-runner-Ta_yz2uP.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,k=n((o,r)=>v(o,"name",{value:r,configurable:!0}),"t");const x=k(async({argument:o,logger:r,options:e,visConfig:s,workspaceRoot:t})=>{const a=o;if(!a||a.length===0)throw new Error("No command specified. Usage: vis exec <command> [args...]");const[i,...f]=a,l=t??process.cwd(),p=m(l,{configBackend:s?.install?.backend,configCorepack:s?.install?.corepack}),c=g(p,{args:f,command:i,filter:u(e.filter),parallel:e.parallel||!1,recursive:e.recursive||!1,reverse:e.reverse||!1,shellMode:e.shellMode||!1,workspaceRoot:e.workspaceRoot||!1},l,r);c!==0&&(process.exitCode=c)},"execute");export{x as default};
1
+ var d=Object.defineProperty;var n=(o,r)=>d(o,"name",{value:r,configurable:!0});import{R as m,N as g}from"../packem_shared/pm-runner-DmKT2FqF.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,k=n((o,r)=>v(o,"name",{value:r,configurable:!0}),"t");const x=k(async({argument:o,logger:r,options:e,visConfig:s,workspaceRoot:t})=>{const a=o;if(!a||a.length===0)throw new Error("No command specified. Usage: vis exec <command> [args...]");const[i,...f]=a,l=t??process.cwd(),p=m(l,{configBackend:s?.install?.backend,configCorepack:s?.install?.corepack}),c=g(p,{args:f,command:i,filter:u(e.filter),parallel:e.parallel||!1,recursive:e.recursive||!1,reverse:e.reverse||!1,shellMode:e.shellMode||!1,workspaceRoot:e.workspaceRoot||!1},l,r);c!==0&&(process.exitCode=c)},"execute");export{x as default};
@@ -1,5 +1,5 @@
1
- var g=Object.defineProperty;var a=(e,i)=>g(e,"name",{value:i,configurable:!0});import{createRequire as _}from"node:module";import{M as n,i as u,$ as p}from"../packem_shared/readFileSync-4c_c6Qey-6SWMDNdw.js";import{q as $}from"./config.js";import{x as j}from"./bin.js";const b=_(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=a(e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[i,s]=c.versions.node.split(".").map(Number);if(i>22||i===22&&s>=3||i===20&&s>=16)return c.getBuiltinModule(e)}return b(e)},"__cjs_getBuiltinModule"),{rmSync:y}=d("node:fs"),{homedir:r}=d("node:os"),{createInterface:w}=d("node:readline");var T=Object.defineProperty,m=a((e,i)=>T(e,"name",{value:i,configurable:!0}),"l");const f=j(),h=[n(r(),".zshrc"),n(r(),".zshenv"),n(r(),".bashrc"),n(r(),".bash_profile"),n(r(),".profile"),n(r(),".config","fish","config.fish")],q=m(e=>{const i=[];for(const s of h)if(u(s))try{const l=p(s).split(`
1
+ var g=Object.defineProperty;var a=(e,i)=>g(e,"name",{value:i,configurable:!0});import{createRequire as _}from"node:module";import{M as n,l as u,B as p}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{E as $}from"./config.js";import{x as j}from"./bin.js";const b=_(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=a(e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[i,s]=c.versions.node.split(".").map(Number);if(i>22||i===22&&s>=3||i===20&&s>=16)return c.getBuiltinModule(e)}return b(e)},"__cjs_getBuiltinModule"),{rmSync:y}=d("node:fs"),{homedir:r}=d("node:os"),{createInterface:w}=d("node:readline");var T=Object.defineProperty,m=a((e,i)=>T(e,"name",{value:i,configurable:!0}),"l");const f=j(),h=[n(r(),".zshrc"),n(r(),".zshenv"),n(r(),".bashrc"),n(r(),".bash_profile"),n(r(),".profile"),n(r(),".config","fish","config.fish")],E=m(e=>{const i=[];for(const s of h)if(u(s))try{const l=p(s).split(`
2
2
  `),o=l.filter(t=>!t.includes(".vis/bin")&&!t.includes("VIS_HOME")&&!t.includes("# vis "));o.length!==l.length&&($(s,o.join(`
3
- `)),i.push(s))}catch{e.warn(`warning: could not clean ${s}`)}return i},"cleanShellProfiles"),R=m(async({logger:e,options:i})=>{if(!u(f)){e.info("vis is not installed (no ~/.vis directory found).");return}e.info("This will remove:"),e.info(` ${f}/`);const s=h.filter(o=>u(o)&&p(o).includes(".vis"));for(const o of s)e.info(` Lines in ${o}`);if(!i.yes){if(!process.stdin.isTTY)throw new Error("Non-interactive terminal. Use --yes to confirm.");const o=w({input:process.stdin,output:process.stdout}),t=await new Promise(v=>{o.question(`
4
- Type "uninstall" to confirm: `,v)});if(o.close(),t.trim()!=="uninstall"){e.info("Aborted.");return}}const l=q(e);for(const o of l)e.info(`Cleaned ${o}`);try{y(f,{force:!0,recursive:!0}),e.info(`
5
- ✓ Removed ${f}`)}catch(o){throw new Error(`Failed to remove ${f}: ${o instanceof Error?o.message:String(o)}`,{cause:o})}e.info("✓ vis has been uninstalled.")},"execute");export{R as default};
3
+ `)),i.push(s))}catch{e.warn(`warning: could not clean ${s}`)}return i},"cleanShellProfiles"),B=m(async({logger:e,options:i})=>{if(!u(f)){e.info("vis is not installed (no ~/.vis directory found).");return}e.info("This will remove:"),e.info(` ${f}/`);const s=h.filter(o=>u(o)&&p(o).includes(".vis"));for(const o of s)e.info(` Lines in ${o}`);if(!i.yes){if(!process.stdin.isTTY)throw new Error("Non-interactive terminal. Use --yes to confirm.");const o=w({input:process.stdin,output:process.stdout}),t=await new Promise(v=>{o.question(`
4
+ Type "uninstall" to confirm: `,v)});if(o.close(),t.trim()!=="uninstall"){e.info("Aborted.");return}}const l=E(e);for(const o of l)e.info(`Cleaned ${o}`);try{y(f,{force:!0,recursive:!0}),e.info(`
5
+ ✓ Removed ${f}`)}catch(o){throw new Error(`Failed to remove ${f}: ${o instanceof Error?o.message:String(o)}`,{cause:o})}e.info("✓ vis has been uninstalled.")},"execute");export{B as default};
@@ -1 +1 @@
1
- var g=Object.defineProperty;var c=(e,a)=>g(e,"name",{value:a,configurable:!0});import{R as d,S as k}from"../packem_shared/pm-runner-Ta_yz2uP.js";var u=Object.defineProperty,v=c((e,a)=>u(e,"name",{value:a,configurable:!0}),"t");const x=v(async({argument:e,logger:a,options:r,process:i,visConfig:n,workspaceRoot:t})=>{if(!e||e.length===0)throw new Error("No package specified. Usage: vis info <package> [field...]");const[f,...p]=e,s=t??i.cwd,l=d(s,{configBackend:n?.install?.backend,configCorepack:n?.install?.corepack}),o=k(l,{fields:p,json:r.json||!1,package:f},s,a);o!==0&&o!==1&&(process.exitCode=o)},"execute");export{x as default};
1
+ var g=Object.defineProperty;var c=(e,a)=>g(e,"name",{value:a,configurable:!0});import{R as d,S as k}from"../packem_shared/pm-runner-DmKT2FqF.js";var u=Object.defineProperty,v=c((e,a)=>u(e,"name",{value:a,configurable:!0}),"t");const x=v(async({argument:e,logger:a,options:r,process:i,visConfig:n,workspaceRoot:t})=>{if(!e||e.length===0)throw new Error("No package specified. Usage: vis info <package> [field...]");const[f,...p]=e,s=t??i.cwd,l=d(s,{configBackend:n?.install?.backend,configCorepack:n?.install?.corepack}),o=k(l,{fields:p,json:r.json||!1,package:f},s,a);o!==0&&o!==1&&(process.exitCode=o)},"execute");export{x as default};
@@ -1,4 +1,4 @@
1
- var M=Object.defineProperty;var j=(o,s)=>M(o,"name",{value:s,configurable:!0});import{createRequire as N}from"node:module";import{i as b,M as d,z as P}from"../packem_shared/readFileSync-4c_c6Qey-6SWMDNdw.js";import{H as v,q as w,j as q}from"./config.js";import{p as e}from"./bin.js";import{A as K}from"../packem_shared/pm-runner-Ta_yz2uP.js";import{O as G}from"../packem_shared/build-scripts-D-ysm_bS.js";import{N as A}from"../packem_shared/native-config-sync-CgRIIRZV.js";import{E as T}from"../packem_shared/min-release-age-YyNI7gqV.js";const B=N(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,C=j(o=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[s,t]=h.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return h.getBuiltinModule(o)}return B(o)},"__cjs_getBuiltinModule"),{execFileSync:I}=C("node:child_process"),{createInterface:F}=C("node:readline");var L=Object.defineProperty,u=j((o,s)=>L(o,"name",{value:s,configurable:!0}),"f");const Y=u(o=>{const s=[];return b(d(o,"turbo.json"))&&s.push("turborepo"),b(d(o,"nx.json"))&&s.push("nx"),b(d(o,".moon"))&&s.push("moon"),s},"detectExistingTools"),E=u((o,s)=>new Promise(t=>{o.question(s,i=>{t(i.trim())})}),"ask"),m=u(async(o,s,t=!0)=>{const i=await E(o,`${s} ${t?"[Y/n]":"[y/N]"} `);return i===""?t:i.toLowerCase()==="y"||i.toLowerCase()==="yes"},"confirm"),k=u((o,s)=>{const t=[],i=Object.entries(s.allowBuilds).filter(([,l])=>l).map(([l])=>` "${l}": true,`).join(`
1
+ var M=Object.defineProperty;var j=(o,s)=>M(o,"name",{value:s,configurable:!0});import{createRequire as N}from"node:module";import{l as b,M as d,z as P}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{H as v,E as w,j as K}from"./config.js";import{p as e}from"./bin.js";import{A as q}from"../packem_shared/pm-runner-DmKT2FqF.js";import{O as G}from"../packem_shared/build-scripts-DE6U8jVq.js";import{N as E}from"../packem_shared/native-config-sync-BRZZetn3.js";import{E as A}from"../packem_shared/min-release-age-BPVXwPUg.js";const B=N(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,C=j(o=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[s,t]=h.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return h.getBuiltinModule(o)}return B(o)},"__cjs_getBuiltinModule"),{execFileSync:I}=C("node:child_process"),{createInterface:F}=C("node:readline");var L=Object.defineProperty,u=j((o,s)=>L(o,"name",{value:s,configurable:!0}),"f");const Y=u(o=>{const s=[];return b(d(o,"turbo.json"))&&s.push("turborepo"),b(d(o,"nx.json"))&&s.push("nx"),b(d(o,".moon"))&&s.push("moon"),s},"detectExistingTools"),T=u((o,s)=>new Promise(t=>{o.question(s,i=>{t(i.trim())})}),"ask"),m=u(async(o,s,t=!0)=>{const i=await T(o,`${s} ${t?"[Y/n]":"[y/N]"} `);return i===""?t:i.toLowerCase()==="y"||i.toLowerCase()==="yes"},"confirm"),k=u((o,s)=>{const t=[],i=Object.entries(s.allowBuilds).filter(([,l])=>l).map(([l])=>` "${l}": true,`).join(`
2
2
  `),a=[` installScripts: {
3
3
  allow: ${i?`{
4
4
  ${i}
@@ -24,4 +24,4 @@ ${t.join(`
24
24
  `},"generateConfigContent"),z=u(async(o,s,t)=>{const i=F({input:process.stdin,output:process.stdout});e.info(`
25
25
  vis init — interactive setup
26
26
  `);const a=await m(i," Enable Socket.dev security scanning?");a&&(e.success(" Socket.dev enabled — scores, alerts, and supply chain data active."),process.env.VIS_SOCKET_TOKEN||e.notice(" Set VIS_SOCKET_TOKEN for a custom API token (optional).")),e.info("");const n=await m(i," Enable Google deps.dev (OpenSSF Scorecard + GHSA advisories)?");n&&e.success(" deps.dev enabled — Scorecard signals and advisories merged into the security report."),e.info("");const l=await m(i," Scan for packages with build scripts?"),g={};if(l){e.info(" Scanning node_modules...");const c=G(o,{});if(c.length>0){e.info(` Found ${String(c.length)} package${c.length===1?"":"s"} with build scripts:
27
- `);for(const r of c){const f=await m(i,` Allow ${r}?`,!1),x=r.split(" (")[0]??r;g[x]=f,f&&e.success(` ✓ ${x} approved`)}}else e.info(" No packages with build scripts found.")}e.info("");const O=await m(i," Enforce a minimum release age (block freshly-published versions)?");let p;if(O){const c=await E(i,` Minimum age in minutes (default ${String(v)} = 2 days): `),r=c===""?v:Number.parseInt(c,10);p=Number.isFinite(r)&&r>0?r:v,e.success(` minimumReleaseAge: ${String(p)} minutes`)}e.info("");const S=await m(i," Set up pre-commit hooks (lint-staged)?",!1);let y=!1;(s.name==="pnpm"||s.name==="yarn"||s.name==="npm"||s.name==="bun")&&(e.info(""),y=await m(i,` Sync security settings to ${s.name} config?`));const $=Y(o);if($.length>0&&(e.info(""),e.info(` Detected existing tools: ${$.join(", ")}`),await m(i,` Run \`vis migrate\` for ${$.join(", ")}?`,!1))){i.close();const[c,...r]=s.name==="pnpm"?["pnpm","exec"]:s.name==="yarn"?["yarn","exec"]:s.name==="bun"?["bunx"]:["npx"];for(const f of $){e.info(` Migrating from ${f}...`);try{I(c,[...r,"vis","migrate",f],{cwd:o,stdio:"inherit"})}catch{e.warn(` Migration from ${f} had issues — run \`vis migrate ${f}\` manually.`)}}if(b(t))e.success(`Migrated config written to ${t}`);else{const f=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});w(t,f),e.success(`Created ${t}`)}e.notice(" Run 'vis doctor' to see your project's full health status.");return}i.close(),e.info("");const D=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});if(w(t,D),e.success(`Created ${t}`),y){const c=Object.fromEntries(Object.entries(g).filter(([,r])=>r));for(const r of A(s.name,o,c))e.success(` ${r}`);for(const r of T(s.name,o,p))e.success(` ${r}`)}e.info(""),e.info(" Setup complete. Your config:");const _=[a&&"Socket.dev",n&&"deps.dev"].filter(Boolean);e.info(` Security: ${_.length>0?`${_.join(" + ")} enabled`:"defaults only"}`),e.info(` Build scripts: ${Object.values(g).filter(Boolean).length} approved`),e.info(` Min age: ${p===void 0?"not enforced":`${String(p)} minutes`}`),e.info(` Git hooks: ${S?"lint-staged configured":"not configured"}`),e.info(` PM sync: ${y?"done":"skipped"}`),e.info(""),e.notice(" Run 'vis doctor' to see your project's full health status."),e.info("")},"runInteractiveInit"),H=u((o,s,t,i)=>{const a=k(s.name,{allowBuilds:{},enableDepsDev:!1,enableSocket:!1,minimumReleaseAge:v,staged:!1});if(w(i,a),e.success(`Created ${i}`),e.info(" Secure defaults are applied automatically by defineConfig()."),t.syncNative){for(const n of A(s.name,o,{}))e.success(` ${n}`);for(const n of T(s.name,o,v))e.success(` ${n}`)}e.info(""),e.notice("Run 'vis doctor' for a full health check, or 'vis init' in a terminal for guided setup.")},"runStaticInit"),R=u((o,s,t)=>{const i=d(o,".."),a=d(s,"node_modules","@visulima","vis","schemas",t),n=P(i,a),l=n===""?`./${t}`:n.split(/[/\\]/u).join("/");return l.startsWith(".")?l:`./${l}`},"buildSchemaRef"),V=u((o,s)=>{const t=R(d(o,"project.json"),s,"project.schema.json"),i=R(d(o,"vis.config.ts"),s,"vis-config.schema.json");e.info(""),e.info("Paste these into your config files to get editor IntelliSense:"),e.info(""),e.info(` project.json → "$schema": "${t}"`),e.info(` vis.config.ts → see ${i} (vis.config.ts is TypeScript; use the import path directly)`),e.info(""),e.notice("For nested project.json files, the `..` depth changes — run `vis migrate nx` to auto-rewrite all of them.")},"printSchemaPaths"),te=u(async({options:o,workspaceRoot:s})=>{const t=s??process.cwd();if(o.schema){V(t,t);return}const i=K(t),a=q(t);if(a&&!o.force){e.warn(`Config already exists: ${a}`),e.notice("Use --force to overwrite, or edit the existing file.");return}const n=a??d(t,"vis.config.ts");process.stdin.isTTY&&o.interactive!==!1?await z(t,i,n):H(t,i,o,n)},"execute");export{R as buildSchemaRefForTesting,te as default};
27
+ `);for(const r of c){const f=await m(i,` Allow ${r}?`,!1),x=r.split(" (")[0]??r;g[x]=f,f&&e.success(` ✓ ${x} approved`)}}else e.info(" No packages with build scripts found.")}e.info("");const O=await m(i," Enforce a minimum release age (block freshly-published versions)?");let p;if(O){const c=await T(i,` Minimum age in minutes (default ${String(v)} = 2 days): `),r=c===""?v:Number.parseInt(c,10);p=Number.isFinite(r)&&r>0?r:v,e.success(` minimumReleaseAge: ${String(p)} minutes`)}e.info("");const S=await m(i," Set up pre-commit hooks (lint-staged)?",!1);let y=!1;(s.name==="pnpm"||s.name==="yarn"||s.name==="npm"||s.name==="bun")&&(e.info(""),y=await m(i,` Sync security settings to ${s.name} config?`));const $=Y(o);if($.length>0&&(e.info(""),e.info(` Detected existing tools: ${$.join(", ")}`),await m(i,` Run \`vis migrate\` for ${$.join(", ")}?`,!1))){i.close();const[c,...r]=s.name==="pnpm"?["pnpm","exec"]:s.name==="yarn"?["yarn","exec"]:s.name==="bun"?["bunx"]:["npx"];for(const f of $){e.info(` Migrating from ${f}...`);try{I(c,[...r,"vis","migrate",f],{cwd:o,stdio:"inherit"})}catch{e.warn(` Migration from ${f} had issues — run \`vis migrate ${f}\` manually.`)}}if(b(t))e.success(`Migrated config written to ${t}`);else{const f=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});w(t,f),e.success(`Created ${t}`)}e.notice(" Run 'vis doctor' to see your project's full health status.");return}i.close(),e.info("");const D=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});if(w(t,D),e.success(`Created ${t}`),y){const c=Object.fromEntries(Object.entries(g).filter(([,r])=>r));for(const r of E(s.name,o,c))e.success(` ${r}`);for(const r of A(s.name,o,p))e.success(` ${r}`)}e.info(""),e.info(" Setup complete. Your config:");const _=[a&&"Socket.dev",n&&"deps.dev"].filter(Boolean);e.info(` Security: ${_.length>0?`${_.join(" + ")} enabled`:"defaults only"}`),e.info(` Build scripts: ${Object.values(g).filter(Boolean).length} approved`),e.info(` Min age: ${p===void 0?"not enforced":`${String(p)} minutes`}`),e.info(` Git hooks: ${S?"lint-staged configured":"not configured"}`),e.info(` PM sync: ${y?"done":"skipped"}`),e.info(""),e.notice(" Run 'vis doctor' to see your project's full health status."),e.info("")},"runInteractiveInit"),H=u((o,s,t,i)=>{const a=k(s.name,{allowBuilds:{},enableDepsDev:!1,enableSocket:!1,minimumReleaseAge:v,staged:!1});if(w(i,a),e.success(`Created ${i}`),e.info(" Secure defaults are applied automatically by defineConfig()."),t.syncNative){for(const n of E(s.name,o,{}))e.success(` ${n}`);for(const n of A(s.name,o,v))e.success(` ${n}`)}e.info(""),e.notice("Run 'vis doctor' for a full health check, or 'vis init' in a terminal for guided setup.")},"runStaticInit"),R=u((o,s,t)=>{const i=d(o,".."),a=d(s,"node_modules","@visulima","vis","schemas",t),n=P(i,a),l=n===""?`./${t}`:n.split(/[/\\]/u).join("/");return l.startsWith(".")?l:`./${l}`},"buildSchemaRef"),V=u((o,s)=>{const t=R(d(o,"project.json"),s,"project.schema.json"),i=R(d(o,"vis.config.ts"),s,"vis-config.schema.json");e.info(""),e.info("Paste these into your config files to get editor IntelliSense:"),e.info(""),e.info(` project.json → "$schema": "${t}"`),e.info(` vis.config.ts → see ${i} (vis.config.ts is TypeScript; use the import path directly)`),e.info(""),e.notice("For nested project.json files, the `..` depth changes — run `vis migrate nx` to auto-rewrite all of them.")},"printSchemaPaths"),te=u(async({options:o,workspaceRoot:s})=>{const t=s??process.cwd();if(o.schema){V(t,t);return}const i=q(t),a=K(t);if(a&&!o.force){e.warn(`Config already exists: ${a}`),e.notice("Use --force to overwrite, or edit the existing file.");return}const n=a??d(t,"vis.config.ts");process.stdin.isTTY&&o.interactive!==!1?await z(t,i,n):H(t,i,o,n)},"execute");export{R as buildSchemaRefForTesting,te as default};
@@ -1,4 +1,4 @@
1
- var y=Object.defineProperty;var w=(r,e)=>y(r,"name",{value:e,configurable:!0});import{I as N,E as $,T as M,e as R}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{p as g}from"./bin.js";import{r as S,M as x,a as A,b,c as P,d as j,e as C,f as E,g as B,h as D}from"../packem_shared/s1ngularity-CIX7UcT5.js";import{g as O,a as V,r as F}from"../packem_shared/provenance-DoEp2uOo.js";import{r as I}from"../packem_shared/signatures-BHM7cnqB.js";var T=Object.defineProperty,p=w((r,e)=>T(r,"name",{value:e,configurable:!0}),"p");const k=new Set(["archivedRepo","author","downloads","expiredDomains","metadata","newBin","provenance","s1ngularity","signatures"]),U=p(r=>{const e=r.trim();if(e==="")return;if(e.startsWith("@")){const o=e.indexOf("@",1);return o===-1?{name:e,spec:void 0}:{name:e.slice(0,o),spec:e.slice(o+1)||void 0}}const i=e.indexOf("@");return i===-1?{name:e,spec:void 0}:{name:e.slice(0,i),spec:e.slice(i+1)||void 0}},"parsePackageArg"),L=p(r=>{if(r===void 0||r.trim()==="")return;const e=new Set;for(const i of r.split(",")){const o=i.trim();if(!k.has(o))throw new Error(`Unknown marshall in --only: ${o}. Known: ${[...k].sort().join(", ")}.`);e.add(o)}return e},"parseOnlyFlag"),l=p((r,e)=>r===void 0||r.has(e),"should"),J=p(r=>r?.has("signatures")??!1,"shouldRunSignatures"),Q=p(async({argument:r,options:e,workspaceRoot:i})=>{if(!r||r.length===0)throw new Error("No package specified. Usage: vis inspect <package>[@<spec>]");const o=U(r[0]);if(o===void 0)throw new Error(`Invalid package argument: "${String(r[0])}". Usage: vis inspect <package>[@<spec>]`);const t=L(e.only),u=await O(o.name,{workspaceRoot:i});if(u===void 0){g.error(`Package ${o.name} not found in the registry.`),process.exitCode=2;return}const h=V(u,o.spec);if(h===void 0){g.error(`Could not resolve ${o.name}@${o.spec??"latest"} to a published version.`),process.exitCode=2;return}const c=[{name:o.name,version:h}],n=new x;if(l(t,"author")){const s=await S(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"author",message:a.message,packageName:a.packageName,severity:a.severity})}if(l(t,"provenance")){const s=await F(c);for(const a of s)n.add({marshall:"provenance",message:`Prior version ${a.priorVersionWithProvenance} had provenance but ${a.version} does not.`,packageName:a.packageName,severity:"error"})}if(l(t,"s1ngularity")){const s=await A(c,{workspaceRoot:i});for(const a of s){const d=a.hookChanges.map(v=>`${v.hook} (${v.kind})`).join(", "),m=a.hookChanges.length===1;n.add({marshall:"s1ngularity",message:`${a.version} ${m?"has an":"has"} install-script ${m?"change":"changes"} [${d}] AND dropped the provenance attestation that ${a.priorVersion} carried — this is the s1ngularity compromised-publish shape.`,packageName:a.packageName,severity:"error"})}}if(l(t,"newBin")){const s=await b(c);for(const a of s){const d=a.newBins.map(m=>m.command).join(", ");n.add({marshall:"newBin",message:`${a.toVersion} adds new bin script${a.newBins.length===1?"":"s"}: ${d} (prior: ${a.fromVersion}).`,packageName:a.packageName,severity:"warning"})}}if(l(t,"metadata")){const s=await P(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"metadata",message:`Missing/invalid metadata: ${a.issues.join(", ")}.`,packageName:a.packageName,severity:"warning"})}if(l(t,"downloads")){const s=await j([o.name]);for(const a of s){const d=a.downloadsLastMonth===void 0?"unknown":String(a.downloadsLastMonth);n.add({marshall:"downloads",message:a.kind==="no-data"?"npm stats API returned no monthly download data.":`Only ${d} downloads in the past month.`,packageName:a.packageName,severity:a.severity})}}if(l(t,"expiredDomains")){const s=await C(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"expiredDomains",message:a.kind==="expired"?`Maintainer email domain ${a.domain} (${a.maintainer}) is unregistered — potential hijack risk.`:`Could not verify maintainer email domain ${a.domain} (${a.maintainer}).`,packageName:a.packageName,severity:a.severity})}if(J(t)){const s=await I(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"signatures",message:a.message,packageName:a.packageName,severity:a.severity})}if(l(t,"archivedRepo")){const s=await E(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"archivedRepo",message:a.kind==="archived"?`Source repo ${a.owner}/${a.repo} is archived${a.archivedAt===void 0?"":` (since ${a.archivedAt})`}.`:`Source repo ${a.owner}/${a.repo} returned 404 from GitHub.`,packageName:a.packageName,severity:"warning"})}const f=n.all();if(e.json===!0)process.stdout.write(`${JSON.stringify(B(f),void 0,2)}
1
+ var y=Object.defineProperty;var w=(r,e)=>y(r,"name",{value:e,configurable:!0});import{I as N,E as $,T as M,e as R}from"../packem_shared/Table-DoSoazT6-DwnyTUsA.js";import{p as g}from"./bin.js";import{r as S,M as x,a as A,b,c as P,d as j,e as C,f as E,g as B,h as D}from"../packem_shared/s1ngularity-Qxc6tRRI.js";import{g as O,a as V,r as F}from"../packem_shared/provenance-DkCA8BrN.js";import{r as I}from"../packem_shared/signatures-byuFrtAH.js";var T=Object.defineProperty,p=w((r,e)=>T(r,"name",{value:e,configurable:!0}),"p");const k=new Set(["archivedRepo","author","downloads","expiredDomains","metadata","newBin","provenance","s1ngularity","signatures"]),U=p(r=>{const e=r.trim();if(e==="")return;if(e.startsWith("@")){const o=e.indexOf("@",1);return o===-1?{name:e,spec:void 0}:{name:e.slice(0,o),spec:e.slice(o+1)||void 0}}const i=e.indexOf("@");return i===-1?{name:e,spec:void 0}:{name:e.slice(0,i),spec:e.slice(i+1)||void 0}},"parsePackageArg"),L=p(r=>{if(r===void 0||r.trim()==="")return;const e=new Set;for(const i of r.split(",")){const o=i.trim();if(!k.has(o))throw new Error(`Unknown marshall in --only: ${o}. Known: ${[...k].sort().join(", ")}.`);e.add(o)}return e},"parseOnlyFlag"),l=p((r,e)=>r===void 0||r.has(e),"should"),J=p(r=>r?.has("signatures")??!1,"shouldRunSignatures"),Q=p(async({argument:r,options:e,workspaceRoot:i})=>{if(!r||r.length===0)throw new Error("No package specified. Usage: vis inspect <package>[@<spec>]");const o=U(r[0]);if(o===void 0)throw new Error(`Invalid package argument: "${String(r[0])}". Usage: vis inspect <package>[@<spec>]`);const t=L(e.only),u=await O(o.name,{workspaceRoot:i});if(u===void 0){g.error(`Package ${o.name} not found in the registry.`),process.exitCode=2;return}const h=V(u,o.spec);if(h===void 0){g.error(`Could not resolve ${o.name}@${o.spec??"latest"} to a published version.`),process.exitCode=2;return}const c=[{name:o.name,version:h}],n=new x;if(l(t,"author")){const s=await S(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"author",message:a.message,packageName:a.packageName,severity:a.severity})}if(l(t,"provenance")){const s=await F(c);for(const a of s)n.add({marshall:"provenance",message:`Prior version ${a.priorVersionWithProvenance} had provenance but ${a.version} does not.`,packageName:a.packageName,severity:"error"})}if(l(t,"s1ngularity")){const s=await A(c,{workspaceRoot:i});for(const a of s){const d=a.hookChanges.map(v=>`${v.hook} (${v.kind})`).join(", "),m=a.hookChanges.length===1;n.add({marshall:"s1ngularity",message:`${a.version} ${m?"has an":"has"} install-script ${m?"change":"changes"} [${d}] AND dropped the provenance attestation that ${a.priorVersion} carried — this is the s1ngularity compromised-publish shape.`,packageName:a.packageName,severity:"error"})}}if(l(t,"newBin")){const s=await b(c);for(const a of s){const d=a.newBins.map(m=>m.command).join(", ");n.add({marshall:"newBin",message:`${a.toVersion} adds new bin script${a.newBins.length===1?"":"s"}: ${d} (prior: ${a.fromVersion}).`,packageName:a.packageName,severity:"warning"})}}if(l(t,"metadata")){const s=await P(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"metadata",message:`Missing/invalid metadata: ${a.issues.join(", ")}.`,packageName:a.packageName,severity:"warning"})}if(l(t,"downloads")){const s=await j([o.name]);for(const a of s){const d=a.downloadsLastMonth===void 0?"unknown":String(a.downloadsLastMonth);n.add({marshall:"downloads",message:a.kind==="no-data"?"npm stats API returned no monthly download data.":`Only ${d} downloads in the past month.`,packageName:a.packageName,severity:a.severity})}}if(l(t,"expiredDomains")){const s=await C(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"expiredDomains",message:a.kind==="expired"?`Maintainer email domain ${a.domain} (${a.maintainer}) is unregistered — potential hijack risk.`:`Could not verify maintainer email domain ${a.domain} (${a.maintainer}).`,packageName:a.packageName,severity:a.severity})}if(J(t)){const s=await I(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"signatures",message:a.message,packageName:a.packageName,severity:a.severity})}if(l(t,"archivedRepo")){const s=await E(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"archivedRepo",message:a.kind==="archived"?`Source repo ${a.owner}/${a.repo} is archived${a.archivedAt===void 0?"":` (since ${a.archivedAt})`}.`:`Source repo ${a.owner}/${a.repo} returned 404 from GitHub.`,packageName:a.packageName,severity:"warning"})}const f=n.all();if(e.json===!0)process.stdout.write(`${JSON.stringify(B(f),void 0,2)}
2
2
  `);else{const s=`${o.name}@${h}`;if(f.length===0)g.info(`${N("✓")} ${s} — no findings.`);else{g.info(`${$("Inspecting")} ${s}`);for(const m of D(f))process.stdout.write(`${m}
3
3
  `);const a=n.errors().length,d=n.warnings().length;process.stdout.write(`
4
4
  ${$("Summary:")} ${M(`${String(a)} error${a===1?"":"s"}`)}, ${R(`${String(d)} warning${d===1?"":"s"}`)}.