@visulima/vis 1.0.0 → 1.0.2

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 (137) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/LICENSE.md +1 -1
  3. package/dashboard/dist/index.html +10 -10
  4. package/dist/bin.js +1 -1
  5. package/dist/binx.js +1 -1
  6. package/dist/packem_chunks/CONFIG_FILES.js +1 -1
  7. package/dist/packem_chunks/bloom-sync.js +1 -1
  8. package/dist/packem_chunks/catalog.js +1 -1
  9. package/dist/packem_chunks/cli-exec.js +1 -1
  10. package/dist/packem_chunks/cli-main.js +2 -2
  11. package/dist/packem_chunks/dispatch.js +1 -1
  12. package/dist/packem_chunks/fix.js +1 -1
  13. package/dist/packem_chunks/group-tags.js +1 -1
  14. package/dist/packem_chunks/handler.js +1 -1
  15. package/dist/packem_chunks/handler10.js +1 -1
  16. package/dist/packem_chunks/handler11.js +1 -1
  17. package/dist/packem_chunks/handler12.js +1 -1
  18. package/dist/packem_chunks/handler13.js +1 -1
  19. package/dist/packem_chunks/handler14.js +1 -1
  20. package/dist/packem_chunks/handler15.js +1 -1
  21. package/dist/packem_chunks/handler16.js +1 -1
  22. package/dist/packem_chunks/handler17.js +1 -1
  23. package/dist/packem_chunks/handler18.js +1 -1
  24. package/dist/packem_chunks/handler19.js +1 -1
  25. package/dist/packem_chunks/handler2.js +1 -1
  26. package/dist/packem_chunks/handler20.js +1 -1
  27. package/dist/packem_chunks/handler21.js +1 -1
  28. package/dist/packem_chunks/handler22.js +1 -1
  29. package/dist/packem_chunks/handler23.js +1 -1
  30. package/dist/packem_chunks/handler24.js +1 -1
  31. package/dist/packem_chunks/handler26.js +1 -1
  32. package/dist/packem_chunks/handler27.js +1 -1
  33. package/dist/packem_chunks/handler28.js +1 -1
  34. package/dist/packem_chunks/handler29.js +1 -1
  35. package/dist/packem_chunks/handler3.js +1 -1
  36. package/dist/packem_chunks/handler30.js +1 -1
  37. package/dist/packem_chunks/handler4.js +1 -1
  38. package/dist/packem_chunks/handler5.js +1 -1
  39. package/dist/packem_chunks/handler50.js +1 -1
  40. package/dist/packem_chunks/handler51.js +1 -1
  41. package/dist/packem_chunks/handler53.js +1 -1
  42. package/dist/packem_chunks/handler54.js +1 -1
  43. package/dist/packem_chunks/handler55.js +1 -1
  44. package/dist/packem_chunks/handler58.js +1 -1
  45. package/dist/packem_chunks/handler59.js +1 -1
  46. package/dist/packem_chunks/handler6.js +1 -1
  47. package/dist/packem_chunks/handler60.js +1 -1
  48. package/dist/packem_chunks/handler61.js +1 -1
  49. package/dist/packem_chunks/handler62.js +1 -1
  50. package/dist/packem_chunks/handler63.js +1 -1
  51. package/dist/packem_chunks/handler64.js +1 -1
  52. package/dist/packem_chunks/handler65.js +6 -6
  53. package/dist/packem_chunks/handler66.js +1 -1
  54. package/dist/packem_chunks/handler67.js +1 -1
  55. package/dist/packem_chunks/handler68.js +1 -1
  56. package/dist/packem_chunks/handler69.js +1 -1
  57. package/dist/packem_chunks/handler7.js +1 -1
  58. package/dist/packem_chunks/handler70.js +1 -1
  59. package/dist/packem_chunks/handler71.js +1 -1
  60. package/dist/packem_chunks/handler72.js +41 -41
  61. package/dist/packem_chunks/handler73.js +2 -2
  62. package/dist/packem_chunks/handler74.js +1 -1
  63. package/dist/packem_chunks/handler75.js +1 -1
  64. package/dist/packem_chunks/handler76.js +1 -1
  65. package/dist/packem_chunks/handler77.js +1 -1
  66. package/dist/packem_chunks/handler78.js +1 -1
  67. package/dist/packem_chunks/handler8.js +1 -1
  68. package/dist/packem_chunks/handler9.js +1 -1
  69. package/dist/packem_chunks/heal-accept.js +1 -1
  70. package/dist/packem_chunks/heal.js +1 -1
  71. package/dist/packem_chunks/help-command.js +1 -1
  72. package/dist/packem_chunks/index3.js +1 -1
  73. package/dist/packem_chunks/index4.js +46 -46
  74. package/dist/packem_chunks/index5.js +22 -23
  75. package/dist/packem_chunks/keys-refresh.js +1 -1
  76. package/dist/packem_chunks/lean.js +1 -1
  77. package/dist/packem_chunks/list.js +1 -1
  78. package/dist/packem_chunks/loader.js +1 -1
  79. package/dist/packem_chunks/orchestrator.js +1 -1
  80. package/dist/packem_chunks/sync.js +1 -1
  81. package/dist/packem_chunks/sync2.js +1 -1
  82. package/dist/packem_chunks/tripwire.js +1 -1
  83. package/dist/packem_chunks/ts-loader.js +1 -1
  84. package/dist/packem_chunks/verify-lockfile.js +1 -1
  85. package/dist/packem_chunks/version-resolver.js +1 -1
  86. package/dist/packem_shared/{Table-CcVkyULl-DLWu6XHL.js → Table-BGIHvenQ-D2oJtNQj.js} +1 -1
  87. package/dist/packem_shared/{affected-shas-CCxG4tvm.js → affected-shas-BfO3PDJq.js} +1 -1
  88. package/dist/packem_shared/ai-analysis-CO7No4rt.js +68 -0
  89. package/dist/packem_shared/{ai-fix-CeGzAT9m.js → ai-fix-B4u2zlVG.js} +1 -1
  90. package/dist/packem_shared/{augment-DaSS2Lgs.js → augment-8z86AwtF.js} +1 -1
  91. package/dist/packem_shared/{bin-BlGVEhl8.js → bin-Cv8vsMEo.js} +1 -1
  92. package/dist/packem_shared/{build-scripts-q__dKE2y.js → build-scripts-D477Ou-x.js} +1 -1
  93. package/dist/packem_shared/{command-runtime-3FTGuUsK.js → command-runtime-EWjmSxPj.js} +1 -1
  94. package/dist/packem_shared/{cyclonedx-CmrYQ0vx.js → cyclonedx-CDWHbD9s.js} +1 -1
  95. package/dist/packem_shared/{dependency-scan-DpOFiZuI.js → dependency-scan-P52jY0pU.js} +1 -1
  96. package/dist/packem_shared/{docker-BYqiD711.js → docker-CD7o1D1o.js} +1 -1
  97. package/dist/packem_shared/{env-DdQRnEIy.js → env-Cpxa_7UE.js} +1 -1
  98. package/dist/packem_shared/{failure-log-CKMhqLWr.js → failure-log-MOhz-TBv.js} +1 -1
  99. package/dist/packem_shared/glob-DMbPwGSj-uzODoE-1.js +1 -0
  100. package/dist/packem_shared/index-BAUIIRZJ.js +1 -0
  101. package/dist/packem_shared/index-BVuCxe14.js +22 -0
  102. package/dist/packem_shared/{index-jJNulo5i.js → index-CTRMi3jL.js} +1 -1
  103. package/dist/packem_shared/{index-Cg71MisW.js → index-CdTXvj-V.js} +1 -1
  104. package/dist/packem_shared/{lifecycle-aDTZ8dW1.js → lifecycle-hzwghh5a.js} +1 -1
  105. package/dist/packem_shared/{lockfile-C1qCKGH6.js → lockfile-CWcVTdRc.js} +1 -1
  106. package/dist/packem_shared/{manifests-DSBr3-dw.js → manifests-CaPqgQxW.js} +1 -1
  107. package/dist/packem_shared/{min-release-age-C71MO72F.js → min-release-age-skpcnlpk.js} +1 -1
  108. package/dist/packem_shared/{missing-package-json-CTF71tE5.js → missing-package-json-_hOp4AW5.js} +1 -1
  109. package/dist/packem_shared/{native-config-sync-D-z2Uwqu.js → native-config-sync-CFi1iQNG.js} +1 -1
  110. package/dist/packem_shared/{packument-aGzYwXKn.js → packument-CYxvm590.js} +1 -1
  111. package/dist/packem_shared/{pm-runner-CQcraCcu.js → pm-runner-mVFjedM6.js} +1 -1
  112. package/dist/packem_shared/{provenance-S7y0BRAt.js → provenance-CI_WQx7G.js} +1 -1
  113. package/dist/packem_shared/{readJsonSync-DuMMeB3s-ihoybKvs.js → readJsonSync-DuMMeB3s-Cx08VBQg.js} +1 -1
  114. package/dist/packem_shared/{registry-keys-CRnXATt2.js → registry-keys-AGlSEY6R.js} +1 -1
  115. package/dist/packem_shared/{resolve-explicit-CJGazevw.js → resolve-explicit-DVE9cfkm.js} +1 -1
  116. package/dist/packem_shared/{resolve-runtime-QRaQucfL.js → resolve-runtime-CGHf-wHz.js} +1 -1
  117. package/dist/packem_shared/{run-file-DD7Ne23Z.js → run-file-Bs_E9O6O.js} +1 -1
  118. package/dist/packem_shared/{runtime-check-qnrPTlma.js → runtime-check-pS2XH4BO.js} +1 -1
  119. package/dist/packem_shared/{s1ngularity-BLj4Jy8z.js → s1ngularity-xmrq5T5r.js} +1 -1
  120. package/dist/packem_shared/{scan-progress-BDcl7Kty.js → scan-progress-DQ4TMXcb.js} +1 -1
  121. package/dist/packem_shared/{selectors-D4iCvITE.js → selectors-CRgS4bU9.js} +1 -1
  122. package/dist/packem_shared/{signatures-DoNG2hEr.js → signatures-Dp3th1DB.js} +1 -1
  123. package/dist/packem_shared/{target-options-CR0OuYJr.js → target-options-TM6ETDAS.js} +1 -1
  124. package/dist/packem_shared/{toolchain-Zb3VzZb4.js → toolchain-B5KwUZfq.js} +1 -1
  125. package/dist/packem_shared/{typosquats-C12CP_2G.js → typosquats-C0layQsP.js} +1 -1
  126. package/dist/packem_shared/{use-measured-height-CjS7Tks7.js → use-measured-height-Drobr4fe.js} +1 -1
  127. package/dist/packem_shared/{verify-DStfg3nb.js → verify-Cjo4EBFZ.js} +1 -1
  128. package/dist/packem_shared/{vis-update-app-BlocL713.js → vis-update-app-qIkyvrd1.js} +1 -1
  129. package/dist/packem_shared/{watch-BXNI7dC6.js → watch-BnE1TzYn.js} +1 -1
  130. package/dist/packem_shared/{watch-loop-BZudYfcl.js → watch-loop-Irf3Pm-1.js} +1 -1
  131. package/dist/runtime/preload.js +1 -1
  132. package/index.js +654 -570
  133. package/package.json +37 -37
  134. package/dist/packem_shared/ai-analysis-BpVdn20h.js +0 -68
  135. package/dist/packem_shared/glob-fqg4KepW-1S3z30c8.js +0 -1
  136. package/dist/packem_shared/index-CE6MsgcV.js +0 -22
  137. package/dist/packem_shared/index-Cg0IHaFI.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/vis",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "A monorepo dev toolkit — task runner, remote caching, security scanning, git hooks, and AI agent integrations — powered by @visulima/task-runner",
5
5
  "keywords": [
6
6
  "build",
@@ -14,6 +14,11 @@
14
14
  ],
15
15
  "homepage": "https://visulima.com/packages/vis",
16
16
  "bugs": "https://github.com/visulima/visulima/issues",
17
+ "license": "MIT",
18
+ "author": {
19
+ "name": "Daniel Bannert",
20
+ "email": "d.bannert@anolilab.de"
21
+ },
17
22
  "repository": {
18
23
  "type": "git",
19
24
  "url": "git+https://github.com/visulima/visulima.git",
@@ -29,13 +34,27 @@
29
34
  "url": "https://anolilab.com/support"
30
35
  }
31
36
  ],
32
- "license": "MIT",
33
- "author": {
34
- "name": "Daniel Bannert",
35
- "email": "d.bannert@anolilab.de"
37
+ "bin": {
38
+ "v": "./bin/vis.mjs",
39
+ "vis": "./bin/vis.mjs",
40
+ "visx": "./dist/binx.js",
41
+ "vx": "./dist/binx.js"
36
42
  },
37
- "sideEffects": false,
43
+ "files": [
44
+ "dist/**",
45
+ "bin/**",
46
+ "dashboard/dist/**",
47
+ "schemas/**",
48
+ "skills/**",
49
+ "templates/**",
50
+ "index.js",
51
+ "index.d.ts",
52
+ "README.md",
53
+ "CHANGELOG.md",
54
+ "LICENSE.md"
55
+ ],
38
56
  "type": "module",
57
+ "sideEffects": false,
39
58
  "imports": {
40
59
  "#native": {
41
60
  "types": "./index.d.ts",
@@ -95,32 +114,17 @@
95
114
  "./schemas/vis-release-config.schema.json": "./schemas/vis-release-config.schema.json",
96
115
  "./package.json": "./package.json"
97
116
  },
98
- "bin": {
99
- "v": "./bin/vis.mjs",
100
- "vis": "./bin/vis.mjs",
101
- "visx": "./dist/binx.js",
102
- "vx": "./dist/binx.js"
117
+ "publishConfig": {
118
+ "access": "public",
119
+ "provenance": true
103
120
  },
104
- "files": [
105
- "dist/**",
106
- "bin/**",
107
- "dashboard/dist/**",
108
- "schemas/**",
109
- "skills/**",
110
- "templates/**",
111
- "index.js",
112
- "index.d.ts",
113
- "README.md",
114
- "CHANGELOG.md",
115
- "LICENSE.md"
116
- ],
117
121
  "dependencies": {
118
122
  "@visulima/error": "6.0.0",
119
123
  "@visulima/secret-scanner": "1.0.0",
120
124
  "@visulima/source-map": "3.0.0",
121
125
  "@visulima/tabular": "4.0.0",
122
126
  "@visulima/task-runner": "1.0.0",
123
- "@visulima/tui": "1.0.0",
127
+ "@visulima/tui": "1.0.2",
124
128
  "module-replacements": "^2.11.0",
125
129
  "module-replacements-codemods": "^2.0.1",
126
130
  "react": "19.2.7",
@@ -147,20 +151,16 @@
147
151
  }
148
152
  },
149
153
  "optionalDependencies": {
150
- "@visulima/vis-binding-darwin-arm64": "1.0.0",
151
- "@visulima/vis-binding-linux-x64-gnu": "1.0.0",
152
- "@visulima/vis-binding-linux-arm64-musl": "1.0.0",
153
- "@visulima/vis-binding-darwin-x64": "1.0.0",
154
- "@visulima/vis-binding-linux-arm64-gnu": "1.0.0",
155
- "@visulima/vis-binding-linux-x64-musl": "1.0.0",
156
- "@visulima/vis-binding-win32-x64-msvc": "1.0.0",
157
- "@visulima/vis-binding-win32-arm64-msvc": "1.0.0"
154
+ "@visulima/vis-binding-darwin-arm64": "1.0.2",
155
+ "@visulima/vis-binding-darwin-x64": "1.0.2",
156
+ "@visulima/vis-binding-linux-arm64-gnu": "1.0.2",
157
+ "@visulima/vis-binding-linux-arm64-musl": "1.0.2",
158
+ "@visulima/vis-binding-linux-x64-gnu": "1.0.2",
159
+ "@visulima/vis-binding-linux-x64-musl": "1.0.2",
160
+ "@visulima/vis-binding-win32-arm64-msvc": "1.0.2",
161
+ "@visulima/vis-binding-win32-x64-msvc": "1.0.2"
158
162
  },
159
163
  "engines": {
160
164
  "node": "^22.14.0 || >=24.10.0"
161
- },
162
- "publishConfig": {
163
- "access": "public",
164
- "provenance": true
165
165
  }
166
166
  }
@@ -1,68 +0,0 @@
1
- import{createRequire as J}from"node:module";import{h as ee,d as h,n as te,i as k,E as ae}from"../packem_chunks/catalog.js";import"./env-DdQRnEIy.js";import{W as re,X as ne,Z as se,a0 as oe}from"../packem_chunks/cli-main.js";const X=J(import.meta.url),A=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,M=e=>{if(typeof A<"u"&&A.versions&&A.versions.node){const[a,t]=A.versions.node.split(".").map(Number);if(a>22||a===22&&t>=3||a===20&&t>=16)return A.getBuiltinModule(e)}return X(e)},{spawn:z,execFileSync:D,execFile:Y}=M("node:child_process"),{existsSync:R}=M("node:fs"),{platform:Z,homedir:j}=M("node:os"),{join:f}=M("node:path"),{promisify:Q}=M("node:util"),ie=/v?(\d+\.\d+\.\d+(?:-[\w.]+)?)/,de=5e3,ce=1e4,le=3e5,ue=4096,E=Z()==="win32",q=["amp","claude","codex","copilot","crush","cursor","droid","gemini","kimi","opencode","qwen"],pe={alternateCommands:[],buildArgs:(e,{dangerous:a})=>{const t=["-x",e];return a&&t.push("--dangerously-allow-all"),t},command:"amp",defaultModel:"",displayName:"Amp",envVariable:"AMP_PATH",sessionMarkers:[{confidence:"definite",equals:"amp",variable:"AGENT"}],supportsMaxTokens:!1,supportsModel:!1},me={alternateCommands:[],buildArgs:(e,{dangerous:a,model:t})=>{const r=[];return a&&r.push("--dangerously-skip-permissions"),t&&r.push("--model",t),r.push("--output-format","text","-p",e),r},command:"claude",defaultModel:"",displayName:"Claude Code",envVariable:"CLAUDE_PATH",sessionMarkers:[{confidence:"definite",variable:"CLAUDECODE"},{confidence:"definite",variable:"CLAUDE_CODE"}],supportsMaxTokens:!1,supportsModel:!0},ge={alternateCommands:["openai-codex"],buildArgs:(e,{dangerous:a,model:t})=>{const r=["exec"];return t&&r.push("--model",t),a&&r.push("--dangerously-bypass-approvals-and-sandbox"),r.push(e),r},command:"codex",defaultModel:"",displayName:"Codex",envVariable:"CODEX_PATH",sessionMarkers:[{confidence:"definite",variable:"CODEX_SANDBOX"},{confidence:"definite",variable:"CODEX_THREAD_ID"},{confidence:"definite",variable:"CODEX_CI"}],supportsMaxTokens:!1,supportsModel:!0},fe={alternateCommands:[],buildArgs:(e,{dangerous:a,model:t})=>{const r=["-p",e];return a&&r.push("--allow-all-tools"),t&&r.push("--model",t),r},command:"copilot",defaultModel:"",displayName:"GitHub Copilot CLI",envVariable:"COPILOT_PATH",sessionMarkers:[{confidence:"definite",variable:"COPILOT_MODEL"},{confidence:"definite",variable:"COPILOT_ALLOW_ALL"},{confidence:"definite",variable:"COPILOT_GITHUB_TOKEN"}],supportsMaxTokens:!1,supportsModel:!0},he={alternateCommands:[],buildArgs:(e,{dangerous:a,model:t})=>{const r=["run"];return a&&r.push("--yolo"),t&&r.push("-m",t),r.push(e),r},command:"crush",defaultModel:"",displayName:"Crush",envVariable:"CRUSH_PATH",sessionMarkers:[],supportsMaxTokens:!1,supportsModel:!0},ve={alternateCommands:["cursor"],buildArgs:(e,{dangerous:a,model:t})=>{const r=["-p"];return a&&r.push("--force"),r.push("--output-format","text"),t&&r.push("--model",t),r.push(e),r},command:"agent",defaultModel:"",displayName:"Cursor Agent",envVariable:"CURSOR_PATH",sessionMarkers:[{confidence:"definite",variable:"CURSOR_AGENT"},{agent:"Cursor editor",confidence:"ambient",variable:"CURSOR_TRACE_ID"}],supportsMaxTokens:!1,supportsModel:!0},ye={alternateCommands:[],buildArgs:(e,{dangerous:a,model:t})=>{const r=[e];return a&&r.push("--skip-permissions-unsafe"),r.push("-o","text"),t&&r.push("-m",t),r},command:"droid",defaultModel:"",displayName:"Droid",envVariable:"DROID_PATH",sessionMarkers:[],supportsMaxTokens:!1,supportsModel:!0},be={alternateCommands:["gemini-cli"],buildArgs:(e,{dangerous:a,maxTokens:t,model:r})=>{const n=[];return a||n.push("--sandbox"),r&&n.push("--model",r),n.push("--max-output-tokens",String(t),"-p",e),n},command:"gemini",defaultModel:"gemini-2.5-pro",displayName:"Gemini CLI",envVariable:"GEMINI_PATH",sessionMarkers:[{confidence:"definite",variable:"GEMINI_CLI"}],supportsMaxTokens:!0,supportsModel:!0},ke={alternateCommands:[],buildArgs:(e,{model:a})=>{const t=["--quiet","-p",e];return a&&t.push("-m",a),t},command:"kimi",defaultModel:"",displayName:"Kimi CLI",envVariable:"KIMI_PATH",sessionMarkers:[],supportsMaxTokens:!1,supportsModel:!0},we={alternateCommands:[],buildArgs:(e,{model:a})=>{const t=["run",e];return a&&t.push("-m",a),t},command:"opencode",defaultModel:"",displayName:"opencode",envVariable:"OPENCODE_PATH",sessionMarkers:[{confidence:"definite",variable:"OPENCODE_CLIENT"}],supportsMaxTokens:!1,supportsModel:!0},Ae={alternateCommands:["qwen-code"],buildArgs:(e,{dangerous:a,model:t})=>{const r=["-p",e];return a&&r.push("--yolo"),r.push("-o","text"),t&&r.push("-m",t),r},command:"qwen",defaultModel:"",displayName:"Qwen Code",envVariable:"QWEN_PATH",sessionMarkers:[],supportsMaxTokens:!1,supportsModel:!0},S={amp:pe,claude:me,codex:ge,copilot:fe,crush:he,cursor:ve,droid:ye,gemini:be,kimi:ke,opencode:we,qwen:Ae};class w extends Error{exitCode;durationMs;provider;stderr;stdout;timedOut;aborted;constructor(a,t){super(a),this.name="AiRunError",this.provider=t.provider,this.exitCode=t.exitCode??null,this.durationMs=t.durationMs,this.stdout=t.stdout??"",this.stderr=t.stderr??"",this.timedOut=t.timedOut??!1,this.aborted=t.aborted??!1}}const Me=[{agent:"Cline",confidence:"definite",variable:"CLINE_ACTIVE"},{agent:"Aider",confidence:"definite",equals:"Aider",variable:"OR_APP_NAME"},{agent:"Antigravity",confidence:"definite",variable:"ANTIGRAVITY_AGENT"},{agent:"Augment",confidence:"definite",variable:"AUGMENT_AGENT"},{agent:"Replit Agent",confidence:"definite",variable:"REPLIT_CLI"},{agent:"Replit workspace",confidence:"ambient",variable:"REPL_ID"}],Ce=(e,a)=>a.sessionMarkers.map(t=>({agent:t.agent??a.displayName,confidence:t.confidence,equals:t.equals,provider:e,variable:t.variable}));[...Object.keys(S).flatMap(e=>Ce(e,S[e])),...Me].toSorted((e,a)=>e.confidence===a.confidence?0:e.confidence==="definite"?-1:1);Q(Y);const Te=/\.(?:bat|cmd)$/i,V=e=>E&&Te.test(e),O=e=>`"${e.replaceAll('"','""')}"`,L=e=>e==="~"||e.startsWith("~/")||E&&e.startsWith("~\\")?f(j(),e.slice(2)):e,Se=e=>{try{const a=D(E?"where":"which",[e],{encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:de}).trim().split(`
2
- `)[0]?.trim();return a&&a.length>0?a:void 0}catch{return}},Ee=e=>{const a=j();if(E){const t=process.env.APPDATA??"",r=process.env.LOCALAPPDATA??"",n=process.env.ProgramFiles??"";return[f(t,"npm",`${e}.cmd`),f(t,"npm",e),f(r,"Programs",e,`${e}.exe`),f(n,e,`${e}.exe`),f(a,".npm-global","bin",`${e}.cmd`)]}return[`/opt/homebrew/bin/${e}`,`/usr/local/bin/${e}`,f(a,".npm-global","bin",e),f(a,".local","bin",e),f(a,".cargo","bin",e)]},$e=e=>{try{const a=D(e,["--version"],{encoding:"utf8",shell:V(e),stdio:["pipe","pipe","pipe"],timeout:ce}),t=ie.exec(a);return t?t[1]:void 0}catch{return}},F=(e,a={})=>{const t=S[e],r={available:!1,name:e},n=a.version!==!1,s=i=>{if(n)return $e(i)},o=process.env[t.envVariable];if(o&&R(L(o))){const i=L(o);return{...r,available:!0,detectionMethod:"envvar",path:i,version:s(i)}}const c=[t.command,...t.alternateCommands];for(const i of c){const d=Se(i);if(d)return{...r,available:!0,detectionMethod:"which",path:d,version:s(d)}}for(const i of c)for(const d of Ee(i))if(R(d))return{...r,available:!0,detectionMethod:"known-path",path:d,version:s(d)};return r},xe=(e={})=>q.map(a=>F(a,e)),Ie=(e={})=>xe(e).filter(a=>a.available),_e=(e,a,t={})=>{const r=S[e],n=t.model??r.defaultModel,s=t.maxTokens!==void 0&&Number.isFinite(t.maxTokens)?t.maxTokens:ue;return r.buildArgs(a,{dangerous:t.dangerous===!0,maxTokens:s,model:n})},Ne=async(e,a,t={})=>{if(!e.available||!e.path)throw new w(`AI provider "${e.name}" is not available.`,{durationMs:0,provider:e.name});const r=_e(e.name,a,t),n=t.timeoutMs!==void 0&&Number.isFinite(t.timeoutMs)?t.timeoutMs:le,s=e.path,o=V(s),c=Date.now();if(t.signal?.aborted)throw new w(`${e.name} CLI run was aborted.`,{aborted:!0,durationMs:0,provider:e.name});return new Promise((i,d)=>{const m={cwd:t.cwd,env:{...process.env,...t.env,FORCE_COLOR:"0",NO_COLOR:"1"},shell:o,stdio:["pipe","pipe","pipe"]},u=o?r.map(l=>O(l)):r,g=z(o?O(s):s,u,m);g.stdin?.end();let v="",y="",b=!1,I,_,C;const $=()=>{clearTimeout(_),clearTimeout(I),C&&t.signal?.removeEventListener("abort",C)},W=()=>{g.kill("SIGKILL")},N=l=>{if(b)return;b=!0,g.kill("SIGTERM"),I=setTimeout(W,5e3),$();const p=Date.now()-c,K=l?new w(`${e.name} CLI run was aborted.`,{aborted:!0,durationMs:p,provider:e.name,stderr:y,stdout:v}):new w(`${e.name} CLI timed out after ${String(n)}ms`,{durationMs:p,provider:e.name,stderr:y,stdout:v,timedOut:!0});d(K)};_=setTimeout(N,n,!1),C=()=>{N(!0)},t.signal?.addEventListener("abort",C,{once:!0}),g.stdout?.on("data",l=>{const p=l.toString("utf8");v+=p,t.onStdout?.(p)}),g.stderr?.on("data",l=>{const p=l.toString("utf8");y+=p,t.onStderr?.(p)}),g.on("close",l=>{if(b)return;b=!0,$();const p=Date.now()-c;l===0?i({durationMs:p,exitCode:l,provider:e.name,stderr:y,stdout:v}):d(new w(`${e.name} CLI exited with code ${String(l)}: ${y||v}`,{durationMs:p,exitCode:l,provider:e.name,stderr:y,stdout:v}))}),g.on("error",l=>{b||(b=!0,$(),d(new w(`Failed to spawn ${e.name} CLI: ${l.message}`,{durationMs:Date.now()-c,provider:e.name,stderr:y,stdout:v})))})})},Re=12e4,Oe=2,Le=1e3,Pe=e=>new Promise(a=>{setTimeout(a,e)}),G=async(e,a,t=Oe)=>{let r;for(let n=0;n<=t;n+=1)try{return(await Ne(e,a,{timeoutMs:Re})).stdout}catch(s){if(r=s instanceof Error?s:new Error(String(s)),r.message.includes("timed out"))throw r;if(n<t){const o=Le*2**n;await Pe(o)}}throw r??new Error("AI request failed after retries")},De={amp:30,claude:80,codex:60,copilot:50,crush:35,cursor:40,droid:20,gemini:100,kimi:25,opencode:35,qwen:30},je=e=>{if(e?.provider){if(!q.includes(e.provider))return;const r=F(e.provider);return r.available?r:void 0}const a=Ie();if(a.length===0)return;const t={...De,...e?.priority};return a.toSorted((r,n)=>(t[n.name]??0)-(t[r.name]??0))[0]},qe=new Set(["defer","review","skip","update"]),Ve=new Set(["critical","high","low","medium"]),Fe=new Set(["high","low","medium"]),Ge=50,x=30,He=e=>e.map(a=>{const t=a.vulnerabilities&&a.vulnerabilities.length>0?` [VULNERABILITIES: ${a.vulnerabilities.map(n=>`${n.severity} ${n.id}`).join(", ")}]`:"";let r="";if(a.socketReport){const n=Math.round(a.socketReport.score.overall*100),s=[`score:${String(n)}%`];if(a.socketReport.alerts.length>0){const o={};for(const i of a.socketReport.alerts)o[i.severity]=(o[i.severity]??0)+1;const c=Object.entries(o).map(([i,d])=>`${String(d)} ${i}`).join(", ");s.push(`alerts: ${c}`)}s.push(`supply-chain:${String(Math.round(a.socketReport.score.supplyChain*100))}%`),s.push(`quality:${String(Math.round(a.socketReport.score.quality*100))}%`),r=` [SOCKET.DEV: ${s.join(", ")}]`}return`- ${a.packageName}: ${a.currentRange} → ${a.newRange} (${a.updateType})${t}${r}`}).join(`
3
- `),T=`Respond ONLY with valid JSON in this exact structure:
4
- {
5
- "summary": "Brief overall summary",
6
- "recommendations": [
7
- {
8
- "package": "package-name",
9
- "action": "update|skip|review|defer",
10
- "reason": "explanation",
11
- "riskLevel": "low|medium|high|critical",
12
- "breakingChanges": ["change1"],
13
- "effort": "low|medium|high"
14
- }
15
- ],
16
- "warnings": ["warning1"]
17
- }`,Ue={compatibility:e=>`Analyze the compatibility of these package updates:
18
-
19
- ${e}
20
-
21
- For each package:
22
- 1. Check peer dependency compatibility
23
- 2. Identify potential conflicts with other packages in the list
24
- 3. Assess API compatibility between current and target versions
25
- 4. Check for deprecated features being removed
26
- 5. Evaluate Node.js version requirements
27
-
28
- ${T}`,impact:e=>`Analyze the impact of updating these npm packages:
29
-
30
- ${e}
31
-
32
- For each package, provide:
33
- 1. Risk level (low/medium/high/critical)
34
- 2. Recommended action (update/skip/review/defer)
35
- 3. Reason for recommendation
36
- 4. Known breaking changes (if any)
37
- 5. Estimated migration effort (low/medium/high)
38
-
39
- ${T}`,recommend:e=>`Provide smart recommendations for updating these packages:
40
-
41
- ${e}
42
-
43
- Consider:
44
- 1. Update priority based on security, features, and stability
45
- 2. Grouping related packages for atomic updates
46
- 3. Best practices for the specific package ecosystem
47
- 4. Risk vs. benefit analysis
48
- 5. Suggested update order
49
- 6. If Socket.dev scores are provided, prioritize packages with low supply chain or quality scores
50
-
51
- ${T}`,security:e=>`Analyze the security implications of these package updates:
52
-
53
- ${e}
54
-
55
- For each package:
56
- 1. Check if the update fixes known vulnerabilities (use the vulnerability data above)
57
- 2. Assess if the new version introduces security risks
58
- 3. Evaluate if this is a security-sensitive package (auth, crypto, session, etc.)
59
- 4. Recommend urgency of the update based on vulnerability severity
60
- 5. Flag any packages where skipping the update poses security risk
61
- 6. If Socket.dev scores are provided, factor in supply chain and quality scores — low scores indicate higher risk
62
-
63
- ${T}`},Be=new Set(["compatibility","impact","recommend","security"]),nt=e=>Be.has(e)?e:"impact",H=(e,a="impact")=>{const t=He(e);return Ue[a](t)},We=/```(?:json)?\s*([\s\S]*?)```/,Ke=/\{[\s\S]*\}/,Je=e=>{try{return JSON.parse(e)}catch{}const a=We.exec(e);if(a?.[1])try{return JSON.parse(a[1])}catch{}const t=Ke.exec(e);if(t?.[0])try{return JSON.parse(t[0])}catch{}},Xe=e=>({action:qe.has(e.action)?e.action:"review",breakingChanges:Array.isArray(e.breakingChanges)?e.breakingChanges:[],effort:Fe.has(e.effort)?e.effort:"medium",package:typeof e.package=="string"?e.package:"",reason:typeof e.reason=="string"?e.reason:"",riskLevel:Ve.has(e.riskLevel)?e.riskLevel:"medium"}),U=(e,a,t)=>{const r=Je(e);if(!r||typeof r!="object")return{analysisType:t,provider:a,recommendations:[],summary:"Failed to parse AI response.",warnings:["AI response was not valid JSON."]};const n=r,s=Array.isArray(n.recommendations)?n.recommendations:[];return{analysisType:t,provider:a,recommendations:s.map(o=>Xe(o)),summary:typeof n.summary=="string"?n.summary:"",warnings:Array.isArray(n.warnings)?n.warnings:[]}},ze={eslint:["ESLint 9.0: Flat config required","ESLint 8.0+: New rule formats"],next:["Next.js 13+: App router changes","Next.js 14+: Server components default"],react:["React 17 to 18: Concurrent features","React 18+: Strict mode changes"],typescript:["TypeScript 5.0: New decorators","TypeScript 4.7+: ESM changes"],vite:["Vite 5: Node.js 18+ required"],vue:["Vue 3: Composition API","Vue 3: Breaking template changes"],webpack:["Webpack 5: Node.js polyfills removed"]},Ye=new Set(["bcrypt","cors","crypto-js","express-session","helmet","jose","jsonwebtoken","node-forge","oauth","passport"]),P=(e,a)=>{const t=e.map(r=>{const n=r.vulnerabilities&&r.vulnerabilities.length>0,s=Ye.has(r.packageName),o=ze[r.packageName]??[];let c="low",i="update",d="low",m="Patch/minor update, safe to apply.";return r.updateType==="major"?(c="high",i=o.length>0?"review":"update",d="medium",m=o.length>0?`Major update with known breaking changes: ${o[0]}`:"Major version update, review changelog before applying."):r.updateType==="minor"&&(c="medium",m="Minor update, generally safe."),n&&(c="high",i="update",m="Security update — current version has known vulnerabilities."),s&&r.updateType==="major"&&(i="review",m="Security-sensitive package with major update, careful review needed.",d="high"),{action:i,breakingChanges:o,effort:d,package:r.packageName,reason:m,riskLevel:c}});return{analysisType:a,provider:"rule-engine",recommendations:t,summary:`Rule-based ${a} analysis for ${String(e.length)} packages.`,warnings:["No AI provider available — using built-in rule engine."]}},Ze=async(e,a,t)=>{const r=H(a,t),n=await G(e,r);return U(n,e.name,t)},Qe=(e,a,t)=>{const r=[],n=[],s=[];for(const o of e)r.push(...o.recommendations),n.push(...o.warnings),o.summary&&s.push(o.summary);return{analysisType:t,provider:a,recommendations:r,summary:s.length===1?s[0]??"":`Analyzed ${String(r.length)} packages in ${String(e.length)} batches.`,warnings:[...new Set(n)]}},B={compatibility:"Compatibility",impact:"Impact",recommend:"Recommendations",security:"Security"},st=e=>{const a=`${B[e.analysisType]??e.analysisType} Analysis (${e.provider})`,t=e.recommendations.flatMap(n=>{const s=[{action:n.action,effort:n.effort,package:n.package,reason:n.reason,risk:n.riskLevel}];return n.breakingChanges.length>0&&s.push({action:"",effort:"",package:"",reason:`Breaking: ${n.breakingChanges.join("; ")}`,risk:""}),s}),r=process.stdout.columns||80;return ee(h.createElement(te,{borderStyle:"round",flexDirection:"column",paddingLeft:1,paddingRight:1},h.createElement(k,{bold:!0},a),h.createElement(k,null,""),h.createElement(k,null,e.summary),h.createElement(k,null,""),h.createElement(ae,{borderStyle:"none",data:t}),...e.warnings.length>0?[h.createElement(k,null,""),...e.warnings.map((n,s)=>h.createElement(k,{dimColor:!0,key:String(s)},` ${n}`))]:[]),{columns:r})},ot=async(e,a,t,r="impact")=>{const n=je(t);if(!n)return a.info(`No AI CLI tool found, using rule-based analysis.
64
- `),P(e,r);const s=re(n.name,r,e),o=ne(s);if(o)return a.info(`Using cached ${r} analysis from ${o.provider}.
65
- `),o;const c=B[r]??r;a.info(`Running ${c.toLowerCase()} analysis with ${n.name}...
66
- `);try{let i;if(e.length>Ge){a.info(`Splitting ${String(e.length)} packages into batches of ${String(x)}...
67
- `);const d=[];for(let u=0;u<e.length;u+=x)d.push(e.slice(u,u+x));const m=[];for(let u=0;u<d.length;u+=1){a.info(` Batch ${String(u+1)}/${String(d.length)}...`);const g=d[u];g&&m.push(await Ze(n,g,r))}i=Qe(m,n.name,r)}else{const d=await G(n,H(e,r));i=U(d,n.name,r)}return se(s,i,oe(r,t?.cacheTtl)),i}catch(i){const d=i instanceof Error?i.message:String(i);return a.warn(`AI analysis failed (${d}), falling back to rule engine.
68
- `),P(e,r)}};export{xe as F,nt as K,je as R,De as S,st as W,ot as Z,Je as b,Ne as d,G as r};
@@ -1 +0,0 @@
1
- import{W as o}from"./index-CE6MsgcV.js";const r=async(s,a)=>await o(s,a);export{r as s};
@@ -1,22 +0,0 @@
1
- import{createRequire as Dr}from"node:module";const Ir=Dr(import.meta.url),Et=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Pr=t=>{if(typeof Et<"u"&&Et.versions&&Et.versions.node){const[e,r]=Et.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Et.getBuiltinModule(t)}return Ir(t)},{createRequire:B}=Pr("node:module"),_e=0,Fr=4,Gr=Symbol("findUpStop"),tu=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g,Ur=/^[A-Z]:\//i,$t=(t="")=>t&&t.replaceAll("\\","/").replace(Ur,e=>e.toUpperCase()),jr=/^[/\\]{2}/,zr=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,cr=/^[A-Z]:$/i,Le=/^\/([A-Z]:)?$/i,Wr=/.(\.[^./]+)$/,qr=/^[/\\]|^[a-z]:[/\\]/i,Kr=/\/$/,Xr=()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/",eu="/",pr=(t,e)=>{let r="",o=0,n=-1,s=0,i;for(let u=0;u<=t.length;++u){if(u<t.length)i=t[u];else{if(i==="/")break;i="/"}if(i==="/"){if(!(n===u-1||s===1))if(s===2){if(r.length<2||o!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const a=r.lastIndexOf("/");a===-1?(r="",o=0):(r=r.slice(0,a),o=r.length-1-r.lastIndexOf("/")),n=u,s=0;continue}else if(r.length>0){r="",o=0,n=u,s=0;continue}}e&&(r+=r.length>0?"/..":"..",o=2)}else r.length>0?r+=`/${t.slice(n+1,u)}`:r=t.slice(n+1,u),o=u-n-1;n=u,s=0}else i==="."&&s!==-1?++s:s=-1}return r},bt=t=>zr.test(t),ae=function(t){if(t.length===0)return".";t=$t(t);const e=jr.exec(t),r=bt(t),o=t.at(-1)==="/";return t=pr(t,!r),t.length===0?r?"/":o?"./":".":(o&&(t+="/"),cr.test(t)&&(t+="/"),e?r?`//${t}`:`//./${t}`:r&&!bt(t)?`/${t}`:t)},Qr=(...t)=>{let e="";for(const r of t)if(r)if(e.length>0){const o=e.at(-1)==="/",n=r[0]==="/";o&&n?e+=r.slice(1):e+=o||n?r:`/${r}`}else e+=r;return ae(e)},vt=function(...t){t=t.map(o=>$t(o));let e="",r=!1;for(let o=t.length-1;o>=-1&&!r;o--){const n=o>=0?t[o]:Xr();!n||n.length===0||(e=`${n}/${e}`,r=bt(n))}return e=pr(e,!r),r&&!bt(e)?`/${e}`:e.length>0?e:"."},ru=function(t){return $t(t)},Zr=function(t){return Wr.exec($t(t))?.[1]??""},su=function(t,e){const r=vt(t).replace(Le,"$1").split("/"),o=vt(e).replace(Le,"$1").split("/");if(o[0][1]===":"&&r[0][1]===":"&&r[0]!==o[0])return o.join("/");const n=Math.min(r.length,o.length);let s=0;for(;s<n&&r[s]===o[s];)s+=1;const i=r.length-s;return[...Array.from({length:i}).fill(".."),...o.slice(s)].join("/")},ke=t=>{const e=$t(t).replace(Kr,""),r=e.lastIndexOf("/");if(r===-1)return bt(t)?"/":".";const o=e.slice(0,r);return cr.test(o)?`${o}/`:o||(bt(t)?"/":".")},fr=(t,e)=>{const r=$t(t),o=r.slice(r.lastIndexOf("/")+1);if(e&&o.endsWith(e)){if(e===r)return"";const n=o.slice(0,-e.length);if(n.length>0)return n}return o},Yr=function(t){const e=qr.exec(t)?.[0]?.replaceAll("\\","/")??"",r=fr(t),o=Zr(r);return{base:r,dir:ke(t),ext:o,name:r.slice(0,r.length-o.length),root:e}},Vr=B(import.meta.url),xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jr=t=>{if(typeof xt<"u"&&xt.versions&&xt.versions.node){const[e,r]=xt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return xt.getBuiltinModule(t)}return Vr(t)},{fileURLToPath:ts}=Jr("node:url");function es(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var He,Be;function rs(){return Be||(Be=1,He=["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"]),He}var ss=rs();const os=es(ss);new Set(os);const ns=/^(?:\.?\.[/\\]|\.\.\B)/,ou=t=>ns.test(t)||t==="..",ct=t=>$t(t instanceof URL?ts(t):t);let is=class extends Error{constructor(e){super(`EEXIST: ${e}`)}get code(){return"EEXIST"}set code(e){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(e){throw new Error("Cannot overwrite name of AlreadyExistsError")}};const pt=t=>{if(!t||!(t instanceof URL)&&typeof t!="string")throw new TypeError("Path must be a non-empty string or URL.")},us=B(import.meta.url),At=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ls=t=>{if(typeof At<"u"&&At.versions&&At.versions.node){const[e,r]=At.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return At.getBuiltinModule(t)}return us(t)};ls("node:fs/promises");const as=B(import.meta.url),St=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,cs=t=>{if(typeof St<"u"&&St.versions&&St.versions.node){const[e,r]=St.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return St.getBuiltinModule(t)}return as(t)};cs("node:fs");const ce=t=>{if(t.isFile())return"file";if(t.isDirectory())return"dir";if(t.isSymbolicLink())return"symlink"},ps=B(import.meta.url),wt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fs=t=>{if(typeof wt<"u"&&wt.versions&&wt.versions.node){const[e,r]=wt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return wt.getBuiltinModule(t)}return ps(t)},{lstat:Me,mkdir:hs}=fs("node:fs/promises"),iu=async t=>{pt(t);try{const e=await Me(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(ce(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await hs(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const r=await Me(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(ce(r))}'`,{cause:e})}},gs=B(import.meta.url),Rt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ds=t=>{if(typeof Rt<"u"&&Rt.versions&&Rt.versions.node){const[e,r]=Rt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Rt.getBuiltinModule(t)}return gs(t)},{lstatSync:De,mkdirSync:ys}=ds("node:fs"),uu=t=>{pt(t);try{const e=De(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(ce(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{ys(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const r=De(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(ce(r))}'`,{cause:e})}},ms=B(import.meta.url),Tt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bs=t=>{if(typeof Tt<"u"&&Tt.versions&&Tt.versions.node){const[e,r]=Tt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Tt.getBuiltinModule(t)}return ms(t)};bs("node:fs/promises");const $s=B(import.meta.url),_t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vs=t=>{if(typeof _t<"u"&&_t.versions&&_t.versions.node){const[e,r]=_t.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return _t.getBuiltinModule(t)}return $s(t)};vs("node:fs");const Es=B(import.meta.url),kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xs=t=>{if(typeof kt<"u"&&kt.versions&&kt.versions.node){const[e,r]=kt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return kt.getBuiltinModule(t)}return Es(t)};xs("node:fs/promises");const As=B(import.meta.url),Ct=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ss=t=>{if(typeof Ct<"u"&&Ct.versions&&Ct.versions.node){const[e,r]=Ct.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ct.getBuiltinModule(t)}return As(t)};Ss("node:fs");const ws=B(import.meta.url),Ot=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Rs=t=>{if(typeof Ot<"u"&&Ot.versions&&Ot.versions.node){const[e,r]=Ot.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ot.getBuiltinModule(t)}return ws(t)};Rs("node:fs/promises");const Ts=B(import.meta.url),Nt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_s=t=>{if(typeof Nt<"u"&&Nt.versions&&Nt.versions.node){const[e,r]=Nt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Nt.getBuiltinModule(t)}return Ts(t)};_s("node:fs");B(import.meta.url);let Ie=class extends Error{root;constructor(e,r){super(`${e instanceof Error?e.message:String(e)} for path "${r}"`),this.cause=e,this.root=r}get name(){return"WalkError"}set name(e){throw new Error("Cannot overwrite name of WalkError")}};const Pe=t=>{const e=t.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`).replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${e}$`)}catch(r){throw new Error(`Invalid glob pattern: ${t}`,{cause:r})}};let ks=class{name;path;#t;constructor(e,r,o){this.#t=e,this.name=r,this.path=o}isDirectory(){return this.#t.isDirectory()}isFile(){return this.#t.isFile()}isSymbolicLink(){return this.#t.isSymbolicLink()}};const we=(t,e,r)=>new ks(t,e,r),le=(t,e,r,o)=>{if(Array.isArray(e)&&e.length>0&&!e.some(s=>t.endsWith(s)))return!1;const n=t.includes("\\")?t.replaceAll("\\","/"):t;return r&&!r.some(s=>s.test(n))?!1:!o?.some(s=>s.test(n))},Cs=B(import.meta.url),Lt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Os=t=>{if(typeof Lt<"u"&&Lt.versions&&Lt.versions.node){const[e,r]=Lt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Lt.getBuiltinModule(t)}return Cs(t)};Os("node:fs/promises");const Ns=B(import.meta.url),Ht=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ls=t=>{if(typeof Ht<"u"&&Ht.versions&&Ht.versions.node){const[e,r]=Ht.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ht.getBuiltinModule(t)}return Ns(t)},{readdirSync:Hs,realpathSync:Bs,statSync:hr}=Ls("node:fs"),Ms=t=>{const e=ae(t),r=hr(e);return we(r,fr(e),e)};function*Ds(t,e={}){const{extensions:r,followSymlinks:o=!1,includeDirs:n=!0,includeFiles:s=!0,includeSymlinks:i=!0,match:u,maxDepth:a=Number.POSITIVE_INFINITY,skip:b}=e;if(pt(t),a<0)return;const h=e.visited??new Set,y=u?u.map(g=>typeof g=="string"?Pe(g):g):void 0,x=b?b.map(g=>typeof g=="string"?Pe(g):g):void 0;if(t=vt(ct(t)),n&&le(t,r,y,x)&&(yield Ms(t)),!(a<1||!le(t,void 0,void 0,x)))try{const g=Hs(t,{withFileTypes:!0});for(const $ of g){let _=Qr(t,$.name),R=$.isDirectory(),O=$.isFile();if($.isSymbolicLink())if(o){const d=Bs(_);if(h.has(d))continue;_=d;const E=hr(d);R=E.isDirectory(),O=E.isFile()}else if(i&&le(_,r,y,x)){yield we($,$.name,ae(_));continue}else continue;R?(o&&h.add(_),yield*Ds(_,{extensions:r,followSymlinks:o,includeDirs:n,includeFiles:s,includeSymlinks:i,match:y,maxDepth:a-1,skip:x,visited:h})):O&&s&&le(_,r,y,x)&&(yield we($,$.name,ae(_)))}}catch(g){throw g instanceof Ie?g:new Ie(g,t)}}const Is=B(import.meta.url),Bt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ps=t=>{if(typeof Bt<"u"&&Bt.versions&&Bt.versions.node){const[e,r]=Bt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Bt.getBuiltinModule(t)}return Is(t)};Ps("node:fs/promises");const Fs=B(import.meta.url),Mt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Gs=t=>{if(typeof Mt<"u"&&Mt.versions&&Mt.versions.node){const[e,r]=Mt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Mt.getBuiltinModule(t)}return Fs(t)},{statSync:Us,lstatSync:js}=Gs("node:fs"),cu=(t,e={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=e.cwd?ct(e.cwd):process.cwd();let o=vt(r);const{root:n}=Yr(o),s=ct(e.stopAt??n),i=vt(o,s),u=e.type??"file",a=function(h){return typeof t=="function"?[t(h)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]};e.allowSymlinks??=!0;const b=e.allowSymlinks?Us:js;for(;o&&o!==i&&o!==n;){for(let h of a(o)){if(h===Gr)return;if(h===void 0)continue;Buffer.isBuffer(h)?h=h.toString():h instanceof URL&&(h=ct(h));const y=bt(h)?h:vt(o,h);try{const x=b(y);if(u==="file"&&x.isFile()||u==="directory"&&x.isDirectory())return y}catch{}}o=ke(o)}};function Ce(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fe={},ge,Ge;function pe(){if(Ge)return ge;Ge=1;const t="[^\\\\/]",e=Symbol("unignore"),r="\\.",o="\\+",n="\\?",s="\\/",i="(?=.)",u="[^/]",a=`(?:${s}|$)`,b=`(?:^|${s})`,h=`${r}{1,2}${a}`,y=`(?!${r})`,x=`(?!${b}${h})`,g=`(?!${r}{0,1}${a})`,$=`(?!${h})`,_=`[^.${s}]`,R=`${u}*?`,O="/",d={DOT_LITERAL:r,PLUS_LITERAL:o,QMARK_LITERAL:n,SLASH_LITERAL:s,ONE_CHAR:i,QMARK:u,END_ANCHOR:a,DOTS_SLASH:h,NO_DOT:y,NO_DOTS:x,NO_DOT_SLASH:g,NO_DOTS_SLASH:$,QMARK_NO_DOT:_,STAR:R,START_ANCHOR:b,SEP:O},E={...d,SLASH_LITERAL:"[\\\\/]",QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${r}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[\\\\/])${r}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},l={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return ge={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:l,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(A){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${A.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(A){return A===!0?E:d}},ge}var Ue;function fe(){return Ue||(Ue=1,(function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:n}=pe();t.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),t.hasRegexChars=s=>o.test(s),t.isRegexChar=s=>s.length===1&&t.hasRegexChars(s),t.escapeRegex=s=>s.replace(n,"\\$1"),t.toPosixSlashes=s=>s.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return process.platform?process.platform==="win32":!1},t.removeBackslashes=s=>s.replace(r,i=>i==="\\"?"":i),t.escapeLast=(s,i,u)=>{const a=s.lastIndexOf(i,u);return a===-1?s:s[a-1]==="\\"?t.escapeLast(s,i,a-1):`${s.slice(0,a)}\\${s.slice(a)}`},t.removePrefix=(s,i={})=>{let u=s;return u.startsWith("./")&&(u=u.slice(2),i.prefix="./"),u},t.wrapOutput=(s,i={},u={})=>{const a=u.contains?"":"^",b=u.contains?"":"$";let h=`${a}(?:${s})${b}`;return i.negated===!0&&(h=`(?:^(?!${h}).*$)`),h},t.basename=(s,{windows:i}={})=>{const u=s.split(i?/[\\/]/:"/"),a=u[u.length-1];return a===""?u[u.length-2]:a}})(Fe)),Fe}var de,je;function zs(){if(je)return de;je=1;const t=fe(),{CHAR_ASTERISK:e,CHAR_AT:r,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:n,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:b,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:y,CHAR_QUESTION_MARK:x,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:$,CHAR_RIGHT_SQUARE_BRACKET:_}=pe(),R=d=>d===u||d===o,O=d=>{d.isPrefix!==!0&&(d.depth=d.isGlobstar?1/0:1)};return de=(d,E)=>{const l=E||{},A=d.length-1,w=l.parts===!0||l.scanToEnd===!0,T=[],S=[],k=[];let F=d,D=-1,U=0,rt=0,Z=!1,st=!1,j=!1,lt=!1,gt=!1,ot=!1,P=!1,nt=!1,dt=!1,Y=!1,Q=0,J,C,H={value:"",depth:0,isGlob:!1};const f=()=>D>=A,V=()=>F.charCodeAt(D+1),K=()=>(J=C,F.charCodeAt(++D));for(;D<A;){C=K();let M;if(C===o){P=H.backslashes=!0,C=K(),C===a&&(ot=!0);continue}if(ot===!0||C===a){for(Q++;f()!==!0&&(C=K());){if(C===o){P=H.backslashes=!0,K();continue}if(C===a){Q++;continue}if(ot!==!0&&C===s&&(C=K())===s){if(Z=H.isBrace=!0,j=H.isGlob=!0,Y=!0,w===!0)continue;break}if(ot!==!0&&C===n){if(Z=H.isBrace=!0,j=H.isGlob=!0,Y=!0,w===!0)continue;break}if(C===g&&(Q--,Q===0)){ot=!1,Z=H.isBrace=!0,Y=!0;break}}if(w===!0)continue;break}if(C===u){if(T.push(D),S.push(H),H={value:"",depth:0,isGlob:!1},Y===!0)continue;if(J===s&&D===U+1){U+=2;continue}rt=D+1;continue}if(l.noext!==!0&&(C===y||C===r||C===e||C===x||C===i)&&V()===b){if(j=H.isGlob=!0,lt=H.isExtglob=!0,Y=!0,C===i&&D===U&&(dt=!0),w===!0){for(;f()!==!0&&(C=K());){if(C===o){P=H.backslashes=!0,C=K();continue}if(C===$){j=H.isGlob=!0,Y=!0;break}}continue}break}if(C===e){if(J===e&&(gt=H.isGlobstar=!0),j=H.isGlob=!0,Y=!0,w===!0)continue;break}if(C===x){if(j=H.isGlob=!0,Y=!0,w===!0)continue;break}if(C===h){for(;f()!==!0&&(M=K());){if(M===o){P=H.backslashes=!0,K();continue}if(M===_){st=H.isBracket=!0,j=H.isGlob=!0,Y=!0;break}}if(w===!0)continue;break}if(l.nonegate!==!0&&C===i&&D===U){nt=H.negated=!0,U++;continue}if(l.noparen!==!0&&C===b){if(j=H.isGlob=!0,w===!0){for(;f()!==!0&&(C=K());){if(C===b){P=H.backslashes=!0,C=K();continue}if(C===$){Y=!0;break}}continue}break}if(j===!0){if(Y=!0,w===!0)continue;break}}l.noext===!0&&(lt=!1,j=!1);let q=F,c="",p="";U>0&&(c=F.slice(0,U),F=F.slice(U),rt-=U),q&&j===!0&&rt>0?(q=F.slice(0,rt),p=F.slice(rt)):j===!0?(q="",p=F):q=F,q&&q!==""&&q!=="/"&&q!==F&&R(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),l.unescape===!0&&(p&&(p=t.removeBackslashes(p)),q&&P===!0&&(q=t.removeBackslashes(q)));const et={prefix:c,input:d,start:U,base:q,glob:p,isBrace:Z,isBracket:st,isGlob:j,isExtglob:lt,isGlobstar:gt,negated:nt,negatedExtglob:dt};if(l.tokens===!0&&(et.maxDepth=0,R(C)||S.push(H),et.tokens=S),l.parts===!0||l.tokens===!0){let M;for(let z=0;z<T.length;z++){const at=M?M+1:U,tt=T[z],ft=d.slice(at,tt);l.tokens&&(z===0&&U!==0?(S[z].isPrefix=!0,S[z].value=c):S[z].value=ft,O(S[z]),et.maxDepth+=S[z].depth),(z!==0||ft!=="")&&k.push(ft),M=tt}if(M&&M+1<d.length){const z=d.slice(M+1);k.push(z),l.tokens&&(S[S.length-1].value=z,O(S[S.length-1]),et.maxDepth+=S[S.length-1].depth)}et.slashes=T,et.parts=k}return et},de}var ye,ze;function Ws(){if(ze)return ye;ze=1;const t=pe(),e=fe(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:i}=t,u=(d,E)=>typeof E.expandRange=="function"?E.expandRange(...d,E):(d.sort(),`[${d.join("-")}]`),a=(d,E)=>`Missing ${d}: "${E}" - use "\\\\${E}" to match literal characters`,b=d=>{const E=[];let l=0,A=0,w=0,T="",S=!1;for(const k of d){if(S===!0){T+=k,S=!1;continue}if(k==="\\"){T+=k,S=!0;continue}if(k==='"'){w=w===1?0:1,T+=k;continue}if(w===0){if(k==="[")l++;else if(k==="]"&&l>0)l--;else if(l===0){if(k==="(")A++;else if(k===")"&&A>0)A--;else if(k==="|"&&A===0){E.push(T),T="";continue}}}T+=k}return E.push(T),E},h=d=>{let E=!1;for(const l of d){if(E===!0){E=!1;continue}if(l==="\\"){E=!0;continue}if(/[?*+@!()[\]{}]/.test(l))return!1}return!0},y=d=>{let E=d.trim(),l=!0;for(;l===!0;)l=!1,/^@\([^\\()[\]{}|]+\)$/.test(E)&&(E=E.slice(2,-1),l=!0);if(h(E))return E.replace(/\\(.)/g,"$1")},x=d=>{const E=d.map(y).filter(Boolean);for(let l=0;l<E.length;l++)for(let A=l+1;A<E.length;A++){const w=E[l],T=E[A],S=w[0];if(!(!S||w!==S.repeat(w.length)||T!==S.repeat(T.length))&&(w===T||w.startsWith(T)||T.startsWith(w)))return!0}return!1},g=(d,E=!0)=>{if(d[0]!=="+"&&d[0]!=="*"||d[1]!=="(")return;let l=0,A=0,w=0,T=!1;for(let S=1;S<d.length;S++){const k=d[S];if(T===!0){T=!1;continue}if(k==="\\"){T=!0;continue}if(k==='"'){w=w===1?0:1;continue}if(w!==1){if(k==="["){l++;continue}if(k==="]"&&l>0){l--;continue}if(!(l>0)){if(k==="("){A++;continue}if(k===")"&&(A--,A===0))return E===!0&&S!==d.length-1?void 0:{type:d[0],body:d.slice(2,S),end:S}}}}},$=d=>{let E=0;const l=[];for(;E<d.length;){const A=g(d.slice(E),!1);if(!A||A.type!=="*")return;const w=b(A.body).map(S=>S.trim());if(w.length!==1)return;const T=y(w[0]);if(!T||T.length!==1)return;l.push(T),E+=A.end+1}return l.length<1?void 0:`${l.length===1?e.escapeRegex(l[0]):`[${l.map(A=>e.escapeRegex(A)).join("")}]`}*`},_=d=>{let E=0,l=d.trim(),A=g(l);for(;A;)E++,l=A.body.trim(),A=g(l);return E},R=(d,E)=>{if(E.maxExtglobRecursion===!1)return{risky:!1};const l=typeof E.maxExtglobRecursion=="number"?E.maxExtglobRecursion:t.DEFAULT_MAX_EXTGLOB_RECURSION,A=b(d).map(w=>w.trim());if(A.length>1&&(A.some(w=>w==="")||A.some(w=>/^[*?]+$/.test(w))||x(A)))return{risky:!0};for(const w of A){const T=$(w);if(T)return{risky:!0,safeOutput:T};if(_(w)>l)return{risky:!0}}return{risky:!1}},O=(d,E)=>{if(typeof d!="string")throw new TypeError("Expected a string");d=i[d]||d;const l={...E},A=typeof l.maxLength=="number"?Math.min(r,l.maxLength):r;let w=d.length;if(w>A)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${A}`);const T={type:"bos",value:"",output:l.prepend||""},S=[T],k=l.capture?"":"?:",F=t.globChars(l.windows),D=t.extglobChars(F),{DOT_LITERAL:U,PLUS_LITERAL:rt,SLASH_LITERAL:Z,ONE_CHAR:st,DOTS_SLASH:j,NO_DOT:lt,NO_DOT_SLASH:gt,NO_DOTS_SLASH:ot,QMARK:P,QMARK_NO_DOT:nt,STAR:dt,START_ANCHOR:Y}=F,Q=v=>`(${k}(?:(?!${Y}${v.dot?j:U}).)*?)`,J=l.dot?"":lt,C=l.dot?P:nt;let H=l.bash===!0?Q(l):dt;l.capture&&(H=`(${H})`),typeof l.noext=="boolean"&&(l.noextglob=l.noext);const f={input:d,index:-1,start:0,dot:l.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};d=e.removePrefix(d,f),w=d.length;const V=[],K=[],q=[];let c=T,p;const et=()=>f.index===w-1,M=f.peek=(v=1)=>d[f.index+v],z=f.advance=()=>d[++f.index]||"",at=()=>d.slice(f.index+1),tt=(v="",G=0)=>{f.consumed+=v,f.index+=G},ft=v=>{f.output+=v.output!=null?v.output:v.value,tt(v.value)},Br=()=>{let v=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)z(),f.start++,v++;return v%2===0?!1:(f.negated=!0,f.start++,!0)},ie=v=>{f[v]++,q.push(v)},ht=v=>{f[v]--,q.pop()},N=v=>{if(c.type==="globstar"){const G=f.braces>0&&(v.type==="comma"||v.type==="brace"),m=v.extglob===!0||V.length&&(v.type==="pipe"||v.type==="paren");v.type!=="slash"&&v.type!=="paren"&&!G&&!m&&(f.output=f.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=H,f.output+=c.output)}if(V.length&&v.type!=="paren"&&(V[V.length-1].inner+=v.value),(v.value||v.output)&&ft(v),c&&c.type==="text"&&v.type==="text"){c.output=(c.output||c.value)+v.value,c.value+=v.value;return}v.prev=c,S.push(v),c=v},ue=(v,G)=>{const m={...D[G],conditions:1,inner:""};m.prev=c,m.parens=f.parens,m.output=f.output,m.startIndex=f.index,m.tokensIndex=S.length;const L=(l.capture?"(":"")+m.open;ie("parens"),N({type:v,value:G,output:f.output?"":st}),N({type:"paren",extglob:!0,value:z(),output:L}),V.push(m)},Mr=v=>{const G=d.slice(v.startIndex,f.index+1),m=d.slice(v.startIndex+2,f.index),L=R(m,l);if((v.type==="plus"||v.type==="star")&&L.risky){const I=L.safeOutput?(v.output?"":st)+(l.capture?`(${L.safeOutput})`:L.safeOutput):void 0,it=S[v.tokensIndex];it.type="text",it.value=G,it.output=I||e.escapeRegex(G);for(let ut=v.tokensIndex+1;ut<S.length;ut++)S[ut].value="",S[ut].output="",delete S[ut].suffix;f.output=v.output+it.output,f.backtrack=!0,N({type:"paren",extglob:!0,value:p,output:""}),ht("parens");return}let W=v.close+(l.capture?")":""),X;if(v.type==="negate"){let I=H;if(v.inner&&v.inner.length>1&&v.inner.includes("/")&&(I=Q(l)),(I!==H||et()||/^\)+$/.test(at()))&&(W=v.close=`)$))${I}`),v.inner.includes("*")&&(X=at())&&/^\.[^\\/.]+$/.test(X)){const it=O(X,{...E,fastpaths:!1}).output;W=v.close=`)${it})${I})`}v.prev.type==="bos"&&(f.negatedExtglob=!0)}N({type:"paren",extglob:!0,value:p,output:W}),ht("parens")};if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(d)){let v=!1,G=d.replace(s,(m,L,W,X,I,it)=>X==="\\"?(v=!0,m):X==="?"?L?L+X+(I?P.repeat(I.length):""):it===0?C+(I?P.repeat(I.length):""):P.repeat(W.length):X==="."?U.repeat(W.length):X==="*"?L?L+X+(I?H:""):H:L?m:`\\${m}`);return v===!0&&(l.unescape===!0?G=G.replace(/\\/g,""):G=G.replace(/\\+/g,m=>m.length%2===0?"\\\\":m?"\\":"")),G===d&&l.contains===!0?(f.output=d,f):(f.output=e.wrapOutput(G,f,E),f)}for(;!et();){if(p=z(),p==="\0")continue;if(p==="\\"){const m=M();if(m==="/"&&l.bash!==!0||m==="."||m===";")continue;if(!m){p+="\\",N({type:"text",value:p});continue}const L=/^\\+/.exec(at());let W=0;if(L&&L[0].length>2&&(W=L[0].length,f.index+=W,W%2!==0&&(p+="\\")),l.unescape===!0?p=z():p+=z(),f.brackets===0){N({type:"text",value:p});continue}}if(f.brackets>0&&(p!=="]"||c.value==="["||c.value==="[^")){if(l.posix!==!1&&p===":"){const m=c.value.slice(1);if(m.includes("[")&&(c.posix=!0,m.includes(":"))){const L=c.value.lastIndexOf("["),W=c.value.slice(0,L),X=c.value.slice(L+2),I=o[X];if(I){c.value=W+I,f.backtrack=!0,z(),!T.output&&S.indexOf(c)===1&&(T.output=st);continue}}}(p==="["&&M()!==":"||p==="-"&&M()==="]")&&(p=`\\${p}`),p==="]"&&(c.value==="["||c.value==="[^")&&(p=`\\${p}`),l.posix===!0&&p==="!"&&c.value==="["&&(p="^"),c.value+=p,ft({value:p});continue}if(f.quotes===1&&p!=='"'){p=e.escapeRegex(p),c.value+=p,ft({value:p});continue}if(p==='"'){f.quotes=f.quotes===1?0:1,l.keepQuotes===!0&&N({type:"text",value:p});continue}if(p==="("){ie("parens"),N({type:"paren",value:p});continue}if(p===")"){if(f.parens===0&&l.strictBrackets===!0)throw new SyntaxError(a("opening","("));const m=V[V.length-1];if(m&&f.parens===m.parens+1){Mr(V.pop());continue}N({type:"paren",value:p,output:f.parens?")":"\\)"}),ht("parens");continue}if(p==="["){if(l.nobracket===!0||!at().includes("]")){if(l.nobracket!==!0&&l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));p=`\\${p}`}else ie("brackets");N({type:"bracket",value:p});continue}if(p==="]"){if(l.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){N({type:"text",value:p,output:`\\${p}`});continue}if(f.brackets===0){if(l.strictBrackets===!0)throw new SyntaxError(a("opening","["));N({type:"text",value:p,output:`\\${p}`});continue}ht("brackets");const m=c.value.slice(1);if(c.posix!==!0&&m[0]==="^"&&!m.includes("/")&&(p=`/${p}`),c.value+=p,ft({value:p}),l.literalBrackets===!1||e.hasRegexChars(m))continue;const L=e.escapeRegex(c.value);if(f.output=f.output.slice(0,-c.value.length),l.literalBrackets===!0){f.output+=L,c.value=L;continue}c.value=`(${k}${L}|${c.value})`,f.output+=c.value;continue}if(p==="{"&&l.nobrace!==!0){ie("braces");const m={type:"brace",value:p,output:"(",outputIndex:f.output.length,tokensIndex:f.tokens.length};K.push(m),N(m);continue}if(p==="}"){const m=K[K.length-1];if(l.nobrace===!0||!m){N({type:"text",value:p,output:p});continue}let L=")";if(m.dots===!0){const W=S.slice(),X=[];for(let I=W.length-1;I>=0&&(S.pop(),W[I].type!=="brace");I--)W[I].type!=="dots"&&X.unshift(W[I].value);L=u(X,l),f.backtrack=!0}if(m.comma!==!0&&m.dots!==!0){const W=f.output.slice(0,m.outputIndex),X=f.tokens.slice(m.tokensIndex);m.value=m.output="\\{",p=L="\\}",f.output=W;for(const I of X)f.output+=I.output||I.value}N({type:"brace",value:p,output:L}),ht("braces"),K.pop();continue}if(p==="|"){V.length>0&&V[V.length-1].conditions++,N({type:"text",value:p});continue}if(p===","){let m=p;const L=K[K.length-1];L&&q[q.length-1]==="braces"&&(L.comma=!0,m="|"),N({type:"comma",value:p,output:m});continue}if(p==="/"){if(c.type==="dot"&&f.index===f.start+1){f.start=f.index+1,f.consumed="",f.output="",S.pop(),c=T;continue}N({type:"slash",value:p,output:Z});continue}if(p==="."){if(f.braces>0&&c.type==="dot"){c.value==="."&&(c.output=U);const m=K[K.length-1];c.type="dots",c.output+=p,c.value+=p,m.dots=!0;continue}if(f.braces+f.parens===0&&c.type!=="bos"&&c.type!=="slash"){N({type:"text",value:p,output:U});continue}N({type:"dot",value:p,output:U});continue}if(p==="?"){if(!(c&&c.value==="(")&&l.noextglob!==!0&&M()==="("&&M(2)!=="?"){ue("qmark",p);continue}if(c&&c.type==="paren"){const m=M();let L=p;(c.value==="("&&!/[!=<:]/.test(m)||m==="<"&&!/<([!=]|\w+>)/.test(at()))&&(L=`\\${p}`),N({type:"text",value:p,output:L});continue}if(l.dot!==!0&&(c.type==="slash"||c.type==="bos")){N({type:"qmark",value:p,output:nt});continue}N({type:"qmark",value:p,output:P});continue}if(p==="!"){if(l.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){ue("negate",p);continue}if(l.nonegate!==!0&&f.index===0){Br();continue}}if(p==="+"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){ue("plus",p);continue}if(c&&c.value==="("||l.regex===!1){N({type:"plus",value:p,output:rt});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||f.parens>0){N({type:"plus",value:p});continue}N({type:"plus",value:rt});continue}if(p==="@"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){N({type:"at",extglob:!0,value:p,output:""});continue}N({type:"text",value:p});continue}if(p!=="*"){(p==="$"||p==="^")&&(p=`\\${p}`);const m=n.exec(at());m&&(p+=m[0],f.index+=m[0].length),N({type:"text",value:p});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=p,c.output=H,f.backtrack=!0,f.globstar=!0,tt(p);continue}let v=at();if(l.noextglob!==!0&&/^\([^?]/.test(v)){ue("star",p);continue}if(c.type==="star"){if(l.noglobstar===!0){tt(p);continue}const m=c.prev,L=m.prev,W=m.type==="slash"||m.type==="bos",X=L&&(L.type==="star"||L.type==="globstar");if(l.bash===!0&&(!W||v[0]&&v[0]!=="/")){N({type:"star",value:p,output:""});continue}const I=f.braces>0&&(m.type==="comma"||m.type==="brace"),it=V.length&&(m.type==="pipe"||m.type==="paren");if(!W&&m.type!=="paren"&&!I&&!it){N({type:"star",value:p,output:""});continue}for(;v.slice(0,3)==="/**";){const ut=d[f.index+4];if(ut&&ut!=="/")break;v=v.slice(3),tt("/**",3)}if(m.type==="bos"&&et()){c.type="globstar",c.value+=p,c.output=Q(l),f.output=c.output,f.globstar=!0,tt(p);continue}if(m.type==="slash"&&m.prev.type!=="bos"&&!X&&et()){f.output=f.output.slice(0,-(m.output+c.output).length),m.output=`(?:${m.output}`,c.type="globstar",c.output=Q(l)+(l.strictSlashes?")":"|$)"),c.value+=p,f.globstar=!0,f.output+=m.output+c.output,tt(p);continue}if(m.type==="slash"&&m.prev.type!=="bos"&&v[0]==="/"){const ut=v[1]!==void 0?"|$":"";f.output=f.output.slice(0,-(m.output+c.output).length),m.output=`(?:${m.output}`,c.type="globstar",c.output=`${Q(l)}${Z}|${Z}${ut})`,c.value+=p,f.output+=m.output+c.output,f.globstar=!0,tt(p+z()),N({type:"slash",value:"/",output:""});continue}if(m.type==="bos"&&v[0]==="/"){c.type="globstar",c.value+=p,c.output=`(?:^|${Z}|${Q(l)}${Z})`,f.output=c.output,f.globstar=!0,tt(p+z()),N({type:"slash",value:"/",output:""});continue}if(I&&v[0]==="/"){c.type="globstar",c.value+=p,c.output=`(?:^|${Z}|${Q(l)}${Z})`,f.output+=c.output,f.globstar=!0,tt(p+z()),N({type:"slash",value:"/",output:""});continue}f.output=f.output.slice(0,-c.output.length),c.type="globstar",c.output=Q(l),c.value+=p,f.output+=c.output,f.globstar=!0,tt(p);continue}const G={type:"star",value:p,output:H};if(l.bash===!0){G.output=".*?",(c.type==="bos"||c.type==="slash")&&(G.output=J+G.output),N(G);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&l.regex===!0){G.output=p,N(G);continue}(f.index===f.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(f.output+=gt,c.output+=gt):l.dot===!0?(f.output+=ot,c.output+=ot):(f.output+=J,c.output+=J),M()!=="*"&&(f.output+=st,c.output+=st)),N(G)}for(;f.brackets>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));f.output=e.escapeLast(f.output,"["),ht("brackets")}for(;f.parens>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing",")"));f.output=e.escapeLast(f.output,"("),ht("parens")}for(;f.braces>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","}"));f.output=e.escapeLast(f.output,"{"),ht("braces")}if(l.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&N({type:"maybe_slash",value:"",output:`${Z}?`}),f.backtrack===!0){f.output="";for(const v of f.tokens)f.output+=v.output!=null?v.output:v.value,v.suffix&&(f.output+=v.suffix)}return f};return O.fastpaths=(d,E)=>{const l={...E},A=typeof l.maxLength=="number"?Math.min(r,l.maxLength):r,w=d.length;if(w>A)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${A}`);d=i[d]||d;const{DOT_LITERAL:T,SLASH_LITERAL:S,ONE_CHAR:k,DOTS_SLASH:F,NO_DOT:D,NO_DOTS:U,NO_DOTS_SLASH:rt,STAR:Z,START_ANCHOR:st}=t.globChars(l.windows),j=l.dot?U:D,lt=l.dot?rt:D,gt=l.capture?"":"?:",ot={negated:!1,prefix:""};let P=l.bash===!0?".*?":Z;l.capture&&(P=`(${P})`);const nt=J=>J.noglobstar===!0?P:`(${gt}(?:(?!${st}${J.dot?F:T}).)*?)`,dt=J=>{switch(J){case"*":return`${j}${k}${P}`;case".*":return`${T}${k}${P}`;case"*.*":return`${j}${P}${T}${k}${P}`;case"*/*":return`${j}${P}${S}${k}${lt}${P}`;case"**":return j+nt(l);case"**/*":return`(?:${j}${nt(l)}${S})?${lt}${k}${P}`;case"**/*.*":return`(?:${j}${nt(l)}${S})?${lt}${P}${T}${k}${P}`;case"**/.*":return`(?:${j}${nt(l)}${S})?${T}${k}${P}`;default:{const C=/^(.*?)\.(\w+)$/.exec(J);if(!C)return;const H=dt(C[1]);return H?H+T+C[2]:void 0}}},Y=e.removePrefix(d,ot);let Q=dt(Y);return Q&&l.strictSlashes!==!0&&(Q+=`${S}?`),Q},ye=O,ye}var me,We;function qs(){if(We)return me;We=1;const t=zs(),e=Ws(),r=fe(),o=pe(),n=i=>i&&typeof i=="object"&&!Array.isArray(i),s=(i,u,a=!1)=>{if(Array.isArray(i)){const R=i.map(O=>s(O,u,a));return O=>{for(const d of R){const E=d(O);if(E)return E}return!1}}const b=n(i)&&i.tokens&&i.input;if(i===""||typeof i!="string"&&!b)throw new TypeError("Expected pattern to be a non-empty string");const h=u||{},y=h.windows,x=b?s.compileRe(i,u):s.makeRe(i,u,!1,!0),g=x.state;delete x.state;let $=()=>!1;if(h.ignore){const R={...u,ignore:null,onMatch:null,onResult:null};$=s(h.ignore,R,a)}const _=(R,O=!1)=>{const{isMatch:d,match:E,output:l}=s.test(R,x,u,{glob:i,posix:y}),A={glob:i,state:g,regex:x,posix:y,input:R,output:l,match:E,isMatch:d};if(typeof h.onResult=="function"&&h.onResult(A),d===!1)return A.isMatch=!1,O?A:!1;t:if($(R)){if(typeof h.onIgnore=="function"&&h.onIgnore(A)===o.UNIGNORE){A.isMatch=!0;break t}return A.isMatch=!1,O?A:!1}return typeof h.onMatch=="function"&&h.onMatch(A),O?A:!0};return a&&(_.state=g),_};return s.test=(i,u,a,{glob:b,posix:h}={})=>{if(typeof i!="string")throw new TypeError("Expected input to be a string");if(i==="")return{isMatch:!1,output:""};const y=a||{},x=y.format||(h?r.toPosixSlashes:null);let g=i===b,$=g&&x?x(i):i;return g===!1&&($=x?x(i):i,g=$===b),(g===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?g=s.matchBase(i,u,a,h):g=u.exec($)),{isMatch:!!g,match:g,output:$}},s.matchBase=(i,u,a)=>(u instanceof RegExp?u:s.makeRe(u,a)).test(r.basename(i)),s.isMatch=(i,u,a)=>s(u,a)(i),s.parse=(i,u)=>Array.isArray(i)?i.map(a=>s.parse(a,u)):e(i,{...u,fastpaths:!1}),s.scan=(i,u)=>t(i,u),s.compileRe=(i,u,a=!1,b=!1)=>{if(a===!0)return i.output;const h=u||{},y=h.contains?"":"^",x=h.contains?"":"$";let g=`${y}(?:${i.output})${x}`;i&&i.negated===!0&&(g=`^(?!${g}).*$`);const $=s.toRegex(g,u);return b===!0&&($.state=i),$},s.makeRe=(i,u={},a=!1,b=!1)=>{if(!i||typeof i!="string")throw new TypeError("Expected a non-empty string");let h={negated:!1,fastpaths:!0};return u.fastpaths!==!1&&(i[0]==="."||i[0]==="*")&&(h.output=e.fastpaths(i,u)),h.output||(h=e(i,u)),s.compileRe(h,u,a,b)},s.toRegex=(i,u)=>{try{const a=u||{};return new RegExp(i,a.flags||(a.nocase?"i":""))}catch(a){if(u&&u.debug===!0)throw a;return/$^/}},s.constants=o,me=s,me}var be,qe;function Ks(){if(qe)return be;qe=1;const t=qs(),e=fe();function r(o,n,s=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:e.isWindows()}),t(o,n,s)}return Object.assign(r,t),be=r,be}var Xs=Ks();const yt=Ce(Xs),Qs=B(import.meta.url),Dt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,oe=t=>{if(typeof Dt<"u"&&Dt.versions&&Dt.versions.node){const[e,r]=Dt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Dt.getBuiltinModule(t)}return Qs(t)},Ke=oe("fs"),Zs={...Ke,default:Ke},{statSync:Ys,stat:Vs,realpathSync:Js,realpath:to,readdirSync:eo,readdir:ro}=oe("fs"),{sep:gr,basename:so,dirname:Re,resolve:dr,normalize:oo,relative:no,posix:mt,isAbsolute:io}=oe("path"),{fileURLToPath:uo}=oe("url"),{createRequire:lo}=oe("module");var Xe=lo(import.meta.url);function ao(t){let e=oo(t);return e.length>1&&e[e.length-1]===gr&&(e=e.substring(0,e.length-1)),e}const co=/[\\/]/g;function yr(t,e){return t.replace(co,e)}const po=/^[a-z]:[\\/]$/i;function fo(t){return t==="/"||po.test(t)}function $e(t,e){const{resolvePaths:r,normalizePath:o,pathSeparator:n}=e,s=process.platform==="win32"&&t.includes("/")||t.startsWith(".");if(r&&(t=dr(t)),(o||s)&&(t=ao(t)),t===".")return"";const i=t[t.length-1]!==n;return yr(i?t+n:t,n)}function mr(t,e){return e+t}function ho(t,e){return function(r,o){return o.startsWith(t)?o.slice(t.length)+r:yr(no(t,o),e.pathSeparator)+e.pathSeparator+r}}function go(t){return t}function yo(t,e,r){return e+t+r}function mo(t,e){const{relativePaths:r,includeBasePath:o}=e;return r&&t?ho(t,e):o?mr:go}function bo(t){return function(e,r){r.push(e.substring(t.length)||".")}}function $o(t){return function(e,r,o){const n=e.substring(t.length)||".";o.every(s=>s(n,!0))&&r.push(n)}}const vo=(t,e)=>{e.push(t||".")},Eo=(t,e,r)=>{const o=t||".";r.every(n=>n(o,!0))&&e.push(o)},xo=()=>{};function Ao(t,e){const{includeDirs:r,filters:o,relativePaths:n}=e;return r?n?o&&o.length?$o(t):bo(t):o&&o.length?Eo:vo:xo}const So=(t,e,r,o)=>{o.every(n=>n(t,!1))&&r.files++},wo=(t,e,r,o)=>{o.every(n=>n(t,!1))&&e.push(t)},Ro=(t,e,r,o)=>{r.files++},To=(t,e)=>{e.push(t)},_o=()=>{};function ko(t){const{excludeFiles:e,filters:r,onlyCounts:o}=t;return e?_o:r&&r.length?o?So:wo:o?Ro:To}const Co=t=>t,Oo=()=>[""].slice(0,0);function No(t){return t.group?Oo:Co}const Lo=(t,e,r)=>{t.push({directory:e,files:r,dir:e})},Ho=()=>{};function Bo(t){return t.group?Lo:Ho}const Mo=function(t,e,r){const{queue:o,fs:n,options:{suppressErrors:s}}=e;o.enqueue(),n.realpath(t,(i,u)=>{if(i)return o.dequeue(s?null:i,e);n.stat(u,(a,b)=>{if(a)return o.dequeue(s?null:a,e);if(b.isDirectory()&&br(t,u,e))return o.dequeue(null,e);r(b,u),o.dequeue(null,e)})})},Do=function(t,e,r){const{queue:o,fs:n,options:{suppressErrors:s}}=e;o.enqueue();try{const i=n.realpathSync(t),u=n.statSync(i);if(u.isDirectory()&&br(t,i,e))return;r(u,i)}catch(i){if(!s)throw i}};function Io(t,e){return!t.resolveSymlinks||t.excludeSymlinks?null:e?Do:Mo}function br(t,e,r){if(r.options.useRealPaths)return Po(e,r);let o=Re(t),n=1;for(;o!==r.root&&n<2;){const s=r.symlinks.get(o);s&&(s===e||s.startsWith(e)||e.startsWith(s))?n++:o=Re(o)}return r.symlinks.set(t,e),n>1}function Po(t,e){return e.visited.includes(t+e.options.pathSeparator)}const Fo=t=>t.counts,Go=t=>t.groups,Uo=t=>t.paths,jo=t=>t.paths.slice(0,t.options.maxFiles),zo=(t,e,r)=>(he(e,r,t.counts,t.options.suppressErrors),null),Wo=(t,e,r)=>(he(e,r,t.paths,t.options.suppressErrors),null),qo=(t,e,r)=>(he(e,r,t.paths.slice(0,t.options.maxFiles),t.options.suppressErrors),null),Ko=(t,e,r)=>(he(e,r,t.groups,t.options.suppressErrors),null);function he(t,e,r,o){e(t&&!o?t:null,r)}function Xo(t,e){const{onlyCounts:r,group:o,maxFiles:n}=t;return r?e?Fo:zo:o?e?Go:Ko:n?e?jo:qo:e?Uo:Wo}const $r={withFileTypes:!0},Qo=(t,e,r,o,n)=>{if(t.queue.enqueue(),o<0)return t.queue.dequeue(null,t);const{fs:s}=t;t.visited.push(e),t.counts.directories++,s.readdir(e||".",$r,(i,u=[])=>{n(u,r,o),t.queue.dequeue(t.options.suppressErrors?null:i,t)})},Zo=(t,e,r,o,n)=>{const{fs:s}=t;if(o<0)return;t.visited.push(e),t.counts.directories++;let i=[];try{i=s.readdirSync(e||".",$r)}catch(u){if(!t.options.suppressErrors)throw u}n(i,r,o)};function Yo(t){return t?Zo:Qo}var Vo=class{count=0;constructor(t){this.onQueueEmpty=t}enqueue(){return this.count++,this.count}dequeue(t,e){this.onQueueEmpty&&(--this.count<=0||t)&&(this.onQueueEmpty(t,e),t&&(e.controller.abort(),this.onQueueEmpty=void 0))}},Jo=class{_files=0;_directories=0;set files(t){this._files=t}get files(){return this._files}set directories(t){this._directories=t}get directories(){return this._directories}get dirs(){return this._directories}},tn=class{aborted=!1;abort(){this.aborted=!0}},vr=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,r,o){this.isSynchronous=!o,this.callbackInvoker=Xo(r,this.isSynchronous),this.root=$e(e,r),this.state={root:fo(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new Jo,options:r,queue:new Vo((n,s)=>this.callbackInvoker(s,n,o)),symlinks:new Map,visited:[""].slice(0,0),controller:new tn,fs:r.fs||Zs},this.joinPath=mo(this.root,r),this.pushDirectory=Ao(this.root,r),this.pushFile=ko(r),this.getArray=No(r),this.groupFiles=Bo(r),this.resolveSymlink=Io(r,this.isSynchronous),this.walkDirectory=Yo(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,r,o)=>{const{paths:n,options:{filters:s,resolveSymlinks:i,excludeSymlinks:u,exclude:a,maxFiles:b,signal:h,useRealPaths:y,pathSeparator:x},controller:g}=this.state;if(g.aborted||h&&h.aborted||b&&n.length>b)return;const $=this.getArray(this.state.paths);for(let _=0;_<e.length;++_){const R=e[_];if(R.isFile()||R.isSymbolicLink()&&!i&&!u){const O=this.joinPath(R.name,r);this.pushFile(O,$,this.state.counts,s)}else if(R.isDirectory()){let O=yo(R.name,r,this.state.options.pathSeparator);if(a&&a(R.name,O))continue;this.pushDirectory(O,n,s),this.walkDirectory(this.state,O,O,o-1,this.walk)}else if(this.resolveSymlink&&R.isSymbolicLink()){let O=mr(R.name,r);this.resolveSymlink(O,this.state,(d,E)=>{if(d.isDirectory()){if(E=$e(E,this.state.options),a&&a(R.name,y?E:O+x))return;this.walkDirectory(this.state,E,y?E:O+x,o-1,this.walk)}else{E=y?E:O;const l=so(E),A=$e(Re(E),this.state.options);E=this.joinPath(l,A),this.pushFile(E,$,this.state.counts,s)}})}}this.groupFiles(this.state.groups,r,$)}};function en(t,e){return new Promise((r,o)=>{Er(t,e,(n,s)=>{if(n)return o(n);r(s)})})}function Er(t,e,r){new vr(t,e,r).start()}function rn(t,e){return new vr(t,e).start()}var Qe=class{constructor(e,r){this.root=e,this.options=r}withPromise(){return en(this.root,this.options)}withCallback(e){Er(this.root,this.options,e)}sync(){return rn(this.root,this.options)}};let xr=null;try{Xe.resolve("picomatch"),xr=Xe("picomatch")}catch{}var sn=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:gr,filters:[]};globFunction;constructor(t){this.options={...this.options,...t},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(t){return this.options.pathSeparator=t,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(t){return this.options.maxDepth=t,this}withMaxFiles(t){return this.options.maxFiles=t,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:t=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=t,this.withFullPaths()}withAbortSignal(t){return this.options.signal=t,this}normalize(){return this.options.normalizePath=!0,this}filter(t){return this.options.filters.push(t),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(t){return this.options.exclude=t,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(t){return new Qe(t||".",this.options)}withGlobFunction(t){return this.globFunction=t,this}crawlWithOptions(t,e){return this.options={...this.options,...e},new Qe(t||".",this.options)}glob(...t){return this.globFunction?this.globWithOptions(t):this.globWithOptions(t,{dot:!0})}globWithOptions(t,...e){const r=this.globFunction||xr;if(!r)throw new Error("Please specify a glob function to use glob matching.");var o=this.globCache[t.join("\0")];return o||(o=r(t,...e),this.globCache[t.join("\0")]=o),this.options.filters.push(n=>o(n)),this}};const on=Array.isArray,Ar=/\\/g,nn=/^[A-Za-z]:$/,Sr=process.platform==="win32",un=/^(\/?\.\.)+$/;function Ze(t,e={}){const r=t.length,o=Array(r),n=Array(r);let s,i;for(s=0;s<r;s++){const u=wr(t[s]);o[s]=u;const a=u.length,b=Array(a);for(i=0;i<a;i++)b[i]=yt(u[i],e);n[s]=b}return u=>{const a=u.split("/");if(a[0]===".."&&un.test(u))return!0;for(s=0;s<r;s++){const b=o[s],h=n[s],y=a.length,x=Math.min(y,b.length);for(i=0;i<x;){const g=b[i];if(g.includes("/"))return!0;if(!h[i](a[i]))break;if(!e.noglobstar&&g==="**")return!0;i++}if(i===y)return!0}return!1}}const ln=/^[A-Z]:\/$/i,an=Sr?t=>ln.test(t):t=>t==="/";function Ye(t,e,r){if(t===e||e.startsWith(`${t}/`)){if(r){const n=t.length+ +!an(t);return(s,i)=>s.slice(n,i?-1:void 0)||"."}const o=e.slice(t.length+1);return o?(n,s)=>{if(n===".")return o;const i=`${o}/${n}`;return s?i.slice(0,-1):i}:(n,s)=>s&&n!=="."?n.slice(0,-1):n}return r?o=>mt.relative(t,o)||".":o=>mt.relative(t,`${e}/${o}`)||"."}function cn(t,e){if(e.startsWith(`${t}/`)){const r=e.slice(t.length+1);return o=>`${r}/${o}`}return r=>{const o=mt.relative(t,`${e}/${r}`);return r[r.length-1]==="/"&&o!==""?`${o}/`:o||"."}}function Ve(t){return t.replace(nn,e=>`${e}/`)}const pn={parts:!0};function wr(t){var e;const r=yt.scan(t,pn);return!((e=r.parts)===null||e===void 0)&&e.length?r.parts:[t]}const fn=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,hn=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,gn=t=>t.replace(fn,"\\$&"),dn=t=>t.replace(hn,"\\$&"),yn=Sr?dn:gn;function mn(t,e){const r=yt.scan(t);return r.isGlob||r.negated}function se(...t){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...t)}function Rr(t){return typeof t=="string"?[t]:t??[]}const bn=/^(\/?\.\.)+/,$n=/\\(?=[()[\]{}!*+?@|])/g;function ve(t,e,r,o){var n;const s=e.cwd;let i=t;t[t.length-1]==="/"&&(i=t.slice(0,-1));const u=i.lastIndexOf("/"),a=(u===-1?i:i.slice(u+1)).startsWith("!(");i[i.length-1]!=="*"&&!a&&e.expandDirectories&&(i+="/**");const b=yn(s);i=io(i.replace($n,""))?mt.relative(b,i):mt.normalize(i);const h=(n=bn.exec(i))===null||n===void 0?void 0:n[0],y=wr(i);if(h){const g=(h.length+1)/3;let $=0;const _=b.split("/");for(;$<g&&y[$+g]===_[_.length+$-g];)i=i.slice(0,(g-$-1)*3)+i.slice((g-$)*3+y[$+g].length+1)||".",$++;const R=mt.join(s,h.slice($*3));R[0]!=="."&&r.root.length>R.length&&(r.root=Ve(R),r.depthOffset=-g+$)}if(!o&&r.depthOffset>=0){var x;(x=r.commonPath)!==null&&x!==void 0||(r.commonPath=y);const g=[],$=Math.min(r.commonPath.length,y.length);for(let _=0;_<$;_++){const R=y[_];if(R==="**"&&!y[_+1]){g.pop();break}if(_===y.length-1||R!==r.commonPath[_]||mn(R))break;g.push(R)}r.depthOffset=g.length,r.commonPath=g,r.root=Ve(g.length>0?mt.join(s,...g):s)}return i}function vn(t,e,r){const o=[],n=[],s=[];for(const i of t.ignore)i&&(i[0]!=="!"||i[1]==="("?n.push(ve(i,t,r,!0)):s.push(i.slice(1)));for(const i of e)i&&(i[0]!=="!"||i[1]==="("?o.push(ve(i,t,r,!1)):(i[1]!=="!"||i[2]==="(")&&n.push(ve(i.slice(1),t,r,!0)));return{match:o,ignore:n,unignore:s}}function En(t,e){const r=t.cwd,o={root:r,depthOffset:0},n=vn(t,e,o);t.debug&&se("internal processing patterns:",n);const{absolute:s,caseSensitiveMatch:i,debug:u,dot:a,followSymbolicLinks:b,onlyDirectories:h}=t,y=o.root.replace(Ar,""),x={dot:a,nobrace:t.braceExpansion===!1,nocase:!i,noextglob:t.extglob===!1,noglobstar:t.globstar===!1,posix:!0},g=n.unignore.length>0,$=g?yt(n.unignore,x):void 0,_=g?Ze(n.unignore,x):void 0,R=yt(n.match,{...x,ignore:n.ignore,onIgnore:$?k=>$(k.output)&&yt.constants.UNIGNORE:void 0}),O=yt(n.ignore,x),d=Ze(n.match,x),E=Ye(r,y,s),l=s?E:Ye(r,y,!0),A=n.match.length>0&&n.match.every(k=>k==="**"||k==="**/*"),w=n.ignore.length>0||g||!A?(k,F)=>{const D=l(F,!0);return D==="."||_&&_(D)?!1:!d(D)||O(D)}:void 0;let T;t.deep!==void 0&&(T=Math.round(t.deep-o.depthOffset));const S=new sn({filters:[u?(k,F)=>{const D=E(k,F),U=R(D);return U&&se(`matched ${D}`),U}:(k,F)=>{const D=E(k,F);return R(D)}],exclude:u&&w?(k,F)=>{const D=w(k,F);return se(`${D?"skipped":"crawling"} ${F}`),D}:w,fs:t.fs,pathSeparator:"/",relativePaths:!s,resolvePaths:s,includeBasePath:s,resolveSymlinks:b,excludeSymlinks:!b,excludeFiles:h,includeDirs:h||!t.onlyFiles,maxDepth:T,signal:t.signal}).crawl(y);return t.debug&&se("internal properties:",{...o,root:y}),[S,r!==y&&!s&&cn(r,y)]}function xn(t,e){if(e)for(let r=t.length-1;r>=0;r--)t[r]=e(t[r]);return t}const Je={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function An(t){const e=Object.assign({},t);for(const r in Je)e[r]===void 0&&Object.assign(e,{[r]:Je[r]});return e.cwd=(e.cwd instanceof URL?uo(e.cwd):dr(e.cwd||process.cwd())).replace(Ar,"/"),e.ignore=Rr(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||ro,readdirSync:e.fs.readdirSync||eo,realpath:e.fs.realpath||to,realpathSync:e.fs.realpathSync||Js,stat:e.fs.stat||Vs,statSync:e.fs.statSync||Ys}),e.debug&&se("globbing with options:",e),e}function Sn(t,e={}){var r;if(t&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const o=on(t)||typeof t=="string",n=Rr((r=o?t:t.patterns)!==null&&r!==void 0?r:"**/*"),s=An(o?e:t);return n.length>0?En(s,n):[]}async function hu(t,e){const[r,o]=Sn(t,e);return r?xn(await r.withPromise(),o):[]}var Ee,tr;function wn(){if(tr)return Ee;tr=1;/*!
2
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
- *
4
- * Copyright (c) 2014-2016, Jon Schlinkert.
5
- * Licensed under the MIT License.
6
- */return Ee=function(t){if(typeof t!="string"||t==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1},Ee}var xe,er;function Tr(){if(er)return xe;er=1;/*!
7
- * is-glob <https://github.com/jonschlinkert/is-glob>
8
- *
9
- * Copyright (c) 2014-2017, Jon Schlinkert.
10
- * Released under the MIT License.
11
- */var t=wn(),e={"{":"}","(":")","[":"]"},r=function(n){if(n[0]==="!")return!0;for(var s=0,i=-2,u=-2,a=-2,b=-2,h=-2;s<n.length;){if(n[s]==="*"||n[s+1]==="?"&&/[\].+)]/.test(n[s])||u!==-1&&n[s]==="["&&n[s+1]!=="]"&&(u<s&&(u=n.indexOf("]",s)),u>s&&(h===-1||h>u||(h=n.indexOf("\\",s),h===-1||h>u)))||a!==-1&&n[s]==="{"&&n[s+1]!=="}"&&(a=n.indexOf("}",s),a>s&&(h=n.indexOf("\\",s),h===-1||h>a))||b!==-1&&n[s]==="("&&n[s+1]==="?"&&/[:!=]/.test(n[s+2])&&n[s+3]!==")"&&(b=n.indexOf(")",s),b>s&&(h=n.indexOf("\\",s),h===-1||h>b))||i!==-1&&n[s]==="("&&n[s+1]!=="|"&&(i<s&&(i=n.indexOf("|",s)),i!==-1&&n[i+1]!==")"&&(b=n.indexOf(")",i),b>i&&(h=n.indexOf("\\",i),h===-1||h>b))))return!0;if(n[s]==="\\"){var y=n[s+1];s+=2;var x=e[y];if(x){var g=n.indexOf(x,s);g!==-1&&(s=g+1)}if(n[s]==="!")return!0}else s++}return!1},o=function(n){if(n[0]==="!")return!0;for(var s=0;s<n.length;){if(/[*?{}()[\]]/.test(n[s]))return!0;if(n[s]==="\\"){var i=n[s+1];s+=2;var u=e[i];if(u){var a=n.indexOf(u,s);a!==-1&&(s=a+1)}if(n[s]==="!")return!0}else s++}return!1};return xe=function(n,s){if(typeof n!="string"||n==="")return!1;if(t(n))return!0;var i=r;return s&&s.strict===!1&&(i=o),i(n)},xe}const Rn=B(import.meta.url),It=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_r=t=>{if(typeof It<"u"&&It.versions&&It.versions.node){const[e,r]=It.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return It.getBuiltinModule(t)}return Rn(t)},Tn=_r("path"),_n=_r("os");var Ae,rr;function kn(){if(rr)return Ae;rr=1;var t=Tr(),e=Tn.posix.dirname,r=_n.platform()==="win32",o="/",n=/\\/g,s=/\\([!*?|[\](){}])/g;Ae=function(a,b){var h=Object.assign({flipBackslashes:!0},b);h.flipBackslashes&&r&&a.indexOf(o)<0&&(a=a.replace(n,o)),i(a)&&(a+=o),a+="a";do a=e(a);while(u(a));return a.replace(s,"$1")};function i(a){var b=a.slice(-1),h;switch(b){case"}":h="{";break;case"]":h="[";break;default:return!1}var y=a.indexOf(h);return y<0?!1:a.slice(y+1,-1).includes(o)}function u(a){return/\([^()]+$/.test(a)||a[0]==="{"||a[0]==="["||/[^\\][{[]/.test(a)?!0:t(a)}return Ae}var Cn=kn();Ce(Cn);const On=B(import.meta.url),Pt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Nn=t=>{if(typeof Pt<"u"&&Pt.versions&&Pt.versions.node){const[e,r]=Pt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Pt.getBuiltinModule(t)}return On(t)},{access:Ln}=Nn("node:fs/promises");async function gu(t,e=_e){pt(t),t=ct(t);try{return await Ln(t,e),!0}catch{return!1}}const Hn=B(import.meta.url),Ft=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bn=t=>{if(typeof Ft<"u"&&Ft.versions&&Ft.versions.node){const[e,r]=Ft.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ft.getBuiltinModule(t)}return Hn(t)},{accessSync:Mn}=Bn("node:fs");function Te(t,e=_e){pt(t),t=ct(t);try{return Mn(t,e),!0}catch{return!1}}var Dn=Tr();Ce(Dn);const In=B(import.meta.url),Gt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kr=t=>{if(typeof Gt<"u"&&Gt.versions&&Gt.versions.node){const[e,r]=Gt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Gt.getBuiltinModule(t)}return In(t)};kr("node:fs/promises");kr("node:fs");let Pn=class extends Error{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")}},Fn=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const Cr=(t,e)=>{const r=t?.code;return r==="ENOENT"?new Pn(`no such file or directory, open '${e}'`):r==="EACCES"||r==="EPERM"?new Fn(`unable to read the non-readable file: ${e}`):t},Gn=B(import.meta.url),Ut=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Or=t=>{if(typeof Ut<"u"&&Ut.versions&&Ut.versions.node){const[e,r]=Ut.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ut.getBuiltinModule(t)}return Gn(t)},{readFile:Un}=Or("node:fs/promises"),{unzip:jn,brotliDecompress:zn}=Or("node:zlib"),Wn={brotli:zn,gzip:jn,none:(t,e)=>{e(null,t)}},mu=async(t,e)=>{pt(t),t=ct(t);const{buffer:r,compression:o,encoding:n,flag:s}=e??{};let i;try{i=await Un(t,s?{flag:s}:{})}catch(u){throw Cr(u,t)}return await new Promise((u,a)=>{Wn[o??"none"](i,(b,h)=>{b?a(b):u(r?h:h.toString(n??"utf8"))})})},qn=B(import.meta.url),jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Nr=t=>{if(typeof jt<"u"&&jt.versions&&jt.versions.node){const[e,r]=jt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return jt.getBuiltinModule(t)}return qn(t)},{readFileSync:Kn}=Nr("node:fs"),{unzipSync:Xn,brotliDecompressSync:Qn}=Nr("node:zlib"),Zn={brotli:Qn,gzip:Xn,none:t=>t},bu=(t,e)=>{pt(t),t=ct(t);const{buffer:r,compression:o,encoding:n,flag:s}=e??{};let i;try{i=Kn(t,s?{flag:s}:{})}catch(b){throw Cr(b,t)}const u=Zn[o??"none"],a=u(i);return r?a:a.toString(n??"utf8")},Yn=B(import.meta.url),zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vn=t=>{if(typeof zt<"u"&&zt.versions&&zt.versions.node){const[e,r]=zt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return zt.getBuiltinModule(t)}return Yn(t)},{createRequire:Lr}=Vn("node:module"),Jn=globalThis.process??Object.create(null),sr={versions:{}},or=new Proxy(Jn,{get(t,e){if(e in t)return t[e];if(e in sr)return sr[e]}}),ti=t=>t.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
12
- `),ei=(t,e,r,o)=>{const n={column:0,line:-1,...t.start},s={...n,...t.end},i=n.line,u=n.column,a=s.line,b=s.column;let h=Math.max(i-(r+1),0),y=Math.min(e.length,a+o);i===-1&&(h=0),a===-1&&(y=e.length);const x=a-i,g={};if(x)for(let $=0;$<=x;$++){const _=$+i;if(!u)g[_]=!0;else if($===0){const R=e[_-1]?.length;g[_]=[u,(R??0)-u+1]}else if($===x)g[_]=[0,b];else{const R=e[_-$]?.length;g[_]=[0,R]}}else u===b?g[i]=u?[u,0]:!0:g[i]=[u,(b??0)-(u??0)];return{end:y,markerLines:g,start:h}},ri=or.platform==="win32"&&!or.env?.WT_SESSION?">":"❯",$u=(t,e,r)=>{const o={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:$=>$,marker:$=>$,message:$=>$,...r?.color}},n=typeof e.start.column=="number";let s=(t.includes("\r")?ti(t):t).split(`
13
- `);typeof o.tabWidth=="number"&&t.includes(" ")&&(s=s.map($=>$.replaceAll(" "," ".repeat(o.tabWidth))));const{end:i,markerLines:u,start:a}=ei(e,s,o.linesAbove,o.linesBelow),b=String(i).length,{gutter:h,marker:y,message:x}=o.color;let g=s.slice(a,i).map(($,_)=>{const R=a+1+_,O=u[R],d=String(R).padStart(b),E=!u[R+1],l=` ${d}${o.showGutter?" |":""}`;if(O){let A="";if(Array.isArray(O)){const w=$.replaceAll(/[^\t]/g," ").slice(0,Math.max(O[0]-1,0)),T=O[1]||1;A=[`
14
- `,o.prefix+h(l.replaceAll(/\d/g," "))," ",w,y("^").repeat(T)].join(""),E&&o.message&&(A+=` ${x(o.message)}`)}return[o.prefix+y(ri),h(l),$.length>0?` ${$}`:"",A].join("")}return`${o.prefix} ${h(l)}${$.length>0?` ${$}`:""}`}).join(`
15
- `);return o.message&&!n&&(g=`${o.prefix+" ".repeat(b+1)+o.message}
16
- ${g}`),g},nr=(t,e)=>{let r=0,o=e.length-2;for(;r<o;){const n=r+(o-r>>1);if(t<e[n])o=n-1;else if(t>=e[n+1])r=n+1;else{r=n;break}}return r},si=/\n|\r(?!\n)/,oi=t=>t.split(si).reduce((e,r)=>(e.push(e.at(-1)+r.length+1),e),[0]),vu=(t,e,r)=>{if(!Array.isArray(t)&&typeof t!="string"||(typeof t=="string"||Array.isArray(t))&&t.length===0)return{column:0,line:0};if(typeof e!="number"||typeof t=="string"&&e>=t.length||Array.isArray(t)&&e+1>=t.at(-1))return{column:0,line:0};if(typeof t=="string"){const n=oi(t),s=nr(e,n);return{column:e-n[s]+1,line:s+1}}const o=nr(e,t);return{column:e-t[o]+1,line:o+1}},ni=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&ni.set("AggregateError",AggregateError);const ii=Lr(import.meta.url),Wt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ui=t=>{if(typeof Wt<"u"&&Wt.versions&&Wt.versions.node){const[e,r]=Wt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Wt.getBuiltinModule(t)}return ii(t)};ui("node:util");const li=Lr(import.meta.url),qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Oe=t=>{if(typeof qt<"u"&&qt.versions&&qt.versions.node){const[e,r]=qt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return qt.getBuiltinModule(t)}return li(t)};Oe("node:fs");Oe("node:path");Oe("node:url");let Eu=class extends Error{fileName;codeFrame;name="JSONError";#t;constructor(e){super(),this.#t=e}get message(){return`${this.#t}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
17
-
18
- ${this.codeFrame}
19
- `:""}`}set message(e){this.#t=e}};const ai=t=>{const e={force:!0,recursive:!0};return t?.maxRetries!==void 0&&(e.maxRetries=t.maxRetries),t?.retryDelay!==void 0&&(e.retryDelay=t.retryDelay),e},ci=B(import.meta.url),Kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Hr=t=>{if(typeof Kt<"u"&&Kt.versions&&Kt.versions.node){const[e,r]=Kt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Kt.getBuiltinModule(t)}return ci(t)};Hr("node:fs");Hr("node:fs/promises");const pi=B(import.meta.url),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fi=t=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[e,r]=Xt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Xt.getBuiltinModule(t)}return pi(t)};fi("node:fs");const hi=B(import.meta.url),Qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gi=t=>{if(typeof Qt<"u"&&Qt.versions&&Qt.versions.node){const[e,r]=Qt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Qt.getBuiltinModule(t)}return hi(t)};gi("node:fs/promises");const di=B(import.meta.url),Zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,yi=t=>{if(typeof Zt<"u"&&Zt.versions&&Zt.versions.node){const[e,r]=Zt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Zt.getBuiltinModule(t)}return di(t)},{rmSync:mi}=yi("node:fs"),Au=(t,e={})=>{pt(t),mi(t,ai(e))};B(import.meta.url);const bi=t=>{if(typeof t!="string"&&!(t instanceof ArrayBuffer)&&!ArrayBuffer.isView(t))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},$i=B(import.meta.url),Yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vi=t=>{if(typeof Yt<"u"&&Yt.versions&&Yt.versions.node){const[e,r]=Yt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Yt.getBuiltinModule(t)}return $i(t)},{randomBytes:Ei}=vi("node:crypto"),xi=t=>`${t}.${process.pid.toString(36)}.${Ei(6).toString("hex")}.tmp`,Ai=new TextEncoder,Si=t=>{if(t instanceof Uint8Array)return t;if(typeof t=="string")return Ai.encode(t);if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t)){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new Uint8Array(e)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},wi=B(import.meta.url),Vt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ri=t=>{if(typeof Vt<"u"&&Vt.versions&&Vt.versions.node){const[e,r]=Vt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Vt.getBuiltinModule(t)}return wi(t)};Ri("node:fs/promises");const Ti=B(import.meta.url),Jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_i=t=>{if(typeof Jt<"u"&&Jt.versions&&Jt.versions.node){const[e,r]=Jt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Jt.getBuiltinModule(t)}return Ti(t)},{mkdirSync:ki,writeFileSync:Ci,statSync:Oi,renameSync:ir,chownSync:Ni,chmodSync:Li,unlinkSync:Hi}=_i("node:fs"),Bi=(t,e,r)=>{r={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},pt(t),bi(e),t=ct(t);const o=Te(t,_e);if(o&&!r.overwrite)throw new is(`file already exists, open '${t}'`);const n=xi(t);try{!o&&r.recursive&&ki(ke(t),{recursive:!0});let s;if(Ci(n,typeof e=="string"?Buffer.from(e,r.encoding??"utf8"):Si(e),{flag:"wx"}),o&&r.backup&&(s=Oi(t),r.chown??={gid:s.gid,uid:s.uid},ir(t,`${t}.bak`)),r.chown)try{Ni(n,r.chown.uid,r.chown.gid)}catch{}Li(n,s&&!r.mode?s.mode:r.mode??438),ir(n,t)}catch(s){throw new Error(`Failed to write file at: ${t} - ${s.message}`,{cause:s})}finally{Te(n)&&Hi(n)}},Mi=/^(?:( )+|\t+)/,ne="space";function ur(t,e,r){return t&&e===ne&&r===1}function lr(t,e){const r=new Map;let o=0,n,s;for(const i of t.split(/\n/g)){if(!i)continue;const u=i.match(Mi);if(u===null)o=0,n="";else{const a=u[0].length,b=u[1]?ne:"tab";if(ur(e,b,a))continue;b!==n&&(o=0),n=b;let h=1,y=0;const x=a-o;if(o=a,x===0)h=0,y=1;else{const $=Math.abs(x);if(ur(e,b,$))continue;s=Di(b,$)}const g=r.get(s);r.set(s,g===void 0?[1,0]:[g[0]+h,g[1]+y])}}return r}function Di(t,e){return(t===ne?"s":"t")+String(e)}function Ii(t){const e=t[0]==="s"?ne:"tab",r=Number(t.slice(1));return{type:e,amount:r}}function Pi(t){let e,r=0,o=0;for(const[n,[s,i]]of t)(s>r||s===r&&i>o)&&(r=s,o=i,e=n);return e}function Fi(t,e){return(t===ne?" ":" ").repeat(e)}function Gi(t){if(typeof t!="string")throw new TypeError("Expected a string");let e=lr(t,!0);e.size===0&&(e=lr(t,!1));const r=Pi(e);let o,n=0,s="";return r!==void 0&&({type:o,amount:n}=Ii(r),s=Fi(o,n)),{amount:n,type:o,indent:s}}const Ui=B(import.meta.url),te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ji=t=>{if(typeof te<"u"&&te.versions&&te.versions.node){const[e,r]=te.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return te.getBuiltinModule(t)}return Ui(t)};ji("node:fs/promises");const zi=B(import.meta.url),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wi=t=>{if(typeof ee<"u"&&ee.versions&&ee.versions.node){const[e,r]=ee.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return ee.getBuiltinModule(t)}return zi(t)},{readFileSync:qi}=Wi("node:fs"),Su=(t,e,r={})=>{const{detectIndent:o,indent:n,replacer:s,stringify:i=JSON.stringify,...u}={indent:" ",...r};let a=n,b=`
20
- `;if(Te(t,Fr))try{const y=qi(t,"utf8");if(o){const{indent:x}=Gi(y);a=x}b=y.endsWith(`
21
- `)?`
22
- `:""}catch(y){if(y.code!=="ENOENT")throw y}const h=i(e,s,a);Bi(t,`${h}${b}`,u)},Ki=B(import.meta.url),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ne=t=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,r]=re.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return re.getBuiltinModule(t)}return Ki(t)},Xi=Ne("fs"),Qi=Ne("os"),Zi=Ne("path");var Se={},ar;function Yi(){if(ar)return Se;ar=1;var t=Object.defineProperty,e=(h,y)=>t(h,"name",{value:y,configurable:!0}),r=Xi,o=Qi,n=Zi;const s=e(h=>{let y="";for(let x=0;x<h.length;x+=1){const g=h[x],$=g.toUpperCase();y+=g===$?g.toLowerCase():$}return y},"invertCase"),i=new Map,u=e((h,y)=>{const x=n.join(h,`.is-fs-case-sensitive-test-${process.pid}`);try{return y.writeFileSync(x,""),!y.existsSync(s(x))}finally{try{y.unlinkSync(x)}catch{}}},"checkDirectoryCaseWithWrite"),a=e((h,y,x)=>{try{return u(h,x)}catch(g){if(y===void 0)return u(o.tmpdir(),x);throw g}},"checkDirectoryCaseWithFallback"),b=e((h,y=r,x=!0)=>{const g=h??process.cwd();if(x&&i.has(g))return i.get(g);let $;const _=s(g);return _!==g&&y.existsSync(g)?$=!y.existsSync(_):$=a(g,h,y),x&&i.set(g,$),$},"isFsCaseSensitive");return Se.isFsCaseSensitive=b,Se}var Vi=Yi();const wu=Vi.isFsCaseSensitive;export{bt as A,vt as B,cu as F,ke as H,Ds as I,fr as J,ct as L,Su as O,Bi as T,$u as U,hu as W,uu as a,gu as b,mu as c,iu as d,Pn as e,Te as f,ae as g,ou as h,tu as i,Yr as j,wu as k,Au as l,Qr as m,eu as o,Eu as s,bu as v,ru as w,su as y,vu as z};
@@ -1 +0,0 @@
1
- import{g as Zr}from"./_commonjsHelpers-B5Y90VFO.js";var k={exports:{}},se,er;function x(){return er||(er=1,se={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}),se}var ie,rr;function H(){return rr||(rr=1,ie=process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...l)=>console.error("SEMVER",...l):()=>{}),ie}var tr;function B(){return tr||(tr=1,(function(a,l){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:t,MAX_LENGTH:s}=x(),E=H();l=a.exports={};const o=l.re=[],p=l.safeRe=[],r=l.src=[],R=l.safeSrc=[],e=l.t={};let i=0;const u="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",s],[u,t]],g=S=>{for(const[q,M]of m)S=S.split(`${q}*`).join(`${q}{0,${M}}`).split(`${q}+`).join(`${q}{1,${M}}`);return S},h=(S,q,M)=>{const y=g(q),D=i++;E(S,D,q),e[S]=D,r[D]=q,R[D]=y,o[D]=new RegExp(q,M?"g":void 0),p[D]=new RegExp(y,M?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),h("MAINVERSION",`(${r[e.NUMERICIDENTIFIER]})\\.(${r[e.NUMERICIDENTIFIER]})\\.(${r[e.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${r[e.NUMERICIDENTIFIERLOOSE]})\\.(${r[e.NUMERICIDENTIFIERLOOSE]})\\.(${r[e.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${r[e.NONNUMERICIDENTIFIER]}|${r[e.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${r[e.NONNUMERICIDENTIFIER]}|${r[e.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${r[e.PRERELEASEIDENTIFIER]}(?:\\.${r[e.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${r[e.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${r[e.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${u}+`),h("BUILD",`(?:\\+(${r[e.BUILDIDENTIFIER]}(?:\\.${r[e.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${r[e.MAINVERSION]}${r[e.PRERELEASE]}?${r[e.BUILD]}?`),h("FULL",`^${r[e.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${r[e.MAINVERSIONLOOSE]}${r[e.PRERELEASELOOSE]}?${r[e.BUILD]}?`),h("LOOSE",`^${r[e.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${r[e.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${r[e.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${r[e.XRANGEIDENTIFIER]})(?:\\.(${r[e.XRANGEIDENTIFIER]})(?:\\.(${r[e.XRANGEIDENTIFIER]})(?:${r[e.PRERELEASE]})?${r[e.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${r[e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${r[e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${r[e.XRANGEIDENTIFIERLOOSE]})(?:${r[e.PRERELEASELOOSE]})?${r[e.BUILD]}?)?)?`),h("XRANGE",`^${r[e.GTLT]}\\s*${r[e.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${r[e.GTLT]}\\s*${r[e.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${r[e.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",r[e.COERCEPLAIN]+`(?:${r[e.PRERELEASE]})?(?:${r[e.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",r[e.COERCE],!0),h("COERCERTLFULL",r[e.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${r[e.LONETILDE]}\\s+`,!0),l.tildeTrimReplace="$1~",h("TILDE",`^${r[e.LONETILDE]}${r[e.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${r[e.LONETILDE]}${r[e.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${r[e.LONECARET]}\\s+`,!0),l.caretTrimReplace="$1^",h("CARET",`^${r[e.LONECARET]}${r[e.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${r[e.LONECARET]}${r[e.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${r[e.GTLT]}\\s*(${r[e.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${r[e.GTLT]}\\s*(${r[e.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${r[e.GTLT]}\\s*(${r[e.LOOSEPLAIN]}|${r[e.XRANGEPLAIN]})`,!0),l.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${r[e.XRANGEPLAIN]})\\s+-\\s+(${r[e.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${r[e.XRANGEPLAINLOOSE]})\\s+-\\s+(${r[e.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(k,k.exports)),k.exports}var ne,sr;function We(){if(sr)return ne;sr=1;const a=Object.freeze({loose:!0}),l=Object.freeze({});return ne=t=>t?typeof t!="object"?a:t:l,ne}var ae,ir;function Hr(){if(ir)return ae;ir=1;const a=/^[0-9]+$/,l=(t,s)=>{if(typeof t=="number"&&typeof s=="number")return t===s?0:t<s?-1:1;const E=a.test(t),o=a.test(s);return E&&o&&(t=+t,s=+s),t===s?0:E&&!o?-1:o&&!E?1:t<s?-1:1};return ae={compareIdentifiers:l,rcompareIdentifiers:(t,s)=>l(s,t)},ae}var oe,nr;function G(){if(nr)return oe;nr=1;const a=H(),{MAX_LENGTH:l,MAX_SAFE_INTEGER:n}=x(),{safeRe:t,t:s}=B(),E=We(),{compareIdentifiers:o}=Hr(),p=(R,e)=>{const i=e.split(".");if(i.length>R.length)return!1;for(let u=0;u<i.length;u++)if(o(R[u],i[u])!==0)return!1;return!0};class r{constructor(e,i){if(i=E(i),e instanceof r){if(e.loose===!!i.loose&&e.includePrerelease===!!i.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>l)throw new TypeError(`version is longer than ${l} characters`);a("SemVer",e,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;const u=e.trim().match(i.loose?t[s.LOOSE]:t[s.FULL]);if(!u)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(m=>{if(/^[0-9]+$/.test(m)){const g=+m;if(g>=0&&g<n)return g}return m}):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(a("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof r||(e=new r(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let i=0;do{const u=this.prerelease[i],m=e.prerelease[i];if(a("prerelease compare",i,u,m),u===void 0&&m===void 0)return 0;if(m===void 0)return 1;if(u===void 0)return-1;if(u!==m)return o(u,m)}while(++i)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let i=0;do{const u=this.build[i],m=e.build[i];if(a("build compare",i,u,m),u===void 0&&m===void 0)return 0;if(m===void 0)return 1;if(u===void 0)return-1;if(u!==m)return o(u,m)}while(++i)}inc(e,i,u){if(e.startsWith("pre")){if(!i&&u===!1)throw new Error("invalid increment argument: identifier is empty");if(i){const m=`-${i}`.match(this.options.loose?t[s.PRERELEASELOOSE]:t[s.PRERELEASE]);if(!m||m[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,u);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,u);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,u),this.inc("pre",i,u);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,u),this.inc("pre",i,u);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const m=Number(u)?1:0;if(this.prerelease.length===0)this.prerelease=[m];else{let g=this.prerelease.length;for(;--g>=0;)typeof this.prerelease[g]=="number"&&(this.prerelease[g]++,g=-2);if(g===-1){if(i===this.prerelease.join(".")&&u===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(m)}}if(i){let g=[i,m];if(u===!1&&(g=[i]),p(this.prerelease,i)){const h=this.prerelease[i.split(".").length];isNaN(h)&&(this.prerelease=g)}else this.prerelease=g}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return oe=r,oe}var ue,ar;function j(){if(ar)return ue;ar=1;const a=G();return ue=(n,t,s=!1)=>{if(n instanceof a)return n;try{return new a(n,t)}catch(E){if(!s)return null;throw E}},ue}var le,or;function Jr(){if(or)return le;or=1;const a=j();return le=(n,t)=>{const s=a(n,t);return s?s.version:null},le}var ce,ur;function Kr(){if(ur)return ce;ur=1;const a=j();return ce=(n,t)=>{const s=a(n.trim().replace(/^[=v]+/,""),t);return s?s.version:null},ce}var pe,lr;function Qr(){if(lr)return pe;lr=1;const a=G();return pe=(n,t,s,E,o)=>{typeof s=="string"&&(o=E,E=s,s=void 0);try{return new a(n instanceof a?n.version:n,s).inc(t,E,o).version}catch{return null}},pe}var he,cr;function et(){if(cr)return he;cr=1;const a=j();return he=(n,t)=>{const s=a(n,null,!0),E=a(t,null,!0),o=s.compare(E);if(o===0)return null;const p=o>0,r=p?s:E,R=p?E:s,e=!!r.prerelease.length;if(R.prerelease.length&&!e){if(!R.patch&&!R.minor)return"major";if(R.compareMain(r)===0)return R.minor&&!R.patch?"minor":"patch"}const i=e?"pre":"";return s.major!==E.major?i+"major":s.minor!==E.minor?i+"minor":s.patch!==E.patch?i+"patch":"prerelease"},he}var Ee,pr;function rt(){if(pr)return Ee;pr=1;const a=G();return Ee=(n,t)=>new a(n,t).major,Ee}var fe,hr;function tt(){if(hr)return fe;hr=1;const a=G();return fe=(n,t)=>new a(n,t).minor,fe}var me,Er;function st(){if(Er)return me;Er=1;const a=G();return me=(n,t)=>new a(n,t).patch,me}var Re,fr;function it(){if(fr)return Re;fr=1;const a=j();return Re=(n,t)=>{const s=a(n,t);return s&&s.prerelease.length?s.prerelease:null},Re}var ve,mr;function F(){if(mr)return ve;mr=1;const a=G();return ve=(n,t,s)=>new a(n,s).compare(new a(t,s)),ve}var de,Rr;function nt(){if(Rr)return de;Rr=1;const a=F();return de=(n,t,s)=>a(t,n,s),de}var $e,vr;function at(){if(vr)return $e;vr=1;const a=F();return $e=(n,t)=>a(n,t,!0),$e}var Ie,dr;function ze(){if(dr)return Ie;dr=1;const a=G();return Ie=(n,t,s)=>{const E=new a(n,s),o=new a(t,s);return E.compare(o)||E.compareBuild(o)},Ie}var Le,$r;function ot(){if($r)return Le;$r=1;const a=ze();return Le=(n,t)=>n.sort((s,E)=>a(s,E,t)),Le}var ge,Ir;function ut(){if(Ir)return ge;Ir=1;const a=ze();return ge=(n,t)=>n.sort((s,E)=>a(E,s,t)),ge}var Ne,Lr;function Y(){if(Lr)return Ne;Lr=1;const a=F();return Ne=(n,t,s)=>a(n,t,s)>0,Ne}var Se,gr;function Ze(){if(gr)return Se;gr=1;const a=F();return Se=(n,t,s)=>a(n,t,s)<0,Se}var Oe,Nr;function Yr(){if(Nr)return Oe;Nr=1;const a=F();return Oe=(n,t,s)=>a(n,t,s)===0,Oe}var Ae,Sr;function Wr(){if(Sr)return Ae;Sr=1;const a=F();return Ae=(n,t,s)=>a(n,t,s)!==0,Ae}var Te,Or;function Je(){if(Or)return Te;Or=1;const a=F();return Te=(n,t,s)=>a(n,t,s)>=0,Te}var qe,Ar;function Ke(){if(Ar)return qe;Ar=1;const a=F();return qe=(n,t,s)=>a(n,t,s)<=0,qe}var we,Tr;function zr(){if(Tr)return we;Tr=1;const a=Yr(),l=Wr(),n=Y(),t=Je(),s=Ze(),E=Ke();return we=(p,r,R,e)=>{switch(r){case"===":return typeof p=="object"&&(p=p.version),typeof R=="object"&&(R=R.version),p===R;case"!==":return typeof p=="object"&&(p=p.version),typeof R=="object"&&(R=R.version),p!==R;case"":case"=":case"==":return a(p,R,e);case"!=":return l(p,R,e);case">":return n(p,R,e);case">=":return t(p,R,e);case"<":return s(p,R,e);case"<=":return E(p,R,e);default:throw new TypeError(`Invalid operator: ${r}`)}},we}var Ce,qr;function lt(){if(qr)return Ce;qr=1;const a=G(),l=j(),{safeRe:n,t}=B();return Ce=(E,o)=>{if(E instanceof a)return E;if(typeof E=="number"&&(E=String(E)),typeof E!="string")return null;o=o||{};let p=null;if(!o.rtl)p=E.match(o.includePrerelease?n[t.COERCEFULL]:n[t.COERCE]);else{const m=o.includePrerelease?n[t.COERCERTLFULL]:n[t.COERCERTL];let g;for(;(g=m.exec(E))&&(!p||p.index+p[0].length!==E.length);)(!p||g.index+g[0].length!==p.index+p[0].length)&&(p=g),m.lastIndex=g.index+g[1].length+g[2].length;m.lastIndex=-1}if(p===null)return null;const r=p[2],R=p[3]||"0",e=p[4]||"0",i=o.includePrerelease&&p[5]?`-${p[5]}`:"",u=o.includePrerelease&&p[6]?`+${p[6]}`:"";return l(`${r}.${R}.${e}${i}${u}`,o)},Ce}var Pe,wr;function ct(){if(wr)return Pe;wr=1;const a=j(),l=x(),n=G(),t=(p,r,R)=>{if(!l.RELEASE_TYPES.includes(r))return null;const e=s(p,R);return e&&E(e,r)},s=(p,r)=>{const R=p instanceof n?p.version:p;return a(R,r)},E=(p,r)=>{if(o(r))return p.version;switch(p.prerelease=[],r){case"major":p.minor=0,p.patch=0;break;case"minor":p.patch=0;break}return p.format()},o=p=>p.startsWith("pre");return Pe=t,Pe}var _e,Cr;function pt(){if(Cr)return _e;Cr=1;class a{constructor(){this.max=1e3,this.map=new Map}get(n){const t=this.map.get(n);if(t!==void 0)return this.map.delete(n),this.map.set(n,t),t}delete(n){return this.map.delete(n)}set(n,t){if(!this.delete(n)&&t!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(n,t)}return this}}return _e=a,_e}var Me,Pr;function b(){if(Pr)return Me;Pr=1;const a=/\s+/g;class l{constructor(c,d){if(d=s(d),c instanceof l)return c.loose===!!d.loose&&c.includePrerelease===!!d.includePrerelease?c:new l(c.raw,d);if(c instanceof E)return this.raw=c.value,this.set=[[c]],this.formatted=void 0,this;if(this.options=d,this.loose=!!d.loose,this.includePrerelease=!!d.includePrerelease,this.raw=c.trim().replace(a," "),this.set=this.raw.split("||").map($=>this.parseRange($.trim())).filter($=>$.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const $=this.set[0];if(this.set=this.set.filter(I=>!q(I[0])),this.set.length===0)this.set=[$];else if(this.set.length>1){for(const I of this.set)if(I.length===1&&M(I[0])){this.set=[I];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let c=0;c<this.set.length;c++){c>0&&(this.formatted+="||");const d=this.set[c];for(let $=0;$<d.length;$++)$>0&&(this.formatted+=" "),this.formatted+=d[$].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(c){c=c.replace(S,"");const d=((this.options.includePrerelease&&g)|(this.options.loose&&h))+":"+c,$=t.get(d);if($)return $;const I=this.options.loose,v=I?r[e.HYPHENRANGELOOSE]:r[e.HYPHENRANGE];c=c.replace(v,re(this.options.includePrerelease)),o("hyphen replace",c),c=c.replace(r[e.COMPARATORTRIM],i),o("comparator trim",c),c=c.replace(r[e.TILDETRIM],u),o("tilde trim",c),c=c.replace(r[e.CARETTRIM],m),o("caret trim",c);let L=c.split(" ").map(P=>D(P,this.options)).join(" ").split(/\s+/).map(P=>ee(P,this.options));I&&(L=L.filter(P=>(o("loose invalid filter",P,this.options),!!P.match(r[e.COMPARATORLOOSE])))),o("range list",L);const T=new Map,O=L.map(P=>new E(P,this.options));for(const P of O){if(q(P))return[P];T.set(P.value,P)}T.size>1&&T.has("")&&T.delete("");const C=[...T.values()];return t.set(d,C),C}intersects(c,d){if(!(c instanceof l))throw new TypeError("a Range is required");return this.set.some($=>y($,d)&&c.set.some(I=>y(I,d)&&$.every(v=>I.every(L=>v.intersects(L,d)))))}test(c){if(!c)return!1;if(typeof c=="string")try{c=new p(c,this.options)}catch{return!1}for(let d=0;d<this.set.length;d++)if(te(this.set[d],c,this.options))return!0;return!1}}Me=l;const n=pt(),t=new n,s=We(),E=W(),o=H(),p=G(),{safeRe:r,src:R,t:e,comparatorTrimReplace:i,tildeTrimReplace:u,caretTrimReplace:m}=B(),{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:h}=x(),S=new RegExp(R[e.BUILD],"g"),q=f=>f.value==="<0.0.0-0",M=f=>f.value==="",y=(f,c)=>{let d=!0;const $=f.slice();let I=$.pop();for(;d&&$.length;)d=$.every(v=>I.intersects(v,c)),I=$.pop();return d},D=(f,c)=>(f=f.replace(r[e.BUILD],""),o("comp",f,c),f=X(f,c),o("caret",f),f=_(f,c),o("tildes",f),f=J(f,c),o("xrange",f),f=Q(f,c),o("stars",f),f),A=f=>!f||f.toLowerCase()==="x"||f==="*",w=(f,c,d)=>A(f)&&!A(c)||A(c)&&d&&!A(d),_=(f,c)=>f.trim().split(/\s+/).map(d=>N(d,c)).join(" "),N=(f,c)=>{const d=c.loose?r[e.TILDELOOSE]:r[e.TILDE];return f.replace(d,($,I,v,L,T)=>{o("tilde",f,$,I,v,L,T);let O;return A(I)?O="":A(v)?O=`>=${I}.0.0 <${+I+1}.0.0-0`:A(L)?O=`>=${I}.${v}.0 <${I}.${+v+1}.0-0`:T?(o("replaceTilde pr",T),O=`>=${I}.${v}.${L}-${T} <${I}.${+v+1}.0-0`):O=`>=${I}.${v}.${L} <${I}.${+v+1}.0-0`,o("tilde return",O),O})},X=(f,c)=>f.trim().split(/\s+/).map(d=>Z(d,c)).join(" "),Z=(f,c)=>{o("caret",f,c);const d=c.loose?r[e.CARETLOOSE]:r[e.CARET],$=c.includePrerelease?"-0":"";return f.replace(d,(I,v,L,T,O)=>{o("caret",f,I,v,L,T,O);let C;return A(v)?C="":A(L)?C=`>=${v}.0.0${$} <${+v+1}.0.0-0`:A(T)?v==="0"?C=`>=${v}.${L}.0${$} <${v}.${+L+1}.0-0`:C=`>=${v}.${L}.0${$} <${+v+1}.0.0-0`:O?(o("replaceCaret pr",O),v==="0"?L==="0"?C=`>=${v}.${L}.${T}-${O} <${v}.${L}.${+T+1}-0`:C=`>=${v}.${L}.${T}-${O} <${v}.${+L+1}.0-0`:C=`>=${v}.${L}.${T}-${O} <${+v+1}.0.0-0`):(o("no pr"),v==="0"?L==="0"?C=`>=${v}.${L}.${T} <${v}.${L}.${+T+1}-0`:C=`>=${v}.${L}.${T} <${v}.${+L+1}.0-0`:C=`>=${v}.${L}.${T} <${+v+1}.0.0-0`),o("caret return",C),C})},J=(f,c)=>(o("replaceXRanges",f,c),f.split(/\s+/).map(d=>K(d,c)).join(" ")),K=(f,c)=>{f=f.trim();const d=c.loose?r[e.XRANGELOOSE]:r[e.XRANGE];return f.replace(d,($,I,v,L,T,O)=>{if(o("xRange",f,$,I,v,L,T,O),w(v,L,T))return f;const C=A(v),P=C||A(L),U=P||A(T),V=U;return I==="="&&V&&(I=""),O=c.includePrerelease?"-0":"",C?I===">"||I==="<"?$="<0.0.0-0":$="*":I&&V?(P&&(L=0),T=0,I===">"?(I=">=",P?(v=+v+1,L=0,T=0):(L=+L+1,T=0)):I==="<="&&(I="<",P?v=+v+1:L=+L+1),I==="<"&&(O="-0"),$=`${I+v}.${L}.${T}${O}`):P?$=`>=${v}.0.0${O} <${+v+1}.0.0-0`:U&&($=`>=${v}.${L}.0${O} <${v}.${+L+1}.0-0`),o("xRange return",$),$})},Q=(f,c)=>(o("replaceStars",f,c),f.trim().replace(r[e.STAR],"")),ee=(f,c)=>(o("replaceGTE0",f,c),f.trim().replace(r[c.includePrerelease?e.GTE0PRE:e.GTE0],"")),re=f=>(c,d,$,I,v,L,T,O,C,P,U,V)=>(A($)?d="":A(I)?d=`>=${$}.0.0${f?"-0":""}`:A(v)?d=`>=${$}.${I}.0${f?"-0":""}`:L?d=`>=${d}`:d=`>=${d}${f?"-0":""}`,A(C)?O="":A(P)?O=`<${+C+1}.0.0-0`:A(U)?O=`<${C}.${+P+1}.0-0`:V?O=`<=${C}.${P}.${U}-${V}`:f?O=`<${C}.${P}.${+U+1}-0`:O=`<=${O}`,`${d} ${O}`.trim()),te=(f,c,d)=>{for(let $=0;$<f.length;$++)if(!f[$].test(c))return!1;if(c.prerelease.length&&!d.includePrerelease){for(let $=0;$<f.length;$++)if(o(f[$].semver),f[$].semver!==E.ANY&&f[$].semver.prerelease.length>0){const I=f[$].semver;if(I.major===c.major&&I.minor===c.minor&&I.patch===c.patch)return!0}return!1}return!0};return Me}var De,_r;function W(){if(_r)return De;_r=1;const a=Symbol("SemVer ANY");class l{static get ANY(){return a}constructor(e,i){if(i=n(i),e instanceof l){if(e.loose===!!i.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),o("comparator",e,i),this.options=i,this.loose=!!i.loose,this.parse(e),this.semver===a?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(e){const i=this.options.loose?t[s.COMPARATORLOOSE]:t[s.COMPARATOR],u=e.match(i);if(!u)throw new TypeError(`Invalid comparator: ${e}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new p(u[2],this.options.loose):this.semver=a}toString(){return this.value}test(e){if(o("Comparator.test",e,this.options.loose),this.semver===a||e===a)return!0;if(typeof e=="string")try{e=new p(e,this.options)}catch{return!1}return E(e,this.operator,this.semver,this.options)}intersects(e,i){if(!(e instanceof l))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new r(e.value,i).test(this.value):e.operator===""?e.value===""?!0:new r(this.value,i).test(e.semver):(i=n(i),i.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!i.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||E(this.semver,"<",e.semver,i)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||E(this.semver,">",e.semver,i)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}De=l;const n=We(),{safeRe:t,t:s}=B(),E=zr(),o=H(),p=G(),r=b();return De}var Ge,Mr;function z(){if(Mr)return Ge;Mr=1;const a=b();return Ge=(n,t,s)=>{try{t=new a(t,s)}catch{return!1}return t.test(n)},Ge}var ye,Dr;function ht(){if(Dr)return ye;Dr=1;const a=b();return ye=(n,t)=>new a(n,t).set.map(s=>s.map(E=>E.value).join(" ").trim().split(" ")),ye}var Fe,Gr;function Et(){if(Gr)return Fe;Gr=1;const a=G(),l=b();return Fe=(t,s,E)=>{let o=null,p=null,r=null;try{r=new l(s,E)}catch{return null}return t.forEach(R=>{r.test(R)&&(!o||p.compare(R)===-1)&&(o=R,p=new a(o,E))}),o},Fe}var be,yr;function ft(){if(yr)return be;yr=1;const a=G(),l=b();return be=(t,s,E)=>{let o=null,p=null,r=null;try{r=new l(s,E)}catch{return null}return t.forEach(R=>{r.test(R)&&(!o||p.compare(R)===1)&&(o=R,p=new a(o,E))}),o},be}var je,Fr;function mt(){if(Fr)return je;Fr=1;const a=G(),l=b(),n=Y();return je=(s,E)=>{s=new l(s,E);let o=new a("0.0.0");if(s.test(o)||(o=new a("0.0.0-0"),s.test(o)))return o;o=null;for(let p=0;p<s.set.length;++p){const r=s.set[p];let R=null;r.forEach(e=>{const i=new a(e.semver.version);switch(e.operator){case">":i.prerelease.length===0?i.patch++:i.prerelease.push(0),i.raw=i.format();case"":case">=":(!R||n(i,R))&&(R=i);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}),R&&(!o||n(o,R))&&(o=R)}return o&&s.test(o)?o:null},je}var Ue,br;function Rt(){if(br)return Ue;br=1;const a=b();return Ue=(n,t)=>{try{return new a(n,t).range||"*"}catch{return null}},Ue}var Xe,jr;function Qe(){if(jr)return Xe;jr=1;const a=G(),l=W(),{ANY:n}=l,t=b(),s=z(),E=Y(),o=Ze(),p=Ke(),r=Je();return Xe=(e,i,u,m)=>{e=new a(e,m),i=new t(i,m);let g,h,S,q,M;switch(u){case">":g=E,h=p,S=o,q=">",M=">=";break;case"<":g=o,h=r,S=E,q="<",M="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,i,m))return!1;for(let y=0;y<i.set.length;++y){const D=i.set[y];let A=null,w=null;if(D.forEach(_=>{_.semver===n&&(_=new l(">=0.0.0")),A=A||_,w=w||_,g(_.semver,A.semver,m)?A=_:S(_.semver,w.semver,m)&&(w=_)}),A.operator===q||A.operator===M||(!w.operator||w.operator===q)&&h(e,w.semver)||w.operator===M&&S(e,w.semver))return!1}return!0},Xe}var Ve,Ur;function vt(){if(Ur)return Ve;Ur=1;const a=Qe();return Ve=(n,t,s)=>a(n,t,">",s),Ve}var xe,Xr;function dt(){if(Xr)return xe;Xr=1;const a=Qe();return xe=(n,t,s)=>a(n,t,"<",s),xe}var Be,Vr;function $t(){if(Vr)return Be;Vr=1;const a=b();return Be=(n,t,s)=>(n=new a(n,s),t=new a(t,s),n.intersects(t,s)),Be}var ke,xr;function It(){if(xr)return ke;xr=1;const a=z(),l=F();return ke=(n,t,s)=>{const E=[];let o=null,p=null;const r=n.sort((u,m)=>l(u,m,s));for(const u of r)a(u,t,s)?(p=u,o||(o=u)):(p&&E.push([o,p]),p=null,o=null);o&&E.push([o,null]);const R=[];for(const[u,m]of E)u===m?R.push(u):!m&&u===r[0]?R.push("*"):m?u===r[0]?R.push(`<=${m}`):R.push(`${u} - ${m}`):R.push(`>=${u}`);const e=R.join(" || "),i=typeof t.raw=="string"?t.raw:String(t);return e.length<i.length?e:t},ke}var He,Br;function Lt(){if(Br)return He;Br=1;const a=b(),l=W(),{ANY:n}=l,t=z(),s=F(),E=(i,u,m={})=>{if(i===u)return!0;i=new a(i,m),u=new a(u,m);let g=!1;e:for(const h of i.set){for(const S of u.set){const q=r(h,S,m);if(g=g||q!==null,q)continue e}if(g)return!1}return!0},o=[new l(">=0.0.0-0")],p=[new l(">=0.0.0")],r=(i,u,m)=>{if(i===u)return!0;if(i.length===1&&i[0].semver===n){if(u.length===1&&u[0].semver===n)return!0;m.includePrerelease?i=o:i=p}if(u.length===1&&u[0].semver===n){if(m.includePrerelease)return!0;u=p}const g=new Set;let h,S;for(const N of i)N.operator===">"||N.operator===">="?h=R(h,N,m):N.operator==="<"||N.operator==="<="?S=e(S,N,m):g.add(N.semver);if(g.size>1)return null;let q;if(h&&S&&(q=s(h.semver,S.semver,m),q>0||q===0&&(h.operator!==">="||S.operator!=="<=")))return null;for(const N of g){if(h&&!t(N,String(h),m)||S&&!t(N,String(S),m))return null;for(const X of u)if(!t(N,String(X),m))return!1;return!0}let M,y,D,A,w=S&&!m.includePrerelease&&S.semver.prerelease.length?S.semver:!1,_=h&&!m.includePrerelease&&h.semver.prerelease.length?h.semver:!1;w&&w.prerelease.length===1&&S.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(const N of u){if(A=A||N.operator===">"||N.operator===">=",D=D||N.operator==="<"||N.operator==="<=",h){if(_&&N.semver.prerelease&&N.semver.prerelease.length&&N.semver.major===_.major&&N.semver.minor===_.minor&&N.semver.patch===_.patch&&(_=!1),N.operator===">"||N.operator===">="){if(M=R(h,N,m),M===N&&M!==h)return!1}else if(h.operator===">="&&!N.test(h.semver))return!1}if(S){if(w&&N.semver.prerelease&&N.semver.prerelease.length&&N.semver.major===w.major&&N.semver.minor===w.minor&&N.semver.patch===w.patch&&(w=!1),N.operator==="<"||N.operator==="<="){if(y=e(S,N,m),y===N&&y!==S)return!1}else if(S.operator==="<="&&!N.test(S.semver))return!1}if(!N.operator&&(S||h)&&q!==0)return!1}return!(h&&D&&!S&&q!==0||S&&A&&!h&&q!==0||_||w)},R=(i,u,m)=>{if(!i)return u;const g=s(i.semver,u.semver,m);return g>0?i:g<0||u.operator===">"&&i.operator===">="?u:i},e=(i,u,m)=>{if(!i)return u;const g=s(i.semver,u.semver,m);return g<0?i:g>0||u.operator==="<"&&i.operator==="<="?u:i};return He=E,He}var Ye,kr;function gt(){if(kr)return Ye;kr=1;const a=B(),l=x(),n=G(),t=Hr(),s=j(),E=Jr(),o=Kr(),p=Qr(),r=et(),R=rt(),e=tt(),i=st(),u=it(),m=F(),g=nt(),h=at(),S=ze(),q=ot(),M=ut(),y=Y(),D=Ze(),A=Yr(),w=Wr(),_=Je(),N=Ke(),X=zr(),Z=lt(),J=ct(),K=W(),Q=b(),ee=z(),re=ht(),te=Et(),f=ft(),c=mt(),d=Rt(),$=Qe(),I=vt(),v=dt(),L=$t(),T=It(),O=Lt();return Ye={parse:s,valid:E,clean:o,inc:p,diff:r,major:R,minor:e,patch:i,prerelease:u,compare:m,rcompare:g,compareLoose:h,compareBuild:S,sort:q,rsort:M,gt:y,lt:D,eq:A,neq:w,gte:_,lte:N,cmp:X,coerce:Z,truncate:J,Comparator:K,Range:Q,satisfies:ee,toComparators:re,maxSatisfying:te,minSatisfying:f,minVersion:c,validRange:d,outside:$,gtr:I,ltr:v,intersects:L,simplifyRange:T,subset:O,SemVer:n,re:a.re,src:a.src,tokens:a.t,SEMVER_SPEC_VERSION:l.SEMVER_SPEC_VERSION,RELEASE_TYPES:l.RELEASE_TYPES,compareIdentifiers:t.compareIdentifiers,rcompareIdentifiers:t.rcompareIdentifiers},Ye}var Nt=gt();const Ot=Zr(Nt);export{Kr as a,Jr as r,Nt as s,Ot as u};