storybook 9.0.0-alpha.11 → 9.0.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/assets/docs/addon-backgrounds.gif +0 -0
  2. package/assets/docs/highlight.png +0 -0
  3. package/bin/index.cjs +2 -2
  4. package/dist/actions/preview.d.ts +0 -1
  5. package/dist/backgrounds/index.cjs +148 -0
  6. package/dist/backgrounds/index.d.ts +91 -0
  7. package/dist/backgrounds/index.js +130 -0
  8. package/dist/backgrounds/preview.cjs +143 -0
  9. package/dist/backgrounds/preview.d.ts +54 -0
  10. package/dist/backgrounds/preview.js +127 -0
  11. package/dist/bin/index.cjs +49 -61
  12. package/dist/bin/index.js +49 -61
  13. package/dist/builder-manager/index.cjs +390 -380
  14. package/dist/builder-manager/index.js +489 -479
  15. package/dist/channels/index.cjs +17 -17
  16. package/dist/channels/index.js +3 -3
  17. package/dist/cli/bin/index.cjs +225 -225
  18. package/dist/cli/bin/index.js +234 -234
  19. package/dist/cli/index.cjs +1904 -1909
  20. package/dist/cli/index.d.ts +3 -7
  21. package/dist/cli/index.js +734 -739
  22. package/dist/common/index.cjs +2401 -2388
  23. package/dist/common/index.d.ts +1 -13
  24. package/dist/common/index.js +2609 -2596
  25. package/dist/components/index.cjs +5701 -5946
  26. package/dist/components/index.d.ts +3 -254
  27. package/dist/components/index.js +7271 -13724
  28. package/dist/controls/preview.d.ts +0 -1
  29. package/dist/core-events/index.cjs +91 -106
  30. package/dist/core-events/index.d.ts +2 -80
  31. package/dist/core-events/index.js +79 -94
  32. package/dist/core-server/index.cjs +5221 -5122
  33. package/dist/core-server/index.d.ts +32 -23
  34. package/dist/core-server/index.js +6511 -6412
  35. package/dist/core-server/presets/common-manager.js +9815 -12
  36. package/dist/core-server/presets/common-preset.cjs +2817 -2989
  37. package/dist/core-server/presets/common-preset.js +2896 -3068
  38. package/dist/csf/index.d.ts +0 -2
  39. package/dist/csf-tools/index.cjs +0 -8
  40. package/dist/csf-tools/index.d.ts +0 -4
  41. package/dist/csf-tools/index.js +0 -8
  42. package/dist/docs-tools/index.cjs +626 -600
  43. package/dist/docs-tools/index.js +613 -587
  44. package/dist/highlight/index.cjs +27 -0
  45. package/dist/highlight/index.d.ts +17 -0
  46. package/dist/highlight/index.js +7 -0
  47. package/dist/highlight/preview.cjs +81 -0
  48. package/dist/highlight/preview.d.ts +54 -0
  49. package/dist/highlight/preview.js +67 -0
  50. package/dist/instrumenter/index.cjs +70 -60
  51. package/dist/instrumenter/index.d.ts +8 -7
  52. package/dist/instrumenter/index.js +98 -88
  53. package/dist/manager/globals-module-info.cjs +21 -33
  54. package/dist/manager/globals-module-info.js +6 -18
  55. package/dist/manager/globals-runtime.js +22671 -22006
  56. package/dist/manager/runtime.js +4996 -4581
  57. package/dist/manager-api/index.cjs +1289 -1384
  58. package/dist/manager-api/index.d.ts +109 -114
  59. package/dist/manager-api/index.js +920 -1021
  60. package/dist/measure/index.cjs +474 -0
  61. package/dist/measure/index.d.ts +66 -0
  62. package/dist/measure/index.js +462 -0
  63. package/dist/measure/preview.cjs +464 -0
  64. package/dist/measure/preview.d.ts +59 -0
  65. package/dist/measure/preview.js +448 -0
  66. package/dist/outline/index.cjs +528 -0
  67. package/dist/outline/index.d.ts +66 -0
  68. package/dist/outline/index.js +500 -0
  69. package/dist/outline/preview.cjs +518 -0
  70. package/dist/outline/preview.d.ts +59 -0
  71. package/dist/outline/preview.js +486 -0
  72. package/dist/preview/runtime.js +14340 -13357
  73. package/dist/preview-api/index.cjs +1201 -1321
  74. package/dist/preview-api/index.d.ts +66 -120
  75. package/dist/preview-api/index.js +1546 -1665
  76. package/dist/telemetry/index.d.ts +1 -1
  77. package/dist/test/index.cjs +1547 -1546
  78. package/dist/test/index.js +2308 -2307
  79. package/dist/test/preview.cjs +1906 -1905
  80. package/dist/test/preview.d.ts +0 -6
  81. package/dist/test/preview.js +1439 -1438
  82. package/dist/test/spy.cjs +65 -64
  83. package/dist/test/spy.js +59 -58
  84. package/dist/types/index.cjs +11 -12
  85. package/dist/types/index.d.ts +502 -298
  86. package/dist/types/index.js +1 -2
  87. package/dist/viewport/preview.d.ts +0 -1
  88. package/package.json +124 -19
  89. package/dist/actions/manager.js +0 -1196
  90. package/dist/component-testing/manager.js +0 -3099
  91. package/dist/controls/manager.js +0 -5545
  92. package/dist/viewport/manager.js +0 -400
  93. /package/dist/{component-testing/manager.css → core-server/presets/common-manager.css} +0 -0
@@ -9,7 +9,7 @@ var N = Object.defineProperty;
9
9
  var He = Object.getOwnPropertyDescriptor;
10
10
  var De = Object.getOwnPropertyNames;
11
11
  var Pe = Object.getPrototypeOf, Ie = Object.prototype.hasOwnProperty;
12
- var d = (n, e) => N(n, "name", { value: e, configurable: !0 }), C = /* @__PURE__ */ ((n) => typeof require < "u" ? require : typeof Proxy < "\
12
+ var l = (n, e) => N(n, "name", { value: e, configurable: !0 }), C = /* @__PURE__ */ ((n) => typeof require < "u" ? require : typeof Proxy < "\
13
13
  u" ? new Proxy(n, {
14
14
  get: (e, t) => (typeof require < "u" ? require : e)[t]
15
15
  }) : n)(function(n) {
@@ -23,7 +23,7 @@ var Ne = (n, e, t, i) => {
23
23
  !Ie.call(n, s) && s !== t && N(n, s, { get: () => e[s], enumerable: !(i = He(e, s)) || i.enumerable });
24
24
  return n;
25
25
  };
26
- var $ = (n, e, t) => (t = n != null ? Ve(Pe(n)) : {}, Ne(
26
+ var q = (n, e, t) => (t = n != null ? Ve(Pe(n)) : {}, Ne(
27
27
  // If the importer is in node compatibility mode or this is not an ESM
28
28
  // file that has been converted to a CommonJS file using a Babel-
29
29
  // compatible transform (i.e. "__esModule" has not been set), then set
@@ -34,9 +34,9 @@ var $ = (n, e, t) => (t = n != null ? Ve(Pe(n)) : {}, Ne(
34
34
 
35
35
  // ../node_modules/commander/lib/error.js
36
36
  var j = b((F) => {
37
- var q = class extends Error {
37
+ var $ = class extends Error {
38
38
  static {
39
- d(this, "CommanderError");
39
+ l(this, "CommanderError");
40
40
  }
41
41
  /**
42
42
  * Constructs the CommanderError class
@@ -48,9 +48,9 @@ var j = b((F) => {
48
48
  super(i), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name, this.code = t, this.exitCode = e, this.nestedError =
49
49
  void 0;
50
50
  }
51
- }, T = class extends q {
51
+ }, T = class extends $ {
52
52
  static {
53
- d(this, "InvalidArgumentError");
53
+ l(this, "InvalidArgumentError");
54
54
  }
55
55
  /**
56
56
  * Constructs the InvalidArgumentError class
@@ -60,7 +60,7 @@ var j = b((F) => {
60
60
  super(1, "commander.invalidArgument", e), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name;
61
61
  }
62
62
  };
63
- F.CommanderError = q;
63
+ F.CommanderError = $;
64
64
  F.InvalidArgumentError = T;
65
65
  });
66
66
 
@@ -68,7 +68,7 @@ var j = b((F) => {
68
68
  var V = b((M) => {
69
69
  var { InvalidArgumentError: Te } = j(), B = class {
70
70
  static {
71
- d(this, "Argument");
71
+ l(this, "Argument");
72
72
  }
73
73
  /**
74
74
  * Initialize a new command argument with the given name and description.
@@ -162,7 +162,7 @@ var V = b((M) => {
162
162
  let e = n.name() + (n.variadic === !0 ? "..." : "");
163
163
  return n.required ? "<" + e + ">" : "[" + e + "]";
164
164
  }
165
- d(Fe, "humanReadableArgName");
165
+ l(Fe, "humanReadableArgName");
166
166
  M.Argument = B;
167
167
  M.humanReadableArgName = Fe;
168
168
  });
@@ -171,7 +171,7 @@ var V = b((M) => {
171
171
  var W = b((ae) => {
172
172
  var { humanReadableArgName: Be } = V(), L = class {
173
173
  static {
174
- d(this, "Help");
174
+ l(this, "Help");
175
175
  }
176
176
  constructor() {
177
177
  this.helpWidth = void 0, this.sortSubcommands = !1, this.sortOptions = !1, this.showGlobalOptions = !1;
@@ -194,7 +194,7 @@ var W = b((ae) => {
194
194
  * @returns {number}
195
195
  */
196
196
  compareOptions(e, t) {
197
- let i = /* @__PURE__ */ d((s) => s.short ? s.short.replace(/^-/, "") : s.long.replace(/^--/, ""), "getSortKey");
197
+ let i = /* @__PURE__ */ l((s) => s.short ? s.short.replace(/^-/, "") : s.long.replace(/^--/, ""), "getSortKey");
198
198
  return i(e).localeCompare(i(t));
199
199
  }
200
200
  /**
@@ -389,51 +389,51 @@ var W = b((ae) => {
389
389
  */
390
390
  formatHelp(e, t) {
391
391
  let i = t.padWidth(e, t), s = t.helpWidth || 80, r = 2, o = 2;
392
- function l(f, y) {
393
- if (y) {
394
- let I = `${f.padEnd(i + o)}${y}`;
392
+ function d(g, _) {
393
+ if (_) {
394
+ let I = `${g.padEnd(i + o)}${_}`;
395
395
  return t.wrap(
396
396
  I,
397
397
  s - r,
398
398
  i + o
399
399
  );
400
400
  }
401
- return f;
401
+ return g;
402
402
  }
403
- d(l, "formatItem");
404
- function a(f) {
405
- return f.join(`
403
+ l(d, "formatItem");
404
+ function a(g) {
405
+ return g.join(`
406
406
  `).replace(/^/gm, " ".repeat(r));
407
407
  }
408
- d(a, "formatList");
409
- let c = [`Usage: ${t.commandUsage(e)}`, ""], p = t.commandDescription(e);
410
- p.length > 0 && (c = c.concat([
411
- t.wrap(p, s, 0),
408
+ l(a, "formatList");
409
+ let c = [`Usage: ${t.commandUsage(e)}`, ""], u = t.commandDescription(e);
410
+ u.length > 0 && (c = c.concat([
411
+ t.wrap(u, s, 0),
412
412
  ""
413
413
  ]));
414
- let u = t.visibleArguments(e).map((f) => l(
415
- t.argumentTerm(f),
416
- t.argumentDescription(f)
414
+ let p = t.visibleArguments(e).map((g) => d(
415
+ t.argumentTerm(g),
416
+ t.argumentDescription(g)
417
417
  ));
418
- u.length > 0 && (c = c.concat(["Arguments:", a(u), ""]));
419
- let m = t.visibleOptions(e).map((f) => l(
420
- t.optionTerm(f),
421
- t.optionDescription(f)
418
+ p.length > 0 && (c = c.concat(["Arguments:", a(p), ""]));
419
+ let m = t.visibleOptions(e).map((g) => d(
420
+ t.optionTerm(g),
421
+ t.optionDescription(g)
422
422
  ));
423
423
  if (m.length > 0 && (c = c.concat(["Options:", a(m), ""])), this.showGlobalOptions) {
424
- let f = t.visibleGlobalOptions(e).map((y) => l(
425
- t.optionTerm(y),
426
- t.optionDescription(y)
424
+ let g = t.visibleGlobalOptions(e).map((_) => d(
425
+ t.optionTerm(_),
426
+ t.optionDescription(_)
427
427
  ));
428
- f.length > 0 && (c = c.concat([
428
+ g.length > 0 && (c = c.concat([
429
429
  "Global Options:",
430
- a(f),
430
+ a(g),
431
431
  ""
432
432
  ]));
433
433
  }
434
- let x = t.visibleCommands(e).map((f) => l(
435
- t.subcommandTerm(f),
436
- t.subcommandDescription(f)
434
+ let x = t.visibleCommands(e).map((g) => d(
435
+ t.subcommandTerm(g),
436
+ t.subcommandDescription(g)
437
437
  ));
438
438
  return x.length > 0 && (c = c.concat(["Commands:", a(x), ""])), c.join(`
439
439
  `);
@@ -467,17 +467,17 @@ var W = b((ae) => {
467
467
  wrap(e, t, i, s = 40) {
468
468
  let r = " \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF", o = new RegExp(`[\\n][${r}]+`);
469
469
  if (e.match(o)) return e;
470
- let l = t - i;
471
- if (l < s) return e;
470
+ let d = t - i;
471
+ if (d < s) return e;
472
472
  let a = e.slice(0, i), c = e.slice(i).replace(`\r
473
473
  `, `
474
- `), p = " ".repeat(i), m = "\\s\u200B", x = new RegExp(
474
+ `), u = " ".repeat(i), m = "\\s\u200B", x = new RegExp(
475
475
  `
476
- |.{1,${l - 1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,
476
+ |.{1,${d - 1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,
477
477
  "g"
478
- ), f = c.match(x) || [];
479
- return a + f.map((y, I) => y === `
480
- ` ? "" : (I > 0 ? p : "") + y.trimEnd()).join(`
478
+ ), g = c.match(x) || [];
479
+ return a + g.map((_, I) => _ === `
480
+ ` ? "" : (I > 0 ? u : "") + _.trimEnd()).join(`
481
481
  `);
482
482
  }
483
483
  };
@@ -488,7 +488,7 @@ var W = b((ae) => {
488
488
  var J = b((U) => {
489
489
  var { InvalidArgumentError: Me } = j(), R = class {
490
490
  static {
491
- d(this, "Option");
491
+ l(this, "Option");
492
492
  }
493
493
  /**
494
494
  * Initialize a new `Option` with the given `flags` and `description`.
@@ -659,7 +659,7 @@ var J = b((U) => {
659
659
  }
660
660
  }, G = class {
661
661
  static {
662
- d(this, "DualOptions");
662
+ l(this, "DualOptions");
663
663
  }
664
664
  /**
665
665
  * @param {Option[]} options
@@ -689,19 +689,19 @@ var J = b((U) => {
689
689
  function Le(n) {
690
690
  return n.split("-").reduce((e, t) => e + t[0].toUpperCase() + t.slice(1));
691
691
  }
692
- d(Le, "camelcase");
692
+ l(Le, "camelcase");
693
693
  function We(n) {
694
694
  let e, t, i = n.split(/[ |,]+/);
695
695
  return i.length > 1 && !/^[[<]/.test(i[1]) && (e = i.shift()), t = i.shift(), !e && /^-[^-]$/.test(t) && (e = t, t = void 0), { shortFlag: e,
696
696
  longFlag: t };
697
697
  }
698
- d(We, "splitOptionFlags");
698
+ l(We, "splitOptionFlags");
699
699
  U.Option = R;
700
700
  U.DualOptions = G;
701
701
  });
702
702
 
703
703
  // ../node_modules/commander/lib/suggestSimilar.js
704
- var de = b((le) => {
704
+ var le = b((de) => {
705
705
  function Re(n, e) {
706
706
  if (Math.abs(n.length - e.length) > 3)
707
707
  return Math.max(n.length, e.length);
@@ -724,7 +724,7 @@ var de = b((le) => {
724
724
  }
725
725
  return t[n.length][e.length];
726
726
  }
727
- d(Re, "editDistance");
727
+ l(Re, "editDistance");
728
728
  function Ge(n, e) {
729
729
  if (!e || e.length === 0) return "";
730
730
  e = Array.from(new Set(e));
@@ -733,23 +733,23 @@ var de = b((le) => {
733
733
  let i = [], s = 3, r = 0.4;
734
734
  return e.forEach((o) => {
735
735
  if (o.length <= 1) return;
736
- let l = Re(n, o), a = Math.max(n.length, o.length);
737
- (a - l) / a > r && (l < s ? (s = l, i = [o]) : l === s && i.push(o));
738
- }), i.sort((o, l) => o.localeCompare(l)), t && (i = i.map((o) => `--${o}`)), i.length > 1 ? `
736
+ let d = Re(n, o), a = Math.max(n.length, o.length);
737
+ (a - d) / a > r && (d < s ? (s = d, i = [o]) : d === s && i.push(o));
738
+ }), i.sort((o, d) => o.localeCompare(d)), t && (i = i.map((o) => `--${o}`)), i.length > 1 ? `
739
739
  (Did you mean one of ${i.join(", ")}?)` : i.length === 1 ? `
740
740
  (Did you mean ${i[0]}?)` : "";
741
741
  }
742
- d(Ge, "suggestSimilar");
743
- le.suggestSimilar = Ge;
742
+ l(Ge, "suggestSimilar");
743
+ de.suggestSimilar = Ge;
744
744
  });
745
745
 
746
746
  // ../node_modules/commander/lib/command.js
747
747
  var me = b((he) => {
748
- var Ue = C("node:events").EventEmitter, Y = C("node:child_process"), _ = C("node:path"), z = C("node:fs"), h = C("node:process"), { Argument: Je,
749
- humanReadableArgName: Ye } = V(), { CommanderError: K } = j(), { Help: ze } = W(), { Option: ce, DualOptions: Ke } = J(), { suggestSimilar: pe } = de(),
748
+ var Ue = C("node:events").EventEmitter, Y = C("node:child_process"), v = C("node:path"), z = C("node:fs"), h = C("node:process"), { Argument: Je,
749
+ humanReadableArgName: Ye } = V(), { CommanderError: K } = j(), { Help: ze } = W(), { Option: ce, DualOptions: Ke } = J(), { suggestSimilar: ue } = le(),
750
750
  Q = class n extends Ue {
751
751
  static {
752
- d(this, "Command");
752
+ l(this, "Command");
753
753
  }
754
754
  /**
755
755
  * Initialize a new `Command`.
@@ -764,11 +764,11 @@ var me = b((he) => {
764
764
  null, this._aliases = [], this._combineFlagAndOptionalValue = !0, this._description = "", this._summary = "", this._argsDescription = void 0,
765
765
  this._enablePositionalOptions = !1, this._passThroughOptions = !1, this._lifeCycleHooks = {}, this._showHelpAfterError = !1, this._showSuggestionAfterError =
766
766
  !0, this._outputConfiguration = {
767
- writeOut: /* @__PURE__ */ d((t) => h.stdout.write(t), "writeOut"),
768
- writeErr: /* @__PURE__ */ d((t) => h.stderr.write(t), "writeErr"),
769
- getOutHelpWidth: /* @__PURE__ */ d(() => h.stdout.isTTY ? h.stdout.columns : void 0, "getOutHelpWidth"),
770
- getErrHelpWidth: /* @__PURE__ */ d(() => h.stderr.isTTY ? h.stderr.columns : void 0, "getErrHelpWidth"),
771
- outputError: /* @__PURE__ */ d((t, i) => i(t), "outputError")
767
+ writeOut: /* @__PURE__ */ l((t) => h.stdout.write(t), "writeOut"),
768
+ writeErr: /* @__PURE__ */ l((t) => h.stderr.write(t), "writeErr"),
769
+ getOutHelpWidth: /* @__PURE__ */ l(() => h.stdout.isTTY ? h.stdout.columns : void 0, "getOutHelpWidth"),
770
+ getErrHelpWidth: /* @__PURE__ */ l(() => h.stderr.isTTY ? h.stderr.columns : void 0, "getErrHelpWidth"),
771
+ outputError: /* @__PURE__ */ l((t, i) => i(t), "outputError")
772
772
  }, this._hidden = !1, this._helpOption = void 0, this._addImplicitHelpCommand = void 0, this._helpCommand = void 0, this._helpConfiguration =
773
773
  {};
774
774
  }
@@ -824,9 +824,9 @@ var me = b((he) => {
824
824
  command(e, t, i) {
825
825
  let s = t, r = i;
826
826
  typeof s == "object" && s !== null && (r = s, s = null), r = r || {};
827
- let [, o, l] = e.match(/([^ ]+) *(.*)/), a = this.createCommand(o);
827
+ let [, o, d] = e.match(/([^ ]+) *(.*)/), a = this.createCommand(o);
828
828
  return s && (a.description(s), a._executableHandler = !0), r.isDefault && (this._defaultCommandName = a._name), a._hidden = !!(r.noHelp ||
829
- r.hidden), a._executableFile = r.executableFile || null, l && a.arguments(l), this._registerCommand(a), a.parent = this, a.copyInheritedSettings(
829
+ r.hidden), a._executableFile = r.executableFile || null, d && a.arguments(d), this._registerCommand(a), a.parent = this, a.copyInheritedSettings(
830
830
  this), s ? this : a;
831
831
  }
832
832
  /**
@@ -1075,7 +1075,7 @@ Expecting one of '${i.join("', '")}'`);
1075
1075
  * @return {Command} `this` command for chaining
1076
1076
  */
1077
1077
  action(e) {
1078
- let t = /* @__PURE__ */ d((i) => {
1078
+ let t = /* @__PURE__ */ l((i) => {
1079
1079
  let s = this.registeredArguments.length, r = i.slice(0, s);
1080
1080
  return this._storeOptionsAsProperties ? r[s] = this : r[s] = this.opts(), r.push(this), e.apply(this, r);
1081
1081
  }, "listener");
@@ -1138,7 +1138,7 @@ Expecting one of '${i.join("', '")}'`);
1138
1138
  * @private
1139
1139
  */
1140
1140
  _registerCommand(e) {
1141
- let t = /* @__PURE__ */ d((s) => [s.name()].concat(s.aliases()), "knownBy"), i = t(e).find(
1141
+ let t = /* @__PURE__ */ l((s) => [s.name()].concat(s.aliases()), "knownBy"), i = t(e).find(
1142
1142
  (s) => this._findCommand(s)
1143
1143
  );
1144
1144
  if (i) {
@@ -1166,11 +1166,11 @@ Expecting one of '${i.join("', '")}'`);
1166
1166
  "default"
1167
1167
  );
1168
1168
  } else e.defaultValue !== void 0 && this.setOptionValueWithSource(i, e.defaultValue, "default");
1169
- let s = /* @__PURE__ */ d((r, o, l) => {
1169
+ let s = /* @__PURE__ */ l((r, o, d) => {
1170
1170
  r == null && e.presetArg !== void 0 && (r = e.presetArg);
1171
1171
  let a = this.getOptionValue(i);
1172
1172
  r !== null && e.parseArg ? r = this._callParseArg(e, r, a, o) : r !== null && e.variadic && (r = e._concatValue(r, a)), r == null &&
1173
- (e.negate ? r = !1 : e.isBoolean() || e.optional ? r = !0 : r = ""), this.setOptionValueWithSource(i, r, l);
1173
+ (e.negate ? r = !1 : e.isBoolean() || e.optional ? r = !0 : r = ""), this.setOptionValueWithSource(i, r, d);
1174
1174
  }, "handleOptionValue");
1175
1175
  return this.on("option:" + t, (r) => {
1176
1176
  let o = `error: option '${e.flags}' argument '${r}' is invalid.`;
@@ -1195,10 +1195,10 @@ Expecting one of '${i.join("', '")}'`);
1195
1195
  if (o.makeOptionMandatory(!!e.mandatory), typeof s == "function")
1196
1196
  o.default(r).argParser(s);
1197
1197
  else if (s instanceof RegExp) {
1198
- let l = s;
1199
- s = /* @__PURE__ */ d((a, c) => {
1200
- let p = l.exec(a);
1201
- return p ? p[0] : c;
1198
+ let d = s;
1199
+ s = /* @__PURE__ */ l((a, c) => {
1200
+ let u = d.exec(a);
1201
+ return u ? u[0] : c;
1202
1202
  }, "fn"), o.default(r).argParser(s);
1203
1203
  } else
1204
1204
  o.default(s);
@@ -1477,81 +1477,81 @@ Expecting one of '${i.join("', '")}'`);
1477
1477
  _executeSubCommand(e, t) {
1478
1478
  t = t.slice();
1479
1479
  let i = !1, s = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1480
- function r(p, u) {
1481
- let m = _.resolve(p, u);
1480
+ function r(u, p) {
1481
+ let m = v.resolve(u, p);
1482
1482
  if (z.existsSync(m)) return m;
1483
- if (s.includes(_.extname(u))) return;
1483
+ if (s.includes(v.extname(p))) return;
1484
1484
  let x = s.find(
1485
- (f) => z.existsSync(`${m}${f}`)
1485
+ (g) => z.existsSync(`${m}${g}`)
1486
1486
  );
1487
1487
  if (x) return `${m}${x}`;
1488
1488
  }
1489
- d(r, "findFile"), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1490
- let o = e._executableFile || `${this._name}-${e._name}`, l = this._executableDir || "";
1489
+ l(r, "findFile"), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1490
+ let o = e._executableFile || `${this._name}-${e._name}`, d = this._executableDir || "";
1491
1491
  if (this._scriptPath) {
1492
- let p;
1492
+ let u;
1493
1493
  try {
1494
- p = z.realpathSync(this._scriptPath);
1494
+ u = z.realpathSync(this._scriptPath);
1495
1495
  } catch {
1496
- p = this._scriptPath;
1496
+ u = this._scriptPath;
1497
1497
  }
1498
- l = _.resolve(
1499
- _.dirname(p),
1500
- l
1498
+ d = v.resolve(
1499
+ v.dirname(u),
1500
+ d
1501
1501
  );
1502
1502
  }
1503
- if (l) {
1504
- let p = r(l, o);
1505
- if (!p && !e._executableFile && this._scriptPath) {
1506
- let u = _.basename(
1503
+ if (d) {
1504
+ let u = r(d, o);
1505
+ if (!u && !e._executableFile && this._scriptPath) {
1506
+ let p = v.basename(
1507
1507
  this._scriptPath,
1508
- _.extname(this._scriptPath)
1508
+ v.extname(this._scriptPath)
1509
1509
  );
1510
- u !== this._name && (p = r(
1511
- l,
1512
- `${u}-${e._name}`
1510
+ p !== this._name && (u = r(
1511
+ d,
1512
+ `${p}-${e._name}`
1513
1513
  ));
1514
1514
  }
1515
- o = p || o;
1515
+ o = u || o;
1516
1516
  }
1517
- i = s.includes(_.extname(o));
1517
+ i = s.includes(v.extname(o));
1518
1518
  let a;
1519
- h.platform !== "win32" ? i ? (t.unshift(o), t = ue(h.execArgv).concat(t), a = Y.spawn(h.argv[0], t, { stdio: "inherit" })) : a = Y.spawn(
1520
- o, t, { stdio: "inherit" }) : (t.unshift(o), t = ue(h.execArgv).concat(t), a = Y.spawn(h.execPath, t, { stdio: "inherit" })), a.killed ||
1521
- ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((u) => {
1522
- h.on(u, () => {
1523
- a.killed === !1 && a.exitCode === null && a.kill(u);
1519
+ h.platform !== "win32" ? i ? (t.unshift(o), t = pe(h.execArgv).concat(t), a = Y.spawn(h.argv[0], t, { stdio: "inherit" })) : a = Y.spawn(
1520
+ o, t, { stdio: "inherit" }) : (t.unshift(o), t = pe(h.execArgv).concat(t), a = Y.spawn(h.execPath, t, { stdio: "inherit" })), a.killed ||
1521
+ ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((p) => {
1522
+ h.on(p, () => {
1523
+ a.killed === !1 && a.exitCode === null && a.kill(p);
1524
1524
  });
1525
1525
  });
1526
1526
  let c = this._exitCallback;
1527
- a.on("close", (p) => {
1528
- p = p ?? 1, c ? c(
1527
+ a.on("close", (u) => {
1528
+ u = u ?? 1, c ? c(
1529
1529
  new K(
1530
- p,
1530
+ u,
1531
1531
  "commander.executeSubCommandAsync",
1532
1532
  "(close)"
1533
1533
  )
1534
- ) : h.exit(p);
1535
- }), a.on("error", (p) => {
1536
- if (p.code === "ENOENT") {
1537
- let u = l ? `searched for local subcommand relative to directory '${l}'` : "no directory for search for local subcommand, use .exe\
1534
+ ) : h.exit(u);
1535
+ }), a.on("error", (u) => {
1536
+ if (u.code === "ENOENT") {
1537
+ let p = d ? `searched for local subcommand relative to directory '${d}'` : "no directory for search for local subcommand, use .exe\
1538
1538
  cutableDir() to supply a custom directory", m = `'${o}' does not exist
1539
1539
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\
1540
1540
 
1541
1541
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
1542
- - ${u}`;
1542
+ - ${p}`;
1543
1543
  throw new Error(m);
1544
- } else if (p.code === "EACCES")
1544
+ } else if (u.code === "EACCES")
1545
1545
  throw new Error(`'${o}' not executable`);
1546
1546
  if (!c)
1547
1547
  h.exit(1);
1548
1548
  else {
1549
- let u = new K(
1549
+ let p = new K(
1550
1550
  1,
1551
1551
  "commander.executeSubCommandAsync",
1552
1552
  "(error)"
1553
1553
  );
1554
- u.nestedError = p, c(u);
1554
+ p.nestedError = u, c(p);
1555
1555
  }
1556
1556
  }), this.runningCommand = a;
1557
1557
  }
@@ -1605,15 +1605,15 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1605
1605
  * @private
1606
1606
  */
1607
1607
  _processArguments() {
1608
- let e = /* @__PURE__ */ d((i, s, r) => {
1608
+ let e = /* @__PURE__ */ l((i, s, r) => {
1609
1609
  let o = s;
1610
1610
  if (s !== null && i.parseArg) {
1611
- let l = `error: command-argument value '${s}' is invalid for argument '${i.name()}'.`;
1611
+ let d = `error: command-argument value '${s}' is invalid for argument '${i.name()}'.`;
1612
1612
  o = this._callParseArg(
1613
1613
  i,
1614
1614
  s,
1615
1615
  r,
1616
- l
1616
+ d
1617
1617
  );
1618
1618
  }
1619
1619
  return o;
@@ -1622,7 +1622,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1622
1622
  let t = [];
1623
1623
  this.registeredArguments.forEach((i, s) => {
1624
1624
  let r = i.defaultValue;
1625
- i.variadic ? s < this.args.length ? (r = this.args.slice(s), i.parseArg && (r = r.reduce((o, l) => e(i, l, o), i.defaultValue))) : r ===
1625
+ i.variadic ? s < this.args.length ? (r = this.args.slice(s), i.parseArg && (r = r.reduce((o, d) => e(i, d, o), i.defaultValue))) : r ===
1626
1626
  void 0 && (r = []) : s < this.args.length && (r = this.args[s], i.parseArg && (r = e(i, r, i.defaultValue))), t[s] = r;
1627
1627
  }), this.processedArgs = t;
1628
1628
  }
@@ -1689,7 +1689,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1689
1689
  );
1690
1690
  this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName && this.help({ error: !0 }), this.
1691
1691
  _outputHelpIfRequested(i.unknown), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1692
- let s = /* @__PURE__ */ d(() => {
1692
+ let s = /* @__PURE__ */ l(() => {
1693
1693
  i.unknown.length > 0 && this.unknownOption(i.unknown[0]);
1694
1694
  }, "checkForUnknownOptions"), r = `command:${this.name()}`;
1695
1695
  if (this._actionHandler) {
@@ -1795,30 +1795,30 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1795
1795
  function o(a) {
1796
1796
  return a.length > 1 && a[0] === "-";
1797
1797
  }
1798
- d(o, "maybeOption");
1799
- let l = null;
1798
+ l(o, "maybeOption");
1799
+ let d = null;
1800
1800
  for (; r.length; ) {
1801
1801
  let a = r.shift();
1802
1802
  if (a === "--") {
1803
1803
  s === i && s.push(a), s.push(...r);
1804
1804
  break;
1805
1805
  }
1806
- if (l && !o(a)) {
1807
- this.emit(`option:${l.name()}`, a);
1806
+ if (d && !o(a)) {
1807
+ this.emit(`option:${d.name()}`, a);
1808
1808
  continue;
1809
1809
  }
1810
- if (l = null, o(a)) {
1810
+ if (d = null, o(a)) {
1811
1811
  let c = this._findOption(a);
1812
1812
  if (c) {
1813
1813
  if (c.required) {
1814
- let p = r.shift();
1815
- p === void 0 && this.optionMissingArgument(c), this.emit(`option:${c.name()}`, p);
1814
+ let u = r.shift();
1815
+ u === void 0 && this.optionMissingArgument(c), this.emit(`option:${c.name()}`, u);
1816
1816
  } else if (c.optional) {
1817
- let p = null;
1818
- r.length > 0 && !o(r[0]) && (p = r.shift()), this.emit(`option:${c.name()}`, p);
1817
+ let u = null;
1818
+ r.length > 0 && !o(r[0]) && (u = r.shift()), this.emit(`option:${c.name()}`, u);
1819
1819
  } else
1820
1820
  this.emit(`option:${c.name()}`);
1821
- l = c.variadic ? c : null;
1821
+ d = c.variadic ? c : null;
1822
1822
  continue;
1823
1823
  }
1824
1824
  }
@@ -1831,9 +1831,9 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1831
1831
  }
1832
1832
  }
1833
1833
  if (/^--[^=]+=/.test(a)) {
1834
- let c = a.indexOf("="), p = this._findOption(a.slice(0, c));
1835
- if (p && (p.required || p.optional)) {
1836
- this.emit(`option:${p.name()}`, a.slice(c + 1));
1834
+ let c = a.indexOf("="), u = this._findOption(a.slice(0, c));
1835
+ if (u && (u.required || u.optional)) {
1836
+ this.emit(`option:${u.name()}`, a.slice(c + 1));
1837
1837
  continue;
1838
1838
  }
1839
1839
  }
@@ -1925,7 +1925,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1925
1925
  * @private
1926
1926
  */
1927
1927
  _parseOptionsImplied() {
1928
- let e = new Ke(this.options), t = /* @__PURE__ */ d((i) => this.getOptionValue(i) !== void 0 && !["default", "implied"].includes(this.
1928
+ let e = new Ke(this.options), t = /* @__PURE__ */ l((i) => this.getOptionValue(i) !== void 0 && !["default", "implied"].includes(this.
1929
1929
  getOptionValueSource(i)), "hasCustomOptionValue");
1930
1930
  this.options.filter(
1931
1931
  (i) => i.implied !== void 0 && t(i.attributeName()) && e.valueFromOption(
@@ -1980,16 +1980,16 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1980
1980
  * @private
1981
1981
  */
1982
1982
  _conflictingOption(e, t) {
1983
- let i = /* @__PURE__ */ d((o) => {
1984
- let l = o.attributeName(), a = this.getOptionValue(l), c = this.options.find(
1985
- (u) => u.negate && l === u.attributeName()
1986
- ), p = this.options.find(
1987
- (u) => !u.negate && l === u.attributeName()
1983
+ let i = /* @__PURE__ */ l((o) => {
1984
+ let d = o.attributeName(), a = this.getOptionValue(d), c = this.options.find(
1985
+ (p) => p.negate && d === p.attributeName()
1986
+ ), u = this.options.find(
1987
+ (p) => !p.negate && d === p.attributeName()
1988
1988
  );
1989
- return c && (c.presetArg === void 0 && a === !1 || c.presetArg !== void 0 && a === c.presetArg) ? c : p || o;
1990
- }, "findBestOptionFromValue"), s = /* @__PURE__ */ d((o) => {
1991
- let l = i(o), a = l.attributeName();
1992
- return this.getOptionValueSource(a) === "env" ? `environment variable '${l.envVar}'` : `option '${l.flags}'`;
1989
+ return c && (c.presetArg === void 0 && a === !1 || c.presetArg !== void 0 && a === c.presetArg) ? c : u || o;
1990
+ }, "findBestOptionFromValue"), s = /* @__PURE__ */ l((o) => {
1991
+ let d = i(o), a = d.attributeName();
1992
+ return this.getOptionValueSource(a) === "env" ? `environment variable '${d.envVar}'` : `option '${d.flags}'`;
1993
1993
  }, "getErrorMessage"), r = `error: ${s(e)} cannot be used with ${s(t)}`;
1994
1994
  this.error(r, { code: "commander.conflictingOption" });
1995
1995
  }
@@ -2005,10 +2005,10 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2005
2005
  if (e.startsWith("--") && this._showSuggestionAfterError) {
2006
2006
  let s = [], r = this;
2007
2007
  do {
2008
- let o = r.createHelp().visibleOptions(r).filter((l) => l.long).map((l) => l.long);
2008
+ let o = r.createHelp().visibleOptions(r).filter((d) => d.long).map((d) => d.long);
2009
2009
  s = s.concat(o), r = r.parent;
2010
2010
  } while (r && !r._enablePositionalOptions);
2011
- t = pe(e, s);
2011
+ t = ue(e, s);
2012
2012
  }
2013
2013
  let i = `error: unknown option '${e}'${t}`;
2014
2014
  this.error(i, { code: "commander.unknownOption" });
@@ -2036,7 +2036,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2036
2036
  let s = [];
2037
2037
  this.createHelp().visibleCommands(this).forEach((r) => {
2038
2038
  s.push(r.name()), r.alias() && s.push(r.alias());
2039
- }), t = pe(e, s);
2039
+ }), t = ue(e, s);
2040
2040
  }
2041
2041
  let i = `error: unknown command '${e}'${t}`;
2042
2042
  this.error(i, { code: "commander.unknownCommand" });
@@ -2155,7 +2155,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2155
2155
  * @return {Command}
2156
2156
  */
2157
2157
  nameFromFilename(e) {
2158
- return this._name = _.basename(e, _.extname(e)), this;
2158
+ return this._name = v.basename(e, v.extname(e)), this;
2159
2159
  }
2160
2160
  /**
2161
2161
  * Get or set the directory for searching for executable subcommands of this command.
@@ -2188,7 +2188,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2188
2188
  _getHelpContext(e) {
2189
2189
  e = e || {};
2190
2190
  let t = { error: !!e.error }, i;
2191
- return t.error ? i = /* @__PURE__ */ d((s) => this._outputConfiguration.writeErr(s), "write") : i = /* @__PURE__ */ d((s) => this._outputConfiguration.
2191
+ return t.error ? i = /* @__PURE__ */ l((s) => this._outputConfiguration.writeErr(s), "write") : i = /* @__PURE__ */ l((s) => this._outputConfiguration.
2192
2192
  writeOut(s), "write"), t.write = e.write || i, t.command = this, t;
2193
2193
  }
2194
2194
  /**
@@ -2292,7 +2292,7 @@ Expecting one of '${i.join("', '")}'`);
2292
2292
  t && e.find((s) => t.is(s)) && (this.outputHelp(), this._exit(0, "commander.helpDisplayed", "(outputHelp)"));
2293
2293
  }
2294
2294
  };
2295
- function ue(n) {
2295
+ function pe(n) {
2296
2296
  return n.map((e) => {
2297
2297
  if (!e.startsWith("--inspect"))
2298
2298
  return e;
@@ -2302,35 +2302,35 @@ Expecting one of '${i.join("', '")}'`);
2302
2302
  r[3], s = r[4]), t && s !== "0" ? `${t}=${i}:${parseInt(s) + 1}` : e;
2303
2303
  });
2304
2304
  }
2305
- d(ue, "incrementNodeInspectorPort");
2305
+ l(pe, "incrementNodeInspectorPort");
2306
2306
  he.Command = Q;
2307
2307
  });
2308
2308
 
2309
2309
  // ../node_modules/commander/index.js
2310
- var xe = b((g) => {
2311
- var { Argument: fe } = V(), { Command: X } = me(), { CommanderError: Qe, InvalidArgumentError: ge } = j(), { Help: Xe } = W(), { Option: be } = J();
2312
- g.program = new X();
2313
- g.createCommand = (n) => new X(n);
2314
- g.createOption = (n, e) => new be(n, e);
2315
- g.createArgument = (n, e) => new fe(n, e);
2316
- g.Command = X;
2317
- g.Option = be;
2318
- g.Argument = fe;
2319
- g.Help = Xe;
2320
- g.CommanderError = Qe;
2321
- g.InvalidArgumentError = ge;
2322
- g.InvalidOptionArgumentError = ge;
2310
+ var xe = b((f) => {
2311
+ var { Argument: ge } = V(), { Command: X } = me(), { CommanderError: Qe, InvalidArgumentError: fe } = j(), { Help: Xe } = W(), { Option: be } = J();
2312
+ f.program = new X();
2313
+ f.createCommand = (n) => new X(n);
2314
+ f.createOption = (n, e) => new be(n, e);
2315
+ f.createArgument = (n, e) => new ge(n, e);
2316
+ f.Command = X;
2317
+ f.Option = be;
2318
+ f.Argument = ge;
2319
+ f.Help = Xe;
2320
+ f.CommanderError = Qe;
2321
+ f.InvalidArgumentError = fe;
2322
+ f.InvalidOptionArgumentError = fe;
2323
2323
  });
2324
2324
 
2325
2325
  // ../node_modules/walk-up-path/dist/cjs/index.js
2326
- var ye = b((H) => {
2326
+ var _e = b((H) => {
2327
2327
  "use strict";
2328
2328
  Object.defineProperty(H, "__esModule", { value: !0 });
2329
2329
  H.walkUp = void 0;
2330
- var _e = C("path"), Ze = /* @__PURE__ */ d(function* (n) {
2331
- for (n = (0, _e.resolve)(n); n; ) {
2330
+ var ve = C("path"), Ze = /* @__PURE__ */ l(function* (n) {
2331
+ for (n = (0, ve.resolve)(n); n; ) {
2332
2332
  yield n;
2333
- let e = (0, _e.dirname)(n);
2333
+ let e = (0, ve.dirname)(n);
2334
2334
  if (e === n)
2335
2335
  break;
2336
2336
  n = e;
@@ -2342,16 +2342,16 @@ var ye = b((H) => {
2342
2342
  // ../node_modules/picocolors/picocolors.js
2343
2343
  var je = b((zt, te) => {
2344
2344
  var P = process || {}, Oe = P.argv || [], D = P.env || {}, nt = !(D.NO_COLOR || Oe.includes("--no-color")) && (!!D.FORCE_COLOR || Oe.includes(
2345
- "--color") || P.platform === "win32" || (P.stdout || {}).isTTY && D.TERM !== "dumb" || !!D.CI), ot = /* @__PURE__ */ d((n, e, t = n) => (i) => {
2345
+ "--color") || P.platform === "win32" || (P.stdout || {}).isTTY && D.TERM !== "dumb" || !!D.CI), ot = /* @__PURE__ */ l((n, e, t = n) => (i) => {
2346
2346
  let s = "" + i, r = s.indexOf(e, n.length);
2347
2347
  return ~r ? n + at(s, e, t, r) + e : n + s + e;
2348
- }, "formatter"), at = /* @__PURE__ */ d((n, e, t, i) => {
2348
+ }, "formatter"), at = /* @__PURE__ */ l((n, e, t, i) => {
2349
2349
  let s = "", r = 0;
2350
2350
  do
2351
2351
  s += n.substring(r, i) + t, r = i + e.length, i = n.indexOf(e, r);
2352
2352
  while (~i);
2353
2353
  return s + n.substring(r);
2354
- }, "replaceClose"), Ce = /* @__PURE__ */ d((n = nt) => {
2354
+ }, "replaceClose"), Ce = /* @__PURE__ */ l((n = nt) => {
2355
2355
  let e = n ? ot : () => String;
2356
2356
  return {
2357
2357
  isColorSupported: n,
@@ -2403,7 +2403,7 @@ var je = b((zt, te) => {
2403
2403
  });
2404
2404
 
2405
2405
  // ../node_modules/ts-dedent/dist/index.js
2406
- var $e = b((k) => {
2406
+ var qe = b((k) => {
2407
2407
  "use strict";
2408
2408
  Object.defineProperty(k, "__esModule", { value: !0 });
2409
2409
  k.dedent = void 0;
@@ -2412,46 +2412,46 @@ var $e = b((k) => {
2412
2412
  e[t - 1] = arguments[t];
2413
2413
  var i = Array.from(typeof n == "string" ? [n] : n);
2414
2414
  i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, "");
2415
- var s = i.reduce(function(l, a) {
2415
+ var s = i.reduce(function(d, a) {
2416
2416
  var c = a.match(/\n([\t ]+|(?!\s).)/g);
2417
- return c ? l.concat(c.map(function(p) {
2418
- var u, m;
2419
- return (m = (u = p.match(/[\t ]/g)) === null || u === void 0 ? void 0 : u.length) !== null && m !== void 0 ? m : 0;
2420
- })) : l;
2417
+ return c ? d.concat(c.map(function(u) {
2418
+ var p, m;
2419
+ return (m = (p = u.match(/[\t ]/g)) === null || p === void 0 ? void 0 : p.length) !== null && m !== void 0 ? m : 0;
2420
+ })) : d;
2421
2421
  }, []);
2422
2422
  if (s.length) {
2423
2423
  var r = new RegExp(`
2424
2424
  [ ]{` + Math.min.apply(Math, s) + "}", "g");
2425
- i = i.map(function(l) {
2426
- return l.replace(r, `
2425
+ i = i.map(function(d) {
2426
+ return d.replace(r, `
2427
2427
  `);
2428
2428
  });
2429
2429
  }
2430
2430
  i[0] = i[0].replace(/^\r?\n/, "");
2431
2431
  var o = i[0];
2432
- return e.forEach(function(l, a) {
2433
- var c = o.match(/(?:^|\n)( *)$/), p = c ? c[1] : "", u = l;
2434
- typeof l == "string" && l.includes(`
2435
- `) && (u = String(l).split(`
2432
+ return e.forEach(function(d, a) {
2433
+ var c = o.match(/(?:^|\n)( *)$/), u = c ? c[1] : "", p = d;
2434
+ typeof d == "string" && d.includes(`
2435
+ `) && (p = String(d).split(`
2436
2436
  `).map(function(m, x) {
2437
- return x === 0 ? m : "" + p + m;
2437
+ return x === 0 ? m : "" + u + m;
2438
2438
  }).join(`
2439
- `)), o += u + i[a + 1];
2439
+ `)), o += p + i[a + 1];
2440
2440
  }), o;
2441
2441
  }
2442
- d(Se, "dedent");
2442
+ l(Se, "dedent");
2443
2443
  k.dedent = Se;
2444
2444
  k.default = Se;
2445
2445
  });
2446
2446
 
2447
2447
  // src/cli/bin/index.ts
2448
- var A = $(xe(), 1);
2449
- import { getEnvConfig as re, parseList as vt, versions as wt } from "storybook/internal/common";
2448
+ var A = q(xe(), 1);
2449
+ import { getEnvConfig as re, parseList as wt, versions as yt } from "storybook/internal/common";
2450
2450
  import { logger as ne } from "storybook/internal/node-logger";
2451
2451
  import { addToGlobalContext as Ot } from "storybook/internal/telemetry";
2452
2452
 
2453
2453
  // ../node_modules/fd-package-json/dist/esm/main.js
2454
- var ve = $(ye(), 1);
2454
+ var we = q(_e(), 1);
2455
2455
  import { resolve as et } from "node:path";
2456
2456
  import { stat as tt, readFile as it } from "node:fs/promises";
2457
2457
  import { statSync as Wt, readFileSync as Rt } from "node:fs";
@@ -2462,17 +2462,17 @@ async function st(n) {
2462
2462
  return !1;
2463
2463
  }
2464
2464
  }
2465
- d(st, "fileExists");
2465
+ l(st, "fileExists");
2466
2466
  async function rt(n) {
2467
- for (let e of (0, ve.walkUp)(n)) {
2467
+ for (let e of (0, we.walkUp)(n)) {
2468
2468
  let t = et(e, "package.json");
2469
2469
  if (await st(t))
2470
2470
  return t;
2471
2471
  }
2472
2472
  return null;
2473
2473
  }
2474
- d(rt, "findPackagePath");
2475
- async function v(n) {
2474
+ l(rt, "findPackagePath");
2475
+ async function w(n) {
2476
2476
  let e = await rt(n);
2477
2477
  if (!e)
2478
2478
  return null;
@@ -2483,10 +2483,10 @@ async function v(n) {
2483
2483
  return null;
2484
2484
  }
2485
2485
  }
2486
- d(v, "findPackage");
2486
+ l(w, "findPackage");
2487
2487
 
2488
2488
  // node_modules/leven/index.js
2489
- var Z = [], we = [];
2489
+ var Z = [], ye = [];
2490
2490
  function ee(n, e) {
2491
2491
  if (n === e)
2492
2492
  return 0;
@@ -2500,40 +2500,40 @@ function ee(n, e) {
2500
2500
  r++;
2501
2501
  if (i -= r, s -= r, i === 0)
2502
2502
  return s;
2503
- let o, l, a, c, p = 0, u = 0;
2504
- for (; p < i; )
2505
- we[p] = n.charCodeAt(r + p), Z[p] = ++p;
2506
- for (; u < s; )
2507
- for (o = e.charCodeAt(r + u), a = u++, l = u, p = 0; p < i; p++)
2508
- c = o === we[p] ? a : a + 1, a = Z[p], l = Z[p] = a > l ? c > l ? l + 1 : c : c > a ? a + 1 : c;
2509
- return l;
2503
+ let o, d, a, c, u = 0, p = 0;
2504
+ for (; u < i; )
2505
+ ye[u] = n.charCodeAt(r + u), Z[u] = ++u;
2506
+ for (; p < s; )
2507
+ for (o = e.charCodeAt(r + p), a = p++, d = p, u = 0; u < i; u++)
2508
+ c = o === ye[u] ? a : a + 1, a = Z[u], d = Z[u] = a > d ? c > d ? d + 1 : c : c > a ? a + 1 : c;
2509
+ return d;
2510
2510
  }
2511
- d(ee, "leven");
2511
+ l(ee, "leven");
2512
2512
 
2513
2513
  // src/cli/bin/index.ts
2514
- var E = $(je(), 1);
2514
+ var E = q(je(), 1);
2515
2515
 
2516
2516
  // ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
2517
- var lt = process.env.NODE_ENV === "production", ie = "Invariant failed";
2518
- function w(n, e) {
2517
+ var dt = process.env.NODE_ENV === "production", ie = "Invariant failed";
2518
+ function y(n, e) {
2519
2519
  if (!n) {
2520
- if (lt)
2520
+ if (dt)
2521
2521
  throw new Error(ie);
2522
2522
  var t = typeof e == "function" ? e() : e, i = t ? "".concat(ie, ": ").concat(t) : ie;
2523
2523
  throw new Error(i);
2524
2524
  }
2525
2525
  }
2526
- d(w, "invariant");
2526
+ l(y, "invariant");
2527
2527
 
2528
2528
  // package.json
2529
- var ke = "9.0.0-alpha.11";
2529
+ var ke = "9.0.0-alpha.13";
2530
2530
 
2531
2531
  // src/cli/build.ts
2532
2532
  import { cache as ct } from "storybook/internal/common";
2533
- import { buildStaticStandalone as pt, withTelemetry as ut } from "storybook/internal/core-server";
2534
- var Ae = /* @__PURE__ */ d(async (n) => {
2535
- let e = await v(__dirname);
2536
- w(e, "Failed to find the closest package.json file.");
2533
+ import { buildStaticStandalone as ut, withTelemetry as pt } from "storybook/internal/core-server";
2534
+ var Ae = /* @__PURE__ */ l(async (n) => {
2535
+ let e = await w(__dirname);
2536
+ y(e, "Failed to find the closest package.json file.");
2537
2537
  let t = {
2538
2538
  ...n,
2539
2539
  configDir: n.configDir || "./.storybook",
@@ -2543,17 +2543,17 @@ var Ae = /* @__PURE__ */ d(async (n) => {
2543
2543
  cache: ct,
2544
2544
  packageJson: e
2545
2545
  };
2546
- await ut(
2546
+ await pt(
2547
2547
  "build",
2548
2548
  { cliOptions: n, presetOptions: t },
2549
- () => pt(t)
2549
+ () => ut(t)
2550
2550
  );
2551
2551
  }, "build");
2552
2552
 
2553
2553
  // src/cli/buildIndex.ts
2554
2554
  import { cache as ht } from "storybook/internal/common";
2555
- import { buildIndexStandalone as mt, withTelemetry as ft } from "storybook/internal/core-server";
2556
- var Ee = /* @__PURE__ */ d(async (n) => {
2555
+ import { buildIndexStandalone as mt, withTelemetry as gt } from "storybook/internal/core-server";
2556
+ var Ee = /* @__PURE__ */ l(async (n) => {
2557
2557
  let e = {
2558
2558
  ...n,
2559
2559
  configDir: n.configDir || ".storybook",
@@ -2567,16 +2567,16 @@ var Ee = /* @__PURE__ */ d(async (n) => {
2567
2567
  corePresets: [],
2568
2568
  overridePresets: []
2569
2569
  };
2570
- await ft("index", { cliOptions: n, presetOptions: t }, () => mt(e));
2570
+ await gt("index", { cliOptions: n, presetOptions: t }, () => mt(e));
2571
2571
  }, "buildIndex");
2572
2572
 
2573
2573
  // src/cli/dev.ts
2574
- import { cache as gt } from "storybook/internal/common";
2574
+ import { cache as ft } from "storybook/internal/common";
2575
2575
  import { buildDevStandalone as bt, withTelemetry as xt } from "storybook/internal/core-server";
2576
- import { logger as O, instance as _t } from "storybook/internal/node-logger";
2577
- var se = $($e(), 1);
2578
- function yt(n) {
2579
- _t.heading = "", n instanceof Error ? n.error ? O.error(n.error) : n.stats && n.stats.compilation.errors ? n.stats.compilation.errors.forEach(
2576
+ import { logger as O, instance as vt } from "storybook/internal/node-logger";
2577
+ var se = q(qe(), 1);
2578
+ function _t(n) {
2579
+ vt.heading = "", n instanceof Error ? n.error ? O.error(n.error) : n.stats && n.stats.compilation.errors ? n.stats.compilation.errors.forEach(
2580
2580
  (e) => O.plain(e)) : O.error(n) : n.compilation?.errors && n.compilation.errors.forEach((e) => O.plain(e)), O.line(), O.warn(
2581
2581
  n.close ? se.dedent`
2582
2582
  FATAL broken build!, will close the process,
@@ -2587,18 +2587,18 @@ function yt(n) {
2587
2587
  `
2588
2588
  ), O.line();
2589
2589
  }
2590
- d(yt, "printError");
2591
- var qe = /* @__PURE__ */ d(async (n) => {
2590
+ l(_t, "printError");
2591
+ var $e = /* @__PURE__ */ l(async (n) => {
2592
2592
  let { env: e } = process;
2593
2593
  e.NODE_ENV = e.NODE_ENV || "development";
2594
- let t = await v(__dirname);
2595
- w(t, "Failed to find the closest package.json file.");
2594
+ let t = await w(__dirname);
2595
+ y(t, "Failed to find the closest package.json file.");
2596
2596
  let i = {
2597
2597
  ...n,
2598
2598
  configDir: n.configDir || "./.storybook",
2599
2599
  configType: "DEVELOPMENT",
2600
2600
  ignorePreview: !!n.previewUrl && !n.forceBuildPreview,
2601
- cache: gt,
2601
+ cache: ft,
2602
2602
  packageJson: t
2603
2603
  };
2604
2604
  await xt(
@@ -2606,15 +2606,15 @@ var qe = /* @__PURE__ */ d(async (n) => {
2606
2606
  {
2607
2607
  cliOptions: n,
2608
2608
  presetOptions: i,
2609
- printError: yt
2609
+ printError: _t
2610
2610
  },
2611
2611
  () => bt(i)
2612
2612
  );
2613
2613
  }, "dev");
2614
2614
 
2615
2615
  // src/cli/bin/index.ts
2616
- Ot("cliVersion", wt.storybook);
2617
- var S = console, oe = /* @__PURE__ */ d((n) => A.program.command(n).option(
2616
+ Ot("cliVersion", yt.storybook);
2617
+ var S = console, oe = /* @__PURE__ */ l((n) => A.program.command(n).option(
2618
2618
  "--disable-telemetry",
2619
2619
  "Disable sending telemetry data",
2620
2620
  // default value is false, but if the user sets STORYBOOK_DISABLE_TELEMETRY, it can be true
@@ -2628,7 +2628,7 @@ k").option("-c, --config-dir <dir-name>", "Directory where to load Storybook con
2628
2628
  ).option(
2629
2629
  "--ssl-ca <ca>",
2630
2630
  "Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)",
2631
- vt
2631
+ wt
2632
2632
  ).option("--ssl-cert <cert>", "Provide an SSL certificate. (Required with --https)").option("--ssl-key <key>", "Provide an SSL key. (Require\
2633
2633
  d with --https)").option("--smoke-test", "Exit after successful start").option("--ci", "CI mode (skip interactive prompts, don't open browse\
2634
2634
  r)").option("--no-open", "Do not open Storybook automatically in the browser").option("--loglevel <level>", "Control level of logging during\
@@ -2645,15 +2645,15 @@ ly site using addon-docs").option("--exact-port", "Exit early if the desired por
2645
2645
  "URL path to be appended when visiting Storybook for the first time"
2646
2646
  ).action(async (n) => {
2647
2647
  ne.setLevel(n.loglevel);
2648
- let e = await v(__dirname);
2649
- w(e, "Failed to find the closest package.json file."), S.log(E.default.bold(`${e.name} v${e.version}`) + E.default.reset(`
2648
+ let e = await w(__dirname);
2649
+ y(e, "Failed to find the closest package.json file."), S.log(E.default.bold(`${e.name} v${e.version}`) + E.default.reset(`
2650
2650
  `)), re(n, {
2651
2651
  port: "SBCONFIG_PORT",
2652
2652
  host: "SBCONFIG_HOSTNAME",
2653
2653
  staticDir: "SBCONFIG_STATIC_DIR",
2654
2654
  configDir: "SBCONFIG_CONFIG_DIR",
2655
2655
  ci: "CI"
2656
- }), parseInt(`${n.port}`, 10) && (n.port = parseInt(`${n.port}`, 10)), await qe({ ...n, packageJson: e }).catch(() => process.exit(1));
2656
+ }), parseInt(`${n.port}`, 10) && (n.port = parseInt(`${n.port}`, 10)), await $e({ ...n, packageJson: e }).catch(() => process.exit(1));
2657
2657
  });
2658
2658
  oe("build").option("-o, --output-dir <dir-name>", "Directory where to store built files").option("-c, --config-dir <dir-name>", "Directory w\
2659
2659
  here to load Storybook configurations from").option("--quiet", "Suppress verbose build output").option("--loglevel <level>", "Control level \
@@ -2667,8 +2667,8 @@ of logging during build").option("--debug-webpack", "Display final webpack confi
2667
2667
  ly site using addon-docs").option("--test", "Build stories optimized for testing purposes.").action(async (n) => {
2668
2668
  let { env: e } = process;
2669
2669
  e.NODE_ENV = e.NODE_ENV || "production";
2670
- let t = await v(__dirname);
2671
- w(t, "Failed to find the closest package.json file."), ne.setLevel(n.loglevel), S.log(E.default.bold(`${t.name} v${t.version}
2670
+ let t = await w(__dirname);
2671
+ y(t, "Failed to find the closest package.json file."), ne.setLevel(n.loglevel), S.log(E.default.bold(`${t.name} v${t.version}
2672
2672
  `)), re(n, {
2673
2673
  staticDir: "SBCONFIG_STATIC_DIR",
2674
2674
  outputDir: "SBCONFIG_OUTPUT_DIR",
@@ -2684,8 +2684,8 @@ oad Storybook configurations from").option("--quiet", "Suppress verbose build ou
2684
2684
  g during build").action(async (n) => {
2685
2685
  let { env: e } = process;
2686
2686
  e.NODE_ENV = e.NODE_ENV || "production";
2687
- let t = await v(__dirname);
2688
- w(t, "Failed to find the closest package.json file."), ne.setLevel(n.loglevel), S.log(E.default.bold(`${t.name} v${t.version}
2687
+ let t = await w(__dirname);
2688
+ y(t, "Failed to find the closest package.json file."), ne.setLevel(n.loglevel), S.log(E.default.bold(`${t.name} v${t.version}
2689
2689
  `)), re(n, {
2690
2690
  configDir: "SBCONFIG_CONFIG_DIR",
2691
2691
  outputFile: "SBCONFIG_OUTPUT_FILE"