@socketsecurity/lib 5.18.2 → 5.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +6 -5
  3. package/dist/abort.d.ts +3 -0
  4. package/dist/abort.js +1 -0
  5. package/dist/agent.d.ts +66 -49
  6. package/dist/agent.js +51 -50
  7. package/dist/ansi.d.ts +2 -5
  8. package/dist/ansi.js +3 -2
  9. package/dist/archives.d.ts +25 -21
  10. package/dist/archives.js +35 -34
  11. package/dist/argv/flags.d.ts +100 -91
  12. package/dist/argv/flags.js +88 -87
  13. package/dist/argv/parse.d.ts +30 -40
  14. package/dist/argv/parse.js +33 -32
  15. package/dist/arrays.d.ts +4 -8
  16. package/dist/arrays.js +1 -0
  17. package/dist/bin.d.ts +7 -5
  18. package/dist/bin.js +52 -29
  19. package/dist/cacache.d.ts +13 -12
  20. package/dist/cacache.js +9 -8
  21. package/dist/cache-with-ttl.d.ts +53 -35
  22. package/dist/cache-with-ttl.js +1 -0
  23. package/dist/colors.d.ts +5 -5
  24. package/dist/colors.js +1 -0
  25. package/dist/constants/agents.d.ts +5 -9
  26. package/dist/constants/agents.js +3 -2
  27. package/dist/constants/core.d.ts +5 -10
  28. package/dist/constants/core.js +2 -1
  29. package/dist/constants/encoding.d.ts +3 -3
  30. package/dist/constants/encoding.js +1 -0
  31. package/dist/constants/github.d.ts +3 -3
  32. package/dist/constants/github.js +1 -0
  33. package/dist/constants/licenses.d.ts +9 -2
  34. package/dist/constants/licenses.js +1 -0
  35. package/dist/constants/lifecycle-script-names.js +1 -0
  36. package/dist/constants/maintained-node-versions.d.ts +3 -0
  37. package/dist/constants/maintained-node-versions.js +1 -0
  38. package/dist/constants/node.d.ts +125 -16
  39. package/dist/constants/node.js +74 -73
  40. package/dist/constants/package-default-node-range.d.ts +3 -1
  41. package/dist/constants/package-default-node-range.js +2 -1
  42. package/dist/constants/package-default-socket-categories.d.ts +0 -1
  43. package/dist/constants/package-default-socket-categories.js +1 -0
  44. package/dist/constants/packages.d.ts +12 -17
  45. package/dist/constants/packages.js +31 -16
  46. package/dist/constants/platform.d.ts +1 -2
  47. package/dist/constants/platform.js +2 -1
  48. package/dist/constants/process.d.ts +18 -0
  49. package/dist/constants/process.js +1 -0
  50. package/dist/constants/socket.d.ts +4 -10
  51. package/dist/constants/socket.js +2 -1
  52. package/dist/constants/testing.d.ts +3 -3
  53. package/dist/constants/testing.js +1 -0
  54. package/dist/constants/time.d.ts +3 -4
  55. package/dist/constants/time.js +1 -0
  56. package/dist/constants/typescript.d.ts +10 -3
  57. package/dist/constants/typescript.js +5 -4
  58. package/dist/cover/code.d.ts +3 -0
  59. package/dist/cover/code.js +12 -12
  60. package/dist/cover/formatters.d.ts +12 -9
  61. package/dist/cover/formatters.js +19 -18
  62. package/dist/cover/type.d.ts +3 -0
  63. package/dist/cover/type.js +1 -0
  64. package/dist/cover/types.js +1 -0
  65. package/dist/debug.d.ts +32 -47
  66. package/dist/debug.js +97 -96
  67. package/dist/dlx/arborist.d.ts +134 -0
  68. package/dist/dlx/arborist.js +177 -0
  69. package/dist/dlx/binary.d.ts +25 -9
  70. package/dist/dlx/binary.js +34 -12
  71. package/dist/dlx/cache.d.ts +1 -0
  72. package/dist/dlx/cache.js +2 -1
  73. package/dist/dlx/detect.d.ts +15 -0
  74. package/dist/dlx/detect.js +28 -20
  75. package/dist/dlx/dir.d.ts +1 -11
  76. package/dist/dlx/dir.js +2 -12
  77. package/dist/dlx/integrity.d.ts +86 -0
  78. package/dist/dlx/integrity.js +112 -0
  79. package/dist/dlx/lockfile.d.ts +115 -0
  80. package/dist/dlx/lockfile.js +139 -0
  81. package/dist/dlx/manifest.d.ts +26 -1
  82. package/dist/dlx/manifest.js +9 -6
  83. package/dist/dlx/package.d.ts +58 -3
  84. package/dist/dlx/package.js +101 -74
  85. package/dist/dlx/packages.d.ts +1 -11
  86. package/dist/dlx/packages.js +3 -14
  87. package/dist/dlx/paths.d.ts +1 -0
  88. package/dist/dlx/paths.js +2 -1
  89. package/dist/effects/pulse-frames.js +1 -0
  90. package/dist/effects/text-shimmer.d.ts +13 -2
  91. package/dist/effects/text-shimmer.js +50 -46
  92. package/dist/effects/types.js +1 -0
  93. package/dist/effects/ultra.js +1 -0
  94. package/dist/env/ci.d.ts +6 -1
  95. package/dist/env/ci.js +1 -0
  96. package/dist/env/debug.d.ts +5 -1
  97. package/dist/env/debug.js +1 -0
  98. package/dist/env/github.d.ts +19 -23
  99. package/dist/env/github.js +5 -4
  100. package/dist/env/helpers.d.ts +21 -9
  101. package/dist/env/helpers.js +5 -11
  102. package/dist/env/home.d.ts +17 -4
  103. package/dist/env/home.js +2 -1
  104. package/dist/env/locale.d.ts +4 -3
  105. package/dist/env/locale.js +1 -0
  106. package/dist/env/node-auth-token.d.ts +5 -1
  107. package/dist/env/node-auth-token.js +1 -0
  108. package/dist/env/node-env.d.ts +5 -1
  109. package/dist/env/node-env.js +1 -0
  110. package/dist/env/npm.d.ts +4 -5
  111. package/dist/env/npm.js +1 -0
  112. package/dist/env/package-manager.d.ts +4 -3
  113. package/dist/env/package-manager.js +2 -1
  114. package/dist/env/path.d.ts +5 -1
  115. package/dist/env/path.js +1 -0
  116. package/dist/env/pre-commit.d.ts +5 -1
  117. package/dist/env/pre-commit.js +1 -0
  118. package/dist/env/rewire.d.ts +10 -0
  119. package/dist/env/rewire.js +7 -5
  120. package/dist/env/shell.d.ts +5 -1
  121. package/dist/env/shell.js +1 -0
  122. package/dist/env/socket-cli-shadow.d.ts +4 -5
  123. package/dist/env/socket-cli-shadow.js +1 -0
  124. package/dist/env/socket-cli.d.ts +4 -14
  125. package/dist/env/socket-cli.js +1 -0
  126. package/dist/env/socket.d.ts +6 -18
  127. package/dist/env/socket.js +4 -3
  128. package/dist/env/temp-dir.d.ts +4 -3
  129. package/dist/env/temp-dir.js +1 -0
  130. package/dist/env/term.d.ts +5 -1
  131. package/dist/env/term.js +1 -0
  132. package/dist/env/test.d.ts +4 -3
  133. package/dist/env/test.js +1 -0
  134. package/dist/env/windows.d.ts +4 -4
  135. package/dist/env/windows.js +1 -0
  136. package/dist/env/xdg.d.ts +4 -3
  137. package/dist/env/xdg.js +1 -0
  138. package/dist/env.d.ts +83 -23
  139. package/dist/env.js +112 -80
  140. package/dist/errors.js +1 -0
  141. package/dist/external/@socketregistry/packageurl-js.js +2 -2
  142. package/dist/external/external-pack.js +1562 -1673
  143. package/dist/external/npm-pack.js +5 -1
  144. package/dist/fs.d.ts +92 -113
  145. package/dist/fs.js +35 -35
  146. package/dist/git.d.ts +170 -164
  147. package/dist/git.js +113 -87
  148. package/dist/github.d.ts +249 -227
  149. package/dist/github.js +82 -81
  150. package/dist/globs.d.ts +31 -17
  151. package/dist/globs.js +51 -58
  152. package/dist/http-request.d.ts +99 -99
  153. package/dist/http-request.js +182 -156
  154. package/dist/ipc-cli.d.ts +28 -0
  155. package/dist/{utils/get-ipc.js → ipc-cli.js} +4 -3
  156. package/dist/ipc.d.ts +9 -299
  157. package/dist/ipc.js +18 -204
  158. package/dist/json/edit.d.ts +3 -1
  159. package/dist/json/edit.js +30 -30
  160. package/dist/json/format.d.ts +36 -36
  161. package/dist/json/format.js +22 -21
  162. package/dist/json/parse.d.ts +4 -2
  163. package/dist/json/parse.js +1 -0
  164. package/dist/json/types.js +1 -0
  165. package/dist/{links/index.d.ts → links.d.ts} +6 -2
  166. package/dist/{links/index.js → links.js} +5 -4
  167. package/dist/logger.d.ts +4 -6
  168. package/dist/logger.js +61 -53
  169. package/dist/memoization.d.ts +52 -49
  170. package/dist/memoization.js +55 -33
  171. package/dist/objects.d.ts +25 -44
  172. package/dist/objects.js +2 -1
  173. package/dist/package-extensions.d.ts +6 -0
  174. package/dist/package-extensions.js +2 -1
  175. package/dist/packages/edit.d.ts +3 -5
  176. package/dist/packages/edit.js +4 -3
  177. package/dist/packages/exports.d.ts +11 -14
  178. package/dist/packages/exports.js +11 -10
  179. package/dist/packages/isolation.d.ts +4 -0
  180. package/dist/packages/isolation.js +20 -19
  181. package/dist/packages/licenses.d.ts +3 -10
  182. package/dist/packages/licenses.js +2 -1
  183. package/dist/packages/manifest.d.ts +3 -3
  184. package/dist/packages/manifest.js +1 -0
  185. package/dist/packages/normalize.d.ts +3 -4
  186. package/dist/packages/normalize.js +1 -0
  187. package/dist/packages/operations.d.ts +3 -10
  188. package/dist/packages/operations.js +1 -0
  189. package/dist/packages/provenance.d.ts +10 -8
  190. package/dist/packages/provenance.js +55 -54
  191. package/dist/packages/specs.d.ts +3 -5
  192. package/dist/packages/specs.js +1 -0
  193. package/dist/packages/validation.d.ts +3 -3
  194. package/dist/packages/validation.js +1 -0
  195. package/dist/packages.d.ts +2 -17
  196. package/dist/packages.js +2 -1
  197. package/dist/paths/dirnames.d.ts +0 -2
  198. package/dist/paths/dirnames.js +1 -0
  199. package/dist/paths/exts.d.ts +0 -1
  200. package/dist/paths/exts.js +1 -0
  201. package/dist/paths/filenames.d.ts +0 -1
  202. package/dist/paths/filenames.js +1 -0
  203. package/dist/paths/globs.d.ts +0 -1
  204. package/dist/paths/globs.js +1 -0
  205. package/dist/paths/normalize.d.ts +115 -123
  206. package/dist/paths/normalize.js +128 -127
  207. package/dist/paths/packages.d.ts +3 -2
  208. package/dist/paths/packages.js +2 -1
  209. package/dist/paths/rewire.d.ts +9 -0
  210. package/dist/paths/rewire.js +5 -3
  211. package/dist/paths/socket.d.ts +37 -23
  212. package/dist/paths/socket.js +26 -25
  213. package/dist/performance.d.ts +87 -84
  214. package/dist/performance.js +97 -96
  215. package/dist/process-lock.d.ts +41 -1
  216. package/dist/process-lock.js +24 -17
  217. package/dist/promise-queue.d.ts +6 -0
  218. package/dist/promise-queue.js +1 -0
  219. package/dist/promises.d.ts +40 -55
  220. package/dist/promises.js +12 -11
  221. package/dist/regexps.d.ts +0 -5
  222. package/dist/regexps.js +1 -0
  223. package/dist/releases/github.d.ts +59 -63
  224. package/dist/releases/github.js +95 -100
  225. package/dist/releases/socket-btm.d.ts +9 -2
  226. package/dist/releases/socket-btm.js +32 -25
  227. package/dist/sea.d.ts +5 -0
  228. package/dist/sea.js +1 -0
  229. package/dist/shadow.d.ts +4 -0
  230. package/dist/shadow.js +1 -0
  231. package/dist/signal-exit.d.ts +7 -7
  232. package/dist/signal-exit.js +46 -45
  233. package/dist/sorts.d.ts +5 -7
  234. package/dist/sorts.js +11 -10
  235. package/dist/spawn.d.ts +96 -77
  236. package/dist/spawn.js +39 -38
  237. package/dist/spinner.d.ts +21 -22
  238. package/dist/spinner.js +15 -11
  239. package/dist/ssri.d.ts +31 -36
  240. package/dist/ssri.js +15 -14
  241. package/dist/stdio/_stream.d.ts +31 -0
  242. package/dist/stdio/_stream.js +57 -0
  243. package/dist/stdio/clear.d.ts +38 -15
  244. package/dist/stdio/clear.js +5 -4
  245. package/dist/stdio/divider.d.ts +40 -36
  246. package/dist/stdio/divider.js +10 -9
  247. package/dist/stdio/footer.d.ts +20 -0
  248. package/dist/stdio/footer.js +12 -2
  249. package/dist/stdio/header.d.ts +4 -16
  250. package/dist/stdio/header.js +1 -9
  251. package/dist/stdio/progress.d.ts +4 -0
  252. package/dist/stdio/progress.js +13 -8
  253. package/dist/stdio/prompts.d.ts +24 -23
  254. package/dist/stdio/prompts.js +10 -9
  255. package/dist/stdio/stderr.d.ts +51 -39
  256. package/dist/stdio/stderr.js +19 -22
  257. package/dist/stdio/stdout.d.ts +54 -52
  258. package/dist/stdio/stdout.js +35 -33
  259. package/dist/streams.d.ts +4 -3
  260. package/dist/streams.js +1 -0
  261. package/dist/strings.d.ts +31 -85
  262. package/dist/strings.js +5 -49
  263. package/dist/suppress-warnings.d.ts +32 -15
  264. package/dist/suppress-warnings.js +14 -13
  265. package/dist/tables.d.ts +30 -26
  266. package/dist/tables.js +24 -23
  267. package/dist/temporary-executor.d.ts +4 -0
  268. package/dist/temporary-executor.js +1 -0
  269. package/dist/themes/context.d.ts +30 -26
  270. package/dist/themes/context.js +19 -18
  271. package/dist/themes/index.d.ts +0 -4
  272. package/dist/themes/index.js +1 -0
  273. package/dist/themes/themes.d.ts +1 -1
  274. package/dist/themes/themes.js +1 -0
  275. package/dist/themes/types.js +1 -0
  276. package/dist/themes/utils.d.ts +46 -43
  277. package/dist/themes/utils.js +45 -44
  278. package/dist/types.d.ts +48 -52
  279. package/dist/types.js +35 -35
  280. package/dist/url.d.ts +48 -53
  281. package/dist/url.js +38 -37
  282. package/dist/validation/json-parser.d.ts +19 -190
  283. package/dist/validation/json-parser.js +5 -69
  284. package/dist/validation/types.d.ts +9 -33
  285. package/dist/validation/types.js +1 -0
  286. package/dist/versions.d.ts +1 -0
  287. package/dist/versions.js +2 -1
  288. package/dist/words.d.ts +3 -6
  289. package/dist/words.js +1 -0
  290. package/dist/zod.js +1 -0
  291. package/package.json +40 -54
  292. package/dist/functions.d.ts +0 -57
  293. package/dist/functions.js +0 -70
  294. package/dist/stdio/mask.d.ts +0 -151
  295. package/dist/stdio/mask.js +0 -224
  296. package/dist/utils/get-ipc.d.ts +0 -15
@@ -81,11 +81,11 @@ var require_cjs = __commonJS({
81
81
  Object.defineProperty(exports2, "signals", { enumerable: true, get: /* @__PURE__ */ __name(function() {
82
82
  return signals_js_1.signals;
83
83
  }, "get") });
84
- var processOk = /* @__PURE__ */ __name((process5) => !!process5 && typeof process5 === "object" && typeof process5.removeListener === "function" && typeof process5.emit === "function" && typeof process5.reallyExit === "function" && typeof process5.listeners === "function" && typeof process5.kill === "function" && typeof process5.pid === "number" && typeof process5.on === "function", "processOk");
85
- var kExitEmitter = Symbol.for("signal-exit emitter");
86
- var global = globalThis;
87
- var ObjectDefineProperty = Object.defineProperty.bind(Object);
88
- var Emitter = class {
84
+ var processOk2 = /* @__PURE__ */ __name((process7) => !!process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function", "processOk");
85
+ var kExitEmitter2 = Symbol.for("signal-exit emitter");
86
+ var global2 = globalThis;
87
+ var ObjectDefineProperty2 = Object.defineProperty.bind(Object);
88
+ var Emitter2 = class {
89
89
  static {
90
90
  __name(this, "Emitter");
91
91
  }
@@ -100,10 +100,10 @@ var require_cjs = __commonJS({
100
100
  count = 0;
101
101
  id = Math.random();
102
102
  constructor() {
103
- if (global[kExitEmitter]) {
104
- return global[kExitEmitter];
103
+ if (global2[kExitEmitter2]) {
104
+ return global2[kExitEmitter2];
105
105
  }
106
- ObjectDefineProperty(global, kExitEmitter, {
106
+ ObjectDefineProperty2(global2, kExitEmitter2, {
107
107
  value: this,
108
108
  writable: false,
109
109
  enumerable: false,
@@ -140,12 +140,12 @@ var require_cjs = __commonJS({
140
140
  return ret;
141
141
  }
142
142
  };
143
- var SignalExitBase = class {
143
+ var SignalExitBase2 = class {
144
144
  static {
145
145
  __name(this, "SignalExitBase");
146
146
  }
147
147
  };
148
- var signalExitWrap = /* @__PURE__ */ __name((handler) => {
148
+ var signalExitWrap2 = /* @__PURE__ */ __name((handler) => {
149
149
  return {
150
150
  onExit(cb, opts) {
151
151
  return handler.onExit(cb, opts);
@@ -158,7 +158,7 @@ var require_cjs = __commonJS({
158
158
  }
159
159
  };
160
160
  }, "signalExitWrap");
161
- var SignalExitFallback = class extends SignalExitBase {
161
+ var SignalExitFallback2 = class extends SignalExitBase2 {
162
162
  static {
163
163
  __name(this, "SignalExitFallback");
164
164
  }
@@ -171,30 +171,30 @@ var require_cjs = __commonJS({
171
171
  unload() {
172
172
  }
173
173
  };
174
- var SignalExit = class extends SignalExitBase {
174
+ var SignalExit2 = class extends SignalExitBase2 {
175
175
  static {
176
176
  __name(this, "SignalExit");
177
177
  }
178
178
  // "SIGHUP" throws an `ENOSYS` error on Windows,
179
179
  // so use a supported signal instead
180
180
  /* c8 ignore start */
181
- #hupSig = process4.platform === "win32" ? "SIGINT" : "SIGHUP";
181
+ #hupSig = process6.platform === "win32" ? "SIGINT" : "SIGHUP";
182
182
  /* c8 ignore stop */
183
- #emitter = new Emitter();
183
+ #emitter = new Emitter2();
184
184
  #process;
185
185
  #originalProcessEmit;
186
186
  #originalProcessReallyExit;
187
187
  #sigListeners = {};
188
188
  #loaded = false;
189
- constructor(process5) {
189
+ constructor(process7) {
190
190
  super();
191
- this.#process = process5;
191
+ this.#process = process7;
192
192
  this.#sigListeners = {};
193
193
  for (const sig of signals_js_1.signals) {
194
194
  this.#sigListeners[sig] = () => {
195
195
  const listeners = this.#process.listeners(sig);
196
196
  let { count } = this.#emitter;
197
- const p = process5;
197
+ const p = process7;
198
198
  if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
199
199
  count += p.__signal_exit_emitter__.count;
200
200
  }
@@ -203,15 +203,15 @@ var require_cjs = __commonJS({
203
203
  const ret = this.#emitter.emit("exit", null, sig);
204
204
  const s = sig === "SIGHUP" ? this.#hupSig : sig;
205
205
  if (!ret)
206
- process5.kill(process5.pid, s);
206
+ process7.kill(process7.pid, s);
207
207
  }
208
208
  };
209
209
  }
210
- this.#originalProcessReallyExit = process5.reallyExit;
211
- this.#originalProcessEmit = process5.emit;
210
+ this.#originalProcessReallyExit = process7.reallyExit;
211
+ this.#originalProcessEmit = process7.emit;
212
212
  }
213
213
  onExit(cb, opts) {
214
- if (!processOk(this.#process)) {
214
+ if (!processOk2(this.#process)) {
215
215
  return () => {
216
216
  };
217
217
  }
@@ -268,7 +268,7 @@ var require_cjs = __commonJS({
268
268
  this.#emitter.count -= 1;
269
269
  }
270
270
  #processReallyExit(code) {
271
- if (!processOk(this.#process)) {
271
+ if (!processOk2(this.#process)) {
272
272
  return 0;
273
273
  }
274
274
  this.#process.exitCode = code || 0;
@@ -277,7 +277,7 @@ var require_cjs = __commonJS({
277
277
  }
278
278
  #processEmit(ev, ...args) {
279
279
  const og = this.#originalProcessEmit;
280
- if (ev === "exit" && processOk(this.#process)) {
280
+ if (ev === "exit" && processOk2(this.#process)) {
281
281
  if (typeof args[0] === "number") {
282
282
  this.#process.exitCode = args[0];
283
283
  }
@@ -289,8 +289,8 @@ var require_cjs = __commonJS({
289
289
  }
290
290
  }
291
291
  };
292
- var process4 = globalThis.process;
293
- _a = signalExitWrap(processOk(process4) ? new SignalExit(process4) : new SignalExitFallback()), /**
292
+ var process6 = globalThis.process;
293
+ _a = signalExitWrap2(processOk2(process6) ? new SignalExit2(process6) : new SignalExitFallback2()), /**
294
294
  * Called when the process is exiting, whether via signal, explicit
295
295
  * exit, or running out of stuff to do.
296
296
  *
@@ -566,46 +566,35 @@ var require_yoctocolors_cjs = __commonJS({
566
566
  }
567
567
  });
568
568
 
569
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/key.js
570
- var require_key = __commonJS({
571
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/key.js"(exports2) {
572
- "use strict";
573
- Object.defineProperty(exports2, "__esModule", { value: true });
574
- exports2.isEnterKey = exports2.isNumberKey = exports2.isTabKey = exports2.isBackspaceKey = exports2.isSpaceKey = exports2.isDownKey = exports2.isUpKey = void 0;
575
- var isUpKey = /* @__PURE__ */ __name((key, keybindings = []) => (
569
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/key.js
570
+ var isUpKey, isDownKey, isSpaceKey, isBackspaceKey, isTabKey, isNumberKey, isEnterKey;
571
+ var init_key = __esm({
572
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/key.js"() {
573
+ isUpKey = /* @__PURE__ */ __name((key, keybindings = []) => (
576
574
  // The up key
577
575
  key.name === "up" || // Vim keybinding: hjkl keys map to left/down/up/right
578
576
  keybindings.includes("vim") && key.name === "k" || // Emacs keybinding: Ctrl+P means "previous" in Emacs navigation conventions
579
577
  keybindings.includes("emacs") && key.ctrl && key.name === "p"
580
578
  ), "isUpKey");
581
- exports2.isUpKey = isUpKey;
582
- var isDownKey = /* @__PURE__ */ __name((key, keybindings = []) => (
579
+ isDownKey = /* @__PURE__ */ __name((key, keybindings = []) => (
583
580
  // The down key
584
581
  key.name === "down" || // Vim keybinding: hjkl keys map to left/down/up/right
585
582
  keybindings.includes("vim") && key.name === "j" || // Emacs keybinding: Ctrl+N means "next" in Emacs navigation conventions
586
583
  keybindings.includes("emacs") && key.ctrl && key.name === "n"
587
584
  ), "isDownKey");
588
- exports2.isDownKey = isDownKey;
589
- var isSpaceKey = /* @__PURE__ */ __name((key) => key.name === "space", "isSpaceKey");
590
- exports2.isSpaceKey = isSpaceKey;
591
- var isBackspaceKey = /* @__PURE__ */ __name((key) => key.name === "backspace", "isBackspaceKey");
592
- exports2.isBackspaceKey = isBackspaceKey;
593
- var isTabKey = /* @__PURE__ */ __name((key) => key.name === "tab", "isTabKey");
594
- exports2.isTabKey = isTabKey;
595
- var isNumberKey = /* @__PURE__ */ __name((key) => "1234567890".includes(key.name), "isNumberKey");
596
- exports2.isNumberKey = isNumberKey;
597
- var isEnterKey = /* @__PURE__ */ __name((key) => key.name === "enter" || key.name === "return", "isEnterKey");
598
- exports2.isEnterKey = isEnterKey;
585
+ isSpaceKey = /* @__PURE__ */ __name((key) => key.name === "space", "isSpaceKey");
586
+ isBackspaceKey = /* @__PURE__ */ __name((key) => key.name === "backspace", "isBackspaceKey");
587
+ isTabKey = /* @__PURE__ */ __name((key) => key.name === "tab", "isTabKey");
588
+ isNumberKey = /* @__PURE__ */ __name((key) => "1234567890".includes(key.name), "isNumberKey");
589
+ isEnterKey = /* @__PURE__ */ __name((key) => key.name === "enter" || key.name === "return", "isEnterKey");
599
590
  }
600
591
  });
601
592
 
602
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/errors.js
603
- var require_errors = __commonJS({
604
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/errors.js"(exports2) {
605
- "use strict";
606
- Object.defineProperty(exports2, "__esModule", { value: true });
607
- exports2.ValidationError = exports2.HookError = exports2.ExitPromptError = exports2.CancelPromptError = exports2.AbortPromptError = void 0;
608
- var AbortPromptError = class extends Error {
593
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/errors.js
594
+ var AbortPromptError, CancelPromptError, ExitPromptError, HookError, ValidationError;
595
+ var init_errors = __esm({
596
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/errors.js"() {
597
+ AbortPromptError = class extends Error {
609
598
  static {
610
599
  __name(this, "AbortPromptError");
611
600
  }
@@ -616,133 +605,121 @@ var require_errors = __commonJS({
616
605
  this.cause = options?.cause;
617
606
  }
618
607
  };
619
- exports2.AbortPromptError = AbortPromptError;
620
- var CancelPromptError = class extends Error {
608
+ CancelPromptError = class extends Error {
621
609
  static {
622
610
  __name(this, "CancelPromptError");
623
611
  }
624
612
  name = "CancelPromptError";
625
613
  message = "Prompt was canceled";
626
614
  };
627
- exports2.CancelPromptError = CancelPromptError;
628
- var ExitPromptError = class extends Error {
615
+ ExitPromptError = class extends Error {
629
616
  static {
630
617
  __name(this, "ExitPromptError");
631
618
  }
632
619
  name = "ExitPromptError";
633
620
  };
634
- exports2.ExitPromptError = ExitPromptError;
635
- var HookError = class extends Error {
621
+ HookError = class extends Error {
636
622
  static {
637
623
  __name(this, "HookError");
638
624
  }
639
625
  name = "HookError";
640
626
  };
641
- exports2.HookError = HookError;
642
- var ValidationError = class extends Error {
627
+ ValidationError = class extends Error {
643
628
  static {
644
629
  __name(this, "ValidationError");
645
630
  }
646
631
  name = "ValidationError";
647
632
  };
648
- exports2.ValidationError = ValidationError;
649
633
  }
650
634
  });
651
635
 
652
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.js
653
- var require_hook_engine = __commonJS({
654
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.js"(exports2) {
655
- "use strict";
656
- Object.defineProperty(exports2, "__esModule", { value: true });
657
- exports2.effectScheduler = void 0;
658
- exports2.withHooks = withHooks;
659
- exports2.readline = readline;
660
- exports2.withUpdates = withUpdates;
661
- exports2.withPointer = withPointer;
662
- exports2.handleChange = handleChange;
663
- var node_async_hooks_1 = require("node:async_hooks");
664
- var errors_ts_1 = require_errors();
665
- var hookStorage = new node_async_hooks_1.AsyncLocalStorage();
666
- function createStore(rl) {
667
- const store = {
668
- rl,
669
- hooks: [],
670
- hooksCleanup: [],
671
- hooksEffect: [],
672
- index: 0,
673
- handleChange() {
674
- }
636
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/hook-engine.js
637
+ function createStore(rl) {
638
+ const store = {
639
+ rl,
640
+ hooks: [],
641
+ hooksCleanup: [],
642
+ hooksEffect: [],
643
+ index: 0,
644
+ handleChange() {
645
+ }
646
+ };
647
+ return store;
648
+ }
649
+ function withHooks(rl, cb) {
650
+ const store = createStore(rl);
651
+ return hookStorage.run(store, () => {
652
+ function cycle(render) {
653
+ store.handleChange = () => {
654
+ store.index = 0;
655
+ render();
675
656
  };
676
- return store;
657
+ store.handleChange();
677
658
  }
678
- __name(createStore, "createStore");
679
- function withHooks(rl, cb) {
680
- const store = createStore(rl);
681
- return hookStorage.run(store, () => {
682
- function cycle(render) {
683
- store.handleChange = () => {
684
- store.index = 0;
685
- render();
686
- };
687
- store.handleChange();
688
- }
689
- __name(cycle, "cycle");
690
- return cb(cycle);
691
- });
659
+ __name(cycle, "cycle");
660
+ return cb(cycle);
661
+ });
662
+ }
663
+ function getStore() {
664
+ const store = hookStorage.getStore();
665
+ if (!store) {
666
+ throw new HookError("[Inquirer] Hook functions can only be called from within a prompt");
667
+ }
668
+ return store;
669
+ }
670
+ function readline() {
671
+ return getStore().rl;
672
+ }
673
+ function withUpdates(fn) {
674
+ const wrapped = /* @__PURE__ */ __name((...args) => {
675
+ const store = getStore();
676
+ let shouldUpdate = false;
677
+ const oldHandleChange = store.handleChange;
678
+ store.handleChange = () => {
679
+ shouldUpdate = true;
680
+ };
681
+ const returnValue = fn(...args);
682
+ if (shouldUpdate) {
683
+ oldHandleChange();
692
684
  }
685
+ store.handleChange = oldHandleChange;
686
+ return returnValue;
687
+ }, "wrapped");
688
+ return import_node_async_hooks.AsyncResource.bind(wrapped);
689
+ }
690
+ function withPointer(cb) {
691
+ const store = getStore();
692
+ const { index } = store;
693
+ const pointer = {
694
+ get() {
695
+ return store.hooks[index];
696
+ },
697
+ set(value) {
698
+ store.hooks[index] = value;
699
+ },
700
+ initialized: index in store.hooks
701
+ };
702
+ const returnValue = cb(pointer);
703
+ store.index++;
704
+ return returnValue;
705
+ }
706
+ function handleChange() {
707
+ getStore().handleChange();
708
+ }
709
+ var import_node_async_hooks, hookStorage, effectScheduler;
710
+ var init_hook_engine = __esm({
711
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/hook-engine.js"() {
712
+ import_node_async_hooks = require("node:async_hooks");
713
+ init_errors();
714
+ hookStorage = new import_node_async_hooks.AsyncLocalStorage();
715
+ __name(createStore, "createStore");
693
716
  __name(withHooks, "withHooks");
694
- function getStore() {
695
- const store = hookStorage.getStore();
696
- if (!store) {
697
- throw new errors_ts_1.HookError("[Inquirer] Hook functions can only be called from within a prompt");
698
- }
699
- return store;
700
- }
701
717
  __name(getStore, "getStore");
702
- function readline() {
703
- return getStore().rl;
704
- }
705
718
  __name(readline, "readline");
706
- function withUpdates(fn) {
707
- const wrapped = /* @__PURE__ */ __name((...args) => {
708
- const store = getStore();
709
- let shouldUpdate = false;
710
- const oldHandleChange = store.handleChange;
711
- store.handleChange = () => {
712
- shouldUpdate = true;
713
- };
714
- const returnValue = fn(...args);
715
- if (shouldUpdate) {
716
- oldHandleChange();
717
- }
718
- store.handleChange = oldHandleChange;
719
- return returnValue;
720
- }, "wrapped");
721
- return node_async_hooks_1.AsyncResource.bind(wrapped);
722
- }
723
719
  __name(withUpdates, "withUpdates");
724
- function withPointer(cb) {
725
- const store = getStore();
726
- const { index } = store;
727
- const pointer = {
728
- get() {
729
- return store.hooks[index];
730
- },
731
- set(value) {
732
- store.hooks[index] = value;
733
- },
734
- initialized: index in store.hooks
735
- };
736
- const returnValue = cb(pointer);
737
- store.index++;
738
- return returnValue;
739
- }
740
720
  __name(withPointer, "withPointer");
741
- function handleChange() {
742
- getStore().handleChange();
743
- }
744
721
  __name(handleChange, "handleChange");
745
- exports2.effectScheduler = {
722
+ effectScheduler = {
746
723
  queue(cb) {
747
724
  const store = getStore();
748
725
  const { index } = store;
@@ -750,7 +727,7 @@ var require_hook_engine = __commonJS({
750
727
  store.hooksCleanup[index]?.();
751
728
  const cleanFn = cb(readline());
752
729
  if (cleanFn != null && typeof cleanFn !== "function") {
753
- throw new errors_ts_1.ValidationError("useEffect return value must be a cleanup function or nothing.");
730
+ throw new ValidationError("useEffect return value must be a cleanup function or nothing.");
754
731
  }
755
732
  store.hooksCleanup[index] = cleanFn;
756
733
  });
@@ -776,76 +753,71 @@ var require_hook_engine = __commonJS({
776
753
  }
777
754
  });
778
755
 
779
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-state.js
780
- var require_use_state = __commonJS({
781
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-state.js"(exports2) {
782
- "use strict";
783
- Object.defineProperty(exports2, "__esModule", { value: true });
784
- exports2.useState = useState;
785
- var node_async_hooks_1 = require("node:async_hooks");
786
- var hook_engine_ts_1 = require_hook_engine();
787
- function useState(defaultValue) {
788
- return (0, hook_engine_ts_1.withPointer)((pointer) => {
789
- const setState = node_async_hooks_1.AsyncResource.bind(/* @__PURE__ */ __name(function setState2(newValue) {
790
- if (pointer.get() !== newValue) {
791
- pointer.set(newValue);
792
- (0, hook_engine_ts_1.handleChange)();
793
- }
794
- }, "setState"));
795
- if (pointer.initialized) {
796
- return [pointer.get(), setState];
797
- }
798
- const value = typeof defaultValue === "function" ? defaultValue() : defaultValue;
799
- pointer.set(value);
800
- return [value, setState];
801
- });
756
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-state.js
757
+ function isFactory(value) {
758
+ return typeof value === "function";
759
+ }
760
+ function useState(defaultValue) {
761
+ return withPointer((pointer) => {
762
+ const setState = import_node_async_hooks2.AsyncResource.bind(/* @__PURE__ */ __name(function setState2(newValue) {
763
+ if (pointer.get() !== newValue) {
764
+ pointer.set(newValue);
765
+ handleChange();
766
+ }
767
+ }, "setState"));
768
+ if (pointer.initialized) {
769
+ return [pointer.get(), setState];
802
770
  }
771
+ const value = isFactory(defaultValue) ? defaultValue() : defaultValue;
772
+ pointer.set(value);
773
+ return [value, setState];
774
+ });
775
+ }
776
+ var import_node_async_hooks2;
777
+ var init_use_state = __esm({
778
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-state.js"() {
779
+ import_node_async_hooks2 = require("node:async_hooks");
780
+ init_hook_engine();
781
+ __name(isFactory, "isFactory");
803
782
  __name(useState, "useState");
804
783
  }
805
784
  });
806
785
 
807
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js
808
- var require_use_effect = __commonJS({
809
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js"(exports2) {
810
- "use strict";
811
- Object.defineProperty(exports2, "__esModule", { value: true });
812
- exports2.useEffect = useEffect;
813
- var hook_engine_ts_1 = require_hook_engine();
814
- function useEffect(cb, depArray) {
815
- (0, hook_engine_ts_1.withPointer)((pointer) => {
816
- const oldDeps = pointer.get();
817
- const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i]));
818
- if (hasChanged) {
819
- hook_engine_ts_1.effectScheduler.queue(cb);
820
- }
821
- pointer.set(depArray);
822
- });
786
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-effect.js
787
+ function useEffect(cb, depArray) {
788
+ withPointer((pointer) => {
789
+ const oldDeps = pointer.get();
790
+ const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i]));
791
+ if (hasChanged) {
792
+ effectScheduler.queue(cb);
823
793
  }
794
+ pointer.set(depArray);
795
+ });
796
+ }
797
+ var init_use_effect = __esm({
798
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-effect.js"() {
799
+ init_hook_engine();
824
800
  __name(useEffect, "useEffect");
825
801
  }
826
802
  });
827
803
 
828
- // node_modules/.pnpm/@inquirer+figures@1.0.15/node_modules/@inquirer/figures/dist/commonjs/index.js
829
- var require_commonjs = __commonJS({
830
- "node_modules/.pnpm/@inquirer+figures@1.0.15/node_modules/@inquirer/figures/dist/commonjs/index.js"(exports2) {
831
- "use strict";
832
- var __importDefault = exports2 && exports2.__importDefault || function(mod) {
833
- return mod && mod.__esModule ? mod : { "default": mod };
834
- };
835
- Object.defineProperty(exports2, "__esModule", { value: true });
836
- exports2.replaceSymbols = exports2.fallbackSymbols = exports2.mainSymbols = void 0;
837
- var node_process_1 = __importDefault(require("node:process"));
838
- function isUnicodeSupported() {
839
- if (node_process_1.default.platform !== "win32") {
840
- return node_process_1.default.env["TERM"] !== "linux";
841
- }
842
- return Boolean(node_process_1.default.env["WT_SESSION"]) || // Windows Terminal
843
- Boolean(node_process_1.default.env["TERMINUS_SUBLIME"]) || // Terminus (<0.2.27)
844
- node_process_1.default.env["ConEmuTask"] === "{cmd::Cmder}" || // ConEmu and cmder
845
- node_process_1.default.env["TERM_PROGRAM"] === "Terminus-Sublime" || node_process_1.default.env["TERM_PROGRAM"] === "vscode" || node_process_1.default.env["TERM"] === "xterm-256color" || node_process_1.default.env["TERM"] === "alacritty" || node_process_1.default.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
846
- }
804
+ // node_modules/.pnpm/@inquirer+figures@2.0.5/node_modules/@inquirer/figures/dist/index.js
805
+ function isUnicodeSupported() {
806
+ if (!import_node_process2.default.platform.startsWith("win")) {
807
+ return import_node_process2.default.env["TERM"] !== "linux";
808
+ }
809
+ return Boolean(import_node_process2.default.env["CI"]) || // CI environments generally support unicode
810
+ Boolean(import_node_process2.default.env["WT_SESSION"]) || // Windows Terminal
811
+ Boolean(import_node_process2.default.env["TERMINUS_SUBLIME"]) || // Terminus (<0.2.27)
812
+ import_node_process2.default.env["ConEmuTask"] === "{cmd::Cmder}" || // ConEmu and cmder
813
+ import_node_process2.default.env["TERM_PROGRAM"] === "Terminus-Sublime" || import_node_process2.default.env["TERM_PROGRAM"] === "vscode" || import_node_process2.default.env["TERM"] === "xterm-256color" || import_node_process2.default.env["TERM"] === "alacritty" || import_node_process2.default.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
814
+ }
815
+ var import_node_process2, common, specialMainSymbols, specialFallbackSymbols, mainSymbols, fallbackSymbols, shouldUseMain, figures, dist_default, replacements;
816
+ var init_dist = __esm({
817
+ "node_modules/.pnpm/@inquirer+figures@2.0.5/node_modules/@inquirer/figures/dist/index.js"() {
818
+ import_node_process2 = __toESM(require("node:process"), 1);
847
819
  __name(isUnicodeSupported, "isUnicodeSupported");
848
- var common = {
820
+ common = {
849
821
  circleQuestionMark: "(?)",
850
822
  questionMarkPrefix: "(?)",
851
823
  square: "█",
@@ -1041,7 +1013,7 @@ var require_commonjs = __commonJS({
1041
1013
  lineBackslash: "╲",
1042
1014
  lineSlash: "╱"
1043
1015
  };
1044
- var specialMainSymbols = {
1016
+ specialMainSymbols = {
1045
1017
  tick: "✔",
1046
1018
  info: "ℹ",
1047
1019
  warning: "⚠",
@@ -1077,7 +1049,7 @@ var require_commonjs = __commonJS({
1077
1049
  oneNinth: "⅑",
1078
1050
  oneTenth: "⅒"
1079
1051
  };
1080
- var specialFallbackSymbols = {
1052
+ specialFallbackSymbols = {
1081
1053
  tick: "√",
1082
1054
  info: "i",
1083
1055
  warning: "‼",
@@ -1113,210 +1085,177 @@ var require_commonjs = __commonJS({
1113
1085
  oneNinth: "1/9",
1114
1086
  oneTenth: "1/10"
1115
1087
  };
1116
- exports2.mainSymbols = {
1088
+ mainSymbols = {
1117
1089
  ...common,
1118
1090
  ...specialMainSymbols
1119
1091
  };
1120
- exports2.fallbackSymbols = {
1092
+ fallbackSymbols = {
1121
1093
  ...common,
1122
1094
  ...specialFallbackSymbols
1123
1095
  };
1124
- var shouldUseMain = isUnicodeSupported();
1125
- var figures = shouldUseMain ? exports2.mainSymbols : exports2.fallbackSymbols;
1126
- exports2.default = figures;
1127
- var replacements = Object.entries(specialMainSymbols);
1128
- var replaceSymbols = /* @__PURE__ */ __name((string, { useFallback = !shouldUseMain } = {}) => {
1129
- if (useFallback) {
1130
- for (const [key, mainSymbol] of replacements) {
1131
- const fallbackSymbol = exports2.fallbackSymbols[key];
1132
- if (!fallbackSymbol) {
1133
- throw new Error(`Unable to find fallback for ${key}`);
1134
- }
1135
- string = string.replaceAll(mainSymbol, fallbackSymbol);
1136
- }
1137
- }
1138
- return string;
1139
- }, "replaceSymbols");
1140
- exports2.replaceSymbols = replaceSymbols;
1096
+ shouldUseMain = isUnicodeSupported();
1097
+ figures = shouldUseMain ? mainSymbols : fallbackSymbols;
1098
+ dist_default = figures;
1099
+ replacements = Object.entries(specialMainSymbols);
1141
1100
  }
1142
1101
  });
1143
1102
 
1144
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/theme.js
1145
- var require_theme = __commonJS({
1146
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/theme.js"(exports2) {
1147
- "use strict";
1148
- var __importDefault = exports2 && exports2.__importDefault || function(mod) {
1149
- return mod && mod.__esModule ? mod : { "default": mod };
1150
- };
1151
- Object.defineProperty(exports2, "__esModule", { value: true });
1152
- exports2.defaultTheme = void 0;
1153
- var yoctocolors_cjs_1 = __importDefault(require_yoctocolors_cjs());
1154
- var figures_1 = __importDefault(require_commonjs());
1155
- exports2.defaultTheme = {
1103
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/theme.js
1104
+ var import_node_util, defaultTheme;
1105
+ var init_theme = __esm({
1106
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/theme.js"() {
1107
+ import_node_util = require("node:util");
1108
+ init_dist();
1109
+ defaultTheme = {
1156
1110
  prefix: {
1157
- idle: yoctocolors_cjs_1.default.blue("?"),
1158
- done: yoctocolors_cjs_1.default.green(figures_1.default.tick)
1111
+ idle: (0, import_node_util.styleText)("blue", "?"),
1112
+ done: (0, import_node_util.styleText)("green", dist_default.tick)
1159
1113
  },
1160
1114
  spinner: {
1161
1115
  interval: 80,
1162
- frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => yoctocolors_cjs_1.default.yellow(frame))
1116
+ frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => (0, import_node_util.styleText)("yellow", frame))
1163
1117
  },
1164
1118
  style: {
1165
- answer: yoctocolors_cjs_1.default.cyan,
1166
- message: yoctocolors_cjs_1.default.bold,
1167
- error: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.red(`> ${text}`), "error"),
1168
- defaultAnswer: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.dim(`(${text})`), "defaultAnswer"),
1169
- help: yoctocolors_cjs_1.default.dim,
1170
- highlight: yoctocolors_cjs_1.default.cyan,
1171
- key: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.cyan(yoctocolors_cjs_1.default.bold(`<${text}>`)), "key")
1119
+ answer: /* @__PURE__ */ __name((text) => (0, import_node_util.styleText)("cyan", text), "answer"),
1120
+ message: /* @__PURE__ */ __name((text) => (0, import_node_util.styleText)("bold", text), "message"),
1121
+ error: /* @__PURE__ */ __name((text) => (0, import_node_util.styleText)("red", `> ${text}`), "error"),
1122
+ defaultAnswer: /* @__PURE__ */ __name((text) => (0, import_node_util.styleText)("dim", `(${text})`), "defaultAnswer"),
1123
+ help: /* @__PURE__ */ __name((text) => (0, import_node_util.styleText)("dim", text), "help"),
1124
+ highlight: /* @__PURE__ */ __name((text) => (0, import_node_util.styleText)("cyan", text), "highlight"),
1125
+ key: /* @__PURE__ */ __name((text) => (0, import_node_util.styleText)("cyan", (0, import_node_util.styleText)("bold", `<${text}>`)), "key")
1172
1126
  }
1173
1127
  };
1174
1128
  }
1175
1129
  });
1176
1130
 
1177
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.js
1178
- var require_make_theme = __commonJS({
1179
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.js"(exports2) {
1180
- "use strict";
1181
- Object.defineProperty(exports2, "__esModule", { value: true });
1182
- exports2.makeTheme = makeTheme;
1183
- var theme_ts_1 = require_theme();
1184
- function isPlainObject(value) {
1185
- if (typeof value !== "object" || value === null)
1186
- return false;
1187
- let proto = value;
1188
- while (Object.getPrototypeOf(proto) !== null) {
1189
- proto = Object.getPrototypeOf(proto);
1190
- }
1191
- return Object.getPrototypeOf(value) === proto;
1131
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/make-theme.js
1132
+ function isPlainObject(value) {
1133
+ if (typeof value !== "object" || value === null)
1134
+ return false;
1135
+ let proto = value;
1136
+ while (Object.getPrototypeOf(proto) !== null) {
1137
+ proto = Object.getPrototypeOf(proto);
1138
+ }
1139
+ return Object.getPrototypeOf(value) === proto;
1140
+ }
1141
+ function deepMerge(...objects) {
1142
+ const output = {};
1143
+ for (const obj of objects) {
1144
+ for (const [key, value] of Object.entries(obj)) {
1145
+ const prevValue = output[key];
1146
+ output[key] = isPlainObject(prevValue) && isPlainObject(value) ? deepMerge(prevValue, value) : value;
1192
1147
  }
1148
+ }
1149
+ return output;
1150
+ }
1151
+ function makeTheme(...themes) {
1152
+ const themesToMerge = [
1153
+ defaultTheme,
1154
+ ...themes.filter((theme) => theme != null)
1155
+ ];
1156
+ return deepMerge(...themesToMerge);
1157
+ }
1158
+ var init_make_theme = __esm({
1159
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/make-theme.js"() {
1160
+ init_theme();
1193
1161
  __name(isPlainObject, "isPlainObject");
1194
- function deepMerge(...objects) {
1195
- const output = {};
1196
- for (const obj of objects) {
1197
- for (const [key, value] of Object.entries(obj)) {
1198
- const prevValue = output[key];
1199
- output[key] = isPlainObject(prevValue) && isPlainObject(value) ? deepMerge(prevValue, value) : value;
1200
- }
1201
- }
1202
- return output;
1203
- }
1204
1162
  __name(deepMerge, "deepMerge");
1205
- function makeTheme(...themes) {
1206
- const themesToMerge = [
1207
- theme_ts_1.defaultTheme,
1208
- ...themes.filter((theme) => theme != null)
1209
- ];
1210
- return deepMerge(...themesToMerge);
1211
- }
1212
1163
  __name(makeTheme, "makeTheme");
1213
1164
  }
1214
1165
  });
1215
1166
 
1216
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.js
1217
- var require_use_prefix = __commonJS({
1218
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.js"(exports2) {
1219
- "use strict";
1220
- Object.defineProperty(exports2, "__esModule", { value: true });
1221
- exports2.usePrefix = usePrefix;
1222
- var use_state_ts_1 = require_use_state();
1223
- var use_effect_ts_1 = require_use_effect();
1224
- var make_theme_ts_1 = require_make_theme();
1225
- function usePrefix({ status = "idle", theme }) {
1226
- const [showLoader, setShowLoader] = (0, use_state_ts_1.useState)(false);
1227
- const [tick, setTick] = (0, use_state_ts_1.useState)(0);
1228
- const { prefix, spinner } = (0, make_theme_ts_1.makeTheme)(theme);
1229
- (0, use_effect_ts_1.useEffect)(() => {
1230
- if (status === "loading") {
1231
- let tickInterval;
1232
- let inc = -1;
1233
- const delayTimeout = setTimeout(() => {
1234
- setShowLoader(true);
1235
- tickInterval = setInterval(() => {
1236
- inc = inc + 1;
1237
- setTick(inc % spinner.frames.length);
1238
- }, spinner.interval);
1239
- }, 300);
1240
- return () => {
1241
- clearTimeout(delayTimeout);
1242
- clearInterval(tickInterval);
1243
- };
1244
- } else {
1245
- setShowLoader(false);
1246
- }
1247
- }, [status]);
1248
- if (showLoader) {
1249
- return spinner.frames[tick];
1250
- }
1251
- const iconName = status === "loading" ? "idle" : status;
1252
- return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
1167
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-prefix.js
1168
+ function usePrefix({ status = "idle", theme }) {
1169
+ const [showLoader, setShowLoader] = useState(false);
1170
+ const [tick, setTick] = useState(0);
1171
+ const { prefix, spinner } = makeTheme(theme);
1172
+ useEffect(() => {
1173
+ if (status === "loading") {
1174
+ let tickInterval;
1175
+ let inc = -1;
1176
+ const delayTimeout = setTimeout(() => {
1177
+ setShowLoader(true);
1178
+ tickInterval = setInterval(() => {
1179
+ inc = inc + 1;
1180
+ setTick(inc % spinner.frames.length);
1181
+ }, spinner.interval);
1182
+ }, 300);
1183
+ return () => {
1184
+ clearTimeout(delayTimeout);
1185
+ clearInterval(tickInterval);
1186
+ };
1187
+ } else {
1188
+ setShowLoader(false);
1253
1189
  }
1190
+ }, [status]);
1191
+ if (showLoader) {
1192
+ return spinner.frames[tick];
1193
+ }
1194
+ const iconName = status === "loading" ? "idle" : status;
1195
+ return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
1196
+ }
1197
+ var init_use_prefix = __esm({
1198
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-prefix.js"() {
1199
+ init_use_state();
1200
+ init_use_effect();
1201
+ init_make_theme();
1254
1202
  __name(usePrefix, "usePrefix");
1255
1203
  }
1256
1204
  });
1257
1205
 
1258
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.js
1259
- var require_use_memo = __commonJS({
1260
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.js"(exports2) {
1261
- "use strict";
1262
- Object.defineProperty(exports2, "__esModule", { value: true });
1263
- exports2.useMemo = useMemo;
1264
- var hook_engine_ts_1 = require_hook_engine();
1265
- function useMemo(fn, dependencies) {
1266
- return (0, hook_engine_ts_1.withPointer)((pointer) => {
1267
- const prev = pointer.get();
1268
- if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
1269
- const value = fn();
1270
- pointer.set({ value, dependencies });
1271
- return value;
1272
- }
1273
- return prev.value;
1274
- });
1206
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-memo.js
1207
+ function useMemo(fn, dependencies) {
1208
+ return withPointer((pointer) => {
1209
+ const prev = pointer.get();
1210
+ if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
1211
+ const value = fn();
1212
+ pointer.set({ value, dependencies });
1213
+ return value;
1275
1214
  }
1215
+ return prev.value;
1216
+ });
1217
+ }
1218
+ var init_use_memo = __esm({
1219
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-memo.js"() {
1220
+ init_hook_engine();
1276
1221
  __name(useMemo, "useMemo");
1277
1222
  }
1278
1223
  });
1279
1224
 
1280
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.js
1281
- var require_use_ref = __commonJS({
1282
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.js"(exports2) {
1283
- "use strict";
1284
- Object.defineProperty(exports2, "__esModule", { value: true });
1285
- exports2.useRef = useRef;
1286
- var use_state_ts_1 = require_use_state();
1287
- function useRef(val) {
1288
- return (0, use_state_ts_1.useState)({ current: val })[0];
1289
- }
1225
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-ref.js
1226
+ function useRef(val) {
1227
+ return useState({ current: val })[0];
1228
+ }
1229
+ var init_use_ref = __esm({
1230
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-ref.js"() {
1231
+ init_use_state();
1290
1232
  __name(useRef, "useRef");
1291
1233
  }
1292
1234
  });
1293
1235
 
1294
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.js
1295
- var require_use_keypress = __commonJS({
1296
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.js"(exports2) {
1297
- "use strict";
1298
- Object.defineProperty(exports2, "__esModule", { value: true });
1299
- exports2.useKeypress = useKeypress;
1300
- var use_ref_ts_1 = require_use_ref();
1301
- var use_effect_ts_1 = require_use_effect();
1302
- var hook_engine_ts_1 = require_hook_engine();
1303
- function useKeypress(userHandler) {
1304
- const signal = (0, use_ref_ts_1.useRef)(userHandler);
1305
- signal.current = userHandler;
1306
- (0, use_effect_ts_1.useEffect)((rl) => {
1307
- let ignore = false;
1308
- const handler = (0, hook_engine_ts_1.withUpdates)((_input, event) => {
1309
- if (ignore)
1310
- return;
1311
- void signal.current(event, rl);
1312
- });
1313
- rl.input.on("keypress", handler);
1314
- return () => {
1315
- ignore = true;
1316
- rl.input.removeListener("keypress", handler);
1317
- };
1318
- }, []);
1319
- }
1236
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-keypress.js
1237
+ function useKeypress(userHandler) {
1238
+ const signal = useRef(userHandler);
1239
+ signal.current = userHandler;
1240
+ useEffect((rl) => {
1241
+ let ignore = false;
1242
+ const handler = withUpdates((_input, event) => {
1243
+ if (ignore)
1244
+ return;
1245
+ void signal.current(event, rl);
1246
+ });
1247
+ rl.input.on("keypress", handler);
1248
+ return () => {
1249
+ ignore = true;
1250
+ rl.input.removeListener("keypress", handler);
1251
+ };
1252
+ }, []);
1253
+ }
1254
+ var init_use_keypress = __esm({
1255
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-keypress.js"() {
1256
+ init_use_ref();
1257
+ init_use_effect();
1258
+ init_hook_engine();
1320
1259
  __name(useKeypress, "useKeypress");
1321
1260
  }
1322
1261
  });
@@ -1325,7 +1264,7 @@ var require_use_keypress = __commonJS({
1325
1264
  var require_cli_width = __commonJS({
1326
1265
  "node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js"(exports2, module2) {
1327
1266
  "use strict";
1328
- module2.exports = cliWidth;
1267
+ module2.exports = cliWidth2;
1329
1268
  function normalizeOpts(options) {
1330
1269
  const defaultOpts = {
1331
1270
  defaultWidth: 0,
@@ -1343,7 +1282,7 @@ var require_cli_width = __commonJS({
1343
1282
  return options;
1344
1283
  }
1345
1284
  __name(normalizeOpts, "normalizeOpts");
1346
- function cliWidth(options) {
1285
+ function cliWidth2(options) {
1347
1286
  const opts = normalizeOpts(options);
1348
1287
  if (opts.output.getWindowSize) {
1349
1288
  return opts.output.getWindowSize()[0] || opts.defaultWidth;
@@ -1362,380 +1301,220 @@ var require_cli_width = __commonJS({
1362
1301
  }
1363
1302
  return opts.defaultWidth;
1364
1303
  }
1365
- __name(cliWidth, "cliWidth");
1366
- }
1367
- });
1368
-
1369
- // node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
1370
- function ansiRegex({ onlyFirst = false } = {}) {
1371
- const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
1372
- const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
1373
- const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
1374
- const pattern = `${osc}|${csi}`;
1375
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
1376
- }
1377
- var init_ansi_regex = __esm({
1378
- "node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js"() {
1379
- __name(ansiRegex, "ansiRegex");
1380
- }
1381
- });
1382
-
1383
- // node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
1384
- function stripAnsi(string) {
1385
- if (typeof string !== "string") {
1386
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
1387
- }
1388
- return string.replace(regex, "");
1389
- }
1390
- var regex;
1391
- var init_strip_ansi = __esm({
1392
- "node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js"() {
1393
- init_ansi_regex();
1394
- regex = ansiRegex();
1395
- __name(stripAnsi, "stripAnsi");
1396
- }
1397
- });
1398
-
1399
- // node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js
1400
- function isAmbiguous(x) {
1401
- return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
1402
- }
1403
- function isFullWidth(x) {
1404
- return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
1405
- }
1406
- function isWide(x) {
1407
- return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
1408
- }
1409
- var init_lookup = __esm({
1410
- "node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js"() {
1411
- __name(isAmbiguous, "isAmbiguous");
1412
- __name(isFullWidth, "isFullWidth");
1413
- __name(isWide, "isWide");
1414
- }
1415
- });
1416
-
1417
- // node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js
1418
- function validate(codePoint) {
1419
- if (!Number.isSafeInteger(codePoint)) {
1420
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
1421
- }
1422
- }
1423
- function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
1424
- validate(codePoint);
1425
- if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
1426
- return 2;
1427
- }
1428
- return 1;
1429
- }
1430
- var init_get_east_asian_width = __esm({
1431
- "node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js"() {
1432
- init_lookup();
1433
- __name(validate, "validate");
1434
- __name(eastAsianWidth, "eastAsianWidth");
1304
+ __name(cliWidth2, "cliWidth");
1435
1305
  }
1436
1306
  });
1437
1307
 
1438
- // node_modules/.pnpm/string-width@8.1.0/node_modules/string-width/index.js
1439
- function baseVisible(segment) {
1440
- return segment.replace(leadingNonPrintingRegex, "");
1441
- }
1442
- function isZeroWidthCluster(segment) {
1443
- return zeroWidthClusterRegex.test(segment);
1444
- }
1445
- function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
1446
- let extra = 0;
1447
- if (segment.length > 1) {
1448
- for (const char of segment.slice(1)) {
1449
- if (char >= "＀" && char <= "￯") {
1450
- extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
1451
- }
1452
- }
1453
- }
1454
- return extra;
1455
- }
1456
- function stringWidth(input2, options = {}) {
1457
- if (typeof input2 !== "string" || input2.length === 0) {
1458
- return 0;
1459
- }
1460
- const {
1461
- ambiguousIsNarrow = true,
1462
- countAnsiEscapeCodes = false
1463
- } = options;
1464
- let string = input2;
1465
- if (!countAnsiEscapeCodes) {
1466
- string = stripAnsi(string);
1467
- }
1468
- if (string.length === 0) {
1469
- return 0;
1470
- }
1471
- let width = 0;
1472
- const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
1473
- for (const { segment } of segmenter.segment(string)) {
1474
- if (isZeroWidthCluster(segment)) {
1475
- continue;
1476
- }
1477
- if (rgiEmojiRegex.test(segment)) {
1478
- width += 2;
1479
- continue;
1480
- }
1481
- const codePoint = baseVisible(segment).codePointAt(0);
1482
- width += eastAsianWidth(codePoint, eastAsianWidthOptions);
1483
- width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
1484
- }
1485
- return width;
1486
- }
1487
- var segmenter, zeroWidthClusterRegex, leadingNonPrintingRegex, rgiEmojiRegex;
1488
- var init_string_width = __esm({
1489
- "node_modules/.pnpm/string-width@8.1.0/node_modules/string-width/index.js"() {
1490
- init_strip_ansi();
1491
- init_get_east_asian_width();
1492
- segmenter = new Intl.Segmenter();
1493
- zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$", "v");
1494
- leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
1495
- rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
1496
- __name(baseVisible, "baseVisible");
1497
- __name(isZeroWidthCluster, "isZeroWidthCluster");
1498
- __name(trailingHalfwidthWidth, "trailingHalfwidthWidth");
1499
- __name(stringWidth, "stringWidth");
1308
+ // node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
1309
+ var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;
1310
+ var init_utils = __esm({
1311
+ "node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js"() {
1312
+ getCodePointsLength = /* @__PURE__ */ (() => {
1313
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
1314
+ return (input2) => {
1315
+ let surrogatePairsNr = 0;
1316
+ SURROGATE_PAIR_RE.lastIndex = 0;
1317
+ while (SURROGATE_PAIR_RE.test(input2)) {
1318
+ surrogatePairsNr += 1;
1319
+ }
1320
+ return input2.length - surrogatePairsNr;
1321
+ };
1322
+ })();
1323
+ isFullWidth = /* @__PURE__ */ __name((x) => {
1324
+ return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
1325
+ }, "isFullWidth");
1326
+ isWideNotCJKTNotEmoji = /* @__PURE__ */ __name((x) => {
1327
+ return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
1328
+ }, "isWideNotCJKTNotEmoji");
1500
1329
  }
1501
1330
  });
1502
1331
 
1503
- // node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
1504
- function assembleStyles() {
1505
- const codes = /* @__PURE__ */ new Map();
1506
- for (const [groupName, group] of Object.entries(styles)) {
1507
- for (const [styleName, style] of Object.entries(group)) {
1508
- styles[styleName] = {
1509
- open: `\x1B[${style[0]}m`,
1510
- close: `\x1B[${style[1]}m`
1511
- };
1512
- group[styleName] = styles[styleName];
1513
- codes.set(style[0], style[1]);
1514
- }
1515
- Object.defineProperty(styles, groupName, {
1516
- value: group,
1517
- enumerable: false
1518
- });
1519
- }
1520
- Object.defineProperty(styles, "codes", {
1521
- value: codes,
1522
- enumerable: false
1523
- });
1524
- styles.color.close = "\x1B[39m";
1525
- styles.bgColor.close = "\x1B[49m";
1526
- styles.color.ansi = wrapAnsi16();
1527
- styles.color.ansi256 = wrapAnsi256();
1528
- styles.color.ansi16m = wrapAnsi16m();
1529
- styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
1530
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
1531
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
1532
- Object.defineProperties(styles, {
1533
- rgbToAnsi256: {
1534
- value(red, green, blue) {
1535
- if (red === green && green === blue) {
1536
- if (red < 8) {
1537
- return 16;
1332
+ // node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
1333
+ var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default2;
1334
+ var init_dist2 = __esm({
1335
+ "node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js"() {
1336
+ init_utils();
1337
+ ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
1338
+ CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
1339
+ CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
1340
+ TAB_RE = /\t{1,1000}/y;
1341
+ EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
1342
+ LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
1343
+ MODIFIER_RE = new RegExp("\\p{M}+", "gu");
1344
+ NO_TRUNCATION = { limit: Infinity, ellipsis: "" };
1345
+ getStringTruncatedWidth = /* @__PURE__ */ __name((input2, truncationOptions = {}, widthOptions = {}) => {
1346
+ const LIMIT = truncationOptions.limit ?? Infinity;
1347
+ const ELLIPSIS = truncationOptions.ellipsis ?? "";
1348
+ const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
1349
+ const ANSI_WIDTH = 0;
1350
+ const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
1351
+ const TAB_WIDTH = widthOptions.tabWidth ?? 8;
1352
+ const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
1353
+ const FULL_WIDTH_WIDTH = 2;
1354
+ const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
1355
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
1356
+ const PARSE_BLOCKS = [
1357
+ [LATIN_RE, REGULAR_WIDTH],
1358
+ [ANSI_RE, ANSI_WIDTH],
1359
+ [CONTROL_RE, CONTROL_WIDTH],
1360
+ [TAB_RE, TAB_WIDTH],
1361
+ [EMOJI_RE, EMOJI_WIDTH],
1362
+ [CJKT_WIDE_RE, WIDE_WIDTH]
1363
+ ];
1364
+ let indexPrev = 0;
1365
+ let index = 0;
1366
+ let length = input2.length;
1367
+ let lengthExtra = 0;
1368
+ let truncationEnabled = false;
1369
+ let truncationIndex = length;
1370
+ let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
1371
+ let unmatchedStart = 0;
1372
+ let unmatchedEnd = 0;
1373
+ let width = 0;
1374
+ let widthExtra = 0;
1375
+ outer: while (true) {
1376
+ if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
1377
+ const unmatched = input2.slice(unmatchedStart, unmatchedEnd) || input2.slice(indexPrev, index);
1378
+ lengthExtra = 0;
1379
+ for (const char of unmatched.replaceAll(MODIFIER_RE, "")) {
1380
+ const codePoint = char.codePointAt(0) || 0;
1381
+ if (isFullWidth(codePoint)) {
1382
+ widthExtra = FULL_WIDTH_WIDTH;
1383
+ } else if (isWideNotCJKTNotEmoji(codePoint)) {
1384
+ widthExtra = WIDE_WIDTH;
1385
+ } else {
1386
+ widthExtra = REGULAR_WIDTH;
1387
+ }
1388
+ if (width + widthExtra > truncationLimit) {
1389
+ truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
1390
+ }
1391
+ if (width + widthExtra > LIMIT) {
1392
+ truncationEnabled = true;
1393
+ break outer;
1394
+ }
1395
+ lengthExtra += char.length;
1396
+ width += widthExtra;
1538
1397
  }
1539
- if (red > 248) {
1540
- return 231;
1398
+ unmatchedStart = unmatchedEnd = 0;
1399
+ }
1400
+ if (index >= length) {
1401
+ break outer;
1402
+ }
1403
+ for (let i = 0, l = PARSE_BLOCKS.length; i < l; i++) {
1404
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
1405
+ BLOCK_RE.lastIndex = index;
1406
+ if (BLOCK_RE.test(input2)) {
1407
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input2.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
1408
+ widthExtra = lengthExtra * BLOCK_WIDTH;
1409
+ if (width + widthExtra > truncationLimit) {
1410
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
1411
+ }
1412
+ if (width + widthExtra > LIMIT) {
1413
+ truncationEnabled = true;
1414
+ break outer;
1415
+ }
1416
+ width += widthExtra;
1417
+ unmatchedStart = indexPrev;
1418
+ unmatchedEnd = index;
1419
+ index = indexPrev = BLOCK_RE.lastIndex;
1420
+ continue outer;
1541
1421
  }
1542
- return Math.round((red - 8) / 247 * 24) + 232;
1543
- }
1544
- return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1545
- },
1546
- enumerable: false
1547
- },
1548
- hexToRgb: {
1549
- value(hex) {
1550
- const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
1551
- if (!matches) {
1552
- return [0, 0, 0];
1553
- }
1554
- let [colorString] = matches;
1555
- if (colorString.length === 3) {
1556
- colorString = [...colorString].map((character) => character + character).join("");
1557
- }
1558
- const integer = Number.parseInt(colorString, 16);
1559
- return [
1560
- /* eslint-disable no-bitwise */
1561
- integer >> 16 & 255,
1562
- integer >> 8 & 255,
1563
- integer & 255
1564
- /* eslint-enable no-bitwise */
1565
- ];
1566
- },
1567
- enumerable: false
1568
- },
1569
- hexToAnsi256: {
1570
- value: /* @__PURE__ */ __name((hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), "value"),
1571
- enumerable: false
1572
- },
1573
- ansi256ToAnsi: {
1574
- value(code) {
1575
- if (code < 8) {
1576
- return 30 + code;
1577
- }
1578
- if (code < 16) {
1579
- return 90 + (code - 8);
1580
- }
1581
- let red;
1582
- let green;
1583
- let blue;
1584
- if (code >= 232) {
1585
- red = ((code - 232) * 10 + 8) / 255;
1586
- green = red;
1587
- blue = red;
1588
- } else {
1589
- code -= 16;
1590
- const remainder = code % 36;
1591
- red = Math.floor(code / 36) / 5;
1592
- green = Math.floor(remainder / 6) / 5;
1593
- blue = remainder % 6 / 5;
1594
- }
1595
- const value = Math.max(red, green, blue) * 2;
1596
- if (value === 0) {
1597
- return 30;
1598
1422
  }
1599
- let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
1600
- if (value === 2) {
1601
- result += 60;
1602
- }
1603
- return result;
1604
- },
1605
- enumerable: false
1606
- },
1607
- rgbToAnsi: {
1608
- value: /* @__PURE__ */ __name((red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), "value"),
1609
- enumerable: false
1610
- },
1611
- hexToAnsi: {
1612
- value: /* @__PURE__ */ __name((hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), "value"),
1613
- enumerable: false
1614
- }
1615
- });
1616
- return styles;
1617
- }
1618
- var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
1619
- var init_ansi_styles = __esm({
1620
- "node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js"() {
1621
- ANSI_BACKGROUND_OFFSET = 10;
1622
- wrapAnsi16 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${code + offset}m`, "wrapAnsi16");
1623
- wrapAnsi256 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, "wrapAnsi256");
1624
- wrapAnsi16m = /* @__PURE__ */ __name((offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, "wrapAnsi16m");
1625
- styles = {
1626
- modifier: {
1627
- reset: [0, 0],
1628
- // 21 isn't widely supported and 22 does the same thing
1629
- bold: [1, 22],
1630
- dim: [2, 22],
1631
- italic: [3, 23],
1632
- underline: [4, 24],
1633
- overline: [53, 55],
1634
- inverse: [7, 27],
1635
- hidden: [8, 28],
1636
- strikethrough: [9, 29]
1637
- },
1638
- color: {
1639
- black: [30, 39],
1640
- red: [31, 39],
1641
- green: [32, 39],
1642
- yellow: [33, 39],
1643
- blue: [34, 39],
1644
- magenta: [35, 39],
1645
- cyan: [36, 39],
1646
- white: [37, 39],
1647
- // Bright color
1648
- blackBright: [90, 39],
1649
- gray: [90, 39],
1650
- // Alias of `blackBright`
1651
- grey: [90, 39],
1652
- // Alias of `blackBright`
1653
- redBright: [91, 39],
1654
- greenBright: [92, 39],
1655
- yellowBright: [93, 39],
1656
- blueBright: [94, 39],
1657
- magentaBright: [95, 39],
1658
- cyanBright: [96, 39],
1659
- whiteBright: [97, 39]
1660
- },
1661
- bgColor: {
1662
- bgBlack: [40, 49],
1663
- bgRed: [41, 49],
1664
- bgGreen: [42, 49],
1665
- bgYellow: [43, 49],
1666
- bgBlue: [44, 49],
1667
- bgMagenta: [45, 49],
1668
- bgCyan: [46, 49],
1669
- bgWhite: [47, 49],
1670
- // Bright color
1671
- bgBlackBright: [100, 49],
1672
- bgGray: [100, 49],
1673
- // Alias of `bgBlackBright`
1674
- bgGrey: [100, 49],
1675
- // Alias of `bgBlackBright`
1676
- bgRedBright: [101, 49],
1677
- bgGreenBright: [102, 49],
1678
- bgYellowBright: [103, 49],
1679
- bgBlueBright: [104, 49],
1680
- bgMagentaBright: [105, 49],
1681
- bgCyanBright: [106, 49],
1682
- bgWhiteBright: [107, 49]
1423
+ index += 1;
1683
1424
  }
1684
- };
1685
- modifierNames = Object.keys(styles.modifier);
1686
- foregroundColorNames = Object.keys(styles.color);
1687
- backgroundColorNames = Object.keys(styles.bgColor);
1688
- colorNames = [...foregroundColorNames, ...backgroundColorNames];
1689
- __name(assembleStyles, "assembleStyles");
1690
- ansiStyles = assembleStyles();
1691
- ansi_styles_default = ansiStyles;
1425
+ return {
1426
+ width: truncationEnabled ? truncationLimit : width,
1427
+ index: truncationEnabled ? truncationIndex : length,
1428
+ truncated: truncationEnabled,
1429
+ ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
1430
+ };
1431
+ }, "getStringTruncatedWidth");
1432
+ dist_default2 = getStringTruncatedWidth;
1692
1433
  }
1693
1434
  });
1694
1435
 
1695
- // node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
1696
- var wrap_ansi_exports = {};
1697
- __export(wrap_ansi_exports, {
1698
- default: () => wrapAnsi
1436
+ // node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
1437
+ var NO_TRUNCATION2, fastStringWidth, dist_default3;
1438
+ var init_dist3 = __esm({
1439
+ "node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
1440
+ init_dist2();
1441
+ NO_TRUNCATION2 = {
1442
+ limit: Infinity,
1443
+ ellipsis: "",
1444
+ ellipsisWidth: 0
1445
+ };
1446
+ fastStringWidth = /* @__PURE__ */ __name((input2, options = {}) => {
1447
+ return dist_default2(input2, NO_TRUNCATION2, options).width;
1448
+ }, "fastStringWidth");
1449
+ dist_default3 = fastStringWidth;
1450
+ }
1699
1451
  });
1452
+
1453
+ // node_modules/.pnpm/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js
1700
1454
  function wrapAnsi(string, columns, options) {
1701
- return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
1455
+ return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
1702
1456
  }
1703
- var ESCAPES, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, wrapAnsiCode, wrapAnsiHyperlink, wordLengths, wrapWord, stringVisibleTrimSpacesRight, exec;
1704
- var init_wrap_ansi = __esm({
1705
- "node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js"() {
1706
- init_string_width();
1707
- init_strip_ansi();
1708
- init_ansi_styles();
1709
- ESCAPES = /* @__PURE__ */ new Set([
1710
- "\x1B",
1711
- "›"
1712
- ]);
1457
+ var ESC, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
1458
+ var init_main = __esm({
1459
+ "node_modules/.pnpm/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js"() {
1460
+ init_dist3();
1461
+ ESC = "\x1B";
1462
+ CSI = "›";
1713
1463
  END_CODE = 39;
1714
1464
  ANSI_ESCAPE_BELL = "\x07";
1715
1465
  ANSI_CSI = "[";
1716
1466
  ANSI_OSC = "]";
1717
1467
  ANSI_SGR_TERMINATOR = "m";
1718
1468
  ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
1719
- wrapAnsiCode = /* @__PURE__ */ __name((code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, "wrapAnsiCode");
1720
- wrapAnsiHyperlink = /* @__PURE__ */ __name((url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`, "wrapAnsiHyperlink");
1721
- wordLengths = /* @__PURE__ */ __name((string) => string.split(" ").map((character) => stringWidth(character)), "wordLengths");
1469
+ GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
1470
+ getClosingCode = /* @__PURE__ */ __name((openingCode) => {
1471
+ if (openingCode >= 30 && openingCode <= 37)
1472
+ return 39;
1473
+ if (openingCode >= 90 && openingCode <= 97)
1474
+ return 39;
1475
+ if (openingCode >= 40 && openingCode <= 47)
1476
+ return 49;
1477
+ if (openingCode >= 100 && openingCode <= 107)
1478
+ return 49;
1479
+ if (openingCode === 1 || openingCode === 2)
1480
+ return 22;
1481
+ if (openingCode === 3)
1482
+ return 23;
1483
+ if (openingCode === 4)
1484
+ return 24;
1485
+ if (openingCode === 7)
1486
+ return 27;
1487
+ if (openingCode === 8)
1488
+ return 28;
1489
+ if (openingCode === 9)
1490
+ return 29;
1491
+ if (openingCode === 0)
1492
+ return 0;
1493
+ return void 0;
1494
+ }, "getClosingCode");
1495
+ wrapAnsiCode = /* @__PURE__ */ __name((code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, "wrapAnsiCode");
1496
+ wrapAnsiHyperlink = /* @__PURE__ */ __name((url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`, "wrapAnsiHyperlink");
1722
1497
  wrapWord = /* @__PURE__ */ __name((rows, word, columns) => {
1723
- const characters = [...word];
1498
+ const characters = word[Symbol.iterator]();
1724
1499
  let isInsideEscape = false;
1725
1500
  let isInsideLinkEscape = false;
1726
- let visible = stringWidth(stripAnsi(rows.at(-1)));
1727
- for (const [index, character] of characters.entries()) {
1728
- const characterLength = stringWidth(character);
1501
+ let lastRow = rows.at(-1);
1502
+ let visible = lastRow === void 0 ? 0 : dist_default3(lastRow);
1503
+ let currentCharacter = characters.next();
1504
+ let nextCharacter = characters.next();
1505
+ let rawCharacterIndex = 0;
1506
+ while (!currentCharacter.done) {
1507
+ const character = currentCharacter.value;
1508
+ const characterLength = dist_default3(character);
1729
1509
  if (visible + characterLength <= columns) {
1730
1510
  rows[rows.length - 1] += character;
1731
1511
  } else {
1732
1512
  rows.push(character);
1733
1513
  visible = 0;
1734
1514
  }
1735
- if (ESCAPES.has(character)) {
1515
+ if (character === ESC || character === CSI) {
1736
1516
  isInsideEscape = true;
1737
- const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
1738
- isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
1517
+ isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
1739
1518
  }
1740
1519
  if (isInsideEscape) {
1741
1520
  if (isInsideLinkEscape) {
@@ -1746,23 +1525,27 @@ var init_wrap_ansi = __esm({
1746
1525
  } else if (character === ANSI_SGR_TERMINATOR) {
1747
1526
  isInsideEscape = false;
1748
1527
  }
1749
- continue;
1750
- }
1751
- visible += characterLength;
1752
- if (visible === columns && index < characters.length - 1) {
1753
- rows.push("");
1754
- visible = 0;
1528
+ } else {
1529
+ visible += characterLength;
1530
+ if (visible === columns && !nextCharacter.done) {
1531
+ rows.push("");
1532
+ visible = 0;
1533
+ }
1755
1534
  }
1535
+ currentCharacter = nextCharacter;
1536
+ nextCharacter = characters.next();
1537
+ rawCharacterIndex += character.length;
1756
1538
  }
1757
- if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
1539
+ lastRow = rows.at(-1);
1540
+ if (!visible && lastRow !== void 0 && lastRow.length && rows.length > 1) {
1758
1541
  rows[rows.length - 2] += rows.pop();
1759
1542
  }
1760
1543
  }, "wrapWord");
1761
1544
  stringVisibleTrimSpacesRight = /* @__PURE__ */ __name((string) => {
1762
1545
  const words = string.split(" ");
1763
1546
  let last = words.length;
1764
- while (last > 0) {
1765
- if (stringWidth(words[last - 1]) > 0) {
1547
+ while (last) {
1548
+ if (dist_default3(words[last - 1])) {
1766
1549
  break;
1767
1550
  }
1768
1551
  last--;
@@ -1779,207 +1562,220 @@ var init_wrap_ansi = __esm({
1779
1562
  let returnValue = "";
1780
1563
  let escapeCode;
1781
1564
  let escapeUrl;
1782
- const lengths = wordLengths(string);
1565
+ const words = string.split(" ");
1783
1566
  let rows = [""];
1784
- for (const [index, word] of string.split(" ").entries()) {
1567
+ let rowLength = 0;
1568
+ for (let index = 0; index < words.length; index++) {
1569
+ const word = words[index];
1785
1570
  if (options.trim !== false) {
1786
- rows[rows.length - 1] = rows.at(-1).trimStart();
1571
+ const row = rows.at(-1) ?? "";
1572
+ const trimmed = row.trimStart();
1573
+ if (row.length !== trimmed.length) {
1574
+ rows[rows.length - 1] = trimmed;
1575
+ rowLength = dist_default3(trimmed);
1576
+ }
1787
1577
  }
1788
- let rowLength = stringWidth(rows.at(-1));
1789
1578
  if (index !== 0) {
1790
1579
  if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
1791
1580
  rows.push("");
1792
1581
  rowLength = 0;
1793
1582
  }
1794
- if (rowLength > 0 || options.trim === false) {
1583
+ if (rowLength || options.trim === false) {
1795
1584
  rows[rows.length - 1] += " ";
1796
1585
  rowLength++;
1797
1586
  }
1798
1587
  }
1799
- if (options.hard && lengths[index] > columns) {
1588
+ const wordLength = dist_default3(word);
1589
+ if (options.hard && wordLength > columns) {
1800
1590
  const remainingColumns = columns - rowLength;
1801
- const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
1802
- const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
1591
+ const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
1592
+ const breaksStartingNextLine = Math.floor((wordLength - 1) / columns);
1803
1593
  if (breaksStartingNextLine < breaksStartingThisLine) {
1804
1594
  rows.push("");
1805
1595
  }
1806
1596
  wrapWord(rows, word, columns);
1597
+ rowLength = dist_default3(rows.at(-1) ?? "");
1807
1598
  continue;
1808
1599
  }
1809
- if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
1600
+ if (rowLength + wordLength > columns && rowLength && wordLength) {
1810
1601
  if (options.wordWrap === false && rowLength < columns) {
1811
1602
  wrapWord(rows, word, columns);
1603
+ rowLength = dist_default3(rows.at(-1) ?? "");
1812
1604
  continue;
1813
1605
  }
1814
1606
  rows.push("");
1607
+ rowLength = 0;
1815
1608
  }
1816
- if (rowLength + lengths[index] > columns && options.wordWrap === false) {
1609
+ if (rowLength + wordLength > columns && options.wordWrap === false) {
1817
1610
  wrapWord(rows, word, columns);
1611
+ rowLength = dist_default3(rows.at(-1) ?? "");
1818
1612
  continue;
1819
1613
  }
1820
1614
  rows[rows.length - 1] += word;
1615
+ rowLength += wordLength;
1821
1616
  }
1822
1617
  if (options.trim !== false) {
1823
1618
  rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
1824
1619
  }
1825
1620
  const preString = rows.join("\n");
1826
- const pre = [...preString];
1827
- let preStringIndex = 0;
1828
- for (const [index, character] of pre.entries()) {
1621
+ let inSurrogate = false;
1622
+ for (let i = 0; i < preString.length; i++) {
1623
+ const character = preString[i];
1829
1624
  returnValue += character;
1830
- if (ESCAPES.has(character)) {
1831
- const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
1832
- if (groups.code !== void 0) {
1833
- const code2 = Number.parseFloat(groups.code);
1834
- escapeCode = code2 === END_CODE ? void 0 : code2;
1835
- } else if (groups.uri !== void 0) {
1625
+ if (!inSurrogate) {
1626
+ inSurrogate = character >= "\uD800" && character <= "\uDBFF";
1627
+ if (inSurrogate) {
1628
+ continue;
1629
+ }
1630
+ } else {
1631
+ inSurrogate = false;
1632
+ }
1633
+ if (character === ESC || character === CSI) {
1634
+ GROUP_REGEX.lastIndex = i + 1;
1635
+ const groupsResult = GROUP_REGEX.exec(preString);
1636
+ const groups = groupsResult?.groups;
1637
+ if (groups?.code !== void 0) {
1638
+ const code = Number.parseFloat(groups.code);
1639
+ escapeCode = code === END_CODE ? void 0 : code;
1640
+ } else if (groups?.uri !== void 0) {
1836
1641
  escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
1837
1642
  }
1838
1643
  }
1839
- const code = ansi_styles_default.codes.get(Number(escapeCode));
1840
- if (pre[index + 1] === "\n") {
1644
+ if (preString[i + 1] === "\n") {
1841
1645
  if (escapeUrl) {
1842
1646
  returnValue += wrapAnsiHyperlink("");
1843
1647
  }
1844
- if (escapeCode && code) {
1845
- returnValue += wrapAnsiCode(code);
1648
+ const closingCode = escapeCode ? getClosingCode(escapeCode) : void 0;
1649
+ if (escapeCode && closingCode) {
1650
+ returnValue += wrapAnsiCode(closingCode);
1846
1651
  }
1847
1652
  } else if (character === "\n") {
1848
- if (escapeCode && code) {
1653
+ if (escapeCode && getClosingCode(escapeCode)) {
1849
1654
  returnValue += wrapAnsiCode(escapeCode);
1850
1655
  }
1851
1656
  if (escapeUrl) {
1852
1657
  returnValue += wrapAnsiHyperlink(escapeUrl);
1853
1658
  }
1854
1659
  }
1855
- preStringIndex += character.length;
1856
1660
  }
1857
1661
  return returnValue;
1858
1662
  }, "exec");
1663
+ CRLF_OR_LF = /\r?\n/;
1859
1664
  __name(wrapAnsi, "wrapAnsi");
1860
1665
  }
1861
1666
  });
1862
1667
 
1863
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/utils.js
1864
- var require_utils = __commonJS({
1865
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/utils.js"(exports2) {
1866
- "use strict";
1867
- var __importDefault = exports2 && exports2.__importDefault || function(mod) {
1868
- return mod && mod.__esModule ? mod : { "default": mod };
1869
- };
1870
- Object.defineProperty(exports2, "__esModule", { value: true });
1871
- exports2.breakLines = breakLines;
1872
- exports2.readlineWidth = readlineWidth;
1873
- var cli_width_1 = __importDefault(require_cli_width());
1874
- var wrap_ansi_1 = __importDefault((init_wrap_ansi(), __toCommonJS(wrap_ansi_exports)));
1875
- var hook_engine_ts_1 = require_hook_engine();
1876
- function breakLines(content, width) {
1877
- return content.split("\n").flatMap((line) => (0, wrap_ansi_1.default)(line, width, { trim: false, hard: true }).split("\n").map((str) => str.trimEnd())).join("\n");
1878
- }
1668
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/utils.js
1669
+ function breakLines(content, width) {
1670
+ return content.split("\n").flatMap((line) => wrapAnsi(line, width, { trim: false, hard: true }).split("\n").map((str) => str.trimEnd())).join("\n");
1671
+ }
1672
+ function readlineWidth() {
1673
+ return (0, import_cli_width.default)({ defaultWidth: 80, output: readline().output });
1674
+ }
1675
+ var import_cli_width;
1676
+ var init_utils2 = __esm({
1677
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/utils.js"() {
1678
+ import_cli_width = __toESM(require_cli_width(), 1);
1679
+ init_main();
1680
+ init_hook_engine();
1879
1681
  __name(breakLines, "breakLines");
1880
- function readlineWidth() {
1881
- return (0, cli_width_1.default)({ defaultWidth: 80, output: (0, hook_engine_ts_1.readline)().output });
1882
- }
1883
1682
  __name(readlineWidth, "readlineWidth");
1884
1683
  }
1885
1684
  });
1886
1685
 
1887
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.js
1888
- var require_use_pagination = __commonJS({
1889
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.js"(exports2) {
1890
- "use strict";
1891
- Object.defineProperty(exports2, "__esModule", { value: true });
1892
- exports2.usePagination = usePagination;
1893
- var use_ref_ts_1 = require_use_ref();
1894
- var utils_ts_1 = require_utils();
1895
- function usePointerPosition({ active, renderedItems, pageSize, loop }) {
1896
- const state = (0, use_ref_ts_1.useRef)({
1897
- lastPointer: active,
1898
- lastActive: void 0
1899
- });
1900
- const { lastPointer, lastActive } = state.current;
1901
- const middle = Math.floor(pageSize / 2);
1902
- const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
1903
- const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
1904
- let pointer = defaultPointerPosition;
1905
- if (renderedLength > pageSize) {
1906
- if (loop) {
1907
- pointer = lastPointer;
1908
- if (
1909
- // First render, skip this logic.
1910
- lastActive != null && // Only move the pointer down when the user moves down.
1911
- lastActive < active && // Check user didn't move up across page boundary.
1912
- active - lastActive < pageSize
1913
- ) {
1914
- pointer = Math.min(
1915
- // Furthest allowed position for the pointer is the middle of the list
1916
- middle,
1917
- Math.abs(active - lastActive) === 1 ? Math.min(
1918
- // Move the pointer at most the height of the last active item.
1919
- lastPointer + (renderedItems[lastActive]?.length ?? 0),
1920
- // If the user moved by one item, move the pointer to the natural position of the active item as
1921
- // long as it doesn't move the cursor up.
1922
- Math.max(defaultPointerPosition, lastPointer)
1923
- ) : (
1924
- // Otherwise, move the pointer down by the difference between the active and last active item.
1925
- lastPointer + active - lastActive
1926
- )
1927
- );
1928
- }
1929
- } else {
1930
- const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
1931
- pointer = spaceUnderActive < pageSize - middle ? (
1932
- // If the active item is near the end of the list, progressively move the cursor towards the end.
1933
- pageSize - spaceUnderActive
1686
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
1687
+ function usePointerPosition({ active, renderedItems, pageSize, loop }) {
1688
+ const state = useRef({
1689
+ lastPointer: active,
1690
+ lastActive: void 0
1691
+ });
1692
+ const { lastPointer, lastActive } = state.current;
1693
+ const middle = Math.floor(pageSize / 2);
1694
+ const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
1695
+ const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
1696
+ let pointer = defaultPointerPosition;
1697
+ if (renderedLength > pageSize) {
1698
+ if (loop) {
1699
+ pointer = lastPointer;
1700
+ if (
1701
+ // First render, skip this logic.
1702
+ lastActive != null && // Only move the pointer down when the user moves down.
1703
+ lastActive < active && // Check user didn't move up across page boundary.
1704
+ active - lastActive < pageSize
1705
+ ) {
1706
+ pointer = Math.min(
1707
+ // Furthest allowed position for the pointer is the middle of the list
1708
+ middle,
1709
+ Math.abs(active - lastActive) === 1 ? Math.min(
1710
+ // Move the pointer at most the height of the last active item.
1711
+ lastPointer + (renderedItems[lastActive]?.length ?? 0),
1712
+ // If the user moved by one item, move the pointer to the natural position of the active item as
1713
+ // long as it doesn't move the cursor up.
1714
+ Math.max(defaultPointerPosition, lastPointer)
1934
1715
  ) : (
1935
- // Otherwise, progressively move the pointer to the middle of the list.
1936
- Math.min(defaultPointerPosition, middle)
1937
- );
1938
- }
1939
- }
1940
- state.current.lastPointer = pointer;
1941
- state.current.lastActive = active;
1942
- return pointer;
1716
+ // Otherwise, move the pointer down by the difference between the active and last active item.
1717
+ lastPointer + active - lastActive
1718
+ )
1719
+ );
1720
+ }
1721
+ } else {
1722
+ const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
1723
+ pointer = spaceUnderActive < pageSize - middle ? (
1724
+ // If the active item is near the end of the list, progressively move the cursor towards the end.
1725
+ pageSize - spaceUnderActive
1726
+ ) : (
1727
+ // Otherwise, progressively move the pointer to the middle of the list.
1728
+ Math.min(defaultPointerPosition, middle)
1729
+ );
1943
1730
  }
1731
+ }
1732
+ state.current.lastPointer = pointer;
1733
+ state.current.lastActive = active;
1734
+ return pointer;
1735
+ }
1736
+ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
1737
+ const width = readlineWidth();
1738
+ const bound = /* @__PURE__ */ __name((num) => (num % items.length + items.length) % items.length, "bound");
1739
+ const renderedItems = items.map((item, index) => {
1740
+ if (item == null)
1741
+ return [];
1742
+ return breakLines(renderItem({ item, index, isActive: index === active }), width).split("\n");
1743
+ });
1744
+ const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
1745
+ const renderItemAtIndex = /* @__PURE__ */ __name((index) => renderedItems[index] ?? [], "renderItemAtIndex");
1746
+ const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
1747
+ const activeItem = renderItemAtIndex(active).slice(0, pageSize);
1748
+ const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
1749
+ const pageBuffer = Array.from({ length: pageSize });
1750
+ pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
1751
+ const itemVisited = /* @__PURE__ */ new Set([active]);
1752
+ let bufferPointer = activeItemPosition + activeItem.length;
1753
+ let itemPointer = bound(active + 1);
1754
+ while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
1755
+ const lines = renderItemAtIndex(itemPointer);
1756
+ const linesToAdd = lines.slice(0, pageSize - bufferPointer);
1757
+ pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
1758
+ itemVisited.add(itemPointer);
1759
+ bufferPointer += linesToAdd.length;
1760
+ itemPointer = bound(itemPointer + 1);
1761
+ }
1762
+ bufferPointer = activeItemPosition - 1;
1763
+ itemPointer = bound(active - 1);
1764
+ while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
1765
+ const lines = renderItemAtIndex(itemPointer);
1766
+ const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
1767
+ pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
1768
+ itemVisited.add(itemPointer);
1769
+ bufferPointer -= linesToAdd.length;
1770
+ itemPointer = bound(itemPointer - 1);
1771
+ }
1772
+ return pageBuffer.filter((line) => typeof line === "string").join("\n");
1773
+ }
1774
+ var init_use_pagination = __esm({
1775
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js"() {
1776
+ init_use_ref();
1777
+ init_utils2();
1944
1778
  __name(usePointerPosition, "usePointerPosition");
1945
- function usePagination({ items, active, renderItem, pageSize, loop = true }) {
1946
- const width = (0, utils_ts_1.readlineWidth)();
1947
- const bound = /* @__PURE__ */ __name((num) => (num % items.length + items.length) % items.length, "bound");
1948
- const renderedItems = items.map((item, index) => {
1949
- if (item == null)
1950
- return [];
1951
- return (0, utils_ts_1.breakLines)(renderItem({ item, index, isActive: index === active }), width).split("\n");
1952
- });
1953
- const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
1954
- const renderItemAtIndex = /* @__PURE__ */ __name((index) => renderedItems[index] ?? [], "renderItemAtIndex");
1955
- const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
1956
- const activeItem = renderItemAtIndex(active).slice(0, pageSize);
1957
- const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
1958
- const pageBuffer = Array.from({ length: pageSize });
1959
- pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
1960
- const itemVisited = /* @__PURE__ */ new Set([active]);
1961
- let bufferPointer = activeItemPosition + activeItem.length;
1962
- let itemPointer = bound(active + 1);
1963
- while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
1964
- const lines = renderItemAtIndex(itemPointer);
1965
- const linesToAdd = lines.slice(0, pageSize - bufferPointer);
1966
- pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
1967
- itemVisited.add(itemPointer);
1968
- bufferPointer += linesToAdd.length;
1969
- itemPointer = bound(itemPointer + 1);
1970
- }
1971
- bufferPointer = activeItemPosition - 1;
1972
- itemPointer = bound(active - 1);
1973
- while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
1974
- const lines = renderItemAtIndex(itemPointer);
1975
- const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
1976
- pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
1977
- itemVisited.add(itemPointer);
1978
- bufferPointer -= linesToAdd.length;
1979
- itemPointer = bound(itemPointer - 1);
1980
- }
1981
- return pageBuffer.filter((line) => typeof line === "string").join("\n");
1982
- }
1983
1779
  __name(usePagination, "usePagination");
1984
1780
  }
1985
1781
  });
@@ -1988,7 +1784,7 @@ var require_use_pagination = __commonJS({
1988
1784
  var require_lib = __commonJS({
1989
1785
  "node_modules/.pnpm/mute-stream@3.0.0/node_modules/mute-stream/lib/index.js"(exports2, module2) {
1990
1786
  var Stream = require("stream");
1991
- var MuteStream = class extends Stream {
1787
+ var MuteStream2 = class extends Stream {
1992
1788
  static {
1993
1789
  __name(this, "MuteStream");
1994
1790
  }
@@ -2105,56 +1901,329 @@ var require_lib = __commonJS({
2105
1901
  return this.#proxy("close", ...args);
2106
1902
  }
2107
1903
  };
2108
- module2.exports = MuteStream;
1904
+ module2.exports = MuteStream2;
2109
1905
  }
2110
1906
  });
2111
1907
 
2112
- // node_modules/.pnpm/@inquirer+ansi@1.0.2/node_modules/@inquirer/ansi/dist/commonjs/index.js
2113
- var require_commonjs2 = __commonJS({
2114
- "node_modules/.pnpm/@inquirer+ansi@1.0.2/node_modules/@inquirer/ansi/dist/commonjs/index.js"(exports2) {
2115
- "use strict";
2116
- Object.defineProperty(exports2, "__esModule", { value: true });
2117
- exports2.eraseLines = exports2.cursorTo = exports2.cursorDown = exports2.cursorUp = exports2.cursorShow = exports2.cursorHide = exports2.cursorLeft = void 0;
2118
- var ESC = "\x1B[";
2119
- exports2.cursorLeft = ESC + "G";
2120
- exports2.cursorHide = ESC + "?25l";
2121
- exports2.cursorShow = ESC + "?25h";
2122
- var cursorUp = /* @__PURE__ */ __name((rows = 1) => rows > 0 ? `${ESC}${rows}A` : "", "cursorUp");
2123
- exports2.cursorUp = cursorUp;
2124
- var cursorDown = /* @__PURE__ */ __name((rows = 1) => rows > 0 ? `${ESC}${rows}B` : "", "cursorDown");
2125
- exports2.cursorDown = cursorDown;
2126
- var cursorTo = /* @__PURE__ */ __name((x, y) => {
2127
- if (typeof y === "number" && !Number.isNaN(y)) {
2128
- return `${ESC}${y + 1};${x + 1}H`;
2129
- }
2130
- return `${ESC}${x + 1}G`;
2131
- }, "cursorTo");
2132
- exports2.cursorTo = cursorTo;
2133
- var eraseLine = ESC + "2K";
2134
- var eraseLines = /* @__PURE__ */ __name((lines) => lines > 0 ? (eraseLine + (0, exports2.cursorUp)(1)).repeat(lines - 1) + eraseLine + exports2.cursorLeft : "", "eraseLines");
2135
- exports2.eraseLines = eraseLines;
1908
+ // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
1909
+ var signals;
1910
+ var init_signals = __esm({
1911
+ "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js"() {
1912
+ signals = [];
1913
+ signals.push("SIGHUP", "SIGINT", "SIGTERM");
1914
+ if (process.platform !== "win32") {
1915
+ signals.push(
1916
+ "SIGALRM",
1917
+ "SIGABRT",
1918
+ "SIGVTALRM",
1919
+ "SIGXCPU",
1920
+ "SIGXFSZ",
1921
+ "SIGUSR2",
1922
+ "SIGTRAP",
1923
+ "SIGSYS",
1924
+ "SIGQUIT",
1925
+ "SIGIOT"
1926
+ // should detect profiler and enable/disable accordingly.
1927
+ // see #21
1928
+ // 'SIGPROF'
1929
+ );
1930
+ }
1931
+ if (process.platform === "linux") {
1932
+ signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
1933
+ }
2136
1934
  }
2137
1935
  });
2138
1936
 
2139
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.js
2140
- var require_screen_manager = __commonJS({
2141
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.js"(exports2) {
2142
- "use strict";
2143
- Object.defineProperty(exports2, "__esModule", { value: true });
2144
- var node_util_1 = require("node:util");
2145
- var utils_ts_1 = require_utils();
2146
- var ansi_1 = require_commonjs2();
2147
- var height = /* @__PURE__ */ __name((content) => content.split("\n").length, "height");
2148
- var lastLine = /* @__PURE__ */ __name((content) => content.split("\n").pop() ?? "", "lastLine");
2149
- var ScreenManager = class {
1937
+ // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
1938
+ var processOk, kExitEmitter, global, ObjectDefineProperty, Emitter, SignalExitBase, signalExitWrap, SignalExitFallback, SignalExit, process5, onExit, load, unload;
1939
+ var init_mjs = __esm({
1940
+ "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js"() {
1941
+ init_signals();
1942
+ processOk = /* @__PURE__ */ __name((process6) => !!process6 && typeof process6 === "object" && typeof process6.removeListener === "function" && typeof process6.emit === "function" && typeof process6.reallyExit === "function" && typeof process6.listeners === "function" && typeof process6.kill === "function" && typeof process6.pid === "number" && typeof process6.on === "function", "processOk");
1943
+ kExitEmitter = Symbol.for("signal-exit emitter");
1944
+ global = globalThis;
1945
+ ObjectDefineProperty = Object.defineProperty.bind(Object);
1946
+ Emitter = class {
2150
1947
  static {
2151
- __name(this, "ScreenManager");
1948
+ __name(this, "Emitter");
2152
1949
  }
2153
- // These variables are keeping information to allow correct prompt re-rendering
2154
- height = 0;
2155
- extraLinesUnderPrompt = 0;
2156
- cursorPos;
2157
- rl;
1950
+ emitted = {
1951
+ afterExit: false,
1952
+ exit: false
1953
+ };
1954
+ listeners = {
1955
+ afterExit: [],
1956
+ exit: []
1957
+ };
1958
+ count = 0;
1959
+ id = Math.random();
1960
+ constructor() {
1961
+ if (global[kExitEmitter]) {
1962
+ return global[kExitEmitter];
1963
+ }
1964
+ ObjectDefineProperty(global, kExitEmitter, {
1965
+ value: this,
1966
+ writable: false,
1967
+ enumerable: false,
1968
+ configurable: false
1969
+ });
1970
+ }
1971
+ on(ev, fn) {
1972
+ this.listeners[ev].push(fn);
1973
+ }
1974
+ removeListener(ev, fn) {
1975
+ const list = this.listeners[ev];
1976
+ const i = list.indexOf(fn);
1977
+ if (i === -1) {
1978
+ return;
1979
+ }
1980
+ if (i === 0 && list.length === 1) {
1981
+ list.length = 0;
1982
+ } else {
1983
+ list.splice(i, 1);
1984
+ }
1985
+ }
1986
+ emit(ev, code, signal) {
1987
+ if (this.emitted[ev]) {
1988
+ return false;
1989
+ }
1990
+ this.emitted[ev] = true;
1991
+ let ret = false;
1992
+ for (const fn of this.listeners[ev]) {
1993
+ ret = fn(code, signal) === true || ret;
1994
+ }
1995
+ if (ev === "exit") {
1996
+ ret = this.emit("afterExit", code, signal) || ret;
1997
+ }
1998
+ return ret;
1999
+ }
2000
+ };
2001
+ SignalExitBase = class {
2002
+ static {
2003
+ __name(this, "SignalExitBase");
2004
+ }
2005
+ };
2006
+ signalExitWrap = /* @__PURE__ */ __name((handler) => {
2007
+ return {
2008
+ onExit(cb, opts) {
2009
+ return handler.onExit(cb, opts);
2010
+ },
2011
+ load() {
2012
+ return handler.load();
2013
+ },
2014
+ unload() {
2015
+ return handler.unload();
2016
+ }
2017
+ };
2018
+ }, "signalExitWrap");
2019
+ SignalExitFallback = class extends SignalExitBase {
2020
+ static {
2021
+ __name(this, "SignalExitFallback");
2022
+ }
2023
+ onExit() {
2024
+ return () => {
2025
+ };
2026
+ }
2027
+ load() {
2028
+ }
2029
+ unload() {
2030
+ }
2031
+ };
2032
+ SignalExit = class extends SignalExitBase {
2033
+ static {
2034
+ __name(this, "SignalExit");
2035
+ }
2036
+ // "SIGHUP" throws an `ENOSYS` error on Windows,
2037
+ // so use a supported signal instead
2038
+ /* c8 ignore start */
2039
+ #hupSig = process5.platform === "win32" ? "SIGINT" : "SIGHUP";
2040
+ /* c8 ignore stop */
2041
+ #emitter = new Emitter();
2042
+ #process;
2043
+ #originalProcessEmit;
2044
+ #originalProcessReallyExit;
2045
+ #sigListeners = {};
2046
+ #loaded = false;
2047
+ constructor(process6) {
2048
+ super();
2049
+ this.#process = process6;
2050
+ this.#sigListeners = {};
2051
+ for (const sig of signals) {
2052
+ this.#sigListeners[sig] = () => {
2053
+ const listeners = this.#process.listeners(sig);
2054
+ let { count } = this.#emitter;
2055
+ const p = process6;
2056
+ if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
2057
+ count += p.__signal_exit_emitter__.count;
2058
+ }
2059
+ if (listeners.length === count) {
2060
+ this.unload();
2061
+ const ret = this.#emitter.emit("exit", null, sig);
2062
+ const s = sig === "SIGHUP" ? this.#hupSig : sig;
2063
+ if (!ret)
2064
+ process6.kill(process6.pid, s);
2065
+ }
2066
+ };
2067
+ }
2068
+ this.#originalProcessReallyExit = process6.reallyExit;
2069
+ this.#originalProcessEmit = process6.emit;
2070
+ }
2071
+ onExit(cb, opts) {
2072
+ if (!processOk(this.#process)) {
2073
+ return () => {
2074
+ };
2075
+ }
2076
+ if (this.#loaded === false) {
2077
+ this.load();
2078
+ }
2079
+ const ev = opts?.alwaysLast ? "afterExit" : "exit";
2080
+ this.#emitter.on(ev, cb);
2081
+ return () => {
2082
+ this.#emitter.removeListener(ev, cb);
2083
+ if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
2084
+ this.unload();
2085
+ }
2086
+ };
2087
+ }
2088
+ load() {
2089
+ if (this.#loaded) {
2090
+ return;
2091
+ }
2092
+ this.#loaded = true;
2093
+ this.#emitter.count += 1;
2094
+ for (const sig of signals) {
2095
+ try {
2096
+ const fn = this.#sigListeners[sig];
2097
+ if (fn)
2098
+ this.#process.on(sig, fn);
2099
+ } catch (_) {
2100
+ }
2101
+ }
2102
+ this.#process.emit = (ev, ...a) => {
2103
+ return this.#processEmit(ev, ...a);
2104
+ };
2105
+ this.#process.reallyExit = (code) => {
2106
+ return this.#processReallyExit(code);
2107
+ };
2108
+ }
2109
+ unload() {
2110
+ if (!this.#loaded) {
2111
+ return;
2112
+ }
2113
+ this.#loaded = false;
2114
+ signals.forEach((sig) => {
2115
+ const listener = this.#sigListeners[sig];
2116
+ if (!listener) {
2117
+ throw new Error("Listener not defined for signal: " + sig);
2118
+ }
2119
+ try {
2120
+ this.#process.removeListener(sig, listener);
2121
+ } catch (_) {
2122
+ }
2123
+ });
2124
+ this.#process.emit = this.#originalProcessEmit;
2125
+ this.#process.reallyExit = this.#originalProcessReallyExit;
2126
+ this.#emitter.count -= 1;
2127
+ }
2128
+ #processReallyExit(code) {
2129
+ if (!processOk(this.#process)) {
2130
+ return 0;
2131
+ }
2132
+ this.#process.exitCode = code || 0;
2133
+ this.#emitter.emit("exit", this.#process.exitCode, null);
2134
+ return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
2135
+ }
2136
+ #processEmit(ev, ...args) {
2137
+ const og = this.#originalProcessEmit;
2138
+ if (ev === "exit" && processOk(this.#process)) {
2139
+ if (typeof args[0] === "number") {
2140
+ this.#process.exitCode = args[0];
2141
+ }
2142
+ const ret = og.call(this.#process, ev, ...args);
2143
+ this.#emitter.emit("exit", this.#process.exitCode, null);
2144
+ return ret;
2145
+ } else {
2146
+ return og.call(this.#process, ev, ...args);
2147
+ }
2148
+ }
2149
+ };
2150
+ process5 = globalThis.process;
2151
+ ({
2152
+ onExit: (
2153
+ /**
2154
+ * Called when the process is exiting, whether via signal, explicit
2155
+ * exit, or running out of stuff to do.
2156
+ *
2157
+ * If the global process object is not suitable for instrumentation,
2158
+ * then this will be a no-op.
2159
+ *
2160
+ * Returns a function that may be used to unload signal-exit.
2161
+ */
2162
+ onExit
2163
+ ),
2164
+ load: (
2165
+ /**
2166
+ * Load the listeners. Likely you never need to call this, unless
2167
+ * doing a rather deep integration with signal-exit functionality.
2168
+ * Mostly exposed for the benefit of testing.
2169
+ *
2170
+ * @internal
2171
+ */
2172
+ load
2173
+ ),
2174
+ unload: (
2175
+ /**
2176
+ * Unload the listeners. Likely you never need to call this, unless
2177
+ * doing a rather deep integration with signal-exit functionality.
2178
+ * Mostly exposed for the benefit of testing.
2179
+ *
2180
+ * @internal
2181
+ */
2182
+ unload
2183
+ )
2184
+ } = signalExitWrap(processOk(process5) ? new SignalExit(process5) : new SignalExitFallback()));
2185
+ }
2186
+ });
2187
+
2188
+ // node_modules/.pnpm/@inquirer+ansi@2.0.5/node_modules/@inquirer/ansi/dist/index.js
2189
+ var ESC2, cursorLeft, cursorHide, cursorShow, cursorUp, cursorDown, cursorTo, eraseLine, eraseLines;
2190
+ var init_dist4 = __esm({
2191
+ "node_modules/.pnpm/@inquirer+ansi@2.0.5/node_modules/@inquirer/ansi/dist/index.js"() {
2192
+ ESC2 = "\x1B[";
2193
+ cursorLeft = ESC2 + "G";
2194
+ cursorHide = ESC2 + "?25l";
2195
+ cursorShow = ESC2 + "?25h";
2196
+ cursorUp = /* @__PURE__ */ __name((rows = 1) => rows > 0 ? `${ESC2}${rows}A` : "", "cursorUp");
2197
+ cursorDown = /* @__PURE__ */ __name((rows = 1) => rows > 0 ? `${ESC2}${rows}B` : "", "cursorDown");
2198
+ cursorTo = /* @__PURE__ */ __name((x, y) => {
2199
+ if (typeof y === "number" && !Number.isNaN(y)) {
2200
+ return `${ESC2}${y + 1};${x + 1}H`;
2201
+ }
2202
+ return `${ESC2}${x + 1}G`;
2203
+ }, "cursorTo");
2204
+ eraseLine = ESC2 + "2K";
2205
+ eraseLines = /* @__PURE__ */ __name((lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "", "eraseLines");
2206
+ }
2207
+ });
2208
+
2209
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/screen-manager.js
2210
+ var import_node_util2, height, lastLine, ScreenManager;
2211
+ var init_screen_manager = __esm({
2212
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/screen-manager.js"() {
2213
+ import_node_util2 = require("node:util");
2214
+ init_utils2();
2215
+ init_dist4();
2216
+ height = /* @__PURE__ */ __name((content) => content.split("\n").length, "height");
2217
+ lastLine = /* @__PURE__ */ __name((content) => content.split("\n").pop() ?? "", "lastLine");
2218
+ ScreenManager = class {
2219
+ static {
2220
+ __name(this, "ScreenManager");
2221
+ }
2222
+ // These variables are keeping information to allow correct prompt re-rendering
2223
+ height = 0;
2224
+ extraLinesUnderPrompt = 0;
2225
+ cursorPos;
2226
+ rl;
2158
2227
  constructor(rl) {
2159
2228
  this.rl = rl;
2160
2229
  this.cursorPos = rl.getCursorPos();
@@ -2166,16 +2235,16 @@ var require_screen_manager = __commonJS({
2166
2235
  }
2167
2236
  render(content, bottomContent = "") {
2168
2237
  const promptLine = lastLine(content);
2169
- const rawPromptLine = (0, node_util_1.stripVTControlCharacters)(promptLine);
2238
+ const rawPromptLine = (0, import_node_util2.stripVTControlCharacters)(promptLine);
2170
2239
  let prompt = rawPromptLine;
2171
2240
  if (this.rl.line.length > 0) {
2172
2241
  prompt = prompt.slice(0, -this.rl.line.length);
2173
2242
  }
2174
2243
  this.rl.setPrompt(prompt);
2175
2244
  this.cursorPos = this.rl.getCursorPos();
2176
- const width = (0, utils_ts_1.readlineWidth)();
2177
- content = (0, utils_ts_1.breakLines)(content, width);
2178
- bottomContent = (0, utils_ts_1.breakLines)(bottomContent, width);
2245
+ const width = readlineWidth();
2246
+ content = breakLines(content, width);
2247
+ bottomContent = breakLines(bottomContent, width);
2179
2248
  if (rawPromptLine.length % width === 0) {
2180
2249
  content += "\n";
2181
2250
  }
@@ -2183,39 +2252,36 @@ var require_screen_manager = __commonJS({
2183
2252
  const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
2184
2253
  const bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0);
2185
2254
  if (bottomContentHeight > 0)
2186
- output += (0, ansi_1.cursorUp)(bottomContentHeight);
2187
- output += (0, ansi_1.cursorTo)(this.cursorPos.cols);
2188
- this.write((0, ansi_1.cursorDown)(this.extraLinesUnderPrompt) + (0, ansi_1.eraseLines)(this.height) + output);
2255
+ output += cursorUp(bottomContentHeight);
2256
+ output += cursorTo(this.cursorPos.cols);
2257
+ this.write(cursorDown(this.extraLinesUnderPrompt) + eraseLines(this.height) + output);
2189
2258
  this.extraLinesUnderPrompt = bottomContentHeight;
2190
2259
  this.height = height(output);
2191
2260
  }
2192
2261
  checkCursorPos() {
2193
2262
  const cursorPos = this.rl.getCursorPos();
2194
2263
  if (cursorPos.cols !== this.cursorPos.cols) {
2195
- this.write((0, ansi_1.cursorTo)(cursorPos.cols));
2264
+ this.write(cursorTo(cursorPos.cols));
2196
2265
  this.cursorPos = cursorPos;
2197
2266
  }
2198
2267
  }
2199
2268
  done({ clearContent }) {
2200
2269
  this.rl.setPrompt("");
2201
- let output = (0, ansi_1.cursorDown)(this.extraLinesUnderPrompt);
2202
- output += clearContent ? (0, ansi_1.eraseLines)(this.height) : "\n";
2203
- output += ansi_1.cursorShow;
2270
+ let output = cursorDown(this.extraLinesUnderPrompt);
2271
+ output += clearContent ? eraseLines(this.height) : "\n";
2272
+ output += cursorShow;
2204
2273
  this.write(output);
2205
2274
  this.rl.close();
2206
2275
  }
2207
2276
  };
2208
- exports2.default = ScreenManager;
2209
2277
  }
2210
2278
  });
2211
2279
 
2212
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.js
2213
- var require_promise_polyfill = __commonJS({
2214
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.js"(exports2) {
2215
- "use strict";
2216
- Object.defineProperty(exports2, "__esModule", { value: true });
2217
- exports2.PromisePolyfill = void 0;
2218
- var PromisePolyfill = class extends Promise {
2280
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
2281
+ var PromisePolyfill;
2282
+ var init_promise_polyfill = __esm({
2283
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/promise-polyfill.js"() {
2284
+ PromisePolyfill = class extends Promise {
2219
2285
  static {
2220
2286
  __name(this, "PromisePolyfill");
2221
2287
  }
@@ -2231,170 +2297,147 @@ var require_promise_polyfill = __commonJS({
2231
2297
  return { promise, resolve, reject };
2232
2298
  }
2233
2299
  };
2234
- exports2.PromisePolyfill = PromisePolyfill;
2235
2300
  }
2236
2301
  });
2237
2302
 
2238
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.js
2239
- var require_create_prompt = __commonJS({
2240
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.js"(exports2) {
2241
- "use strict";
2242
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
2243
- if (k2 === void 0) k2 = k;
2244
- var desc = Object.getOwnPropertyDescriptor(m, k);
2245
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2246
- desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
2247
- return m[k];
2248
- }, "get") };
2249
- }
2250
- Object.defineProperty(o, k2, desc);
2251
- }) : (function(o, m, k, k2) {
2252
- if (k2 === void 0) k2 = k;
2253
- o[k2] = m[k];
2254
- }));
2255
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
2256
- Object.defineProperty(o, "default", { enumerable: true, value: v });
2257
- }) : function(o, v) {
2258
- o["default"] = v;
2259
- });
2260
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
2261
- var ownKeys = /* @__PURE__ */ __name(function(o) {
2262
- ownKeys = Object.getOwnPropertyNames || function(o2) {
2263
- var ar = [];
2264
- for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
2265
- return ar;
2266
- };
2267
- return ownKeys(o);
2268
- }, "ownKeys");
2269
- return function(mod) {
2270
- if (mod && mod.__esModule) return mod;
2271
- var result = {};
2272
- if (mod != null) {
2273
- for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
2274
- }
2275
- __setModuleDefault(result, mod);
2276
- return result;
2277
- };
2278
- })();
2279
- var __importDefault = exports2 && exports2.__importDefault || function(mod) {
2280
- return mod && mod.__esModule ? mod : { "default": mod };
2303
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/create-prompt.js
2304
+ function getCallSites() {
2305
+ const _prepareStackTrace = Error.prepareStackTrace;
2306
+ let result = [];
2307
+ try {
2308
+ Error.prepareStackTrace = (_, callSites) => {
2309
+ const callSitesWithoutCurrent = callSites.slice(1);
2310
+ result = callSitesWithoutCurrent;
2311
+ return callSitesWithoutCurrent;
2281
2312
  };
2282
- Object.defineProperty(exports2, "__esModule", { value: true });
2283
- exports2.createPrompt = createPrompt;
2284
- var readline = __importStar(require("node:readline"));
2285
- var node_async_hooks_1 = require("node:async_hooks");
2286
- var mute_stream_1 = __importDefault(require_lib());
2287
- var signal_exit_1 = require_cjs();
2288
- var screen_manager_ts_1 = __importDefault(require_screen_manager());
2289
- var promise_polyfill_ts_1 = require_promise_polyfill();
2290
- var hook_engine_ts_1 = require_hook_engine();
2291
- var errors_ts_1 = require_errors();
2292
- function getCallSites() {
2293
- const _prepareStackTrace = Error.prepareStackTrace;
2294
- let result = [];
2295
- try {
2296
- Error.prepareStackTrace = (_, callSites) => {
2297
- const callSitesWithoutCurrent = callSites.slice(1);
2298
- result = callSitesWithoutCurrent;
2299
- return callSitesWithoutCurrent;
2300
- };
2301
- new Error().stack;
2302
- } catch {
2303
- return result;
2304
- }
2305
- Error.prepareStackTrace = _prepareStackTrace;
2306
- return result;
2313
+ new Error().stack;
2314
+ } catch {
2315
+ return result;
2316
+ }
2317
+ Error.prepareStackTrace = _prepareStackTrace;
2318
+ return result;
2319
+ }
2320
+ function createPrompt(view) {
2321
+ const callSites = getCallSites();
2322
+ const prompt = /* @__PURE__ */ __name((config, context = {}) => {
2323
+ const { input: input2 = process.stdin, signal } = context;
2324
+ const cleanups = /* @__PURE__ */ new Set();
2325
+ const output = new import_mute_stream.default();
2326
+ output.pipe(context.output ?? process.stdout);
2327
+ output.mute();
2328
+ const rl = readline2.createInterface({
2329
+ terminal: true,
2330
+ input: input2,
2331
+ output
2332
+ });
2333
+ const screen = new ScreenManager(rl);
2334
+ const { promise, resolve, reject } = PromisePolyfill.withResolver();
2335
+ const cancel = /* @__PURE__ */ __name(() => reject(new CancelPromptError()), "cancel");
2336
+ if (signal) {
2337
+ const abort = /* @__PURE__ */ __name(() => reject(new AbortPromptError({ cause: signal.reason })), "abort");
2338
+ if (signal.aborted) {
2339
+ abort();
2340
+ return Object.assign(promise, { cancel });
2341
+ }
2342
+ signal.addEventListener("abort", abort);
2343
+ cleanups.add(() => signal.removeEventListener("abort", abort));
2307
2344
  }
2308
- __name(getCallSites, "getCallSites");
2309
- function createPrompt(view) {
2310
- const callSites = getCallSites();
2311
- const prompt = /* @__PURE__ */ __name((config, context = {}) => {
2312
- const { input: input2 = process.stdin, signal } = context;
2313
- const cleanups = /* @__PURE__ */ new Set();
2314
- const output = new mute_stream_1.default();
2315
- output.pipe(context.output ?? process.stdout);
2316
- const rl = readline.createInterface({
2317
- terminal: true,
2318
- input: input2,
2319
- output
2320
- });
2321
- const screen = new screen_manager_ts_1.default(rl);
2322
- const { promise, resolve, reject } = promise_polyfill_ts_1.PromisePolyfill.withResolver();
2323
- const cancel = /* @__PURE__ */ __name(() => reject(new errors_ts_1.CancelPromptError()), "cancel");
2324
- if (signal) {
2325
- const abort = /* @__PURE__ */ __name(() => reject(new errors_ts_1.AbortPromptError({ cause: signal.reason })), "abort");
2326
- if (signal.aborted) {
2327
- abort();
2328
- return Object.assign(promise, { cancel });
2329
- }
2330
- signal.addEventListener("abort", abort);
2331
- cleanups.add(() => signal.removeEventListener("abort", abort));
2332
- }
2333
- cleanups.add((0, signal_exit_1.onExit)((code, signal2) => {
2334
- reject(new errors_ts_1.ExitPromptError(`User force closed the prompt with ${code} ${signal2}`));
2335
- }));
2336
- const sigint = /* @__PURE__ */ __name(() => reject(new errors_ts_1.ExitPromptError(`User force closed the prompt with SIGINT`)), "sigint");
2337
- rl.on("SIGINT", sigint);
2338
- cleanups.add(() => rl.removeListener("SIGINT", sigint));
2345
+ cleanups.add(onExit((code, signal2) => {
2346
+ reject(new ExitPromptError(`User force closed the prompt with ${code} ${signal2}`));
2347
+ }));
2348
+ const sigint = /* @__PURE__ */ __name(() => reject(new ExitPromptError(`User force closed the prompt with SIGINT`)), "sigint");
2349
+ rl.on("SIGINT", sigint);
2350
+ cleanups.add(() => rl.removeListener("SIGINT", sigint));
2351
+ return withHooks(rl, (cycle) => {
2352
+ const hooksCleanup = import_node_async_hooks3.AsyncResource.bind(() => effectScheduler.clearAll());
2353
+ rl.on("close", hooksCleanup);
2354
+ cleanups.add(() => rl.removeListener("close", hooksCleanup));
2355
+ const startCycle = /* @__PURE__ */ __name(() => {
2339
2356
  const checkCursorPos = /* @__PURE__ */ __name(() => screen.checkCursorPos(), "checkCursorPos");
2340
2357
  rl.input.on("keypress", checkCursorPos);
2341
2358
  cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
2342
- return (0, hook_engine_ts_1.withHooks)(rl, (cycle) => {
2343
- const hooksCleanup = node_async_hooks_1.AsyncResource.bind(() => hook_engine_ts_1.effectScheduler.clearAll());
2344
- rl.on("close", hooksCleanup);
2345
- cleanups.add(() => rl.removeListener("close", hooksCleanup));
2346
- cycle(() => {
2347
- try {
2348
- const nextView = view(config, (value) => {
2349
- setImmediate(() => resolve(value));
2350
- });
2351
- if (nextView === void 0) {
2352
- const callerFilename = callSites[1]?.getFileName();
2353
- throw new Error(`Prompt functions must return a string.
2354
- at ${callerFilename}`);
2359
+ let pendingDone = null;
2360
+ cycle(() => {
2361
+ let effectsSettled = false;
2362
+ try {
2363
+ const nextView = view(config, (value) => {
2364
+ if (effectsSettled) {
2365
+ resolve(value);
2366
+ } else {
2367
+ pendingDone = { value };
2355
2368
  }
2356
- const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
2357
- screen.render(content, bottomContent);
2358
- hook_engine_ts_1.effectScheduler.run();
2359
- } catch (error) {
2360
- reject(error);
2369
+ });
2370
+ if (nextView === void 0) {
2371
+ let callerFilename = callSites[1]?.getFileName();
2372
+ if (callerFilename && !callerFilename.startsWith("file://")) {
2373
+ callerFilename = import_node_path.default.resolve(callerFilename);
2374
+ }
2375
+ throw new Error(`Prompt functions must return a string.
2376
+ at ${callerFilename}`);
2361
2377
  }
2362
- });
2363
- return Object.assign(promise.then((answer) => {
2364
- hook_engine_ts_1.effectScheduler.clearAll();
2365
- return answer;
2366
- }, (error) => {
2367
- hook_engine_ts_1.effectScheduler.clearAll();
2368
- throw error;
2369
- }).finally(() => {
2370
- cleanups.forEach((cleanup) => cleanup());
2371
- screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
2372
- output.end();
2373
- }).then(() => promise), { cancel });
2378
+ const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
2379
+ screen.render(content, bottomContent);
2380
+ effectScheduler.run();
2381
+ } catch (error) {
2382
+ reject(error);
2383
+ }
2384
+ effectsSettled = true;
2385
+ if (pendingDone !== null) {
2386
+ const { value } = pendingDone;
2387
+ pendingDone = null;
2388
+ resolve(value);
2389
+ }
2374
2390
  });
2375
- }, "prompt");
2376
- return prompt;
2377
- }
2391
+ }, "startCycle");
2392
+ if ("readableFlowing" in input2) {
2393
+ nativeSetImmediate(startCycle);
2394
+ } else {
2395
+ startCycle();
2396
+ }
2397
+ return Object.assign(promise.then((answer) => {
2398
+ effectScheduler.clearAll();
2399
+ return answer;
2400
+ }, (error) => {
2401
+ effectScheduler.clearAll();
2402
+ throw error;
2403
+ }).finally(() => {
2404
+ cleanups.forEach((cleanup) => cleanup());
2405
+ screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
2406
+ output.end();
2407
+ }).then(() => promise), { cancel });
2408
+ });
2409
+ }, "prompt");
2410
+ return prompt;
2411
+ }
2412
+ var readline2, import_node_async_hooks3, import_mute_stream, import_node_path, nativeSetImmediate;
2413
+ var init_create_prompt = __esm({
2414
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/create-prompt.js"() {
2415
+ readline2 = __toESM(require("node:readline"), 1);
2416
+ import_node_async_hooks3 = require("node:async_hooks");
2417
+ import_mute_stream = __toESM(require_lib(), 1);
2418
+ init_mjs();
2419
+ init_screen_manager();
2420
+ init_promise_polyfill();
2421
+ init_hook_engine();
2422
+ init_errors();
2423
+ import_node_path = __toESM(require("node:path"), 1);
2424
+ nativeSetImmediate = globalThis.setImmediate;
2425
+ __name(getCallSites, "getCallSites");
2378
2426
  __name(createPrompt, "createPrompt");
2379
2427
  }
2380
2428
  });
2381
2429
 
2382
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/Separator.js
2383
- var require_Separator = __commonJS({
2384
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/Separator.js"(exports2) {
2385
- "use strict";
2386
- var __importDefault = exports2 && exports2.__importDefault || function(mod) {
2387
- return mod && mod.__esModule ? mod : { "default": mod };
2388
- };
2389
- Object.defineProperty(exports2, "__esModule", { value: true });
2390
- exports2.Separator = void 0;
2391
- var yoctocolors_cjs_1 = __importDefault(require_yoctocolors_cjs());
2392
- var figures_1 = __importDefault(require_commonjs());
2393
- var Separator = class {
2430
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/Separator.js
2431
+ var import_node_util3, Separator;
2432
+ var init_Separator = __esm({
2433
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/Separator.js"() {
2434
+ import_node_util3 = require("node:util");
2435
+ init_dist();
2436
+ Separator = class {
2394
2437
  static {
2395
2438
  __name(this, "Separator");
2396
2439
  }
2397
- separator = yoctocolors_cjs_1.default.dim(Array.from({ length: 15 }).join(figures_1.default.line));
2440
+ separator = (0, import_node_util3.styleText)("dim", Array.from({ length: 15 }).join(dist_default.line));
2398
2441
  type = "separator";
2399
2442
  constructor(separator) {
2400
2443
  if (separator) {
@@ -2405,204 +2448,134 @@ var require_Separator = __commonJS({
2405
2448
  return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
2406
2449
  }
2407
2450
  };
2408
- exports2.Separator = Separator;
2409
2451
  }
2410
2452
  });
2411
2453
 
2412
- // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/index.js
2413
- var require_commonjs3 = __commonJS({
2414
- "node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/index.js"(exports2) {
2415
- "use strict";
2416
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
2417
- if (k2 === void 0) k2 = k;
2418
- var desc = Object.getOwnPropertyDescriptor(m, k);
2419
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2420
- desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
2421
- return m[k];
2422
- }, "get") };
2423
- }
2424
- Object.defineProperty(o, k2, desc);
2425
- }) : (function(o, m, k, k2) {
2426
- if (k2 === void 0) k2 = k;
2427
- o[k2] = m[k];
2428
- }));
2429
- var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
2430
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
2431
- };
2432
- Object.defineProperty(exports2, "__esModule", { value: true });
2433
- exports2.Separator = exports2.createPrompt = exports2.usePagination = exports2.makeTheme = exports2.useKeypress = exports2.useRef = exports2.useMemo = exports2.useEffect = exports2.useState = exports2.usePrefix = exports2.isEnterKey = exports2.isNumberKey = exports2.isTabKey = exports2.isBackspaceKey = exports2.isSpaceKey = exports2.isDownKey = exports2.isUpKey = void 0;
2434
- var key_ts_1 = require_key();
2435
- Object.defineProperty(exports2, "isUpKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2436
- return key_ts_1.isUpKey;
2437
- }, "get") });
2438
- Object.defineProperty(exports2, "isDownKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2439
- return key_ts_1.isDownKey;
2440
- }, "get") });
2441
- Object.defineProperty(exports2, "isSpaceKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2442
- return key_ts_1.isSpaceKey;
2443
- }, "get") });
2444
- Object.defineProperty(exports2, "isBackspaceKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2445
- return key_ts_1.isBackspaceKey;
2446
- }, "get") });
2447
- Object.defineProperty(exports2, "isTabKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2448
- return key_ts_1.isTabKey;
2449
- }, "get") });
2450
- Object.defineProperty(exports2, "isNumberKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2451
- return key_ts_1.isNumberKey;
2452
- }, "get") });
2453
- Object.defineProperty(exports2, "isEnterKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2454
- return key_ts_1.isEnterKey;
2455
- }, "get") });
2456
- __exportStar(require_errors(), exports2);
2457
- var use_prefix_ts_1 = require_use_prefix();
2458
- Object.defineProperty(exports2, "usePrefix", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2459
- return use_prefix_ts_1.usePrefix;
2460
- }, "get") });
2461
- var use_state_ts_1 = require_use_state();
2462
- Object.defineProperty(exports2, "useState", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2463
- return use_state_ts_1.useState;
2464
- }, "get") });
2465
- var use_effect_ts_1 = require_use_effect();
2466
- Object.defineProperty(exports2, "useEffect", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2467
- return use_effect_ts_1.useEffect;
2468
- }, "get") });
2469
- var use_memo_ts_1 = require_use_memo();
2470
- Object.defineProperty(exports2, "useMemo", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2471
- return use_memo_ts_1.useMemo;
2472
- }, "get") });
2473
- var use_ref_ts_1 = require_use_ref();
2474
- Object.defineProperty(exports2, "useRef", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2475
- return use_ref_ts_1.useRef;
2476
- }, "get") });
2477
- var use_keypress_ts_1 = require_use_keypress();
2478
- Object.defineProperty(exports2, "useKeypress", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2479
- return use_keypress_ts_1.useKeypress;
2480
- }, "get") });
2481
- var make_theme_ts_1 = require_make_theme();
2482
- Object.defineProperty(exports2, "makeTheme", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2483
- return make_theme_ts_1.makeTheme;
2484
- }, "get") });
2485
- var use_pagination_ts_1 = require_use_pagination();
2486
- Object.defineProperty(exports2, "usePagination", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2487
- return use_pagination_ts_1.usePagination;
2488
- }, "get") });
2489
- var create_prompt_ts_1 = require_create_prompt();
2490
- Object.defineProperty(exports2, "createPrompt", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2491
- return create_prompt_ts_1.createPrompt;
2492
- }, "get") });
2493
- var Separator_ts_1 = require_Separator();
2494
- Object.defineProperty(exports2, "Separator", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2495
- return Separator_ts_1.Separator;
2496
- }, "get") });
2454
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/index.js
2455
+ var init_dist5 = __esm({
2456
+ "node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/index.js"() {
2457
+ init_key();
2458
+ init_errors();
2459
+ init_use_prefix();
2460
+ init_use_state();
2461
+ init_use_effect();
2462
+ init_use_memo();
2463
+ init_use_ref();
2464
+ init_use_keypress();
2465
+ init_make_theme();
2466
+ init_use_pagination();
2467
+ init_create_prompt();
2468
+ init_Separator();
2497
2469
  }
2498
2470
  });
2499
2471
 
2500
- // node_modules/.pnpm/@inquirer+checkbox@4.3.1_@types+node@24.9.2/node_modules/@inquirer/checkbox/dist/commonjs/index.js
2501
- var require_commonjs4 = __commonJS({
2502
- "node_modules/.pnpm/@inquirer+checkbox@4.3.1_@types+node@24.9.2/node_modules/@inquirer/checkbox/dist/commonjs/index.js"(exports2) {
2503
- "use strict";
2504
- var __importDefault = exports2 && exports2.__importDefault || function(mod) {
2505
- return mod && mod.__esModule ? mod : { "default": mod };
2472
+ // node_modules/.pnpm/@inquirer+checkbox@5.1.3_@types+node@24.9.2/node_modules/@inquirer/checkbox/dist/index.js
2473
+ var dist_exports = {};
2474
+ __export(dist_exports, {
2475
+ Separator: () => Separator,
2476
+ default: () => dist_default4
2477
+ });
2478
+ function isSelectable(item) {
2479
+ return !Separator.isSeparator(item) && !item.disabled;
2480
+ }
2481
+ function isNavigable(item) {
2482
+ return !Separator.isSeparator(item);
2483
+ }
2484
+ function isChecked(item) {
2485
+ return !Separator.isSeparator(item) && item.checked;
2486
+ }
2487
+ function toggle(item) {
2488
+ return isSelectable(item) ? { ...item, checked: !item.checked } : item;
2489
+ }
2490
+ function check(checked) {
2491
+ return function(item) {
2492
+ return isSelectable(item) ? { ...item, checked } : item;
2493
+ };
2494
+ }
2495
+ function normalizeChoices(choices) {
2496
+ return choices.map((choice) => {
2497
+ if (Separator.isSeparator(choice))
2498
+ return choice;
2499
+ if (typeof choice !== "object" || choice === null || !("value" in choice)) {
2500
+ const name2 = String(choice);
2501
+ return {
2502
+ value: choice,
2503
+ name: name2,
2504
+ short: name2,
2505
+ checkedName: name2,
2506
+ disabled: false,
2507
+ checked: false
2508
+ };
2509
+ }
2510
+ const name = choice.name ?? String(choice.value);
2511
+ const normalizedChoice = {
2512
+ value: choice.value,
2513
+ name,
2514
+ short: choice.short ?? name,
2515
+ checkedName: choice.checkedName ?? name,
2516
+ disabled: choice.disabled ?? false,
2517
+ checked: choice.checked ?? false
2506
2518
  };
2507
- Object.defineProperty(exports2, "__esModule", { value: true });
2508
- exports2.Separator = void 0;
2509
- var core_1 = require_commonjs3();
2510
- var ansi_1 = require_commonjs2();
2511
- var yoctocolors_cjs_1 = __importDefault(require_yoctocolors_cjs());
2512
- var figures_1 = __importDefault(require_commonjs());
2513
- var checkboxTheme = {
2519
+ if (choice.description) {
2520
+ normalizedChoice.description = choice.description;
2521
+ }
2522
+ return normalizedChoice;
2523
+ });
2524
+ }
2525
+ var import_node_util4, checkboxTheme, dist_default4;
2526
+ var init_dist6 = __esm({
2527
+ "node_modules/.pnpm/@inquirer+checkbox@5.1.3_@types+node@24.9.2/node_modules/@inquirer/checkbox/dist/index.js"() {
2528
+ init_dist5();
2529
+ init_dist4();
2530
+ import_node_util4 = require("node:util");
2531
+ init_dist();
2532
+ init_dist5();
2533
+ checkboxTheme = {
2514
2534
  icon: {
2515
- checked: yoctocolors_cjs_1.default.green(figures_1.default.circleFilled),
2516
- unchecked: figures_1.default.circle,
2517
- cursor: figures_1.default.pointer
2535
+ checked: (0, import_node_util4.styleText)("green", dist_default.circleFilled),
2536
+ unchecked: dist_default.circle,
2537
+ cursor: dist_default.pointer,
2538
+ disabledChecked: (0, import_node_util4.styleText)("green", dist_default.circleDouble),
2539
+ disabledUnchecked: "-"
2518
2540
  },
2519
2541
  style: {
2520
- disabledChoice: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.dim(`- ${text}`), "disabledChoice"),
2542
+ disabled: /* @__PURE__ */ __name((text) => (0, import_node_util4.styleText)("dim", text), "disabled"),
2521
2543
  renderSelectedChoices: /* @__PURE__ */ __name((selectedChoices) => selectedChoices.map((choice) => choice.short).join(", "), "renderSelectedChoices"),
2522
- description: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.cyan(text), "description"),
2523
- keysHelpTip: /* @__PURE__ */ __name((keys) => keys.map(([key, action]) => `${yoctocolors_cjs_1.default.bold(key)} ${yoctocolors_cjs_1.default.dim(action)}`).join(yoctocolors_cjs_1.default.dim(" • ")), "keysHelpTip")
2544
+ description: /* @__PURE__ */ __name((text) => (0, import_node_util4.styleText)("cyan", text), "description"),
2545
+ keysHelpTip: /* @__PURE__ */ __name((keys) => keys.map(([key, action]) => `${(0, import_node_util4.styleText)("bold", key)} ${(0, import_node_util4.styleText)("dim", action)}`).join((0, import_node_util4.styleText)("dim", " • ")), "keysHelpTip")
2524
2546
  },
2525
- helpMode: "always",
2547
+ i18n: { disabledError: "This option is disabled and cannot be toggled." },
2526
2548
  keybindings: []
2527
2549
  };
2528
- function isSelectable(item) {
2529
- return !core_1.Separator.isSeparator(item) && !item.disabled;
2530
- }
2531
2550
  __name(isSelectable, "isSelectable");
2532
- function isChecked(item) {
2533
- return isSelectable(item) && item.checked;
2534
- }
2551
+ __name(isNavigable, "isNavigable");
2535
2552
  __name(isChecked, "isChecked");
2536
- function toggle(item) {
2537
- return isSelectable(item) ? { ...item, checked: !item.checked } : item;
2538
- }
2539
2553
  __name(toggle, "toggle");
2540
- function check(checked) {
2541
- return function(item) {
2542
- return isSelectable(item) ? { ...item, checked } : item;
2543
- };
2544
- }
2545
2554
  __name(check, "check");
2546
- function normalizeChoices(choices) {
2547
- return choices.map((choice) => {
2548
- if (core_1.Separator.isSeparator(choice))
2549
- return choice;
2550
- if (typeof choice === "string") {
2551
- return {
2552
- value: choice,
2553
- name: choice,
2554
- short: choice,
2555
- checkedName: choice,
2556
- disabled: false,
2557
- checked: false
2558
- };
2559
- }
2560
- const name = choice.name ?? String(choice.value);
2561
- const normalizedChoice = {
2562
- value: choice.value,
2563
- name,
2564
- short: choice.short ?? name,
2565
- checkedName: choice.checkedName ?? name,
2566
- disabled: choice.disabled ?? false,
2567
- checked: choice.checked ?? false
2568
- };
2569
- if (choice.description) {
2570
- normalizedChoice.description = choice.description;
2571
- }
2572
- return normalizedChoice;
2573
- });
2574
- }
2575
2555
  __name(normalizeChoices, "normalizeChoices");
2576
- exports2.default = (0, core_1.createPrompt)((config, done) => {
2577
- const {
2578
- // eslint-disable-next-line @typescript-eslint/no-deprecated
2579
- instructions,
2580
- pageSize = 7,
2581
- loop = true,
2582
- required,
2583
- validate: validate2 = /* @__PURE__ */ __name(() => true, "validate")
2584
- } = config;
2556
+ dist_default4 = createPrompt((config, done) => {
2557
+ const { pageSize = 7, loop = true, required, validate = /* @__PURE__ */ __name(() => true, "validate") } = config;
2585
2558
  const shortcuts = { all: "a", invert: "i", ...config.shortcuts };
2586
- const theme = (0, core_1.makeTheme)(checkboxTheme, config.theme);
2559
+ const theme = makeTheme(checkboxTheme, config.theme);
2587
2560
  const { keybindings } = theme;
2588
- const [status, setStatus] = (0, core_1.useState)("idle");
2589
- const prefix = (0, core_1.usePrefix)({ status, theme });
2590
- const [items, setItems] = (0, core_1.useState)(normalizeChoices(config.choices));
2591
- const bounds = (0, core_1.useMemo)(() => {
2592
- const first = items.findIndex(isSelectable);
2593
- const last = items.findLastIndex(isSelectable);
2561
+ const [status, setStatus] = useState("idle");
2562
+ const prefix = usePrefix({ status, theme });
2563
+ const [items, setItems] = useState(normalizeChoices(config.choices));
2564
+ const bounds = useMemo(() => {
2565
+ const first = items.findIndex(isNavigable);
2566
+ const last = items.findLastIndex(isNavigable);
2594
2567
  if (first === -1) {
2595
- throw new core_1.ValidationError("[checkbox prompt] No selectable choices. All choices are disabled.");
2568
+ throw new ValidationError("[checkbox prompt] No selectable choices. All choices are disabled.");
2596
2569
  }
2597
2570
  return { first, last };
2598
2571
  }, [items]);
2599
- const [active, setActive] = (0, core_1.useState)(bounds.first);
2600
- const [errorMsg, setError] = (0, core_1.useState)();
2601
- (0, core_1.useKeypress)(async (key) => {
2602
- if ((0, core_1.isEnterKey)(key)) {
2572
+ const [active, setActive] = useState(bounds.first);
2573
+ const [errorMsg, setError] = useState();
2574
+ useKeypress(async (key) => {
2575
+ if (isEnterKey(key)) {
2603
2576
  const selection = items.filter(isChecked);
2604
- const isValid = await validate2([...selection]);
2605
- if (required && !items.some(isChecked)) {
2577
+ const isValid = await validate([...selection]);
2578
+ if (required && !selection.length) {
2606
2579
  setError("At least one choice must be selected");
2607
2580
  } else if (isValid === true) {
2608
2581
  setStatus("done");
@@ -2610,28 +2583,38 @@ var require_commonjs4 = __commonJS({
2610
2583
  } else {
2611
2584
  setError(isValid || "You must select a valid value");
2612
2585
  }
2613
- } else if ((0, core_1.isUpKey)(key, keybindings) || (0, core_1.isDownKey)(key, keybindings)) {
2614
- if (loop || (0, core_1.isUpKey)(key, keybindings) && active !== bounds.first || (0, core_1.isDownKey)(key, keybindings) && active !== bounds.last) {
2615
- const offset = (0, core_1.isUpKey)(key, keybindings) ? -1 : 1;
2586
+ } else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {
2587
+ if (errorMsg) {
2588
+ setError(void 0);
2589
+ }
2590
+ if (loop || isUpKey(key, keybindings) && active !== bounds.first || isDownKey(key, keybindings) && active !== bounds.last) {
2591
+ const offset = isUpKey(key, keybindings) ? -1 : 1;
2616
2592
  let next = active;
2617
2593
  do {
2618
2594
  next = (next + offset + items.length) % items.length;
2619
- } while (!isSelectable(items[next]));
2595
+ } while (!isNavigable(items[next]));
2620
2596
  setActive(next);
2621
2597
  }
2622
- } else if ((0, core_1.isSpaceKey)(key)) {
2623
- setError(void 0);
2624
- setItems(items.map((choice, i) => i === active ? toggle(choice) : choice));
2598
+ } else if (isSpaceKey(key)) {
2599
+ const activeItem = items[active];
2600
+ if (activeItem && !Separator.isSeparator(activeItem)) {
2601
+ if (activeItem.disabled) {
2602
+ setError(theme.i18n.disabledError);
2603
+ } else {
2604
+ setError(void 0);
2605
+ setItems(items.map((choice, i) => i === active ? toggle(choice) : choice));
2606
+ }
2607
+ }
2625
2608
  } else if (key.name === shortcuts.all) {
2626
2609
  const selectAll = items.some((choice) => isSelectable(choice) && !choice.checked);
2627
2610
  setItems(items.map(check(selectAll)));
2628
2611
  } else if (key.name === shortcuts.invert) {
2629
2612
  setItems(items.map(toggle));
2630
- } else if ((0, core_1.isNumberKey)(key)) {
2613
+ } else if (isNumberKey(key)) {
2631
2614
  const selectedIndex = Number(key.name) - 1;
2632
2615
  let selectableIndex = -1;
2633
2616
  const position = items.findIndex((item) => {
2634
- if (core_1.Separator.isSeparator(item))
2617
+ if (Separator.isSeparator(item))
2635
2618
  return false;
2636
2619
  selectableIndex++;
2637
2620
  return selectableIndex === selectedIndex;
@@ -2645,16 +2628,18 @@ var require_commonjs4 = __commonJS({
2645
2628
  });
2646
2629
  const message = theme.style.message(config.message, status);
2647
2630
  let description;
2648
- const page = (0, core_1.usePagination)({
2631
+ const page = usePagination({
2649
2632
  items,
2650
2633
  active,
2651
2634
  renderItem({ item, isActive }) {
2652
- if (core_1.Separator.isSeparator(item)) {
2635
+ if (Separator.isSeparator(item)) {
2653
2636
  return ` ${item.separator}`;
2654
2637
  }
2638
+ const cursor = isActive ? theme.icon.cursor : " ";
2655
2639
  if (item.disabled) {
2656
2640
  const disabledLabel = typeof item.disabled === "string" ? item.disabled : "(disabled)";
2657
- return theme.style.disabledChoice(`${item.name} ${disabledLabel}`);
2641
+ const checkbox3 = item.checked ? theme.icon.disabledChecked : theme.icon.disabledUnchecked;
2642
+ return theme.style.disabled(`${cursor}${checkbox3} ${item.name} ${disabledLabel}`);
2658
2643
  }
2659
2644
  if (isActive) {
2660
2645
  description = item.description;
@@ -2662,7 +2647,6 @@ var require_commonjs4 = __commonJS({
2662
2647
  const checkbox2 = item.checked ? theme.icon.checked : theme.icon.unchecked;
2663
2648
  const name = item.checked ? item.checkedName : item.name;
2664
2649
  const color = isActive ? theme.style.highlight : (x) => x;
2665
- const cursor = isActive ? theme.icon.cursor : " ";
2666
2650
  return color(`${cursor}${checkbox2} ${name}`);
2667
2651
  },
2668
2652
  pageSize,
@@ -2673,23 +2657,16 @@ var require_commonjs4 = __commonJS({
2673
2657
  const answer = theme.style.answer(theme.style.renderSelectedChoices(selection, items));
2674
2658
  return [prefix, message, answer].filter(Boolean).join(" ");
2675
2659
  }
2676
- let helpLine;
2677
- if (theme.helpMode !== "never" && instructions !== false) {
2678
- if (typeof instructions === "string") {
2679
- helpLine = instructions;
2680
- } else {
2681
- const keys = [
2682
- ["↑↓", "navigate"],
2683
- ["space", "select"]
2684
- ];
2685
- if (shortcuts.all)
2686
- keys.push([shortcuts.all, "all"]);
2687
- if (shortcuts.invert)
2688
- keys.push([shortcuts.invert, "invert"]);
2689
- keys.push(["⏎", "submit"]);
2690
- helpLine = theme.style.keysHelpTip(keys);
2691
- }
2692
- }
2660
+ const keys = [
2661
+ ["↑↓", "navigate"],
2662
+ ["space", "select"]
2663
+ ];
2664
+ if (shortcuts.all)
2665
+ keys.push([shortcuts.all, "all"]);
2666
+ if (shortcuts.invert)
2667
+ keys.push([shortcuts.invert, "invert"]);
2668
+ keys.push(["⏎", "submit"]);
2669
+ const helpLine = theme.style.keysHelpTip(keys);
2693
2670
  const lines = [
2694
2671
  [prefix, message].filter(Boolean).join(" "),
2695
2672
  page,
@@ -2698,49 +2675,48 @@ var require_commonjs4 = __commonJS({
2698
2675
  errorMsg ? theme.style.error(errorMsg) : "",
2699
2676
  helpLine
2700
2677
  ].filter(Boolean).join("\n").trimEnd();
2701
- return `${lines}${ansi_1.cursorHide}`;
2678
+ return `${lines}${cursorHide}`;
2702
2679
  });
2703
- var core_2 = require_commonjs3();
2704
- Object.defineProperty(exports2, "Separator", { enumerable: true, get: /* @__PURE__ */ __name(function() {
2705
- return core_2.Separator;
2706
- }, "get") });
2707
2680
  }
2708
2681
  });
2709
2682
 
2710
- // node_modules/.pnpm/@inquirer+confirm@5.1.16_@types+node@24.9.2/node_modules/@inquirer/confirm/dist/commonjs/index.js
2711
- var require_commonjs5 = __commonJS({
2712
- "node_modules/.pnpm/@inquirer+confirm@5.1.16_@types+node@24.9.2/node_modules/@inquirer/confirm/dist/commonjs/index.js"(exports2) {
2713
- "use strict";
2714
- Object.defineProperty(exports2, "__esModule", { value: true });
2715
- var core_1 = require_commonjs3();
2716
- function getBooleanValue(value, defaultValue) {
2717
- let answer = defaultValue !== false;
2718
- if (/^(y|yes)/i.test(value))
2719
- answer = true;
2720
- else if (/^(n|no)/i.test(value))
2721
- answer = false;
2722
- return answer;
2723
- }
2683
+ // node_modules/.pnpm/@inquirer+confirm@6.0.11_@types+node@24.9.2/node_modules/@inquirer/confirm/dist/index.js
2684
+ var dist_exports2 = {};
2685
+ __export(dist_exports2, {
2686
+ default: () => dist_default5
2687
+ });
2688
+ function getBooleanValue(value, defaultValue) {
2689
+ let answer = defaultValue !== false;
2690
+ if (/^(y|yes)/i.test(value))
2691
+ answer = true;
2692
+ else if (/^(n|no)/i.test(value))
2693
+ answer = false;
2694
+ return answer;
2695
+ }
2696
+ function boolToString(value) {
2697
+ return value ? "Yes" : "No";
2698
+ }
2699
+ var dist_default5;
2700
+ var init_dist7 = __esm({
2701
+ "node_modules/.pnpm/@inquirer+confirm@6.0.11_@types+node@24.9.2/node_modules/@inquirer/confirm/dist/index.js"() {
2702
+ init_dist5();
2724
2703
  __name(getBooleanValue, "getBooleanValue");
2725
- function boolToString(value) {
2726
- return value ? "Yes" : "No";
2727
- }
2728
2704
  __name(boolToString, "boolToString");
2729
- exports2.default = (0, core_1.createPrompt)((config, done) => {
2705
+ dist_default5 = createPrompt((config, done) => {
2730
2706
  const { transformer = boolToString } = config;
2731
- const [status, setStatus] = (0, core_1.useState)("idle");
2732
- const [value, setValue] = (0, core_1.useState)("");
2733
- const theme = (0, core_1.makeTheme)(config.theme);
2734
- const prefix = (0, core_1.usePrefix)({ status, theme });
2735
- (0, core_1.useKeypress)((key, rl) => {
2707
+ const [status, setStatus] = useState("idle");
2708
+ const [value, setValue] = useState("");
2709
+ const theme = makeTheme(config.theme);
2710
+ const prefix = usePrefix({ status, theme });
2711
+ useKeypress((key, rl) => {
2736
2712
  if (status !== "idle")
2737
2713
  return;
2738
- if ((0, core_1.isEnterKey)(key)) {
2714
+ if (isEnterKey(key)) {
2739
2715
  const answer = getBooleanValue(value, config.default);
2740
2716
  setValue(transformer(answer));
2741
2717
  setStatus("done");
2742
2718
  done(answer);
2743
- } else if ((0, core_1.isTabKey)(key)) {
2719
+ } else if (isTabKey(key)) {
2744
2720
  const answer = boolToString(!getBooleanValue(value, config.default));
2745
2721
  rl.clearLine(0);
2746
2722
  rl.write(answer);
@@ -2762,31 +2738,48 @@ var require_commonjs5 = __commonJS({
2762
2738
  }
2763
2739
  });
2764
2740
 
2765
- // node_modules/.pnpm/@inquirer+input@4.2.2_@types+node@24.9.2/node_modules/@inquirer/input/dist/commonjs/index.js
2766
- var require_commonjs6 = __commonJS({
2767
- "node_modules/.pnpm/@inquirer+input@4.2.2_@types+node@24.9.2/node_modules/@inquirer/input/dist/commonjs/index.js"(exports2) {
2768
- "use strict";
2769
- Object.defineProperty(exports2, "__esModule", { value: true });
2770
- var core_1 = require_commonjs3();
2771
- var inputTheme = {
2741
+ // node_modules/.pnpm/@inquirer+input@5.0.11_@types+node@24.9.2/node_modules/@inquirer/input/dist/index.js
2742
+ var dist_exports3 = {};
2743
+ __export(dist_exports3, {
2744
+ default: () => dist_default6
2745
+ });
2746
+ var inputTheme, dist_default6;
2747
+ var init_dist8 = __esm({
2748
+ "node_modules/.pnpm/@inquirer+input@5.0.11_@types+node@24.9.2/node_modules/@inquirer/input/dist/index.js"() {
2749
+ init_dist5();
2750
+ inputTheme = {
2772
2751
  validationFailureMode: "keep"
2773
2752
  };
2774
- exports2.default = (0, core_1.createPrompt)((config, done) => {
2775
- const { required, validate: validate2 = /* @__PURE__ */ __name(() => true, "validate"), prefill = "tab" } = config;
2776
- const theme = (0, core_1.makeTheme)(inputTheme, config.theme);
2777
- const [status, setStatus] = (0, core_1.useState)("idle");
2778
- const [defaultValue = "", setDefaultValue] = (0, core_1.useState)(config.default);
2779
- const [errorMsg, setError] = (0, core_1.useState)();
2780
- const [value, setValue] = (0, core_1.useState)("");
2781
- const prefix = (0, core_1.usePrefix)({ status, theme });
2782
- (0, core_1.useKeypress)(async (key, rl) => {
2753
+ dist_default6 = createPrompt((config, done) => {
2754
+ const { prefill = "tab" } = config;
2755
+ const theme = makeTheme(inputTheme, config.theme);
2756
+ const [status, setStatus] = useState("idle");
2757
+ const [defaultValue, setDefaultValue] = useState(String(config.default ?? ""));
2758
+ const [errorMsg, setError] = useState();
2759
+ const [value, setValue] = useState("");
2760
+ const prefix = usePrefix({ status, theme });
2761
+ async function validate(value2) {
2762
+ const { required, pattern, patternError = "Invalid input" } = config;
2763
+ if (required && !value2) {
2764
+ return "You must provide a value";
2765
+ }
2766
+ if (pattern && !pattern.test(value2)) {
2767
+ return patternError;
2768
+ }
2769
+ if (typeof config.validate === "function") {
2770
+ return await config.validate(value2) || "You must provide a valid value";
2771
+ }
2772
+ return true;
2773
+ }
2774
+ __name(validate, "validate");
2775
+ useKeypress(async (key, rl) => {
2783
2776
  if (status !== "idle") {
2784
2777
  return;
2785
2778
  }
2786
- if ((0, core_1.isEnterKey)(key)) {
2779
+ if (isEnterKey(key)) {
2787
2780
  const answer = value || defaultValue;
2788
2781
  setStatus("loading");
2789
- const isValid = required && !answer ? "You must provide a value" : await validate2(answer);
2782
+ const isValid = await validate(answer);
2790
2783
  if (isValid === true) {
2791
2784
  setValue(answer);
2792
2785
  setStatus("done");
@@ -2797,13 +2790,13 @@ var require_commonjs6 = __commonJS({
2797
2790
  } else {
2798
2791
  rl.write(value);
2799
2792
  }
2800
- setError(isValid || "You must provide a valid value");
2793
+ setError(isValid);
2801
2794
  setStatus("idle");
2802
2795
  }
2803
- } else if ((0, core_1.isBackspaceKey)(key) && !value) {
2804
- setDefaultValue(void 0);
2805
- } else if ((0, core_1.isTabKey)(key) && !value) {
2806
- setDefaultValue(void 0);
2796
+ } else if (isBackspaceKey(key) && !value) {
2797
+ setDefaultValue("");
2798
+ } else if (isTabKey(key) && !value) {
2799
+ setDefaultValue("");
2807
2800
  rl.clearLine(0);
2808
2801
  rl.write(defaultValue);
2809
2802
  setValue(defaultValue);
@@ -2812,7 +2805,7 @@ var require_commonjs6 = __commonJS({
2812
2805
  setError(void 0);
2813
2806
  }
2814
2807
  });
2815
- (0, core_1.useEffect)((rl) => {
2808
+ useEffect((rl) => {
2816
2809
  if (prefill === "editable" && defaultValue) {
2817
2810
  rl.write(defaultValue);
2818
2811
  setValue(defaultValue);
@@ -2841,158 +2834,36 @@ var require_commonjs6 = __commonJS({
2841
2834
  }
2842
2835
  });
2843
2836
 
2844
- // node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js
2845
- var require_ansi_escapes = __commonJS({
2846
- "node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports2, module2) {
2847
- "use strict";
2848
- var ansiEscapes = module2.exports;
2849
- module2.exports.default = ansiEscapes;
2850
- var ESC = "\x1B[";
2851
- var OSC = "\x1B]";
2852
- var BEL = "\x07";
2853
- var SEP = ";";
2854
- var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
2855
- ansiEscapes.cursorTo = (x, y) => {
2856
- if (typeof x !== "number") {
2857
- throw new TypeError("The `x` argument is required");
2858
- }
2859
- if (typeof y !== "number") {
2860
- return ESC + (x + 1) + "G";
2861
- }
2862
- return ESC + (y + 1) + ";" + (x + 1) + "H";
2863
- };
2864
- ansiEscapes.cursorMove = (x, y) => {
2865
- if (typeof x !== "number") {
2866
- throw new TypeError("The `x` argument is required");
2867
- }
2868
- let ret = "";
2869
- if (x < 0) {
2870
- ret += ESC + -x + "D";
2871
- } else if (x > 0) {
2872
- ret += ESC + x + "C";
2873
- }
2874
- if (y < 0) {
2875
- ret += ESC + -y + "A";
2876
- } else if (y > 0) {
2877
- ret += ESC + y + "B";
2878
- }
2879
- return ret;
2880
- };
2881
- ansiEscapes.cursorUp = (count = 1) => ESC + count + "A";
2882
- ansiEscapes.cursorDown = (count = 1) => ESC + count + "B";
2883
- ansiEscapes.cursorForward = (count = 1) => ESC + count + "C";
2884
- ansiEscapes.cursorBackward = (count = 1) => ESC + count + "D";
2885
- ansiEscapes.cursorLeft = ESC + "G";
2886
- ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
2887
- ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
2888
- ansiEscapes.cursorGetPosition = ESC + "6n";
2889
- ansiEscapes.cursorNextLine = ESC + "E";
2890
- ansiEscapes.cursorPrevLine = ESC + "F";
2891
- ansiEscapes.cursorHide = ESC + "?25l";
2892
- ansiEscapes.cursorShow = ESC + "?25h";
2893
- ansiEscapes.eraseLines = (count) => {
2894
- let clear = "";
2895
- for (let i = 0; i < count; i++) {
2896
- clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : "");
2897
- }
2898
- if (count) {
2899
- clear += ansiEscapes.cursorLeft;
2900
- }
2901
- return clear;
2902
- };
2903
- ansiEscapes.eraseEndLine = ESC + "K";
2904
- ansiEscapes.eraseStartLine = ESC + "1K";
2905
- ansiEscapes.eraseLine = ESC + "2K";
2906
- ansiEscapes.eraseDown = ESC + "J";
2907
- ansiEscapes.eraseUp = ESC + "1J";
2908
- ansiEscapes.eraseScreen = ESC + "2J";
2909
- ansiEscapes.scrollUp = ESC + "S";
2910
- ansiEscapes.scrollDown = ESC + "T";
2911
- ansiEscapes.clearScreen = "\x1Bc";
2912
- ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` : (
2913
- // 1. Erases the screen (Only done in case `2` is not supported)
2914
- // 2. Erases the whole screen including scrollback buffer
2915
- // 3. Moves cursor to the top-left position
2916
- // More info: https://www.real-world-systems.com/docs/ANSIcode.html
2917
- `${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`
2918
- );
2919
- ansiEscapes.beep = BEL;
2920
- ansiEscapes.link = (text, url) => {
2921
- return [
2922
- OSC,
2923
- "8",
2924
- SEP,
2925
- SEP,
2926
- url,
2927
- BEL,
2928
- text,
2929
- OSC,
2930
- "8",
2931
- SEP,
2932
- SEP,
2933
- BEL
2934
- ].join("");
2935
- };
2936
- ansiEscapes.image = (buffer, options = {}) => {
2937
- let ret = `${OSC}1337;File=inline=1`;
2938
- if (options.width) {
2939
- ret += `;width=${options.width}`;
2940
- }
2941
- if (options.height) {
2942
- ret += `;height=${options.height}`;
2943
- }
2944
- if (options.preserveAspectRatio === false) {
2945
- ret += ";preserveAspectRatio=0";
2946
- }
2947
- return ret + ":" + buffer.toString("base64") + BEL;
2948
- };
2949
- ansiEscapes.iTerm = {
2950
- setCwd: /* @__PURE__ */ __name((cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`, "setCwd"),
2951
- annotation: /* @__PURE__ */ __name((message, options = {}) => {
2952
- let ret = `${OSC}1337;`;
2953
- const hasX = typeof options.x !== "undefined";
2954
- const hasY = typeof options.y !== "undefined";
2955
- if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) {
2956
- throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
2957
- }
2958
- message = message.replace(/\|/g, "");
2959
- ret += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
2960
- if (options.length > 0) {
2961
- ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
2962
- } else {
2963
- ret += message;
2964
- }
2965
- return ret + BEL;
2966
- }, "annotation")
2967
- };
2968
- }
2837
+ // node_modules/.pnpm/@inquirer+password@5.0.11_@types+node@24.9.2/node_modules/@inquirer/password/dist/index.js
2838
+ var dist_exports4 = {};
2839
+ __export(dist_exports4, {
2840
+ default: () => dist_default7
2969
2841
  });
2970
-
2971
- // node_modules/.pnpm/@inquirer+password@4.0.18_@types+node@24.9.2/node_modules/@inquirer/password/dist/commonjs/index.js
2972
- var require_commonjs7 = __commonJS({
2973
- "node_modules/.pnpm/@inquirer+password@4.0.18_@types+node@24.9.2/node_modules/@inquirer/password/dist/commonjs/index.js"(exports2) {
2974
- "use strict";
2975
- var __importDefault = exports2 && exports2.__importDefault || function(mod) {
2976
- return mod && mod.__esModule ? mod : { "default": mod };
2842
+ var passwordTheme, dist_default7;
2843
+ var init_dist9 = __esm({
2844
+ "node_modules/.pnpm/@inquirer+password@5.0.11_@types+node@24.9.2/node_modules/@inquirer/password/dist/index.js"() {
2845
+ init_dist5();
2846
+ init_dist4();
2847
+ passwordTheme = {
2848
+ style: {
2849
+ maskedText: "[input is masked]"
2850
+ }
2977
2851
  };
2978
- Object.defineProperty(exports2, "__esModule", { value: true });
2979
- var core_1 = require_commonjs3();
2980
- var ansi_escapes_1 = __importDefault(require_ansi_escapes());
2981
- exports2.default = (0, core_1.createPrompt)((config, done) => {
2982
- const { validate: validate2 = /* @__PURE__ */ __name(() => true, "validate") } = config;
2983
- const theme = (0, core_1.makeTheme)(config.theme);
2984
- const [status, setStatus] = (0, core_1.useState)("idle");
2985
- const [errorMsg, setError] = (0, core_1.useState)();
2986
- const [value, setValue] = (0, core_1.useState)("");
2987
- const prefix = (0, core_1.usePrefix)({ status, theme });
2988
- (0, core_1.useKeypress)(async (key, rl) => {
2852
+ dist_default7 = createPrompt((config, done) => {
2853
+ const { validate = /* @__PURE__ */ __name(() => true, "validate") } = config;
2854
+ const theme = makeTheme(passwordTheme, config.theme);
2855
+ const [status, setStatus] = useState("idle");
2856
+ const [errorMsg, setError] = useState();
2857
+ const [value, setValue] = useState("");
2858
+ const prefix = usePrefix({ status, theme });
2859
+ useKeypress(async (key, rl) => {
2989
2860
  if (status !== "idle") {
2990
2861
  return;
2991
2862
  }
2992
- if ((0, core_1.isEnterKey)(key)) {
2863
+ if (isEnterKey(key)) {
2993
2864
  const answer = value;
2994
2865
  setStatus("loading");
2995
- const isValid = await validate2(answer);
2866
+ const isValid = await validate(answer);
2996
2867
  if (isValid === true) {
2997
2868
  setValue(answer);
2998
2869
  setStatus("done");
@@ -3014,7 +2885,7 @@ var require_commonjs7 = __commonJS({
3014
2885
  const maskChar = typeof config.mask === "string" ? config.mask : "*";
3015
2886
  formattedValue = maskChar.repeat(value.length);
3016
2887
  } else if (status !== "done") {
3017
- helpTip = `${theme.style.help("[input is masked]")}${ansi_escapes_1.default.cursorHide}`;
2888
+ helpTip = `${theme.style.help(theme.style.maskedText)}${cursorHide}`;
3018
2889
  }
3019
2890
  if (status === "done") {
3020
2891
  formattedValue = theme.style.answer(formattedValue);
@@ -3028,73 +2899,75 @@ var require_commonjs7 = __commonJS({
3028
2899
  }
3029
2900
  });
3030
2901
 
3031
- // node_modules/.pnpm/@inquirer+search@3.1.1_@types+node@24.9.2/node_modules/@inquirer/search/dist/commonjs/index.js
3032
- var require_commonjs8 = __commonJS({
3033
- "node_modules/.pnpm/@inquirer+search@3.1.1_@types+node@24.9.2/node_modules/@inquirer/search/dist/commonjs/index.js"(exports2) {
3034
- "use strict";
3035
- var __importDefault = exports2 && exports2.__importDefault || function(mod) {
3036
- return mod && mod.__esModule ? mod : { "default": mod };
2902
+ // node_modules/.pnpm/@inquirer+search@4.1.7_@types+node@24.9.2/node_modules/@inquirer/search/dist/index.js
2903
+ var dist_exports5 = {};
2904
+ __export(dist_exports5, {
2905
+ Separator: () => Separator,
2906
+ default: () => dist_default8
2907
+ });
2908
+ function isSelectable2(item) {
2909
+ return !Separator.isSeparator(item) && !item.disabled;
2910
+ }
2911
+ function normalizeChoices2(choices) {
2912
+ return choices.map((choice) => {
2913
+ if (Separator.isSeparator(choice))
2914
+ return choice;
2915
+ if (typeof choice !== "object" || choice === null || !("value" in choice)) {
2916
+ const name2 = String(choice);
2917
+ return {
2918
+ value: choice,
2919
+ name: name2,
2920
+ short: name2,
2921
+ disabled: false
2922
+ };
2923
+ }
2924
+ const name = choice.name ?? String(choice.value);
2925
+ const normalizedChoice = {
2926
+ value: choice.value,
2927
+ name,
2928
+ short: choice.short ?? name,
2929
+ disabled: choice.disabled ?? false
3037
2930
  };
3038
- Object.defineProperty(exports2, "__esModule", { value: true });
3039
- exports2.Separator = void 0;
3040
- var core_1 = require_commonjs3();
3041
- var yoctocolors_cjs_1 = __importDefault(require_yoctocolors_cjs());
3042
- var figures_1 = __importDefault(require_commonjs());
3043
- var searchTheme = {
3044
- icon: { cursor: figures_1.default.pointer },
2931
+ if (choice.description) {
2932
+ normalizedChoice.description = choice.description;
2933
+ }
2934
+ return normalizedChoice;
2935
+ });
2936
+ }
2937
+ var import_node_util5, searchTheme, dist_default8;
2938
+ var init_dist10 = __esm({
2939
+ "node_modules/.pnpm/@inquirer+search@4.1.7_@types+node@24.9.2/node_modules/@inquirer/search/dist/index.js"() {
2940
+ init_dist5();
2941
+ import_node_util5 = require("node:util");
2942
+ init_dist();
2943
+ init_dist5();
2944
+ searchTheme = {
2945
+ icon: { cursor: dist_default.pointer },
3045
2946
  style: {
3046
- disabled: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.dim(`- ${text}`), "disabled"),
3047
- searchTerm: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.cyan(text), "searchTerm"),
3048
- description: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.cyan(text), "description")
3049
- },
3050
- helpMode: "auto"
2947
+ disabled: /* @__PURE__ */ __name((text) => (0, import_node_util5.styleText)("dim", `- ${text}`), "disabled"),
2948
+ searchTerm: /* @__PURE__ */ __name((text) => (0, import_node_util5.styleText)("cyan", text), "searchTerm"),
2949
+ description: /* @__PURE__ */ __name((text) => (0, import_node_util5.styleText)("cyan", text), "description"),
2950
+ keysHelpTip: /* @__PURE__ */ __name((keys) => keys.map(([key, action]) => `${(0, import_node_util5.styleText)("bold", key)} ${(0, import_node_util5.styleText)("dim", action)}`).join((0, import_node_util5.styleText)("dim", " • ")), "keysHelpTip")
2951
+ }
3051
2952
  };
3052
- function isSelectable(item) {
3053
- return !core_1.Separator.isSeparator(item) && !item.disabled;
3054
- }
3055
- __name(isSelectable, "isSelectable");
3056
- function normalizeChoices(choices) {
3057
- return choices.map((choice) => {
3058
- if (core_1.Separator.isSeparator(choice))
3059
- return choice;
3060
- if (typeof choice === "string") {
3061
- return {
3062
- value: choice,
3063
- name: choice,
3064
- short: choice,
3065
- disabled: false
3066
- };
3067
- }
3068
- const name = choice.name ?? String(choice.value);
3069
- const normalizedChoice = {
3070
- value: choice.value,
3071
- name,
3072
- short: choice.short ?? name,
3073
- disabled: choice.disabled ?? false
3074
- };
3075
- if (choice.description) {
3076
- normalizedChoice.description = choice.description;
3077
- }
3078
- return normalizedChoice;
3079
- });
3080
- }
3081
- __name(normalizeChoices, "normalizeChoices");
3082
- exports2.default = (0, core_1.createPrompt)((config, done) => {
3083
- const { pageSize = 7, validate: validate2 = /* @__PURE__ */ __name(() => true, "validate") } = config;
3084
- const theme = (0, core_1.makeTheme)(searchTheme, config.theme);
3085
- const firstRender = (0, core_1.useRef)(true);
3086
- const [status, setStatus] = (0, core_1.useState)("loading");
3087
- const [searchTerm, setSearchTerm] = (0, core_1.useState)("");
3088
- const [searchResults, setSearchResults] = (0, core_1.useState)([]);
3089
- const [searchError, setSearchError] = (0, core_1.useState)();
3090
- const prefix = (0, core_1.usePrefix)({ status, theme });
3091
- const bounds = (0, core_1.useMemo)(() => {
3092
- const first = searchResults.findIndex(isSelectable);
3093
- const last = searchResults.findLastIndex(isSelectable);
2953
+ __name(isSelectable2, "isSelectable");
2954
+ __name(normalizeChoices2, "normalizeChoices");
2955
+ dist_default8 = createPrompt((config, done) => {
2956
+ const { pageSize = 7, validate = /* @__PURE__ */ __name(() => true, "validate") } = config;
2957
+ const theme = makeTheme(searchTheme, config.theme);
2958
+ const [status, setStatus] = useState("loading");
2959
+ const [searchTerm, setSearchTerm] = useState("");
2960
+ const [searchResults, setSearchResults] = useState([]);
2961
+ const [searchError, setSearchError] = useState();
2962
+ const defaultApplied = useRef(false);
2963
+ const prefix = usePrefix({ status, theme });
2964
+ const bounds = useMemo(() => {
2965
+ const first = searchResults.findIndex(isSelectable2);
2966
+ const last = searchResults.findLastIndex(isSelectable2);
3094
2967
  return { first, last };
3095
2968
  }, [searchResults]);
3096
- const [active = bounds.first, setActive] = (0, core_1.useState)();
3097
- (0, core_1.useEffect)(() => {
2969
+ const [active = bounds.first, setActive] = useState();
2970
+ useEffect(() => {
3098
2971
  const controller = new AbortController();
3099
2972
  setStatus("loading");
3100
2973
  setSearchError(void 0);
@@ -3104,9 +2977,16 @@ var require_commonjs8 = __commonJS({
3104
2977
  signal: controller.signal
3105
2978
  });
3106
2979
  if (!controller.signal.aborted) {
3107
- setActive(void 0);
2980
+ const normalized = normalizeChoices2(results);
2981
+ let initialActive;
2982
+ if (!defaultApplied.current && "default" in config) {
2983
+ const defaultIndex = normalized.findIndex((item) => isSelectable2(item) && item.value === config.default);
2984
+ initialActive = defaultIndex === -1 ? void 0 : defaultIndex;
2985
+ defaultApplied.current = true;
2986
+ }
2987
+ setActive(initialActive);
3108
2988
  setSearchError(void 0);
3109
- setSearchResults(normalizeChoices(results));
2989
+ setSearchResults(normalized);
3110
2990
  setStatus("idle");
3111
2991
  }
3112
2992
  } catch (error2) {
@@ -3121,11 +3001,11 @@ var require_commonjs8 = __commonJS({
3121
3001
  };
3122
3002
  }, [searchTerm]);
3123
3003
  const selectedChoice = searchResults[active];
3124
- (0, core_1.useKeypress)(async (key, rl) => {
3125
- if ((0, core_1.isEnterKey)(key)) {
3004
+ useKeypress(async (key, rl) => {
3005
+ if (isEnterKey(key)) {
3126
3006
  if (selectedChoice) {
3127
3007
  setStatus("loading");
3128
- const isValid = await validate2(selectedChoice.value);
3008
+ const isValid = await validate(selectedChoice.value);
3129
3009
  setStatus("idle");
3130
3010
  if (isValid === true) {
3131
3011
  setStatus("done");
@@ -3139,18 +3019,18 @@ var require_commonjs8 = __commonJS({
3139
3019
  } else {
3140
3020
  rl.write(searchTerm);
3141
3021
  }
3142
- } else if ((0, core_1.isTabKey)(key) && selectedChoice) {
3022
+ } else if (isTabKey(key) && selectedChoice) {
3143
3023
  rl.clearLine(0);
3144
3024
  rl.write(selectedChoice.name);
3145
3025
  setSearchTerm(selectedChoice.name);
3146
- } else if (status !== "loading" && ((0, core_1.isUpKey)(key) || (0, core_1.isDownKey)(key))) {
3026
+ } else if (status !== "loading" && (isUpKey(key) || isDownKey(key))) {
3147
3027
  rl.clearLine(0);
3148
- if ((0, core_1.isUpKey)(key) && active !== bounds.first || (0, core_1.isDownKey)(key) && active !== bounds.last) {
3149
- const offset = (0, core_1.isUpKey)(key) ? -1 : 1;
3028
+ if (isUpKey(key) && active !== bounds.first || isDownKey(key) && active !== bounds.last) {
3029
+ const offset = isUpKey(key) ? -1 : 1;
3150
3030
  let next = active;
3151
3031
  do {
3152
3032
  next = (next + offset + searchResults.length) % searchResults.length;
3153
- } while (!isSelectable(searchResults[next]));
3033
+ } while (!isSelectable2(searchResults[next]));
3154
3034
  setActive(next);
3155
3035
  }
3156
3036
  } else {
@@ -3158,20 +3038,15 @@ var require_commonjs8 = __commonJS({
3158
3038
  }
3159
3039
  });
3160
3040
  const message = theme.style.message(config.message, status);
3161
- if (active > 0) {
3162
- firstRender.current = false;
3163
- }
3164
- let helpTip = "";
3165
- if (searchResults.length > 1 && (theme.helpMode === "always" || theme.helpMode === "auto" && firstRender.current)) {
3166
- helpTip = searchResults.length > pageSize ? `
3167
- ${theme.style.help(`(${config.instructions?.pager ?? "Use arrow keys to reveal more choices"})`)}` : `
3168
- ${theme.style.help(`(${config.instructions?.navigation ?? "Use arrow keys"})`)}`;
3169
- }
3170
- const page = (0, core_1.usePagination)({
3041
+ const helpLine = theme.style.keysHelpTip([
3042
+ ["↑↓", "navigate"],
3043
+ ["⏎", "select"]
3044
+ ]);
3045
+ const page = usePagination({
3171
3046
  items: searchResults,
3172
3047
  active,
3173
3048
  renderItem({ item, isActive }) {
3174
- if (core_1.Separator.isSeparator(item)) {
3049
+ if (Separator.isSeparator(item)) {
3175
3050
  return ` ${item.separator}`;
3176
3051
  }
3177
3052
  if (item.disabled) {
@@ -3193,137 +3068,155 @@ ${theme.style.help(`(${config.instructions?.navigation ?? "Use arrow keys"})`)}`
3193
3068
  }
3194
3069
  let searchStr;
3195
3070
  if (status === "done" && selectedChoice) {
3196
- const answer = selectedChoice.short;
3197
- return `${prefix} ${message} ${theme.style.answer(answer)}`;
3071
+ return [prefix, message, theme.style.answer(selectedChoice.short)].filter(Boolean).join(" ").trimEnd();
3198
3072
  } else {
3199
3073
  searchStr = theme.style.searchTerm(searchTerm);
3200
3074
  }
3201
- const choiceDescription = selectedChoice?.description ? `
3202
- ${theme.style.description(selectedChoice.description)}` : ``;
3203
- return [
3204
- [prefix, message, searchStr].filter(Boolean).join(" "),
3205
- `${error ?? page}${helpTip}${choiceDescription}`
3206
- ];
3075
+ const description = selectedChoice?.description;
3076
+ const header = [prefix, message, searchStr].filter(Boolean).join(" ").trimEnd();
3077
+ const body = [
3078
+ error ?? page,
3079
+ " ",
3080
+ description ? theme.style.description(description) : "",
3081
+ helpLine
3082
+ ].filter(Boolean).join("\n").trimEnd();
3083
+ return [header, body];
3207
3084
  });
3208
- var core_2 = require_commonjs3();
3209
- Object.defineProperty(exports2, "Separator", { enumerable: true, get: /* @__PURE__ */ __name(function() {
3210
- return core_2.Separator;
3211
- }, "get") });
3212
3085
  }
3213
3086
  });
3214
3087
 
3215
- // node_modules/.pnpm/@inquirer+select@4.3.2_@types+node@24.9.2/node_modules/@inquirer/select/dist/commonjs/index.js
3216
- var require_commonjs9 = __commonJS({
3217
- "node_modules/.pnpm/@inquirer+select@4.3.2_@types+node@24.9.2/node_modules/@inquirer/select/dist/commonjs/index.js"(exports2) {
3218
- "use strict";
3219
- var __importDefault = exports2 && exports2.__importDefault || function(mod) {
3220
- return mod && mod.__esModule ? mod : { "default": mod };
3088
+ // node_modules/.pnpm/@inquirer+select@5.1.3_@types+node@24.9.2/node_modules/@inquirer/select/dist/index.js
3089
+ var dist_exports6 = {};
3090
+ __export(dist_exports6, {
3091
+ Separator: () => Separator,
3092
+ default: () => dist_default9
3093
+ });
3094
+ function isSelectable3(item) {
3095
+ return !Separator.isSeparator(item) && !item.disabled;
3096
+ }
3097
+ function isNavigable2(item) {
3098
+ return !Separator.isSeparator(item);
3099
+ }
3100
+ function normalizeChoices3(choices) {
3101
+ return choices.map((choice) => {
3102
+ if (Separator.isSeparator(choice))
3103
+ return choice;
3104
+ if (typeof choice !== "object" || choice === null || !("value" in choice)) {
3105
+ const name2 = String(choice);
3106
+ return {
3107
+ value: choice,
3108
+ name: name2,
3109
+ short: name2,
3110
+ disabled: false
3111
+ };
3112
+ }
3113
+ const name = choice.name ?? String(choice.value);
3114
+ const normalizedChoice = {
3115
+ value: choice.value,
3116
+ name,
3117
+ short: choice.short ?? name,
3118
+ disabled: choice.disabled ?? false
3221
3119
  };
3222
- Object.defineProperty(exports2, "__esModule", { value: true });
3223
- exports2.Separator = void 0;
3224
- var core_1 = require_commonjs3();
3225
- var yoctocolors_cjs_1 = __importDefault(require_yoctocolors_cjs());
3226
- var figures_1 = __importDefault(require_commonjs());
3227
- var ansi_escapes_1 = __importDefault(require_ansi_escapes());
3228
- var selectTheme = {
3229
- icon: { cursor: figures_1.default.pointer },
3120
+ if (choice.description) {
3121
+ normalizedChoice.description = choice.description;
3122
+ }
3123
+ return normalizedChoice;
3124
+ });
3125
+ }
3126
+ var import_node_util6, selectTheme, dist_default9;
3127
+ var init_dist11 = __esm({
3128
+ "node_modules/.pnpm/@inquirer+select@5.1.3_@types+node@24.9.2/node_modules/@inquirer/select/dist/index.js"() {
3129
+ init_dist5();
3130
+ init_dist4();
3131
+ import_node_util6 = require("node:util");
3132
+ init_dist();
3133
+ init_dist5();
3134
+ selectTheme = {
3135
+ icon: { cursor: dist_default.pointer },
3230
3136
  style: {
3231
- disabled: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.dim(`- ${text}`), "disabled"),
3232
- description: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.cyan(text), "description")
3137
+ disabled: /* @__PURE__ */ __name((text) => (0, import_node_util6.styleText)("dim", text), "disabled"),
3138
+ description: /* @__PURE__ */ __name((text) => (0, import_node_util6.styleText)("cyan", text), "description"),
3139
+ keysHelpTip: /* @__PURE__ */ __name((keys) => keys.map(([key, action]) => `${(0, import_node_util6.styleText)("bold", key)} ${(0, import_node_util6.styleText)("dim", action)}`).join((0, import_node_util6.styleText)("dim", " • ")), "keysHelpTip")
3233
3140
  },
3234
- helpMode: "auto",
3235
- indexMode: "hidden"
3141
+ i18n: { disabledError: "This option is disabled and cannot be selected." },
3142
+ indexMode: "hidden",
3143
+ keybindings: []
3236
3144
  };
3237
- function isSelectable(item) {
3238
- return !core_1.Separator.isSeparator(item) && !item.disabled;
3239
- }
3240
- __name(isSelectable, "isSelectable");
3241
- function normalizeChoices(choices) {
3242
- return choices.map((choice) => {
3243
- if (core_1.Separator.isSeparator(choice))
3244
- return choice;
3245
- if (typeof choice === "string") {
3246
- return {
3247
- value: choice,
3248
- name: choice,
3249
- short: choice,
3250
- disabled: false
3251
- };
3252
- }
3253
- const name = choice.name ?? String(choice.value);
3254
- const normalizedChoice = {
3255
- value: choice.value,
3256
- name,
3257
- short: choice.short ?? name,
3258
- disabled: choice.disabled ?? false
3259
- };
3260
- if (choice.description) {
3261
- normalizedChoice.description = choice.description;
3262
- }
3263
- return normalizedChoice;
3264
- });
3265
- }
3266
- __name(normalizeChoices, "normalizeChoices");
3267
- exports2.default = (0, core_1.createPrompt)((config, done) => {
3145
+ __name(isSelectable3, "isSelectable");
3146
+ __name(isNavigable2, "isNavigable");
3147
+ __name(normalizeChoices3, "normalizeChoices");
3148
+ dist_default9 = createPrompt((config, done) => {
3268
3149
  const { loop = true, pageSize = 7 } = config;
3269
- const firstRender = (0, core_1.useRef)(true);
3270
- const theme = (0, core_1.makeTheme)(selectTheme, config.theme);
3271
- const [status, setStatus] = (0, core_1.useState)("idle");
3272
- const prefix = (0, core_1.usePrefix)({ status, theme });
3273
- const searchTimeoutRef = (0, core_1.useRef)();
3274
- const items = (0, core_1.useMemo)(() => normalizeChoices(config.choices), [config.choices]);
3275
- const bounds = (0, core_1.useMemo)(() => {
3276
- const first = items.findIndex(isSelectable);
3277
- const last = items.findLastIndex(isSelectable);
3150
+ const theme = makeTheme(selectTheme, config.theme);
3151
+ const { keybindings } = theme;
3152
+ const [status, setStatus] = useState("idle");
3153
+ const prefix = usePrefix({ status, theme });
3154
+ const searchTimeoutRef = useRef();
3155
+ const searchEnabled = !keybindings.includes("vim");
3156
+ const items = useMemo(() => normalizeChoices3(config.choices), [config.choices]);
3157
+ const bounds = useMemo(() => {
3158
+ const first = items.findIndex(isNavigable2);
3159
+ const last = items.findLastIndex(isNavigable2);
3278
3160
  if (first === -1) {
3279
- throw new core_1.ValidationError("[select prompt] No selectable choices. All choices are disabled.");
3161
+ throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
3280
3162
  }
3281
3163
  return { first, last };
3282
3164
  }, [items]);
3283
- const defaultItemIndex = (0, core_1.useMemo)(() => {
3165
+ const defaultItemIndex = useMemo(() => {
3284
3166
  if (!("default" in config))
3285
3167
  return -1;
3286
- return items.findIndex((item) => isSelectable(item) && item.value === config.default);
3168
+ return items.findIndex((item) => isSelectable3(item) && item.value === config.default);
3287
3169
  }, [config.default, items]);
3288
- const [active, setActive] = (0, core_1.useState)(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
3170
+ const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
3289
3171
  const selectedChoice = items[active];
3290
- (0, core_1.useKeypress)((key, rl) => {
3172
+ if (selectedChoice == null || Separator.isSeparator(selectedChoice)) {
3173
+ throw new Error("Active index does not point to a choice");
3174
+ }
3175
+ const [errorMsg, setError] = useState();
3176
+ useKeypress((key, rl) => {
3291
3177
  clearTimeout(searchTimeoutRef.current);
3292
- if ((0, core_1.isEnterKey)(key)) {
3293
- setStatus("done");
3294
- done(selectedChoice.value);
3295
- } else if ((0, core_1.isUpKey)(key) || (0, core_1.isDownKey)(key)) {
3178
+ if (errorMsg) {
3179
+ setError(void 0);
3180
+ }
3181
+ if (isEnterKey(key)) {
3182
+ if (selectedChoice.disabled) {
3183
+ setError(theme.i18n.disabledError);
3184
+ } else {
3185
+ setStatus("done");
3186
+ done(selectedChoice.value);
3187
+ }
3188
+ } else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {
3296
3189
  rl.clearLine(0);
3297
- if (loop || (0, core_1.isUpKey)(key) && active !== bounds.first || (0, core_1.isDownKey)(key) && active !== bounds.last) {
3298
- const offset = (0, core_1.isUpKey)(key) ? -1 : 1;
3190
+ if (loop || isUpKey(key, keybindings) && active !== bounds.first || isDownKey(key, keybindings) && active !== bounds.last) {
3191
+ const offset = isUpKey(key, keybindings) ? -1 : 1;
3299
3192
  let next = active;
3300
3193
  do {
3301
3194
  next = (next + offset + items.length) % items.length;
3302
- } while (!isSelectable(items[next]));
3195
+ } while (!isNavigable2(items[next]));
3303
3196
  setActive(next);
3304
3197
  }
3305
- } else if ((0, core_1.isNumberKey)(key) && !Number.isNaN(Number(rl.line))) {
3198
+ } else if (isNumberKey(key) && !Number.isNaN(Number(rl.line))) {
3306
3199
  const selectedIndex = Number(rl.line) - 1;
3307
3200
  let selectableIndex = -1;
3308
3201
  const position = items.findIndex((item2) => {
3309
- if (core_1.Separator.isSeparator(item2))
3202
+ if (Separator.isSeparator(item2))
3310
3203
  return false;
3311
3204
  selectableIndex++;
3312
3205
  return selectableIndex === selectedIndex;
3313
3206
  });
3314
3207
  const item = items[position];
3315
- if (item != null && isSelectable(item)) {
3208
+ if (item != null && isSelectable3(item)) {
3316
3209
  setActive(position);
3317
3210
  }
3318
3211
  searchTimeoutRef.current = setTimeout(() => {
3319
3212
  rl.clearLine(0);
3320
3213
  }, 700);
3321
- } else if ((0, core_1.isBackspaceKey)(key)) {
3214
+ } else if (isBackspaceKey(key)) {
3322
3215
  rl.clearLine(0);
3323
- } else {
3216
+ } else if (searchEnabled) {
3324
3217
  const searchTerm = rl.line.toLowerCase();
3325
3218
  const matchIndex = items.findIndex((item) => {
3326
- if (core_1.Separator.isSeparator(item) || !isSelectable(item))
3219
+ if (Separator.isSeparator(item) || !isSelectable3(item))
3327
3220
  return false;
3328
3221
  return item.name.toLowerCase().startsWith(searchTerm);
3329
3222
  });
@@ -3335,54 +3228,50 @@ var require_commonjs9 = __commonJS({
3335
3228
  }, 700);
3336
3229
  }
3337
3230
  });
3338
- (0, core_1.useEffect)(() => () => {
3231
+ useEffect(() => () => {
3339
3232
  clearTimeout(searchTimeoutRef.current);
3340
3233
  }, []);
3341
3234
  const message = theme.style.message(config.message, status);
3342
- let helpTipTop = "";
3343
- let helpTipBottom = "";
3344
- if (theme.helpMode === "always" || theme.helpMode === "auto" && firstRender.current) {
3345
- firstRender.current = false;
3346
- if (items.length > pageSize) {
3347
- helpTipBottom = `
3348
- ${theme.style.help(`(${config.instructions?.pager ?? "Use arrow keys to reveal more choices"})`)}`;
3349
- } else {
3350
- helpTipTop = theme.style.help(`(${config.instructions?.navigation ?? "Use arrow keys"})`);
3351
- }
3352
- }
3235
+ const helpLine = theme.style.keysHelpTip([
3236
+ ["↑↓", "navigate"],
3237
+ ["", "select"]
3238
+ ]);
3353
3239
  let separatorCount = 0;
3354
- const page = (0, core_1.usePagination)({
3240
+ const page = usePagination({
3355
3241
  items,
3356
3242
  active,
3357
3243
  renderItem({ item, isActive, index }) {
3358
- if (core_1.Separator.isSeparator(item)) {
3244
+ if (Separator.isSeparator(item)) {
3359
3245
  separatorCount++;
3360
3246
  return ` ${item.separator}`;
3361
3247
  }
3248
+ const cursor = isActive ? theme.icon.cursor : " ";
3362
3249
  const indexLabel = theme.indexMode === "number" ? `${index + 1 - separatorCount}. ` : "";
3363
3250
  if (item.disabled) {
3364
3251
  const disabledLabel = typeof item.disabled === "string" ? item.disabled : "(disabled)";
3365
- return theme.style.disabled(`${indexLabel}${item.name} ${disabledLabel}`);
3252
+ const disabledCursor = isActive ? theme.icon.cursor : "-";
3253
+ return theme.style.disabled(`${disabledCursor} ${indexLabel}${item.name} ${disabledLabel}`);
3366
3254
  }
3367
3255
  const color = isActive ? theme.style.highlight : (x) => x;
3368
- const cursor = isActive ? theme.icon.cursor : ` `;
3369
3256
  return color(`${cursor} ${indexLabel}${item.name}`);
3370
3257
  },
3371
3258
  pageSize,
3372
3259
  loop
3373
3260
  });
3374
3261
  if (status === "done") {
3375
- return `${prefix} ${message} ${theme.style.answer(selectedChoice.short)}`;
3262
+ return [prefix, message, theme.style.answer(selectedChoice.short)].filter(Boolean).join(" ");
3376
3263
  }
3377
- const choiceDescription = selectedChoice.description ? `
3378
- ${theme.style.description(selectedChoice.description)}` : ``;
3379
- return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
3380
- ${page}${helpTipBottom}${choiceDescription}${ansi_escapes_1.default.cursorHide}`;
3264
+ const { description } = selectedChoice;
3265
+ const lines = [
3266
+ [prefix, message].filter(Boolean).join(" "),
3267
+ page,
3268
+ " ",
3269
+ description ? theme.style.description(description) : "",
3270
+ errorMsg ? theme.style.error(errorMsg) : "",
3271
+ helpLine
3272
+ ].filter(Boolean).join("\n").trimEnd();
3273
+ return `${lines}${cursorHide}`;
3381
3274
  });
3382
- var core_2 = require_commonjs3();
3383
- Object.defineProperty(exports2, "Separator", { enumerable: true, get: /* @__PURE__ */ __name(function() {
3384
- return core_2.Separator;
3385
- }, "get") });
3386
3275
  }
3387
3276
  });
3388
3277
 
@@ -3391,12 +3280,12 @@ var signalExit = require_cjs();
3391
3280
  var supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports));
3392
3281
  var hasFlag3 = (init_has_flag(), __toCommonJS(has_flag_exports));
3393
3282
  var yoctocolorsCjs = require_yoctocolors_cjs();
3394
- var checkbox = require_commonjs4();
3395
- var confirm = require_commonjs5();
3396
- var input = require_commonjs6();
3397
- var password = require_commonjs7();
3398
- var search = require_commonjs8();
3399
- var select = require_commonjs9();
3283
+ var checkbox = (init_dist6(), __toCommonJS(dist_exports));
3284
+ var confirm = (init_dist7(), __toCommonJS(dist_exports2));
3285
+ var input = (init_dist8(), __toCommonJS(dist_exports3));
3286
+ var password = (init_dist9(), __toCommonJS(dist_exports4));
3287
+ var search = (init_dist10(), __toCommonJS(dist_exports5));
3288
+ var select = (init_dist11(), __toCommonJS(dist_exports6));
3400
3289
  module.exports = {
3401
3290
  checkbox,
3402
3291
  confirm,