@learnosity/lib-qti-converter 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +57 -9
  2. package/docs/EXAMPLES.md +4 -2
  3. package/docs/FAQ.md +20 -0
  4. package/docs/GETTING_STARTED.md +1 -1
  5. package/docs/SUPPORTED_INTERACTIONS.md +1 -1
  6. package/package.json +8 -8
  7. package/packages/cli/dist/{batchProcessors-B6Xmhfaz.js → batchProcessors-C7czhqX0.js} +73 -10
  8. package/packages/cli/dist/batchProcessors-C7czhqX0.js.map +1 -0
  9. package/packages/cli/dist/batchWorker.js +1 -1
  10. package/packages/cli/dist/{create-prompt-DyNnKXYU.js → create-prompt-dWckcotJ.js} +45 -43
  11. package/packages/cli/dist/create-prompt-dWckcotJ.js.map +1 -0
  12. package/packages/cli/dist/{dist-D3v6G5F8.js → dist-DXDR2peT.js} +6 -6
  13. package/packages/cli/dist/{dist-D3v6G5F8.js.map → dist-DXDR2peT.js.map} +1 -1
  14. package/packages/cli/dist/{learnosityToQti-hFKA3KnZ.js → learnosityToQti-D4ddrXaz.js} +4 -4
  15. package/packages/cli/dist/{learnosityToQti-hFKA3KnZ.js.map → learnosityToQti-D4ddrXaz.js.map} +1 -1
  16. package/packages/cli/dist/{learnosityToQtiPackage-DI7bYisT.js → learnosityToQtiPackage-Bwzm-uLX.js} +8 -8
  17. package/packages/cli/dist/learnosityToQtiPackage-Bwzm-uLX.js.map +1 -0
  18. package/packages/cli/dist/main.js +5 -5
  19. package/packages/cli/dist/main.js.map +1 -1
  20. package/packages/cli/dist/{pathUtils-DkptaCiz.js → pathUtils-D_VsVde8.js} +7 -7
  21. package/packages/cli/dist/pathUtils-D_VsVde8.js.map +1 -0
  22. package/packages/cli/dist/{qtiPackageToLearnosity-JDifZn8o.js → qtiPackageToLearnosity-CX9htPId.js} +4 -4
  23. package/packages/cli/dist/{qtiPackageToLearnosity-JDifZn8o.js.map → qtiPackageToLearnosity-CX9htPId.js.map} +1 -1
  24. package/packages/cli/dist/{qtiToLearnosity-Be0s-5Dr.js → qtiToLearnosity-JQYOkNbM.js} +4 -4
  25. package/packages/cli/dist/{qtiToLearnosity-Be0s-5Dr.js.map → qtiToLearnosity-JQYOkNbM.js.map} +1 -1
  26. package/packages/cli/dist/{resolveOptions-BotCofhl.js → resolveOptions-BuNN2KMA.js} +13 -16
  27. package/packages/cli/dist/resolveOptions-BuNN2KMA.js.map +1 -0
  28. package/packages/cli/dist/{rolldown-runtime-B4iAMlE-.js → rolldown-runtime-DktXgydw.js} +1 -1
  29. package/packages/cli/dist/{table-DlY4LGmL.js → table-DsKq-B4-.js} +6009 -2978
  30. package/packages/cli/dist/table-DsKq-B4-.js.map +1 -0
  31. package/packages/core/dist/index.d.ts +28 -1
  32. package/packages/core/dist/index.js +6014 -2974
  33. package/packages/core/dist/node.d.ts +28 -1
  34. package/packages/core/dist/node.js +3883 -789
  35. package/packages/cli/dist/batchProcessors-B6Xmhfaz.js.map +0 -1
  36. package/packages/cli/dist/create-prompt-DyNnKXYU.js.map +0 -1
  37. package/packages/cli/dist/learnosityToQtiPackage-DI7bYisT.js.map +0 -1
  38. package/packages/cli/dist/pathUtils-DkptaCiz.js.map +0 -1
  39. package/packages/cli/dist/resolveOptions-BotCofhl.js.map +0 -1
  40. package/packages/cli/dist/table-DlY4LGmL.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { r as runBatchTask } from "./batchProcessors-B6Xmhfaz.js";
1
+ import { r as runBatchTask } from "./batchProcessors-C7czhqX0.js";
2
2
  import { parentPort } from "node:worker_threads";
3
3
  //#region src/batchWorker.ts
4
4
  /**
@@ -1,10 +1,10 @@
1
- import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.js";
1
+ import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime-DktXgydw.js";
2
2
  import path from "node:path";
3
3
  import process$1 from "node:process";
4
4
  import { stripVTControlCharacters, styleText } from "node:util";
5
5
  import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
6
6
  import * as readline from "node:readline";
7
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/key.js
7
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/key.js
8
8
  const keybindingLookup = /* @__PURE__ */ new Set(["emacs", "vim"]);
9
9
  function isKeybinding(value) {
10
10
  return keybindingLookup.has(value);
@@ -22,7 +22,7 @@ const isTabKey = (key) => key.name === "tab";
22
22
  const isNumberKey = (key) => "1234567890".includes(key.name);
23
23
  const isEnterKey = (key) => key.name === "enter" || key.name === "return";
24
24
  //#endregion
25
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/errors.js
25
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/errors.js
26
26
  var AbortPromptError = class extends Error {
27
27
  name = "AbortPromptError";
28
28
  message = "Prompt was aborted";
@@ -45,7 +45,7 @@ var ValidationError = class extends Error {
45
45
  name = "ValidationError";
46
46
  };
47
47
  //#endregion
48
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/hook-engine.js
48
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/hook-engine.js
49
49
  const hookStorage = new AsyncLocalStorage();
50
50
  function createStore(rl) {
51
51
  return {
@@ -59,16 +59,14 @@ function createStore(rl) {
59
59
  }
60
60
  function withHooks(rl, cb) {
61
61
  const store = createStore(rl);
62
- return hookStorage.run(store, () => {
63
- function cycle(render) {
64
- store.handleChange = () => {
65
- store.index = 0;
66
- render();
67
- };
68
- store.handleChange();
69
- }
70
- return cb(cycle);
71
- });
62
+ function cycle(render) {
63
+ store.handleChange = () => {
64
+ store.index = 0;
65
+ render();
66
+ };
67
+ store.handleChange();
68
+ }
69
+ return hookStorage.run(store, () => cb(cycle));
72
70
  }
73
71
  function getStore() {
74
72
  const store = hookStorage.getStore();
@@ -141,7 +139,7 @@ const effectScheduler = {
141
139
  }
142
140
  };
143
141
  //#endregion
144
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/use-state.js
142
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-state.js
145
143
  function isFactory(value) {
146
144
  return typeof value === "function";
147
145
  }
@@ -165,7 +163,7 @@ function useState(defaultValue) {
165
163
  });
166
164
  }
167
165
  //#endregion
168
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/use-effect.js
166
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-effect.js
169
167
  function useEffect(cb, depArray) {
170
168
  withPointer((pointer) => {
171
169
  const oldDeps = pointer.get();
@@ -458,7 +456,7 @@ const fallbackSymbols = {
458
456
  const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
459
457
  Object.entries(specialMainSymbols);
460
458
  //#endregion
461
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/theme.js
459
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/theme.js
462
460
  const defaultTheme = {
463
461
  prefix: {
464
462
  idle: styleText("blue", "?"),
@@ -497,7 +495,7 @@ function getDefaultTheme() {
497
495
  };
498
496
  }
499
497
  //#endregion
500
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/make-theme.js
498
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/make-theme.js
501
499
  function isPlainObject(value) {
502
500
  if (typeof value !== "object" || value === null) return false;
503
501
  let proto = value;
@@ -516,7 +514,7 @@ function makeTheme(...themes) {
516
514
  return deepMerge(...[getDefaultTheme(), ...themes.filter((theme) => theme != null)]);
517
515
  }
518
516
  //#endregion
519
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/use-prefix.js
517
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-prefix.js
520
518
  function usePrefix({ status = "idle", theme }) {
521
519
  const [showLoader, setShowLoader] = useState(false);
522
520
  const [tick, setTick] = useState(0);
@@ -542,12 +540,12 @@ function usePrefix({ status = "idle", theme }) {
542
540
  return typeof prefix === "string" ? prefix : prefix[status === "loading" ? "idle" : status] ?? prefix["idle"];
543
541
  }
544
542
  //#endregion
545
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/use-ref.js
543
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-ref.js
546
544
  function useRef(val) {
547
545
  return useState({ current: val })[0];
548
546
  }
549
547
  //#endregion
550
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/use-keypress.js
548
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-keypress.js
551
549
  function useKeypress(userHandler) {
552
550
  const signal = useRef(userHandler);
553
551
  signal.current = userHandler;
@@ -873,7 +871,7 @@ function wrapAnsi(string, columns, options) {
873
871
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
874
872
  }
875
873
  //#endregion
876
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/utils.js
874
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/utils.js
877
875
  /**
878
876
  * Force line returns at specific width. This function is ANSI code friendly and it'll
879
877
  * ignore invisible codes during width calculation.
@@ -898,6 +896,26 @@ function readlineWidth() {
898
896
  });
899
897
  }
900
898
  //#endregion
899
+ //#region ../../node_modules/.pnpm/@inquirer+type@4.2.0_@types+node@26.6.5/node_modules/@inquirer/type/dist/utils.js
900
+ /**
901
+ * Create a promise and get access to its `resolve` and `reject` functions.
902
+ *
903
+ * Mirrors `Promise.withResolvers()`, available starting from Node 22.
904
+ * TODO: Remove once Node 22 becomes the minimum supported version.
905
+ */
906
+ function withResolver() {
907
+ let resolve;
908
+ let reject;
909
+ return {
910
+ promise: new Promise((res, rej) => {
911
+ resolve = res;
912
+ reject = rej;
913
+ }),
914
+ resolve,
915
+ reject
916
+ };
917
+ }
918
+ //#endregion
901
919
  //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
902
920
  var import_lib = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
903
921
  const Stream = __require("stream");
@@ -1193,7 +1211,7 @@ var SignalExit = class extends SignalExitBase {
1193
1211
  const process$2 = globalThis.process;
1194
1212
  const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
1195
1213
  //#endregion
1196
- //#region ../../node_modules/.pnpm/@inquirer+ansi@2.0.8/node_modules/@inquirer/ansi/dist/index.js
1214
+ //#region ../../node_modules/.pnpm/@inquirer+ansi@2.0.9/node_modules/@inquirer/ansi/dist/index.js
1197
1215
  const ESC = "\x1B[";
1198
1216
  /** Hide the cursor */
1199
1217
  const cursorHide = "\x1B[?25l";
@@ -1212,7 +1230,7 @@ const eraseLine = "\x1B[2K";
1212
1230
  /** Erase the specified number of lines above the cursor */
1213
1231
  const eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + "\x1B[2K\x1B[G" : "";
1214
1232
  //#endregion
1215
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/screen-manager.js
1233
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/screen-manager.js
1216
1234
  const height = (content) => content.split("\n").length;
1217
1235
  const lastLine = (content) => content.split("\n").pop() ?? "";
1218
1236
  var ScreenManager = class {
@@ -1269,23 +1287,7 @@ var ScreenManager = class {
1269
1287
  }
1270
1288
  };
1271
1289
  //#endregion
1272
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
1273
- var PromisePolyfill = class extends Promise {
1274
- static withResolver() {
1275
- let resolve;
1276
- let reject;
1277
- return {
1278
- promise: new Promise((res, rej) => {
1279
- resolve = res;
1280
- reject = rej;
1281
- }),
1282
- resolve,
1283
- reject
1284
- };
1285
- }
1286
- };
1287
- //#endregion
1288
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/create-prompt.js
1290
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/create-prompt.js
1289
1291
  const nativeSetImmediate = globalThis.setImmediate;
1290
1292
  /**
1291
1293
  * Register an event listener and return its disposer, so registrations collapse
@@ -1329,7 +1331,7 @@ function createPrompt(view) {
1329
1331
  });
1330
1332
  output.mute();
1331
1333
  const screen = new ScreenManager(rl);
1332
- const { promise, resolve, reject } = PromisePolyfill.withResolver();
1334
+ const { promise, resolve, reject } = withResolver();
1333
1335
  return withHooks(rl, (cycle) => {
1334
1336
  const clearEffects = AsyncResource.bind(() => effectScheduler.clearAll());
1335
1337
  const settlePrompt = (settle) => {
@@ -1399,4 +1401,4 @@ function createPrompt(view) {
1399
1401
  //#endregion
1400
1402
  export { isEnterKey as _, readlineWidth as a, isTabKey as b, usePrefix as c, useEffect as d, useState as f, isDownKey as g, isBackspaceKey as h, breakLines as i, makeTheme as l, ValidationError as m, cursorHide as n, useKeypress as o, withPointer as p, onExit as r, useRef as s, createPrompt as t, figures as u, isNumberKey as v, isUpKey as x, isSpaceKey as y };
1401
1403
 
1402
- //# sourceMappingURL=create-prompt-DyNnKXYU.js.map
1404
+ //# sourceMappingURL=create-prompt-dWckcotJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-prompt-dWckcotJ.js","names":["readline","process","NO_TRUNCATION","fastStringTruncatedWidth","ESC","stringWidth","cliWidth","readline","process","MuteStream","onSignalExit"],"sources":["../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/key.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/errors.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/hook-engine.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-state.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-effect.js","../../../node_modules/.pnpm/@inquirer+figures@2.0.9/node_modules/@inquirer/figures/dist/index.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/theme.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/make-theme.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-prefix.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-ref.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-keypress.js","../../../node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js","../../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js","../../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js","../../../node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js","../../../node_modules/.pnpm/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/utils.js","../../../node_modules/.pnpm/@inquirer+type@4.2.0_@types+node@26.6.5/node_modules/@inquirer/type/dist/utils.js","../../../node_modules/.pnpm/mute-stream@3.0.0/node_modules/mute-stream/lib/index.js","../../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js","../../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js","../../../node_modules/.pnpm/@inquirer+ansi@2.0.9/node_modules/@inquirer/ansi/dist/index.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/screen-manager.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/create-prompt.js"],"sourcesContent":["const keybindings = ['emacs', 'vim'];\nconst keybindingLookup = new Set(keybindings);\nfunction isKeybinding(value) {\n return keybindingLookup.has(value);\n}\nexport function getDefaultKeybindings() {\n const env = process.env['INQUIRER_KEYBINDINGS'];\n if (!env)\n return [];\n return Array.from(new Set(env\n .toLowerCase()\n .split(/[\\s,]+/)\n .filter(isKeybinding)));\n}\nexport const isUpKey = (key, keybindings = []) => \n// The up key\nkey.name === 'up' ||\n // Vim keybinding: hjkl keys map to left/down/up/right\n (keybindings.includes('vim') && key.name === 'k') ||\n // Emacs keybinding: Ctrl+P means \"previous\" in Emacs navigation conventions\n (keybindings.includes('emacs') && key.ctrl && key.name === 'p');\nexport const isDownKey = (key, keybindings = []) => \n// The down key\nkey.name === 'down' ||\n // Vim keybinding: hjkl keys map to left/down/up/right\n (keybindings.includes('vim') && key.name === 'j') ||\n // Emacs keybinding: Ctrl+N means \"next\" in Emacs navigation conventions\n (keybindings.includes('emacs') && key.ctrl && key.name === 'n');\nexport const isSpaceKey = (key) => key.name === 'space';\nexport const isBackspaceKey = (key) => key.name === 'backspace';\nexport const isTabKey = (key) => key.name === 'tab';\nexport const isNumberKey = (key) => '1234567890'.includes(key.name);\nexport const isEnterKey = (key) => key.name === 'enter' || key.name === 'return';\nexport const isShiftKey = (key) => key.shift;\n","export class AbortPromptError extends Error {\n name = 'AbortPromptError';\n message = 'Prompt was aborted';\n constructor(options) {\n super();\n this.cause = options?.cause;\n }\n}\nexport class CancelPromptError extends Error {\n name = 'CancelPromptError';\n message = 'Prompt was canceled';\n}\nexport class ExitPromptError extends Error {\n name = 'ExitPromptError';\n}\nexport class HookError extends Error {\n name = 'HookError';\n}\nexport class ValidationError extends Error {\n name = 'ValidationError';\n}\n","/* eslint @typescript-eslint/no-explicit-any: [\"off\"] */\nimport { AsyncLocalStorage, AsyncResource } from 'node:async_hooks';\nimport { HookError, ValidationError } from \"./errors.js\";\nconst hookStorage = new AsyncLocalStorage();\nfunction createStore(rl) {\n const store = {\n rl,\n hooks: [],\n hooksCleanup: [],\n hooksEffect: [],\n index: 0,\n handleChange() { },\n };\n return store;\n}\n// Run callback in with the hook engine setup.\nexport function withHooks(rl, cb) {\n const store = createStore(rl);\n function cycle(render) {\n store.handleChange = () => {\n store.index = 0;\n render();\n };\n store.handleChange();\n }\n return hookStorage.run(store, () => cb(cycle));\n}\n// Safe getStore utility that'll return the store or throw if undefined.\nfunction getStore() {\n const store = hookStorage.getStore();\n if (!store) {\n throw new HookError('[Inquirer] Hook functions can only be called from within a prompt');\n }\n return store;\n}\nexport function readline() {\n return getStore().rl;\n}\n// Merge state updates happening within the callback function to avoid multiple renders.\nexport function withUpdates(fn) {\n const wrapped = (...args) => {\n const store = getStore();\n let shouldUpdate = false;\n const oldHandleChange = store.handleChange;\n store.handleChange = () => {\n shouldUpdate = true;\n };\n const returnValue = fn(...args);\n if (shouldUpdate) {\n oldHandleChange();\n }\n store.handleChange = oldHandleChange;\n return returnValue;\n };\n return AsyncResource.bind(wrapped);\n}\nexport function withPointer(cb) {\n const store = getStore();\n const { index } = store;\n const pointer = {\n get() {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n return store.hooks[index];\n },\n set(value) {\n store.hooks[index] = value;\n },\n initialized: index in store.hooks,\n };\n const returnValue = cb(pointer);\n store.index++;\n return returnValue;\n}\nexport function handleChange() {\n getStore().handleChange();\n}\nexport const effectScheduler = {\n queue(cb) {\n const store = getStore();\n const { index } = store;\n store.hooksEffect.push(() => {\n store.hooksCleanup[index]?.();\n const cleanFn = cb(readline());\n if (cleanFn != null && typeof cleanFn !== 'function') {\n throw new ValidationError('useEffect return value must be a cleanup function or nothing.');\n }\n store.hooksCleanup[index] = cleanFn;\n });\n },\n run() {\n const store = getStore();\n withUpdates(() => {\n store.hooksEffect.forEach((effect) => {\n effect();\n });\n // Warning: Clean the hooks before exiting the `withUpdates` block.\n // Failure to do so means an updates would hit the same effects again.\n store.hooksEffect.length = 0;\n })();\n },\n clearAll() {\n const store = getStore();\n store.hooksCleanup.forEach((cleanFn) => {\n cleanFn?.();\n });\n store.hooksEffect.length = 0;\n store.hooksCleanup.length = 0;\n },\n};\n","import { AsyncResource } from 'node:async_hooks';\nimport { withPointer, handleChange } from \"./hook-engine.js\";\nfunction isFactory(value) {\n return typeof value === 'function';\n}\nfunction isReducer(value) {\n return typeof value === 'function';\n}\nexport function useState(defaultValue) {\n return withPointer((pointer) => {\n const setState = AsyncResource.bind(function setState(newValue) {\n const currentValue = pointer.get();\n const nextValue = isReducer(newValue) ? newValue(currentValue) : newValue;\n // Noop if the value is still the same.\n if (!Object.is(currentValue, nextValue)) {\n pointer.set(nextValue);\n // Trigger re-render\n handleChange();\n }\n });\n if (pointer.initialized) {\n return [pointer.get(), setState];\n }\n const value = isFactory(defaultValue) ? defaultValue() : defaultValue;\n pointer.set(value);\n return [value, setState];\n });\n}\n","import { withPointer, effectScheduler } from \"./hook-engine.js\";\nexport function useEffect(cb, depArray) {\n withPointer((pointer) => {\n const oldDeps = pointer.get();\n const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i]));\n if (hasChanged) {\n effectScheduler.queue(cb);\n }\n pointer.set(depArray);\n });\n}\n","// process.env dot-notation access prints:\n// Property 'TERM' comes from an index signature, so it must be accessed with ['TERM'].ts(4111)\n/* eslint dot-notation: [\"off\"] */\nimport process from 'node:process';\n// Ported from is-unicode-supported\nfunction isUnicodeSupported() {\n if (!process.platform.startsWith('win')) {\n return process.env['TERM'] !== 'linux'; // Linux console (kernel)\n }\n return (Boolean(process.env['CI']) || // CI environments generally support unicode\n Boolean(process.env['WT_SESSION']) || // Windows Terminal\n Boolean(process.env['TERMINUS_SUBLIME']) || // Terminus (<0.2.27)\n process.env['ConEmuTask'] === '{cmd::Cmder}' || // ConEmu and cmder\n process.env['TERM_PROGRAM'] === 'Terminus-Sublime' ||\n process.env['TERM_PROGRAM'] === 'vscode' ||\n process.env['TERM'] === 'xterm-256color' ||\n process.env['TERM'] === 'alacritty' ||\n process.env['TERMINAL_EMULATOR'] === 'JetBrains-JediTerm');\n}\n// Ported from figures\nconst common = {\n circleQuestionMark: '(?)',\n questionMarkPrefix: '(?)',\n square: '█',\n squareDarkShade: '▓',\n squareMediumShade: '▒',\n squareLightShade: '░',\n squareTop: '▀',\n squareBottom: '▄',\n squareLeft: '▌',\n squareRight: '▐',\n squareCenter: '■',\n bullet: '●',\n dot: '․',\n ellipsis: '…',\n pointerSmall: '›',\n triangleUp: '▲',\n triangleUpSmall: '▴',\n triangleDown: '▼',\n triangleDownSmall: '▾',\n triangleLeftSmall: '◂',\n triangleRightSmall: '▸',\n home: '⌂',\n heart: '♥',\n musicNote: '♪',\n musicNoteBeamed: '♫',\n arrowUp: '↑',\n arrowDown: '↓',\n arrowLeft: '←',\n arrowRight: '→',\n arrowLeftRight: '↔',\n arrowUpDown: '↕',\n almostEqual: '≈',\n notEqual: '≠',\n lessOrEqual: '≤',\n greaterOrEqual: '≥',\n identical: '≡',\n infinity: '∞',\n subscriptZero: '₀',\n subscriptOne: '₁',\n subscriptTwo: '₂',\n subscriptThree: '₃',\n subscriptFour: '₄',\n subscriptFive: '₅',\n subscriptSix: '₆',\n subscriptSeven: '₇',\n subscriptEight: '₈',\n subscriptNine: '₉',\n oneHalf: '½',\n oneThird: '⅓',\n oneQuarter: '¼',\n oneFifth: '⅕',\n oneSixth: '⅙',\n oneEighth: '⅛',\n twoThirds: '⅔',\n twoFifths: '⅖',\n threeQuarters: '¾',\n threeFifths: '⅗',\n threeEighths: '⅜',\n fourFifths: '⅘',\n fiveSixths: '⅚',\n fiveEighths: '⅝',\n sevenEighths: '⅞',\n line: '─',\n lineBold: '━',\n lineDouble: '═',\n lineDashed0: '┄',\n lineDashed1: '┅',\n lineDashed2: '┈',\n lineDashed3: '┉',\n lineDashed4: '╌',\n lineDashed5: '╍',\n lineDashed6: '╴',\n lineDashed7: '╶',\n lineDashed8: '╸',\n lineDashed9: '╺',\n lineDashed10: '╼',\n lineDashed11: '╾',\n lineDashed12: '−',\n lineDashed13: '–',\n lineDashed14: '‐',\n lineDashed15: '⁃',\n lineVertical: '│',\n lineVerticalBold: '┃',\n lineVerticalDouble: '║',\n lineVerticalDashed0: '┆',\n lineVerticalDashed1: '┇',\n lineVerticalDashed2: '┊',\n lineVerticalDashed3: '┋',\n lineVerticalDashed4: '╎',\n lineVerticalDashed5: '╏',\n lineVerticalDashed6: '╵',\n lineVerticalDashed7: '╷',\n lineVerticalDashed8: '╹',\n lineVerticalDashed9: '╻',\n lineVerticalDashed10: '╽',\n lineVerticalDashed11: '╿',\n lineDownLeft: '┐',\n lineDownLeftArc: '╮',\n lineDownBoldLeftBold: '┓',\n lineDownBoldLeft: '┒',\n lineDownLeftBold: '┑',\n lineDownDoubleLeftDouble: '╗',\n lineDownDoubleLeft: '╖',\n lineDownLeftDouble: '╕',\n lineDownRight: '┌',\n lineDownRightArc: '╭',\n lineDownBoldRightBold: '┏',\n lineDownBoldRight: '┎',\n lineDownRightBold: '┍',\n lineDownDoubleRightDouble: '╔',\n lineDownDoubleRight: '╓',\n lineDownRightDouble: '╒',\n lineUpLeft: '┘',\n lineUpLeftArc: '╯',\n lineUpBoldLeftBold: '┛',\n lineUpBoldLeft: '┚',\n lineUpLeftBold: '┙',\n lineUpDoubleLeftDouble: '╝',\n lineUpDoubleLeft: '╜',\n lineUpLeftDouble: '╛',\n lineUpRight: '└',\n lineUpRightArc: '╰',\n lineUpBoldRightBold: '┗',\n lineUpBoldRight: '┖',\n lineUpRightBold: '┕',\n lineUpDoubleRightDouble: '╚',\n lineUpDoubleRight: '╙',\n lineUpRightDouble: '╘',\n lineUpDownLeft: '┤',\n lineUpBoldDownBoldLeftBold: '┫',\n lineUpBoldDownBoldLeft: '┨',\n lineUpDownLeftBold: '┥',\n lineUpBoldDownLeftBold: '┩',\n lineUpDownBoldLeftBold: '┪',\n lineUpDownBoldLeft: '┧',\n lineUpBoldDownLeft: '┦',\n lineUpDoubleDownDoubleLeftDouble: '╣',\n lineUpDoubleDownDoubleLeft: '╢',\n lineUpDownLeftDouble: '╡',\n lineUpDownRight: '├',\n lineUpBoldDownBoldRightBold: '┣',\n lineUpBoldDownBoldRight: '┠',\n lineUpDownRightBold: '┝',\n lineUpBoldDownRightBold: '┡',\n lineUpDownBoldRightBold: '┢',\n lineUpDownBoldRight: '┟',\n lineUpBoldDownRight: '┞',\n lineUpDoubleDownDoubleRightDouble: '╠',\n lineUpDoubleDownDoubleRight: '╟',\n lineUpDownRightDouble: '╞',\n lineDownLeftRight: '┬',\n lineDownBoldLeftBoldRightBold: '┳',\n lineDownLeftBoldRightBold: '┯',\n lineDownBoldLeftRight: '┰',\n lineDownBoldLeftBoldRight: '┱',\n lineDownBoldLeftRightBold: '┲',\n lineDownLeftRightBold: '┮',\n lineDownLeftBoldRight: '┭',\n lineDownDoubleLeftDoubleRightDouble: '╦',\n lineDownDoubleLeftRight: '╥',\n lineDownLeftDoubleRightDouble: '╤',\n lineUpLeftRight: '┴',\n lineUpBoldLeftBoldRightBold: '┻',\n lineUpLeftBoldRightBold: '┷',\n lineUpBoldLeftRight: '┸',\n lineUpBoldLeftBoldRight: '┹',\n lineUpBoldLeftRightBold: '┺',\n lineUpLeftRightBold: '┶',\n lineUpLeftBoldRight: '┵',\n lineUpDoubleLeftDoubleRightDouble: '╩',\n lineUpDoubleLeftRight: '╨',\n lineUpLeftDoubleRightDouble: '╧',\n lineUpDownLeftRight: '┼',\n lineUpBoldDownBoldLeftBoldRightBold: '╋',\n lineUpDownBoldLeftBoldRightBold: '╈',\n lineUpBoldDownLeftBoldRightBold: '╇',\n lineUpBoldDownBoldLeftRightBold: '╊',\n lineUpBoldDownBoldLeftBoldRight: '╉',\n lineUpBoldDownLeftRight: '╀',\n lineUpDownBoldLeftRight: '╁',\n lineUpDownLeftBoldRight: '┽',\n lineUpDownLeftRightBold: '┾',\n lineUpBoldDownBoldLeftRight: '╂',\n lineUpDownLeftBoldRightBold: '┿',\n lineUpBoldDownLeftBoldRight: '╃',\n lineUpBoldDownLeftRightBold: '╄',\n lineUpDownBoldLeftBoldRight: '╅',\n lineUpDownBoldLeftRightBold: '╆',\n lineUpDoubleDownDoubleLeftDoubleRightDouble: '╬',\n lineUpDoubleDownDoubleLeftRight: '╫',\n lineUpDownLeftDoubleRightDouble: '╪',\n lineCross: '╳',\n lineBackslash: '╲',\n lineSlash: '╱',\n};\nconst specialMainSymbols = {\n tick: '✔',\n info: 'ℹ',\n warning: '⚠',\n cross: '✘',\n squareSmall: '◻',\n squareSmallFilled: '◼',\n circle: '◯',\n circleFilled: '◉',\n circleDotted: '◌',\n circleDouble: '◎',\n circleCircle: 'ⓞ',\n circleCross: 'ⓧ',\n circlePipe: 'Ⓘ',\n radioOn: '◉',\n radioOff: '◯',\n checkboxOn: '☒',\n checkboxOff: '☐',\n checkboxCircleOn: 'ⓧ',\n checkboxCircleOff: 'Ⓘ',\n pointer: '❯',\n triangleUpOutline: '△',\n triangleLeft: '◀',\n triangleRight: '▶',\n lozenge: '◆',\n lozengeOutline: '◇',\n hamburger: '☰',\n smiley: '㋡',\n mustache: '෴',\n star: '★',\n play: '▶',\n nodejs: '⬢',\n oneSeventh: '⅐',\n oneNinth: '⅑',\n oneTenth: '⅒',\n};\nconst specialFallbackSymbols = {\n tick: '√',\n info: 'i',\n warning: '‼',\n cross: '×',\n squareSmall: '□',\n squareSmallFilled: '■',\n circle: '( )',\n circleFilled: '(*)',\n circleDotted: '( )',\n circleDouble: '( )',\n circleCircle: '(○)',\n circleCross: '(×)',\n circlePipe: '(│)',\n radioOn: '(*)',\n radioOff: '( )',\n checkboxOn: '[×]',\n checkboxOff: '[ ]',\n checkboxCircleOn: '(×)',\n checkboxCircleOff: '( )',\n pointer: '>',\n triangleUpOutline: '∆',\n triangleLeft: '◄',\n triangleRight: '►',\n lozenge: '♦',\n lozengeOutline: '◊',\n hamburger: '≡',\n smiley: '☺',\n mustache: '┌─┐',\n star: '✶',\n play: '►',\n nodejs: '♦',\n oneSeventh: '1/7',\n oneNinth: '1/9',\n oneTenth: '1/10',\n};\nexport const mainSymbols = {\n ...common,\n ...specialMainSymbols,\n};\nexport const fallbackSymbols = {\n ...common,\n ...specialFallbackSymbols,\n};\nconst shouldUseMain = isUnicodeSupported();\nconst figures = shouldUseMain\n ? mainSymbols\n : fallbackSymbols;\nexport default figures;\nconst replacements = Object.entries(specialMainSymbols);\n// On terminals which do not support Unicode symbols, substitute them to other symbols\nexport const replaceSymbols = (string, { useFallback = !shouldUseMain } = {}) => {\n if (useFallback) {\n for (const [key, mainSymbol] of replacements) {\n const fallbackSymbol = fallbackSymbols[key];\n if (!fallbackSymbol) {\n throw new Error(`Unable to find fallback for ${key}`);\n }\n string = string.replaceAll(mainSymbol, fallbackSymbol);\n }\n }\n return string;\n};\n","import { styleText } from 'node:util';\nimport figures from '@inquirer/figures';\nimport { getDefaultKeybindings } from \"./key.js\";\nexport const defaultTheme = {\n prefix: {\n idle: styleText('blue', '?'),\n done: styleText('green', figures.tick),\n },\n spinner: {\n interval: 80,\n frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'].map((frame) => styleText('yellow', frame)),\n },\n keybindings: [],\n style: {\n answer: (text) => styleText('cyan', text),\n message: (text) => styleText('bold', text),\n error: (text) => styleText('red', `> ${text}`),\n defaultAnswer: (text) => styleText('dim', `(${text})`),\n help: (text) => styleText('dim', text),\n highlight: (text) => styleText('cyan', text),\n key: (text) => styleText('cyan', styleText('bold', `<${text}>`)),\n },\n};\nexport function getDefaultTheme() {\n return {\n ...defaultTheme,\n keybindings: getDefaultKeybindings(),\n };\n}\n","import { getDefaultTheme } from \"./theme.js\";\nfunction isPlainObject(value) {\n if (typeof value !== 'object' || value === null)\n return false;\n let proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n}\nfunction deepMerge(...objects) {\n const output = {};\n for (const obj of objects) {\n for (const [key, value] of Object.entries(obj)) {\n const prevValue = output[key];\n output[key] =\n isPlainObject(prevValue) && isPlainObject(value)\n ? deepMerge(prevValue, value)\n : value;\n }\n }\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n return output;\n}\nexport function makeTheme(...themes) {\n /* oxlint-disable typescript/no-unsafe-type-assertion */\n const themesToMerge = [\n getDefaultTheme(),\n ...themes.filter((theme) => theme != null),\n ];\n return deepMerge(...themesToMerge);\n /* oxlint-enable typescript/no-unsafe-type-assertion */\n}\n","import { useState } from \"./use-state.js\";\nimport { useEffect } from \"./use-effect.js\";\nimport { makeTheme } from \"./make-theme.js\";\nexport function usePrefix({ status = 'idle', theme, }) {\n const [showLoader, setShowLoader] = useState(false);\n const [tick, setTick] = useState(0);\n const { prefix, spinner } = makeTheme(theme);\n useEffect(() => {\n if (status === 'loading') {\n let tickInterval;\n let inc = -1;\n // Delay displaying spinner by 300ms, to avoid flickering\n const delayTimeout = setTimeout(() => {\n setShowLoader(true);\n tickInterval = setInterval(() => {\n inc = inc + 1;\n setTick(inc % spinner.frames.length);\n }, spinner.interval);\n }, 300);\n return () => {\n clearTimeout(delayTimeout);\n clearInterval(tickInterval);\n };\n }\n else {\n setShowLoader(false);\n }\n }, [status]);\n if (showLoader) {\n return spinner.frames[tick];\n }\n // There's a delay before we show the loader. So we want to ignore `loading` here, and pass idle instead.\n const iconName = status === 'loading' ? 'idle' : status;\n return typeof prefix === 'string' ? prefix : (prefix[iconName] ?? prefix['idle']);\n}\n","import { useState } from \"./use-state.js\";\nexport function useRef(val) {\n return useState({ current: val })[0];\n}\n","import { useRef } from \"./use-ref.js\";\nimport { useEffect } from \"./use-effect.js\";\nimport { withUpdates } from \"./hook-engine.js\";\nexport function useKeypress(userHandler) {\n const signal = useRef(userHandler);\n signal.current = userHandler;\n useEffect((rl) => {\n let ignore = false;\n const handler = withUpdates((_input, event) => {\n if (ignore)\n return;\n void signal.current(event, rl);\n });\n rl.input.on('keypress', handler);\n return () => {\n ignore = true;\n rl.input.removeListener('keypress', handler);\n };\n }, []);\n}\n","'use strict';\n\nmodule.exports = cliWidth;\n\nfunction normalizeOpts(options) {\n const defaultOpts = {\n defaultWidth: 0,\n output: process.stdout,\n tty: require('tty'),\n };\n\n if (!options) {\n return defaultOpts;\n }\n\n Object.keys(defaultOpts).forEach(function (key) {\n if (!options[key]) {\n options[key] = defaultOpts[key];\n }\n });\n\n return options;\n}\n\nfunction cliWidth(options) {\n const opts = normalizeOpts(options);\n\n if (opts.output.getWindowSize) {\n return opts.output.getWindowSize()[0] || opts.defaultWidth;\n }\n\n if (opts.tty.getWindowSize) {\n return opts.tty.getWindowSize()[1] || opts.defaultWidth;\n }\n\n if (opts.output.columns) {\n return opts.output.columns;\n }\n\n if (process.env.CLI_WIDTH) {\n const width = parseInt(process.env.CLI_WIDTH, 10);\n\n if (!isNaN(width) && width !== 0) {\n return width;\n }\n }\n\n return opts.defaultWidth;\n}\n","/* MAIN */\nconst getCodePointsLength = (() => {\n const SURROGATE_PAIR_RE = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n return (input) => {\n let surrogatePairsNr = 0;\n SURROGATE_PAIR_RE.lastIndex = 0;\n while (SURROGATE_PAIR_RE.test(input)) {\n surrogatePairsNr += 1;\n }\n return input.length - surrogatePairsNr;\n };\n})();\nconst isFullWidth = (x) => {\n return x === 0x3000 || x >= 0xFF01 && x <= 0xFF60 || x >= 0xFFE0 && x <= 0xFFE6;\n};\nconst isWideNotCJKTNotEmoji = (x) => {\n return x === 0x231B || x === 0x2329 || x >= 0x2FF0 && x <= 0x2FFF || x >= 0x3001 && x <= 0x303E || x >= 0x3099 && x <= 0x30FF || x >= 0x3105 && x <= 0x312F || x >= 0x3131 && x <= 0x318E || x >= 0x3190 && x <= 0x31E3 || x >= 0x31EF && x <= 0x321E || x >= 0x3220 && x <= 0x3247 || x >= 0x3250 && x <= 0x4DBF || x >= 0xFE10 && x <= 0xFE19 || x >= 0xFE30 && x <= 0xFE52 || x >= 0xFE54 && x <= 0xFE66 || x >= 0xFE68 && x <= 0xFE6B || x >= 0x1F200 && x <= 0x1F202 || x >= 0x1F210 && x <= 0x1F23B || x >= 0x1F240 && x <= 0x1F248 || x >= 0x20000 && x <= 0x2FFFD || x >= 0x30000 && x <= 0x3FFFD;\n};\n/* EXPORT */\nexport { getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji };\n","/* IMPORT */\nimport { getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji } from './utils.js';\n/* HELPERS */\nconst ANSI_RE = /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\\u001b\\]8;[^;]*;.*?(?:\\u0007|\\u001b\\u005c)/y;\nconst CONTROL_RE = /[\\x00-\\x08\\x0A-\\x1F\\x7F-\\x9F]{1,1000}/y;\nconst 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;\nconst TAB_RE = /\\t{1,1000}/y;\nconst EMOJI_RE = /[\\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;\nconst LATIN_RE = /(?:[\\x20-\\x7E\\xA0-\\xFF](?!\\uFE0F)){1,1000}/y;\nconst MODIFIER_RE = /\\p{M}+/gu;\nconst NO_TRUNCATION = { limit: Infinity, ellipsis: '' };\n/* MAIN */\nconst getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {\n /* CONSTANTS */\n const LIMIT = truncationOptions.limit ?? Infinity;\n const ELLIPSIS = truncationOptions.ellipsis ?? '';\n const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);\n const ANSI_WIDTH = 0;\n const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;\n const TAB_WIDTH = widthOptions.tabWidth ?? 8;\n const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;\n const FULL_WIDTH_WIDTH = 2;\n const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;\n const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;\n const PARSE_BLOCKS = [\n [LATIN_RE, REGULAR_WIDTH],\n [ANSI_RE, ANSI_WIDTH],\n [CONTROL_RE, CONTROL_WIDTH],\n [TAB_RE, TAB_WIDTH],\n [EMOJI_RE, EMOJI_WIDTH],\n [CJKT_WIDE_RE, WIDE_WIDTH],\n ];\n /* STATE */\n let indexPrev = 0;\n let index = 0;\n let length = input.length;\n let lengthExtra = 0;\n let truncationEnabled = false;\n let truncationIndex = length;\n let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);\n let unmatchedStart = 0;\n let unmatchedEnd = 0;\n let width = 0;\n let widthExtra = 0;\n /* PARSE LOOP */\n outer: while (true) {\n /* UNMATCHED */\n if ((unmatchedEnd > unmatchedStart) || (index >= length && index > indexPrev)) {\n const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);\n lengthExtra = 0;\n for (const char of unmatched.replaceAll(MODIFIER_RE, '')) {\n const codePoint = char.codePointAt(0) || 0;\n if (isFullWidth(codePoint)) {\n widthExtra = FULL_WIDTH_WIDTH;\n }\n else if (isWideNotCJKTNotEmoji(codePoint)) {\n widthExtra = WIDE_WIDTH;\n }\n else {\n widthExtra = REGULAR_WIDTH;\n }\n if ((width + widthExtra) > truncationLimit) {\n truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);\n }\n if ((width + widthExtra) > LIMIT) {\n truncationEnabled = true;\n break outer;\n }\n lengthExtra += char.length;\n width += widthExtra;\n }\n unmatchedStart = unmatchedEnd = 0;\n }\n /* EXITING */\n if (index >= length) {\n break outer;\n }\n /* PARSE BLOCKS */\n for (let i = 0, l = PARSE_BLOCKS.length; i < l; i++) {\n const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];\n BLOCK_RE.lastIndex = index;\n if (BLOCK_RE.test(input)) {\n lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;\n widthExtra = lengthExtra * BLOCK_WIDTH;\n if ((width + widthExtra) > truncationLimit) {\n truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));\n }\n if ((width + widthExtra) > LIMIT) {\n truncationEnabled = true;\n break outer;\n }\n width += widthExtra;\n unmatchedStart = indexPrev;\n unmatchedEnd = index;\n index = indexPrev = BLOCK_RE.lastIndex;\n continue outer;\n }\n }\n /* UNMATCHED INDEX */\n index += 1;\n }\n /* RETURN */\n return {\n width: truncationEnabled ? truncationLimit : width,\n index: truncationEnabled ? truncationIndex : length,\n truncated: truncationEnabled,\n ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH\n };\n};\n/* EXPORT */\nexport default getStringTruncatedWidth;\n","/* IMPORT */\nimport fastStringTruncatedWidth from 'fast-string-truncated-width';\n/* HELPERS */\nconst NO_TRUNCATION = {\n limit: Infinity,\n ellipsis: '',\n ellipsisWidth: 0,\n};\n/* MAIN */\nconst fastStringWidth = (input, options = {}) => {\n return fastStringTruncatedWidth(input, NO_TRUNCATION, options).width;\n};\n/* EXPORT */\nexport default fastStringWidth;\n","import stringWidth from 'fast-string-width';\nconst ESC = '\\x1B';\nconst CSI = '\\x9B';\nconst END_CODE = 39;\nconst ANSI_ESCAPE_BELL = '\\u0007';\nconst ANSI_CSI = '[';\nconst ANSI_OSC = ']';\nconst ANSI_SGR_TERMINATOR = 'm';\nconst ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;\nconst GROUP_REGEX = new RegExp(`(?:\\\\${ANSI_CSI}(?<code>\\\\d+)m|\\\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, 'y');\nconst getClosingCode = (openingCode) => {\n if (openingCode >= 30 && openingCode <= 37)\n return 39;\n if (openingCode >= 90 && openingCode <= 97)\n return 39;\n if (openingCode >= 40 && openingCode <= 47)\n return 49;\n if (openingCode >= 100 && openingCode <= 107)\n return 49;\n if (openingCode === 1 || openingCode === 2)\n return 22;\n if (openingCode === 3)\n return 23;\n if (openingCode === 4)\n return 24;\n if (openingCode === 7)\n return 27;\n if (openingCode === 8)\n return 28;\n if (openingCode === 9)\n return 29;\n if (openingCode === 0)\n return 0;\n return undefined;\n};\nconst wrapAnsiCode = (code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;\nconst wrapAnsiHyperlink = (url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;\nconst wrapWord = (rows, word, columns) => {\n const characters = word[Symbol.iterator]();\n let isInsideEscape = false;\n let isInsideLinkEscape = false;\n let lastRow = rows.at(-1);\n let visible = lastRow === undefined ? 0 : stringWidth(lastRow);\n let currentCharacter = characters.next();\n let nextCharacter = characters.next();\n let rawCharacterIndex = 0;\n while (!currentCharacter.done) {\n const character = currentCharacter.value;\n const characterLength = stringWidth(character);\n if (visible + characterLength <= columns) {\n rows[rows.length - 1] += character;\n }\n else {\n rows.push(character);\n visible = 0;\n }\n if (character === ESC || character === CSI) {\n isInsideEscape = true;\n isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);\n }\n if (isInsideEscape) {\n if (isInsideLinkEscape) {\n if (character === ANSI_ESCAPE_BELL) {\n isInsideEscape = false;\n isInsideLinkEscape = false;\n }\n }\n else if (character === ANSI_SGR_TERMINATOR) {\n isInsideEscape = false;\n }\n }\n else {\n visible += characterLength;\n if (visible === columns && !nextCharacter.done) {\n rows.push('');\n visible = 0;\n }\n }\n currentCharacter = nextCharacter;\n nextCharacter = characters.next();\n rawCharacterIndex += character.length;\n }\n lastRow = rows.at(-1);\n if (!visible && lastRow !== undefined && lastRow.length && rows.length > 1) {\n rows[rows.length - 2] += rows.pop();\n }\n};\nconst stringVisibleTrimSpacesRight = (string) => {\n const words = string.split(' ');\n let last = words.length;\n while (last) {\n if (stringWidth(words[last - 1])) {\n break;\n }\n last--;\n }\n if (last === words.length) {\n return string;\n }\n return words.slice(0, last).join(' ') + words.slice(last).join('');\n};\nconst exec = (string, columns, options = {}) => {\n if (options.trim !== false && string.trim() === '') {\n return '';\n }\n let returnValue = '';\n let escapeCode;\n let escapeUrl;\n const words = string.split(' ');\n let rows = [''];\n let rowLength = 0;\n for (let index = 0; index < words.length; index++) {\n const word = words[index];\n if (options.trim !== false) {\n const row = rows.at(-1) ?? '';\n const trimmed = row.trimStart();\n if (row.length !== trimmed.length) {\n rows[rows.length - 1] = trimmed;\n rowLength = stringWidth(trimmed);\n }\n }\n if (index !== 0) {\n if (rowLength >= columns &&\n (options.wordWrap === false || options.trim === false)) {\n rows.push('');\n rowLength = 0;\n }\n if (rowLength || options.trim === false) {\n rows[rows.length - 1] += ' ';\n rowLength++;\n }\n }\n const wordLength = stringWidth(word);\n if (options.hard && wordLength > columns) {\n const remainingColumns = columns - rowLength;\n const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);\n const breaksStartingNextLine = Math.floor((wordLength - 1) / columns);\n if (breaksStartingNextLine < breaksStartingThisLine) {\n rows.push('');\n }\n wrapWord(rows, word, columns);\n rowLength = stringWidth(rows.at(-1) ?? '');\n continue;\n }\n if (rowLength + wordLength > columns && rowLength && wordLength) {\n if (options.wordWrap === false && rowLength < columns) {\n wrapWord(rows, word, columns);\n rowLength = stringWidth(rows.at(-1) ?? '');\n continue;\n }\n rows.push('');\n rowLength = 0;\n }\n if (rowLength + wordLength > columns && options.wordWrap === false) {\n wrapWord(rows, word, columns);\n rowLength = stringWidth(rows.at(-1) ?? '');\n continue;\n }\n rows[rows.length - 1] += word;\n rowLength += wordLength;\n }\n if (options.trim !== false) {\n rows = rows.map((row) => stringVisibleTrimSpacesRight(row));\n }\n const preString = rows.join('\\n');\n let inSurrogate = false;\n for (let i = 0; i < preString.length; i++) {\n const character = preString[i];\n returnValue += character;\n if (!inSurrogate) {\n inSurrogate = character >= '\\ud800' && character <= '\\udbff';\n if (inSurrogate) {\n continue;\n }\n }\n else {\n inSurrogate = false;\n }\n if (character === ESC || character === CSI) {\n GROUP_REGEX.lastIndex = i + 1;\n const groupsResult = GROUP_REGEX.exec(preString);\n const groups = groupsResult?.groups;\n if (groups?.code !== undefined) {\n const code = Number.parseFloat(groups.code);\n escapeCode = code === END_CODE ? undefined : code;\n }\n else if (groups?.uri !== undefined) {\n escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;\n }\n }\n if (preString[i + 1] === '\\n') {\n if (escapeUrl) {\n returnValue += wrapAnsiHyperlink('');\n }\n const closingCode = escapeCode ? getClosingCode(escapeCode) : undefined;\n if (escapeCode && closingCode) {\n returnValue += wrapAnsiCode(closingCode);\n }\n }\n else if (character === '\\n') {\n if (escapeCode && getClosingCode(escapeCode)) {\n returnValue += wrapAnsiCode(escapeCode);\n }\n if (escapeUrl) {\n returnValue += wrapAnsiHyperlink(escapeUrl);\n }\n }\n }\n return returnValue;\n};\nconst CRLF_OR_LF = /\\r?\\n/;\nexport function wrapAnsi(string, columns, options) {\n return String(string)\n .normalize()\n .split(CRLF_OR_LF)\n .map((line) => exec(line, columns, options))\n .join('\\n');\n}\n","import cliWidth from 'cli-width';\nimport { wrapAnsi } from 'fast-wrap-ansi';\nimport { readline } from \"./hook-engine.js\";\n/**\n * Force line returns at specific width. This function is ANSI code friendly and it'll\n * ignore invisible codes during width calculation.\n * @param {string} content\n * @param {number} width\n * @return {string}\n */\nexport function breakLines(content, width) {\n return content\n .split('\\n')\n .flatMap((line) => wrapAnsi(line, width, { trim: false, wordWrap: false })\n .split('\\n')\n .map((str) => str.trimEnd()))\n .join('\\n');\n}\n/**\n * Returns the width of the active readline, or 80 as default value.\n * @returns {number}\n */\nexport function readlineWidth() {\n return cliWidth({ defaultWidth: 80, output: readline().output });\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Create a promise and get access to its `resolve` and `reject` functions.\n *\n * Mirrors `Promise.withResolvers()`, available starting from Node 22.\n * TODO: Remove once Node 22 becomes the minimum supported version.\n */\nexport function withResolver() {\n let resolve;\n let reject;\n const promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n return { promise, resolve: resolve, reject: reject };\n}\n","const Stream = require('stream')\n\nclass MuteStream extends Stream {\n #isTTY = null\n\n constructor (opts = {}) {\n super(opts)\n this.writable = this.readable = true\n this.muted = false\n this.on('pipe', this._onpipe)\n this.replace = opts.replace\n\n // For readline-type situations\n // This much at the start of a line being redrawn after a ctrl char\n // is seen (such as backspace) won't be redrawn as the replacement\n this._prompt = opts.prompt || null\n this._hadControl = false\n }\n\n #destSrc (key, def) {\n if (this._dest) {\n return this._dest[key]\n }\n if (this._src) {\n return this._src[key]\n }\n return def\n }\n\n #proxy (method, ...args) {\n if (typeof this._dest?.[method] === 'function') {\n this._dest[method](...args)\n }\n if (typeof this._src?.[method] === 'function') {\n this._src[method](...args)\n }\n }\n\n get isTTY () {\n if (this.#isTTY !== null) {\n return this.#isTTY\n }\n return this.#destSrc('isTTY', false)\n }\n\n // basically just get replace the getter/setter with a regular value\n set isTTY (val) {\n this.#isTTY = val\n }\n\n get rows () {\n return this.#destSrc('rows')\n }\n\n get columns () {\n return this.#destSrc('columns')\n }\n\n mute () {\n this.muted = true\n }\n\n unmute () {\n this.muted = false\n }\n\n _onpipe (src) {\n this._src = src\n }\n\n pipe (dest, options) {\n this._dest = dest\n return super.pipe(dest, options)\n }\n\n pause () {\n if (this._src) {\n return this._src.pause()\n }\n }\n\n resume () {\n if (this._src) {\n return this._src.resume()\n }\n }\n\n write (c) {\n if (this.muted) {\n if (!this.replace) {\n return true\n }\n // eslint-disable-next-line no-control-regex\n if (c.match(/^\\u001b/)) {\n if (c.indexOf(this._prompt) === 0) {\n c = c.slice(this._prompt.length)\n c = c.replace(/./g, this.replace)\n c = this._prompt + c\n }\n this._hadControl = true\n return this.emit('data', c)\n } else {\n if (this._prompt && this._hadControl &&\n c.indexOf(this._prompt) === 0) {\n this._hadControl = false\n this.emit('data', this._prompt)\n c = c.slice(this._prompt.length)\n }\n c = c.toString().replace(/./g, this.replace)\n }\n }\n this.emit('data', c)\n }\n\n end (c) {\n if (this.muted) {\n if (c && this.replace) {\n c = c.toString().replace(/./g, this.replace)\n } else {\n c = null\n }\n }\n if (c) {\n this.emit('data', c)\n }\n this.emit('end')\n }\n\n destroy (...args) {\n return this.#proxy('destroy', ...args)\n }\n\n destroySoon (...args) {\n return this.#proxy('destroySoon', ...args)\n }\n\n close (...args) {\n return this.#proxy('close', ...args)\n }\n}\n\nmodule.exports = MuteStream\n","/**\n * This is not the set of all possible signals.\n *\n * It IS, however, the set of all signals that trigger\n * an exit on either Linux or BSD systems. Linux is a\n * superset of the signal names supported on BSD, and\n * the unknown signals just fail to register, so we can\n * catch that easily enough.\n *\n * Windows signals are a different set, since there are\n * signals that terminate Windows processes, but don't\n * terminate (or don't even exist) on Posix systems.\n *\n * Don't bother with SIGKILL. It's uncatchable, which\n * means that we can't fire any callbacks anyway.\n *\n * If a user does happen to register a handler on a non-\n * fatal signal like SIGWINCH or something, and then\n * exit, it'll end up firing `process.emit('exit')`, so\n * the handler will be fired anyway.\n *\n * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n * artificially, inherently leave the process in a\n * state from which it is not safe to try and enter JS\n * listeners.\n */\nexport const signals = [];\nsignals.push('SIGHUP', 'SIGINT', 'SIGTERM');\nif (process.platform !== 'win32') {\n signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n );\n}\nif (process.platform === 'linux') {\n signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT');\n}\n//# sourceMappingURL=signals.js.map","// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nimport { signals } from './signals.js';\nexport { signals };\nconst processOk = (process) => !!process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function';\nconst kExitEmitter = Symbol.for('signal-exit emitter');\nconst global = globalThis;\nconst ObjectDefineProperty = Object.defineProperty.bind(Object);\n// teeny special purpose ee\nclass Emitter {\n emitted = {\n afterExit: false,\n exit: false,\n };\n listeners = {\n afterExit: [],\n exit: [],\n };\n count = 0;\n id = Math.random();\n constructor() {\n if (global[kExitEmitter]) {\n return global[kExitEmitter];\n }\n ObjectDefineProperty(global, kExitEmitter, {\n value: this,\n writable: false,\n enumerable: false,\n configurable: false,\n });\n }\n on(ev, fn) {\n this.listeners[ev].push(fn);\n }\n removeListener(ev, fn) {\n const list = this.listeners[ev];\n const i = list.indexOf(fn);\n /* c8 ignore start */\n if (i === -1) {\n return;\n }\n /* c8 ignore stop */\n if (i === 0 && list.length === 1) {\n list.length = 0;\n }\n else {\n list.splice(i, 1);\n }\n }\n emit(ev, code, signal) {\n if (this.emitted[ev]) {\n return false;\n }\n this.emitted[ev] = true;\n let ret = false;\n for (const fn of this.listeners[ev]) {\n ret = fn(code, signal) === true || ret;\n }\n if (ev === 'exit') {\n ret = this.emit('afterExit', code, signal) || ret;\n }\n return ret;\n }\n}\nclass SignalExitBase {\n}\nconst signalExitWrap = (handler) => {\n return {\n onExit(cb, opts) {\n return handler.onExit(cb, opts);\n },\n load() {\n return handler.load();\n },\n unload() {\n return handler.unload();\n },\n };\n};\nclass SignalExitFallback extends SignalExitBase {\n onExit() {\n return () => { };\n }\n load() { }\n unload() { }\n}\nclass SignalExit extends SignalExitBase {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n /* c8 ignore start */\n #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP';\n /* c8 ignore stop */\n #emitter = new Emitter();\n #process;\n #originalProcessEmit;\n #originalProcessReallyExit;\n #sigListeners = {};\n #loaded = false;\n constructor(process) {\n super();\n this.#process = process;\n // { <signal>: <listener fn>, ... }\n this.#sigListeners = {};\n for (const sig of signals) {\n this.#sigListeners[sig] = () => {\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n const listeners = this.#process.listeners(sig);\n let { count } = this.#emitter;\n // This is a workaround for the fact that signal-exit v3 and signal\n // exit v4 are not aware of each other, and each will attempt to let\n // the other handle it, so neither of them do. To correct this, we\n // detect if we're the only handler *except* for previous versions\n // of signal-exit, and increment by the count of listeners it has\n // created.\n /* c8 ignore start */\n const p = process;\n if (typeof p.__signal_exit_emitter__ === 'object' &&\n typeof p.__signal_exit_emitter__.count === 'number') {\n count += p.__signal_exit_emitter__.count;\n }\n /* c8 ignore stop */\n if (listeners.length === count) {\n this.unload();\n const ret = this.#emitter.emit('exit', null, sig);\n /* c8 ignore start */\n const s = sig === 'SIGHUP' ? this.#hupSig : sig;\n if (!ret)\n process.kill(process.pid, s);\n /* c8 ignore stop */\n }\n };\n }\n this.#originalProcessReallyExit = process.reallyExit;\n this.#originalProcessEmit = process.emit;\n }\n onExit(cb, opts) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return () => { };\n }\n /* c8 ignore stop */\n if (this.#loaded === false) {\n this.load();\n }\n const ev = opts?.alwaysLast ? 'afterExit' : 'exit';\n this.#emitter.on(ev, cb);\n return () => {\n this.#emitter.removeListener(ev, cb);\n if (this.#emitter.listeners['exit'].length === 0 &&\n this.#emitter.listeners['afterExit'].length === 0) {\n this.unload();\n }\n };\n }\n load() {\n if (this.#loaded) {\n return;\n }\n this.#loaded = true;\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n this.#emitter.count += 1;\n for (const sig of signals) {\n try {\n const fn = this.#sigListeners[sig];\n if (fn)\n this.#process.on(sig, fn);\n }\n catch (_) { }\n }\n this.#process.emit = (ev, ...a) => {\n return this.#processEmit(ev, ...a);\n };\n this.#process.reallyExit = (code) => {\n return this.#processReallyExit(code);\n };\n }\n unload() {\n if (!this.#loaded) {\n return;\n }\n this.#loaded = false;\n signals.forEach(sig => {\n const listener = this.#sigListeners[sig];\n /* c8 ignore start */\n if (!listener) {\n throw new Error('Listener not defined for signal: ' + sig);\n }\n /* c8 ignore stop */\n try {\n this.#process.removeListener(sig, listener);\n /* c8 ignore start */\n }\n catch (_) { }\n /* c8 ignore stop */\n });\n this.#process.emit = this.#originalProcessEmit;\n this.#process.reallyExit = this.#originalProcessReallyExit;\n this.#emitter.count -= 1;\n }\n #processReallyExit(code) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return 0;\n }\n this.#process.exitCode = code || 0;\n /* c8 ignore stop */\n this.#emitter.emit('exit', this.#process.exitCode, null);\n return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);\n }\n #processEmit(ev, ...args) {\n const og = this.#originalProcessEmit;\n if (ev === 'exit' && processOk(this.#process)) {\n if (typeof args[0] === 'number') {\n this.#process.exitCode = args[0];\n /* c8 ignore start */\n }\n /* c8 ignore start */\n const ret = og.call(this.#process, ev, ...args);\n /* c8 ignore start */\n this.#emitter.emit('exit', this.#process.exitCode, null);\n /* c8 ignore stop */\n return ret;\n }\n else {\n return og.call(this.#process, ev, ...args);\n }\n }\n}\nconst process = globalThis.process;\n// wrap so that we call the method on the actual handler, without\n// exporting it directly.\nexport const { \n/**\n * Called when the process is exiting, whether via signal, explicit\n * exit, or running out of stuff to do.\n *\n * If the global process object is not suitable for instrumentation,\n * then this will be a no-op.\n *\n * Returns a function that may be used to unload signal-exit.\n */\nonExit, \n/**\n * Load the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\nload, \n/**\n * Unload the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\nunload, } = signalExitWrap(processOk(process) ? new SignalExit(process) : new SignalExitFallback());\n//# sourceMappingURL=index.js.map","const ESC = '\\u001B[';\n/** Move cursor to first column */\nexport const cursorLeft = ESC + 'G';\n/** Hide the cursor */\nexport const cursorHide = ESC + '?25l';\n/** Show the cursor */\nexport const cursorShow = ESC + '?25h';\n/** Move cursor up by count rows */\nexport const cursorUp = (rows = 1) => (rows > 0 ? `${ESC}${rows}A` : '');\n/** Move cursor down by count rows */\nexport const cursorDown = (rows = 1) => rows > 0 ? `${ESC}${rows}B` : '';\n/** Move cursor to position (x, y) */\nexport const cursorTo = (x, y) => {\n if (typeof y === 'number' && !Number.isNaN(y)) {\n return `${ESC}${y + 1};${x + 1}H`;\n }\n return `${ESC}${x + 1}G`;\n};\nconst eraseLine = ESC + '2K';\n/** Erase the specified number of lines above the cursor */\nexport const eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : '';\n","import { stripVTControlCharacters } from 'node:util';\nimport { breakLines, readlineWidth } from \"./utils.js\";\nimport { cursorDown, cursorLeft, cursorUp, cursorTo, cursorShow, eraseLines, } from '@inquirer/ansi';\nconst height = (content) => content.split('\\n').length;\nconst lastLine = (content) => content.split('\\n').pop() ?? '';\nexport default class ScreenManager {\n // These variables are keeping information to allow correct prompt re-rendering\n height = 0;\n extraLinesUnderPrompt = 0;\n cursorPos;\n rl;\n constructor(rl) {\n this.rl = rl;\n this.cursorPos = rl.getCursorPos();\n }\n write(content) {\n this.rl.output.unmute();\n this.rl.output.write(content);\n this.rl.output.mute();\n }\n render(content, bottomContent = '') {\n // Write message to screen and setPrompt to control backspace\n const promptLine = lastLine(content);\n const rawPromptLine = stripVTControlCharacters(promptLine);\n // Remove the rl.line from our prompt. We can't rely on the content of\n // rl.line (mainly because of the password prompt), so just rely on it's\n // length.\n let prompt = rawPromptLine;\n if (this.rl.line.length > 0) {\n prompt = prompt.slice(0, -this.rl.line.length);\n }\n this.rl.setPrompt(prompt);\n // SetPrompt will change cursor position, now we can get correct value\n this.cursorPos = this.rl.getCursorPos();\n const width = readlineWidth();\n content = breakLines(content, width);\n bottomContent = breakLines(bottomContent, width);\n // Manually insert an extra line if we're at the end of the line.\n // This prevent the cursor from appearing at the beginning of the\n // current line.\n if (rawPromptLine.length % width === 0) {\n content += '\\n';\n }\n let output = content + (bottomContent ? '\\n' + bottomContent : '');\n /**\n * Re-adjust the cursor at the correct position.\n */\n // We need to consider parts of the prompt under the cursor as part of the bottom\n // content in order to correctly cleanup and re-render.\n const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;\n const bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0);\n // Return cursor to the input position (on top of the bottomContent)\n if (bottomContentHeight > 0)\n output += cursorUp(bottomContentHeight);\n // Return cursor to the initial left offset.\n output += cursorTo(this.cursorPos.cols);\n /**\n * Render and store state for future re-rendering\n */\n this.write(cursorDown(this.extraLinesUnderPrompt) + eraseLines(this.height) + output);\n this.extraLinesUnderPrompt = bottomContentHeight;\n this.height = height(output);\n }\n checkCursorPos() {\n const cursorPos = this.rl.getCursorPos();\n if (cursorPos.cols !== this.cursorPos.cols) {\n this.write(cursorTo(cursorPos.cols));\n this.cursorPos = cursorPos;\n }\n }\n done({ clearContent }) {\n this.rl.setPrompt('');\n let output = cursorDown(this.extraLinesUnderPrompt);\n output += clearContent ? eraseLines(this.height) : '\\n';\n // Reset cursor to column 0. On Windows terminals, \\n moves the cursor\n // down without resetting the column when the rendered prompt+answer\n // wraps past the terminal width. Without this, all subsequent output\n // starts at the wrong horizontal offset.\n output += cursorLeft;\n output += cursorShow;\n this.write(output);\n this.rl.close();\n }\n}\n","import * as readline from 'node:readline';\nimport { AsyncResource } from 'node:async_hooks';\nimport { withResolver } from '@inquirer/type';\nimport MuteStream from 'mute-stream';\nimport { onExit as onSignalExit } from 'signal-exit';\nimport ScreenManager from \"./screen-manager.js\";\nimport { withHooks, effectScheduler } from \"./hook-engine.js\";\nimport { AbortPromptError, CancelPromptError, ExitPromptError } from \"./errors.js\";\nimport path from 'node:path';\n// Capture the real setImmediate at module load time so it works even when test\n// frameworks mock timers with vi.useFakeTimers() or similar.\nconst nativeSetImmediate = globalThis.setImmediate;\n/**\n * Register an event listener and return its disposer, so registrations collapse\n * into a single statement: `cleanups.add(listenTo(rl, 'close', handler))`.\n */\nfunction listenTo(target, event, listener) {\n if ('on' in target) {\n target.on(event, listener);\n return () => target.removeListener(event, listener);\n }\n target.addEventListener(event, listener);\n return () => target.removeEventListener(event, listener);\n}\nfunction getCallSites() {\n // oxlint-disable-next-line typescript/unbound-method\n const savedPrepareStackTrace = Error.prepareStackTrace;\n let result = [];\n try {\n Error.prepareStackTrace = (_, callSites) => {\n const callSitesWithoutCurrent = callSites.slice(1);\n result = callSitesWithoutCurrent;\n return callSitesWithoutCurrent;\n };\n // oxlint-disable-next-line no-unused-expressions\n new Error().stack;\n }\n catch {\n // An error will occur if the Node flag --frozen-intrinsics is used.\n // https://nodejs.org/api/cli.html#--frozen-intrinsics\n return result;\n }\n Error.prepareStackTrace = savedPrepareStackTrace;\n return result;\n}\nexport function createPrompt(view) {\n const callSites = getCallSites();\n const prompt = (config, context = {}) => {\n // Default `input` to stdin\n const { input = process.stdin, signal } = context;\n const cleanups = new Set();\n // Add mute capabilities to the output\n const output = new MuteStream();\n output.pipe(context.output ?? process.stdout);\n /* oxlint-disable typescript/no-unsafe-type-assertion */\n const rl = readline.createInterface({\n terminal: true,\n input,\n output,\n });\n /* oxlint-enable typescript/no-unsafe-type-assertion */\n // Mute the output after readline has initialized so readline can perform\n // any terminal setup writes (e.g. Windows Console API initialization)\n // before suppressing output. ScreenManager will unmute/mute around each\n // render call as needed.\n output.mute();\n const screen = new ScreenManager(rl);\n const { promise, resolve, reject } = withResolver();\n return withHooks(rl, (cycle) => {\n // Clear hook effects synchronously before the prompt settles: readline\n // emits keypresses synchronously within a single data event, so a\n // microtask-deferred cleanup would let same-tick input keep driving a\n // settled prompt.\n const clearEffects = AsyncResource.bind(() => effectScheduler.clearAll());\n // The promise resolvers and effectScheduler.clearAll() are both idempotent,\n // so repeated settlement attempts are harmless no-ops. If a hook cleanup\n // throws, the cleanup error supersedes the settlement: the answer (or\n // settlement error, e.g. AbortPromptError) is dropped in favor of\n // rejecting with the cleanup error.\n const settlePrompt = (settle) => {\n try {\n clearEffects();\n settle();\n }\n catch (error) {\n reject(error);\n }\n };\n const resolvePrompt = (value) => settlePrompt(() => resolve(value));\n const rejectPrompt = (error) => settlePrompt(() => reject(error));\n const promptPromise = Object.assign(promise\n .finally(() => {\n cleanups.forEach((cleanup) => cleanup());\n screen.done({ clearContent: Boolean(context.clearPromptOnDone) });\n output.end();\n })\n .then(() => promise), { cancel: () => rejectPrompt(new CancelPromptError()) });\n if (signal) {\n const abort = () => rejectPrompt(new AbortPromptError({ cause: signal.reason }));\n if (signal.aborted) {\n abort();\n return promptPromise;\n }\n cleanups.add(listenTo(signal, 'abort', abort));\n }\n cleanups.add(onSignalExit((code, signal) => {\n rejectPrompt(new ExitPromptError(`User force closed the prompt with ${code} ${signal}`));\n }));\n // SIGINT must be explicitly handled by the prompt so the ExitPromptError can be handled.\n // Otherwise, the prompt will stop and in some scenarios never resolve.\n // Ref issue #1741\n cleanups.add(listenTo(rl, 'SIGINT', () => rejectPrompt(new ExitPromptError(`User force closed the prompt with SIGINT`))));\n // Fallback for readline closing without the prompt settling (e.g. stdin\n // EOF), so active effect timeouts still get cleared. Every settlement\n // path already clears effects through settlePrompt; this event triggers\n // immediately when the user presses ctrl+c, while signal-exit only\n // triggers after the process is done (after timeouts finish triggering).\n cleanups.add(listenTo(rl, 'close', clearEffects));\n const startCycle = () => {\n // Re-renders only happen when the state change; but the readline cursor could\n // change position and that also requires a re-render (and a manual one because\n // we mute the streams). We set the listener after the initial workLoop to avoid\n // a double render if render triggered by a state change sets the cursor to the\n // right position.\n cleanups.add(listenTo(rl.input, 'keypress', () => screen.checkCursorPos()));\n let pendingDone = null;\n cycle(() => {\n let effectsSettled = false;\n try {\n const nextView = view(config, (value) => {\n if (effectsSettled) {\n // After the cycle completes (async validation path), the \"done\"\n // render already flushed via setStatus → handleChange, so resolve\n // immediately.\n resolvePrompt(value);\n }\n else {\n pendingDone = { value };\n }\n });\n // Typescript won't allow this, but not all users rely on typescript.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (nextView === undefined) {\n let callerFilename = callSites[1]?.getFileName();\n if (callerFilename && !callerFilename.startsWith('file://')) {\n callerFilename = path.resolve(callerFilename);\n }\n throw new Error(`Prompt functions must return a string.\\n at ${callerFilename}`);\n }\n const [content, bottomContent] = typeof nextView === 'string' ? [nextView] : nextView;\n screen.render(content, bottomContent);\n effectScheduler.run();\n }\n catch (error) {\n rejectPrompt(error);\n }\n effectsSettled = true;\n if (pendingDone !== null) {\n const { value } = pendingDone;\n pendingDone = null;\n resolvePrompt(value);\n }\n });\n };\n // Proper Readable streams (like process.stdin) may have OS-level buffered\n // data that arrives in the poll phase when readline resumes the stream.\n // Deferring the first render by one setImmediate tick (check phase, after\n // poll) lets that stale data flow through readline harmlessly—no keypress\n // handlers are registered yet and the output is muted, so the stale\n // keystrokes are silently discarded.\n // Old-style streams (like MuteStream) have no such buffering, so the\n // render cycle starts immediately.\n //\n // @see https://github.com/SBoudrias/Inquirer.js/issues/1303\n if ('readableFlowing' in input) {\n nativeSetImmediate(startCycle);\n }\n else {\n startCycle();\n }\n return promptPromise;\n });\n };\n return prompt;\n}\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,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B;KACA,iBAAiB;KACjB,IAAI,gBAAgB,MAAM;MACtB,MAAM,EAAE,UAAU;MAClB,cAAc;MACd,cAAc,KAAK;KACvB;IACJ,CAAC;GACL;GAWA,IAAI,qBAAqB,OACrB,mBAAmB,UAAU;QAG7B,WAAW;GAEf,OAAO;EACX,CAAC;CACL;CACA,OAAO;AACX"}
@@ -1,6 +1,6 @@
1
- import { _ as isEnterKey, a as readlineWidth, c as usePrefix, d as useEffect, f as useState, g as isDownKey, h as isBackspaceKey, i as breakLines, l as makeTheme, m as ValidationError, n as cursorHide, o as useKeypress, p as withPointer, s as useRef, t as createPrompt, u as figures, v as isNumberKey, x as isUpKey } from "./create-prompt-DyNnKXYU.js";
1
+ import { _ as isEnterKey, a as readlineWidth, c as usePrefix, d as useEffect, f as useState, g as isDownKey, h as isBackspaceKey, i as breakLines, l as makeTheme, m as ValidationError, n as cursorHide, o as useKeypress, p as withPointer, s as useRef, t as createPrompt, u as figures, v as isNumberKey, x as isUpKey } from "./create-prompt-dWckcotJ.js";
2
2
  import { styleText } from "node:util";
3
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/use-memo.js
3
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-memo.js
4
4
  function useMemo(fn, dependencies) {
5
5
  return withPointer((pointer) => {
6
6
  const prev = pointer.get();
@@ -16,7 +16,7 @@ function useMemo(fn, dependencies) {
16
16
  });
17
17
  }
18
18
  //#endregion
19
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
19
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
20
20
  function usePointerPosition({ active, renderedItems, pageSize, loop }) {
21
21
  const state = useRef({
22
22
  lastPointer: active,
@@ -101,7 +101,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
101
101
  return pageBuffer.filter((line) => typeof line === "string").join("\n");
102
102
  }
103
103
  //#endregion
104
- //#region ../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/Separator.js
104
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/Separator.js
105
105
  /**
106
106
  * Separator object
107
107
  * Used to space/separate choices group
@@ -117,7 +117,7 @@ var Separator = class {
117
117
  }
118
118
  };
119
119
  //#endregion
120
- //#region ../../node_modules/.pnpm/@inquirer+select@5.2.5_@types+node@26.6.2/node_modules/@inquirer/select/dist/index.js
120
+ //#region ../../node_modules/.pnpm/@inquirer+select@5.2.6_@types+node@26.6.5/node_modules/@inquirer/select/dist/index.js
121
121
  const selectTheme = {
122
122
  icon: { cursor: figures.pointer },
123
123
  style: {
@@ -275,4 +275,4 @@ var dist_default = createPrompt((config, done) => {
275
275
  //#endregion
276
276
  export { useMemo as i, Separator as n, usePagination as r, dist_default as t };
277
277
 
278
- //# sourceMappingURL=dist-D3v6G5F8.js.map
278
+ //# sourceMappingURL=dist-DXDR2peT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dist-D3v6G5F8.js","names":[],"sources":["../../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/use-memo.js","../../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js","../../../node_modules/.pnpm/@inquirer+core@12.0.3_@types+node@26.6.2/node_modules/@inquirer/core/dist/lib/Separator.js","../../../node_modules/.pnpm/@inquirer+select@5.2.5_@types+node@26.6.2/node_modules/@inquirer/select/dist/index.js"],"sourcesContent":["import { withPointer } from \"./hook-engine.js\";\nexport function useMemo(fn, dependencies) {\n return withPointer((pointer) => {\n const prev = pointer.get();\n if (!pointer.initialized ||\n prev.dependencies.length !== dependencies.length ||\n prev.dependencies.some((dep, i) => dep !== dependencies[i])) {\n const value = fn();\n pointer.set({ value, dependencies });\n return value;\n }\n return prev.value;\n });\n}\n","import { useRef } from \"../use-ref.js\";\nimport { readlineWidth, breakLines } from \"../utils.js\";\nfunction usePointerPosition({ active, renderedItems, pageSize, loop, }) {\n const state = useRef({\n lastPointer: active,\n lastActive: undefined,\n });\n const { lastPointer, lastActive } = state.current;\n const middle = Math.floor(pageSize / 2);\n const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);\n const defaultPointerPosition = renderedItems\n .slice(0, active)\n .reduce((acc, item) => acc + item.length, 0);\n let pointer = defaultPointerPosition;\n if (renderedLength > pageSize) {\n if (loop) {\n /**\n * Creates the next position for the pointer considering an infinitely\n * looping list of items to be rendered on the page.\n *\n * The goal is to progressively move the cursor to the middle position as the user move down, and then keep\n * the cursor there. When the user move up, maintain the cursor position.\n */\n // By default, keep the cursor position as-is.\n pointer = lastPointer;\n if (\n // First render, skip this logic.\n lastActive != null &&\n // Only move the pointer down when the user moves down.\n lastActive < active &&\n // Check user didn't move up across page boundary.\n active - lastActive < pageSize) {\n pointer = Math.min(\n // Furthest allowed position for the pointer is the middle of the list\n middle, Math.abs(active - lastActive) === 1\n ? Math.min(\n // Move the pointer at most the height of the last active item.\n lastPointer + (renderedItems[lastActive]?.length ?? 0), \n // If the user moved by one item, move the pointer to the natural position of the active item as\n // long as it doesn't move the cursor up.\n Math.max(defaultPointerPosition, lastPointer))\n : // Otherwise, move the pointer down by the difference between the active and last active item.\n lastPointer + active - lastActive);\n }\n }\n else {\n /**\n * Creates the next position for the pointer considering a finite list of\n * items to be rendered on a page.\n *\n * The goal is to keep the pointer in the middle of the page whenever possible, until\n * we reach the bounds of the list (top or bottom). In which case, the cursor moves progressively\n * to the bottom or top of the list.\n */\n const spaceUnderActive = renderedItems\n .slice(active)\n .reduce((acc, item) => acc + item.length, 0);\n pointer =\n spaceUnderActive < pageSize - middle\n ? // If the active item is near the end of the list, progressively move the cursor towards the end.\n pageSize - spaceUnderActive\n : // Otherwise, progressively move the pointer to the middle of the list.\n Math.min(defaultPointerPosition, middle);\n }\n }\n // Save state for the next render\n state.current.lastPointer = pointer;\n state.current.lastActive = active;\n return pointer;\n}\nexport function usePagination({ items, active, renderItem, pageSize, loop = true, }) {\n const width = readlineWidth();\n const bound = (num) => ((num % items.length) + items.length) % items.length;\n const renderedItems = items.map((item, index) => {\n if (item == null)\n return [];\n return breakLines(renderItem({ item, index, isActive: index === active }), width).split('\\n');\n });\n const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);\n const renderItemAtIndex = (index) => renderedItems[index] ?? [];\n const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });\n // Render the active item to decide the position.\n // If the active item fits under the pointer, we render it there.\n // Otherwise, we need to render it to fit at the bottom of the page; moving the pointer up.\n const activeItem = renderItemAtIndex(active).slice(0, pageSize);\n const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;\n // Create an array of lines for the page, and add the lines of the active item into the page\n const pageBuffer = Array.from({ length: pageSize });\n pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);\n // Store to prevent rendering the same item twice\n const itemVisited = new Set([active]);\n // Fill the page under the active item\n let bufferPointer = activeItemPosition + activeItem.length;\n let itemPointer = bound(active + 1);\n while (bufferPointer < pageSize &&\n !itemVisited.has(itemPointer) &&\n (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {\n const lines = renderItemAtIndex(itemPointer);\n const linesToAdd = lines.slice(0, pageSize - bufferPointer);\n pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);\n // Move pointers for next iteration\n itemVisited.add(itemPointer);\n bufferPointer += linesToAdd.length;\n itemPointer = bound(itemPointer + 1);\n }\n // Fill the page over the active item\n bufferPointer = activeItemPosition - 1;\n itemPointer = bound(active - 1);\n while (bufferPointer >= 0 &&\n !itemVisited.has(itemPointer) &&\n (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {\n const lines = renderItemAtIndex(itemPointer);\n const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));\n pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);\n // Move pointers for next iteration\n itemVisited.add(itemPointer);\n bufferPointer -= linesToAdd.length;\n itemPointer = bound(itemPointer - 1);\n }\n return pageBuffer.filter((line) => typeof line === 'string').join('\\n');\n}\n","import { styleText } from 'node:util';\nimport figures from '@inquirer/figures';\n/**\n * Separator object\n * Used to space/separate choices group\n */\nexport class Separator {\n separator = styleText('dim', Array.from({ length: 15 }).join(figures.line));\n type = 'separator';\n constructor(separator) {\n if (separator) {\n this.separator = separator;\n }\n }\n static isSeparator(choice) {\n return Boolean(choice &&\n typeof choice === 'object' &&\n 'type' in choice &&\n choice.type === 'separator');\n }\n}\n","import { createPrompt, useState, useKeypress, usePrefix, usePagination, useRef, useMemo, useEffect, isBackspaceKey, isEnterKey, isUpKey, isDownKey, isNumberKey, Separator, ValidationError, makeTheme, } from '@inquirer/core';\nimport { cursorHide } from '@inquirer/ansi';\nimport { styleText } from 'node:util';\nimport figures from '@inquirer/figures';\nconst selectTheme = {\n icon: { cursor: figures.pointer },\n style: {\n disabled: (text) => styleText('dim', text),\n description: (text) => styleText('cyan', text),\n keysHelpTip: (keys) => keys\n .map(([key, action]) => `${styleText('bold', key)} ${styleText('dim', action)}`)\n .join(styleText('dim', ' • ')),\n },\n i18n: { disabledError: 'This option is disabled and cannot be selected.' },\n indexMode: 'hidden',\n};\nfunction isSelectable(item) {\n return !Separator.isSeparator(item) && !item.disabled;\n}\nfunction isNavigable(item) {\n return !Separator.isSeparator(item);\n}\nfunction normalizeChoices(choices) {\n return choices.map((choice) => {\n if (Separator.isSeparator(choice))\n return choice;\n if (typeof choice !== 'object' || choice === null || !('value' in choice)) {\n // It's a raw value (string, number, etc.)\n const name = String(choice);\n return {\n value: choice,\n name,\n short: name,\n disabled: false,\n };\n }\n const name = choice.name ?? String(choice.value);\n const normalizedChoice = {\n value: choice.value,\n name,\n short: choice.short ?? name,\n disabled: choice.disabled ?? false,\n };\n if (choice.description) {\n normalizedChoice.description = choice.description;\n }\n return normalizedChoice;\n });\n}\nexport default createPrompt((config, done) => {\n const { loop = true, pageSize = 7 } = config;\n const theme = makeTheme(selectTheme, config.theme);\n const { keybindings } = theme;\n const [status, setStatus] = useState('idle');\n const prefix = usePrefix({ status, theme });\n const searchTimeoutRef = useRef();\n // Vim keybindings (j/k) conflict with typing those letters in search.\n const searchEnabled = !keybindings.includes('vim');\n const items = useMemo(() => normalizeChoices(config.choices), [config.choices]);\n const bounds = useMemo(() => {\n const first = items.findIndex(isNavigable);\n const last = items.findLastIndex(isNavigable);\n if (first === -1) {\n throw new ValidationError('[select prompt] No selectable choices. All choices are disabled.');\n }\n return { first, last };\n }, [items]);\n const defaultItemIndex = useMemo(() => {\n if (!('default' in config))\n return -1;\n return items.findIndex((item) => isSelectable(item) && item.value === config.default);\n }, [config.default, items]);\n const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);\n const selectedChoice = items[active];\n if (selectedChoice == null || Separator.isSeparator(selectedChoice)) {\n throw new Error('Active index does not point to a choice');\n }\n const [errorMsg, setError] = useState();\n useKeypress((key, rl) => {\n clearTimeout(searchTimeoutRef.current);\n if (errorMsg) {\n setError(undefined);\n }\n if (isEnterKey(key)) {\n if (selectedChoice.disabled) {\n setError(theme.i18n.disabledError);\n }\n else {\n setStatus('done');\n done(selectedChoice.value);\n }\n }\n else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {\n rl.clearLine(0);\n if (loop ||\n (isUpKey(key, keybindings) && active !== bounds.first) ||\n (isDownKey(key, keybindings) && active !== bounds.last)) {\n const offset = isUpKey(key, keybindings) ? -1 : 1;\n let next = active;\n do {\n next = (next + offset + items.length) % items.length;\n } while (!isNavigable(items[next]));\n setActive(next);\n }\n }\n else if (isNumberKey(key) && !Number.isNaN(Number(rl.line))) {\n const selectedIndex = Number(rl.line) - 1;\n // Find the nth item (ignoring separators)\n let selectableIndex = -1;\n const position = items.findIndex((item) => {\n if (Separator.isSeparator(item))\n return false;\n selectableIndex++;\n return selectableIndex === selectedIndex;\n });\n const item = items[position];\n if (item != null && isSelectable(item)) {\n setActive(position);\n }\n searchTimeoutRef.current = setTimeout(() => {\n rl.clearLine(0);\n }, 700);\n }\n else if (isBackspaceKey(key)) {\n rl.clearLine(0);\n }\n else if (searchEnabled) {\n const searchTerm = rl.line.toLowerCase();\n const matchIndex = items.findIndex((item) => {\n if (Separator.isSeparator(item) || !isSelectable(item))\n return false;\n return item.name.toLowerCase().startsWith(searchTerm);\n });\n if (matchIndex !== -1) {\n setActive(matchIndex);\n }\n searchTimeoutRef.current = setTimeout(() => {\n rl.clearLine(0);\n }, 700);\n }\n });\n useEffect(() => () => {\n clearTimeout(searchTimeoutRef.current);\n }, []);\n const message = theme.style.message(config.message, status);\n const helpLine = theme.style.keysHelpTip([\n ['↑↓', 'navigate'],\n ['⏎', 'select'],\n ]);\n let separatorCount = 0;\n const page = usePagination({\n items,\n active,\n renderItem({ item, isActive, index }) {\n if (Separator.isSeparator(item)) {\n separatorCount++;\n return ` ${item.separator}`;\n }\n const cursor = isActive ? theme.icon.cursor : ' ';\n const indexLabel = theme.indexMode === 'number' ? `${index + 1 - separatorCount}. ` : '';\n if (item.disabled) {\n const disabledLabel = typeof item.disabled === 'string' ? item.disabled : '(disabled)';\n const disabledCursor = isActive ? theme.icon.cursor : '-';\n return theme.style.disabled(`${disabledCursor} ${indexLabel}${item.name} ${disabledLabel}`);\n }\n const color = isActive ? theme.style.highlight : (x) => x;\n return color(`${cursor} ${indexLabel}${item.name}`);\n },\n pageSize,\n loop,\n });\n if (status === 'done') {\n return [prefix, message, theme.style.answer(selectedChoice.short)]\n .filter(Boolean)\n .join(' ');\n }\n const { description } = selectedChoice;\n const lines = [\n [prefix, message].filter(Boolean).join(' '),\n page,\n ' ',\n description ? theme.style.description(description) : '',\n errorMsg ? theme.style.error(errorMsg) : '',\n helpLine,\n ]\n .filter(Boolean)\n .join('\\n')\n .trimEnd();\n return `${lines}${cursorHide}`;\n});\nexport { Separator } from '@inquirer/core';\n"],"x_google_ignoreList":[0,1,2,3],"mappings":";;;AACA,SAAgB,QAAQ,IAAI,cAAc;CACtC,OAAO,aAAa,YAAY;EAC5B,MAAM,OAAO,QAAQ,IAAI;EACzB,IAAI,CAAC,QAAQ,eACT,KAAK,aAAa,WAAW,aAAa,UAC1C,KAAK,aAAa,MAAM,KAAK,MAAM,QAAQ,aAAa,EAAE,GAAG;GAC7D,MAAM,QAAQ,GAAG;GACjB,QAAQ,IAAI;IAAE;IAAO;GAAa,CAAC;GACnC,OAAO;EACX;EACA,OAAO,KAAK;CAChB,CAAC;AACL;;;ACXA,SAAS,mBAAmB,EAAE,QAAQ,eAAe,UAAU,QAAS;CACpE,MAAM,QAAQ,OAAO;EACjB,aAAa;EACb,YAAY,KAAA;CAChB,CAAC;CACD,MAAM,EAAE,aAAa,eAAe,MAAM;CAC1C,MAAM,SAAS,KAAK,MAAM,WAAW,CAAC;CACtC,MAAM,iBAAiB,cAAc,QAAQ,KAAK,SAAS,MAAM,KAAK,QAAQ,CAAC;CAC/E,MAAM,yBAAyB,cAC1B,MAAM,GAAG,MAAM,CAAC,CAChB,QAAQ,KAAK,SAAS,MAAM,KAAK,QAAQ,CAAC;CAC/C,IAAI,UAAU;CACd,IAAI,iBAAiB,UAAU;EAC3B,IAAI,MAAM;;;;;;;;GASN,UAAU;GACV,IAEA,cAAc,QAEV,aAAa,UAEb,SAAS,aAAa,UACtB,UAAU,KAAK,IAEf,QAAQ,KAAK,IAAI,SAAS,UAAU,MAAM,IACpC,KAAK,IAEP,eAAe,cAAc,WAAW,EAAE,UAAU,IAGpD,KAAK,IAAI,wBAAwB,WAAW,CAAC,IAEzC,cAAc,SAAS,UAAU;EAEjD,OACK;;;;;;;;;GASD,MAAM,mBAAmB,cACpB,M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AC1E,MAAM,iBAAiB,WAAW,MAAM,KAAK,SAAS;IACtD,OAAO,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,aAAa,KAAK,KAAK,GAAG,eAAe;GAC9F;GAEA,QADc,WAAW,MAAM,MAAM,aAAa,MAAM,EAAA,CAC3C,GAAG,OAAO,GAAG,aAAa,KAAK,MAAM;EACtD;EACA;EACA;CACJ,CAAC;CACD,IAAI,WAAW,QACX,OAAO;EAAC;EAAQ;EAAS,MAAM,MAAM,OAAO,eAAe,KAAK;CAAC,CAAC,CAC7D,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEjB,MAAM,EAAE,gBAAgB;CAYxB,OAAO,GAXO;EACV,CAAC,QAAQ,OAAO,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAC1C;EACA;EACA,cAAc,MAAM,MAAM,YAAY,WAAW,IAAI;EACrD,WAAW,MAAM,MAAM,MAAM,QAAQ,IAAI;EACzC;CACJ,CAAC,CACI,OAAO,OAAO,CAAC,CACf,KAAK,IAAI,CAAC,CACV,QACS,IAAI;AACtB,CAAC"}
1
+ {"version":3,"file":"dist-DXDR2peT.js","names":[],"sources":["../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/use-memo.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js","../../../node_modules/.pnpm/@inquirer+core@12.0.4_@types+node@26.6.5/node_modules/@inquirer/core/dist/lib/Separator.js","../../../node_modules/.pnpm/@inquirer+select@5.2.6_@types+node@26.6.5/node_modules/@inquirer/select/dist/index.js"],"sourcesContent":["import { withPointer } from \"./hook-engine.js\";\nexport function useMemo(fn, dependencies) {\n return withPointer((pointer) => {\n const prev = pointer.get();\n if (!pointer.initialized ||\n prev.dependencies.length !== dependencies.length ||\n prev.dependencies.some((dep, i) => dep !== dependencies[i])) {\n const value = fn();\n pointer.set({ value, dependencies });\n return value;\n }\n return prev.value;\n });\n}\n","import { useRef } from \"../use-ref.js\";\nimport { readlineWidth, breakLines } from \"../utils.js\";\nfunction usePointerPosition({ active, renderedItems, pageSize, loop, }) {\n const state = useRef({\n lastPointer: active,\n lastActive: undefined,\n });\n const { lastPointer, lastActive } = state.current;\n const middle = Math.floor(pageSize / 2);\n const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);\n const defaultPointerPosition = renderedItems\n .slice(0, active)\n .reduce((acc, item) => acc + item.length, 0);\n let pointer = defaultPointerPosition;\n if (renderedLength > pageSize) {\n if (loop) {\n /**\n * Creates the next position for the pointer considering an infinitely\n * looping list of items to be rendered on the page.\n *\n * The goal is to progressively move the cursor to the middle position as the user move down, and then keep\n * the cursor there. When the user move up, maintain the cursor position.\n */\n // By default, keep the cursor position as-is.\n pointer = lastPointer;\n if (\n // First render, skip this logic.\n lastActive != null &&\n // Only move the pointer down when the user moves down.\n lastActive < active &&\n // Check user didn't move up across page boundary.\n active - lastActive < pageSize) {\n pointer = Math.min(\n // Furthest allowed position for the pointer is the middle of the list\n middle, Math.abs(active - lastActive) === 1\n ? Math.min(\n // Move the pointer at most the height of the last active item.\n lastPointer + (renderedItems[lastActive]?.length ?? 0), \n // If the user moved by one item, move the pointer to the natural position of the active item as\n // long as it doesn't move the cursor up.\n Math.max(defaultPointerPosition, lastPointer))\n : // Otherwise, move the pointer down by the difference between the active and last active item.\n lastPointer + active - lastActive);\n }\n }\n else {\n /**\n * Creates the next position for the pointer considering a finite list of\n * items to be rendered on a page.\n *\n * The goal is to keep the pointer in the middle of the page whenever possible, until\n * we reach the bounds of the list (top or bottom). In which case, the cursor moves progressively\n * to the bottom or top of the list.\n */\n const spaceUnderActive = renderedItems\n .slice(active)\n .reduce((acc, item) => acc + item.length, 0);\n pointer =\n spaceUnderActive < pageSize - middle\n ? // If the active item is near the end of the list, progressively move the cursor towards the end.\n pageSize - spaceUnderActive\n : // Otherwise, progressively move the pointer to the middle of the list.\n Math.min(defaultPointerPosition, middle);\n }\n }\n // Save state for the next render\n state.current.lastPointer = pointer;\n state.current.lastActive = active;\n return pointer;\n}\nexport function usePagination({ items, active, renderItem, pageSize, loop = true, }) {\n const width = readlineWidth();\n const bound = (num) => ((num % items.length) + items.length) % items.length;\n const renderedItems = items.map((item, index) => {\n if (item == null)\n return [];\n return breakLines(renderItem({ item, index, isActive: index === active }), width).split('\\n');\n });\n const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);\n const renderItemAtIndex = (index) => renderedItems[index] ?? [];\n const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });\n // Render the active item to decide the position.\n // If the active item fits under the pointer, we render it there.\n // Otherwise, we need to render it to fit at the bottom of the page; moving the pointer up.\n const activeItem = renderItemAtIndex(active).slice(0, pageSize);\n const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;\n // Create an array of lines for the page, and add the lines of the active item into the page\n const pageBuffer = Array.from({ length: pageSize });\n pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);\n // Store to prevent rendering the same item twice\n const itemVisited = new Set([active]);\n // Fill the page under the active item\n let bufferPointer = activeItemPosition + activeItem.length;\n let itemPointer = bound(active + 1);\n while (bufferPointer < pageSize &&\n !itemVisited.has(itemPointer) &&\n (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {\n const lines = renderItemAtIndex(itemPointer);\n const linesToAdd = lines.slice(0, pageSize - bufferPointer);\n pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);\n // Move pointers for next iteration\n itemVisited.add(itemPointer);\n bufferPointer += linesToAdd.length;\n itemPointer = bound(itemPointer + 1);\n }\n // Fill the page over the active item\n bufferPointer = activeItemPosition - 1;\n itemPointer = bound(active - 1);\n while (bufferPointer >= 0 &&\n !itemVisited.has(itemPointer) &&\n (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {\n const lines = renderItemAtIndex(itemPointer);\n const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));\n pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);\n // Move pointers for next iteration\n itemVisited.add(itemPointer);\n bufferPointer -= linesToAdd.length;\n itemPointer = bound(itemPointer - 1);\n }\n return pageBuffer.filter((line) => typeof line === 'string').join('\\n');\n}\n","import { styleText } from 'node:util';\nimport figures from '@inquirer/figures';\n/**\n * Separator object\n * Used to space/separate choices group\n */\nexport class Separator {\n separator = styleText('dim', Array.from({ length: 15 }).join(figures.line));\n type = 'separator';\n constructor(separator) {\n if (separator) {\n this.separator = separator;\n }\n }\n static isSeparator(choice) {\n return Boolean(choice &&\n typeof choice === 'object' &&\n 'type' in choice &&\n choice.type === 'separator');\n }\n}\n","import { createPrompt, useState, useKeypress, usePrefix, usePagination, useRef, useMemo, useEffect, isBackspaceKey, isEnterKey, isUpKey, isDownKey, isNumberKey, Separator, ValidationError, makeTheme, } from '@inquirer/core';\nimport { cursorHide } from '@inquirer/ansi';\nimport { styleText } from 'node:util';\nimport figures from '@inquirer/figures';\nconst selectTheme = {\n icon: { cursor: figures.pointer },\n style: {\n disabled: (text) => styleText('dim', text),\n description: (text) => styleText('cyan', text),\n keysHelpTip: (keys) => keys\n .map(([key, action]) => `${styleText('bold', key)} ${styleText('dim', action)}`)\n .join(styleText('dim', ' • ')),\n },\n i18n: { disabledError: 'This option is disabled and cannot be selected.' },\n indexMode: 'hidden',\n};\nfunction isSelectable(item) {\n return !Separator.isSeparator(item) && !item.disabled;\n}\nfunction isNavigable(item) {\n return !Separator.isSeparator(item);\n}\nfunction normalizeChoices(choices) {\n return choices.map((choice) => {\n if (Separator.isSeparator(choice))\n return choice;\n if (typeof choice !== 'object' || choice === null || !('value' in choice)) {\n // It's a raw value (string, number, etc.)\n const name = String(choice);\n return {\n value: choice,\n name,\n short: name,\n disabled: false,\n };\n }\n const name = choice.name ?? String(choice.value);\n const normalizedChoice = {\n value: choice.value,\n name,\n short: choice.short ?? name,\n disabled: choice.disabled ?? false,\n };\n if (choice.description) {\n normalizedChoice.description = choice.description;\n }\n return normalizedChoice;\n });\n}\nexport default createPrompt((config, done) => {\n const { loop = true, pageSize = 7 } = config;\n const theme = makeTheme(selectTheme, config.theme);\n const { keybindings } = theme;\n const [status, setStatus] = useState('idle');\n const prefix = usePrefix({ status, theme });\n const searchTimeoutRef = useRef();\n // Vim keybindings (j/k) conflict with typing those letters in search.\n const searchEnabled = !keybindings.includes('vim');\n const items = useMemo(() => normalizeChoices(config.choices), [config.choices]);\n const bounds = useMemo(() => {\n const first = items.findIndex(isNavigable);\n const last = items.findLastIndex(isNavigable);\n if (first === -1) {\n throw new ValidationError('[select prompt] No selectable choices. All choices are disabled.');\n }\n return { first, last };\n }, [items]);\n const defaultItemIndex = useMemo(() => {\n if (!('default' in config))\n return -1;\n return items.findIndex((item) => isSelectable(item) && item.value === config.default);\n }, [config.default, items]);\n const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);\n const selectedChoice = items[active];\n if (selectedChoice == null || Separator.isSeparator(selectedChoice)) {\n throw new Error('Active index does not point to a choice');\n }\n const [errorMsg, setError] = useState();\n useKeypress((key, rl) => {\n clearTimeout(searchTimeoutRef.current);\n if (errorMsg) {\n setError(undefined);\n }\n if (isEnterKey(key)) {\n if (selectedChoice.disabled) {\n setError(theme.i18n.disabledError);\n }\n else {\n setStatus('done');\n done(selectedChoice.value);\n }\n }\n else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {\n rl.clearLine(0);\n if (loop ||\n (isUpKey(key, keybindings) && active !== bounds.first) ||\n (isDownKey(key, keybindings) && active !== bounds.last)) {\n const offset = isUpKey(key, keybindings) ? -1 : 1;\n let next = active;\n do {\n next = (next + offset + items.length) % items.length;\n } while (!isNavigable(items[next]));\n setActive(next);\n }\n }\n else if (isNumberKey(key) && !Number.isNaN(Number(rl.line))) {\n const selectedIndex = Number(rl.line) - 1;\n // Find the nth item (ignoring separators)\n let selectableIndex = -1;\n const position = items.findIndex((item) => {\n if (Separator.isSeparator(item))\n return false;\n selectableIndex++;\n return selectableIndex === selectedIndex;\n });\n const item = items[position];\n if (item != null && isSelectable(item)) {\n setActive(position);\n }\n searchTimeoutRef.current = setTimeout(() => {\n rl.clearLine(0);\n }, 700);\n }\n else if (isBackspaceKey(key)) {\n rl.clearLine(0);\n }\n else if (searchEnabled) {\n const searchTerm = rl.line.toLowerCase();\n const matchIndex = items.findIndex((item) => {\n if (Separator.isSeparator(item) || !isSelectable(item))\n return false;\n return item.name.toLowerCase().startsWith(searchTerm);\n });\n if (matchIndex !== -1) {\n setActive(matchIndex);\n }\n searchTimeoutRef.current = setTimeout(() => {\n rl.clearLine(0);\n }, 700);\n }\n });\n useEffect(() => () => {\n clearTimeout(searchTimeoutRef.current);\n }, []);\n const message = theme.style.message(config.message, status);\n const helpLine = theme.style.keysHelpTip([\n ['↑↓', 'navigate'],\n ['⏎', 'select'],\n ]);\n let separatorCount = 0;\n const page = usePagination({\n items,\n active,\n renderItem({ item, isActive, index }) {\n if (Separator.isSeparator(item)) {\n separatorCount++;\n return ` ${item.separator}`;\n }\n const cursor = isActive ? theme.icon.cursor : ' ';\n const indexLabel = theme.indexMode === 'number' ? `${index + 1 - separatorCount}. ` : '';\n if (item.disabled) {\n const disabledLabel = typeof item.disabled === 'string' ? item.disabled : '(disabled)';\n const disabledCursor = isActive ? theme.icon.cursor : '-';\n return theme.style.disabled(`${disabledCursor} ${indexLabel}${item.name} ${disabledLabel}`);\n }\n const color = isActive ? theme.style.highlight : (x) => x;\n return color(`${cursor} ${indexLabel}${item.name}`);\n },\n pageSize,\n loop,\n });\n if (status === 'done') {\n return [prefix, message, theme.style.answer(selectedChoice.short)]\n .filter(Boolean)\n .join(' ');\n }\n const { description } = selectedChoice;\n const lines = [\n [prefix, message].filter(Boolean).join(' '),\n page,\n ' ',\n description ? theme.style.description(description) : '',\n errorMsg ? theme.style.error(errorMsg) : '',\n helpLine,\n ]\n .filter(Boolean)\n .join('\\n')\n .trim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