@alcyone-labs/arg-parser 2.14.0 → 2.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,17 +2,17 @@ import * as N from "node:fs";
2
2
  import { existsSync as Zi, lstatSync as Xi, readdirSync as Ki } from "node:fs";
3
3
  import * as P from "node:path";
4
4
  import { dirname as eo, join as to } from "node:path";
5
- import { fileURLToPath as Fn } from "node:url";
6
- import { anyOf as mr, char as gr, createRegExp as yr, oneOrMore as vr } from "magic-regexp";
5
+ import { fileURLToPath as kn } from "node:url";
6
+ import { anyOf as vr, char as wr, createRegExp as br, oneOrMore as xr } from "magic-regexp";
7
7
  import { Logger as io, createCliLogger as oo, createMcpLogger as ao, createMcpLogger as ye, logger as lo } from "@alcyone-labs/simple-mcp-logger";
8
- import { createPathsMatcher as In, getTsconfig as Nn } from "get-tsconfig";
8
+ import { createPathsMatcher as Ln, getTsconfig as Bn } from "get-tsconfig";
9
9
  import * as xe from "node:os";
10
10
  import { z as O } from "zod";
11
- import ve, { stdin as kn, stdout as Vr } from "node:process";
11
+ import ve, { stdin as Rn, stdout as zr } from "node:process";
12
12
  import * as ho from "node:readline";
13
- import Ln from "node:readline";
13
+ import Wn from "node:readline";
14
14
  import { ReadStream as go } from "node:tty";
15
- var Bn = Object.create, Xe = Object.defineProperty, Rn = Object.getOwnPropertyDescriptor, Wn = Object.getOwnPropertyNames, Vn = Object.getPrototypeOf, Ur = Object.prototype.hasOwnProperty, pe = (e, t) => () => (e && (t = e(e = 0)), t), Tt = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), _t = (e, t) => {
15
+ var Vn = Object.create, Xe = Object.defineProperty, Un = Object.getOwnPropertyDescriptor, Hn = Object.getOwnPropertyNames, Gn = Object.getPrototypeOf, Jr = Object.prototype.hasOwnProperty, pe = (e, t) => () => (e && (t = e(e = 0)), t), _t = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), Ot = (e, t) => {
16
16
  let r = {};
17
17
  for (var n in e)
18
18
  Xe(r, n, {
@@ -20,22 +20,22 @@ var Bn = Object.create, Xe = Object.defineProperty, Rn = Object.getOwnPropertyDe
20
20
  enumerable: !0
21
21
  });
22
22
  return t && Xe(r, Symbol.toStringTag, { value: "Module" }), r;
23
- }, Hr = (e, t, r, n) => {
23
+ }, qr = (e, t, r, n) => {
24
24
  if (t && typeof t == "object" || typeof t == "function")
25
- for (var o = Wn(t), s = 0, i = o.length, a; s < i; s++)
26
- a = o[s], !Ur.call(e, a) && a !== r && Xe(e, a, {
25
+ for (var o = Hn(t), s = 0, i = o.length, a; s < i; s++)
26
+ a = o[s], !Jr.call(e, a) && a !== r && Xe(e, a, {
27
27
  get: ((l) => t[l]).bind(null, a),
28
- enumerable: !(n = Rn(t, a)) || n.enumerable
28
+ enumerable: !(n = Un(t, a)) || n.enumerable
29
29
  });
30
30
  return e;
31
- }, Gr = (e, t, r) => (r = e != null ? Bn(Vn(e)) : {}, Hr(t || !e || !e.__esModule ? Xe(r, "default", {
31
+ }, Yr = (e, t, r) => (r = e != null ? Vn(Gn(e)) : {}, qr(t || !e || !e.__esModule ? Xe(r, "default", {
32
32
  value: e,
33
33
  enumerable: !0
34
- }) : r, e)), Et = (e) => Ur.call(e, "module.exports") ? e["module.exports"] : Hr(Xe({}, "__esModule", { value: !0 }), e), be = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, r) => (typeof require < "u" ? require : t)[r] }) : e)(function(e) {
34
+ }) : r, e)), Ct = (e) => Jr.call(e, "module.exports") ? e["module.exports"] : qr(Xe({}, "__esModule", { value: !0 }), e), be = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, r) => (typeof require < "u" ? require : t)[r] }) : e)(function(e) {
35
35
  if (typeof require < "u") return require.apply(this, arguments);
36
36
  throw Error('Calling `require` for "' + e + "\" in an environment that doesn't expose the `require` function.");
37
- }), Un = "\x1B[0m", Hn = "\x1B[1m", Gn = "\x1B[2m", zn = "\x1B[4m", Jn = "\x1B[2J\x1B[3J\x1B[H", qn = "\x1B[30m", Yn = "\x1B[31m", Zn = "\x1B[32m", Xn = "\x1B[33m", Kn = "\x1B[34m", Qn = "\x1B[35m", wr = "\x1B[36m", es = "\x1B[37m", br = "\x1B[90m";
38
- function ts() {
37
+ }), zn = "\x1B[0m", Jn = "\x1B[1m", qn = "\x1B[2m", Yn = "\x1B[4m", Zn = "\x1B[2J\x1B[3J\x1B[H", Xn = "\x1B[30m", Kn = "\x1B[31m", Qn = "\x1B[32m", es = "\x1B[33m", ts = "\x1B[34m", rs = "\x1B[35m", Sr = "\x1B[36m", ns = "\x1B[37m", $r = "\x1B[90m";
38
+ function ss() {
39
39
  if (typeof globalThis.window < "u" && typeof globalThis.document < "u") return !globalThis.NO_COLOR;
40
40
  if (typeof process < "u") {
41
41
  if (process.env.NO_COLOR || process.env.MCP_MODE) return !1;
@@ -43,25 +43,25 @@ function ts() {
43
43
  }
44
44
  return !1;
45
45
  }
46
- var zr = ts();
47
- function rs(e, ...t) {
48
- return !zr || t.length === 0 ? e : t.join("") + e + Un;
46
+ var Zr = ss();
47
+ function is(e, ...t) {
48
+ return !Zr || t.length === 0 ? e : t.join("") + e + zn;
49
49
  }
50
50
  function fe(e, t, r, n) {
51
51
  Object.defineProperty(e, t, {
52
- get: () => Jr([...n, r]),
52
+ get: () => Xr([...n, r]),
53
53
  configurable: !0
54
54
  });
55
55
  }
56
- function Jr(e) {
57
- const t = ((r) => rs(r, ...e));
58
- return fe(t, "bold", Hn, e), fe(t, "dim", Gn, e), fe(t, "underline", zn, e), fe(t, "black", qn, e), fe(t, "red", Yn, e), fe(t, "green", Zn, e), fe(t, "yellow", Xn, e), fe(t, "blue", Kn, e), fe(t, "magenta", Qn, e), fe(t, "cyan", wr, e), fe(t, "white", es, e), fe(t, "gray", br, e), fe(t, "grey", br, e), fe(t, "blueBright", wr, e), Object.defineProperty(t, "clear", {
59
- get: () => zr ? Jn : "",
56
+ function Xr(e) {
57
+ const t = ((r) => is(r, ...e));
58
+ return fe(t, "bold", Jn, e), fe(t, "dim", qn, e), fe(t, "underline", Yn, e), fe(t, "black", Xn, e), fe(t, "red", Kn, e), fe(t, "green", Qn, e), fe(t, "yellow", es, e), fe(t, "blue", ts, e), fe(t, "magenta", rs, e), fe(t, "cyan", Sr, e), fe(t, "white", ns, e), fe(t, "gray", $r, e), fe(t, "grey", $r, e), fe(t, "blueBright", Sr, e), Object.defineProperty(t, "clear", {
59
+ get: () => Zr ? Zn : "",
60
60
  configurable: !0
61
61
  }), t;
62
62
  }
63
- var ns = Jr([]), E = ns, ss = "\x1B[0m", Ce = "\x1B[1m", is = "\x1B[2m", at = "\x1B[4m", os = "\x1B[2J\x1B[3J\x1B[H", as = "\x1B[30m", lt = "\x1B[31m", ct = "\x1B[32m", It = "\x1B[33m", ut = "\x1B[34m", ls = "\x1B[35m", xr = "\x1B[36m", cs = "\x1B[37m", Sr = "\x1B[90m";
64
- function us() {
63
+ var os = Xr([]), E = os, as = "\x1B[0m", Ce = "\x1B[1m", ls = "\x1B[2m", at = "\x1B[4m", cs = "\x1B[2J\x1B[3J\x1B[H", us = "\x1B[30m", lt = "\x1B[31m", ct = "\x1B[32m", Nt = "\x1B[33m", ut = "\x1B[34m", fs = "\x1B[35m", Er = "\x1B[36m", ds = "\x1B[37m", Cr = "\x1B[90m";
64
+ function hs() {
65
65
  if (typeof globalThis.window < "u" && typeof globalThis.document < "u") return !globalThis.NO_COLOR;
66
66
  if (typeof process < "u") {
67
67
  if (process.env.NO_COLOR || process.env.MCP_MODE) return !1;
@@ -69,34 +69,34 @@ function us() {
69
69
  }
70
70
  return !1;
71
71
  }
72
- var qr = us(), K = (e) => qr ? (t) => e + t + ss : (t) => t, fs = {
73
- black: K(as),
72
+ var Kr = hs(), K = (e) => Kr ? (t) => e + t + as : (t) => t, ps = {
73
+ black: K(us),
74
74
  red: K(lt),
75
75
  green: K(ct),
76
- yellow: K(It),
76
+ yellow: K(Nt),
77
77
  blue: K(ut),
78
- magenta: K(ls),
79
- cyan: K(xr),
80
- white: K(cs),
81
- gray: K(Sr),
82
- grey: K(Sr),
83
- blueBright: K(xr),
78
+ magenta: K(fs),
79
+ cyan: K(Er),
80
+ white: K(ds),
81
+ gray: K(Cr),
82
+ grey: K(Cr),
83
+ blueBright: K(Er),
84
84
  bold: K(Ce),
85
- dim: K(is),
85
+ dim: K(ls),
86
86
  underline: K(at),
87
- clear: qr ? os : "",
87
+ clear: Kr ? cs : "",
88
88
  redBold: K(lt + Ce),
89
89
  greenBold: K(ct + Ce),
90
90
  blueBold: K(ut + Ce),
91
- yellowBold: K(It + Ce),
91
+ yellowBold: K(Nt + Ce),
92
92
  redUnderline: K(lt + at),
93
93
  greenUnderline: K(ct + at),
94
94
  blueUnderline: K(ut + at),
95
95
  boldRed: K(Ce + lt),
96
96
  boldGreen: K(Ce + ct),
97
97
  boldBlue: K(Ce + ut),
98
- boldYellow: K(Ce + It)
99
- }, yo = Object.assign((e) => e, fs), ke = typeof globalThis.window < "u" && typeof globalThis.document < "u", je = {
98
+ boldYellow: K(Ce + Nt)
99
+ }, yo = Object.assign((e) => e, ps), ke = typeof globalThis.window < "u" && typeof globalThis.document < "u", je = {
100
100
  reset: "",
101
101
  bold: "font-weight: bold;",
102
102
  dim: "opacity: 0.5;",
@@ -110,7 +110,7 @@ var qr = us(), K = (e) => qr ? (t) => e + t + ss : (t) => t, fs = {
110
110
  cyan: "color: #00ffff;",
111
111
  white: "color: #ffffff;",
112
112
  gray: "color: #808080;"
113
- }, _e = {
113
+ }, Oe = {
114
114
  reset: "\x1B[0m",
115
115
  bold: "\x1B[1m",
116
116
  dim: "\x1B[2m",
@@ -125,7 +125,7 @@ var qr = us(), K = (e) => qr ? (t) => e + t + ss : (t) => t, fs = {
125
125
  white: "\x1B[37m",
126
126
  gray: "\x1B[90m"
127
127
  };
128
- function sr() {
128
+ function ar() {
129
129
  if (ke) return !globalThis.NO_COLOR;
130
130
  if (typeof process < "u") {
131
131
  if (process.env.NO_COLOR || process.env.MCP_MODE) return !1;
@@ -133,18 +133,18 @@ function sr() {
133
133
  }
134
134
  return !1;
135
135
  }
136
- function bt(e, t) {
137
- if (!sr() || e.length === 0) return [t];
136
+ function xt(e, t) {
137
+ if (!ar() || e.length === 0) return [t];
138
138
  const r = e.join(" ");
139
139
  return [`%c${t}`, r];
140
140
  }
141
- function xt(e, t) {
142
- return !sr() || e.length === 0 ? t : e.join("") + t + _e.reset;
141
+ function St(e, t) {
142
+ return !ar() || e.length === 0 ? t : e.join("") + t + Oe.reset;
143
143
  }
144
144
  function de(e) {
145
- return (t) => ke ? bt([je[e]], t) : xt([_e[e]], t);
145
+ return (t) => ke ? xt([je[e]], t) : St([Oe[e]], t);
146
146
  }
147
- var ds = {
147
+ var ms = {
148
148
  black: de("black"),
149
149
  red: de("red"),
150
150
  green: de("green"),
@@ -159,11 +159,11 @@ var ds = {
159
159
  bold: de("bold"),
160
160
  dim: de("dim"),
161
161
  underline: de("underline"),
162
- clear: sr() ? ke ? (console.clear(), "") : "\x1B[2J\x1B[3J\x1B[H" : "",
163
- redBold: (e) => ke ? bt([je.red, je.bold], e) : xt([_e.red, _e.bold], e),
164
- greenBold: (e) => ke ? bt([je.green, je.bold], e) : xt([_e.green, _e.bold], e),
165
- blueBold: (e) => ke ? bt([je.blue, je.bold], e) : xt([_e.blue, _e.bold], e)
166
- }, vo = Object.assign((e) => e, ds), Ze, Yr, Zr, ir = pe((() => {
162
+ clear: ar() ? ke ? (console.clear(), "") : "\x1B[2J\x1B[3J\x1B[H" : "",
163
+ redBold: (e) => ke ? xt([je.red, je.bold], e) : St([Oe.red, Oe.bold], e),
164
+ greenBold: (e) => ke ? xt([je.green, je.bold], e) : St([Oe.green, Oe.bold], e),
165
+ blueBold: (e) => ke ? xt([je.blue, je.bold], e) : St([Oe.blue, Oe.bold], e)
166
+ }, vo = Object.assign((e) => e, ms), Ze, Qr, en, lr = pe((() => {
167
167
  Ze = class {
168
168
  /**
169
169
  * Check if this plugin supports a given file extension
@@ -171,7 +171,7 @@ var ds = {
171
171
  supportsExtension(e) {
172
172
  return this.supportedExtensions.includes(e.toLowerCase());
173
173
  }
174
- }, Yr = class extends Ze {
174
+ }, Qr = class extends Ze {
175
175
  constructor(...e) {
176
176
  super(...e), this.supportedExtensions = [".json", ".jsonc"], this.name = "json";
177
177
  }
@@ -202,7 +202,7 @@ var ds = {
202
202
  };
203
203
  return JSON.stringify(s, null, 2);
204
204
  }
205
- }, Zr = class extends Ze {
205
+ }, en = class extends Ze {
206
206
  constructor(...e) {
207
207
  super(...e), this.supportedExtensions = [".env"], this.name = "env";
208
208
  }
@@ -242,7 +242,7 @@ var ds = {
242
242
  return typeof e == "function" ? e.name || "custom function" : String(e).toLowerCase();
243
243
  }
244
244
  };
245
- })), Xr = /* @__PURE__ */ Tt(((e, t) => {
245
+ })), tn = /* @__PURE__ */ _t(((e, t) => {
246
246
  var r = Object.defineProperty, n = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.prototype.hasOwnProperty, i = (p, m) => {
247
247
  for (var _ in m) r(p, _, {
248
248
  get: m[_],
@@ -261,7 +261,7 @@ var ds = {
261
261
  TomlError: () => f,
262
262
  default: () => Ue,
263
263
  parse: () => R,
264
- stringify: () => Pe
264
+ stringify: () => Te
265
265
  }), t.exports = l(c);
266
266
  function d(p, m) {
267
267
  let _ = p.slice(0, m).split(/\r\n|\n|\r/g);
@@ -610,8 +610,8 @@ ${D}`, m), this.line = _, this.column = T, this.codeblock = D;
610
610
  toml: p,
611
611
  ptr: m
612
612
  });
613
- let [He, jn] = z(p, Ae, "}", _ - 1, T);
614
- F.add(He), U[k] = He, m = jn;
613
+ let [He, Nn] = z(p, Ae, "}", _ - 1, T);
614
+ F.add(He), U[k] = He, m = Nn;
615
615
  }
616
616
  }
617
617
  if (!A) throw new f("unfinished table encountered", {
@@ -797,7 +797,7 @@ ${D}`, m), this.line = _, this.column = T, this.codeblock = D;
797
797
  ${F}` : `[${p}]`), F && A ? `${F}
798
798
  ${A}` : F || A;
799
799
  }
800
- function Pe(p, { maxDepth: m = 1e3, numbersAsFloat: _ = !1 } = {}) {
800
+ function Te(p, { maxDepth: m = 1e3, numbersAsFloat: _ = !1 } = {}) {
801
801
  if (Q(p) !== "object") throw new TypeError("stringify can only be called with an object");
802
802
  let T = Ve(0, p, "", m, _);
803
803
  return T[T.length - 1] !== `
@@ -806,16 +806,16 @@ ${A}` : F || A;
806
806
  }
807
807
  var Ue = {
808
808
  parse: R,
809
- stringify: Pe,
809
+ stringify: Te,
810
810
  TomlDate: $,
811
811
  TomlError: f
812
812
  };
813
813
  }));
814
- function hs(e, t) {
814
+ function gs(e, t) {
815
815
  let r = e.slice(0, t).split(/\r\n|\n|\r/g);
816
816
  return [r.length, r.pop().length + 1];
817
817
  }
818
- function ps(e, t, r) {
818
+ function ys(e, t, r) {
819
819
  let n = e.split(/\r\n|\n|\r/g), o = "", s = (Math.log10(t + 1) | 0) + 1;
820
820
  for (let i = t - 1; i <= t + 1; i++) {
821
821
  let a = n[i - 1];
@@ -831,24 +831,24 @@ var q, We = pe((() => {
831
831
  column;
832
832
  codeblock;
833
833
  constructor(e, t) {
834
- const [r, n] = hs(t.toml, t.ptr), o = ps(t.toml, r, n);
834
+ const [r, n] = gs(t.toml, t.ptr), o = ys(t.toml, r, n);
835
835
  super(`Invalid TOML document: ${e}
836
836
 
837
837
  ${o}`, t), this.line = r, this.column = n, this.codeblock = o;
838
838
  }
839
839
  };
840
840
  }));
841
- function ms(e, t) {
841
+ function vs(e, t) {
842
842
  let r = 0;
843
843
  for (; e[t - ++r] === "\\"; ) ;
844
844
  return --r && r % 2;
845
845
  }
846
- function Gt(e, t = 0, r = e.length) {
846
+ function Jt(e, t = 0, r = e.length) {
847
847
  let n = e.indexOf(`
848
848
  `, t);
849
849
  return e[n - 1] === "\r" && n--, n <= r ? n : -1;
850
850
  }
851
- function Ot(e, t) {
851
+ function Dt(e, t) {
852
852
  for (let r = t; r < e.length; r++) {
853
853
  let n = e[r];
854
854
  if (n === `
@@ -867,14 +867,14 @@ function Ee(e, t, r, n) {
867
867
  for (; (o = e[t]) === " " || o === " " || !r && (o === `
868
868
  ` || o === "\r" && e[t + 1] === `
869
869
  `); ) t++;
870
- return n || o !== "#" ? t : Ee(e, Ot(e, t), r);
870
+ return n || o !== "#" ? t : Ee(e, Dt(e, t), r);
871
871
  }
872
- function gs(e, t, r, n, o = !1) {
872
+ function ws(e, t, r, n, o = !1) {
873
873
  if (!n)
874
- return t = Gt(e, t), t < 0 ? e.length : t;
874
+ return t = Jt(e, t), t < 0 ? e.length : t;
875
875
  for (let s = t; s < e.length; s++) {
876
876
  let i = e[s];
877
- if (i === "#") s = Gt(e, s);
877
+ if (i === "#") s = Jt(e, s);
878
878
  else {
879
879
  if (i === r) return s + 1;
880
880
  if (i === n || o && (i === `
@@ -887,25 +887,25 @@ function gs(e, t, r, n, o = !1) {
887
887
  ptr: t
888
888
  });
889
889
  }
890
- function Kr(e, t) {
890
+ function rn(e, t) {
891
891
  let r = e[t], n = r === e[t + 1] && e[t + 1] === e[t + 2] ? e.slice(t, t + 3) : r;
892
892
  t += n.length - 1;
893
893
  do
894
894
  t = e.indexOf(n, ++t);
895
- while (t > -1 && r !== "'" && ms(e, t));
895
+ while (t > -1 && r !== "'" && vs(e, t));
896
896
  return t > -1 && (t += n.length, n.length > 1 && (e[t] === r && t++, e[t] === r && t++)), t;
897
897
  }
898
- var Dt = pe((() => {
898
+ var At = pe((() => {
899
899
  We();
900
- })), $r, At, Qr = pe((() => {
901
- $r = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i, At = class qe extends Date {
900
+ })), Mr, jt, nn = pe((() => {
901
+ Mr = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i, jt = class qe extends Date {
902
902
  #e = !1;
903
903
  #n = !1;
904
904
  #r = null;
905
905
  constructor(t) {
906
906
  let r = !0, n = !0, o = "Z";
907
907
  if (typeof t == "string") {
908
- let s = t.match($r);
908
+ let s = t.match(Mr);
909
909
  s ? (s[1] || (r = !1, t = `0000-01-01T${t}`), n = !!s[2], n && t[10] === " " && (t = t.replace(" ", "T")), s[2] && +s[2] > 23 ? t = "" : (o = s[3] || null, t = t.toUpperCase(), !o && n && (t += "Z"))) : t = "";
910
910
  }
911
911
  super(t), isNaN(this.getTime()) || (this.#e = r, this.#n = n, this.#r = o);
@@ -952,7 +952,7 @@ var Dt = pe((() => {
952
952
  }
953
953
  };
954
954
  }));
955
- function en(e, t = 0, r = e.length) {
955
+ function sn(e, t = 0, r = e.length) {
956
956
  let n = e[t] === "'", o = e[t++] === e[t] && e[t] === e[t + 1];
957
957
  o && (r -= 2, e[t += 2] === "\r" && t++, e[t] === `
958
958
  ` && t++);
@@ -973,7 +973,7 @@ function en(e, t = 0, r = e.length) {
973
973
  if (i) {
974
974
  if (i = !1, c === "x" || c === "u" || c === "U") {
975
975
  let d = e.slice(t, t += c === "x" ? 2 : c === "u" ? 4 : 8);
976
- if (!sn.test(d)) throw new q("invalid unicode escape", {
976
+ if (!cn.test(d)) throw new q("invalid unicode escape", {
977
977
  toml: e,
978
978
  ptr: s
979
979
  });
@@ -993,7 +993,7 @@ function en(e, t = 0, r = e.length) {
993
993
  ptr: s
994
994
  });
995
995
  t = Ee(e, t);
996
- } else if (c in zt) a += zt[c];
996
+ } else if (c in qt) a += qt[c];
997
997
  else throw new q("unrecognized escape sequence", {
998
998
  toml: e,
999
999
  ptr: s
@@ -1003,16 +1003,16 @@ function en(e, t = 0, r = e.length) {
1003
1003
  }
1004
1004
  return a + e.slice(l, r - 1);
1005
1005
  }
1006
- function ys(e, t, r, n) {
1006
+ function bs(e, t, r, n) {
1007
1007
  if (e === "true") return !0;
1008
1008
  if (e === "false") return !1;
1009
1009
  if (e === "-inf") return -1 / 0;
1010
1010
  if (e === "inf" || e === "+inf") return 1 / 0;
1011
1011
  if (e === "nan" || e === "+nan" || e === "-nan") return NaN;
1012
1012
  if (e === "-0") return n ? 0n : 0;
1013
- let o = tn.test(e);
1014
- if (o || rn.test(e)) {
1015
- if (nn.test(e)) throw new q("leading zeroes are not allowed", {
1013
+ let o = on.test(e);
1014
+ if (o || an.test(e)) {
1015
+ if (ln.test(e)) throw new q("leading zeroes are not allowed", {
1016
1016
  toml: t,
1017
1017
  ptr: r
1018
1018
  });
@@ -1031,15 +1031,15 @@ function ys(e, t, r, n) {
1031
1031
  }
1032
1032
  return i;
1033
1033
  }
1034
- const s = new At(e);
1034
+ const s = new jt(e);
1035
1035
  if (!s.isValid()) throw new q("invalid value", {
1036
1036
  toml: t,
1037
1037
  ptr: r
1038
1038
  });
1039
1039
  return s;
1040
1040
  }
1041
- var tn, rn, nn, sn, zt, on = pe((() => {
1042
- Dt(), Qr(), We(), tn = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/, rn = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/, nn = /^[+-]?0[0-9_]/, sn = /^[0-9a-f]{2,8}$/i, zt = {
1041
+ var on, an, ln, cn, qt, un = pe((() => {
1042
+ At(), nn(), We(), on = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/, an = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/, ln = /^[+-]?0[0-9_]/, cn = /^[0-9a-f]{2,8}$/i, qt = {
1043
1043
  b: "\b",
1044
1044
  t: " ",
1045
1045
  n: `
@@ -1051,18 +1051,18 @@ var tn, rn, nn, sn, zt, on = pe((() => {
1051
1051
  "\\": "\\"
1052
1052
  };
1053
1053
  }));
1054
- function vs(e, t, r) {
1054
+ function xs(e, t, r) {
1055
1055
  let n = e.slice(t, r), o = n.indexOf("#");
1056
- return o > -1 && (Ot(e, o), n = n.slice(0, o)), [n.trimEnd(), o];
1056
+ return o > -1 && (Dt(e, o), n = n.slice(0, o)), [n.trimEnd(), o];
1057
1057
  }
1058
- function or(e, t, r, n, o) {
1058
+ function cr(e, t, r, n, o) {
1059
1059
  if (n === 0) throw new q("document contains excessively nested structures. aborting.", {
1060
1060
  toml: e,
1061
1061
  ptr: t
1062
1062
  });
1063
1063
  let s = e[t];
1064
1064
  if (s === "[" || s === "{") {
1065
- let [l, c] = s === "[" ? bs(e, t, n, o) : ws(e, t, n, o);
1065
+ let [l, c] = s === "[" ? $s(e, t, n, o) : Ss(e, t, n, o);
1066
1066
  if (r) {
1067
1067
  if (c = Ee(e, c), e[c] === ",") c++;
1068
1068
  else if (e[c] !== r) throw new q("expected comma or end of structure", {
@@ -1074,8 +1074,8 @@ function or(e, t, r, n, o) {
1074
1074
  }
1075
1075
  let i;
1076
1076
  if (s === '"' || s === "'") {
1077
- i = Kr(e, t);
1078
- let l = en(e, t, i);
1077
+ i = rn(e, t);
1078
+ let l = sn(e, t, i);
1079
1079
  if (r) {
1080
1080
  if (i = Ee(e, i), e[i] && e[i] !== "," && e[i] !== r && e[i] !== `
1081
1081
  ` && e[i] !== "\r") throw new q("unexpected character encountered", {
@@ -1086,18 +1086,18 @@ function or(e, t, r, n, o) {
1086
1086
  }
1087
1087
  return [l, i];
1088
1088
  }
1089
- i = gs(e, t, ",", r);
1090
- let a = vs(e, t, i - +(e[i - 1] === ","));
1089
+ i = ws(e, t, ",", r);
1090
+ let a = xs(e, t, i - +(e[i - 1] === ","));
1091
1091
  if (!a[0]) throw new q("incomplete key-value declaration: no value specified", {
1092
1092
  toml: e,
1093
1093
  ptr: t
1094
1094
  });
1095
- return r && a[1] > -1 && (i = Ee(e, t + a[1]), i += +(e[i] === ",")), [ys(a[0], e, t, o), i];
1095
+ return r && a[1] > -1 && (i = Ee(e, t + a[1]), i += +(e[i] === ",")), [bs(a[0], e, t, o), i];
1096
1096
  }
1097
- var an = pe((() => {
1098
- on(), cn(), Dt(), We();
1097
+ var fn = pe((() => {
1098
+ un(), hn(), At(), We();
1099
1099
  }));
1100
- function Jt(e, t, r = "=") {
1100
+ function Yt(e, t, r = "=") {
1101
1101
  let n = t - 1, o = [], s = e.indexOf(r, t);
1102
1102
  if (s < 0) throw new q("incomplete key-value: cannot find end of key", {
1103
1103
  toml: e,
@@ -1110,13 +1110,13 @@ function Jt(e, t, r = "=") {
1110
1110
  toml: e,
1111
1111
  ptr: t
1112
1112
  });
1113
- let a = Kr(e, t);
1113
+ let a = rn(e, t);
1114
1114
  if (a < 0) throw new q("unfinished string encountered", {
1115
1115
  toml: e,
1116
1116
  ptr: t
1117
1117
  });
1118
1118
  n = e.indexOf(".", a);
1119
- let l = e.slice(a, n < 0 || n > s ? s : n), c = Gt(l);
1119
+ let l = e.slice(a, n < 0 || n > s ? s : n), c = Jt(l);
1120
1120
  if (c > -1) throw new q("newlines are not allowed in keys", {
1121
1121
  toml: e,
1122
1122
  ptr: t + n + c
@@ -1130,11 +1130,11 @@ function Jt(e, t, r = "=") {
1130
1130
  toml: e,
1131
1131
  ptr: t
1132
1132
  });
1133
- o.push(en(e, t, a));
1133
+ o.push(sn(e, t, a));
1134
1134
  } else {
1135
1135
  n = e.indexOf(".", t);
1136
1136
  let a = e.slice(t, n < 0 || n > s ? s : n);
1137
- if (!ln.test(a)) throw new q("only letter, numbers, dashes and underscores are allowed in keys", {
1137
+ if (!dn.test(a)) throw new q("only letter, numbers, dashes and underscores are allowed in keys", {
1138
1138
  toml: e,
1139
1139
  ptr: t
1140
1140
  });
@@ -1143,17 +1143,17 @@ function Jt(e, t, r = "=") {
1143
1143
  } while (n + 1 && n < s);
1144
1144
  return [o, Ee(e, s + 1, !0, !0)];
1145
1145
  }
1146
- function ws(e, t, r, n) {
1146
+ function Ss(e, t, r, n) {
1147
1147
  let o = {}, s = /* @__PURE__ */ new Set(), i;
1148
1148
  for (t++; (i = e[t++]) !== "}" && i; ) {
1149
1149
  if (i === ",") throw new q("expected value, found comma", {
1150
1150
  toml: e,
1151
1151
  ptr: t - 1
1152
1152
  });
1153
- if (i === "#") t = Ot(e, t);
1153
+ if (i === "#") t = Dt(e, t);
1154
1154
  else if (i !== " " && i !== " " && i !== `
1155
1155
  ` && i !== "\r") {
1156
- let a, l = o, c = !1, [d, u] = Jt(e, t - 1);
1156
+ let a, l = o, c = !1, [d, u] = Yt(e, t - 1);
1157
1157
  for (let y = 0; y < d.length; y++) {
1158
1158
  if (y && (l = c ? l[a] : l[a] = {}), a = d[y], (c = Object.hasOwn(l, a)) && (typeof l[a] != "object" || s.has(l[a]))) throw new q("trying to redefine an already defined value", {
1159
1159
  toml: e,
@@ -1169,7 +1169,7 @@ function ws(e, t, r, n) {
1169
1169
  toml: e,
1170
1170
  ptr: t
1171
1171
  });
1172
- let [f, x] = or(e, u, "}", r - 1, n);
1172
+ let [f, x] = cr(e, u, "}", r - 1, n);
1173
1173
  s.add(f), l[a] = f, t = x;
1174
1174
  }
1175
1175
  }
@@ -1179,17 +1179,17 @@ function ws(e, t, r, n) {
1179
1179
  });
1180
1180
  return [o, t];
1181
1181
  }
1182
- function bs(e, t, r, n) {
1182
+ function $s(e, t, r, n) {
1183
1183
  let o = [], s;
1184
1184
  for (t++; (s = e[t++]) !== "]" && s; ) {
1185
1185
  if (s === ",") throw new q("expected value, found comma", {
1186
1186
  toml: e,
1187
1187
  ptr: t - 1
1188
1188
  });
1189
- if (s === "#") t = Ot(e, t);
1189
+ if (s === "#") t = Dt(e, t);
1190
1190
  else if (s !== " " && s !== " " && s !== `
1191
1191
  ` && s !== "\r") {
1192
- let i = or(e, t - 1, "]", r - 1, n);
1192
+ let i = cr(e, t - 1, "]", r - 1, n);
1193
1193
  o.push(i[0]), t = i[1];
1194
1194
  }
1195
1195
  }
@@ -1199,10 +1199,10 @@ function bs(e, t, r, n) {
1199
1199
  });
1200
1200
  return [o, t];
1201
1201
  }
1202
- var ln, cn = pe((() => {
1203
- on(), an(), Dt(), We(), ln = /^[a-zA-Z0-9-_]+[ \t]*$/;
1202
+ var dn, hn = pe((() => {
1203
+ un(), fn(), At(), We(), dn = /^[a-zA-Z0-9-_]+[ \t]*$/;
1204
1204
  }));
1205
- function Er(e, t, r, n) {
1205
+ function Pr(e, t, r, n) {
1206
1206
  let o = t, s = r, i, a = !1, l;
1207
1207
  for (let c = 0; c < e.length; c++) {
1208
1208
  if (c) {
@@ -1242,11 +1242,11 @@ function Er(e, t, r, n) {
1242
1242
  l.c
1243
1243
  ];
1244
1244
  }
1245
- function un(e, { maxDepth: t = 1e3, integersAsBigInt: r } = {}) {
1245
+ function pn(e, { maxDepth: t = 1e3, integersAsBigInt: r } = {}) {
1246
1246
  let n = {}, o = {}, s = n, i = o;
1247
1247
  for (let a = Ee(e, 0); a < e.length; ) {
1248
1248
  if (e[a] === "[") {
1249
- let l = e[++a] === "[", c = Jt(e, a += +l, "]");
1249
+ let l = e[++a] === "[", c = Yt(e, a += +l, "]");
1250
1250
  if (l) {
1251
1251
  if (e[c[1] - 1] !== "]") throw new q("expected end of table declaration", {
1252
1252
  toml: e,
@@ -1254,19 +1254,19 @@ function un(e, { maxDepth: t = 1e3, integersAsBigInt: r } = {}) {
1254
1254
  });
1255
1255
  c[1]++;
1256
1256
  }
1257
- let d = Er(c[0], n, o, l ? 2 : 1);
1257
+ let d = Pr(c[0], n, o, l ? 2 : 1);
1258
1258
  if (!d) throw new q("trying to redefine an already defined table or value", {
1259
1259
  toml: e,
1260
1260
  ptr: a
1261
1261
  });
1262
1262
  i = d[2], s = d[1], a = c[1];
1263
1263
  } else {
1264
- let l = Jt(e, a), c = Er(l[0], s, i, 0);
1264
+ let l = Yt(e, a), c = Pr(l[0], s, i, 0);
1265
1265
  if (!c) throw new q("trying to redefine an already defined table or value", {
1266
1266
  toml: e,
1267
1267
  ptr: a
1268
1268
  });
1269
- let d = or(e, l[1], void 0, t, r);
1269
+ let d = cr(e, l[1], void 0, t, r);
1270
1270
  c[1][c[0]] = d[0], a = d[1];
1271
1271
  }
1272
1272
  if (a = Ee(e, a, !0), e[a] && e[a] !== `
@@ -1278,8 +1278,8 @@ function un(e, { maxDepth: t = 1e3, integersAsBigInt: r } = {}) {
1278
1278
  }
1279
1279
  return n;
1280
1280
  }
1281
- var xs = pe((() => {
1282
- cn(), an(), Dt(), We();
1281
+ var Es = pe((() => {
1282
+ hn(), fn(), At(), We();
1283
1283
  }));
1284
1284
  function nt(e) {
1285
1285
  let t = typeof e;
@@ -1289,55 +1289,55 @@ function nt(e) {
1289
1289
  }
1290
1290
  return t;
1291
1291
  }
1292
- function Ss(e) {
1292
+ function Cs(e) {
1293
1293
  for (let t = 0; t < e.length; t++) if (nt(e[t]) !== "object") return !1;
1294
1294
  return e.length != 0;
1295
1295
  }
1296
- function ar(e) {
1296
+ function ur(e) {
1297
1297
  return JSON.stringify(e).replace(/\x7f/g, "\\u007f");
1298
1298
  }
1299
- function lr(e, t, r, n) {
1299
+ function fr(e, t, r, n) {
1300
1300
  if (r === 0) throw new Error("Could not stringify the object: maximum object depth exceeded");
1301
1301
  if (t === "number")
1302
1302
  return isNaN(e) ? "nan" : e === 1 / 0 ? "inf" : e === -1 / 0 ? "-inf" : n && Number.isInteger(e) ? e.toFixed(1) : e.toString();
1303
1303
  if (t === "bigint" || t === "boolean") return e.toString();
1304
- if (t === "string") return ar(e);
1304
+ if (t === "string") return ur(e);
1305
1305
  if (t === "date") {
1306
1306
  if (isNaN(e.getTime())) throw new TypeError("cannot serialize invalid date");
1307
1307
  return e.toISOString();
1308
1308
  }
1309
- if (t === "object") return $s(e, r, n);
1310
- if (t === "array") return Es(e, r, n);
1309
+ if (t === "object") return Ms(e, r, n);
1310
+ if (t === "array") return Ps(e, r, n);
1311
1311
  }
1312
- function $s(e, t, r) {
1312
+ function Ms(e, t, r) {
1313
1313
  let n = Object.keys(e);
1314
1314
  if (n.length === 0) return "{}";
1315
1315
  let o = "{ ";
1316
1316
  for (let s = 0; s < n.length; s++) {
1317
1317
  let i = n[s];
1318
- s && (o += ", "), o += ur.test(i) ? i : ar(i), o += " = ", o += lr(e[i], nt(e[i]), t - 1, r);
1318
+ s && (o += ", "), o += hr.test(i) ? i : ur(i), o += " = ", o += fr(e[i], nt(e[i]), t - 1, r);
1319
1319
  }
1320
1320
  return o + " }";
1321
1321
  }
1322
- function Es(e, t, r) {
1322
+ function Ps(e, t, r) {
1323
1323
  if (e.length === 0) return "[]";
1324
1324
  let n = "[ ";
1325
1325
  for (let o = 0; o < e.length; o++) {
1326
1326
  if (o && (n += ", "), e[o] === null || e[o] === void 0) throw new TypeError("arrays cannot contain null or undefined values");
1327
- n += lr(e[o], nt(e[o]), t - 1, r);
1327
+ n += fr(e[o], nt(e[o]), t - 1, r);
1328
1328
  }
1329
1329
  return n + " ]";
1330
1330
  }
1331
- function Cs(e, t, r, n) {
1331
+ function Ts(e, t, r, n) {
1332
1332
  if (r === 0) throw new Error("Could not stringify the object: maximum object depth exceeded");
1333
1333
  let o = "";
1334
1334
  for (let s = 0; s < e.length; s++)
1335
1335
  o += `${o && `
1336
1336
  `}[[${t}]]
1337
- `, o += cr(0, e[s], t, r, n);
1337
+ `, o += dr(0, e[s], t, r, n);
1338
1338
  return o;
1339
1339
  }
1340
- function cr(e, t, r, n, o) {
1340
+ function dr(e, t, r, n, o) {
1341
1341
  if (n === 0) throw new Error("Could not stringify the object: maximum object depth exceeded");
1342
1342
  let s = "", i = "", a = Object.keys(t);
1343
1343
  for (let l = 0; l < a.length; l++) {
@@ -1345,15 +1345,15 @@ function cr(e, t, r, n, o) {
1345
1345
  if (t[c] !== null && t[c] !== void 0) {
1346
1346
  let d = nt(t[c]);
1347
1347
  if (d === "symbol" || d === "function") throw new TypeError(`cannot serialize values of type '${d}'`);
1348
- let u = ur.test(c) ? c : ar(c);
1349
- if (d === "array" && Ss(t[c])) i += (i && `
1350
- `) + Cs(t[c], r ? `${r}.${u}` : u, n - 1, o);
1348
+ let u = hr.test(c) ? c : ur(c);
1349
+ if (d === "array" && Cs(t[c])) i += (i && `
1350
+ `) + Ts(t[c], r ? `${r}.${u}` : u, n - 1, o);
1351
1351
  else if (d === "object") {
1352
1352
  let f = r ? `${r}.${u}` : u;
1353
1353
  i += (i && `
1354
- `) + cr(f, t[c], f, n - 1, o);
1354
+ `) + dr(f, t[c], f, n - 1, o);
1355
1355
  } else
1356
- s += u, s += " = ", s += lr(t[c], d, n, o), s += `
1356
+ s += u, s += " = ", s += fr(t[c], d, n, o), s += `
1357
1357
  `;
1358
1358
  }
1359
1359
  }
@@ -1361,59 +1361,59 @@ function cr(e, t, r, n, o) {
1361
1361
  ${s}` : `[${e}]`), s && i ? `${s}
1362
1362
  ${i}` : s || i;
1363
1363
  }
1364
- function fn(e, { maxDepth: t = 1e3, numbersAsFloat: r = !1 } = {}) {
1364
+ function mn(e, { maxDepth: t = 1e3, numbersAsFloat: r = !1 } = {}) {
1365
1365
  if (nt(e) !== "object") throw new TypeError("stringify can only be called with an object");
1366
- let n = cr(0, e, "", t, r);
1366
+ let n = dr(0, e, "", t, r);
1367
1367
  return n[n.length - 1] !== `
1368
1368
  ` ? n + `
1369
1369
  ` : n;
1370
1370
  }
1371
- var ur, Ms = pe((() => {
1372
- ur = /^[a-z0-9-_]+$/i;
1373
- })), Ps = /* @__PURE__ */ _t({
1374
- TomlDate: () => At,
1371
+ var hr, _s = pe((() => {
1372
+ hr = /^[a-z0-9-_]+$/i;
1373
+ })), Os = /* @__PURE__ */ Ot({
1374
+ TomlDate: () => jt,
1375
1375
  TomlError: () => q,
1376
- default: () => dn,
1377
- parse: () => un,
1378
- stringify: () => fn
1379
- }, 1), dn, Ts = pe((() => {
1380
- xs(), Ms(), Qr(), We(), dn = {
1381
- parse: un,
1382
- stringify: fn,
1383
- TomlDate: At,
1376
+ default: () => gn,
1377
+ parse: () => pn,
1378
+ stringify: () => mn
1379
+ }, 1), gn, Ds = pe((() => {
1380
+ Es(), _s(), nn(), We(), gn = {
1381
+ parse: pn,
1382
+ stringify: mn,
1383
+ TomlDate: jt,
1384
1384
  TomlError: q
1385
1385
  };
1386
- })), qt = /* @__PURE__ */ _t({
1386
+ })), Zt = /* @__PURE__ */ Ot({
1387
1387
  TomlConfigPlugin: () => Ke,
1388
- createTomlPlugin: () => _s,
1389
- createTomlPluginAsync: () => Os
1388
+ createTomlPlugin: () => As,
1389
+ createTomlPluginAsync: () => js
1390
1390
  }, 1);
1391
- function _s() {
1391
+ function As() {
1392
1392
  try {
1393
1393
  return new Ke();
1394
1394
  } catch (e) {
1395
1395
  return console.warn("TOML plugin not available:", e instanceof Error ? e.message : String(e)), null;
1396
1396
  }
1397
1397
  }
1398
- async function Os() {
1398
+ async function js() {
1399
1399
  try {
1400
1400
  if (typeof be < "u") try {
1401
- return new Ke(Xr());
1401
+ return new Ke(tn());
1402
1402
  } catch {
1403
1403
  }
1404
- return new Ke(await Promise.resolve().then(() => (Ts(), Ps)));
1404
+ return new Ke(await Promise.resolve().then(() => (Ds(), Os)));
1405
1405
  } catch (e) {
1406
1406
  return console.warn("TOML plugin not available:", e instanceof Error ? e.message : String(e)), null;
1407
1407
  }
1408
1408
  }
1409
- var Ke, Ct = pe((() => {
1410
- ir(), Ke = class extends Ze {
1409
+ var Ke, Mt = pe((() => {
1410
+ lr(), Ke = class extends Ze {
1411
1411
  constructor(e) {
1412
1412
  super(), this.supportedExtensions = [".toml", ".tml"], this.name = "toml", this.tomlModule = null, e ? this.tomlModule = e : this.loadTomlModule();
1413
1413
  }
1414
1414
  loadTomlModule() {
1415
1415
  try {
1416
- if (typeof be < "u") this.tomlModule = Xr();
1416
+ if (typeof be < "u") this.tomlModule = tn();
1417
1417
  else throw new Error("TOML module not available in this environment");
1418
1418
  } catch {
1419
1419
  throw new Error("TOML plugin requires smol-toml dependency. Install it with: npm install smol-toml");
@@ -1475,19 +1475,19 @@ var Ke, Ct = pe((() => {
1475
1475
  return typeof e == "function" ? e.name || "custom function" : String(e).toLowerCase();
1476
1476
  }
1477
1477
  };
1478
- })), Yt = /* @__PURE__ */ _t({
1478
+ })), Xt = /* @__PURE__ */ Ot({
1479
1479
  YamlConfigPlugin: () => Qe,
1480
- createYamlPlugin: () => Ds,
1481
- createYamlPluginAsync: () => As
1480
+ createYamlPlugin: () => Fs,
1481
+ createYamlPluginAsync: () => Is
1482
1482
  }, 1);
1483
- function Ds() {
1483
+ function Fs() {
1484
1484
  try {
1485
1485
  return new Qe();
1486
1486
  } catch (e) {
1487
1487
  return console.warn("YAML plugin not available:", e instanceof Error ? e.message : String(e)), null;
1488
1488
  }
1489
1489
  }
1490
- async function As() {
1490
+ async function Is() {
1491
1491
  try {
1492
1492
  if (typeof be < "u") try {
1493
1493
  return new Qe(be("js-yaml"));
@@ -1498,8 +1498,8 @@ async function As() {
1498
1498
  return console.warn("YAML plugin not available:", e instanceof Error ? e.message : String(e)), null;
1499
1499
  }
1500
1500
  }
1501
- var Qe, Mt = pe((() => {
1502
- ir(), Qe = class extends Ze {
1501
+ var Qe, Pt = pe((() => {
1502
+ lr(), Qe = class extends Ze {
1503
1503
  constructor(e) {
1504
1504
  super(), this.supportedExtensions = [".yaml", ".yml"], this.name = "yaml", this.yamlModule = null, e ? this.yamlModule = e : this.loadYamlModule();
1505
1505
  }
@@ -1569,10 +1569,10 @@ var Qe, Mt = pe((() => {
1569
1569
  }
1570
1570
  };
1571
1571
  }));
1572
- ir();
1573
- var js = class {
1572
+ lr();
1573
+ var Ns = class {
1574
1574
  constructor() {
1575
- this.plugins = /* @__PURE__ */ new Map(), this.extensionMap = /* @__PURE__ */ new Map(), this.registerPlugin(new Yr()), this.registerPlugin(new Zr());
1575
+ this.plugins = /* @__PURE__ */ new Map(), this.extensionMap = /* @__PURE__ */ new Map(), this.registerPlugin(new Qr()), this.registerPlugin(new en());
1576
1576
  }
1577
1577
  /**
1578
1578
  * Register a configuration plugin
@@ -1633,12 +1633,12 @@ var js = class {
1633
1633
  */
1634
1634
  autoRegisterOptionalPlugins() {
1635
1635
  try {
1636
- const { createTomlPlugin: e } = (Ct(), Et(qt)), t = e();
1636
+ const { createTomlPlugin: e } = (Mt(), Ct(Zt)), t = e();
1637
1637
  t && this.registerPlugin(t);
1638
1638
  } catch {
1639
1639
  }
1640
1640
  try {
1641
- const { createYamlPlugin: e } = (Mt(), Et(Yt)), t = e();
1641
+ const { createYamlPlugin: e } = (Pt(), Ct(Xt)), t = e();
1642
1642
  t && this.registerPlugin(t);
1643
1643
  } catch {
1644
1644
  }
@@ -1649,18 +1649,18 @@ var js = class {
1649
1649
  */
1650
1650
  async autoRegisterOptionalPluginsAsync() {
1651
1651
  try {
1652
- const { createTomlPluginAsync: e } = await Promise.resolve().then(() => (Ct(), qt)), t = await e();
1652
+ const { createTomlPluginAsync: e } = await Promise.resolve().then(() => (Mt(), Zt)), t = await e();
1653
1653
  t && this.registerPlugin(t);
1654
1654
  } catch {
1655
1655
  }
1656
1656
  try {
1657
- const { createYamlPluginAsync: e } = await Promise.resolve().then(() => (Mt(), Yt)), t = await e();
1657
+ const { createYamlPluginAsync: e } = await Promise.resolve().then(() => (Pt(), Xt)), t = await e();
1658
1658
  t && this.registerPlugin(t);
1659
1659
  } catch {
1660
1660
  }
1661
1661
  }
1662
1662
  };
1663
- const $e = new js();
1663
+ const $e = new Ns();
1664
1664
  function wo() {
1665
1665
  $e.autoRegisterOptionalPlugins();
1666
1666
  }
@@ -1671,7 +1671,7 @@ function xo(e) {
1671
1671
  for (const t of e) switch (t.toLowerCase()) {
1672
1672
  case "toml":
1673
1673
  try {
1674
- const { createTomlPlugin: r } = (Ct(), Et(qt)), n = r();
1674
+ const { createTomlPlugin: r } = (Mt(), Ct(Zt)), n = r();
1675
1675
  n && $e.registerPlugin(n);
1676
1676
  } catch (r) {
1677
1677
  console.warn(`Failed to enable TOML plugin: ${r instanceof Error ? r.message : String(r)}`);
@@ -1679,7 +1679,7 @@ function xo(e) {
1679
1679
  break;
1680
1680
  case "yaml":
1681
1681
  try {
1682
- const { createYamlPlugin: r } = (Mt(), Et(Yt)), n = r();
1682
+ const { createYamlPlugin: r } = (Pt(), Ct(Xt)), n = r();
1683
1683
  n && $e.registerPlugin(n);
1684
1684
  } catch (r) {
1685
1685
  console.warn(`Failed to enable YAML plugin: ${r instanceof Error ? r.message : String(r)}`);
@@ -1689,7 +1689,7 @@ function xo(e) {
1689
1689
  console.warn(`Unknown config plugin: ${t}`);
1690
1690
  }
1691
1691
  }
1692
- var Fs = class {
1692
+ var ks = class {
1693
1693
  constructor(e) {
1694
1694
  this.argParserInstance = e;
1695
1695
  }
@@ -2050,7 +2050,7 @@ var Fs = class {
2050
2050
  return typeof e == "string" ? e : typeof e == "function" ? e.name || "function" : "unknown";
2051
2051
  }
2052
2052
  };
2053
- function Zt() {
2053
+ function Kt() {
2054
2054
  try {
2055
2055
  return process.argv[1] && N.existsSync(process.argv[1]) ? process.argv[1] : typeof be < "u" && be.main && be.main.filename ? be.main.filename : null;
2056
2056
  } catch {
@@ -2060,21 +2060,21 @@ function Zt() {
2060
2060
  function So(e) {
2061
2061
  return e.startsWith("file://") ? decodeURIComponent(e.replace("file://", "")) : e;
2062
2062
  }
2063
- function Cr(e) {
2063
+ function Tr(e) {
2064
2064
  return e.trim();
2065
2065
  }
2066
- function Te(e, t) {
2066
+ function _e(e, t) {
2067
2067
  if (typeof e == "string") {
2068
- const i = Cr(ge.substituteVariables(e, ge.detectContext()));
2068
+ const i = Tr(ge.substituteVariables(e, ge.detectContext()));
2069
2069
  if (P.isAbsolute(i)) return i;
2070
2070
  if (i.startsWith("cwd:")) {
2071
2071
  const l = i.slice(4);
2072
2072
  return P.resolve(process.cwd(), l);
2073
2073
  }
2074
- const a = Zt() || t;
2074
+ const a = Kt() || t;
2075
2075
  return a ? P.resolve(P.dirname(a), i) : (console.warn(`Warning: Could not detect entry point for log path resolution. Using process.cwd() as fallback. Path: ${i}`), P.resolve(process.cwd(), i));
2076
2076
  }
2077
- const { path: r, relativeTo: n = "entry", basePath: o } = e, s = Cr(ge.substituteVariables(r, ge.detectContext()));
2077
+ const { path: r, relativeTo: n = "entry", basePath: o } = e, s = Tr(ge.substituteVariables(r, ge.detectContext()));
2078
2078
  switch (n) {
2079
2079
  case "absolute":
2080
2080
  if (o) {
@@ -2086,7 +2086,7 @@ function Te(e, t) {
2086
2086
  return P.resolve(process.cwd(), s);
2087
2087
  case "entry":
2088
2088
  default:
2089
- const i = Zt() || t;
2089
+ const i = Kt() || t;
2090
2090
  return i ? P.resolve(P.dirname(i), s) : (console.warn(`Warning: Could not detect entry point for log path resolution. Using process.cwd() as fallback. Path: ${s}`), P.resolve(process.cwd(), s));
2091
2091
  }
2092
2092
  }
@@ -2125,7 +2125,7 @@ var ge = class {
2125
2125
  isDxt: this.isDxtEnvironment(),
2126
2126
  userHome: typeof xe.homedir == "function" ? xe.homedir() : void 0,
2127
2127
  cwd: typeof process < "u" && typeof process.cwd == "function" ? process.cwd() : void 0
2128
- }, r = Zt();
2128
+ }, r = Kt();
2129
2129
  return r && (t.entryDir = P.dirname(r)), t.isDxt && (t.extensionDir = this.detectDxtExtensionDir()), this._cachedContext = t, t;
2130
2130
  }
2131
2131
  /**
@@ -2279,11 +2279,11 @@ var ge = class {
2279
2279
  this._cachedContext = null;
2280
2280
  }
2281
2281
  };
2282
- const Nt = {
2282
+ const kt = {
2283
2283
  NONE: "none",
2284
2284
  DirectParentOnly: "direct-parent-only",
2285
2285
  AllParents: "all-parents"
2286
- }, Is = O.object({
2286
+ }, Ls = O.object({
2287
2287
  sensitive: O.boolean().optional().describe("Whether this field should be marked as sensitive in DXT user_config"),
2288
2288
  localDefault: O.string().optional().describe("Default value specific to DXT sandbox environment"),
2289
2289
  type: O.enum([
@@ -2298,7 +2298,7 @@ const Nt = {
2298
2298
  max: O.number().optional().describe("Maximum value (for number type)"),
2299
2299
  default: O.any().optional().describe("DXT-specific default value (overrides localDefault if provided)"),
2300
2300
  title: O.string().optional().describe("Custom title for the user_config field")
2301
- }).strict().refine((e) => !((e.min !== void 0 || e.max !== void 0) && e.type !== "number" || e.min !== void 0 && e.max !== void 0 && e.min > e.max), { message: "Invalid dxtOptions: min/max can only be used with type 'number', and min must be <= max" }), Ns = O.object({
2301
+ }).strict().refine((e) => !((e.min !== void 0 || e.max !== void 0) && e.type !== "number" || e.min !== void 0 && e.max !== void 0 && e.min > e.max), { message: "Invalid dxtOptions: min/max can only be used with type 'number', and min must be <= max" }), Bs = O.object({
2302
2302
  name: O.string().min(1, "Flag name cannot be empty").describe("The output property name, used as a return key `{name: value}`. Must be unique."),
2303
2303
  allowLigature: O.boolean().default(!0).describe("Enable both forms of flag input, e.g., `./script.js -f=value` and `-f value`."),
2304
2304
  allowMultiple: O.boolean().default(!1).describe("Allow passing the same flag multiple times, e.g., `-f val1 -f val2` results in an array."),
@@ -2327,7 +2327,7 @@ const Nt = {
2327
2327
  validate: O.custom((e) => typeof e == "function", "Must be a validation function").optional().describe("Custom validation function for the flag's value (receives value, parsedArgs)."),
2328
2328
  enum: O.array(O.any()).optional().describe("Array of allowed values for the flag."),
2329
2329
  env: O.union([O.string(), O.array(O.string())]).optional().describe("Environment variable(s) to map to this flag. Logic: Fallback (Env -> Flag) and Sync (Flag -> Env). Precedence: Flag > Env > Default."),
2330
- dxtOptions: Is.optional().describe("DXT-specific configuration options for enhanced DXT manifest generation"),
2330
+ dxtOptions: Ls.optional().describe("DXT-specific configuration options for enhanced DXT manifest generation"),
2331
2331
  dynamicRegister: O.custom((e) => typeof e == "function").optional().describe("Optional callback that can register additional flags dynamically when this flag is present."),
2332
2332
  setWorkingDirectory: O.boolean().optional().describe("If true, this flag's value becomes the effective working directory for file operations."),
2333
2333
  positional: O.number().int().positive("Positional index must be a positive integer (1, 2, 3...)").optional().describe("If set, this flag captures the Nth trailing positional argument (1-indexed). Multiple flags can have different positional values to capture multiple trailing args in order."),
@@ -2337,7 +2337,7 @@ const Nt = {
2337
2337
  const t = { ...e };
2338
2338
  return "default" in t && t.default !== void 0 && !("defaultValue" in t) && (t.defaultValue = t.default), "required" in t && t.required !== void 0 && !("mandatory" in t) && (t.mandatory = t.required), t;
2339
2339
  });
2340
- function St(e) {
2340
+ function $t(e) {
2341
2341
  if (e && typeof e == "object" && e._def) return "object";
2342
2342
  if (typeof e == "function")
2343
2343
  return e === String ? "string" : e === Number ? "number" : e === Boolean ? "boolean" : e === Array ? "array" : e === Object ? "object" : "string";
@@ -2357,7 +2357,7 @@ function St(e) {
2357
2357
  }
2358
2358
  return "string";
2359
2359
  }
2360
- const kt = {
2360
+ const Lt = {
2361
2361
  successError: () => O.object({
2362
2362
  success: O.boolean().describe("Whether the operation was successful"),
2363
2363
  message: O.string().optional().describe("Optional message about the operation"),
@@ -2389,10 +2389,10 @@ const kt = {
2389
2389
  command: O.string().optional().describe("The command that was executed")
2390
2390
  })
2391
2391
  };
2392
- function Oe(e) {
2393
- return typeof e == "string" && e in kt ? kt[e]() : e && typeof e == "object" && "_def" in e ? e : e && typeof e == "object" ? O.object(e) : kt.successError();
2392
+ function De(e) {
2393
+ return typeof e == "string" && e in Lt ? Lt[e]() : e && typeof e == "object" && "_def" in e ? e : e && typeof e == "object" ? O.object(e) : Lt.successError();
2394
2394
  }
2395
- var Mr = class {
2395
+ var _r = class {
2396
2396
  constructor(e, t, r) {
2397
2397
  this.argParserInstance = e, this.extractMcpServerInfo = t, this.handleExit = r;
2398
2398
  }
@@ -2459,7 +2459,7 @@ echo "Mock DXT build script for ${o.name}"`;
2459
2459
  static isTestMode() {
2460
2460
  return process.env.NODE_ENV === "test" || process.argv[0]?.includes("vitest") || process.argv[1]?.includes("vitest") || process.argv[1]?.includes("tinypool");
2461
2461
  }
2462
- }, ks = class {
2462
+ }, Rs = class {
2463
2463
  constructor(e) {
2464
2464
  this.argParserInstance = e;
2465
2465
  }
@@ -2482,7 +2482,7 @@ echo "Mock DXT build script for ${o.name}"`;
2482
2482
  */
2483
2483
  async handleBuildDxtFlag(e, t) {
2484
2484
  try {
2485
- if (Mr.isTestMode()) return await new Mr(this.argParserInstance, () => this.extractMcpServerInfo(), (s, i, a, l) => this._handleExit(s, i, a, l)).handleTestModeDxtGeneration(e, t);
2485
+ if (_r.isTestMode()) return await new _r(this.argParserInstance, () => this.extractMcpServerInfo(), (s, i, a, l) => this._handleExit(s, i, a, l)).handleTestModeDxtGeneration(e, t);
2486
2486
  const r = e.includes("--s-with-node-modules");
2487
2487
  if (r) {
2488
2488
  console.log(E.yellow("🗂️ --s-with-node-modules detected: will include node_modules in bundle"));
@@ -2904,7 +2904,7 @@ export default ${JSON.stringify(y, null, 2)};
2904
2904
  const h = this.argParserInstance.flags, v = {}, b = [];
2905
2905
  for (const g of h)
2906
2906
  g.name === "help" || g.name.startsWith("s-") || (v[g.name] = {
2907
- type: St(g.type),
2907
+ type: $t(g.type),
2908
2908
  description: g.description || `${g.name} parameter`
2909
2909
  }, g.enum && (v[g.name].enum = g.enum), g.defaultValue !== void 0 && typeof g.defaultValue != "function" && (v[g.name].default = g.defaultValue), g.mandatory && b.push(g.name));
2910
2910
  l = [{
@@ -3114,7 +3114,7 @@ export default ${JSON.stringify(y, null, 2)};
3114
3114
  resolveModulePath(e, t) {
3115
3115
  try {
3116
3116
  process.env.DEBUG && console.log(` <${E.gray("module-resolve")}> Resolving '${E.green(e)}' from '${E.gray(t)}'`);
3117
- const r = Nn(t);
3117
+ const r = Bn(t);
3118
3118
  if (!r?.config.compilerOptions?.paths)
3119
3119
  process.env.DEBUG && console.log(` <${E.gray("ts-paths")}> No tsconfig or paths found for '${t}'`);
3120
3120
  else {
@@ -3122,7 +3122,7 @@ export default ${JSON.stringify(y, null, 2)};
3122
3122
  const i = typeof process < "u" ? process.cwd() : "/test";
3123
3123
  console.log(` <${E.gray("ts-paths")}> Found tsconfig at '${P.relative(i, r.path)}' with paths:`, Object.keys(r.config.compilerOptions.paths));
3124
3124
  }
3125
- const s = In(r);
3125
+ const s = Ln(r);
3126
3126
  if (!s || typeof s != "function")
3127
3127
  process.env.DEBUG && console.log(` <${E.gray("ts-paths")}> Failed to create paths matcher or matcher is not a function`);
3128
3128
  else {
@@ -3199,7 +3199,7 @@ export default ${JSON.stringify(y, null, 2)};
3199
3199
  }
3200
3200
  return null;
3201
3201
  }
3202
- }, Pr = ye("MCP Notifications"), hn = class {
3202
+ }, Or = ye("MCP Notifications"), yn = class {
3203
3203
  constructor() {
3204
3204
  this.clients = /* @__PURE__ */ new Map(), this.globalListeners = /* @__PURE__ */ new Set(), this.changeHistory = [], this.maxHistorySize = 100;
3205
3205
  }
@@ -3274,7 +3274,7 @@ export default ${JSON.stringify(y, null, 2)};
3274
3274
  for (const o of this.globalListeners) try {
3275
3275
  o(n);
3276
3276
  } catch (s) {
3277
- Pr.error("Error in global change listener:", s);
3277
+ Or.error("Error in global change listener:", s);
3278
3278
  }
3279
3279
  for (const o of this.clients.values()) o.subscriptions.has(e) && this.sendNotificationToClient(o, e);
3280
3280
  }
@@ -3328,7 +3328,7 @@ export default ${JSON.stringify(y, null, 2)};
3328
3328
  try {
3329
3329
  e.connection && typeof e.connection.sendNotification == "function" && e.connection.sendNotification(`notifications/${t}/list_changed`, {});
3330
3330
  } catch (r) {
3331
- Pr.error(`Error sending notification to client ${e.clientId}:`, r), this.removeClient(e.clientId);
3331
+ Or.error(`Error sending notification to client ${e.clientId}:`, r), this.removeClient(e.clientId);
3332
3332
  }
3333
3333
  }
3334
3334
  /**
@@ -3350,8 +3350,8 @@ export default ${JSON.stringify(y, null, 2)};
3350
3350
  this.clients.clear(), this.globalListeners.clear(), this.changeHistory = [];
3351
3351
  }
3352
3352
  };
3353
- const Po = new hn();
3354
- var Ls = ye("MCP Prompts"), Bs = class {
3353
+ const Po = new yn();
3354
+ var Ws = ye("MCP Prompts"), Vs = class {
3355
3355
  constructor() {
3356
3356
  this.prompts = /* @__PURE__ */ new Map(), this.changeListeners = /* @__PURE__ */ new Set();
3357
3357
  }
@@ -3443,12 +3443,12 @@ var Ls = ye("MCP Prompts"), Bs = class {
3443
3443
  for (const e of this.changeListeners) try {
3444
3444
  e();
3445
3445
  } catch (t) {
3446
- Ls.error("Error in prompt change listener:", t);
3446
+ Ws.error("Error in prompt change listener:", t);
3447
3447
  }
3448
3448
  }
3449
- }, Rs = /* @__PURE__ */ Tt(((e, t) => {
3449
+ }, Us = /* @__PURE__ */ _t(((e, t) => {
3450
3450
  t.exports = {};
3451
- })), Ws = ye("MCP Resources"), Tr = class {
3451
+ })), Hs = ye("MCP Resources"), Dr = class {
3452
3452
  constructor(e) {
3453
3453
  this.paramNames = (e.match(/\{([^}]+)\}/g) || []).map((r) => r.slice(1, -1));
3454
3454
  const t = e.replace(/\{[^}]+\}/g, "([^/]+)");
@@ -3476,7 +3476,7 @@ var Ls = ye("MCP Prompts"), Bs = class {
3476
3476
  getParameterNames() {
3477
3477
  return [...this.paramNames];
3478
3478
  }
3479
- }, Vs = class {
3479
+ }, Gs = class {
3480
3480
  constructor() {
3481
3481
  this.resources = /* @__PURE__ */ new Map(), this.changeListeners = /* @__PURE__ */ new Set();
3482
3482
  }
@@ -3519,7 +3519,7 @@ var Ls = ye("MCP Prompts"), Bs = class {
3519
3519
  */
3520
3520
  findResourceForUri(e) {
3521
3521
  for (const t of this.resources.values()) {
3522
- const r = new Tr(t.config.uriTemplate).parse(e);
3522
+ const r = new Dr(t.config.uriTemplate).parse(e);
3523
3523
  if (r !== null) return {
3524
3524
  config: t.config,
3525
3525
  params: r
@@ -3561,7 +3561,7 @@ var Ls = ye("MCP Prompts"), Bs = class {
3561
3561
  if (typeof e.handler != "function") throw new Error("Resource handler is required and must be a function");
3562
3562
  if (this.resources.has(e.name)) throw new Error(`Resource with name '${e.name}' already exists`);
3563
3563
  try {
3564
- new Tr(e.uriTemplate);
3564
+ new Dr(e.uriTemplate);
3565
3565
  } catch (t) {
3566
3566
  throw new Error(`Invalid URI template '${e.uriTemplate}': ${t instanceof Error ? t.message : String(t)}`);
3567
3567
  }
@@ -3573,7 +3573,7 @@ var Ls = ye("MCP Prompts"), Bs = class {
3573
3573
  for (const e of this.changeListeners) try {
3574
3574
  e();
3575
3575
  } catch (t) {
3576
- Ws.error("Error in resource change listener:", t);
3576
+ Hs.error("Error in resource change listener:", t);
3577
3577
  }
3578
3578
  }
3579
3579
  }, Ne = () => {
@@ -3618,7 +3618,7 @@ const re = {
3618
3618
  return Ne();
3619
3619
  }
3620
3620
  };
3621
- var Us = class Xt {
3621
+ var zs = class Qt {
3622
3622
  #e = /* @__PURE__ */ new Map();
3623
3623
  #n = /* @__PURE__ */ new Map();
3624
3624
  #r;
@@ -3641,7 +3641,7 @@ var Us = class Xt {
3641
3641
  * @internal
3642
3642
  */
3643
3643
  static _safeFlag(t) {
3644
- const r = Ns.parse(t);
3644
+ const r = Bs.parse(t);
3645
3645
  let n;
3646
3646
  const o = r.type;
3647
3647
  if (typeof o == "string") switch (o.toLowerCase()) {
@@ -3727,7 +3727,7 @@ var Us = class Xt {
3727
3727
  * ```
3728
3728
  */
3729
3729
  addFlag(t) {
3730
- const r = Xt._safeFlag(t);
3730
+ const r = Qt._safeFlag(t);
3731
3731
  if (this.#e.has(r.name)) {
3732
3732
  if (this.#r) throw new Error(`FlagManager: Flag '${r.name}' already exists.`);
3733
3733
  return console.warn(`Warning: FlagManager: Flag '${r.name}' already exists. Duplicate not added.`), this;
@@ -3840,10 +3840,10 @@ var Us = class Xt {
3840
3840
  * ```
3841
3841
  */
3842
3842
  getCollisionsForFlag(t) {
3843
- const r = Xt._safeFlag(t);
3843
+ const r = Qt._safeFlag(t);
3844
3844
  return this.#c(r);
3845
3845
  }
3846
- }, pn = /* @__PURE__ */ Tt(((e, t) => {
3846
+ }, vn = /* @__PURE__ */ _t(((e, t) => {
3847
3847
  var r = String, n = function() {
3848
3848
  return {
3849
3849
  isColorSupported: !1,
@@ -3891,7 +3891,7 @@ var Us = class Xt {
3891
3891
  };
3892
3892
  };
3893
3893
  t.exports = n(), t.exports.createColors = n;
3894
- })), mn = /* @__PURE__ */ Tt(((e, t) => {
3894
+ })), wn = /* @__PURE__ */ _t(((e, t) => {
3895
3895
  var r = "\x1B", n = `${r}[`, o = "\x07", s = {
3896
3896
  to(l, c) {
3897
3897
  return c ? `${n}${c + 1};${l + 1}H` : `${n}${l + 1}G`;
@@ -3933,19 +3933,19 @@ var Us = class Xt {
3933
3933
  erase: a,
3934
3934
  beep: o
3935
3935
  };
3936
- })), $t = /* @__PURE__ */ Gr(pn(), 1), we = mn(), Hs = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, Gs = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, zs = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, Lt = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, ft = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, dt = /\t{1,1000}/y, Bt = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "uy"), ht = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, Js = new RegExp("\\p{M}+", "gu"), qs = {
3936
+ })), Et = /* @__PURE__ */ Yr(vn(), 1), we = wn(), Js = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, qs = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, Ys = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, Bt = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, ft = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, dt = /\t{1,1000}/y, Rt = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "uy"), ht = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, Zs = new RegExp("\\p{M}+", "gu"), Xs = {
3937
3937
  limit: 1 / 0,
3938
3938
  ellipsis: ""
3939
- }, gn = (e, t = {}, r = {}) => {
3940
- const n = t.limit ?? 1 / 0, o = t.ellipsis ?? "", s = t?.ellipsisWidth ?? (o ? gn(o, qs, r).width : 0), i = r.ansiWidth ?? 0, a = r.controlWidth ?? 0, l = r.tabWidth ?? 8, c = r.ambiguousWidth ?? 1, d = r.emojiWidth ?? 2, u = r.fullWidthWidth ?? 2, f = r.regularWidth ?? 1, x = r.wideWidth ?? 2;
3939
+ }, bn = (e, t = {}, r = {}) => {
3940
+ const n = t.limit ?? 1 / 0, o = t.ellipsis ?? "", s = t?.ellipsisWidth ?? (o ? bn(o, Xs, r).width : 0), i = r.ansiWidth ?? 0, a = r.controlWidth ?? 0, l = r.tabWidth ?? 8, c = r.ambiguousWidth ?? 1, d = r.emojiWidth ?? 2, u = r.fullWidthWidth ?? 2, f = r.regularWidth ?? 1, x = r.wideWidth ?? 2;
3941
3941
  let y = 0, h = 0, v = e.length, b = 0, g = !1, w = v, $ = Math.max(0, n - s), I = 0, j = 0, S = 0, M = 0;
3942
3942
  e: for (; ; ) {
3943
3943
  if (j > I || h >= v && h > y) {
3944
3944
  const H = e.slice(I, j) || e.slice(y, h);
3945
3945
  b = 0;
3946
- for (const B of H.replaceAll(Js, "")) {
3946
+ for (const B of H.replaceAll(Zs, "")) {
3947
3947
  const V = B.codePointAt(0) || 0;
3948
- if (Gs(V) ? M = u : zs(V) ? M = x : c !== f && Hs(V) ? M = c : M = f, S + M > $ && (w = Math.min(w, Math.max(I, y) + b)), S + M > n) {
3948
+ if (qs(V) ? M = u : Ys(V) ? M = x : c !== f && Js(V) ? M = c : M = f, S + M > $ && (w = Math.min(w, Math.max(I, y) + b)), S + M > n) {
3949
3949
  g = !0;
3950
3950
  break e;
3951
3951
  }
@@ -3962,12 +3962,12 @@ var Us = class Xt {
3962
3962
  S += M, I = y, j = h, h = y = ht.lastIndex;
3963
3963
  continue;
3964
3964
  }
3965
- if (Lt.lastIndex = h, Lt.test(e)) {
3965
+ if (Bt.lastIndex = h, Bt.test(e)) {
3966
3966
  if (S + i > $ && (w = Math.min(w, h)), S + i > n) {
3967
3967
  g = !0;
3968
3968
  break;
3969
3969
  }
3970
- S += i, I = y, j = h, h = y = Lt.lastIndex;
3970
+ S += i, I = y, j = h, h = y = Bt.lastIndex;
3971
3971
  continue;
3972
3972
  }
3973
3973
  if (ft.lastIndex = h, ft.test(e)) {
@@ -3986,12 +3986,12 @@ var Us = class Xt {
3986
3986
  S += M, I = y, j = h, h = y = dt.lastIndex;
3987
3987
  continue;
3988
3988
  }
3989
- if (Bt.lastIndex = h, Bt.test(e)) {
3989
+ if (Rt.lastIndex = h, Rt.test(e)) {
3990
3990
  if (S + d > $ && (w = Math.min(w, h)), S + d > n) {
3991
3991
  g = !0;
3992
3992
  break;
3993
3993
  }
3994
- S += d, I = y, j = h, h = y = Bt.lastIndex;
3994
+ S += d, I = y, j = h, h = y = Rt.lastIndex;
3995
3995
  continue;
3996
3996
  }
3997
3997
  h += 1;
@@ -4002,11 +4002,11 @@ var Us = class Xt {
4002
4002
  truncated: g,
4003
4003
  ellipsed: g && n >= s
4004
4004
  };
4005
- }, Ys = {
4005
+ }, Ks = {
4006
4006
  limit: 1 / 0,
4007
4007
  ellipsis: "",
4008
4008
  ellipsisWidth: 0
4009
- }, et = (e, t = {}) => gn(e, Ys, t).width, jt = "\x1B", yn = "›", Zs = 39, fr = "\x07", vn = "[", Xs = "]", wn = "m", dr = `${Xs}8;;`, _r = new RegExp(`(?:\\${vn}(?<code>\\d+)m|\\${dr}(?<uri>.*)${fr})`, "y"), Ks = (e) => {
4009
+ }, et = (e, t = {}) => bn(e, Ks, t).width, Ft = "\x1B", xn = "›", Qs = 39, pr = "\x07", Sn = "[", ei = "]", $n = "m", mr = `${ei}8;;`, Ar = new RegExp(`(?:\\${Sn}(?<code>\\d+)m|\\${mr}(?<uri>.*)${pr})`, "y"), ti = (e) => {
4010
4010
  if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
4011
4011
  if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
4012
4012
  if (e === 1 || e === 2) return 22;
@@ -4016,71 +4016,71 @@ var Us = class Xt {
4016
4016
  if (e === 8) return 28;
4017
4017
  if (e === 9) return 29;
4018
4018
  if (e === 0) return 0;
4019
- }, Or = (e) => `${jt}${vn}${e}${wn}`, Dr = (e) => `${jt}${dr}${e}${fr}`, Qs = (e) => e.map((t) => et(t)), Rt = (e, t, r) => {
4019
+ }, jr = (e) => `${Ft}${Sn}${e}${$n}`, Fr = (e) => `${Ft}${mr}${e}${pr}`, ri = (e) => e.map((t) => et(t)), Wt = (e, t, r) => {
4020
4020
  const n = t[Symbol.iterator]();
4021
4021
  let o = !1, s = !1, i = e.at(-1), a = i === void 0 ? 0 : et(i), l = n.next(), c = n.next(), d = 0;
4022
4022
  for (; !l.done; ) {
4023
4023
  const u = l.value, f = et(u);
4024
- a + f <= r ? e[e.length - 1] += u : (e.push(u), a = 0), (u === jt || u === yn) && (o = !0, s = t.startsWith(dr, d + 1)), o ? s ? u === fr && (o = !1, s = !1) : u === wn && (o = !1) : (a += f, a === r && !c.done && (e.push(""), a = 0)), l = c, c = n.next(), d += u.length;
4024
+ a + f <= r ? e[e.length - 1] += u : (e.push(u), a = 0), (u === Ft || u === xn) && (o = !0, s = t.startsWith(mr, d + 1)), o ? s ? u === pr && (o = !1, s = !1) : u === $n && (o = !1) : (a += f, a === r && !c.done && (e.push(""), a = 0)), l = c, c = n.next(), d += u.length;
4025
4025
  }
4026
4026
  i = e.at(-1), !a && i !== void 0 && i.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
4027
- }, ei = (e) => {
4027
+ }, ni = (e) => {
4028
4028
  const t = e.split(" ");
4029
4029
  let r = t.length;
4030
4030
  for (; r > 0 && !(et(t[r - 1]) > 0); ) r--;
4031
4031
  return r === t.length ? e : t.slice(0, r).join(" ") + t.slice(r).join("");
4032
- }, ti = (e, t, r = {}) => {
4032
+ }, si = (e, t, r = {}) => {
4033
4033
  if (r.trim !== !1 && e.trim() === "") return "";
4034
4034
  let n = "", o, s;
4035
- const i = e.split(" "), a = Qs(i);
4035
+ const i = e.split(" "), a = ri(i);
4036
4036
  let l = [""];
4037
4037
  for (const [y, h] of i.entries()) {
4038
4038
  r.trim !== !1 && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
4039
4039
  let v = et(l.at(-1) ?? "");
4040
4040
  if (y !== 0 && (v >= t && (r.wordWrap === !1 || r.trim === !1) && (l.push(""), v = 0), (v > 0 || r.trim === !1) && (l[l.length - 1] += " ", v++)), r.hard && a[y] > t) {
4041
4041
  const b = t - v, g = 1 + Math.floor((a[y] - b - 1) / t);
4042
- Math.floor((a[y] - 1) / t) < g && l.push(""), Rt(l, h, t);
4042
+ Math.floor((a[y] - 1) / t) < g && l.push(""), Wt(l, h, t);
4043
4043
  continue;
4044
4044
  }
4045
4045
  if (v + a[y] > t && v > 0 && a[y] > 0) {
4046
4046
  if (r.wordWrap === !1 && v < t) {
4047
- Rt(l, h, t);
4047
+ Wt(l, h, t);
4048
4048
  continue;
4049
4049
  }
4050
4050
  l.push("");
4051
4051
  }
4052
4052
  if (v + a[y] > t && r.wordWrap === !1) {
4053
- Rt(l, h, t);
4053
+ Wt(l, h, t);
4054
4054
  continue;
4055
4055
  }
4056
4056
  l[l.length - 1] += h;
4057
4057
  }
4058
- r.trim !== !1 && (l = l.map((y) => ei(y)));
4058
+ r.trim !== !1 && (l = l.map((y) => ni(y)));
4059
4059
  const c = l.join(`
4060
4060
  `), d = c[Symbol.iterator]();
4061
4061
  let u = d.next(), f = d.next(), x = 0;
4062
4062
  for (; !u.done; ) {
4063
4063
  const y = u.value, h = f.value;
4064
- if (n += y, y === jt || y === yn) {
4065
- _r.lastIndex = x + 1;
4066
- const b = _r.exec(c)?.groups;
4064
+ if (n += y, y === Ft || y === xn) {
4065
+ Ar.lastIndex = x + 1;
4066
+ const b = Ar.exec(c)?.groups;
4067
4067
  if (b?.code !== void 0) {
4068
4068
  const g = Number.parseFloat(b.code);
4069
- o = g === Zs ? void 0 : g;
4069
+ o = g === Qs ? void 0 : g;
4070
4070
  } else b?.uri !== void 0 && (s = b.uri.length === 0 ? void 0 : b.uri);
4071
4071
  }
4072
- const v = o ? Ks(o) : void 0;
4072
+ const v = o ? ti(o) : void 0;
4073
4073
  h === `
4074
- ` ? (s && (n += Dr("")), o && v && (n += Or(v))) : y === `
4075
- ` && (o && v && (n += Or(o)), s && (n += Dr(s))), x += y.length, u = f, f = d.next();
4074
+ ` ? (s && (n += Fr("")), o && v && (n += jr(v))) : y === `
4075
+ ` && (o && v && (n += jr(o)), s && (n += Fr(s))), x += y.length, u = f, f = d.next();
4076
4076
  }
4077
4077
  return n;
4078
4078
  };
4079
- function Kt(e, t, r) {
4079
+ function er(e, t, r) {
4080
4080
  return String(e).normalize().replaceAll(`\r
4081
4081
  `, `
4082
4082
  `).split(`
4083
- `).map((n) => ti(n, t, r)).join(`
4083
+ `).map((n) => si(n, t, r)).join(`
4084
4084
  `);
4085
4085
  }
4086
4086
  var Be = {
@@ -4107,12 +4107,12 @@ var Be = {
4107
4107
  },
4108
4108
  withGuide: !0
4109
4109
  };
4110
- function bn(e, t) {
4110
+ function En(e, t) {
4111
4111
  if (typeof e == "string") return Be.aliases.get(e) === t;
4112
- for (const r of e) if (r !== void 0 && bn(r, t)) return !0;
4112
+ for (const r of e) if (r !== void 0 && En(r, t)) return !0;
4113
4113
  return !1;
4114
4114
  }
4115
- function ri(e, t) {
4115
+ function ii(e, t) {
4116
4116
  if (e === t) return;
4117
4117
  const r = e.split(`
4118
4118
  `), n = t.split(`
@@ -4125,17 +4125,17 @@ function ri(e, t) {
4125
4125
  numLines: o
4126
4126
  };
4127
4127
  }
4128
- var To = globalThis.process.platform.startsWith("win"), Qt = /* @__PURE__ */ Symbol("clack:cancel");
4129
- function ni(e) {
4130
- return e === Qt;
4128
+ var To = globalThis.process.platform.startsWith("win"), tr = /* @__PURE__ */ Symbol("clack:cancel");
4129
+ function pt(e) {
4130
+ return e === tr;
4131
4131
  }
4132
- function pt(e, t) {
4132
+ function mt(e, t) {
4133
4133
  const r = e;
4134
4134
  r.isTTY && r.setRawMode(t);
4135
4135
  }
4136
- var xn = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80, Sn = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
4136
+ var Cn = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80, Mn = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
4137
4137
  function Re(e, t, r, n = r) {
4138
- return Kt(t, xn(e ?? Vr) - r.length, {
4138
+ return er(t, Cn(e ?? zr) - r.length, {
4139
4139
  hard: !0,
4140
4140
  trim: !1
4141
4141
  }).split(`
@@ -4158,7 +4158,7 @@ var st = class {
4158
4158
  value;
4159
4159
  userInput = "";
4160
4160
  constructor(e, t = !0) {
4161
- const { input: r = kn, output: n = Vr, render: o, signal: s, ...i } = e;
4161
+ const { input: r = Rn, output: n = zr, render: o, signal: s, ...i } = e;
4162
4162
  this.opts = i, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = o.bind(this), this._track = t, this._abortSignal = s, this.input = r, this.output = n;
4163
4163
  }
4164
4164
  unsubscribe() {
@@ -4185,21 +4185,21 @@ var st = class {
4185
4185
  prompt() {
4186
4186
  return new Promise((e) => {
4187
4187
  if (this._abortSignal) {
4188
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(Qt);
4188
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(tr);
4189
4189
  this._abortSignal.addEventListener("abort", () => {
4190
4190
  this.state = "cancel", this.close();
4191
4191
  }, { once: !0 });
4192
4192
  }
4193
- this.rl = Ln.createInterface({
4193
+ this.rl = Wn.createInterface({
4194
4194
  input: this.input,
4195
4195
  tabSize: 2,
4196
4196
  prompt: "",
4197
4197
  escapeCodeTimeout: 50,
4198
4198
  terminal: !0
4199
- }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), pt(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
4200
- this.output.write(we.cursor.show), this.output.off("resize", this.render), pt(this.input, !1), e(this.value);
4199
+ }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), mt(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
4200
+ this.output.write(we.cursor.show), this.output.off("resize", this.render), mt(this.input, !1), e(this.value);
4201
4201
  }), this.once("cancel", () => {
4202
- this.output.write(we.cursor.show), this.output.off("resize", this.render), pt(this.input, !1), e(Qt);
4202
+ this.output.write(we.cursor.show), this.output.off("resize", this.render), mt(this.input, !1), e(tr);
4203
4203
  });
4204
4204
  });
4205
4205
  }
@@ -4229,7 +4229,7 @@ var st = class {
4229
4229
  }
4230
4230
  this.state !== "error" && (this.state = "submit");
4231
4231
  }
4232
- bn([
4232
+ En([
4233
4233
  e,
4234
4234
  t?.name,
4235
4235
  t?.sequence
@@ -4237,10 +4237,10 @@ var st = class {
4237
4237
  }
4238
4238
  close() {
4239
4239
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
4240
- `), pt(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
4240
+ `), mt(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
4241
4241
  }
4242
4242
  restoreCursor() {
4243
- const e = Kt(this._prevFrame, process.stdout.columns, {
4243
+ const e = er(this._prevFrame, process.stdout.columns, {
4244
4244
  hard: !0,
4245
4245
  trim: !1
4246
4246
  }).split(`
@@ -4248,14 +4248,14 @@ var st = class {
4248
4248
  this.output.write(we.cursor.move(-999, e * -1));
4249
4249
  }
4250
4250
  render() {
4251
- const e = Kt(this._render(this) ?? "", process.stdout.columns, {
4251
+ const e = er(this._render(this) ?? "", process.stdout.columns, {
4252
4252
  hard: !0,
4253
4253
  trim: !1
4254
4254
  });
4255
4255
  if (e !== this._prevFrame) {
4256
4256
  if (this.state === "initial") this.output.write(we.cursor.hide);
4257
4257
  else {
4258
- const t = ri(this._prevFrame, e), r = Sn(this.output);
4258
+ const t = ii(this._prevFrame, e), r = Mn(this.output);
4259
4259
  if (this.restoreCursor(), t) {
4260
4260
  const n = Math.max(0, t.numLinesAfter - r), o = Math.max(0, t.numLinesBefore - r);
4261
4261
  let s = t.lines.find((i) => i >= n);
@@ -4289,7 +4289,7 @@ var st = class {
4289
4289
  }
4290
4290
  }
4291
4291
  };
4292
- var si = class extends st {
4292
+ var oi = class extends st {
4293
4293
  get cursor() {
4294
4294
  return this.value ? 0 : 1;
4295
4295
  }
@@ -4310,7 +4310,7 @@ function Fe(e, t, r) {
4310
4310
  const n = e + t, o = Math.max(r.length - 1, 0), s = n < 0 ? o : n > o ? 0 : n;
4311
4311
  return r[s].disabled ? Fe(s, t < 0 ? -1 : 1, r) : s;
4312
4312
  }
4313
- var ii = class extends st {
4313
+ var ai = class extends st {
4314
4314
  options;
4315
4315
  cursor = 0;
4316
4316
  get _value() {
@@ -4351,7 +4351,7 @@ var ii = class extends st {
4351
4351
  }
4352
4352
  });
4353
4353
  }
4354
- }, oi = class extends st {
4354
+ }, li = class extends st {
4355
4355
  _mask = "•";
4356
4356
  get cursor() {
4357
4357
  return this._cursor;
@@ -4362,9 +4362,9 @@ var ii = class extends st {
4362
4362
  get userInputWithCursor() {
4363
4363
  if (this.state === "submit" || this.state === "cancel") return this.masked;
4364
4364
  const e = this.userInput;
4365
- if (this.cursor >= e.length) return `${this.masked}${$t.default.inverse($t.default.hidden("_"))}`;
4365
+ if (this.cursor >= e.length) return `${this.masked}${Et.default.inverse(Et.default.hidden("_"))}`;
4366
4366
  const t = this.masked, r = t.slice(0, this.cursor), n = t.slice(this.cursor);
4367
- return `${r}${$t.default.inverse(n[0])}${n.slice(1)}`;
4367
+ return `${r}${Et.default.inverse(n[0])}${n.slice(1)}`;
4368
4368
  }
4369
4369
  clear() {
4370
4370
  this._clearUserInput();
@@ -4374,7 +4374,7 @@ var ii = class extends st {
4374
4374
  this._setValue(r);
4375
4375
  });
4376
4376
  }
4377
- }, ai = class extends st {
4377
+ }, ci = class extends st {
4378
4378
  options;
4379
4379
  cursor = 0;
4380
4380
  get _selectedValue() {
@@ -4401,13 +4401,13 @@ var ii = class extends st {
4401
4401
  });
4402
4402
  }
4403
4403
  };
4404
- var li = class extends st {
4404
+ var ui = class extends st {
4405
4405
  get userInputWithCursor() {
4406
4406
  if (this.state === "submit") return this.userInput;
4407
4407
  const e = this.userInput;
4408
4408
  if (this.cursor >= e.length) return `${this.userInput}█`;
4409
4409
  const t = e.slice(0, this.cursor), [r, ...n] = e.slice(this.cursor);
4410
- return `${t}${$t.default.inverse(r)}${n.join("")}`;
4410
+ return `${t}${Et.default.inverse(r)}${n.join("")}`;
4411
4411
  }
4412
4412
  get cursor() {
4413
4413
  return this._cursor;
@@ -4422,24 +4422,24 @@ var li = class extends st {
4422
4422
  this.value || (this.value = e.defaultValue), this.value === void 0 && (this.value = "");
4423
4423
  });
4424
4424
  }
4425
- }, C = /* @__PURE__ */ Gr(pn(), 1), _o = mn(), Oo = Rs();
4426
- function ci() {
4425
+ }, C = /* @__PURE__ */ Yr(vn(), 1), _o = wn(), Oo = Us();
4426
+ function fi() {
4427
4427
  return ve.platform !== "win32" ? ve.env.TERM !== "linux" : !!ve.env.CI || !!ve.env.WT_SESSION || !!ve.env.TERMINUS_SUBLIME || ve.env.ConEmuTask === "{cmd::Cmder}" || ve.env.TERM_PROGRAM === "Terminus-Sublime" || ve.env.TERM_PROGRAM === "vscode" || ve.env.TERM === "xterm-256color" || ve.env.TERM === "alacritty" || ve.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
4428
4428
  }
4429
- var ui = ci();
4430
- var X = (e, t) => ui ? e : t, fi = X("◆", "*"), di = X("■", "x"), hi = X("▲", "x"), $n = X("◇", "o"), Do = X("┌", "T"), Y = X("│", "|"), Me = X("└", "—"), Ao = X("┐", "T"), jo = X("┘", "—"), er = X("●", ">"), Pt = X("○", " "), pi = X("◻", "[•]"), Ar = X("◼", "[+]"), jr = X("◻", "[ ]"), mi = X("▪", "•"), Fo = X("─", "-"), Io = X("╮", "+"), No = X("├", "+"), ko = X("╯", "+"), Lo = X("╰", "+"), Bo = X("╭", "+"), gi = X("●", "•"), yi = X("◆", "*"), vi = X("▲", "!"), wi = X("■", "x"), it = (e) => {
4429
+ var di = fi();
4430
+ var X = (e, t) => di ? e : t, hi = X("◆", "*"), pi = X("■", "x"), mi = X("▲", "x"), Pn = X("◇", "o"), Do = X("┌", "T"), Y = X("│", "|"), Pe = X("└", "—"), Ao = X("┐", "T"), jo = X("┘", "—"), rr = X("●", ">"), Tt = X("○", " "), gi = X("◻", "[•]"), Ir = X("◼", "[+]"), Nr = X("◻", "[ ]"), yi = X("▪", "•"), Fo = X("─", "-"), Io = X("╮", "+"), No = X("├", "+"), ko = X("╯", "+"), Lo = X("╰", "+"), Bo = X("╭", "+"), vi = X("●", "•"), wi = X("◆", "*"), bi = X("▲", "!"), xi = X("■", "x"), it = (e) => {
4431
4431
  switch (e) {
4432
4432
  case "initial":
4433
4433
  case "active":
4434
- return C.default.cyan(fi);
4434
+ return C.default.cyan(hi);
4435
4435
  case "cancel":
4436
- return C.default.red(di);
4436
+ return C.default.red(pi);
4437
4437
  case "error":
4438
- return C.default.yellow(hi);
4438
+ return C.default.yellow(mi);
4439
4439
  case "submit":
4440
- return C.default.green($n);
4440
+ return C.default.green(Pn);
4441
4441
  }
4442
- }, En = (e) => {
4442
+ }, Tn = (e) => {
4443
4443
  switch (e) {
4444
4444
  case "initial":
4445
4445
  case "active":
@@ -4451,19 +4451,19 @@ var X = (e, t) => ui ? e : t, fi = X("◆", "*"), di = X("■", "x"), hi = X("
4451
4451
  case "submit":
4452
4452
  return C.default.green(Y);
4453
4453
  }
4454
- }, bi = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, xi = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, Si = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, Wt = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, mt = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, gt = /\t{1,1000}/y, Vt = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "uy"), yt = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, $i = new RegExp("\\p{M}+", "gu"), Ei = {
4454
+ }, Si = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, $i = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, Ei = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, Vt = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, gt = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, yt = /\t{1,1000}/y, Ut = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "uy"), vt = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, Ci = new RegExp("\\p{M}+", "gu"), Mi = {
4455
4455
  limit: 1 / 0,
4456
4456
  ellipsis: ""
4457
- }, Cn = (e, t = {}, r = {}) => {
4458
- const n = t.limit ?? 1 / 0, o = t.ellipsis ?? "", s = t?.ellipsisWidth ?? (o ? Cn(o, Ei, r).width : 0), i = r.ansiWidth ?? 0, a = r.controlWidth ?? 0, l = r.tabWidth ?? 8, c = r.ambiguousWidth ?? 1, d = r.emojiWidth ?? 2, u = r.fullWidthWidth ?? 2, f = r.regularWidth ?? 1, x = r.wideWidth ?? 2;
4457
+ }, _n = (e, t = {}, r = {}) => {
4458
+ const n = t.limit ?? 1 / 0, o = t.ellipsis ?? "", s = t?.ellipsisWidth ?? (o ? _n(o, Mi, r).width : 0), i = r.ansiWidth ?? 0, a = r.controlWidth ?? 0, l = r.tabWidth ?? 8, c = r.ambiguousWidth ?? 1, d = r.emojiWidth ?? 2, u = r.fullWidthWidth ?? 2, f = r.regularWidth ?? 1, x = r.wideWidth ?? 2;
4459
4459
  let y = 0, h = 0, v = e.length, b = 0, g = !1, w = v, $ = Math.max(0, n - s), I = 0, j = 0, S = 0, M = 0;
4460
4460
  e: for (; ; ) {
4461
4461
  if (j > I || h >= v && h > y) {
4462
4462
  const H = e.slice(I, j) || e.slice(y, h);
4463
4463
  b = 0;
4464
- for (const B of H.replaceAll($i, "")) {
4464
+ for (const B of H.replaceAll(Ci, "")) {
4465
4465
  const V = B.codePointAt(0) || 0;
4466
- if (xi(V) ? M = u : Si(V) ? M = x : c !== f && bi(V) ? M = c : M = f, S + M > $ && (w = Math.min(w, Math.max(I, y) + b)), S + M > n) {
4466
+ if ($i(V) ? M = u : Ei(V) ? M = x : c !== f && Si(V) ? M = c : M = f, S + M > $ && (w = Math.min(w, Math.max(I, y) + b)), S + M > n) {
4467
4467
  g = !0;
4468
4468
  break e;
4469
4469
  }
@@ -4472,44 +4472,44 @@ var X = (e, t) => ui ? e : t, fi = X("◆", "*"), di = X("■", "x"), hi = X("
4472
4472
  I = j = 0;
4473
4473
  }
4474
4474
  if (h >= v) break;
4475
- if (yt.lastIndex = h, yt.test(e)) {
4476
- if (b = yt.lastIndex - h, M = b * f, S + M > $ && (w = Math.min(w, h + Math.floor(($ - S) / f))), S + M > n) {
4475
+ if (vt.lastIndex = h, vt.test(e)) {
4476
+ if (b = vt.lastIndex - h, M = b * f, S + M > $ && (w = Math.min(w, h + Math.floor(($ - S) / f))), S + M > n) {
4477
4477
  g = !0;
4478
4478
  break;
4479
4479
  }
4480
- S += M, I = y, j = h, h = y = yt.lastIndex;
4480
+ S += M, I = y, j = h, h = y = vt.lastIndex;
4481
4481
  continue;
4482
4482
  }
4483
- if (Wt.lastIndex = h, Wt.test(e)) {
4483
+ if (Vt.lastIndex = h, Vt.test(e)) {
4484
4484
  if (S + i > $ && (w = Math.min(w, h)), S + i > n) {
4485
4485
  g = !0;
4486
4486
  break;
4487
4487
  }
4488
- S += i, I = y, j = h, h = y = Wt.lastIndex;
4488
+ S += i, I = y, j = h, h = y = Vt.lastIndex;
4489
4489
  continue;
4490
4490
  }
4491
- if (mt.lastIndex = h, mt.test(e)) {
4492
- if (b = mt.lastIndex - h, M = b * a, S + M > $ && (w = Math.min(w, h + Math.floor(($ - S) / a))), S + M > n) {
4491
+ if (gt.lastIndex = h, gt.test(e)) {
4492
+ if (b = gt.lastIndex - h, M = b * a, S + M > $ && (w = Math.min(w, h + Math.floor(($ - S) / a))), S + M > n) {
4493
4493
  g = !0;
4494
4494
  break;
4495
4495
  }
4496
- S += M, I = y, j = h, h = y = mt.lastIndex;
4496
+ S += M, I = y, j = h, h = y = gt.lastIndex;
4497
4497
  continue;
4498
4498
  }
4499
- if (gt.lastIndex = h, gt.test(e)) {
4500
- if (b = gt.lastIndex - h, M = b * l, S + M > $ && (w = Math.min(w, h + Math.floor(($ - S) / l))), S + M > n) {
4499
+ if (yt.lastIndex = h, yt.test(e)) {
4500
+ if (b = yt.lastIndex - h, M = b * l, S + M > $ && (w = Math.min(w, h + Math.floor(($ - S) / l))), S + M > n) {
4501
4501
  g = !0;
4502
4502
  break;
4503
4503
  }
4504
- S += M, I = y, j = h, h = y = gt.lastIndex;
4504
+ S += M, I = y, j = h, h = y = yt.lastIndex;
4505
4505
  continue;
4506
4506
  }
4507
- if (Vt.lastIndex = h, Vt.test(e)) {
4507
+ if (Ut.lastIndex = h, Ut.test(e)) {
4508
4508
  if (S + d > $ && (w = Math.min(w, h)), S + d > n) {
4509
4509
  g = !0;
4510
4510
  break;
4511
4511
  }
4512
- S += d, I = y, j = h, h = y = Vt.lastIndex;
4512
+ S += d, I = y, j = h, h = y = Ut.lastIndex;
4513
4513
  continue;
4514
4514
  }
4515
4515
  h += 1;
@@ -4520,11 +4520,11 @@ var X = (e, t) => ui ? e : t, fi = X("◆", "*"), di = X("■", "x"), hi = X("
4520
4520
  truncated: g,
4521
4521
  ellipsed: g && n >= s
4522
4522
  };
4523
- }, Ci = {
4523
+ }, Pi = {
4524
4524
  limit: 1 / 0,
4525
4525
  ellipsis: "",
4526
4526
  ellipsisWidth: 0
4527
- }, tt = (e, t = {}) => Cn(e, Ci, t).width, Ft = "\x1B", Mn = "›", Mi = 39, hr = "\x07", Pn = "[", Pi = "]", Tn = "m", pr = `${Pi}8;;`, Fr = new RegExp(`(?:\\${Pn}(?<code>\\d+)m|\\${pr}(?<uri>.*)${hr})`, "y"), Ti = (e) => {
4527
+ }, tt = (e, t = {}) => _n(e, Pi, t).width, It = "\x1B", On = "›", Ti = 39, gr = "\x07", Dn = "[", _i = "]", An = "m", yr = `${_i}8;;`, kr = new RegExp(`(?:\\${Dn}(?<code>\\d+)m|\\${yr}(?<uri>.*)${gr})`, "y"), Oi = (e) => {
4528
4528
  if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
4529
4529
  if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
4530
4530
  if (e === 1 || e === 2) return 22;
@@ -4534,74 +4534,74 @@ var X = (e, t) => ui ? e : t, fi = X("◆", "*"), di = X("■", "x"), hi = X("
4534
4534
  if (e === 8) return 28;
4535
4535
  if (e === 9) return 29;
4536
4536
  if (e === 0) return 0;
4537
- }, Ir = (e) => `${Ft}${Pn}${e}${Tn}`, Nr = (e) => `${Ft}${pr}${e}${hr}`, _i = (e) => e.map((t) => tt(t)), Ut = (e, t, r) => {
4537
+ }, Lr = (e) => `${It}${Dn}${e}${An}`, Br = (e) => `${It}${yr}${e}${gr}`, Di = (e) => e.map((t) => tt(t)), Ht = (e, t, r) => {
4538
4538
  const n = t[Symbol.iterator]();
4539
4539
  let o = !1, s = !1, i = e.at(-1), a = i === void 0 ? 0 : tt(i), l = n.next(), c = n.next(), d = 0;
4540
4540
  for (; !l.done; ) {
4541
4541
  const u = l.value, f = tt(u);
4542
- a + f <= r ? e[e.length - 1] += u : (e.push(u), a = 0), (u === Ft || u === Mn) && (o = !0, s = t.startsWith(pr, d + 1)), o ? s ? u === hr && (o = !1, s = !1) : u === Tn && (o = !1) : (a += f, a === r && !c.done && (e.push(""), a = 0)), l = c, c = n.next(), d += u.length;
4542
+ a + f <= r ? e[e.length - 1] += u : (e.push(u), a = 0), (u === It || u === On) && (o = !0, s = t.startsWith(yr, d + 1)), o ? s ? u === gr && (o = !1, s = !1) : u === An && (o = !1) : (a += f, a === r && !c.done && (e.push(""), a = 0)), l = c, c = n.next(), d += u.length;
4543
4543
  }
4544
4544
  i = e.at(-1), !a && i !== void 0 && i.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
4545
- }, Oi = (e) => {
4545
+ }, Ai = (e) => {
4546
4546
  const t = e.split(" ");
4547
4547
  let r = t.length;
4548
4548
  for (; r > 0 && !(tt(t[r - 1]) > 0); ) r--;
4549
4549
  return r === t.length ? e : t.slice(0, r).join(" ") + t.slice(r).join("");
4550
- }, Di = (e, t, r = {}) => {
4550
+ }, ji = (e, t, r = {}) => {
4551
4551
  if (r.trim !== !1 && e.trim() === "") return "";
4552
4552
  let n = "", o, s;
4553
- const i = e.split(" "), a = _i(i);
4553
+ const i = e.split(" "), a = Di(i);
4554
4554
  let l = [""];
4555
4555
  for (const [y, h] of i.entries()) {
4556
4556
  r.trim !== !1 && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
4557
4557
  let v = tt(l.at(-1) ?? "");
4558
4558
  if (y !== 0 && (v >= t && (r.wordWrap === !1 || r.trim === !1) && (l.push(""), v = 0), (v > 0 || r.trim === !1) && (l[l.length - 1] += " ", v++)), r.hard && a[y] > t) {
4559
4559
  const b = t - v, g = 1 + Math.floor((a[y] - b - 1) / t);
4560
- Math.floor((a[y] - 1) / t) < g && l.push(""), Ut(l, h, t);
4560
+ Math.floor((a[y] - 1) / t) < g && l.push(""), Ht(l, h, t);
4561
4561
  continue;
4562
4562
  }
4563
4563
  if (v + a[y] > t && v > 0 && a[y] > 0) {
4564
4564
  if (r.wordWrap === !1 && v < t) {
4565
- Ut(l, h, t);
4565
+ Ht(l, h, t);
4566
4566
  continue;
4567
4567
  }
4568
4568
  l.push("");
4569
4569
  }
4570
4570
  if (v + a[y] > t && r.wordWrap === !1) {
4571
- Ut(l, h, t);
4571
+ Ht(l, h, t);
4572
4572
  continue;
4573
4573
  }
4574
4574
  l[l.length - 1] += h;
4575
4575
  }
4576
- r.trim !== !1 && (l = l.map((y) => Oi(y)));
4576
+ r.trim !== !1 && (l = l.map((y) => Ai(y)));
4577
4577
  const c = l.join(`
4578
4578
  `), d = c[Symbol.iterator]();
4579
4579
  let u = d.next(), f = d.next(), x = 0;
4580
4580
  for (; !u.done; ) {
4581
4581
  const y = u.value, h = f.value;
4582
- if (n += y, y === Ft || y === Mn) {
4583
- Fr.lastIndex = x + 1;
4584
- const b = Fr.exec(c)?.groups;
4582
+ if (n += y, y === It || y === On) {
4583
+ kr.lastIndex = x + 1;
4584
+ const b = kr.exec(c)?.groups;
4585
4585
  if (b?.code !== void 0) {
4586
4586
  const g = Number.parseFloat(b.code);
4587
- o = g === Mi ? void 0 : g;
4587
+ o = g === Ti ? void 0 : g;
4588
4588
  } else b?.uri !== void 0 && (s = b.uri.length === 0 ? void 0 : b.uri);
4589
4589
  }
4590
- const v = o ? Ti(o) : void 0;
4590
+ const v = o ? Oi(o) : void 0;
4591
4591
  h === `
4592
- ` ? (s && (n += Nr("")), o && v && (n += Ir(v))) : y === `
4593
- ` && (o && v && (n += Ir(o)), s && (n += Nr(s))), x += y.length, u = f, f = d.next();
4592
+ ` ? (s && (n += Br("")), o && v && (n += Lr(v))) : y === `
4593
+ ` && (o && v && (n += Lr(o)), s && (n += Br(s))), x += y.length, u = f, f = d.next();
4594
4594
  }
4595
4595
  return n;
4596
4596
  };
4597
- function Ai(e, t, r) {
4597
+ function Fi(e, t, r) {
4598
4598
  return String(e).normalize().replaceAll(`\r
4599
4599
  `, `
4600
4600
  `).split(`
4601
- `).map((n) => Di(n, t, r)).join(`
4601
+ `).map((n) => ji(n, t, r)).join(`
4602
4602
  `);
4603
4603
  }
4604
- var ji = (e, t, r, n, o) => {
4604
+ var Ii = (e, t, r, n, o) => {
4605
4605
  let s = t, i = 0;
4606
4606
  for (let a = r; a < n; a++) {
4607
4607
  const l = e[a];
@@ -4611,8 +4611,8 @@ var ji = (e, t, r, n, o) => {
4611
4611
  lineCount: s,
4612
4612
  removals: i
4613
4613
  };
4614
- }, tr = (e) => {
4615
- const { cursor: t, options: r, style: n } = e, o = e.output ?? process.stdout, s = xn(o), i = e.columnPadding ?? 0, a = e.rowPadding ?? 4, l = s - i, c = Sn(o), d = C.default.dim("..."), u = e.maxItems ?? Number.POSITIVE_INFINITY, f = Math.max(c - a, 0), x = Math.max(Math.min(u, f), 5);
4614
+ }, nr = (e) => {
4615
+ const { cursor: t, options: r, style: n } = e, o = e.output ?? process.stdout, s = Cn(o), i = e.columnPadding ?? 0, a = e.rowPadding ?? 4, l = s - i, c = Mn(o), d = C.default.dim("..."), u = e.maxItems ?? Number.POSITIVE_INFINITY, f = Math.max(c - a, 0), x = Math.max(Math.min(u, f), 5);
4616
4616
  let y = 0;
4617
4617
  t >= x - 3 && (y = Math.max(Math.min(t - x + 3, r.length - x), 0));
4618
4618
  let h = x < r.length && y > 0, v = x < r.length && y + x < r.length;
@@ -4621,7 +4621,7 @@ var ji = (e, t, r, n, o) => {
4621
4621
  h && w++, v && w++;
4622
4622
  const $ = y + (h ? 1 : 0), I = b - (v ? 1 : 0);
4623
4623
  for (let S = $; S < I; S++) {
4624
- const M = Ai(n(r[S], S === t), l, {
4624
+ const M = Fi(n(r[S], S === t), l, {
4625
4625
  hard: !0,
4626
4626
  trim: !1
4627
4627
  }).split(`
@@ -4630,7 +4630,7 @@ var ji = (e, t, r, n, o) => {
4630
4630
  }
4631
4631
  if (w > f) {
4632
4632
  let S = 0, M = 0, H = w;
4633
- const B = t - $, V = (ae, z) => ji(g, H, ae, z, f);
4633
+ const B = t - $, V = (ae, z) => Ii(g, H, ae, z, f);
4634
4634
  h ? ({ lineCount: H, removals: S } = V(0, B), H > f && ({ lineCount: H, removals: M } = V(B + 1, g.length))) : ({ lineCount: H, removals: M } = V(B + 1, g.length), H > f && ({ lineCount: H, removals: S } = V(0, B))), S > 0 && (h = !0, g.splice(0, S)), M > 0 && (v = !0, g.splice(g.length - M, M));
4635
4635
  }
4636
4636
  const j = [];
@@ -4638,9 +4638,9 @@ var ji = (e, t, r, n, o) => {
4638
4638
  for (const S of g) for (const M of S) j.push(M);
4639
4639
  return v && j.push(d), j;
4640
4640
  };
4641
- var Fi = (e) => {
4641
+ var Gt = (e) => {
4642
4642
  const t = e.active ?? "Yes", r = e.inactive ?? "No";
4643
- return new si({
4643
+ return new oi({
4644
4644
  active: t,
4645
4645
  inactive: r,
4646
4646
  signal: e.signal,
@@ -4658,14 +4658,14 @@ ${it(this.state)} ${e.message}
4658
4658
  return `${n}${C.default.gray(Y)} ${C.default.strikethrough(C.default.dim(o))}
4659
4659
  ${C.default.gray(Y)}`;
4660
4660
  default:
4661
- return `${n}${C.default.cyan(Y)} ${this.value ? `${C.default.green(er)} ${t}` : `${C.default.dim(Pt)} ${C.default.dim(t)}`} ${C.default.dim("/")} ${this.value ? `${C.default.dim(Pt)} ${C.default.dim(r)}` : `${C.default.green(er)} ${r}`}
4662
- ${C.default.cyan(Me)}
4661
+ return `${n}${C.default.cyan(Y)} ${this.value ? `${C.default.green(rr)} ${t}` : `${C.default.dim(Tt)} ${C.default.dim(t)}`} ${C.default.dim("/")} ${this.value ? `${C.default.dim(Tt)} ${C.default.dim(r)}` : `${C.default.green(rr)} ${r}`}
4662
+ ${C.default.cyan(Pe)}
4663
4663
  `;
4664
4664
  }
4665
4665
  }
4666
4666
  }).prompt();
4667
4667
  };
4668
- var De = {
4668
+ var Me = {
4669
4669
  message: (e = [], { symbol: t = C.default.gray(Y), secondarySymbol: r = C.default.gray(Y), output: n = process.stdout, spacing: o = 1, withGuide: s } = {}) => {
4670
4670
  const i = [], a = (s ?? Be.withGuide) !== !1, l = a ? r : "", c = a ? `${t} ` : "", d = a ? `${r} ` : "";
4671
4671
  for (let f = 0; f < o; f++) i.push(l);
@@ -4681,51 +4681,51 @@ var De = {
4681
4681
  `);
4682
4682
  },
4683
4683
  info: (e, t) => {
4684
- De.message(e, {
4684
+ Me.message(e, {
4685
4685
  ...t,
4686
- symbol: C.default.blue(gi)
4686
+ symbol: C.default.blue(vi)
4687
4687
  });
4688
4688
  },
4689
4689
  success: (e, t) => {
4690
- De.message(e, {
4690
+ Me.message(e, {
4691
4691
  ...t,
4692
- symbol: C.default.green(yi)
4692
+ symbol: C.default.green(wi)
4693
4693
  });
4694
4694
  },
4695
4695
  step: (e, t) => {
4696
- De.message(e, {
4696
+ Me.message(e, {
4697
4697
  ...t,
4698
- symbol: C.default.green($n)
4698
+ symbol: C.default.green(Pn)
4699
4699
  });
4700
4700
  },
4701
4701
  warn: (e, t) => {
4702
- De.message(e, {
4702
+ Me.message(e, {
4703
4703
  ...t,
4704
- symbol: C.default.yellow(vi)
4704
+ symbol: C.default.yellow(bi)
4705
4705
  });
4706
4706
  },
4707
4707
  warning: (e, t) => {
4708
- De.warn(e, t);
4708
+ Me.warn(e, t);
4709
4709
  },
4710
4710
  error: (e, t) => {
4711
- De.message(e, {
4711
+ Me.message(e, {
4712
4712
  ...t,
4713
- symbol: C.default.red(wi)
4713
+ symbol: C.default.red(xi)
4714
4714
  });
4715
4715
  }
4716
- }, Ii = (e = "", t) => {
4717
- (t?.output ?? process.stdout).write(`${C.default.gray(Me)} ${C.default.red(e)}
4716
+ }, Ni = (e = "", t) => {
4717
+ (t?.output ?? process.stdout).write(`${C.default.gray(Pe)} ${C.default.red(e)}
4718
4718
 
4719
4719
  `);
4720
4720
  };
4721
4721
  var ze = (e, t) => e.split(`
4722
4722
  `).map((r) => t(r)).join(`
4723
- `), Ni = (e) => {
4723
+ `), Rr = (e) => {
4724
4724
  const t = (n, o) => {
4725
4725
  const s = n.label ?? String(n.value);
4726
- return o === "disabled" ? `${C.default.gray(jr)} ${ze(s, (i) => C.default.strikethrough(C.default.gray(i)))}${n.hint ? ` ${C.default.dim(`(${n.hint ?? "disabled"})`)}` : ""}` : o === "active" ? `${C.default.cyan(pi)} ${s}${n.hint ? ` ${C.default.dim(`(${n.hint})`)}` : ""}` : o === "selected" ? `${C.default.green(Ar)} ${ze(s, C.default.dim)}${n.hint ? ` ${C.default.dim(`(${n.hint})`)}` : ""}` : o === "cancelled" ? `${ze(s, (i) => C.default.strikethrough(C.default.dim(i)))}` : o === "active-selected" ? `${C.default.green(Ar)} ${s}${n.hint ? ` ${C.default.dim(`(${n.hint})`)}` : ""}` : o === "submitted" ? `${ze(s, C.default.dim)}` : `${C.default.dim(jr)} ${ze(s, C.default.dim)}`;
4726
+ return o === "disabled" ? `${C.default.gray(Nr)} ${ze(s, (i) => C.default.strikethrough(C.default.gray(i)))}${n.hint ? ` ${C.default.dim(`(${n.hint ?? "disabled"})`)}` : ""}` : o === "active" ? `${C.default.cyan(gi)} ${s}${n.hint ? ` ${C.default.dim(`(${n.hint})`)}` : ""}` : o === "selected" ? `${C.default.green(Ir)} ${ze(s, C.default.dim)}${n.hint ? ` ${C.default.dim(`(${n.hint})`)}` : ""}` : o === "cancelled" ? `${ze(s, (i) => C.default.strikethrough(C.default.dim(i)))}` : o === "active-selected" ? `${C.default.green(Ir)} ${s}${n.hint ? ` ${C.default.dim(`(${n.hint})`)}` : ""}` : o === "submitted" ? `${ze(s, C.default.dim)}` : `${C.default.dim(Nr)} ${ze(s, C.default.dim)}`;
4727
4727
  }, r = e.required ?? !0;
4728
- return new ii({
4728
+ return new ai({
4729
4729
  options: e.options,
4730
4730
  signal: e.signal,
4731
4731
  input: e.input,
@@ -4738,7 +4738,7 @@ var ze = (e, t) => e.split(`
4738
4738
  ${C.default.reset(C.default.dim(`Press ${C.default.gray(C.default.bgWhite(C.default.inverse(" space ")))} to select, ${C.default.gray(C.default.bgWhite(C.default.inverse(" enter ")))} to submit`))}`;
4739
4739
  },
4740
4740
  render() {
4741
- const n = Re(e.output, e.message, `${En(this.state)} `, `${it(this.state)} `), o = `${C.default.gray(Y)}
4741
+ const n = Re(e.output, e.message, `${Tn(this.state)} `, `${it(this.state)} `), o = `${C.default.gray(Y)}
4742
4742
  ${n}
4743
4743
  `, s = this.value ?? [], i = (a, l) => {
4744
4744
  if (a.disabled) return t(a, "disabled");
@@ -4757,11 +4757,11 @@ ${C.default.gray(Y)}`;
4757
4757
  }
4758
4758
  case "error": {
4759
4759
  const a = `${C.default.yellow(Y)} `, l = this.error.split(`
4760
- `).map((u, f) => f === 0 ? `${C.default.yellow(Me)} ${C.default.yellow(u)}` : ` ${u}`).join(`
4760
+ `).map((u, f) => f === 0 ? `${C.default.yellow(Pe)} ${C.default.yellow(u)}` : ` ${u}`).join(`
4761
4761
  `), c = o.split(`
4762
4762
  `).length, d = l.split(`
4763
4763
  `).length + 1;
4764
- return `${o}${a}${tr({
4764
+ return `${o}${a}${nr({
4765
4765
  output: e.output,
4766
4766
  options: this.options,
4767
4767
  cursor: this.cursor,
@@ -4777,7 +4777,7 @@ ${l}
4777
4777
  default: {
4778
4778
  const a = `${C.default.cyan(Y)} `, l = o.split(`
4779
4779
  `).length;
4780
- return `${o}${a}${tr({
4780
+ return `${o}${a}${nr({
4781
4781
  output: e.output,
4782
4782
  options: this.options,
4783
4783
  cursor: this.cursor,
@@ -4787,16 +4787,16 @@ ${l}
4787
4787
  style: i
4788
4788
  }).join(`
4789
4789
  ${a}`)}
4790
- ${C.default.cyan(Me)}
4790
+ ${C.default.cyan(Pe)}
4791
4791
  `;
4792
4792
  }
4793
4793
  }
4794
4794
  }
4795
4795
  }).prompt();
4796
4796
  };
4797
- var ki = (e) => new oi({
4797
+ var ki = (e) => new li({
4798
4798
  validate: e.validate,
4799
- mask: e.mask ?? mi,
4799
+ mask: e.mask ?? yi,
4800
4800
  signal: e.signal,
4801
4801
  input: e.input,
4802
4802
  output: e.output,
@@ -4809,7 +4809,7 @@ ${it(this.state)} ${e.message}
4809
4809
  const o = n ? ` ${n}` : "";
4810
4810
  return e.clearOnError && this.clear(), `${t.trim()}
4811
4811
  ${C.default.yellow(Y)}${o}
4812
- ${C.default.yellow(Me)} ${C.default.yellow(this.error)}
4812
+ ${C.default.yellow(Pe)} ${C.default.yellow(this.error)}
4813
4813
  `;
4814
4814
  }
4815
4815
  case "submit": {
@@ -4823,7 +4823,7 @@ ${C.default.gray(Y)}` : ""}`;
4823
4823
  }
4824
4824
  default:
4825
4825
  return `${t}${C.default.cyan(Y)} ${r}
4826
- ${C.default.cyan(Me)}
4826
+ ${C.default.cyan(Pe)}
4827
4827
  `;
4828
4828
  }
4829
4829
  }
@@ -4833,7 +4833,7 @@ var Wo = {
4833
4833
  light: X("─", "-"),
4834
4834
  heavy: X("━", "="),
4835
4835
  block: X("█", "#")
4836
- }, vt = (e, t) => e.includes(`
4836
+ }, wt = (e, t) => e.includes(`
4837
4837
  `) ? e.split(`
4838
4838
  `).map((r) => t(r)).join(`
4839
4839
  `) : t(e), Li = (e) => {
@@ -4841,25 +4841,25 @@ var Wo = {
4841
4841
  const o = r.label ?? String(r.value);
4842
4842
  switch (n) {
4843
4843
  case "disabled":
4844
- return `${C.default.gray(Pt)} ${vt(o, C.default.gray)}${r.hint ? ` ${C.default.dim(`(${r.hint ?? "disabled"})`)}` : ""}`;
4844
+ return `${C.default.gray(Tt)} ${wt(o, C.default.gray)}${r.hint ? ` ${C.default.dim(`(${r.hint ?? "disabled"})`)}` : ""}`;
4845
4845
  case "selected":
4846
- return `${vt(o, C.default.dim)}`;
4846
+ return `${wt(o, C.default.dim)}`;
4847
4847
  case "active":
4848
- return `${C.default.green(er)} ${o}${r.hint ? ` ${C.default.dim(`(${r.hint})`)}` : ""}`;
4848
+ return `${C.default.green(rr)} ${o}${r.hint ? ` ${C.default.dim(`(${r.hint})`)}` : ""}`;
4849
4849
  case "cancelled":
4850
- return `${vt(o, (s) => C.default.strikethrough(C.default.dim(s)))}`;
4850
+ return `${wt(o, (s) => C.default.strikethrough(C.default.dim(s)))}`;
4851
4851
  default:
4852
- return `${C.default.dim(Pt)} ${vt(o, C.default.dim)}`;
4852
+ return `${C.default.dim(Tt)} ${wt(o, C.default.dim)}`;
4853
4853
  }
4854
4854
  };
4855
- return new ai({
4855
+ return new ci({
4856
4856
  options: e.options,
4857
4857
  signal: e.signal,
4858
4858
  input: e.input,
4859
4859
  output: e.output,
4860
4860
  initialValue: e.initialValue,
4861
4861
  render() {
4862
- const r = `${it(this.state)} `, n = `${En(this.state)} `, o = Re(e.output, e.message, n, r), s = `${C.default.gray(Y)}
4862
+ const r = `${it(this.state)} `, n = `${Tn(this.state)} `, o = Re(e.output, e.message, n, r), s = `${C.default.gray(Y)}
4863
4863
  ${o}
4864
4864
  `;
4865
4865
  switch (this.state) {
@@ -4875,7 +4875,7 @@ ${C.default.gray(Y)}`;
4875
4875
  default: {
4876
4876
  const i = `${C.default.cyan(Y)} `, a = s.split(`
4877
4877
  `).length;
4878
- return `${s}${i}${tr({
4878
+ return `${s}${i}${nr({
4879
4879
  output: e.output,
4880
4880
  cursor: this.cursor,
4881
4881
  options: this.options,
@@ -4885,7 +4885,7 @@ ${C.default.gray(Y)}`;
4885
4885
  style: (l, c) => t(l, l.disabled ? "disabled" : c ? "active" : "inactive")
4886
4886
  }).join(`
4887
4887
  ${i}`)}
4888
- ${C.default.cyan(Me)}
4888
+ ${C.default.cyan(Pe)}
4889
4889
  `;
4890
4890
  }
4891
4891
  }
@@ -4893,7 +4893,7 @@ ${C.default.cyan(Me)}
4893
4893
  }).prompt();
4894
4894
  };
4895
4895
  var Vo = `${C.default.gray(Y)} `;
4896
- var Bi = (e) => new li({
4896
+ var Bi = (e) => new ui({
4897
4897
  validate: e.validate,
4898
4898
  placeholder: e.placeholder,
4899
4899
  defaultValue: e.defaultValue,
@@ -4907,7 +4907,7 @@ var Bi = (e) => new li({
4907
4907
  `, n = e.placeholder ? C.default.inverse(e.placeholder[0]) + C.default.dim(e.placeholder.slice(1)) : C.default.inverse(C.default.hidden("_")), o = this.userInput ? this.userInputWithCursor : n, s = this.value ?? "";
4908
4908
  switch (this.state) {
4909
4909
  case "error": {
4910
- const i = this.error ? ` ${C.default.yellow(this.error)}` : "", a = t ? `${C.default.yellow(Y)} ` : "", l = t ? C.default.yellow(Me) : "";
4910
+ const i = this.error ? ` ${C.default.yellow(this.error)}` : "", a = t ? `${C.default.yellow(Y)} ` : "", l = t ? C.default.yellow(Pe) : "";
4911
4911
  return `${r.trim()}
4912
4912
  ${a}${o}
4913
4913
  ${l}${i}
@@ -4924,11 +4924,11 @@ ${a}` : ""}`;
4924
4924
  }
4925
4925
  default:
4926
4926
  return `${r}${t ? `${C.default.cyan(Y)} ` : ""}${o}
4927
- ${t ? C.default.cyan(Me) : ""}
4927
+ ${t ? C.default.cyan(Pe) : ""}
4928
4928
  `;
4929
4929
  }
4930
4930
  }
4931
- }).prompt(), Ht = class _n {
4931
+ }).prompt(), zt = class sr {
4932
4932
  #e;
4933
4933
  #n;
4934
4934
  /**
@@ -4984,6 +4984,17 @@ ${t ? C.default.cyan(Me) : ""}
4984
4984
  });
4985
4985
  }
4986
4986
  /**
4987
+ * Gets the initial value for a prompt, falling back to flag's defaultValue.
4988
+ *
4989
+ * @param config - The prompt configuration
4990
+ * @param flag - The flag definition
4991
+ * @returns The initial value to use
4992
+ */
4993
+ static getInitialValue(t, r) {
4994
+ if (t.initial !== void 0) return t.initial;
4995
+ if ("defaultValue" in r && r.defaultValue !== void 0) return r.defaultValue;
4996
+ }
4997
+ /**
4987
4998
  * Executes all prompts in sequence.
4988
4999
  *
4989
5000
  * @param flags - Array of promptable flags with their names
@@ -4993,17 +5004,22 @@ ${t ? C.default.cyan(Me) : ""}
4993
5004
  const r = t.map((s, i) => ({
4994
5005
  ...s,
4995
5006
  index: i
4996
- })), n = _n.sortFlagsBySequence(r), o = {};
5007
+ })), n = sr.sortFlagsBySequence(r), o = {};
4997
5008
  for (const { flag: s, name: i } of n) try {
4998
5009
  if (!s.prompt) continue;
4999
5010
  const a = await s.prompt(this.#e);
5000
- o[i] = await this.#r(i, a), this.#e.promptAnswers = {
5011
+ if (a.skip === !0) continue;
5012
+ const l = {
5013
+ ...a,
5014
+ initial: sr.getInitialValue(a, s)
5015
+ };
5016
+ o[i] = await this.#r(i, l), this.#e.promptAnswers = {
5001
5017
  ...this.#e.promptAnswers,
5002
5018
  ...o
5003
5019
  };
5004
5020
  } catch (a) {
5005
- if (this.#a(a))
5006
- return await this.#c(), {
5021
+ if (this.#u(a))
5022
+ return await this.#a(), {
5007
5023
  success: !1,
5008
5024
  answers: o,
5009
5025
  cancelled: !0
@@ -5026,15 +5042,15 @@ ${t ? C.default.cyan(Me) : ""}
5026
5042
  async #r(t, r) {
5027
5043
  for (; ; ) {
5028
5044
  const n = await this.#o(r);
5029
- if (ni(n)) throw new Error("USER_CANCELLED");
5045
+ if (pt(n)) throw new Error("USER_CANCELLED");
5030
5046
  if (r.validate) {
5031
5047
  const o = await r.validate(n, this.#e);
5032
5048
  if (o === !0) return n;
5033
5049
  if (typeof o == "string") {
5034
- De.error(o);
5050
+ Me.error(o);
5035
5051
  continue;
5036
5052
  } else {
5037
- De.error(`Invalid value for ${t}`);
5053
+ Me.error(`Invalid value for ${t}`);
5038
5054
  continue;
5039
5055
  }
5040
5056
  }
@@ -5058,21 +5074,21 @@ ${t ? C.default.cyan(Me) : ""}
5058
5074
  case "password":
5059
5075
  return ki({ message: t.message });
5060
5076
  case "confirm":
5061
- return Fi({
5077
+ return Gt({
5062
5078
  message: t.message,
5063
5079
  initialValue: t.initial ?? !1
5064
5080
  });
5065
5081
  case "select":
5066
5082
  return Li({
5067
5083
  message: t.message,
5068
- options: this.#l(t.options ?? []),
5084
+ options: this.#c(t.options ?? []),
5069
5085
  initialValue: t.initial,
5070
5086
  maxItems: t.maxItems
5071
5087
  });
5072
5088
  case "multiselect":
5073
- return Ni({
5089
+ return t.allowSelectAll ? this.#l(t) : Rr({
5074
5090
  message: t.message,
5075
- options: this.#l(t.options ?? []),
5091
+ options: this.#c(t.options ?? []),
5076
5092
  initialValues: t.initial,
5077
5093
  maxItems: t.maxItems
5078
5094
  });
@@ -5081,12 +5097,54 @@ ${t ? C.default.cyan(Me) : ""}
5081
5097
  }
5082
5098
  }
5083
5099
  /**
5100
+ * Executes a multiselect prompt with select all/none support.
5101
+ * User can press 'a' to toggle all items on/off.
5102
+ *
5103
+ * @param config - The prompt configuration
5104
+ * @returns Array of selected values
5105
+ */
5106
+ async #l(t) {
5107
+ const r = this.#c(t.options ?? []), n = r.map((s) => s.value);
5108
+ let o = Array.isArray(t.initial) ? [...t.initial] : [];
5109
+ for (Me.info("Press 'a' to select/deselect all options"); ; ) {
5110
+ const s = await Rr({
5111
+ message: `${t.message} (press 'a' to toggle all)`,
5112
+ options: r.map((i) => ({ ...i })),
5113
+ initialValues: o,
5114
+ maxItems: t.maxItems
5115
+ });
5116
+ if (pt(s)) return s;
5117
+ if (s.length === 0 || s.length < n.length && s.length > 0) {
5118
+ const i = await Gt({
5119
+ message: "Select all options?",
5120
+ initialValue: !1
5121
+ });
5122
+ if (pt(i)) return s;
5123
+ if (i) {
5124
+ o = [...n];
5125
+ continue;
5126
+ }
5127
+ } else if (s.length === n.length) {
5128
+ const i = await Gt({
5129
+ message: "Deselect all options?",
5130
+ initialValue: !1
5131
+ });
5132
+ if (pt(i)) return s;
5133
+ if (i) {
5134
+ o = [];
5135
+ continue;
5136
+ }
5137
+ }
5138
+ return s;
5139
+ }
5140
+ }
5141
+ /**
5084
5142
  * Normalizes options to the format expected by @clack/prompts.
5085
5143
  *
5086
5144
  * @param options - Raw options from config
5087
5145
  * @returns Normalized options
5088
5146
  */
5089
- #l(t) {
5147
+ #c(t) {
5090
5148
  return t.map((r) => typeof r == "string" ? {
5091
5149
  value: r,
5092
5150
  label: r
@@ -5095,8 +5153,8 @@ ${t ? C.default.cyan(Me) : ""}
5095
5153
  /**
5096
5154
  * Handles user cancellation.
5097
5155
  */
5098
- async #c() {
5099
- Ii("Operation cancelled by user"), this.#n && await this.#n(this.#e);
5156
+ async #a() {
5157
+ Ni("Operation cancelled by user"), this.#n && await this.#n(this.#e);
5100
5158
  }
5101
5159
  /**
5102
5160
  * Checks if an error indicates user cancellation.
@@ -5104,11 +5162,11 @@ ${t ? C.default.cyan(Me) : ""}
5104
5162
  * @param error - The error to check
5105
5163
  * @returns True if the user cancelled
5106
5164
  */
5107
- #a(t) {
5165
+ #u(t) {
5108
5166
  return t instanceof Error ? t.message === "USER_CANCELLED" : !1;
5109
5167
  }
5110
5168
  };
5111
- function kr(e) {
5169
+ function Wr(e) {
5112
5170
  const t = {}, r = [];
5113
5171
  for (let n = 0; n < e.length; n++) {
5114
5172
  const o = e[n], s = e[n + 1], i = s !== void 0 && !s.startsWith("-");
@@ -5200,7 +5258,7 @@ var Se = class extends Error {
5200
5258
  constructor(e, t = []) {
5201
5259
  super(e), this.cmdChain = t, this.name = "ArgParserError", this.commandChain = t;
5202
5260
  }
5203
- }, wt = class me {
5261
+ }, bt = class me {
5204
5262
  #e = "Argument Parser";
5205
5263
  #n;
5206
5264
  #r = "";
@@ -5213,11 +5271,11 @@ var Se = class extends Error {
5213
5271
  #l;
5214
5272
  #c = !1;
5215
5273
  #a;
5216
- #f = !0;
5274
+ #u = !0;
5217
5275
  #h = !0;
5218
5276
  #m;
5219
5277
  #L = {};
5220
- #u = !1;
5278
+ #f = !1;
5221
5279
  #i = /* @__PURE__ */ new Map();
5222
5280
  #s;
5223
5281
  #T;
@@ -5226,9 +5284,9 @@ var Se = class extends Error {
5226
5284
  #b = !1;
5227
5285
  #t;
5228
5286
  #C = /* @__PURE__ */ new Set();
5229
- #x = new Vs();
5230
- #S = new Bs();
5231
- #p = new hn();
5287
+ #x = new Gs();
5288
+ #S = new Vs();
5289
+ #p = new yn();
5232
5290
  /** The effective working directory for this parser instance */
5233
5291
  #v = null;
5234
5292
  /** The original root path from user's CLI invocation */
@@ -5238,7 +5296,7 @@ var Se = class extends Error {
5238
5296
  #$ = "interactive-flag";
5239
5297
  #M;
5240
5298
  constructor(t = {}, r) {
5241
- this.#e = t.appName || "app", t.blankSpaceWidth && !isNaN(Number(t.blankSpaceWidth)) && Number(t.blankSpaceWidth) > 20 && (this.#o.blankSpaceWidth = Number(t.blankSpaceWidth)), t.wrapAtWidth && !isNaN(Number(t.wrapAtWidth)) && Number(t.wrapAtWidth) > 30 && (this.#o.wrapAtWidth = Number(t.wrapAtWidth)), typeof t.extraNewLine == "boolean" && (this.#o.extraNewLine = !!t.extraNewLine), typeof t.mandatoryCharacter == "string" && (this.#o.mandatoryCharacter = t.mandatoryCharacter), typeof t.throwForDuplicateFlags == "boolean" && (this.#c = t.throwForDuplicateFlags), this.#s = new Us({ throwForDuplicateFlags: this.#c }, r || []), this.#f = t.handleErrors ?? !0, this.#h = t.autoExit ?? !0, this.#u = t.inheritParentFlags ?? !1, this.#b = t.triggerAutoHelpIfNoHandler ?? !1, this.#a = t.description, this.#l = t.handler, this.#n = t.appCommandName, this.#t = t.logger || ye({
5299
+ this.#e = t.appName || "app", t.blankSpaceWidth && !isNaN(Number(t.blankSpaceWidth)) && Number(t.blankSpaceWidth) > 20 && (this.#o.blankSpaceWidth = Number(t.blankSpaceWidth)), t.wrapAtWidth && !isNaN(Number(t.wrapAtWidth)) && Number(t.wrapAtWidth) > 30 && (this.#o.wrapAtWidth = Number(t.wrapAtWidth)), typeof t.extraNewLine == "boolean" && (this.#o.extraNewLine = !!t.extraNewLine), typeof t.mandatoryCharacter == "string" && (this.#o.mandatoryCharacter = t.mandatoryCharacter), typeof t.throwForDuplicateFlags == "boolean" && (this.#c = t.throwForDuplicateFlags), this.#s = new zs({ throwForDuplicateFlags: this.#c }, r || []), this.#u = t.handleErrors ?? !0, this.#h = t.autoExit ?? !0, this.#f = t.inheritParentFlags ?? !1, this.#b = t.triggerAutoHelpIfNoHandler ?? !1, this.#a = t.description, this.#l = t.handler, this.#n = t.appCommandName, this.#t = t.logger || ye({
5242
5300
  prefix: this.#e,
5243
5301
  mcpMode: !1
5244
5302
  });
@@ -5255,7 +5313,7 @@ var Se = class extends Error {
5255
5313
  enum: [],
5256
5314
  validate: (o, s) => !0
5257
5315
  };
5258
- if (this.#s.addFlag(n), this.#T = new ks(this), this.#g = new Fs(this), t.subCommands) for (const o of t.subCommands) this.addSubCommand(o);
5316
+ if (this.#s.addFlag(n), this.#T = new Rs(this), this.#g = new ks(this), t.subCommands) for (const o of t.subCommands) this.addSubCommand(o);
5259
5317
  this.#$ = t.promptWhen ?? "interactive-flag", this.#M = t.onCancel;
5260
5318
  }
5261
5319
  get flags() {
@@ -5415,7 +5473,7 @@ var Se = class extends Error {
5415
5473
  if ("promptWhen" in t && t.promptWhen && t.parser.setPromptWhen?.(t.promptWhen), "onCancel" in t && t.onCancel && t.parser.setOnCancel?.(t.onCancel), this.#i.has(t.name)) throw new Error(`Sub-command '${t.name}' already exists`);
5416
5474
  const r = t.parser;
5417
5475
  if (!(r instanceof me)) throw new Error(`Parser for subcommand '${t.name}' is not an instance of ArgParserBase. Please provide 'new ArgParserBase(...)' for the 'parser' property of an ISubCommand.`);
5418
- if (r.#m = this, r.#r = t.name, !r.#n && this.#n && (r.#n = this.#n), t.description && (r.#a = t.description), r.#h = this.#h, r.#b = this.#b, r.#u === !0 || r.#u === Nt.DirectParentOnly || r.#u === Nt.AllParents) {
5476
+ if (r.#m = this, r.#r = t.name, !r.#n && this.#n && (r.#n = this.#n), t.description && (r.#a = t.description), r.#h = this.#h, r.#b = this.#b, r.#f === !0 || r.#f === kt.DirectParentOnly || r.#f === kt.AllParents) {
5419
5477
  const n = this.#s.flags;
5420
5478
  for (const o of n) r.#s.hasFlag(o.name) || r.#s._setProcessedFlagForInheritance(o);
5421
5479
  }
@@ -5428,7 +5486,7 @@ var Se = class extends Error {
5428
5486
  #D(t) {
5429
5487
  for (const [r, n] of t.getSubCommands()) {
5430
5488
  const o = n.parser;
5431
- if (o instanceof me && o.#u === Nt.AllParents) {
5489
+ if (o instanceof me && o.#f === kt.AllParents) {
5432
5490
  const s = t.#s.flags;
5433
5491
  let i = !1;
5434
5492
  for (const a of s) o.#s.hasFlag(a.name) || (o.#s._setProcessedFlagForInheritance(a), i = !0);
@@ -5642,7 +5700,7 @@ Arguments Remaining After Simulation:`)), this.#t.info(JSON.stringify(g, null, 2
5642
5700
  #U(t, r, n) {
5643
5701
  const o = [], s = /* @__PURE__ */ new Set();
5644
5702
  let i = [...r];
5645
- r.length > 1 && (r[1].#u || (i = i.slice(1)));
5703
+ r.length > 1 && (r[1].#f || (i = i.slice(1)));
5646
5704
  for (let a = 0; a < i.length; a++) {
5647
5705
  const l = i[a], c = l.getCommandChain();
5648
5706
  for (const d of l.#s.flags) {
@@ -5650,7 +5708,7 @@ Arguments Remaining After Simulation:`)), this.#t.info(JSON.stringify(g, null, 2
5650
5708
  let u = !1;
5651
5709
  if (a < i.length - 1) {
5652
5710
  const y = i[a + 1];
5653
- y.#u && y.#s.hasFlag(d.name) && (u = !0);
5711
+ y.#f && y.#s.hasFlag(d.name) && (u = !0);
5654
5712
  }
5655
5713
  if (u || !(typeof d.mandatory == "function" ? d.mandatory(t) : d.mandatory)) continue;
5656
5714
  const f = t[d.name];
@@ -5722,7 +5780,7 @@ Arguments Remaining After Simulation:`)), this.#t.info(JSON.stringify(g, null, 2
5722
5780
  }
5723
5781
  r.handlerResponse = i, i && typeof i == "object" && !Array.isArray(i) && Object.assign(r, i);
5724
5782
  } catch (i) {
5725
- if (this.#f) this.#P(new Se(`Handler error: ${i}`, []));
5783
+ if (this.#u) this.#P(new Se(`Handler error: ${i}`, []));
5726
5784
  else throw i;
5727
5785
  }
5728
5786
  }
@@ -5734,7 +5792,7 @@ Arguments Remaining After Simulation:`)), this.#t.info(JSON.stringify(g, null, 2
5734
5792
  */
5735
5793
  static isExecutedDirectly(t) {
5736
5794
  try {
5737
- return t ? Fn(t) === P.resolve(process.argv[1]) : (typeof process < "u" && process.argv && process.argv[1], !1);
5795
+ return t ? kn(t) === P.resolve(process.argv[1]) : (typeof process < "u" && process.argv && process.argv[1], !1);
5738
5796
  } catch {
5739
5797
  return !1;
5740
5798
  }
@@ -5745,13 +5803,13 @@ Arguments Remaining After Simulation:`)), this.#t.info(JSON.stringify(g, null, 2
5745
5803
  if (t === void 0) if (typeof process < "u" && process.argv && Array.isArray(process.argv)) t = process.argv.slice(2);
5746
5804
  else throw new Error("parse() called without arguments in non-Node.js environment. Please provide arguments explicitly: parse(['--flag', 'value'])");
5747
5805
  this.#O();
5748
- const n = [...t], { systemArgs: o } = kr(t);
5806
+ const n = [...t], { systemArgs: o } = Wr(t);
5749
5807
  if (typeof process < "u" && (process.env.ARGPARSER_FUZZY_MODE === "true" || o.enableFuzzy === !0) && !r?.skipHelpHandling) return {
5750
5808
  _fuzzyModePreventedExecution: !0,
5751
5809
  _originalInputArgs: n,
5752
5810
  systemArgs: o
5753
5811
  };
5754
- const s = await this.#V(t, r), { filteredArgs: i } = kr(t);
5812
+ const s = await this.#V(t, r), { filteredArgs: i } = Wr(t);
5755
5813
  if (t.length = 0, t.push(...i), s !== !1)
5756
5814
  return s !== !0 && typeof s == "object" && (s.systemArgs = o), s === !0 ? {} : s;
5757
5815
  try {
@@ -5763,12 +5821,12 @@ Arguments Remaining After Simulation:`)), this.#t.info(JSON.stringify(g, null, 2
5763
5821
  const y = await u._asyncHandlerPromise;
5764
5822
  u.handlerResponse = y, y && typeof y == "object" && !Array.isArray(y) && Object.assign(u, y), delete u._asyncHandlerPromise, delete u._asyncHandlerInfo;
5765
5823
  } catch (y) {
5766
- if (this.#f) this.#P(new Se(`Handler error: ${y}`, []));
5824
+ if (this.#u) this.#P(new Se(`Handler error: ${y}`, []));
5767
5825
  else throw y;
5768
5826
  }
5769
5827
  return u;
5770
5828
  } catch (a) {
5771
- if (a instanceof Se) if (this.#f) {
5829
+ if (a instanceof Se) if (this.#u) {
5772
5830
  const l = this.#P(a);
5773
5831
  return this.#h ? {} : l;
5774
5832
  } else throw a;
@@ -5827,8 +5885,8 @@ Arguments Remaining After Simulation:`)), this.#t.info(JSON.stringify(g, null, 2
5827
5885
  promptAnswers: {},
5828
5886
  isInteractive: !1
5829
5887
  }, j = r.getPromptableFlags();
5830
- if (Ht.shouldTriggerInteractive(r.#$, j, u) && Ht.isInteractiveEnvironment()) {
5831
- const S = await new Ht({
5888
+ if (zt.shouldTriggerInteractive(r.#$, j, u) && zt.isInteractiveEnvironment()) {
5889
+ const S = await new zt({
5832
5890
  context: I,
5833
5891
  onCancel: r.#M
5834
5892
  }).executePrompts(j);
@@ -5870,7 +5928,7 @@ Arguments Remaining After Simulation:`)), this.#t.info(JSON.stringify(g, null, 2
5870
5928
  if (o.length > 0) {
5871
5929
  const d = Object.fromEntries(o.map((f) => [f.name, f.allowMultiple ? [] : void 0])), u = /* @__PURE__ */ new Set();
5872
5930
  for (const f of o) if (f.allowLigature && !f.flagOnly) {
5873
- const x = yr(mr(...f.options.map((y) => `${y}=`)), vr(gr).groupedAs("arg"));
5931
+ const x = br(vr(...f.options.map((y) => `${y}=`)), xr(wr).groupedAs("arg"));
5874
5932
  for (let y = 0; y < t.length; y++) {
5875
5933
  if (u.has(y)) continue;
5876
5934
  const h = x.exec(`${t[y]}`);
@@ -5907,7 +5965,7 @@ Arguments Remaining After Simulation:`)), this.#t.info(JSON.stringify(g, null, 2
5907
5965
  const s = Object.fromEntries(n.map((d) => [d.name, d.allowMultiple ? [] : void 0]));
5908
5966
  let i = /* @__PURE__ */ new Set();
5909
5967
  for (const d of n) if (d.allowLigature && !d.flagOnly) {
5910
- const u = yr(mr(...d.options.map((f) => `${f}=`)), vr(gr).groupedAs("arg"));
5968
+ const u = br(vr(...d.options.map((f) => `${f}=`)), xr(wr).groupedAs("arg"));
5911
5969
  for (let f = 0; f < t.length; f++) {
5912
5970
  if (i.has(f)) continue;
5913
5971
  const x = t[f], y = u.exec(`${x}`);
@@ -6072,7 +6130,7 @@ ${c(2)}${n(j)}`).join("")}
6072
6130
  * Enables fuzzy testing mode by disabling error handling and making flags optional
6073
6131
  */
6074
6132
  #j() {
6075
- this.#w = !0, this.#f = !1;
6133
+ this.#w = !0, this.#u = !1;
6076
6134
  for (const [, t] of this.#i) t.parser instanceof me && t.parser.#j();
6077
6135
  }
6078
6136
  #P(t) {
@@ -6097,7 +6155,7 @@ ${E.dim(`Try '${r} --help' for usage details.`)}`), this.#h) if (typeof process
6097
6155
  }
6098
6156
  #F(t, r, n = /* @__PURE__ */ new Set()) {
6099
6157
  const o = " ".repeat(r), s = " ".repeat(r + 1), i = " ".repeat(r + 2);
6100
- this.#t.info(`${o}Parser: ${E.blueBright(t.#r || t.#e)}`), t.#a && this.#t.info(`${s}Description: ${t.#a}`), this.#t.info(`${s}Options:`), this.#t.info(`${i}appName: ${t.#e}`), this.#t.info(`${i}appCommandName: ${t.#n ?? E.dim("undefined")}`), this.#t.info(`${i}handleErrors: ${t.#f}`), this.#t.info(`${i}throwForDuplicateFlags: ${t.#c}`), this.#t.info(`${i}inheritParentFlags: ${t.#u}`), this.#t.info(`${i}Handler Defined: ${!!t.#l}`), this.#t.info(`${s}Internal Params: ${JSON.stringify(t.#o)}`);
6158
+ this.#t.info(`${o}Parser: ${E.blueBright(t.#r || t.#e)}`), t.#a && this.#t.info(`${s}Description: ${t.#a}`), this.#t.info(`${s}Options:`), this.#t.info(`${i}appName: ${t.#e}`), this.#t.info(`${i}appCommandName: ${t.#n ?? E.dim("undefined")}`), this.#t.info(`${i}handleErrors: ${t.#u}`), this.#t.info(`${i}throwForDuplicateFlags: ${t.#c}`), this.#t.info(`${i}inheritParentFlags: ${t.#f}`), this.#t.info(`${i}Handler Defined: ${!!t.#l}`), this.#t.info(`${s}Internal Params: ${JSON.stringify(t.#o)}`);
6101
6159
  const a = t.#s.flags;
6102
6160
  a.length > 0 ? (this.#t.info(`${s}Flags (${a.length}):`), a.forEach((c) => {
6103
6161
  this.#t.info(`${i}* ${E.green(c.name)}:`), this.#t.info(`${i} Options: ${c.options.join(", ")}`), this.#t.info(`${i} Description: ${Array.isArray(c.description) ? c.description.join(" | ") : c.description}`), this.#t.info(`${i} Type: ${typeof c.type == "function" ? c.type.name || "custom function" : c.type}`), this.#t.info(`${i} Mandatory: ${typeof c.mandatory == "function" ? "dynamic" : c.mandatory ?? !1}`), this.#t.info(`${i} Default: ${JSON.stringify(c.defaultValue)}`), this.#t.info(`${i} Flag Only: ${c.flagOnly}`), this.#t.info(`${i} Allow Multiple: ${c.allowMultiple}`), this.#t.info(`${i} Allow Ligature: ${c.allowLigature}`), this.#t.info(`${i} Enum: ${c.enum && c.enum.length > 0 ? c.enum.join(", ") : "none"}`), this.#t.info(`${i} Validator Defined: ${!!c.validate}`);
@@ -6114,7 +6172,7 @@ ${E.dim(`Try '${r} --help' for usage details.`)}`), this.#h) if (typeof process
6114
6172
  const s = " ".repeat(r), i = " ".repeat(r + 1), a = " ".repeat(r + 2), l = (u) => {
6115
6173
  o += u + "\\n";
6116
6174
  };
6117
- l(`${s}Parser: ${t.#r || t.#e}`), t.#a && l(`${i}Description: ${t.#a}`), l(`${i}Options:`), l(`${a}appName: ${t.#e}`), l(`${a}appCommandName: ${t.#n ?? "undefined"}`), l(`${a}handleErrors: ${t.#f}`), l(`${a}throwForDuplicateFlags: ${t.#c}`), l(`${a}inheritParentFlags: ${t.#u}`), l(`${a}Handler Defined: ${!!t.#l}`), l(`${i}Internal Params: ${JSON.stringify(t.#o)}`);
6175
+ l(`${s}Parser: ${t.#r || t.#e}`), t.#a && l(`${i}Description: ${t.#a}`), l(`${i}Options:`), l(`${a}appName: ${t.#e}`), l(`${a}appCommandName: ${t.#n ?? "undefined"}`), l(`${a}handleErrors: ${t.#u}`), l(`${a}throwForDuplicateFlags: ${t.#c}`), l(`${a}inheritParentFlags: ${t.#f}`), l(`${a}Handler Defined: ${!!t.#l}`), l(`${i}Internal Params: ${JSON.stringify(t.#o)}`);
6118
6176
  const c = t.#s.flags;
6119
6177
  c.length > 0 ? (l(`${i}Flags (${c.length}):`), c.forEach((u) => {
6120
6178
  l(`${a}* ${u.name}:`), l(`${a} Options: ${u.options.join(", ")}`), l(`${a} Description: ${Array.isArray(u.description) ? u.description.join(" | ") : u.description}`);
@@ -6143,9 +6201,9 @@ ${E.dim(`Try '${r} --help' for usage details.`)}`), this.#h) if (typeof process
6143
6201
  options: {
6144
6202
  appName: t.#e,
6145
6203
  appCommandName: t.#n ?? void 0,
6146
- handleErrors: t.#f,
6204
+ handleErrors: t.#u,
6147
6205
  throwForDuplicateFlags: t.#c,
6148
- inheritParentFlags: t.#u
6206
+ inheritParentFlags: t.#f
6149
6207
  },
6150
6208
  handlerDefined: !!t.#l,
6151
6209
  internalParams: t.#o,
@@ -6275,7 +6333,7 @@ ${E.dim(`Try '${r} --help' for usage details.`)}`), this.#h) if (typeof process
6275
6333
  re.log("Got MCP server config:", JSON.stringify(o));
6276
6334
  const s = n.logPath || (o?.log && typeof o.log == "object" ? o.log.logToFile : null) || o?.logPath || "./logs/mcp.log";
6277
6335
  re.log("Effective log path:", s);
6278
- const i = Te(s);
6336
+ const i = _e(s);
6279
6337
  re.log("Resolved log path:", i);
6280
6338
  let a;
6281
6339
  re.log("About to import simple-mcp-logger");
@@ -6458,7 +6516,7 @@ ${E.dim(`Try '${r} --help' for usage details.`)}`), this.#h) if (typeof process
6458
6516
  const Uo = async (e) => {
6459
6517
  e.displayHelp();
6460
6518
  };
6461
- function rr(e) {
6519
+ function ir(e) {
6462
6520
  if (!e || typeof e != "string") throw new Error("Tool name must be a non-empty string");
6463
6521
  let t = e.replace(/[^a-zA-Z0-9_-]/g, "_");
6464
6522
  return (!t || /^_+$/.test(t)) && (t = "tool"), t.length > 64 && (t = t.substring(0, 64)), t;
@@ -6467,7 +6525,7 @@ function Ho(e) {
6467
6525
  return !e || typeof e != "string" ? !1 : /^[a-zA-Z0-9_-]{1,64}$/.test(e);
6468
6526
  }
6469
6527
  var J = ye("MCP Integration");
6470
- function nr(e) {
6528
+ function or(e) {
6471
6529
  return { content: [{
6472
6530
  type: "text",
6473
6531
  text: typeof e == "string" ? e : JSON.stringify(e, null, 2)
@@ -6507,12 +6565,12 @@ function Ri(e) {
6507
6565
  }
6508
6566
  }
6509
6567
  const t = {
6510
- type: St(e.type),
6568
+ type: $t(e.type),
6511
6569
  description: e.description || `${e.name} parameter`
6512
6570
  };
6513
6571
  e.enum && Array.isArray(e.enum) && (t.enum = e.enum);
6514
6572
  const r = e.defaultValue || e.default;
6515
- return r !== void 0 ? t.default = r : e.flagOnly && St(e.type) === "boolean" && (t.default = !1), e.type === "array" && e.itemType && (t.items = { type: St(e.itemType) }), {
6573
+ return r !== void 0 ? t.default = r : e.flagOnly && $t(e.type) === "boolean" && (t.default = !1), e.type === "array" && e.itemType && (t.items = { type: $t(e.itemType) }), {
6516
6574
  property: t,
6517
6575
  isRequired: !!(e.mandatory || e.required)
6518
6576
  };
@@ -6530,11 +6588,11 @@ function Go(e) {
6530
6588
  required: r
6531
6589
  };
6532
6590
  }
6533
- function Lr(e) {
6591
+ function Vr(e) {
6534
6592
  const t = {};
6535
6593
  for (const r of e) {
6536
6594
  if (r.name === "help" || r.name.startsWith("s-")) continue;
6537
- const n = On(r);
6595
+ const n = jn(r);
6538
6596
  t[r.name] = n;
6539
6597
  }
6540
6598
  return O.object(t);
@@ -6579,7 +6637,7 @@ function Wi(e) {
6579
6637
  exitCode: 1
6580
6638
  };
6581
6639
  }
6582
- function On(e) {
6640
+ function jn(e) {
6583
6641
  const t = e.type;
6584
6642
  if (t && typeof t == "object" && t._def) return t;
6585
6643
  let r = O.string(), n;
@@ -6634,7 +6692,7 @@ function On(e) {
6634
6692
  const i = e.defaultValue;
6635
6693
  return i !== void 0 ? r = r.default(i) : e.mandatory || (r = r.optional()), r;
6636
6694
  }
6637
- function Br(e, t) {
6695
+ function Ur(e, t) {
6638
6696
  const r = [], n = /* @__PURE__ */ new Set();
6639
6697
  function o(s, i) {
6640
6698
  if (n.has(s)) return;
@@ -6644,11 +6702,11 @@ function Br(e, t) {
6644
6702
  !h && s !== e && (h = l.getSubCommandName ? l.getSubCommandName() : l["#subCommandName"]), s !== e && i.length > 0 && (h = i[i.length - 1]);
6645
6703
  const v = h || c, b = h || (i.length > 0 ? i[i.length - 1] : c);
6646
6704
  let g;
6647
- if (t?.generateToolName ? g = t.generateToolName(i, c) : (s === e ? g = v || c || "root_cmd" : g = b || "cmd", g = rr(g)), g || (g = s === e && c ? c : "cmd"), t?.toolNamePrefix && (g = t.toolNamePrefix + g), t?.toolNameSuffix && (g = g + t.toolNameSuffix), u) {
6705
+ if (t?.generateToolName ? g = t.generateToolName(i, c) : (s === e ? g = v || c || "root_cmd" : g = b || "cmd", g = ir(g)), g || (g = s === e && c ? c : "cmd"), t?.toolNamePrefix && (g = t.toolNamePrefix + g), t?.toolNameSuffix && (g = g + t.toolNameSuffix), u) {
6648
6706
  const $ = f, I = {}, j = $.some((B) => B.name === "help");
6649
6707
  for (const B of $) {
6650
6708
  if (B.name === "help") continue;
6651
- let V = On(B);
6709
+ let V = jn(B);
6652
6710
  j && B.mandatory && (V = V.optional()), I[B.name] = V;
6653
6711
  }
6654
6712
  const S = O.object(I);
@@ -6656,7 +6714,7 @@ function Br(e, t) {
6656
6714
  if (t?.outputSchemaMap && t.outputSchemaMap[g]) {
6657
6715
  const B = t.outputSchemaMap[g];
6658
6716
  M = typeof B == "object" && B !== null && !B._def ? O.object(B) : B;
6659
- } else t?.defaultOutputSchema ? M = t.defaultOutputSchema : t?.autoGenerateOutputSchema && (typeof t.autoGenerateOutputSchema == "string" ? M = Oe(t.autoGenerateOutputSchema) : t.autoGenerateOutputSchema === !0 && (M = Oe("successWithData")));
6717
+ } else t?.defaultOutputSchema ? M = t.defaultOutputSchema : t?.autoGenerateOutputSchema && (typeof t.autoGenerateOutputSchema == "string" ? M = De(t.autoGenerateOutputSchema) : t.autoGenerateOutputSchema === !0 && (M = De("successWithData")));
6660
6718
  const H = {
6661
6719
  name: g,
6662
6720
  description: d || `Executes the ${g} command.`,
@@ -6872,10 +6930,10 @@ function Br(e, t) {
6872
6930
  parser: R,
6873
6931
  parentArgs: Q,
6874
6932
  isMcp: !0,
6875
- getFlag: (Pe) => {
6876
- if (ie && ie[Pe] !== void 0) return ie[Pe];
6933
+ getFlag: (Te) => {
6934
+ if (ie && ie[Te] !== void 0) return ie[Te];
6877
6935
  if (R) {
6878
- const Ue = R.getFlagDefinition(Pe);
6936
+ const Ue = R.getFlagDefinition(Te);
6879
6937
  if (Ue) {
6880
6938
  const p = Ue.env;
6881
6939
  if (p) {
@@ -6893,8 +6951,8 @@ function Br(e, t) {
6893
6951
  };
6894
6952
  try {
6895
6953
  Z = await ee(Ve);
6896
- } catch (Pe) {
6897
- return Le(Pe);
6954
+ } catch (Te) {
6955
+ return Le(Te);
6898
6956
  }
6899
6957
  }
6900
6958
  }
@@ -6928,7 +6986,7 @@ function Br(e, t) {
6928
6986
  };
6929
6987
  return process.env.MCP_DEBUG && (J.error(`[MCP Execute] Returning structured default response for '${g}'`), J.error("[MCP Execute] Final response:", JSON.stringify(R, null, 2))), R;
6930
6988
  }
6931
- return process.env.MCP_DEBUG && J.error(`[MCP Execute] Returning success response for '${g}'`), nr(le);
6989
+ return process.env.MCP_DEBUG && J.error(`[MCP Execute] Returning success response for '${g}'`), or(le);
6932
6990
  } catch (z) {
6933
6991
  process.env.MCP_DEBUG && J.error(`[MCP Execute] Exception caught in tool '${g}':`, z);
6934
6992
  let ne;
@@ -7018,13 +7076,13 @@ const rt = [
7018
7076
  "2024-11-05",
7019
7077
  "2025-03-26",
7020
7078
  "2025-06-18"
7021
- ], Dn = ["draft"], Vi = [...rt, ...Dn], Ui = "2025-06-18", zo = rt[rt.length - 1], Jo = rt[0];
7079
+ ], Fn = ["draft"], Vi = [...rt, ...Fn], Ui = "2025-06-18", zo = rt[rt.length - 1], Jo = rt[0];
7022
7080
  function Hi(e, t) {
7023
7081
  return e === t ? 0 : e < t ? -1 : 1;
7024
7082
  }
7025
7083
  const qo = {
7026
7084
  stableVersions: [...rt],
7027
- draftVersions: [...Dn],
7085
+ draftVersions: [...Fn],
7028
7086
  allSupportedVersions: [...Vi],
7029
7087
  unsupportedVersions: [
7030
7088
  "2020-01-01",
@@ -7057,18 +7115,18 @@ const qo = {
7057
7115
  }
7058
7116
  };
7059
7117
  var he = ye("Zod Compatibility");
7060
- function Rr(e, t = "Schema") {
7118
+ function Hr(e, t = "Schema") {
7061
7119
  process.env.MCP_DEBUG && (he.error(`[Zod Compatibility Debug] ${t} structure:`), he.error(` - Type: ${typeof e}`), he.error(` - Constructor: ${e?.constructor?.name}`), he.error(` - Has shape: ${!!e?.shape}`), he.error(` - Has _def: ${!!e?._def}`), he.error(` - _def.typeName: ${e?._def?.typeName}`), he.error(` - _def.type: ${e?._def?.type}`), he.error(` - Has parse: ${typeof e?.parse}`), he.error(` - Has safeParse: ${typeof e?.safeParse}`), e?.shape && he.error(` - Shape keys: ${Object.keys(e.shape)}`));
7062
7120
  }
7063
- function Wr(e) {
7121
+ function Gr(e) {
7064
7122
  try {
7065
7123
  return typeof e?.parse != "function" ? (he.warn("[Zod Compatibility] Schema missing parse method"), !1) : typeof e?.safeParse != "function" ? (he.warn("[Zod Compatibility] Schema missing safeParse method"), !1) : (e?._def?.typeName === "ZodObject" || e?._def?.type === "object") && !e?.shape ? (he.warn("[Zod Compatibility] ZodObject schema missing shape property"), !1) : !0;
7066
7124
  } catch (t) {
7067
7125
  return he.error("[Zod Compatibility] Error validating schema compatibility:", t), !1;
7068
7126
  }
7069
7127
  }
7070
- var Gi = /* @__PURE__ */ _t({ McpLifecycleManager: () => An }, 1), An, zi = pe((() => {
7071
- An = class {
7128
+ var Gi = /* @__PURE__ */ Ot({ McpLifecycleManager: () => In }, 1), In, zi = pe((() => {
7129
+ In = class {
7072
7130
  constructor(e, t, r, n) {
7073
7131
  this.events = e, this.logger = t, this.serverInfo = r, this.argParser = n, this.state = {
7074
7132
  initialized: !1,
@@ -7176,7 +7234,7 @@ var Gi = /* @__PURE__ */ _t({ McpLifecycleManager: () => An }, 1), An, zi = pe((
7176
7234
  return this.state.ready && !this.state.shuttingDown;
7177
7235
  }
7178
7236
  };
7179
- })), Ji = class Ye extends wt {
7237
+ })), Ji = class Ye extends bt {
7180
7238
  constructor(...t) {
7181
7239
  super(...t), this._mcpTools = /* @__PURE__ */ new Map(), this._tools = /* @__PURE__ */ new Map(), this._outputSchemaMap = /* @__PURE__ */ new Map(), this._mcpProtocolVersion = Ui;
7182
7240
  }
@@ -7196,7 +7254,7 @@ var Gi = /* @__PURE__ */ _t({ McpLifecycleManager: () => An }, 1), An, zi = pe((
7196
7254
  const r = this._mcpServerConfig;
7197
7255
  if (t) return {
7198
7256
  prefix: "MCP Server Creation",
7199
- logToFile: Te(t),
7257
+ logToFile: _e(t),
7200
7258
  level: "error",
7201
7259
  mcpMode: !0
7202
7260
  };
@@ -7207,15 +7265,15 @@ var Gi = /* @__PURE__ */ _t({ McpLifecycleManager: () => An }, 1), An, zi = pe((
7207
7265
  level: "error",
7208
7266
  mcpMode: !0
7209
7267
  };
7210
- return n && r.log && (typeof r.log == "string" ? s.logToFile = Te(r.log) : s = {
7268
+ return n && r.log && (typeof r.log == "string" ? s.logToFile = _e(r.log) : s = {
7211
7269
  ...s,
7212
7270
  ...r.log,
7213
- ...r.log.logToFile && { logToFile: Te(r.log.logToFile) }
7214
- }), o && r.logPath && !s.logToFile && (s.logToFile = Te(r.logPath)), o && r.logPath && n && r.log && typeof r.log == "object" && r.log.logToFile && (s.logToFile = Te(r.logPath)), s;
7271
+ ...r.log.logToFile && { logToFile: _e(r.log.logToFile) }
7272
+ }), o && r.logPath && !s.logToFile && (s.logToFile = _e(r.logPath)), o && r.logPath && n && r.log && typeof r.log == "object" && r.log.logToFile && (s.logToFile = _e(r.logPath)), s;
7215
7273
  }
7216
7274
  return {
7217
7275
  prefix: "MCP Server Creation",
7218
- logToFile: Te("./logs/mcp.log"),
7276
+ logToFile: _e("./logs/mcp.log"),
7219
7277
  level: "error",
7220
7278
  mcpMode: !0
7221
7279
  };
@@ -7226,7 +7284,7 @@ var Gi = /* @__PURE__ */ _t({ McpLifecycleManager: () => An }, 1), An, zi = pe((
7226
7284
  * @returns This ArgParser instance for chaining
7227
7285
  */
7228
7286
  setDefaultOutputSchema(t) {
7229
- return this._defaultOutputSchema = Oe(t), this;
7287
+ return this._defaultOutputSchema = De(t), this;
7230
7288
  }
7231
7289
  /**
7232
7290
  * Set an output schema for a specific tool/command
@@ -7235,7 +7293,7 @@ var Gi = /* @__PURE__ */ _t({ McpLifecycleManager: () => An }, 1), An, zi = pe((
7235
7293
  * @returns This ArgParser instance for chaining
7236
7294
  */
7237
7295
  setOutputSchema(t, r) {
7238
- return this._outputSchemaMap.set(t, Oe(r)), this;
7296
+ return this._outputSchemaMap.set(t, De(r)), this;
7239
7297
  }
7240
7298
  /**
7241
7299
  * Enable automatic output schema generation for MCP tools
@@ -7272,7 +7330,7 @@ var Gi = /* @__PURE__ */ _t({ McpLifecycleManager: () => An }, 1), An, zi = pe((
7272
7330
  addTool(t) {
7273
7331
  if (!t.name || typeof t.name != "string") throw new Error("Tool name is required and must be a string");
7274
7332
  if (!t.handler || typeof t.handler != "function") throw new Error("Tool handler is required and must be a function");
7275
- const r = rr(t.name);
7333
+ const r = ir(t.name);
7276
7334
  if (r !== t.name && console.warn(`[ArgParser] Tool name '${t.name}' was sanitized to '${r}' for MCP compatibility`), this._tools.has(r)) throw new Error(`Tool with name '${r}' already exists`);
7277
7335
  if (!Array.isArray(t.flags)) throw new Error("Tool flags must be an array");
7278
7336
  const n = {
@@ -7286,7 +7344,7 @@ var Gi = /* @__PURE__ */ _t({ McpLifecycleManager: () => An }, 1), An, zi = pe((
7286
7344
  * @private
7287
7345
  */
7288
7346
  #n(t) {
7289
- const r = new wt({
7347
+ const r = new bt({
7290
7348
  appName: `${this.getAppName()} ${t.name}`,
7291
7349
  description: t.description || `Execute ${t.name} tool`,
7292
7350
  handler: t.handler
@@ -7308,7 +7366,7 @@ var Gi = /* @__PURE__ */ _t({ McpLifecycleManager: () => An }, 1), An, zi = pe((
7308
7366
  console.warn(`[DEPRECATED] addMcpTool() is deprecated and will be removed in v2.0.
7309
7367
  Please use addTool() instead for a unified CLI/MCP experience.
7310
7368
  Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-MIGRATION.md`);
7311
- const r = rr(t.name);
7369
+ const r = ir(t.name);
7312
7370
  if (r !== t.name && console.warn(`[ArgParser] Tool name '${t.name}' was sanitized to '${r}' for MCP compatibility`), this._mcpTools.has(r)) throw new Error(`MCP tool with name '${r}' already exists`);
7313
7371
  const n = {
7314
7372
  ...t,
@@ -7337,7 +7395,7 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7337
7395
  * @returns Object with tool counts and names for debugging
7338
7396
  */
7339
7397
  getToolInfo(t) {
7340
- const r = Br(this, t), n = Array.from(this._tools.keys()), o = Array.from(this._mcpTools.keys()), s = r.map((l) => l.name), i = [
7398
+ const r = Ur(this, t), n = Array.from(this._tools.keys()), o = Array.from(this._mcpTools.keys()), s = r.map((l) => l.name), i = [
7341
7399
  ...n,
7342
7400
  ...o,
7343
7401
  ...s
@@ -7424,12 +7482,12 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7424
7482
  },
7425
7483
  defaultOutputSchema: t?.defaultOutputSchema || this._defaultOutputSchema,
7426
7484
  autoGenerateOutputSchema: t?.autoGenerateOutputSchema ?? this._autoGenerateOutputSchema
7427
- }, n = Br(this, r), o = Array.from(this._tools.values()).map((i) => {
7485
+ }, n = Ur(this, r), o = Array.from(this._tools.values()).map((i) => {
7428
7486
  let a;
7429
- return r.outputSchemaMap?.[i.name] ? a = r.outputSchemaMap[i.name] : i.outputSchema ? (process.env.MCP_DEBUG && (this.logger.error(`[MCP Debug] Tool '${i.name}' has outputSchema:`, typeof i.outputSchema), this.logger.error("[MCP Debug] outputSchema has _def:", !!(i.outputSchema && typeof i.outputSchema == "object" && "_def" in i.outputSchema))), a = Oe(i.outputSchema), process.env.MCP_DEBUG && this.logger.error(`[MCP Debug] Created output schema for '${i.name}':`, !!a)) : r.defaultOutputSchema ? a = r.defaultOutputSchema : r.autoGenerateOutputSchema && (typeof r.autoGenerateOutputSchema == "string" ? a = Oe(r.autoGenerateOutputSchema) : r.autoGenerateOutputSchema === !0 && (a = Oe("successWithData"))), a && !this.supportsOutputSchemas() && (process.env.MCP_DEBUG && this.logger.error(`[MCP Debug] Output schema for '${i.name}' removed due to MCP version ${this._mcpProtocolVersion} not supporting output schemas`), a = void 0), {
7487
+ return r.outputSchemaMap?.[i.name] ? a = r.outputSchemaMap[i.name] : i.outputSchema ? (process.env.MCP_DEBUG && (this.logger.error(`[MCP Debug] Tool '${i.name}' has outputSchema:`, typeof i.outputSchema), this.logger.error("[MCP Debug] outputSchema has _def:", !!(i.outputSchema && typeof i.outputSchema == "object" && "_def" in i.outputSchema))), a = De(i.outputSchema), process.env.MCP_DEBUG && this.logger.error(`[MCP Debug] Created output schema for '${i.name}':`, !!a)) : r.defaultOutputSchema ? a = r.defaultOutputSchema : r.autoGenerateOutputSchema && (typeof r.autoGenerateOutputSchema == "string" ? a = De(r.autoGenerateOutputSchema) : r.autoGenerateOutputSchema === !0 && (a = De("successWithData"))), a && !this.supportsOutputSchemas() && (process.env.MCP_DEBUG && this.logger.error(`[MCP Debug] Output schema for '${i.name}' removed due to MCP version ${this._mcpProtocolVersion} not supporting output schemas`), a = void 0), {
7430
7488
  name: i.name,
7431
7489
  description: i.description || `Executes the ${i.name} tool.`,
7432
- inputSchema: Lr(i.flags),
7490
+ inputSchema: Vr(i.flags),
7433
7491
  outputSchema: a,
7434
7492
  execute: async (l) => {
7435
7493
  const c = globalThis.console;
@@ -7463,7 +7521,7 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7463
7521
  text: JSON.stringify(x, null, 2)
7464
7522
  }],
7465
7523
  structuredContent: x
7466
- } : nr(x);
7524
+ } : or(x);
7467
7525
  } catch (u) {
7468
7526
  const f = `Tool '${i.name}' execution failed: ${u instanceof Error ? u.message : String(u)}`;
7469
7527
  return process.env.MCP_DEBUG && (this.logger.error(`[MCP Tool Error] ${f}`), u instanceof Error && u.stack && this.logger.error(`[MCP Tool Stack] ${u.stack}`)), Le(f);
@@ -7486,7 +7544,7 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7486
7544
  text: JSON.stringify(c, null, 2)
7487
7545
  }],
7488
7546
  structuredContent: c
7489
- } : nr(c);
7547
+ } : or(c);
7490
7548
  } catch (l) {
7491
7549
  const c = `Tool '${i.name}' execution failed: ${l instanceof Error ? l.message : String(l)}`;
7492
7550
  return process.env.MCP_DEBUG && this.logger.error(`[MCP Tool Error] ${c}`), Le(c);
@@ -7568,14 +7626,14 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7568
7626
  s.mcpError(`Registering tool: ${h.name}`);
7569
7627
  let v;
7570
7628
  const b = Array.from(this._tools.values()).find((j) => j.name === h.name), g = Array.from(this._mcpTools.values()).find((j) => j.name === h.name);
7571
- b && b.flags ? v = Lr(b.flags) : g && g.inputSchema ? v = g.inputSchema : v = O.object({});
7629
+ b && b.flags ? v = Vr(b.flags) : g && g.inputSchema ? v = g.inputSchema : v = O.object({});
7572
7630
  let w;
7573
7631
  try {
7574
7632
  process.env.MCP_DEBUG && (this.logger.error(`[MCP Debug] Preparing schema for tool ${h.name}`), this.logger.error("[MCP Debug] Input zodSchema:", v)), w = v, process.env.MCP_DEBUG && this.logger.error(`[MCP Debug] Successfully prepared schema for tool ${h.name}`);
7575
7633
  } catch (j) {
7576
7634
  throw this.logger.error(`[MCP Debug] Error preparing schema for tool ${h.name}:`, j), j;
7577
7635
  }
7578
- process.env.MCP_DEBUG && (this.logger.error(`[MCP Debug] Prepared mcpCompatibleSchema for tool ${h.name}:`, JSON.stringify(w, null, 2)), this.logger.error("[MCP Debug] Schema properties:", Object.keys(w || {})), this.logger.error("[MCP Debug] Schema def:", w?.def), this.logger.error("[MCP Debug] Schema shape:", w?.shape), this.logger.error("[MCP Debug] Schema parse function:", typeof w?.parse)), process.env.MCP_DEBUG && (this.logger.error(`[MCP Debug] About to prepare schema for tool ${h.name}`), this.logger.error("[MCP Debug] zodSchema type:", typeof v), this.logger.error("[MCP Debug] zodSchema:", v), this.logger.error("[MCP Debug] zodSchema constructor:", v?.constructor?.name)), Rr(w, `Tool ${h.name} schema`), Wr(w) || s.mcpError(`Warning: Schema for tool ${h.name} may not be fully compatible with MCP SDK`);
7636
+ process.env.MCP_DEBUG && (this.logger.error(`[MCP Debug] Prepared mcpCompatibleSchema for tool ${h.name}:`, JSON.stringify(w, null, 2)), this.logger.error("[MCP Debug] Schema properties:", Object.keys(w || {})), this.logger.error("[MCP Debug] Schema def:", w?.def), this.logger.error("[MCP Debug] Schema shape:", w?.shape), this.logger.error("[MCP Debug] Schema parse function:", typeof w?.parse)), process.env.MCP_DEBUG && (this.logger.error(`[MCP Debug] About to prepare schema for tool ${h.name}`), this.logger.error("[MCP Debug] zodSchema type:", typeof v), this.logger.error("[MCP Debug] zodSchema:", v), this.logger.error("[MCP Debug] zodSchema constructor:", v?.constructor?.name)), Hr(w, `Tool ${h.name} schema`), Gr(w) || s.mcpError(`Warning: Schema for tool ${h.name} may not be fully compatible with MCP SDK`);
7579
7637
  const $ = {
7580
7638
  title: h.name,
7581
7639
  description: h.description || "No description provided.",
@@ -7586,7 +7644,7 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7586
7644
  description: h.description,
7587
7645
  inputSchema: w
7588
7646
  })), h.outputSchema && this.supportsOutputSchemas()) {
7589
- const j = Oe(h.outputSchema);
7647
+ const j = De(h.outputSchema);
7590
7648
  $.outputSchema = j, process.env.MCP_DEBUG && (this.logger.error(`[MCP Debug] Including outputSchema for tool '${h.name}':`, typeof h.outputSchema), this.logger.error("[MCP Debug] Converted outputSchema constructor:", j?.constructor?.name), this.logger.error("[MCP Debug] supportsOutputSchemas():", this.supportsOutputSchemas()));
7591
7649
  } else process.env.MCP_DEBUG && this.logger.error(`[MCP Debug] NOT including outputSchema for tool '${h.name}':`, `hasOutputSchema=${!!h.outputSchema}, supportsOutputSchemas=${this.supportsOutputSchemas()}`);
7592
7650
  const I = async (j) => {
@@ -7657,8 +7715,8 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7657
7715
  } catch (w) {
7658
7716
  throw this.logger.error(`[MCP Debug] Error preparing schema for prompt ${h.name}:`, w), w;
7659
7717
  }
7660
- if (!Wr(v)) throw new Error(`Schema validation failed for prompt ${h.name}`);
7661
- process.env.MCP_DEBUG && Rr(v, `prompt ${h.name}`);
7718
+ if (!Gr(v)) throw new Error(`Schema validation failed for prompt ${h.name}`);
7719
+ process.env.MCP_DEBUG && Hr(v, `prompt ${h.name}`);
7662
7720
  const b = {
7663
7721
  title: h.title || h.name,
7664
7722
  description: h.description || "No description provided.",
@@ -7744,7 +7802,7 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7744
7802
  * Private helper method to start a single transport
7745
7803
  */
7746
7804
  async #r(t, r, n, o) {
7747
- const s = ye("MCP Transport", Te(o || "./logs/mcp.log"));
7805
+ const s = ye("MCP Transport", _e(o || "./logs/mcp.log"));
7748
7806
  try {
7749
7807
  switch (s.mcpError(`Starting ${n.type} transport for server: ${r.name}`), n.type) {
7750
7808
  case "stdio": {
@@ -7872,7 +7930,7 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7872
7930
  }
7873
7931
  async parse(t, r) {
7874
7932
  re.log("ArgParser.parse() called with args:", t), re.log("About to call ArgParserBase.prototype.parse.call()");
7875
- let n = await wt.prototype.parse.call(this, t, r);
7933
+ let n = await bt.prototype.parse.call(this, t, r);
7876
7934
  return re.log("ArgParserBase.prototype.parse.call() returned:", typeof n), n._fuzzyModePreventedExecution || r?.deep !== !1 && n._asyncHandlerPromise && (n = await this.#o(n)), n;
7877
7935
  }
7878
7936
  /**
@@ -7994,7 +8052,7 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7994
8052
  } catch (f) {
7995
8053
  u.mcpError(`Error in MCP handler: ${f instanceof Error ? f.message : String(f)}`), f instanceof Error && f.stack && u.mcpError(`Stack trace: ${f.stack}`), process.exit(1);
7996
8054
  }
7997
- }, c = new wt({}, []);
8055
+ }, c = new bt({}, []);
7998
8056
  return this.addSubCommand({
7999
8057
  name: t,
8000
8058
  description: `Start ${r.name} as an MCP server`,
@@ -8075,8 +8133,8 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
8075
8133
  function Yo(e, t) {
8076
8134
  return qi.withMcp(e, t);
8077
8135
  }
8078
- Ct();
8079
8136
  Mt();
8137
+ Pt();
8080
8138
  var Zo = class {
8081
8139
  constructor(e, t = {}) {
8082
8140
  this.parser = e, this.options = {
@@ -8314,20 +8372,20 @@ var Zo = class {
8314
8372
  };
8315
8373
  export {
8316
8374
  Ji as ArgParser,
8317
- wt as ArgParserBase,
8375
+ bt as ArgParserBase,
8318
8376
  Se as ArgParserError,
8319
8377
  Zo as ArgParserFuzzyTester,
8320
8378
  qi as ArgParserMcp,
8321
8379
  Ze as ConfigPlugin,
8322
- js as ConfigPluginRegistry,
8380
+ Ns as ConfigPluginRegistry,
8323
8381
  ge as DxtPathResolver,
8324
- Zr as EnvConfigPlugin,
8325
- Nt as FlagInheritance,
8326
- Us as FlagManager,
8327
- Yr as JsonConfigPlugin,
8382
+ en as EnvConfigPlugin,
8383
+ kt as FlagInheritance,
8384
+ zs as FlagManager,
8385
+ Qr as JsonConfigPlugin,
8328
8386
  io as Logger,
8329
- kt as OutputSchemaPatterns,
8330
- Ht as PromptManager,
8387
+ Lt as OutputSchemaPatterns,
8388
+ zt as PromptManager,
8331
8389
  E as SimpleChalk,
8332
8390
  Ke as TomlConfigPlugin,
8333
8391
  Qe as YamlConfigPlugin,
@@ -8335,36 +8393,36 @@ export {
8335
8393
  Uo as autoHelpHandler,
8336
8394
  Ri as convertFlagToJsonSchemaProperty,
8337
8395
  Go as convertFlagsToJsonSchema,
8338
- Lr as convertFlagsToZodSchema,
8396
+ Vr as convertFlagsToZodSchema,
8339
8397
  oo as createCliLogger,
8340
8398
  Yo as createMcpArgParser,
8341
8399
  Le as createMcpErrorResponse,
8342
8400
  ao as createMcpLogger,
8343
- nr as createMcpSuccessResponse,
8344
- Oe as createOutputSchema,
8345
- _s as createTomlPlugin,
8346
- Os as createTomlPluginAsync,
8347
- Ds as createYamlPlugin,
8348
- As as createYamlPluginAsync,
8401
+ or as createMcpSuccessResponse,
8402
+ De as createOutputSchema,
8403
+ As as createTomlPlugin,
8404
+ js as createTomlPluginAsync,
8405
+ Fs as createYamlPlugin,
8406
+ Is as createYamlPluginAsync,
8349
8407
  Eo as cwdRelative,
8350
8408
  re as debug,
8351
- Zt as detectEntryPoint,
8409
+ Kt as detectEntryPoint,
8352
8410
  xo as enableConfigPlugins,
8353
8411
  wo as enableOptionalConfigPlugins,
8354
8412
  bo as enableOptionalConfigPluginsAsync,
8355
8413
  $o as entryRelative,
8356
8414
  Wi as extractSimplifiedResponse,
8357
- Br as generateMcpToolsFromArgParser,
8415
+ Ur as generateMcpToolsFromArgParser,
8358
8416
  So as getEntryPointFromImportMeta,
8359
- St as getJsonSchemaTypeFromFlag,
8417
+ $t as getJsonSchemaTypeFromFlag,
8360
8418
  $e as globalConfigPluginRegistry,
8361
8419
  Ho as isValidMcpToolName,
8362
8420
  Mo as legacyCwdPath,
8363
8421
  lo as logger,
8364
- Te as resolveLogPath,
8365
- rr as sanitizeMcpToolName,
8366
- Is as zodDxtOptionsSchema,
8367
- Ns as zodFlagSchema
8422
+ _e as resolveLogPath,
8423
+ ir as sanitizeMcpToolName,
8424
+ Ls as zodDxtOptionsSchema,
8425
+ Bs as zodFlagSchema
8368
8426
  };
8369
8427
 
8370
8428
  //# sourceMappingURL=index.min.mjs.map