storybook 9.0.0-alpha.20 → 9.0.0-alpha.21

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 (72) hide show
  1. package/assets/server/base-preview-head.html +1 -3
  2. package/dist/actions/decorator.js +34 -38
  3. package/dist/actions/index.cjs +1 -4
  4. package/dist/actions/index.js +1 -4
  5. package/dist/actions/preview.cjs +1 -4
  6. package/dist/actions/preview.js +1 -4
  7. package/dist/babel/index.cjs +822 -816
  8. package/dist/babel/index.js +822 -816
  9. package/dist/backgrounds/index.cjs +16 -16
  10. package/dist/backgrounds/index.js +14 -14
  11. package/dist/backgrounds/preview.cjs +34 -34
  12. package/dist/backgrounds/preview.js +29 -29
  13. package/dist/bin/index.cjs +67 -65
  14. package/dist/bin/index.js +61 -59
  15. package/dist/builder-manager/index.cjs +482 -472
  16. package/dist/builder-manager/index.js +283 -273
  17. package/dist/channels/index.js +941 -919
  18. package/dist/cli/bin/index.cjs +1 -1
  19. package/dist/cli/bin/index.js +1 -1
  20. package/dist/cli/index.cjs +61752 -7591
  21. package/dist/cli/index.d.ts +22 -14
  22. package/dist/cli/index.js +61775 -7614
  23. package/dist/common/index.cjs +16015 -8979
  24. package/dist/common/index.d.ts +30 -1
  25. package/dist/common/index.js +16105 -9063
  26. package/dist/components/index.cjs +3694 -3643
  27. package/dist/components/index.d.ts +5 -2
  28. package/dist/components/index.js +2352 -2294
  29. package/dist/core-server/index.cjs +3540 -3540
  30. package/dist/core-server/index.js +730 -730
  31. package/dist/core-server/presets/common-manager.js +2642 -2592
  32. package/dist/core-server/presets/common-preset.cjs +723 -715
  33. package/dist/core-server/presets/common-preset.js +10 -2
  34. package/dist/docs-tools/index.js +640 -632
  35. package/dist/highlight/index.cjs +16 -16
  36. package/dist/highlight/index.d.ts +45 -1
  37. package/dist/highlight/index.js +2 -2
  38. package/dist/highlight/preview.cjs +522 -68
  39. package/dist/highlight/preview.js +508 -56
  40. package/dist/instrumenter/index.js +1179 -1170
  41. package/dist/manager/globals-module-info.cjs +1 -0
  42. package/dist/manager/globals-module-info.js +1 -0
  43. package/dist/manager/globals-runtime.js +19385 -19190
  44. package/dist/manager/runtime.js +2084 -2079
  45. package/dist/manager-api/index.cjs +352 -352
  46. package/dist/manager-api/index.js +1694 -1663
  47. package/dist/manager-errors.js +41 -37
  48. package/dist/measure/index.cjs +99 -97
  49. package/dist/measure/index.js +95 -93
  50. package/dist/measure/preview.cjs +127 -125
  51. package/dist/measure/preview.js +125 -123
  52. package/dist/outline/index.cjs +41 -41
  53. package/dist/outline/index.js +12 -12
  54. package/dist/outline/preview.cjs +23 -23
  55. package/dist/outline/preview.js +7 -7
  56. package/dist/preview/runtime.js +13577 -12959
  57. package/dist/preview-api/index.cjs +0 -1
  58. package/dist/preview-api/index.d.ts +120 -385
  59. package/dist/preview-api/index.js +827 -812
  60. package/dist/preview-errors.cjs +65 -51
  61. package/dist/preview-errors.d.ts +6 -2
  62. package/dist/preview-errors.js +176 -142
  63. package/dist/server-errors.cjs +105 -72
  64. package/dist/server-errors.d.ts +9 -1
  65. package/dist/server-errors.js +87 -54
  66. package/dist/telemetry/index.cjs +374 -370
  67. package/dist/telemetry/index.js +460 -456
  68. package/dist/test/index.js +9831 -9743
  69. package/dist/test/preview.d.ts +0 -6
  70. package/dist/test/preview.js +3628 -3568
  71. package/dist/types/index.d.ts +72 -6
  72. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- var Hn = Object.create;
1
+ var Fn = Object.create;
2
2
  var yr = Object.defineProperty;
3
- var Wn = Object.getOwnPropertyDescriptor;
4
- var $n = Object.getOwnPropertyNames;
5
- var Yn = Object.getPrototypeOf, Kn = Object.prototype.hasOwnProperty;
3
+ var In = Object.getOwnPropertyDescriptor;
4
+ var On = Object.getOwnPropertyNames;
5
+ var Dn = Object.getPrototypeOf, kn = Object.prototype.hasOwnProperty;
6
6
  var n = (r, e) => yr(r, "name", { value: e, configurable: !0 }), Ae = /* @__PURE__ */ ((r) => typeof require < "u" ? require : typeof Proxy <
7
7
  "u" ? new Proxy(r, {
8
8
  get: (e, t) => (typeof require < "u" ? require : e)[t]
@@ -11,13 +11,13 @@ var n = (r, e) => yr(r, "name", { value: e, configurable: !0 }), Ae = /* @__PURE
11
11
  throw Error('Dynamic require of "' + r + '" is not supported');
12
12
  });
13
13
  var O = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
14
- var Xn = (r, e, t, o) => {
14
+ var jn = (r, e, t, o) => {
15
15
  if (e && typeof e == "object" || typeof e == "function")
16
- for (let s of $n(e))
17
- !Kn.call(r, s) && s !== t && yr(r, s, { get: () => e[s], enumerable: !(o = Wn(e, s)) || o.enumerable });
16
+ for (let s of On(e))
17
+ !kn.call(r, s) && s !== t && yr(r, s, { get: () => e[s], enumerable: !(o = In(e, s)) || o.enumerable });
18
18
  return r;
19
19
  };
20
- var fe = (r, e, t) => (t = r != null ? Hn(Yn(r)) : {}, Xn(
20
+ var fe = (r, e, t) => (t = r != null ? Fn(Dn(r)) : {}, jn(
21
21
  // If the importer is in node compatibility mode or this is not an ESM
22
22
  // file that has been converted to a CommonJS file using a Babel-
23
23
  // compatible transform (i.e. "__esModule" has not been set), then set
@@ -27,10 +27,10 @@ var fe = (r, e, t) => (t = r != null ? Hn(Yn(r)) : {}, Xn(
27
27
  ));
28
28
 
29
29
  // ../node_modules/memoizerific/memoizerific.js
30
- var Or = O((Qt, Ir) => {
30
+ var Fr = O((_t, Pr) => {
31
31
  (function(r) {
32
- if (typeof Qt == "object" && typeof Ir < "u")
33
- Ir.exports = r();
32
+ if (typeof _t == "object" && typeof Pr < "u")
33
+ Pr.exports = r();
34
34
  else if (typeof define == "function" && define.amd)
35
35
  define([], r);
36
36
  else {
@@ -160,11 +160,11 @@ var Or = O((Qt, Ir) => {
160
160
  });
161
161
 
162
162
  // ../node_modules/picoquery/lib/string-util.js
163
- var ot = O((tt) => {
163
+ var Vr = O((Ur) => {
164
164
  "use strict";
165
- Object.defineProperty(tt, "__esModule", { value: !0 });
166
- tt.encodeString = ta;
167
- var B = Array.from({ length: 256 }, (r, e) => "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()), ra = new Int8Array([
165
+ Object.defineProperty(Ur, "__esModule", { value: !0 });
166
+ Ur.encodeString = zi;
167
+ var B = Array.from({ length: 256 }, (r, e) => "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()), qi = new Int8Array([
168
168
  0,
169
169
  0,
170
170
  0,
@@ -294,7 +294,7 @@ var ot = O((tt) => {
294
294
  1,
295
295
  0
296
296
  ]);
297
- function ta(r) {
297
+ function zi(r) {
298
298
  let e = r.length;
299
299
  if (e === 0)
300
300
  return "";
@@ -302,7 +302,7 @@ var ot = O((tt) => {
302
302
  e: for (; s < e; s++) {
303
303
  let i = r.charCodeAt(s);
304
304
  for (; i < 128; ) {
305
- if (ra[i] !== 1 && (o < s && (t += r.slice(o, s)), o = s + 1, t += B[i]), ++s === e)
305
+ if (qi[i] !== 1 && (o < s && (t += r.slice(o, s)), o = s + 1, t += B[i]), ++s === e)
306
306
  break e;
307
307
  i = r.charCodeAt(s);
308
308
  }
@@ -321,7 +321,7 @@ var ot = O((tt) => {
321
321
  }
322
322
  return o === 0 ? r : o < e ? t + r.slice(o) : t;
323
323
  }
324
- n(ta, "encodeString");
324
+ n(zi, "encodeString");
325
325
  });
326
326
 
327
327
  // ../node_modules/picoquery/lib/shared.js
@@ -329,80 +329,80 @@ var er = O((G) => {
329
329
  "use strict";
330
330
  Object.defineProperty(G, "__esModule", { value: !0 });
331
331
  G.defaultOptions = G.defaultShouldSerializeObject = G.defaultValueSerializer = void 0;
332
- var nt = ot(), oa = /* @__PURE__ */ n((r) => {
332
+ var Hr = Vr(), Bi = /* @__PURE__ */ n((r) => {
333
333
  switch (typeof r) {
334
334
  case "string":
335
- return (0, nt.encodeString)(r);
335
+ return (0, Hr.encodeString)(r);
336
336
  case "bigint":
337
337
  case "boolean":
338
338
  return "" + r;
339
339
  case "number":
340
340
  if (Number.isFinite(r))
341
- return r < 1e21 ? "" + r : (0, nt.encodeString)("" + r);
341
+ return r < 1e21 ? "" + r : (0, Hr.encodeString)("" + r);
342
342
  break;
343
343
  }
344
- return r instanceof Date ? (0, nt.encodeString)(r.toISOString()) : "";
344
+ return r instanceof Date ? (0, Hr.encodeString)(r.toISOString()) : "";
345
345
  }, "defaultValueSerializer");
346
- G.defaultValueSerializer = oa;
347
- var na = /* @__PURE__ */ n((r) => r instanceof Date, "defaultShouldSerializeObject");
348
- G.defaultShouldSerializeObject = na;
349
- var Bo = /* @__PURE__ */ n((r) => r, "identityFunc");
346
+ G.defaultValueSerializer = Bi;
347
+ var Gi = /* @__PURE__ */ n((r) => r instanceof Date, "defaultShouldSerializeObject");
348
+ G.defaultShouldSerializeObject = Gi;
349
+ var Ao = /* @__PURE__ */ n((r) => r, "identityFunc");
350
350
  G.defaultOptions = {
351
351
  nesting: !0,
352
352
  nestingSyntax: "dot",
353
353
  arrayRepeat: !1,
354
354
  arrayRepeatSyntax: "repeat",
355
355
  delimiter: 38,
356
- valueDeserializer: Bo,
356
+ valueDeserializer: Ao,
357
357
  valueSerializer: G.defaultValueSerializer,
358
- keyDeserializer: Bo,
358
+ keyDeserializer: Ao,
359
359
  shouldSerializeObject: G.defaultShouldSerializeObject
360
360
  };
361
361
  });
362
362
 
363
363
  // ../node_modules/picoquery/lib/object-util.js
364
- var st = O((rr) => {
364
+ var Wr = O((rr) => {
365
365
  "use strict";
366
366
  Object.defineProperty(rr, "__esModule", { value: !0 });
367
- rr.getDeepObject = aa;
368
- rr.stringifyObject = Go;
369
- var le = er(), sa = ot();
370
- function ia(r) {
367
+ rr.getDeepObject = Hi;
368
+ rr.stringifyObject = Co;
369
+ var le = er(), Ui = Vr();
370
+ function Vi(r) {
371
371
  return r === "__proto__" || r === "constructor" || r === "prototype";
372
372
  }
373
- n(ia, "isPrototypeKey");
374
- function aa(r, e, t, o, s) {
375
- if (ia(e))
373
+ n(Vi, "isPrototypeKey");
374
+ function Hi(r, e, t, o, s) {
375
+ if (Vi(e))
376
376
  return r;
377
377
  let i = r[e];
378
378
  return typeof i == "object" && i !== null ? i : !o && (s || typeof t == "number" || typeof t == "string" && t * 0 === 0 && t.indexOf(".") ===
379
379
  -1) ? r[e] = [] : r[e] = {};
380
380
  }
381
- n(aa, "getDeepObject");
382
- var la = 20, ca = "[]", da = "[", pa = "]", ua = ".";
383
- function Go(r, e, t = 0, o, s) {
381
+ n(Hi, "getDeepObject");
382
+ var Wi = 20, $i = "[]", Yi = "[", Ki = "]", Xi = ".";
383
+ function Co(r, e, t = 0, o, s) {
384
384
  let { nestingSyntax: i = le.defaultOptions.nestingSyntax, arrayRepeat: a = le.defaultOptions.arrayRepeat, arrayRepeatSyntax: l = le.defaultOptions.
385
385
  arrayRepeatSyntax, nesting: c = le.defaultOptions.nesting, delimiter: d = le.defaultOptions.delimiter, valueSerializer: p = le.defaultOptions.
386
386
  valueSerializer, shouldSerializeObject: u = le.defaultOptions.shouldSerializeObject } = e, y = typeof d == "number" ? String.fromCharCode(
387
387
  d) : d, g = s === !0 && a, S = i === "dot" || i === "js" && !s;
388
- if (t > la)
388
+ if (t > Wi)
389
389
  return "";
390
390
  let b = "", h = !0, T = !1;
391
391
  for (let m in r) {
392
392
  let f = r[m], x;
393
- o ? (x = o, g ? l === "bracket" && (x += ca) : S ? (x += ua, x += m) : (x += da, x += m, x += pa)) : x = m, h || (b += y), typeof f ==
394
- "object" && f !== null && !u(f) ? (T = f.pop !== void 0, (c || a && T) && (b += Go(f, e, t + 1, x, T))) : (b += (0, sa.encodeString)(x),
393
+ o ? (x = o, g ? l === "bracket" && (x += $i) : S ? (x += Xi, x += m) : (x += Yi, x += m, x += Ki)) : x = m, h || (b += y), typeof f ==
394
+ "object" && f !== null && !u(f) ? (T = f.pop !== void 0, (c || a && T) && (b += Co(f, e, t + 1, x, T))) : (b += (0, Ui.encodeString)(x),
395
395
  b += "=", b += p(f, m)), h && (h = !1);
396
396
  }
397
397
  return b;
398
398
  }
399
- n(Go, "stringifyObject");
399
+ n(Co, "stringifyObject");
400
400
  });
401
401
 
402
402
  // ../node_modules/fast-decode-uri-component/index.js
403
- var Wo = O((Qu, Ho) => {
403
+ var Io = O((_u, Fo) => {
404
404
  "use strict";
405
- var Uo = 12, fa = 0, it = [
405
+ var vo = 12, Ji = 0, $r = [
406
406
  // The first part of the table maps bytes to character to a transition.
407
407
  0,
408
408
  0,
@@ -785,18 +785,18 @@ var Wo = O((Qu, Ho) => {
785
785
  7,
786
786
  7
787
787
  ];
788
- function ya(r) {
788
+ function Qi(r) {
789
789
  var e = r.indexOf("%");
790
790
  if (e === -1) return r;
791
- for (var t = r.length, o = "", s = 0, i = 0, a = e, l = Uo; e > -1 && e < t; ) {
792
- var c = Vo(r[e + 1], 4), d = Vo(r[e + 2], 0), p = c | d, u = it[p];
793
- if (l = it[256 + l + u], i = i << 6 | p & it[364 + u], l === Uo)
791
+ for (var t = r.length, o = "", s = 0, i = 0, a = e, l = vo; e > -1 && e < t; ) {
792
+ var c = Po(r[e + 1], 4), d = Po(r[e + 2], 0), p = c | d, u = $r[p];
793
+ if (l = $r[256 + l + u], i = i << 6 | p & $r[364 + u], l === vo)
794
794
  o += r.slice(s, a), o += i <= 65535 ? String.fromCharCode(i) : String.fromCharCode(
795
795
  55232 + (i >> 10),
796
796
  56320 + (i & 1023)
797
797
  ), i = 0, s = e + 3, e = a = r.indexOf("%", s);
798
798
  else {
799
- if (l === fa)
799
+ if (l === Ji)
800
800
  return null;
801
801
  if (e += 3, e < t && r.charCodeAt(e) === 37) continue;
802
802
  return null;
@@ -804,8 +804,8 @@ var Wo = O((Qu, Ho) => {
804
804
  }
805
805
  return o + r.slice(s);
806
806
  }
807
- n(ya, "decodeURIComponent");
808
- var ma = {
807
+ n(Qi, "decodeURIComponent");
808
+ var Zi = {
809
809
  0: 0,
810
810
  1: 1,
811
811
  2: 2,
@@ -829,55 +829,55 @@ var Wo = O((Qu, Ho) => {
829
829
  f: 15,
830
830
  F: 15
831
831
  };
832
- function Vo(r, e) {
833
- var t = ma[r];
832
+ function Po(r, e) {
833
+ var t = Zi[r];
834
834
  return t === void 0 ? 255 : t << e;
835
835
  }
836
- n(Vo, "hexCodeToInt");
837
- Ho.exports = ya;
836
+ n(Po, "hexCodeToInt");
837
+ Fo.exports = Qi;
838
838
  });
839
839
 
840
840
  // ../node_modules/picoquery/lib/parse.js
841
- var Xo = O(($) => {
841
+ var jo = O(($) => {
842
842
  "use strict";
843
- var ha = $ && $.__importDefault || function(r) {
843
+ var ea = $ && $.__importDefault || function(r) {
844
844
  return r && r.__esModule ? r : { default: r };
845
845
  };
846
846
  Object.defineProperty($, "__esModule", { value: !0 });
847
847
  $.numberValueDeserializer = $.numberKeyDeserializer = void 0;
848
- $.parse = Sa;
849
- var tr = st(), ce = er(), $o = ha(Wo()), ga = /* @__PURE__ */ n((r) => {
848
+ $.parse = oa;
849
+ var tr = Wr(), ce = er(), Oo = ea(Io()), ra = /* @__PURE__ */ n((r) => {
850
850
  let e = Number(r);
851
851
  return Number.isNaN(e) ? r : e;
852
852
  }, "numberKeyDeserializer");
853
- $.numberKeyDeserializer = ga;
854
- var ba = /* @__PURE__ */ n((r) => {
853
+ $.numberKeyDeserializer = ra;
854
+ var ta = /* @__PURE__ */ n((r) => {
855
855
  let e = Number(r);
856
856
  return Number.isNaN(e) ? r : e;
857
857
  }, "numberValueDeserializer");
858
- $.numberValueDeserializer = ba;
859
- var Yo = /\+/g, Ko = /* @__PURE__ */ n(function() {
858
+ $.numberValueDeserializer = ta;
859
+ var Do = /\+/g, ko = /* @__PURE__ */ n(function() {
860
860
  }, "Empty");
861
- Ko.prototype = /* @__PURE__ */ Object.create(null);
861
+ ko.prototype = /* @__PURE__ */ Object.create(null);
862
862
  function or(r, e, t, o, s) {
863
863
  let i = r.substring(e, t);
864
- return o && (i = i.replace(Yo, " ")), s && (i = (0, $o.default)(i) || i), i;
864
+ return o && (i = i.replace(Do, " ")), s && (i = (0, Oo.default)(i) || i), i;
865
865
  }
866
866
  n(or, "computeKeySlice");
867
- function Sa(r, e) {
867
+ function oa(r, e) {
868
868
  let { valueDeserializer: t = ce.defaultOptions.valueDeserializer, keyDeserializer: o = ce.defaultOptions.keyDeserializer, arrayRepeatSyntax: s = ce.
869
869
  defaultOptions.arrayRepeatSyntax, nesting: i = ce.defaultOptions.nesting, arrayRepeat: a = ce.defaultOptions.arrayRepeat, nestingSyntax: l = ce.
870
870
  defaultOptions.nestingSyntax, delimiter: c = ce.defaultOptions.delimiter } = e ?? {}, d = typeof c == "string" ? c.charCodeAt(0) : c, p = l ===
871
- "js", u = new Ko();
871
+ "js", u = new ko();
872
872
  if (typeof r != "string")
873
873
  return u;
874
874
  let y = r.length, g = "", S = -1, b = -1, h = -1, T = u, m, f = "", x = "", E = !1, R = !1, A = !1, F = !1, j = !1, N = !1, ue = !1, C = 0,
875
- z = -1, we = -1, xt = -1;
875
+ z = -1, we = -1, st = -1;
876
876
  for (let I = 0; I < y + 1; I++) {
877
877
  if (C = I !== y ? r.charCodeAt(I) : d, C === d) {
878
878
  if (ue = b > S, ue || (b = I), h !== b - 1 && (x = or(r, h + 1, z > -1 ? z : b, A, E), f = o(x), m !== void 0 && (T = (0, tr.getDeepObject)(
879
879
  T, m, f, p && j, p && N))), ue || f !== "") {
880
- ue && (g = r.slice(b + 1, I), F && (g = g.replace(Yo, " ")), R && (g = (0, $o.default)(g) || g));
880
+ ue && (g = r.slice(b + 1, I), F && (g = g.replace(Do, " ")), R && (g = (0, Oo.default)(g) || g));
881
881
  let Ee = t(g, f);
882
882
  if (a) {
883
883
  let qe = T[f];
@@ -886,38 +886,38 @@ var Xo = O(($) => {
886
886
  T[f] = Ee;
887
887
  }
888
888
  g = "", S = I, b = I, E = !1, R = !1, A = !1, F = !1, j = !1, N = !1, z = -1, h = I, T = u, m = void 0, f = "";
889
- } else C === 93 ? (a && s === "bracket" && xt === 91 && (z = we), i && (l === "index" || p) && b <= S && (h !== we && (x = or(r, h + 1,
889
+ } else C === 93 ? (a && s === "bracket" && st === 91 && (z = we), i && (l === "index" || p) && b <= S && (h !== we && (x = or(r, h + 1,
890
890
  I, A, E), f = o(x), m !== void 0 && (T = (0, tr.getDeepObject)(T, m, f, void 0, p)), m = f, A = !1, E = !1), h = I, N = !0, j = !1)) :
891
891
  C === 46 ? i && (l === "dot" || p) && b <= S && (h !== we && (x = or(r, h + 1, I, A, E), f = o(x), m !== void 0 && (T = (0, tr.getDeepObject)(
892
892
  T, m, f, p)), m = f, A = !1, E = !1), j = !0, N = !1, h = I) : C === 91 ? i && (l === "index" || p) && b <= S && (h !== we && (x = or(
893
893
  r, h + 1, I, A, E), f = o(x), p && m !== void 0 && (T = (0, tr.getDeepObject)(T, m, f, p)), m = f, A = !1, E = !1, j = !1, N = !0), h =
894
894
  I) : C === 61 ? b <= S ? b = I : R = !0 : C === 43 ? b > S ? F = !0 : A = !0 : C === 37 && (b > S ? R = !0 : E = !0);
895
- we = I, xt = C;
895
+ we = I, st = C;
896
896
  }
897
897
  return u;
898
898
  }
899
- n(Sa, "parse");
899
+ n(oa, "parse");
900
900
  });
901
901
 
902
902
  // ../node_modules/picoquery/lib/stringify.js
903
- var Jo = O((at) => {
903
+ var Mo = O((Yr) => {
904
904
  "use strict";
905
- Object.defineProperty(at, "__esModule", { value: !0 });
906
- at.stringify = xa;
907
- var Ta = st();
908
- function xa(r, e) {
905
+ Object.defineProperty(Yr, "__esModule", { value: !0 });
906
+ Yr.stringify = sa;
907
+ var na = Wr();
908
+ function sa(r, e) {
909
909
  if (r === null || typeof r != "object")
910
910
  return "";
911
911
  let t = e ?? {};
912
- return (0, Ta.stringifyObject)(r, t);
912
+ return (0, na.stringifyObject)(r, t);
913
913
  }
914
- n(xa, "stringify");
914
+ n(sa, "stringify");
915
915
  });
916
916
 
917
917
  // ../node_modules/picoquery/lib/main.js
918
918
  var nr = O((q) => {
919
919
  "use strict";
920
- var Ra = q && q.__createBinding || (Object.create ? function(r, e, t, o) {
920
+ var ia = q && q.__createBinding || (Object.create ? function(r, e, t, o) {
921
921
  o === void 0 && (o = t);
922
922
  var s = Object.getOwnPropertyDescriptor(e, t);
923
923
  (!s || ("get" in s ? !e.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: /* @__PURE__ */ n(function() {
@@ -925,25 +925,25 @@ var nr = O((q) => {
925
925
  }, "get") }), Object.defineProperty(r, o, s);
926
926
  } : function(r, e, t, o) {
927
927
  o === void 0 && (o = t), r[o] = e[t];
928
- }), wa = q && q.__exportStar || function(r, e) {
929
- for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && Ra(e, r, t);
928
+ }), aa = q && q.__exportStar || function(r, e) {
929
+ for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && ia(e, r, t);
930
930
  };
931
931
  Object.defineProperty(q, "__esModule", { value: !0 });
932
932
  q.stringify = q.parse = void 0;
933
- var Ea = Xo();
933
+ var la = jo();
934
934
  Object.defineProperty(q, "parse", { enumerable: !0, get: /* @__PURE__ */ n(function() {
935
- return Ea.parse;
935
+ return la.parse;
936
936
  }, "get") });
937
- var Aa = Jo();
937
+ var ca = Mo();
938
938
  Object.defineProperty(q, "stringify", { enumerable: !0, get: /* @__PURE__ */ n(function() {
939
- return Aa.stringify;
939
+ return ca.stringify;
940
940
  }, "get") });
941
- wa(er(), q);
941
+ aa(er(), q);
942
942
  });
943
943
 
944
944
  // ../node_modules/ansi-to-html/node_modules/entities/lib/maps/entities.json
945
- var pt = O((hf, ja) => {
946
- ja.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\
945
+ var Jr = O((Zu, ba) => {
946
+ ba.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\
947
947
  \xC2", acirc: "\xE2", acute: "\xB4", Acy: "\u0410", acy: "\u0430", AElig: "\xC6", aelig: "\xE6", af: "\u2061", Afr: "\u{1D504}", afr: "\u{1D51E}",
948
948
  Agrave: "\xC0", agrave: "\xE0", alefsym: "\u2135", aleph: "\u2135", Alpha: "\u0391", alpha: "\u03B1", Amacr: "\u0100", amacr: "\u0101", amalg: "\
949
949
  \u2A3F", amp: "&", AMP: "&", andand: "\u2A55", And: "\u2A53", and: "\u2227", andd: "\u2A5C", andslope: "\u2A58", andv: "\u2A5A", ang: "\u2220",
@@ -1224,8 +1224,8 @@ var pt = O((hf, ja) => {
1224
1224
  });
1225
1225
 
1226
1226
  // ../node_modules/ansi-to-html/node_modules/entities/lib/maps/legacy.json
1227
- var nn = O((gf, Ma) => {
1228
- Ma.exports = { Aacute: "\xC1", aacute: "\xE1", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", AElig: "\xC6", aelig: "\xE6", Agrave: "\xC0", agrave: "\
1227
+ var Go = O((ef, Sa) => {
1228
+ Sa.exports = { Aacute: "\xC1", aacute: "\xE1", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", AElig: "\xC6", aelig: "\xE6", Agrave: "\xC0", agrave: "\
1229
1229
  \xE0", amp: "&", AMP: "&", Aring: "\xC5", aring: "\xE5", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", brvbar: "\xA6", Ccedil: "\
1230
1230
  \xC7", ccedil: "\xE7", cedil: "\xB8", cent: "\xA2", copy: "\xA9", COPY: "\xA9", curren: "\xA4", deg: "\xB0", divide: "\xF7", Eacute: "\xC9",
1231
1231
  eacute: "\xE9", Ecirc: "\xCA", ecirc: "\xEA", Egrave: "\xC8", egrave: "\xE8", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", frac12: "\
@@ -1239,25 +1239,25 @@ var nn = O((gf, Ma) => {
1239
1239
  });
1240
1240
 
1241
1241
  // ../node_modules/ansi-to-html/node_modules/entities/lib/maps/xml.json
1242
- var ut = O((bf, La) => {
1243
- La.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
1242
+ var Qr = O((rf, Ta) => {
1243
+ Ta.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
1244
1244
  });
1245
1245
 
1246
1246
  // ../node_modules/ansi-to-html/node_modules/entities/lib/maps/decode.json
1247
- var sn = O((Sf, _a) => {
1248
- _a.exports = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240,
1247
+ var Uo = O((tf, xa) => {
1248
+ xa.exports = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240,
1249
1249
  "138": 352, "139": 8249, "140": 338, "142": 381, "145": 8216, "146": 8217, "147": 8220, "148": 8221, "149": 8226, "150": 8211, "151": 8212,
1250
1250
  "152": 732, "153": 8482, "154": 353, "155": 8250, "156": 339, "158": 382, "159": 376 };
1251
1251
  });
1252
1252
 
1253
1253
  // ../node_modules/ansi-to-html/node_modules/entities/lib/decode_codepoint.js
1254
- var ln = O((Ne) => {
1254
+ var Ho = O((Ne) => {
1255
1255
  "use strict";
1256
- var Na = Ne && Ne.__importDefault || function(r) {
1256
+ var Ra = Ne && Ne.__importDefault || function(r) {
1257
1257
  return r && r.__esModule ? r : { default: r };
1258
1258
  };
1259
1259
  Object.defineProperty(Ne, "__esModule", { value: !0 });
1260
- var an = Na(sn()), qa = (
1260
+ var Vo = Ra(Uo()), wa = (
1261
1261
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1262
1262
  String.fromCodePoint || function(r) {
1263
1263
  var e = "";
@@ -1265,38 +1265,38 @@ var ln = O((Ne) => {
1265
1265
  e;
1266
1266
  }
1267
1267
  );
1268
- function za(r) {
1269
- return r >= 55296 && r <= 57343 || r > 1114111 ? "\uFFFD" : (r in an.default && (r = an.default[r]), qa(r));
1268
+ function Ea(r) {
1269
+ return r >= 55296 && r <= 57343 || r > 1114111 ? "\uFFFD" : (r in Vo.default && (r = Vo.default[r]), wa(r));
1270
1270
  }
1271
- n(za, "decodeCodePoint");
1272
- Ne.default = za;
1271
+ n(Ea, "decodeCodePoint");
1272
+ Ne.default = Ea;
1273
1273
  });
1274
1274
 
1275
1275
  // ../node_modules/ansi-to-html/node_modules/entities/lib/decode.js
1276
- var yt = O((U) => {
1276
+ var et = O((U) => {
1277
1277
  "use strict";
1278
1278
  var sr = U && U.__importDefault || function(r) {
1279
1279
  return r && r.__esModule ? r : { default: r };
1280
1280
  };
1281
1281
  Object.defineProperty(U, "__esModule", { value: !0 });
1282
1282
  U.decodeHTML = U.decodeHTMLStrict = U.decodeXML = void 0;
1283
- var ft = sr(pt()), Ba = sr(nn()), Ga = sr(ut()), cn = sr(ln()), Ua = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
1284
- U.decodeXML = pn(Ga.default);
1285
- U.decodeHTMLStrict = pn(ft.default);
1286
- function pn(r) {
1287
- var e = un(r);
1283
+ var Zr = sr(Jr()), Aa = sr(Go()), Ca = sr(Qr()), Wo = sr(Ho()), va = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
1284
+ U.decodeXML = Yo(Ca.default);
1285
+ U.decodeHTMLStrict = Yo(Zr.default);
1286
+ function Yo(r) {
1287
+ var e = Ko(r);
1288
1288
  return function(t) {
1289
- return String(t).replace(Ua, e);
1289
+ return String(t).replace(va, e);
1290
1290
  };
1291
1291
  }
1292
- n(pn, "getStrictDecoder");
1293
- var dn = /* @__PURE__ */ n(function(r, e) {
1292
+ n(Yo, "getStrictDecoder");
1293
+ var $o = /* @__PURE__ */ n(function(r, e) {
1294
1294
  return r < e ? 1 : -1;
1295
1295
  }, "sorter");
1296
1296
  U.decodeHTML = function() {
1297
- for (var r = Object.keys(Ba.default).sort(dn), e = Object.keys(ft.default).sort(dn), t = 0, o = 0; t < e.length; t++)
1297
+ for (var r = Object.keys(Aa.default).sort($o), e = Object.keys(Zr.default).sort($o), t = 0, o = 0; t < e.length; t++)
1298
1298
  r[o] === e[t] ? (e[t] += ";?", o++) : e[t] += ";";
1299
- var s = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), i = un(ft.default);
1299
+ var s = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), i = Ko(Zr.default);
1300
1300
  function a(l) {
1301
1301
  return l.substr(-1) !== ";" && (l += ";"), i(l);
1302
1302
  }
@@ -1304,38 +1304,38 @@ var yt = O((U) => {
1304
1304
  return String(l).replace(s, a);
1305
1305
  };
1306
1306
  }();
1307
- function un(r) {
1307
+ function Ko(r) {
1308
1308
  return /* @__PURE__ */ n(function(t) {
1309
1309
  if (t.charAt(1) === "#") {
1310
1310
  var o = t.charAt(2);
1311
- return o === "X" || o === "x" ? cn.default(parseInt(t.substr(3), 16)) : cn.default(parseInt(t.substr(2), 10));
1311
+ return o === "X" || o === "x" ? Wo.default(parseInt(t.substr(3), 16)) : Wo.default(parseInt(t.substr(2), 10));
1312
1312
  }
1313
1313
  return r[t.slice(1, -1)] || t;
1314
1314
  }, "replace");
1315
1315
  }
1316
- n(un, "getReplacer");
1316
+ n(Ko, "getReplacer");
1317
1317
  });
1318
1318
 
1319
1319
  // ../node_modules/ansi-to-html/node_modules/entities/lib/encode.js
1320
- var ht = O((M) => {
1320
+ var tt = O((M) => {
1321
1321
  "use strict";
1322
- var fn = M && M.__importDefault || function(r) {
1322
+ var Xo = M && M.__importDefault || function(r) {
1323
1323
  return r && r.__esModule ? r : { default: r };
1324
1324
  };
1325
1325
  Object.defineProperty(M, "__esModule", { value: !0 });
1326
1326
  M.escapeUTF8 = M.escape = M.encodeNonAsciiHTML = M.encodeHTML = M.encodeXML = void 0;
1327
- var Va = fn(ut()), yn = hn(Va.default), mn = gn(yn);
1328
- M.encodeXML = Tn(yn);
1329
- var Ha = fn(pt()), mt = hn(Ha.default), Wa = gn(mt);
1330
- M.encodeHTML = Ya(mt, Wa);
1331
- M.encodeNonAsciiHTML = Tn(mt);
1332
- function hn(r) {
1327
+ var Pa = Xo(Qr()), Jo = Zo(Pa.default), Qo = en(Jo);
1328
+ M.encodeXML = on(Jo);
1329
+ var Fa = Xo(Jr()), rt = Zo(Fa.default), Ia = en(rt);
1330
+ M.encodeHTML = Da(rt, Ia);
1331
+ M.encodeNonAsciiHTML = on(rt);
1332
+ function Zo(r) {
1333
1333
  return Object.keys(r).sort().reduce(function(e, t) {
1334
1334
  return e[r[t]] = "&" + t + ";", e;
1335
1335
  }, {});
1336
1336
  }
1337
- n(hn, "getInverseObj");
1338
- function gn(r) {
1337
+ n(Zo, "getInverseObj");
1338
+ function en(r) {
1339
1339
  for (var e = [], t = [], o = 0, s = Object.keys(r); o < s.length; o++) {
1340
1340
  var i = s[o];
1341
1341
  i.length === 1 ? e.push("\\" + i) : t.push(i);
@@ -1349,9 +1349,9 @@ var ht = O((M) => {
1349
1349
  }
1350
1350
  return t.unshift("[" + e.join("") + "]"), new RegExp(t.join("|"), "g");
1351
1351
  }
1352
- n(gn, "getInverseReplacer");
1353
- var bn = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,
1354
- $a = (
1352
+ n(en, "getInverseReplacer");
1353
+ var rn = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,
1354
+ Oa = (
1355
1355
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1356
1356
  String.prototype.codePointAt != null ? (
1357
1357
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -1366,62 +1366,62 @@ var ht = O((M) => {
1366
1366
  )
1367
1367
  );
1368
1368
  function ir(r) {
1369
- return "&#x" + (r.length > 1 ? $a(r) : r.charCodeAt(0)).toString(16).toUpperCase() + ";";
1369
+ return "&#x" + (r.length > 1 ? Oa(r) : r.charCodeAt(0)).toString(16).toUpperCase() + ";";
1370
1370
  }
1371
1371
  n(ir, "singleCharReplacer");
1372
- function Ya(r, e) {
1372
+ function Da(r, e) {
1373
1373
  return function(t) {
1374
1374
  return t.replace(e, function(o) {
1375
1375
  return r[o];
1376
- }).replace(bn, ir);
1376
+ }).replace(rn, ir);
1377
1377
  };
1378
1378
  }
1379
- n(Ya, "getInverse");
1380
- var Sn = new RegExp(mn.source + "|" + bn.source, "g");
1381
- function Ka(r) {
1382
- return r.replace(Sn, ir);
1379
+ n(Da, "getInverse");
1380
+ var tn = new RegExp(Qo.source + "|" + rn.source, "g");
1381
+ function ka(r) {
1382
+ return r.replace(tn, ir);
1383
1383
  }
1384
- n(Ka, "escape");
1385
- M.escape = Ka;
1386
- function Xa(r) {
1387
- return r.replace(mn, ir);
1384
+ n(ka, "escape");
1385
+ M.escape = ka;
1386
+ function ja(r) {
1387
+ return r.replace(Qo, ir);
1388
1388
  }
1389
- n(Xa, "escapeUTF8");
1390
- M.escapeUTF8 = Xa;
1391
- function Tn(r) {
1389
+ n(ja, "escapeUTF8");
1390
+ M.escapeUTF8 = ja;
1391
+ function on(r) {
1392
1392
  return function(e) {
1393
- return e.replace(Sn, function(t) {
1393
+ return e.replace(tn, function(t) {
1394
1394
  return r[t] || ir(t);
1395
1395
  });
1396
1396
  };
1397
1397
  }
1398
- n(Tn, "getASCIIEncoder");
1398
+ n(on, "getASCIIEncoder");
1399
1399
  });
1400
1400
 
1401
1401
  // ../node_modules/ansi-to-html/node_modules/entities/lib/index.js
1402
- var Rn = O((w) => {
1402
+ var sn = O((w) => {
1403
1403
  "use strict";
1404
1404
  Object.defineProperty(w, "__esModule", { value: !0 });
1405
1405
  w.decodeXMLStrict = w.decodeHTML5Strict = w.decodeHTML4Strict = w.decodeHTML5 = w.decodeHTML4 = w.decodeHTMLStrict = w.decodeHTML = w.decodeXML =
1406
1406
  w.encodeHTML5 = w.encodeHTML4 = w.escapeUTF8 = w.escape = w.encodeNonAsciiHTML = w.encodeHTML = w.encodeXML = w.encode = w.decodeStrict = w.
1407
1407
  decode = void 0;
1408
- var ar = yt(), xn = ht();
1409
- function Ja(r, e) {
1408
+ var ar = et(), nn = tt();
1409
+ function Ma(r, e) {
1410
1410
  return (!e || e <= 0 ? ar.decodeXML : ar.decodeHTML)(r);
1411
1411
  }
1412
- n(Ja, "decode");
1413
- w.decode = Ja;
1414
- function Qa(r, e) {
1412
+ n(Ma, "decode");
1413
+ w.decode = Ma;
1414
+ function _a(r, e) {
1415
1415
  return (!e || e <= 0 ? ar.decodeXML : ar.decodeHTMLStrict)(r);
1416
1416
  }
1417
- n(Qa, "decodeStrict");
1418
- w.decodeStrict = Qa;
1419
- function Za(r, e) {
1420
- return (!e || e <= 0 ? xn.encodeXML : xn.encodeHTML)(r);
1417
+ n(_a, "decodeStrict");
1418
+ w.decodeStrict = _a;
1419
+ function La(r, e) {
1420
+ return (!e || e <= 0 ? nn.encodeXML : nn.encodeHTML)(r);
1421
1421
  }
1422
- n(Za, "encode");
1423
- w.encode = Za;
1424
- var de = ht();
1422
+ n(La, "encode");
1423
+ w.encode = La;
1424
+ var de = tt();
1425
1425
  Object.defineProperty(w, "encodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1426
1426
  return de.encodeXML;
1427
1427
  }, "get") });
@@ -1443,7 +1443,7 @@ var Rn = O((w) => {
1443
1443
  Object.defineProperty(w, "encodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1444
1444
  return de.encodeHTML;
1445
1445
  }, "get") });
1446
- var ee = yt();
1446
+ var ee = et();
1447
1447
  Object.defineProperty(w, "decodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1448
1448
  return ee.decodeXML;
1449
1449
  }, "get") });
@@ -1471,28 +1471,28 @@ var Rn = O((w) => {
1471
1471
  });
1472
1472
 
1473
1473
  // ../node_modules/ansi-to-html/lib/ansi_to_html.js
1474
- var kn = O((Pf, Dn) => {
1474
+ var gn = O((uf, hn) => {
1475
1475
  "use strict";
1476
- function el(r, e) {
1476
+ function Na(r, e) {
1477
1477
  if (!(r instanceof e))
1478
1478
  throw new TypeError("Cannot call a class as a function");
1479
1479
  }
1480
- n(el, "_classCallCheck");
1481
- function wn(r, e) {
1480
+ n(Na, "_classCallCheck");
1481
+ function an(r, e) {
1482
1482
  for (var t = 0; t < e.length; t++) {
1483
1483
  var o = e[t];
1484
1484
  o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(r, o.key, o);
1485
1485
  }
1486
1486
  }
1487
- n(wn, "_defineProperties");
1488
- function rl(r, e, t) {
1489
- return e && wn(r.prototype, e), t && wn(r, t), r;
1487
+ n(an, "_defineProperties");
1488
+ function qa(r, e, t) {
1489
+ return e && an(r.prototype, e), t && an(r, t), r;
1490
1490
  }
1491
- n(rl, "_createClass");
1492
- function Fn(r, e) {
1491
+ n(qa, "_createClass");
1492
+ function fn(r, e) {
1493
1493
  var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
1494
1494
  if (!t) {
1495
- if (Array.isArray(r) || (t = tl(r)) || e && r && typeof r.length == "number") {
1495
+ if (Array.isArray(r) || (t = za(r)) || e && r && typeof r.length == "number") {
1496
1496
  t && (r = t);
1497
1497
  var o = 0, s = /* @__PURE__ */ n(function() {
1498
1498
  }, "F");
@@ -1521,32 +1521,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1521
1521
  }
1522
1522
  }, "f") };
1523
1523
  }
1524
- n(Fn, "_createForOfIteratorHelper");
1525
- function tl(r, e) {
1524
+ n(fn, "_createForOfIteratorHelper");
1525
+ function za(r, e) {
1526
1526
  if (r) {
1527
- if (typeof r == "string") return En(r, e);
1527
+ if (typeof r == "string") return ln(r, e);
1528
1528
  var t = Object.prototype.toString.call(r).slice(8, -1);
1529
1529
  if (t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set") return Array.from(r);
1530
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return En(r, e);
1530
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return ln(r, e);
1531
1531
  }
1532
1532
  }
1533
- n(tl, "_unsupportedIterableToArray");
1534
- function En(r, e) {
1533
+ n(za, "_unsupportedIterableToArray");
1534
+ function ln(r, e) {
1535
1535
  (e == null || e > r.length) && (e = r.length);
1536
1536
  for (var t = 0, o = new Array(e); t < e; t++)
1537
1537
  o[t] = r[t];
1538
1538
  return o;
1539
1539
  }
1540
- n(En, "_arrayLikeToArray");
1541
- var ol = Rn(), An = {
1540
+ n(ln, "_arrayLikeToArray");
1541
+ var Ba = sn(), cn = {
1542
1542
  fg: "#FFF",
1543
1543
  bg: "#000",
1544
1544
  newline: !1,
1545
1545
  escapeXML: !1,
1546
1546
  stream: !1,
1547
- colors: nl()
1547
+ colors: Ga()
1548
1548
  };
1549
- function nl() {
1549
+ function Ga() {
1550
1550
  var r = {
1551
1551
  0: "#000",
1552
1552
  1: "#A00",
@@ -1568,32 +1568,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1568
1568
  return lr(0, 5).forEach(function(e) {
1569
1569
  lr(0, 5).forEach(function(t) {
1570
1570
  lr(0, 5).forEach(function(o) {
1571
- return sl(e, t, o, r);
1571
+ return Ua(e, t, o, r);
1572
1572
  });
1573
1573
  });
1574
1574
  }), lr(0, 23).forEach(function(e) {
1575
- var t = e + 232, o = In(e * 10 + 8);
1575
+ var t = e + 232, o = yn(e * 10 + 8);
1576
1576
  r[t] = "#" + o + o + o;
1577
1577
  }), r;
1578
1578
  }
1579
- n(nl, "getDefaultColors");
1580
- function sl(r, e, t, o) {
1579
+ n(Ga, "getDefaultColors");
1580
+ function Ua(r, e, t, o) {
1581
1581
  var s = 16 + r * 36 + e * 6 + t, i = r > 0 ? r * 40 + 55 : 0, a = e > 0 ? e * 40 + 55 : 0, l = t > 0 ? t * 40 + 55 : 0;
1582
- o[s] = il([i, a, l]);
1582
+ o[s] = Va([i, a, l]);
1583
1583
  }
1584
- n(sl, "setStyleColor");
1585
- function In(r) {
1584
+ n(Ua, "setStyleColor");
1585
+ function yn(r) {
1586
1586
  for (var e = r.toString(16); e.length < 2; )
1587
1587
  e = "0" + e;
1588
1588
  return e;
1589
1589
  }
1590
- n(In, "toHexString");
1591
- function il(r) {
1592
- var e = [], t = Fn(r), o;
1590
+ n(yn, "toHexString");
1591
+ function Va(r) {
1592
+ var e = [], t = fn(r), o;
1593
1593
  try {
1594
1594
  for (t.s(); !(o = t.n()).done; ) {
1595
1595
  var s = o.value;
1596
- e.push(In(s));
1596
+ e.push(yn(s));
1597
1597
  }
1598
1598
  } catch (i) {
1599
1599
  t.e(i);
@@ -1602,29 +1602,29 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1602
1602
  }
1603
1603
  return "#" + e.join("");
1604
1604
  }
1605
- n(il, "toColorHexString");
1606
- function Cn(r, e, t, o) {
1605
+ n(Va, "toColorHexString");
1606
+ function dn(r, e, t, o) {
1607
1607
  var s;
1608
- return e === "text" ? s = dl(t, o) : e === "display" ? s = ll(r, t, o) : e === "xterm256Foreground" ? s = dr(r, o.colors[t]) : e === "xt\
1609
- erm256Background" ? s = pr(r, o.colors[t]) : e === "rgb" && (s = al(r, t)), s;
1608
+ return e === "text" ? s = Ya(t, o) : e === "display" ? s = Wa(r, t, o) : e === "xterm256Foreground" ? s = dr(r, o.colors[t]) : e === "xt\
1609
+ erm256Background" ? s = pr(r, o.colors[t]) : e === "rgb" && (s = Ha(r, t)), s;
1610
1610
  }
1611
- n(Cn, "generateOutput");
1612
- function al(r, e) {
1611
+ n(dn, "generateOutput");
1612
+ function Ha(r, e) {
1613
1613
  e = e.substring(2).slice(0, -1);
1614
1614
  var t = +e.substr(0, 2), o = e.substring(5).split(";"), s = o.map(function(i) {
1615
1615
  return ("0" + Number(i).toString(16)).substr(-2);
1616
1616
  }).join("");
1617
1617
  return cr(r, (t === 38 ? "color:#" : "background-color:#") + s);
1618
1618
  }
1619
- n(al, "handleRgb");
1620
- function ll(r, e, t) {
1619
+ n(Ha, "handleRgb");
1620
+ function Wa(r, e, t) {
1621
1621
  e = parseInt(e, 10);
1622
1622
  var o = {
1623
1623
  "-1": /* @__PURE__ */ n(function() {
1624
1624
  return "<br/>";
1625
1625
  }, "_"),
1626
1626
  0: /* @__PURE__ */ n(function() {
1627
- return r.length && On(r);
1627
+ return r.length && mn(r);
1628
1628
  }, "_"),
1629
1629
  1: /* @__PURE__ */ n(function() {
1630
1630
  return re(r, "b");
@@ -1645,10 +1645,10 @@ erm256Background" ? s = pr(r, o.colors[t]) : e === "rgb" && (s = al(r, t)), s;
1645
1645
  return cr(r, "font-weight:normal;text-decoration:none;font-style:normal");
1646
1646
  }, "_"),
1647
1647
  23: /* @__PURE__ */ n(function() {
1648
- return Pn(r, "i");
1648
+ return un(r, "i");
1649
1649
  }, "_"),
1650
1650
  24: /* @__PURE__ */ n(function() {
1651
- return Pn(r, "u");
1651
+ return un(r, "u");
1652
1652
  }, "_"),
1653
1653
  39: /* @__PURE__ */ n(function() {
1654
1654
  return dr(r, t.fg);
@@ -1664,38 +1664,38 @@ erm256Background" ? s = pr(r, o.colors[t]) : e === "rgb" && (s = al(r, t)), s;
1664
1664
  pr(r, t.colors[e - 40]) : 89 < e && e < 98 ? s = dr(r, t.colors[8 + (e - 90)]) : 99 < e && e < 108 && (s = pr(r, t.colors[8 + (e - 100)])),
1665
1665
  s;
1666
1666
  }
1667
- n(ll, "handleDisplay");
1668
- function On(r) {
1667
+ n(Wa, "handleDisplay");
1668
+ function mn(r) {
1669
1669
  var e = r.slice(0);
1670
1670
  return r.length = 0, e.reverse().map(function(t) {
1671
1671
  return "</" + t + ">";
1672
1672
  }).join("");
1673
1673
  }
1674
- n(On, "resetStyles");
1674
+ n(mn, "resetStyles");
1675
1675
  function lr(r, e) {
1676
1676
  for (var t = [], o = r; o <= e; o++)
1677
1677
  t.push(o);
1678
1678
  return t;
1679
1679
  }
1680
1680
  n(lr, "range");
1681
- function cl(r) {
1681
+ function $a(r) {
1682
1682
  return function(e) {
1683
1683
  return (r === null || e.category !== r) && r !== "all";
1684
1684
  };
1685
1685
  }
1686
- n(cl, "notCategory");
1687
- function vn(r) {
1686
+ n($a, "notCategory");
1687
+ function pn(r) {
1688
1688
  r = parseInt(r, 10);
1689
1689
  var e = null;
1690
1690
  return r === 0 ? e = "all" : r === 1 ? e = "bold" : 2 < r && r < 5 ? e = "underline" : 4 < r && r < 7 ? e = "blink" : r === 8 ? e = "hid\
1691
1691
  e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ? e = "foreground-color" : (39 < r && r < 48 || r === 49 || 99 <
1692
1692
  r && r < 108) && (e = "background-color"), e;
1693
1693
  }
1694
- n(vn, "categoryForCode");
1695
- function dl(r, e) {
1696
- return e.escapeXML ? ol.encodeXML(r) : r;
1694
+ n(pn, "categoryForCode");
1695
+ function Ya(r, e) {
1696
+ return e.escapeXML ? Ba.encodeXML(r) : r;
1697
1697
  }
1698
- n(dl, "pushText");
1698
+ n(Ya, "pushText");
1699
1699
  function re(r, e, t) {
1700
1700
  return t || (t = ""), r.push(e), "<".concat(e).concat(t ? ' style="'.concat(t, '"') : "", ">");
1701
1701
  }
@@ -1712,13 +1712,13 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
1712
1712
  return re(r, "span", "background-color:" + e);
1713
1713
  }
1714
1714
  n(pr, "pushBackgroundColor");
1715
- function Pn(r, e) {
1715
+ function un(r, e) {
1716
1716
  var t;
1717
1717
  if (r.slice(-1)[0] === e && (t = r.pop()), t)
1718
1718
  return "</" + e + ">";
1719
1719
  }
1720
- n(Pn, "closeTag");
1721
- function pl(r, e, t) {
1720
+ n(un, "closeTag");
1721
+ function Ka(r, e, t) {
1722
1722
  var o = !1, s = 3;
1723
1723
  function i() {
1724
1724
  return "";
@@ -1738,7 +1738,7 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
1738
1738
  n(c, "newline");
1739
1739
  function d(E, R) {
1740
1740
  o = !0, R.trim().length === 0 && (R = "0"), R = R.trimRight(";").split(";");
1741
- var A = Fn(R), F;
1741
+ var A = fn(R), F;
1742
1742
  try {
1743
1743
  for (A.s(); !(F = A.n()).done; ) {
1744
1744
  var j = F.value;
@@ -1839,44 +1839,44 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
1839
1839
  }
1840
1840
  return S;
1841
1841
  }
1842
- n(pl, "tokenize");
1843
- function ul(r, e, t) {
1844
- return e !== "text" && (r = r.filter(cl(vn(t))), r.push({
1842
+ n(Ka, "tokenize");
1843
+ function Xa(r, e, t) {
1844
+ return e !== "text" && (r = r.filter($a(pn(t))), r.push({
1845
1845
  token: e,
1846
1846
  data: t,
1847
- category: vn(t)
1847
+ category: pn(t)
1848
1848
  })), r;
1849
1849
  }
1850
- n(ul, "updateStickyStack");
1851
- var fl = /* @__PURE__ */ function() {
1850
+ n(Xa, "updateStickyStack");
1851
+ var Ja = /* @__PURE__ */ function() {
1852
1852
  function r(e) {
1853
- el(this, r), e = e || {}, e.colors && (e.colors = Object.assign({}, An.colors, e.colors)), this.options = Object.assign({}, An, e), this.
1853
+ Na(this, r), e = e || {}, e.colors && (e.colors = Object.assign({}, cn.colors, e.colors)), this.options = Object.assign({}, cn, e), this.
1854
1854
  stack = [], this.stickyStack = [];
1855
1855
  }
1856
- return n(r, "Filter"), rl(r, [{
1856
+ return n(r, "Filter"), qa(r, [{
1857
1857
  key: "toHtml",
1858
1858
  value: /* @__PURE__ */ n(function(t) {
1859
1859
  var o = this;
1860
1860
  t = typeof t == "string" ? [t] : t;
1861
1861
  var s = this.stack, i = this.options, a = [];
1862
1862
  return this.stickyStack.forEach(function(l) {
1863
- var c = Cn(s, l.token, l.data, i);
1863
+ var c = dn(s, l.token, l.data, i);
1864
1864
  c && a.push(c);
1865
- }), pl(t.join(""), i, function(l, c) {
1866
- var d = Cn(s, l, c, i);
1867
- d && a.push(d), i.stream && (o.stickyStack = ul(o.stickyStack, l, c));
1868
- }), s.length && a.push(On(s)), a.join("");
1865
+ }), Ka(t.join(""), i, function(l, c) {
1866
+ var d = dn(s, l, c, i);
1867
+ d && a.push(d), i.stream && (o.stickyStack = Xa(o.stickyStack, l, c));
1868
+ }), s.length && a.push(mn(s)), a.join("");
1869
1869
  }, "toHtml")
1870
1870
  }]), r;
1871
1871
  }();
1872
- Dn.exports = fl;
1872
+ hn.exports = Ja;
1873
1873
  });
1874
1874
 
1875
1875
  // src/preview-api/modules/addons/main.ts
1876
1876
  import { global as hr } from "@storybook/global";
1877
1877
 
1878
1878
  // src/preview-api/modules/addons/storybook-channel-mock.ts
1879
- import { Channel as Jn } from "storybook/internal/channels";
1879
+ import { Channel as Mn } from "storybook/internal/channels";
1880
1880
  function mr() {
1881
1881
  let r = {
1882
1882
  setHandler: /* @__PURE__ */ n(() => {
@@ -1884,12 +1884,12 @@ function mr() {
1884
1884
  send: /* @__PURE__ */ n(() => {
1885
1885
  }, "send")
1886
1886
  };
1887
- return new Jn({ transport: r });
1887
+ return new Mn({ transport: r });
1888
1888
  }
1889
1889
  n(mr, "mockChannel");
1890
1890
 
1891
1891
  // src/preview-api/modules/addons/main.ts
1892
- var Sr = class Sr {
1892
+ var br = class {
1893
1893
  constructor() {
1894
1894
  this.getChannel = /* @__PURE__ */ n(() => {
1895
1895
  if (!this.channel) {
@@ -1907,32 +1907,33 @@ var Sr = class Sr {
1907
1907
  this.resolve = () => e(this.getChannel());
1908
1908
  });
1909
1909
  }
1910
- };
1911
- n(Sr, "AddonStore");
1912
- var br = Sr, gr = "__STORYBOOK_ADDONS_PREVIEW";
1913
- function Qn() {
1910
+ static {
1911
+ n(this, "AddonStore");
1912
+ }
1913
+ }, gr = "__STORYBOOK_ADDONS_PREVIEW";
1914
+ function _n() {
1914
1915
  return hr[gr] || (hr[gr] = new br()), hr[gr];
1915
1916
  }
1916
- n(Qn, "getAddonsStore");
1917
- var L = Qn();
1917
+ n(_n, "getAddonsStore");
1918
+ var _ = _n();
1918
1919
 
1919
1920
  // src/preview-api/modules/addons/definePreview.ts
1920
- function Zn(r) {
1921
+ function Ln(r) {
1921
1922
  return r;
1922
1923
  }
1923
- n(Zn, "definePreview");
1924
+ n(Ln, "definePreview");
1924
1925
 
1925
1926
  // src/preview-api/modules/addons/hooks.ts
1926
1927
  import { logger as Ce } from "storybook/internal/client-logger";
1927
1928
  import {
1928
- FORCE_RE_RENDER as es,
1929
- RESET_STORY_ARGS as rs,
1930
- STORY_RENDERED as Rt,
1931
- UPDATE_GLOBALS as ts,
1932
- UPDATE_STORY_ARGS as os
1929
+ FORCE_RE_RENDER as Nn,
1930
+ RESET_STORY_ARGS as qn,
1931
+ STORY_RENDERED as it,
1932
+ UPDATE_GLOBALS as zn,
1933
+ UPDATE_STORY_ARGS as Bn
1933
1934
  } from "storybook/internal/core-events";
1934
1935
  import { global as ze } from "@storybook/global";
1935
- var Er = class Er {
1936
+ var te = class {
1936
1937
  constructor() {
1937
1938
  this.hookListsMap = void 0;
1938
1939
  this.mountedDecorators = void 0;
@@ -1950,6 +1951,9 @@ var Er = class Er {
1950
1951
  }, "renderListener");
1951
1952
  this.init();
1952
1953
  }
1954
+ static {
1955
+ n(this, "HooksContext");
1956
+ }
1953
1957
  init() {
1954
1958
  this.hookListsMap = /* @__PURE__ */ new WeakMap(), this.mountedDecorators = /* @__PURE__ */ new Set(), this.prevMountedDecorators = /* @__PURE__ */ new Set(),
1955
1959
  this.currentHooks = [], this.nextHookIndex = 0, this.currentPhase = "NONE", this.currentEffects = [], this.prevEffects = [], this.currentDecoratorName =
@@ -1972,15 +1976,13 @@ var Er = class Er {
1972
1976
  }), this.prevEffects = this.currentEffects, this.currentEffects = [];
1973
1977
  }
1974
1978
  addRenderListeners() {
1975
- this.removeRenderListeners(), L.getChannel().on(Rt, this.renderListener);
1979
+ this.removeRenderListeners(), _.getChannel().on(it, this.renderListener);
1976
1980
  }
1977
1981
  removeRenderListeners() {
1978
- L.getChannel().removeListener(Rt, this.renderListener);
1982
+ _.getChannel().removeListener(it, this.renderListener);
1979
1983
  }
1980
1984
  };
1981
- n(Er, "HooksContext");
1982
- var te = Er;
1983
- function wt(r) {
1985
+ function at(r) {
1984
1986
  let e = /* @__PURE__ */ n((...t) => {
1985
1987
  let { hooks: o } = typeof t[0] == "function" ? t[1] : t[0], s = o.currentPhase, i = o.currentHooks, a = o.nextHookIndex, l = o.currentDecoratorName;
1986
1988
  o.currentDecoratorName = r.name, o.prevMountedDecorators.has(r) ? (o.currentPhase = "UPDATE", o.currentHooks = o.hookListsMap.get(r) || []) :
@@ -1997,39 +1999,39 @@ function wt(r) {
1997
1999
  }, "hookified");
1998
2000
  return e.originalFn = r, e;
1999
2001
  }
2000
- n(wt, "hookify");
2001
- var Tr = 0, ns = 25, xr = /* @__PURE__ */ n((r) => (e, t) => {
2002
+ n(at, "hookify");
2003
+ var Sr = 0, Gn = 25, Tr = /* @__PURE__ */ n((r) => (e, t) => {
2002
2004
  let o = r(
2003
- wt(e),
2004
- t.map((s) => wt(s))
2005
+ at(e),
2006
+ t.map((s) => at(s))
2005
2007
  );
2006
2008
  return (s) => {
2007
2009
  let { hooks: i } = s;
2008
2010
  i.prevMountedDecorators ??= /* @__PURE__ */ new Set(), i.mountedDecorators = /* @__PURE__ */ new Set([e, ...t]), i.currentContext = s, i.
2009
2011
  hasUpdates = !1;
2010
2012
  let a = o(s);
2011
- for (Tr = 1; i.hasUpdates; )
2012
- if (i.hasUpdates = !1, i.currentEffects = [], a = o(s), Tr += 1, Tr > ns)
2013
+ for (Sr = 1; i.hasUpdates; )
2014
+ if (i.hasUpdates = !1, i.currentEffects = [], a = o(s), Sr += 1, Sr > Gn)
2013
2015
  throw new Error(
2014
2016
  "Too many re-renders. Storybook limits the number of renders to prevent an infinite loop."
2015
2017
  );
2016
2018
  return i.addRenderListeners(), a;
2017
2019
  };
2018
- }, "applyHooks"), ss = /* @__PURE__ */ n((r, e) => r.length === e.length && r.every((t, o) => t === e[o]), "areDepsEqual"), Rr = /* @__PURE__ */ n(
2020
+ }, "applyHooks"), Un = /* @__PURE__ */ n((r, e) => r.length === e.length && r.every((t, o) => t === e[o]), "areDepsEqual"), xr = /* @__PURE__ */ n(
2019
2021
  () => new Error("Storybook preview hooks can only be called inside decorators and story functions."), "invalidHooksError");
2020
- function Et() {
2022
+ function lt() {
2021
2023
  return ze.STORYBOOK_HOOKS_CONTEXT || null;
2022
2024
  }
2023
- n(Et, "getHooksContextOrNull");
2024
- function wr() {
2025
- let r = Et();
2025
+ n(lt, "getHooksContextOrNull");
2026
+ function Rr() {
2027
+ let r = lt();
2026
2028
  if (r == null)
2027
- throw Rr();
2029
+ throw xr();
2028
2030
  return r;
2029
2031
  }
2030
- n(wr, "getHooksContextOrThrow");
2031
- function is(r, e, t) {
2032
- let o = wr();
2032
+ n(Rr, "getHooksContextOrThrow");
2033
+ function Vn(r, e, t) {
2034
+ let o = Rr();
2033
2035
  if (o.currentPhase === "MOUNT") {
2034
2036
  t != null && !Array.isArray(t) && Ce.warn(
2035
2037
  `${r} received a final argument that is not an array (instead, received ${t}). When specified, the final argument must be an array.`
@@ -2050,13 +2052,13 @@ s type cannot change between renders.`
2050
2052
  ), t != null && s.deps != null && t.length !== s.deps.length && Ce.warn(`The final argument passed to ${r} changed size between renders.\
2051
2053
  The order and size of this array must remain constant.
2052
2054
  Previous: ${s.deps}
2053
- Incoming: ${t}`), (t == null || s.deps == null || !ss(t, s.deps)) && (e(s), s.deps = t), s;
2055
+ Incoming: ${t}`), (t == null || s.deps == null || !Un(t, s.deps)) && (e(s), s.deps = t), s;
2054
2056
  }
2055
- throw Rr();
2057
+ throw xr();
2056
2058
  }
2057
- n(is, "useHook");
2059
+ n(Vn, "useHook");
2058
2060
  function Be(r, e, t) {
2059
- let { memoizedState: o } = is(
2061
+ let { memoizedState: o } = Vn(
2060
2062
  r,
2061
2063
  (s) => {
2062
2064
  s.memoizedState = e();
@@ -2066,103 +2068,103 @@ function Be(r, e, t) {
2066
2068
  return o;
2067
2069
  }
2068
2070
  n(Be, "useMemoLike");
2069
- function as(r, e) {
2071
+ function Hn(r, e) {
2070
2072
  return Be("useMemo", r, e);
2071
2073
  }
2072
- n(as, "useMemo");
2074
+ n(Hn, "useMemo");
2073
2075
  function ve(r, e) {
2074
2076
  return Be("useCallback", () => r, e);
2075
2077
  }
2076
2078
  n(ve, "useCallback");
2077
- function At(r, e) {
2079
+ function ct(r, e) {
2078
2080
  return Be(r, () => ({ current: e }), []);
2079
2081
  }
2080
- n(At, "useRefLike");
2081
- function ls(r) {
2082
- return At("useRef", r);
2082
+ n(ct, "useRefLike");
2083
+ function Wn(r) {
2084
+ return ct("useRef", r);
2083
2085
  }
2084
- n(ls, "useRef");
2085
- function cs() {
2086
- let r = Et();
2086
+ n(Wn, "useRef");
2087
+ function $n() {
2088
+ let r = lt();
2087
2089
  if (r != null && r.currentPhase !== "NONE")
2088
2090
  r.hasUpdates = !0;
2089
2091
  else
2090
2092
  try {
2091
- L.getChannel().emit(es);
2093
+ _.getChannel().emit(Nn);
2092
2094
  } catch {
2093
2095
  Ce.warn("State updates of Storybook preview hooks work only in browser");
2094
2096
  }
2095
2097
  }
2096
- n(cs, "triggerUpdate");
2097
- function Ct(r, e) {
2098
- let t = At(
2098
+ n($n, "triggerUpdate");
2099
+ function dt(r, e) {
2100
+ let t = ct(
2099
2101
  r,
2100
2102
  // @ts-expect-error S type should never be function, but there's no way to tell that to TypeScript
2101
2103
  typeof e == "function" ? e() : e
2102
2104
  ), o = /* @__PURE__ */ n((s) => {
2103
- t.current = typeof s == "function" ? s(t.current) : s, cs();
2105
+ t.current = typeof s == "function" ? s(t.current) : s, $n();
2104
2106
  }, "setState");
2105
2107
  return [t.current, o];
2106
2108
  }
2107
- n(Ct, "useStateLike");
2108
- function ds(r) {
2109
- return Ct("useState", r);
2109
+ n(dt, "useStateLike");
2110
+ function Yn(r) {
2111
+ return dt("useState", r);
2110
2112
  }
2111
- n(ds, "useState");
2112
- function ps(r, e, t) {
2113
- let o = t != null ? () => t(e) : e, [s, i] = Ct("useReducer", o);
2113
+ n(Yn, "useState");
2114
+ function Kn(r, e, t) {
2115
+ let o = t != null ? () => t(e) : e, [s, i] = dt("useReducer", o);
2114
2116
  return [s, /* @__PURE__ */ n((l) => i((c) => r(c, l)), "dispatch")];
2115
2117
  }
2116
- n(ps, "useReducer");
2117
- function vt(r, e) {
2118
- let t = wr(), o = Be("useEffect", () => ({ create: r }), e);
2118
+ n(Kn, "useReducer");
2119
+ function pt(r, e) {
2120
+ let t = Rr(), o = Be("useEffect", () => ({ create: r }), e);
2119
2121
  t.currentEffects.includes(o) || t.currentEffects.push(o);
2120
2122
  }
2121
- n(vt, "useEffect");
2122
- function us(r, e = []) {
2123
- let t = L.getChannel();
2124
- return vt(() => (Object.entries(r).forEach(([o, s]) => t.on(o, s)), () => {
2123
+ n(pt, "useEffect");
2124
+ function Xn(r, e = []) {
2125
+ let t = _.getChannel();
2126
+ return pt(() => (Object.entries(r).forEach(([o, s]) => t.on(o, s)), () => {
2125
2127
  Object.entries(r).forEach(
2126
2128
  ([o, s]) => t.removeListener(o, s)
2127
2129
  );
2128
2130
  }), [...Object.keys(r), ...e]), ve(t.emit.bind(t), [t]);
2129
2131
  }
2130
- n(us, "useChannel");
2132
+ n(Xn, "useChannel");
2131
2133
  function Ge() {
2132
- let { currentContext: r } = wr();
2134
+ let { currentContext: r } = Rr();
2133
2135
  if (r == null)
2134
- throw Rr();
2136
+ throw xr();
2135
2137
  return r;
2136
2138
  }
2137
2139
  n(Ge, "useStoryContext");
2138
- function fs(r, e) {
2140
+ function Jn(r, e) {
2139
2141
  let { parameters: t } = Ge();
2140
2142
  if (r)
2141
2143
  return t[r] ?? e;
2142
2144
  }
2143
- n(fs, "useParameter");
2144
- function ys() {
2145
- let r = L.getChannel(), { id: e, args: t } = Ge(), o = ve(
2146
- (i) => r.emit(os, { storyId: e, updatedArgs: i }),
2145
+ n(Jn, "useParameter");
2146
+ function Qn() {
2147
+ let r = _.getChannel(), { id: e, args: t } = Ge(), o = ve(
2148
+ (i) => r.emit(Bn, { storyId: e, updatedArgs: i }),
2147
2149
  [r, e]
2148
2150
  ), s = ve(
2149
- (i) => r.emit(rs, { storyId: e, argNames: i }),
2151
+ (i) => r.emit(qn, { storyId: e, argNames: i }),
2150
2152
  [r, e]
2151
2153
  );
2152
2154
  return [t, o, s];
2153
2155
  }
2154
- n(ys, "useArgs");
2155
- function ms() {
2156
- let r = L.getChannel(), { globals: e } = Ge(), t = ve(
2157
- (o) => r.emit(ts, { globals: o }),
2156
+ n(Qn, "useArgs");
2157
+ function Zn() {
2158
+ let r = _.getChannel(), { globals: e } = Ge(), t = ve(
2159
+ (o) => r.emit(zn, { globals: o }),
2158
2160
  [r]
2159
2161
  );
2160
2162
  return [e, t];
2161
2163
  }
2162
- n(ms, "useGlobals");
2164
+ n(Zn, "useGlobals");
2163
2165
 
2164
2166
  // src/preview-api/modules/addons/make-decorator.ts
2165
- var hs = /* @__PURE__ */ n(({
2167
+ var es = /* @__PURE__ */ n(({
2166
2168
  name: r,
2167
2169
  parameterName: e,
2168
2170
  wrapper: t,
@@ -2187,12 +2189,12 @@ var hs = /* @__PURE__ */ n(({
2187
2189
 
2188
2190
  // src/preview-api/modules/store/StoryStore.ts
2189
2191
  import {
2190
- CalledExtractOnStoreError as ri,
2191
- MissingStoryFromCsfFileError as ti
2192
+ CalledExtractOnStoreError as qs,
2193
+ MissingStoryFromCsfFileError as zs
2192
2194
  } from "storybook/internal/preview-errors";
2193
2195
 
2194
2196
  // ../node_modules/es-toolkit/dist/object/pickBy.mjs
2195
- function Ar(r, e) {
2197
+ function wr(r, e) {
2196
2198
  let t = {}, o = Object.entries(r);
2197
2199
  for (let s = 0; s < o.length; s++) {
2198
2200
  let [i, a] = o[s];
@@ -2200,7 +2202,7 @@ function Ar(r, e) {
2200
2202
  }
2201
2203
  return t;
2202
2204
  }
2203
- n(Ar, "pickBy");
2205
+ n(wr, "pickBy");
2204
2206
 
2205
2207
  // ../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
2206
2208
  function k(r) {
@@ -2229,26 +2231,26 @@ function V(r, e) {
2229
2231
  n(V, "mapValues");
2230
2232
 
2231
2233
  // ../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
2232
- var Pt = "[object RegExp]", Ft = "[object String]", It = "[object Number]", Ot = "[object Boolean]", Cr = "[object Arguments]", Dt = "[objec\
2233
- t Symbol]", kt = "[object Date]", jt = "[object Map]", Mt = "[object Set]", Lt = "[object Array]", _t = "[object Function]", Nt = "[object A\
2234
- rrayBuffer]", Ue = "[object Object]", qt = "[object Error]", zt = "[object DataView]", Bt = "[object Uint8Array]", Gt = "[object Uint8Clampe\
2235
- dArray]", Ut = "[object Uint16Array]", Vt = "[object Uint32Array]", Ht = "[object BigUint64Array]", Wt = "[object Int8Array]", $t = "[object\
2236
- Int16Array]", Yt = "[object Int32Array]", Kt = "[object BigInt64Array]", Xt = "[object Float32Array]", Jt = "[object Float64Array]";
2234
+ var ut = "[object RegExp]", ft = "[object String]", yt = "[object Number]", mt = "[object Boolean]", Er = "[object Arguments]", ht = "[objec\
2235
+ t Symbol]", gt = "[object Date]", bt = "[object Map]", St = "[object Set]", Tt = "[object Array]", xt = "[object Function]", Rt = "[object A\
2236
+ rrayBuffer]", Ue = "[object Object]", wt = "[object Error]", Et = "[object DataView]", At = "[object Uint8Array]", Ct = "[object Uint8Clampe\
2237
+ dArray]", vt = "[object Uint16Array]", Pt = "[object Uint32Array]", Ft = "[object BigUint64Array]", It = "[object Int8Array]", Ot = "[object\
2238
+ Int16Array]", Dt = "[object Int32Array]", kt = "[object BigInt64Array]", jt = "[object Float32Array]", Mt = "[object Float64Array]";
2237
2239
 
2238
2240
  // ../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
2239
- function vr(r) {
2241
+ function Ar(r) {
2240
2242
  return Object.getOwnPropertySymbols(r).filter((e) => Object.prototype.propertyIsEnumerable.call(r, e));
2241
2243
  }
2242
- n(vr, "getSymbols");
2244
+ n(Ar, "getSymbols");
2243
2245
 
2244
2246
  // ../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
2245
- function Pr(r) {
2247
+ function Cr(r) {
2246
2248
  return r == null ? r === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(r);
2247
2249
  }
2248
- n(Pr, "getTag");
2250
+ n(Cr, "getTag");
2249
2251
 
2250
2252
  // ../node_modules/es-toolkit/dist/predicate/isEqual.mjs
2251
- function Fr(r, e) {
2253
+ function vr(r, e) {
2252
2254
  if (typeof r == typeof e)
2253
2255
  switch (typeof r) {
2254
2256
  case "bigint":
@@ -2266,27 +2268,27 @@ function Fr(r, e) {
2266
2268
  }
2267
2269
  return H(r, e);
2268
2270
  }
2269
- n(Fr, "isEqual");
2271
+ n(vr, "isEqual");
2270
2272
  function H(r, e, t) {
2271
2273
  if (Object.is(r, e))
2272
2274
  return !0;
2273
- let o = Pr(r), s = Pr(e);
2274
- if (o === Cr && (o = Ue), s === Cr && (s = Ue), o !== s)
2275
+ let o = Cr(r), s = Cr(e);
2276
+ if (o === Er && (o = Ue), s === Er && (s = Ue), o !== s)
2275
2277
  return !1;
2276
2278
  switch (o) {
2277
- case Ft:
2279
+ case ft:
2278
2280
  return r.toString() === e.toString();
2279
- case It: {
2281
+ case yt: {
2280
2282
  let l = r.valueOf(), c = e.valueOf();
2281
2283
  return l === c || Number.isNaN(l) && Number.isNaN(c);
2282
2284
  }
2283
- case Ot:
2284
- case kt:
2285
- case Dt:
2285
+ case mt:
2286
+ case gt:
2287
+ case ht:
2286
2288
  return Object.is(r.valueOf(), e.valueOf());
2287
- case Pt:
2289
+ case ut:
2288
2290
  return r.source === e.source && r.flags === e.flags;
2289
- case _t:
2291
+ case xt:
2290
2292
  return r === e;
2291
2293
  }
2292
2294
  t = t ?? /* @__PURE__ */ new Map();
@@ -2296,7 +2298,7 @@ function H(r, e, t) {
2296
2298
  t.set(r, e), t.set(e, r);
2297
2299
  try {
2298
2300
  switch (o) {
2299
- case jt: {
2301
+ case bt: {
2300
2302
  if (r.size !== e.size)
2301
2303
  return !1;
2302
2304
  for (let [l, c] of r.entries())
@@ -2304,7 +2306,7 @@ function H(r, e, t) {
2304
2306
  return !1;
2305
2307
  return !0;
2306
2308
  }
2307
- case Mt: {
2309
+ case St: {
2308
2310
  if (r.size !== e.size)
2309
2311
  return !1;
2310
2312
  let l = Array.from(r.values()), c = Array.from(e.values());
@@ -2316,18 +2318,18 @@ function H(r, e, t) {
2316
2318
  }
2317
2319
  return !0;
2318
2320
  }
2319
- case Lt:
2320
- case Bt:
2321
- case Gt:
2322
- case Ut:
2323
- case Vt:
2324
- case Ht:
2325
- case Wt:
2326
- case $t:
2327
- case Yt:
2328
- case Kt:
2329
- case Xt:
2330
- case Jt: {
2321
+ case Tt:
2322
+ case At:
2323
+ case Ct:
2324
+ case vt:
2325
+ case Pt:
2326
+ case Ft:
2327
+ case It:
2328
+ case Ot:
2329
+ case Dt:
2330
+ case kt:
2331
+ case jt:
2332
+ case Mt: {
2331
2333
  if (typeof Buffer < "u" && Buffer.isBuffer(r) !== Buffer.isBuffer(e) || r.length !== e.length)
2332
2334
  return !1;
2333
2335
  for (let l = 0; l < r.length; l++)
@@ -2335,16 +2337,16 @@ function H(r, e, t) {
2335
2337
  return !1;
2336
2338
  return !0;
2337
2339
  }
2338
- case Nt:
2340
+ case Rt:
2339
2341
  return r.byteLength !== e.byteLength ? !1 : H(new Uint8Array(r), new Uint8Array(e), t);
2340
- case zt:
2342
+ case Et:
2341
2343
  return r.byteLength !== e.byteLength || r.byteOffset !== e.byteOffset ? !1 : H(r.buffer, e.buffer, t);
2342
- case qt:
2344
+ case wt:
2343
2345
  return r.name === e.name && r.message === e.message;
2344
2346
  case Ue: {
2345
2347
  if (!(H(r.constructor, e.constructor, t) || k(r) && k(e)))
2346
2348
  return !1;
2347
- let c = [...Object.keys(r), ...vr(r)], d = [...Object.keys(e), ...vr(e)];
2349
+ let c = [...Object.keys(r), ...Ar(r)], d = [...Object.keys(e), ...Ar(e)];
2348
2350
  if (c.length !== d.length)
2349
2351
  return !1;
2350
2352
  for (let p = 0; p < c.length; p++) {
@@ -2367,41 +2369,41 @@ function H(r, e, t) {
2367
2369
  n(H, "areObjectsEqual");
2368
2370
 
2369
2371
  // src/preview-api/modules/store/StoryStore.ts
2370
- var Je = fe(Or(), 1);
2372
+ var Je = fe(Fr(), 1);
2371
2373
 
2372
2374
  // src/preview-api/core-annotations.ts
2373
- import Zt from "storybook/internal/component-testing/preview";
2374
- import eo from "storybook/actions/preview";
2375
- import ro from "storybook/backgrounds/preview";
2376
- import to from "storybook/highlight/preview";
2377
- import oo from "storybook/measure/preview";
2378
- import no from "storybook/outline/preview";
2379
- import so from "storybook/test/preview";
2380
- import io from "storybook/viewport/preview";
2375
+ import Lt from "storybook/internal/component-testing/preview";
2376
+ import Nt from "storybook/actions/preview";
2377
+ import qt from "storybook/backgrounds/preview";
2378
+ import zt from "storybook/highlight/preview";
2379
+ import Bt from "storybook/measure/preview";
2380
+ import Gt from "storybook/outline/preview";
2381
+ import Ut from "storybook/test/preview";
2382
+ import Vt from "storybook/viewport/preview";
2381
2383
  function oe() {
2382
2384
  return [
2383
2385
  // @ts-expect-error CJS fallback
2384
- (oo.default ?? oo)(),
2386
+ (Bt.default ?? Bt)(),
2385
2387
  // @ts-expect-error CJS fallback
2386
- (ro.default ?? ro)(),
2388
+ (qt.default ?? qt)(),
2387
2389
  // @ts-expect-error CJS fallback
2388
- (to.default ?? to)(),
2390
+ (zt.default ?? zt)(),
2389
2391
  // @ts-expect-error CJS fallback
2390
- (no.default ?? no)(),
2392
+ (Gt.default ?? Gt)(),
2391
2393
  // @ts-expect-error CJS fallback
2392
- (io.default ?? io)(),
2394
+ (Vt.default ?? Vt)(),
2393
2395
  // @ts-expect-error CJS fallback
2394
- (eo.default ?? eo)(),
2396
+ (Nt.default ?? Nt)(),
2395
2397
  // @ts-expect-error CJS fallback
2396
- (Zt.default ?? Zt)(),
2398
+ (Lt.default ?? Lt)(),
2397
2399
  // @ts-expect-error CJS fallback
2398
- (so.default ?? so)()
2400
+ (Ut.default ?? Ut)()
2399
2401
  ];
2400
2402
  }
2401
2403
  n(oe, "getCoreAnnotations");
2402
2404
 
2403
2405
  // src/preview-api/modules/store/args.ts
2404
- import { once as Dr } from "storybook/internal/client-logger";
2406
+ import { once as Ir } from "storybook/internal/client-logger";
2405
2407
 
2406
2408
  // ../node_modules/ts-dedent/esm/index.js
2407
2409
  function P(r) {
@@ -2439,7 +2441,7 @@ function P(r) {
2439
2441
  n(P, "dedent");
2440
2442
 
2441
2443
  // src/preview-api/modules/store/args.ts
2442
- var ye = Symbol("incompatible"), kr = /* @__PURE__ */ n((r, e) => {
2444
+ var ye = Symbol("incompatible"), Or = /* @__PURE__ */ n((r, e) => {
2443
2445
  let t = e.type;
2444
2446
  if (r == null || !t || e.mapping)
2445
2447
  return r;
@@ -2454,21 +2456,21 @@ var ye = Symbol("incompatible"), kr = /* @__PURE__ */ n((r, e) => {
2454
2456
  return String(r) === "true";
2455
2457
  case "array":
2456
2458
  return !t.value || !Array.isArray(r) ? ye : r.reduce((o, s, i) => {
2457
- let a = kr(s, { type: t.value });
2459
+ let a = Or(s, { type: t.value });
2458
2460
  return a !== ye && (o[i] = a), o;
2459
2461
  }, new Array(r.length));
2460
2462
  case "object":
2461
2463
  return typeof r == "string" || typeof r == "number" ? r : !t.value || typeof r != "object" ? ye : Object.entries(r).reduce((o, [s, i]) => {
2462
- let a = kr(i, { type: t.value[s] });
2464
+ let a = Or(i, { type: t.value[s] });
2463
2465
  return a === ye ? o : Object.assign(o, { [s]: a });
2464
2466
  }, {});
2465
2467
  default:
2466
2468
  return ye;
2467
2469
  }
2468
- }, "map"), ao = /* @__PURE__ */ n((r, e) => Object.entries(r).reduce((t, [o, s]) => {
2470
+ }, "map"), Ht = /* @__PURE__ */ n((r, e) => Object.entries(r).reduce((t, [o, s]) => {
2469
2471
  if (!e[o])
2470
2472
  return t;
2471
- let i = kr(s, e[o]);
2473
+ let i = Or(s, e[o]);
2472
2474
  return i === ye ? t : Object.assign(t, { [o]: i });
2473
2475
  }, {}), "mapArgsToTypes"), Pe = /* @__PURE__ */ n((r, e) => Array.isArray(r) && Array.isArray(e) ? e.reduce(
2474
2476
  (t, o, s) => (t[s] = Pe(r[s], e[s]), t),
@@ -2480,20 +2482,20 @@ var ye = Symbol("incompatible"), kr = /* @__PURE__ */ n((r, e) => {
2480
2482
  } else
2481
2483
  t[o] = r[o];
2482
2484
  return t;
2483
- }, {}), "combineArgs"), lo = /* @__PURE__ */ n((r, e) => Object.entries(e).reduce((t, [o, { options: s }]) => {
2485
+ }, {}), "combineArgs"), Wt = /* @__PURE__ */ n((r, e) => Object.entries(e).reduce((t, [o, { options: s }]) => {
2484
2486
  function i() {
2485
2487
  return o in r && (t[o] = r[o]), t;
2486
2488
  }
2487
2489
  if (n(i, "allowArg"), !s)
2488
2490
  return i();
2489
2491
  if (!Array.isArray(s))
2490
- return Dr.error(P`
2492
+ return Ir.error(P`
2491
2493
  Invalid argType: '${o}.options' should be an array.
2492
2494
 
2493
2495
  More info: https://storybook.js.org/docs/api/arg-types
2494
2496
  `), i();
2495
2497
  if (s.some((u) => u && ["object", "function"].includes(typeof u)))
2496
- return Dr.error(P`
2498
+ return Ir.error(P`
2497
2499
  Invalid argType: '${o}.options' should only contain primitives. Use a 'mapping' for complex values.
2498
2500
 
2499
2501
  More info: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
@@ -2502,11 +2504,11 @@ var ye = Symbol("incompatible"), kr = /* @__PURE__ */ n((r, e) => {
2502
2504
  if (r[o] === void 0 || s.includes(r[o]) || c)
2503
2505
  return i();
2504
2506
  let d = a ? `${o}[${l}]` : o, p = s.map((u) => typeof u == "string" ? `'${u}'` : String(u)).join(", ");
2505
- return Dr.warn(`Received illegal value for '${d}'. Supported options: ${p}`), t;
2507
+ return Ir.warn(`Received illegal value for '${d}'. Supported options: ${p}`), t;
2506
2508
  }, {}), "validateOptions"), ne = Symbol("Deeply equal"), me = /* @__PURE__ */ n((r, e) => {
2507
2509
  if (typeof r != typeof e)
2508
2510
  return e;
2509
- if (Fr(r, e))
2511
+ if (vr(r, e))
2510
2512
  return ne;
2511
2513
  if (Array.isArray(r) && Array.isArray(e)) {
2512
2514
  let t = e.reduce((o, s, i) => {
@@ -2519,29 +2521,32 @@ var ye = Symbol("incompatible"), kr = /* @__PURE__ */ n((r, e) => {
2519
2521
  let s = me(r?.[o], e?.[o]);
2520
2522
  return s === ne ? t : Object.assign(t, { [o]: s });
2521
2523
  }, {}) : e;
2522
- }, "deepDiff"), jr = "UNTARGETED";
2523
- function co({
2524
+ }, "deepDiff"), Dr = "UNTARGETED";
2525
+ function $t({
2524
2526
  args: r,
2525
2527
  argTypes: e
2526
2528
  }) {
2527
2529
  let t = {};
2528
2530
  return Object.entries(r).forEach(([o, s]) => {
2529
- let { target: i = jr } = e[o] || {};
2531
+ let { target: i = Dr } = e[o] || {};
2530
2532
  t[i] = t[i] || {}, t[i][o] = s;
2531
2533
  }), t;
2532
2534
  }
2533
- n(co, "groupArgsByTarget");
2535
+ n($t, "groupArgsByTarget");
2534
2536
 
2535
2537
  // src/preview-api/modules/store/ArgsStore.ts
2536
- function gs(r) {
2538
+ function rs(r) {
2537
2539
  return Object.keys(r).forEach((e) => r[e] === void 0 && delete r[e]), r;
2538
2540
  }
2539
- n(gs, "deleteUndefined");
2540
- var Mr = class Mr {
2541
+ n(rs, "deleteUndefined");
2542
+ var Ve = class {
2541
2543
  constructor() {
2542
2544
  this.initialArgsByStoryId = {};
2543
2545
  this.argsByStoryId = {};
2544
2546
  }
2547
+ static {
2548
+ n(this, "ArgsStore");
2549
+ }
2545
2550
  get(e) {
2546
2551
  if (!(e in this.argsByStoryId))
2547
2552
  throw new Error(`No args known for ${e} -- has it been rendered yet?`);
@@ -2556,34 +2561,35 @@ var Mr = class Mr {
2556
2561
  }
2557
2562
  }
2558
2563
  updateFromDelta(e, t) {
2559
- let o = lo(t, e.argTypes);
2564
+ let o = Wt(t, e.argTypes);
2560
2565
  this.argsByStoryId[e.id] = Pe(this.argsByStoryId[e.id], o);
2561
2566
  }
2562
2567
  updateFromPersisted(e, t) {
2563
- let o = ao(t, e.argTypes);
2568
+ let o = Ht(t, e.argTypes);
2564
2569
  return this.updateFromDelta(e, o);
2565
2570
  }
2566
2571
  update(e, t) {
2567
2572
  if (!(e in this.argsByStoryId))
2568
2573
  throw new Error(`No args known for ${e} -- has it been rendered yet?`);
2569
- this.argsByStoryId[e] = gs({
2574
+ this.argsByStoryId[e] = rs({
2570
2575
  ...this.argsByStoryId[e],
2571
2576
  ...t
2572
2577
  });
2573
2578
  }
2574
2579
  };
2575
- n(Mr, "ArgsStore");
2576
- var Ve = Mr;
2577
2580
 
2578
2581
  // src/preview-api/modules/store/GlobalsStore.ts
2579
- import { logger as bs } from "storybook/internal/client-logger";
2582
+ import { logger as ts } from "storybook/internal/client-logger";
2580
2583
 
2581
2584
  // src/preview-api/modules/store/csf/getValuesFromArgTypes.ts
2582
- var po = /* @__PURE__ */ n((r = {}) => Object.entries(r).reduce((e, [t, { defaultValue: o }]) => (typeof o < "u" && (e[t] = o), e), {}), "ge\
2585
+ var Yt = /* @__PURE__ */ n((r = {}) => Object.entries(r).reduce((e, [t, { defaultValue: o }]) => (typeof o < "u" && (e[t] = o), e), {}), "ge\
2583
2586
  tValuesFromArgTypes");
2584
2587
 
2585
2588
  // src/preview-api/modules/store/GlobalsStore.ts
2586
- var Lr = class Lr {
2589
+ var He = class {
2590
+ static {
2591
+ n(this, "GlobalsStore");
2592
+ }
2587
2593
  constructor({
2588
2594
  globals: e = {},
2589
2595
  globalTypes: t = {}
@@ -2593,11 +2599,11 @@ var Lr = class Lr {
2593
2599
  set({ globals: e = {}, globalTypes: t = {} }) {
2594
2600
  let o = this.initialGlobals && me(this.initialGlobals, this.globals);
2595
2601
  this.allowedGlobalNames = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
2596
- let s = po(t);
2602
+ let s = Yt(t);
2597
2603
  this.initialGlobals = { ...s, ...e }, this.globals = this.initialGlobals, o && o !== ne && this.updateFromPersisted(o);
2598
2604
  }
2599
2605
  filterAllowedGlobals(e) {
2600
- return Object.entries(e).reduce((t, [o, s]) => (this.allowedGlobalNames.has(o) ? t[o] = s : bs.warn(
2606
+ return Object.entries(e).reduce((t, [o, s]) => (this.allowedGlobalNames.has(o) ? t[o] = s : ts.warn(
2601
2607
  `Attempted to set a global (${o}) that is not defined in initial globals or globalTypes`
2602
2608
  ), t), {});
2603
2609
  }
@@ -2612,18 +2618,19 @@ var Lr = class Lr {
2612
2618
  this.globals = { ...this.globals, ...this.filterAllowedGlobals(e) };
2613
2619
  }
2614
2620
  };
2615
- n(Lr, "GlobalsStore");
2616
- var He = Lr;
2617
2621
 
2618
2622
  // src/preview-api/modules/store/StoryIndexStore.ts
2619
- var uo = fe(Or(), 1);
2620
- import { MissingStoryAfterHmrError as Ss } from "storybook/internal/preview-errors";
2621
- var Ts = (0, uo.default)(1)(
2623
+ var Kt = fe(Fr(), 1);
2624
+ import { MissingStoryAfterHmrError as os } from "storybook/internal/preview-errors";
2625
+ var ns = (0, Kt.default)(1)(
2622
2626
  (r) => Object.values(r).reduce(
2623
2627
  (e, t) => (e[t.importPath] = e[t.importPath] || t, e),
2624
2628
  {}
2625
2629
  )
2626
- ), _r = class _r {
2630
+ ), We = class {
2631
+ static {
2632
+ n(this, "StoryIndexStore");
2633
+ }
2627
2634
  constructor({ entries: e } = { v: 5, entries: {} }) {
2628
2635
  this.entries = e;
2629
2636
  }
@@ -2639,35 +2646,33 @@ var Ts = (0, uo.default)(1)(
2639
2646
  storyIdToEntry(e) {
2640
2647
  let t = this.entries[e];
2641
2648
  if (!t)
2642
- throw new Ss({ storyId: e });
2649
+ throw new os({ storyId: e });
2643
2650
  return t;
2644
2651
  }
2645
2652
  importPathToEntry(e) {
2646
- return Ts(this.entries)[e];
2653
+ return ns(this.entries)[e];
2647
2654
  }
2648
2655
  };
2649
- n(_r, "StoryIndexStore");
2650
- var We = _r;
2651
2656
 
2652
2657
  // src/preview-api/modules/store/csf/normalizeInputTypes.ts
2653
- var xs = /* @__PURE__ */ n((r) => typeof r == "string" ? { name: r } : r, "normalizeType"), Rs = /* @__PURE__ */ n((r) => typeof r == "strin\
2654
- g" ? { type: r } : r, "normalizeControl"), ws = /* @__PURE__ */ n((r, e) => {
2658
+ var ss = /* @__PURE__ */ n((r) => typeof r == "string" ? { name: r } : r, "normalizeType"), is = /* @__PURE__ */ n((r) => typeof r == "strin\
2659
+ g" ? { type: r } : r, "normalizeControl"), as = /* @__PURE__ */ n((r, e) => {
2655
2660
  let { type: t, control: o, ...s } = r, i = {
2656
2661
  name: e,
2657
2662
  ...s
2658
2663
  };
2659
- return t && (i.type = xs(t)), o ? i.control = Rs(o) : o === !1 && (i.control = { disable: !0 }), i;
2660
- }, "normalizeInputType"), se = /* @__PURE__ */ n((r) => V(r, ws), "normalizeInputTypes");
2664
+ return t && (i.type = ss(t)), o ? i.control = is(o) : o === !1 && (i.control = { disable: !0 }), i;
2665
+ }, "normalizeInputType"), se = /* @__PURE__ */ n((r) => V(r, as), "normalizeInputTypes");
2661
2666
 
2662
2667
  // src/preview-api/modules/store/csf/normalizeStory.ts
2663
- import { deprecate as Es, logger as As } from "storybook/internal/client-logger";
2664
- import { storyNameFromExport as Cs, toId as vs } from "storybook/internal/csf";
2668
+ import { deprecate as ls, logger as cs } from "storybook/internal/client-logger";
2669
+ import { storyNameFromExport as ds, toId as ps } from "storybook/internal/csf";
2665
2670
 
2666
2671
  // src/preview-api/modules/store/csf/normalizeArrays.ts
2667
2672
  var v = /* @__PURE__ */ n((r) => Array.isArray(r) ? r : r ? [r] : [], "normalizeArrays");
2668
2673
 
2669
2674
  // src/preview-api/modules/store/csf/normalizeStory.ts
2670
- var Ps = P`
2675
+ var us = P`
2671
2676
  CSF .story annotations deprecated; annotate story functions directly:
2672
2677
  - StoryFn.story.name => StoryFn.storyName
2673
2678
  - StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators)
@@ -2675,8 +2680,8 @@ See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-
2675
2680
  `;
2676
2681
  function he(r, e, t) {
2677
2682
  let o = e, s = typeof e == "function" ? e : null, { story: i } = o;
2678
- i && (As.debug("deprecated story", i), Es(Ps));
2679
- let a = Cs(r), l = typeof o != "function" && o.name || o.storyName || i?.name || a, c = [
2683
+ i && (cs.debug("deprecated story", i), ls(us));
2684
+ let a = ds(r), l = typeof o != "function" && o.name || o.storyName || i?.name || a, c = [
2680
2685
  ...v(o.decorators),
2681
2686
  ...v(i?.decorators)
2682
2687
  ], d = { ...i?.parameters, ...o.parameters }, p = { ...i?.args, ...o.args }, u = { ...i?.argTypes, ...o.argTypes }, y = [...v(o.loaders), ...v(
@@ -2686,7 +2691,7 @@ function he(r, e, t) {
2686
2691
  ], S = [
2687
2692
  ...v(o.experimental_afterEach),
2688
2693
  ...v(i?.experimental_afterEach)
2689
- ], { render: b, play: h, tags: T = [], globals: m = {} } = o, f = d.__id || vs(t.id, a);
2694
+ ], { render: b, play: h, tags: T = [], globals: m = {} } = o, f = d.__id || ps(t.id, a);
2690
2695
  return {
2691
2696
  moduleExport: e,
2692
2697
  id: f,
@@ -2708,15 +2713,15 @@ function he(r, e, t) {
2708
2713
  n(he, "normalizeStory");
2709
2714
 
2710
2715
  // src/preview-api/modules/store/csf/processCSFFile.ts
2711
- import { logger as yo } from "storybook/internal/client-logger";
2712
- import { isExportStory as fo, isStory as Is } from "storybook/internal/csf";
2716
+ import { logger as Jt } from "storybook/internal/client-logger";
2717
+ import { isExportStory as Xt, isStory as ys } from "storybook/internal/csf";
2713
2718
 
2714
2719
  // src/preview-api/modules/store/csf/normalizeComponentAnnotations.ts
2715
- import { sanitize as Fs } from "storybook/internal/csf";
2720
+ import { sanitize as fs } from "storybook/internal/csf";
2716
2721
  function Fe(r, e = r.title, t) {
2717
2722
  let { id: o, argTypes: s } = r;
2718
2723
  return {
2719
- id: Fs(o || e),
2724
+ id: fs(o || e),
2720
2725
  ...r,
2721
2726
  title: e,
2722
2727
  ...s && { argTypes: se(s) },
@@ -2729,29 +2734,29 @@ function Fe(r, e = r.title, t) {
2729
2734
  n(Fe, "normalizeComponentAnnotations");
2730
2735
 
2731
2736
  // src/preview-api/modules/store/csf/processCSFFile.ts
2732
- var Os = /* @__PURE__ */ n((r) => {
2737
+ var ms = /* @__PURE__ */ n((r) => {
2733
2738
  let { globals: e, globalTypes: t } = r;
2734
- (e || t) && yo.error(
2739
+ (e || t) && Jt.error(
2735
2740
  "Global args/argTypes can only be set globally",
2736
2741
  JSON.stringify({
2737
2742
  globals: e,
2738
2743
  globalTypes: t
2739
2744
  })
2740
2745
  );
2741
- }, "checkGlobals"), Ds = /* @__PURE__ */ n((r) => {
2746
+ }, "checkGlobals"), hs = /* @__PURE__ */ n((r) => {
2742
2747
  let { options: e } = r;
2743
- e?.storySort && yo.error("The storySort option parameter can only be set globally");
2748
+ e?.storySort && Jt.error("The storySort option parameter can only be set globally");
2744
2749
  }, "checkStorySort"), $e = /* @__PURE__ */ n((r) => {
2745
- r && (Os(r), Ds(r));
2750
+ r && (ms(r), hs(r));
2746
2751
  }, "checkDisallowedParameters");
2747
- function mo(r, e, t) {
2752
+ function Qt(r, e, t) {
2748
2753
  let { default: o, __namedExportsOrder: s, ...i } = r, a = Object.values(i)[0];
2749
- if (Is(a)) {
2754
+ if (ys(a)) {
2750
2755
  let d = Fe(a.meta.input, t, e);
2751
2756
  $e(d.parameters);
2752
2757
  let p = { meta: d, stories: {}, moduleExports: r };
2753
2758
  return Object.keys(i).forEach((u) => {
2754
- if (fo(u, d)) {
2759
+ if (Xt(u, d)) {
2755
2760
  let y = he(u, i[u].input, d);
2756
2761
  $e(y.parameters), p.stories[y.id] = y;
2757
2762
  }
@@ -2765,37 +2770,37 @@ function mo(r, e, t) {
2765
2770
  $e(l.parameters);
2766
2771
  let c = { meta: l, stories: {}, moduleExports: r };
2767
2772
  return Object.keys(i).forEach((d) => {
2768
- if (fo(d, l)) {
2773
+ if (Xt(d, l)) {
2769
2774
  let p = he(d, i[d], l);
2770
2775
  $e(p.parameters), c.stories[p.id] = p;
2771
2776
  }
2772
2777
  }), c;
2773
2778
  }
2774
- n(mo, "processCSFFile");
2779
+ n(Qt, "processCSFFile");
2775
2780
 
2776
2781
  // src/preview-api/modules/store/csf/prepareStory.ts
2777
- import { combineTags as js, includeConditionalArg as Ms } from "storybook/internal/csf";
2778
- import { NoRenderFunctionError as Ls } from "storybook/internal/preview-errors";
2779
- import { global as _s } from "@storybook/global";
2780
- import { global as Ns } from "@storybook/global";
2782
+ import { combineTags as bs, includeConditionalArg as Ss } from "storybook/internal/csf";
2783
+ import { NoRenderFunctionError as Ts } from "storybook/internal/preview-errors";
2784
+ import { global as xs } from "@storybook/global";
2785
+ import { global as Rs } from "@storybook/global";
2781
2786
 
2782
2787
  // src/preview-api/modules/preview-web/render/mount-utils.ts
2783
- function go(r) {
2784
- return r != null && ks(r).includes("mount");
2788
+ function eo(r) {
2789
+ return r != null && gs(r).includes("mount");
2785
2790
  }
2786
- n(go, "mountDestructured");
2787
- function ks(r) {
2791
+ n(eo, "mountDestructured");
2792
+ function gs(r) {
2788
2793
  let e = r.toString().match(/[^(]*\(([^)]*)/);
2789
2794
  if (!e)
2790
2795
  return [];
2791
- let t = ho(e[1]);
2796
+ let t = Zt(e[1]);
2792
2797
  if (!t.length)
2793
2798
  return [];
2794
2799
  let o = t[0];
2795
- return o.startsWith("{") && o.endsWith("}") ? ho(o.slice(1, -1).replace(/\s/g, "")).map((i) => i.replace(/:.*|=.*/g, "")) : [];
2800
+ return o.startsWith("{") && o.endsWith("}") ? Zt(o.slice(1, -1).replace(/\s/g, "")).map((i) => i.replace(/:.*|=.*/g, "")) : [];
2796
2801
  }
2797
- n(ks, "getUsedProps");
2798
- function ho(r) {
2802
+ n(gs, "getUsedProps");
2803
+ function Zt(r) {
2799
2804
  let e = [], t = [], o = 0;
2800
2805
  for (let i = 0; i < r.length; i++)
2801
2806
  if (r[i] === "{" || r[i] === "[")
@@ -2809,15 +2814,15 @@ function ho(r) {
2809
2814
  let s = r.substring(o).trim();
2810
2815
  return s && e.push(s), e;
2811
2816
  }
2812
- n(ho, "splitByComma");
2817
+ n(Zt, "splitByComma");
2813
2818
 
2814
2819
  // src/preview-api/modules/store/decorators.ts
2815
- function bo(r, e, t) {
2820
+ function ro(r, e, t) {
2816
2821
  let o = t(r);
2817
2822
  return (s) => e(o, s);
2818
2823
  }
2819
- n(bo, "decorateStory");
2820
- function So({
2824
+ n(ro, "decorateStory");
2825
+ function to({
2821
2826
  componentId: r,
2822
2827
  title: e,
2823
2828
  kind: t,
@@ -2831,38 +2836,38 @@ function So({
2831
2836
  } = {}) {
2832
2837
  return d;
2833
2838
  }
2834
- n(So, "sanitizeStoryContextUpdate");
2835
- function Nr(r, e) {
2839
+ n(to, "sanitizeStoryContextUpdate");
2840
+ function kr(r, e) {
2836
2841
  let t = {}, o = /* @__PURE__ */ n((i) => (a) => {
2837
2842
  if (!t.value)
2838
2843
  throw new Error("Decorated function called without init");
2839
2844
  return t.value = {
2840
2845
  ...t.value,
2841
- ...So(a)
2846
+ ...to(a)
2842
2847
  }, i(t.value);
2843
2848
  }, "bindWithContext"), s = e.reduce(
2844
- (i, a) => bo(i, a, o),
2849
+ (i, a) => ro(i, a, o),
2845
2850
  r
2846
2851
  );
2847
2852
  return (i) => (t.value = i, s(i));
2848
2853
  }
2849
- n(Nr, "defaultDecorateStory");
2854
+ n(kr, "defaultDecorateStory");
2850
2855
 
2851
2856
  // src/preview-api/modules/store/parameters.ts
2852
- var _ = /* @__PURE__ */ n((...r) => {
2857
+ var L = /* @__PURE__ */ n((...r) => {
2853
2858
  let e = {}, t = r.filter(Boolean), o = t.reduce((s, i) => (Object.entries(i).forEach(([a, l]) => {
2854
2859
  let c = s[a];
2855
2860
  Array.isArray(l) || typeof c > "u" ? s[a] = l : k(l) && k(c) ? e[a] = !0 : typeof l < "u" && (s[a] = l);
2856
2861
  }), s), {});
2857
2862
  return Object.keys(e).forEach((s) => {
2858
2863
  let i = t.filter(Boolean).map((a) => a[s]).filter((a) => typeof a < "u");
2859
- i.every((a) => k(a)) ? o[s] = _(...i) : o[s] = i[i.length - 1];
2864
+ i.every((a) => k(a)) ? o[s] = L(...i) : o[s] = i[i.length - 1];
2860
2865
  }), o;
2861
2866
  }, "combineParameters");
2862
2867
 
2863
2868
  // src/preview-api/modules/store/csf/prepareStory.ts
2864
2869
  function Ie(r, e, t) {
2865
- let { moduleExport: o, id: s, name: i } = r || {}, a = To(
2870
+ let { moduleExport: o, id: s, name: i } = r || {}, a = oo(
2866
2871
  r,
2867
2872
  e,
2868
2873
  t
@@ -2903,15 +2908,15 @@ function Ie(r, e, t) {
2903
2908
  return;
2904
2909
  await F(R);
2905
2910
  }
2906
- }, "applyAfterEach"), p = /* @__PURE__ */ n((R) => R.originalStoryFn(R.args, R), "undecoratedStoryFn"), { applyDecorators: u = Nr, runStep: y } = t,
2911
+ }, "applyAfterEach"), p = /* @__PURE__ */ n((R) => R.originalStoryFn(R.args, R), "undecoratedStoryFn"), { applyDecorators: u = kr, runStep: y } = t,
2907
2912
  g = [
2908
2913
  ...v(r?.decorators),
2909
2914
  ...v(e?.decorators),
2910
2915
  ...v(t?.decorators)
2911
- ], S = r?.userStoryFn || r?.render || e.render || t.render, b = xr(u)(p, g), h = /* @__PURE__ */ n((R) => b(R), "unboundStoryFn"), T = r?.
2912
- play ?? e?.play, m = go(T);
2916
+ ], S = r?.userStoryFn || r?.render || e.render || t.render, b = Tr(u)(p, g), h = /* @__PURE__ */ n((R) => b(R), "unboundStoryFn"), T = r?.
2917
+ play ?? e?.play, m = eo(T);
2913
2918
  if (!S && !m)
2914
- throw new Ls({ id: s });
2919
+ throw new Ts({ id: s });
2915
2920
  let f = /* @__PURE__ */ n((R) => async () => (await R.renderToCanvas(), R.canvas), "defaultMount"), x = r.mount ?? e.mount ?? t.mount ?? f,
2916
2921
  E = t.testingLibraryRender;
2917
2922
  return {
@@ -2936,25 +2941,25 @@ function Ie(r, e, t) {
2936
2941
  };
2937
2942
  }
2938
2943
  n(Ie, "prepareStory");
2939
- function qr(r, e, t) {
2944
+ function jr(r, e, t) {
2940
2945
  return {
2941
- ...To(void 0, r, e),
2946
+ ...oo(void 0, r, e),
2942
2947
  moduleExport: t
2943
2948
  };
2944
2949
  }
2945
- n(qr, "prepareMeta");
2946
- function To(r, e, t) {
2947
- let o = ["dev", "test"], s = Ns.DOCS_OPTIONS?.autodocs === !0 ? ["autodocs"] : [], i = js(
2950
+ n(jr, "prepareMeta");
2951
+ function oo(r, e, t) {
2952
+ let o = ["dev", "test"], s = Rs.DOCS_OPTIONS?.autodocs === !0 ? ["autodocs"] : [], i = bs(
2948
2953
  ...o,
2949
2954
  ...s,
2950
2955
  ...t.tags ?? [],
2951
2956
  ...e.tags ?? [],
2952
2957
  ...r?.tags ?? []
2953
- ), a = _(
2958
+ ), a = L(
2954
2959
  t.parameters,
2955
2960
  e.parameters,
2956
2961
  r?.parameters
2957
- ), { argTypesEnhancers: l = [], argsEnhancers: c = [] } = t, d = _(
2962
+ ), { argTypesEnhancers: l = [], argsEnhancers: c = [] } = t, d = L(
2958
2963
  t.argTypes,
2959
2964
  e.argTypes,
2960
2965
  r?.argTypes
@@ -3006,20 +3011,20 @@ function To(r, e, t) {
3006
3011
  let { name: S, story: b, ...h } = y;
3007
3012
  return h;
3008
3013
  }
3009
- n(To, "preparePartialAnnotations");
3014
+ n(oo, "preparePartialAnnotations");
3010
3015
  function Ye(r) {
3011
3016
  let { args: e } = r, t = {
3012
3017
  ...r,
3013
3018
  allArgs: void 0,
3014
3019
  argsByTarget: void 0
3015
3020
  };
3016
- if (_s.FEATURES?.argTypeTargetsV7) {
3017
- let i = co(r);
3021
+ if (xs.FEATURES?.argTypeTargetsV7) {
3022
+ let i = $t(r);
3018
3023
  t = {
3019
3024
  ...r,
3020
3025
  allArgs: r.args,
3021
3026
  argsByTarget: i,
3022
- args: i[jr] || {}
3027
+ args: i[Dr] || {}
3023
3028
  };
3024
3029
  }
3025
3030
  let o = Object.entries(t.args).reduce((i, [a, l]) => {
@@ -3032,15 +3037,15 @@ function Ye(r) {
3032
3037
  return i[a] = Array.isArray(l) ? l.map(c) : c(l), i;
3033
3038
  }, {}), s = Object.entries(o).reduce((i, [a, l]) => {
3034
3039
  let c = t.argTypes[a] || {};
3035
- return Ms(c, o, t.globals) && (i[a] = l), i;
3040
+ return Ss(c, o, t.globals) && (i[a] = l), i;
3036
3041
  }, {});
3037
3042
  return { ...t, unmappedArgs: e, args: s };
3038
3043
  }
3039
3044
  n(Ye, "prepareContext");
3040
3045
 
3041
3046
  // src/preview-api/modules/store/inferArgTypes.ts
3042
- import { logger as qs } from "storybook/internal/client-logger";
3043
- var zr = /* @__PURE__ */ n((r, e, t) => {
3047
+ import { logger as ws } from "storybook/internal/client-logger";
3048
+ var Mr = /* @__PURE__ */ n((r, e, t) => {
3044
3049
  let o = typeof r;
3045
3050
  switch (o) {
3046
3051
  case "boolean":
@@ -3052,44 +3057,44 @@ var zr = /* @__PURE__ */ n((r, e, t) => {
3052
3057
  default:
3053
3058
  break;
3054
3059
  }
3055
- return r ? t.has(r) ? (qs.warn(P`
3060
+ return r ? t.has(r) ? (ws.warn(P`
3056
3061
  We've detected a cycle in arg '${e}'. Args should be JSON-serializable.
3057
3062
 
3058
3063
  Consider using the mapping feature or fully custom args:
3059
3064
  - Mapping: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
3060
3065
  - Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args
3061
- `), { name: "other", value: "cyclic object" }) : (t.add(r), Array.isArray(r) ? { name: "array", value: r.length > 0 ? zr(r[0], e, new Set(
3062
- t)) : { name: "other", value: "unknown" } } : { name: "object", value: V(r, (i) => zr(i, e, new Set(t))) }) : { name: "object", value: {} };
3063
- }, "inferType"), Br = /* @__PURE__ */ n((r) => {
3066
+ `), { name: "other", value: "cyclic object" }) : (t.add(r), Array.isArray(r) ? { name: "array", value: r.length > 0 ? Mr(r[0], e, new Set(
3067
+ t)) : { name: "other", value: "unknown" } } : { name: "object", value: V(r, (i) => Mr(i, e, new Set(t))) }) : { name: "object", value: {} };
3068
+ }, "inferType"), _r = /* @__PURE__ */ n((r) => {
3064
3069
  let { id: e, argTypes: t = {}, initialArgs: o = {} } = r, s = V(o, (a, l) => ({
3065
3070
  name: l,
3066
- type: zr(a, `${e}.${l}`, /* @__PURE__ */ new Set())
3071
+ type: Mr(a, `${e}.${l}`, /* @__PURE__ */ new Set())
3067
3072
  })), i = V(t, (a, l) => ({
3068
3073
  name: l
3069
3074
  }));
3070
- return _(s, i, t);
3075
+ return L(s, i, t);
3071
3076
  }, "inferArgTypes");
3072
- Br.secondPass = !0;
3077
+ _r.secondPass = !0;
3073
3078
 
3074
3079
  // src/preview-api/modules/store/inferControls.ts
3075
- import { logger as zs } from "storybook/internal/client-logger";
3080
+ import { logger as Es } from "storybook/internal/client-logger";
3076
3081
 
3077
3082
  // src/preview-api/modules/store/filterArgTypes.ts
3078
- var xo = /* @__PURE__ */ n((r, e) => Array.isArray(e) ? e.includes(r) : r.match(e), "matches"), Ke = /* @__PURE__ */ n((r, e, t) => !e && !t ?
3079
- r : r && Ar(r, (o, s) => {
3083
+ var no = /* @__PURE__ */ n((r, e) => Array.isArray(e) ? e.includes(r) : r.match(e), "matches"), Ke = /* @__PURE__ */ n((r, e, t) => !e && !t ?
3084
+ r : r && wr(r, (o, s) => {
3080
3085
  let i = o.name || s.toString();
3081
- return !!(!e || xo(i, e)) && (!t || !xo(i, t));
3086
+ return !!(!e || no(i, e)) && (!t || !no(i, t));
3082
3087
  }), "filterArgTypes");
3083
3088
 
3084
3089
  // src/preview-api/modules/store/inferControls.ts
3085
- var Bs = /* @__PURE__ */ n((r, e, t) => {
3090
+ var As = /* @__PURE__ */ n((r, e, t) => {
3086
3091
  let { type: o, options: s } = r;
3087
3092
  if (o) {
3088
3093
  if (t.color && t.color.test(e)) {
3089
3094
  let i = o.name;
3090
3095
  if (i === "string")
3091
3096
  return { control: { type: "color" } };
3092
- i !== "enum" && zs.warn(
3097
+ i !== "enum" && Es.warn(
3093
3098
  `Addon controls: Control of type color only supports string, received "${i}" instead`
3094
3099
  );
3095
3100
  }
@@ -3118,13 +3123,12 @@ var Bs = /* @__PURE__ */ n((r, e, t) => {
3118
3123
  }, "inferControl"), Oe = /* @__PURE__ */ n((r) => {
3119
3124
  let {
3120
3125
  argTypes: e,
3121
- // eslint-disable-next-line @typescript-eslint/naming-convention
3122
3126
  parameters: { __isArgsStory: t, controls: { include: o = null, exclude: s = null, matchers: i = {} } = {} }
3123
3127
  } = r;
3124
3128
  if (!t)
3125
3129
  return e;
3126
- let a = Ke(e, o, s), l = V(a, (c, d) => c?.type && Bs(c, d.toString(), i));
3127
- return _(l, a);
3130
+ let a = Ke(e, o, s), l = V(a, (c, d) => c?.type && As(c, d.toString(), i));
3131
+ return L(l, a);
3128
3132
  }, "inferControls");
3129
3133
  Oe.secondPass = !0;
3130
3134
 
@@ -3149,7 +3153,7 @@ function ge({
3149
3153
  experimental_afterEach: v(a),
3150
3154
  argTypesEnhancers: [
3151
3155
  ...t || [],
3152
- Br,
3156
+ _r,
3153
3157
  // There's an architectural decision to be made regarding embedded addons in core:
3154
3158
  //
3155
3159
  // Option 1: Keep embedded addons but ensure consistency by moving addon-specific code
@@ -3174,10 +3178,10 @@ function ge({
3174
3178
  n(ge, "normalizeProjectAnnotations");
3175
3179
 
3176
3180
  // src/preview-api/modules/store/csf/composeConfigs.ts
3177
- import { global as Gs } from "@storybook/global";
3181
+ import { global as Cs } from "@storybook/global";
3178
3182
 
3179
3183
  // src/preview-api/modules/store/csf/beforeAll.ts
3180
- var Ro = /* @__PURE__ */ n((r) => async () => {
3184
+ var so = /* @__PURE__ */ n((r) => async () => {
3181
3185
  let e = [];
3182
3186
  for (let t of r) {
3183
3187
  let o = await t();
@@ -3190,7 +3194,7 @@ var Ro = /* @__PURE__ */ n((r) => async () => {
3190
3194
  }, "composeBeforeAllHooks");
3191
3195
 
3192
3196
  // src/preview-api/modules/store/csf/stepRunners.ts
3193
- function Gr(r) {
3197
+ function Lr(r) {
3194
3198
  return async (e, t, o) => {
3195
3199
  await r.reduceRight(
3196
3200
  (i, a) => async () => a(e, i, o),
@@ -3198,7 +3202,7 @@ function Gr(r) {
3198
3202
  )();
3199
3203
  };
3200
3204
  }
3201
- n(Gr, "composeStepRunners");
3205
+ n(Lr, "composeStepRunners");
3202
3206
 
3203
3207
  // src/preview-api/modules/store/csf/composeConfigs.ts
3204
3208
  function ke(r, e) {
@@ -3223,9 +3227,9 @@ n(De, "getSingletonField");
3223
3227
  function K(r) {
3224
3228
  let e = [oe(), ...r], t = Y(e, "argTypesEnhancers"), o = ke(e, "runStep"), s = Y(e, "beforeAll");
3225
3229
  return {
3226
- parameters: _(...ke(e, "parameters")),
3230
+ parameters: L(...ke(e, "parameters")),
3227
3231
  decorators: Y(e, "decorators", {
3228
- reverseFileOrder: !(Gs.FEATURES?.legacyDecoratorFileOrder ?? !1)
3232
+ reverseFileOrder: !(Cs.FEATURES?.legacyDecoratorFileOrder ?? !1)
3229
3233
  }),
3230
3234
  args: Xe(e, "args"),
3231
3235
  argsEnhancers: Y(e, "argsEnhancers"),
@@ -3237,13 +3241,13 @@ function K(r) {
3237
3241
  initialGlobals: Xe(e, "initialGlobals"),
3238
3242
  globalTypes: Xe(e, "globalTypes"),
3239
3243
  loaders: Y(e, "loaders"),
3240
- beforeAll: Ro(s),
3244
+ beforeAll: so(s),
3241
3245
  beforeEach: Y(e, "beforeEach"),
3242
3246
  experimental_afterEach: Y(e, "experimental_afterEach"),
3243
3247
  render: De(e, "render"),
3244
3248
  renderToCanvas: De(e, "renderToCanvas"),
3245
3249
  applyDecorators: De(e, "applyDecorators"),
3246
- runStep: Gr(o),
3250
+ runStep: Lr(o),
3247
3251
  tags: Y(e, "tags"),
3248
3252
  mount: De(e, "mount"),
3249
3253
  testingLibraryRender: De(e, "testingLibraryRender")
@@ -3252,56 +3256,57 @@ function K(r) {
3252
3256
  n(K, "composeConfigs");
3253
3257
 
3254
3258
  // src/preview-api/modules/store/csf/portable-stories.ts
3255
- import { isExportStory as Vs } from "storybook/internal/csf";
3256
- import { MountMustBeDestructuredError as Hs } from "storybook/internal/preview-errors";
3259
+ import { isExportStory as Ps } from "storybook/internal/csf";
3260
+ import { MountMustBeDestructuredError as Fs } from "storybook/internal/preview-errors";
3257
3261
 
3258
3262
  // src/preview-api/modules/store/reporter-api.ts
3259
- var Ur = class Ur {
3263
+ var ie = class {
3260
3264
  constructor() {
3261
3265
  this.reports = [];
3262
3266
  }
3267
+ static {
3268
+ n(this, "ReporterAPI");
3269
+ }
3263
3270
  async addReport(e) {
3264
3271
  this.reports.push(e);
3265
3272
  }
3266
3273
  };
3267
- n(Ur, "ReporterAPI");
3268
- var ie = Ur;
3269
3274
 
3270
3275
  // src/preview-api/modules/store/csf/csf-factory-utils.ts
3271
- import { isStory as Us } from "storybook/internal/csf";
3272
- function Vr(r, e, t) {
3273
- return Us(r) ? {
3276
+ import { isStory as vs } from "storybook/internal/csf";
3277
+ function Nr(r, e, t) {
3278
+ return vs(r) ? {
3274
3279
  story: r.input,
3275
3280
  meta: r.meta.input,
3276
3281
  preview: r.meta.preview.composed
3277
3282
  } : { story: r, meta: e, preview: t };
3278
3283
  }
3279
- n(Vr, "getCsfFactoryAnnotations");
3284
+ n(Nr, "getCsfFactoryAnnotations");
3280
3285
 
3281
3286
  // src/preview-api/modules/store/csf/portable-stories.ts
3282
- function Ws(r) {
3287
+ function Is(r) {
3283
3288
  globalThis.defaultProjectAnnotations = r;
3284
3289
  }
3285
- n(Ws, "setDefaultProjectAnnotations");
3286
- var $s = "ComposedStory", Ys = "Unnamed Story";
3287
- function Ks(r) {
3290
+ n(Is, "setDefaultProjectAnnotations");
3291
+ var Os = "ComposedStory", Ds = "Unnamed Story";
3292
+ function ks(r) {
3288
3293
  return r ? K([r]) : {};
3289
3294
  }
3290
- n(Ks, "extractAnnotation");
3291
- function Xs(r) {
3295
+ n(ks, "extractAnnotation");
3296
+ function js(r) {
3292
3297
  let e = Array.isArray(r) ? r : [r];
3293
3298
  return globalThis.globalProjectAnnotations = K([
3294
3299
  globalThis.defaultProjectAnnotations ?? {},
3295
- K(e.map(Ks))
3300
+ K(e.map(ks))
3296
3301
  ]), globalThis.globalProjectAnnotations ?? {};
3297
3302
  }
3298
- n(Xs, "setProjectAnnotations");
3303
+ n(js, "setProjectAnnotations");
3299
3304
  var X = [];
3300
- function wo(r, e, t, o, s) {
3305
+ function io(r, e, t, o, s) {
3301
3306
  if (r === void 0)
3302
3307
  throw new Error("Expected a story but received undefined.");
3303
- e.title = e.title ?? $s;
3304
- let i = Fe(e), a = s || r.storyName || r.story?.name || r.name || Ys, l = he(
3308
+ e.title = e.title ?? Os;
3309
+ let i = Fe(e), a = s || r.storyName || r.story?.name || r.name || Ds, l = he(
3305
3310
  a,
3306
3311
  r,
3307
3312
  i
@@ -3367,7 +3372,7 @@ ${x.description}`);
3367
3372
  return f.canvasElement ??= globalThis?.document?.body, g && (f.loaded = g.loaded), Object.assign(f, m), d.playFunction(f);
3368
3373
  }, "play"), b = /* @__PURE__ */ n((m) => {
3369
3374
  let f = y();
3370
- return Object.assign(f, m), ei(d, f);
3375
+ return Object.assign(f, m), Ns(d, f);
3371
3376
  }, "run"), h = d.playFunction ? S : void 0;
3372
3377
  return Object.assign(
3373
3378
  /* @__PURE__ */ n(function(f) {
@@ -3398,22 +3403,22 @@ ${x.description}`);
3398
3403
  }
3399
3404
  );
3400
3405
  }
3401
- n(wo, "composeStory");
3402
- var Js = /* @__PURE__ */ n((r, e, t, o) => wo(r, e, t, {}, o), "defaultComposeStory");
3403
- function Qs(r, e, t = Js) {
3406
+ n(io, "composeStory");
3407
+ var Ms = /* @__PURE__ */ n((r, e, t, o) => io(r, e, t, {}, o), "defaultComposeStory");
3408
+ function _s(r, e, t = Ms) {
3404
3409
  let { default: o, __esModule: s, __namedExportsOrder: i, ...a } = r, l = o;
3405
3410
  return Object.entries(a).reduce(
3406
3411
  (d, [p, u]) => {
3407
- let { story: y, meta: g } = Vr(u);
3408
- return !l && g && (l = g), Vs(p, l) ? Object.assign(d, {
3412
+ let { story: y, meta: g } = Nr(u);
3413
+ return !l && g && (l = g), Ps(p, l) ? Object.assign(d, {
3409
3414
  [p]: t(y, l, e, p)
3410
3415
  }) : d;
3411
3416
  },
3412
3417
  {}
3413
3418
  );
3414
3419
  }
3415
- n(Qs, "composeStories");
3416
- function Zs(r) {
3420
+ n(_s, "composeStories");
3421
+ function Ls(r) {
3417
3422
  return r.extend({
3418
3423
  mount: /* @__PURE__ */ n(async ({ mount: e, page: t }, o) => {
3419
3424
  await o(async (s, ...i) => {
@@ -3443,8 +3448,8 @@ function Zs(r) {
3443
3448
  }, "mount")
3444
3449
  });
3445
3450
  }
3446
- n(Zs, "createPlaywrightTest");
3447
- async function ei(r, e) {
3451
+ n(Ls, "createPlaywrightTest");
3452
+ async function Ns(r, e) {
3448
3453
  for (let s of [...X].reverse())
3449
3454
  await s();
3450
3455
  if (X.length = 0, !e.canvasElement) {
@@ -3458,13 +3463,13 @@ async function ei(r, e) {
3458
3463
  X.push(...(await r.applyBeforeEach(e)).filter(Boolean));
3459
3464
  let t = r.playFunction, o = r.usesMount;
3460
3465
  o || await e.mount(), !e.abortSignal.aborted && (t && (o || (e.mount = async () => {
3461
- throw new Hs({ playFunction: t.toString() });
3466
+ throw new Fs({ playFunction: t.toString() });
3462
3467
  }), await t(e)), await r.applyAfterEach(e));
3463
3468
  }
3464
- n(ei, "runStory");
3469
+ n(Ns, "runStory");
3465
3470
 
3466
3471
  // src/preview-api/modules/store/StoryStore.ts
3467
- var Eo = 1e3, oi = 1e4, Hr = class Hr {
3472
+ var ao = 1e3, Bs = 1e4, be = class {
3468
3473
  constructor(e, t, o) {
3469
3474
  this.importFn = t;
3470
3475
  this.storyIndex = new We(e), this.projectAnnotations = ge(
@@ -3472,7 +3477,10 @@ var Eo = 1e3, oi = 1e4, Hr = class Hr {
3472
3477
  );
3473
3478
  let { initialGlobals: s, globalTypes: i } = this.projectAnnotations;
3474
3479
  this.args = new Ve(), this.userGlobals = new He({ globals: s, globalTypes: i }), this.hooks = {}, this.cleanupCallbacks = {}, this.processCSFFileWithCache =
3475
- (0, Je.default)(Eo)(mo), this.prepareMetaWithCache = (0, Je.default)(Eo)(qr), this.prepareStoryWithCache = (0, Je.default)(oi)(Ie);
3480
+ (0, Je.default)(ao)(Qt), this.prepareMetaWithCache = (0, Je.default)(ao)(jr), this.prepareStoryWithCache = (0, Je.default)(Bs)(Ie);
3481
+ }
3482
+ static {
3483
+ n(this, "StoryStore");
3476
3484
  }
3477
3485
  setProjectAnnotations(e) {
3478
3486
  this.projectAnnotations = ge(e);
@@ -3536,7 +3544,7 @@ var Eo = 1e3, oi = 1e4, Hr = class Hr {
3536
3544
  }) {
3537
3545
  let o = t.stories[e];
3538
3546
  if (!o)
3539
- throw new ti({ storyId: e });
3547
+ throw new zs({ storyId: e });
3540
3548
  let s = t.meta, i = this.prepareStoryWithCache(
3541
3549
  o,
3542
3550
  s,
@@ -3592,7 +3600,7 @@ var Eo = 1e3, oi = 1e4, Hr = class Hr {
3592
3600
  extract(e = { includeDocsOnly: !1 }) {
3593
3601
  let { cachedCSFFiles: t } = this;
3594
3602
  if (!t)
3595
- throw new ri();
3603
+ throw new qs();
3596
3604
  return Object.entries(this.storyIndex.entries).reduce(
3597
3605
  (o, [s, { type: i, importPath: a }]) => {
3598
3606
  if (i === "docs")
@@ -3616,20 +3624,18 @@ var Eo = 1e3, oi = 1e4, Hr = class Hr {
3616
3624
  );
3617
3625
  }
3618
3626
  };
3619
- n(Hr, "StoryStore");
3620
- var be = Hr;
3621
3627
 
3622
3628
  // src/preview-api/modules/store/autoTitle.ts
3623
- import { once as ni } from "storybook/internal/client-logger";
3629
+ import { once as Gs } from "storybook/internal/client-logger";
3624
3630
 
3625
3631
  // ../node_modules/slash/index.js
3626
- function Wr(r) {
3632
+ function qr(r) {
3627
3633
  return r.startsWith("\\\\?\\") ? r : r.replace(/\\/g, "/");
3628
3634
  }
3629
- n(Wr, "slash");
3635
+ n(qr, "slash");
3630
3636
 
3631
3637
  // src/preview-api/modules/store/autoTitle.ts
3632
- var si = /* @__PURE__ */ n((r) => {
3638
+ var Us = /* @__PURE__ */ n((r) => {
3633
3639
  if (r.length === 0)
3634
3640
  return r;
3635
3641
  let e = r[r.length - 1], t = e?.replace(/(?:[.](?:story|stories))?([.][^.]+)$/i, "");
@@ -3639,28 +3645,28 @@ var si = /* @__PURE__ */ n((r) => {
3639
3645
  return t && o && t.toLowerCase() === o.toLowerCase() ? [...r.slice(0, -2), t] : t && (/^(story|stories)([.][^.]+)$/i.test(e) || /^index$/i.
3640
3646
  test(t)) ? r.slice(0, -1) : [...r.slice(0, -1), t];
3641
3647
  }, "sanitize");
3642
- function Ao(r) {
3648
+ function lo(r) {
3643
3649
  return r.flatMap((e) => e.split("/")).filter(Boolean).join("/");
3644
3650
  }
3645
- n(Ao, "pathJoin");
3646
- var Co = /* @__PURE__ */ n((r, e, t) => {
3651
+ n(lo, "pathJoin");
3652
+ var co = /* @__PURE__ */ n((r, e, t) => {
3647
3653
  let { directory: o, importPathMatcher: s, titlePrefix: i = "" } = e || {};
3648
- typeof r == "number" && ni.warn(P`
3654
+ typeof r == "number" && Gs.warn(P`
3649
3655
  CSF Auto-title received a numeric fileName. This typically happens when
3650
3656
  webpack is mis-configured in production mode. To force webpack to produce
3651
3657
  filenames, set optimization.moduleIds = "named" in your webpack config.
3652
3658
  `);
3653
- let a = Wr(String(r));
3659
+ let a = qr(String(r));
3654
3660
  if (s.exec(a)) {
3655
3661
  if (!t) {
3656
- let l = a.replace(o, ""), c = Ao([i, l]).split("/");
3657
- return c = si(c), c.join("/");
3662
+ let l = a.replace(o, ""), c = lo([i, l]).split("/");
3663
+ return c = Us(c), c.join("/");
3658
3664
  }
3659
- return i ? Ao([i, t]) : t;
3665
+ return i ? lo([i, t]) : t;
3660
3666
  }
3661
- }, "userOrAutoTitleFromSpecifier"), ii = /* @__PURE__ */ n((r, e, t) => {
3667
+ }, "userOrAutoTitleFromSpecifier"), Vs = /* @__PURE__ */ n((r, e, t) => {
3662
3668
  for (let o = 0; o < e.length; o += 1) {
3663
- let s = Co(r, e[o], t);
3669
+ let s = co(r, e[o], t);
3664
3670
  if (s)
3665
3671
  return s;
3666
3672
  }
@@ -3668,10 +3674,10 @@ var Co = /* @__PURE__ */ n((r, e, t) => {
3668
3674
  }, "userOrAutoTitle");
3669
3675
 
3670
3676
  // src/preview-api/modules/store/storySort.ts
3671
- var vo = /\s*\/\s*/, Po = /* @__PURE__ */ n((r = {}) => (e, t) => {
3677
+ var po = /\s*\/\s*/, uo = /* @__PURE__ */ n((r = {}) => (e, t) => {
3672
3678
  if (e.title === t.title && !r.includeNames)
3673
3679
  return 0;
3674
- let o = r.method || "configure", s = r.order || [], i = e.title.trim().split(vo), a = t.title.trim().split(vo);
3680
+ let o = r.method || "configure", s = r.order || [], i = e.title.trim().split(po), a = t.title.trim().split(po);
3675
3681
  r.includeNames && (i.push(e.name), a.push(t.name));
3676
3682
  let l = 0;
3677
3683
  for (; i[l] || a[l]; ) {
@@ -3695,18 +3701,18 @@ var vo = /\s*\/\s*/, Po = /* @__PURE__ */ n((r = {}) => (e, t) => {
3695
3701
  }, "storySort");
3696
3702
 
3697
3703
  // src/preview-api/modules/store/sortStories.ts
3698
- var ai = /* @__PURE__ */ n((r, e, t) => {
3704
+ var Hs = /* @__PURE__ */ n((r, e, t) => {
3699
3705
  if (e) {
3700
3706
  let o;
3701
- typeof e == "function" ? o = e : o = Po(e), r.sort(o);
3707
+ typeof e == "function" ? o = e : o = uo(e), r.sort(o);
3702
3708
  } else
3703
3709
  r.sort(
3704
3710
  (o, s) => t.indexOf(o.importPath) - t.indexOf(s.importPath)
3705
3711
  );
3706
3712
  return r;
3707
- }, "sortStoriesCommon"), li = /* @__PURE__ */ n((r, e, t) => {
3713
+ }, "sortStoriesCommon"), Ws = /* @__PURE__ */ n((r, e, t) => {
3708
3714
  try {
3709
- return ai(r, e, t);
3715
+ return Hs(r, e, t);
3710
3716
  } catch (o) {
3711
3717
  throw new Error(P`
3712
3718
  Error sorting stories with sort parameter ${e}:
@@ -3721,48 +3727,48 @@ var ai = /* @__PURE__ */ n((r, e, t) => {
3721
3727
  }, "sortStoriesV7");
3722
3728
 
3723
3729
  // src/preview-api/modules/preview-web/Preview.tsx
3724
- import { deprecate as yi, logger as ko } from "storybook/internal/client-logger";
3730
+ import { deprecate as Qs, logger as go } from "storybook/internal/client-logger";
3725
3731
  import {
3726
- ARGTYPES_INFO_REQUEST as mi,
3727
- ARGTYPES_INFO_RESPONSE as jo,
3728
- CONFIG_ERROR as hi,
3729
- FORCE_REMOUNT as gi,
3730
- FORCE_RE_RENDER as bi,
3731
- GLOBALS_UPDATED as Mo,
3732
- RESET_STORY_ARGS as Si,
3733
- SET_GLOBALS as Ti,
3734
- STORY_ARGS_UPDATED as xi,
3735
- STORY_INDEX_INVALIDATED as Ri,
3736
- UPDATE_GLOBALS as wi,
3737
- UPDATE_STORY_ARGS as Ei
3732
+ ARGTYPES_INFO_REQUEST as Zs,
3733
+ ARGTYPES_INFO_RESPONSE as bo,
3734
+ CONFIG_ERROR as ei,
3735
+ FORCE_REMOUNT as ri,
3736
+ FORCE_RE_RENDER as ti,
3737
+ GLOBALS_UPDATED as So,
3738
+ RESET_STORY_ARGS as oi,
3739
+ SET_GLOBALS as ni,
3740
+ STORY_ARGS_UPDATED as si,
3741
+ STORY_INDEX_INVALIDATED as ii,
3742
+ UPDATE_GLOBALS as ai,
3743
+ UPDATE_STORY_ARGS as li
3738
3744
  } from "storybook/internal/core-events";
3739
3745
  import {
3740
3746
  CalledPreviewMethodBeforeInitializationError as W,
3741
- MissingRenderToCanvasError as Ai,
3742
- StoryIndexFetchError as Ci,
3743
- StoryStoreAccessedBeforeInitializationError as vi
3747
+ MissingRenderToCanvasError as ci,
3748
+ StoryIndexFetchError as di,
3749
+ StoryStoreAccessedBeforeInitializationError as pi
3744
3750
  } from "storybook/internal/preview-errors";
3745
- import { global as Pi } from "@storybook/global";
3751
+ import { global as ui } from "@storybook/global";
3746
3752
 
3747
3753
  // src/preview-api/modules/preview-web/render/StoryRender.ts
3748
3754
  import {
3749
- PLAY_FUNCTION_THREW_EXCEPTION as ci,
3750
- STORY_FINISHED as Fo,
3751
- STORY_RENDERED as di,
3752
- STORY_RENDER_PHASE_CHANGED as Io,
3753
- UNHANDLED_ERRORS_WHILE_PLAYING as pi
3755
+ PLAY_FUNCTION_THREW_EXCEPTION as $s,
3756
+ STORY_FINISHED as fo,
3757
+ STORY_RENDERED as Ys,
3758
+ STORY_RENDER_PHASE_CHANGED as yo,
3759
+ UNHANDLED_ERRORS_WHILE_PLAYING as Ks
3754
3760
  } from "storybook/internal/core-events";
3755
3761
  import {
3756
- MountMustBeDestructuredError as ui,
3757
- NoStoryMountedError as fi
3762
+ MountMustBeDestructuredError as Xs,
3763
+ NoStoryMountedError as Js
3758
3764
  } from "storybook/internal/preview-errors";
3759
3765
 
3760
3766
  // src/preview-api/modules/preview-web/render/Render.ts
3761
3767
  var J = new Error("prepareAborted");
3762
3768
 
3763
3769
  // src/preview-api/modules/preview-web/render/StoryRender.ts
3764
- var { AbortController: Oo } = globalThis;
3765
- function Do(r) {
3770
+ var { AbortController: mo } = globalThis;
3771
+ function ho(r) {
3766
3772
  try {
3767
3773
  let { name: e = "Error", message: t = String(r), stack: o } = r;
3768
3774
  return { name: e, message: t, stack: o };
@@ -3770,8 +3776,8 @@ function Do(r) {
3770
3776
  return { name: "Error", message: String(r) };
3771
3777
  }
3772
3778
  }
3773
- n(Do, "serializeError");
3774
- var $r = class $r {
3779
+ n(ho, "serializeError");
3780
+ var ae = class {
3775
3781
  constructor(e, t, o, s, i, a, l = { autoplay: !0, forceInitialArgs: !1 }, c) {
3776
3782
  this.channel = e;
3777
3783
  this.store = t;
@@ -3787,13 +3793,16 @@ var $r = class $r {
3787
3793
  this.teardownRender = /* @__PURE__ */ n(() => {
3788
3794
  }, "teardownRender");
3789
3795
  this.torndown = !1;
3790
- this.abortController = new Oo(), c && (this.story = c, this.phase = "preparing");
3796
+ this.abortController = new mo(), c && (this.story = c, this.phase = "preparing");
3797
+ }
3798
+ static {
3799
+ n(this, "StoryRender");
3791
3800
  }
3792
3801
  async runPhase(e, t, o) {
3793
- this.phase = t, this.channel.emit(Io, { newPhase: this.phase, storyId: this.id }), o && (await o(), this.checkIfAborted(e));
3802
+ this.phase = t, this.channel.emit(yo, { newPhase: this.phase, storyId: this.id }), o && (await o(), this.checkIfAborted(e));
3794
3803
  }
3795
3804
  checkIfAborted(e) {
3796
- return e.aborted ? (this.phase = "aborted", this.channel.emit(Io, { newPhase: this.phase, storyId: this.id }), !0) : !1;
3805
+ return e.aborted ? (this.phase = "aborted", this.channel.emit(yo, { newPhase: this.phase, storyId: this.id }), !0) : !1;
3797
3806
  }
3798
3807
  async prepare() {
3799
3808
  if (await this.runPhase(this.abortController.signal, "preparing", async () => {
@@ -3845,7 +3854,7 @@ var $r = class $r {
3845
3854
  playFunction: S,
3846
3855
  runStep: b
3847
3856
  } = s;
3848
- t && !e && (this.cancelRender(), this.abortController = new Oo());
3857
+ t && !e && (this.cancelRender(), this.abortController = new mo());
3849
3858
  let h = this.abortController.signal, T = !1, m = s.usesMount;
3850
3859
  try {
3851
3860
  let f = {
@@ -3906,27 +3915,27 @@ var $r = class $r {
3906
3915
  window.addEventListener("error", F), window.addEventListener("unhandledrejection", F), this.disableKeyListeners = !0;
3907
3916
  try {
3908
3917
  if (m ? await S(f) : (f.mount = async () => {
3909
- throw new ui({ playFunction: S.toString() });
3918
+ throw new Xs({ playFunction: S.toString() });
3910
3919
  }, await this.runPhase(h, "playing", async () => S(f))), !T)
3911
- throw new fi();
3920
+ throw new Js();
3912
3921
  this.checkIfAborted(h), !R && A.size > 0 ? await this.runPhase(h, "errored") : await this.runPhase(h, "played");
3913
3922
  } catch (C) {
3914
3923
  if (this.callbacks.showStoryDuringRender?.(), await this.runPhase(h, "errored", async () => {
3915
- this.channel.emit(ci, Do(C));
3924
+ this.channel.emit($s, ho(C));
3916
3925
  }), this.story.parameters.throwPlayFunctionExceptions !== !1)
3917
3926
  throw C;
3918
3927
  console.error(C);
3919
3928
  }
3920
3929
  if (!R && A.size > 0 && this.channel.emit(
3921
- pi,
3922
- Array.from(A).map(Do)
3930
+ Ks,
3931
+ Array.from(A).map(ho)
3923
3932
  ), this.disableKeyListeners = !1, window.removeEventListener("unhandledrejection", F), window.removeEventListener("error", F), h.aborted)
3924
3933
  return;
3925
3934
  }
3926
3935
  await this.runPhase(
3927
3936
  h,
3928
3937
  "completed",
3929
- async () => this.channel.emit(di, i)
3938
+ async () => this.channel.emit(Ys, i)
3930
3939
  ), this.phase !== "errored" && await this.runPhase(h, "afterEach", async () => {
3931
3940
  await y(f);
3932
3941
  });
@@ -3936,7 +3945,7 @@ var $r = class $r {
3936
3945
  await this.runPhase(
3937
3946
  h,
3938
3947
  "finished",
3939
- async () => this.channel.emit(Fo, {
3948
+ async () => this.channel.emit(fo, {
3940
3949
  storyId: i,
3941
3950
  status: ue ? "error" : "success",
3942
3951
  reporters: f.reporting.reports
@@ -3946,7 +3955,7 @@ var $r = class $r {
3946
3955
  this.phase = "errored", this.callbacks.showException(f), await this.runPhase(
3947
3956
  h,
3948
3957
  "finished",
3949
- async () => this.channel.emit(Fo, {
3958
+ async () => this.channel.emit(fo, {
3950
3959
  storyId: i,
3951
3960
  status: "error",
3952
3961
  reporters: []
@@ -3991,12 +4000,10 @@ var $r = class $r {
3991
4000
  });
3992
4001
  }
3993
4002
  };
3994
- n($r, "StoryRender");
3995
- var ae = $r;
3996
4003
 
3997
4004
  // src/preview-api/modules/preview-web/Preview.tsx
3998
- var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
3999
- constructor(e, t, o = L.getChannel(), s = !0) {
4005
+ var { fetch: fi } = ui, yi = "./index.json", Se = class {
4006
+ constructor(e, t, o = _.getChannel(), s = !0) {
4000
4007
  this.importFn = e;
4001
4008
  this.getProjectAnnotations = t;
4002
4009
  this.channel = o;
@@ -4005,6 +4012,9 @@ var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
4005
4012
  this.resolveStoreInitializationPromise = i, this.rejectStoreInitializationPromise = a;
4006
4013
  }), s && this.initialize();
4007
4014
  }
4015
+ static {
4016
+ n(this, "Preview");
4017
+ }
4008
4018
  // Create a proxy object for `__STORYBOOK_STORY_STORE__` and `__STORYBOOK_PREVIEW__.storyStore`
4009
4019
  // That proxies through to the store once ready, and errors beforehand. This means we can set
4010
4020
  // `__STORYBOOK_STORY_STORE__ = __STORYBOOK_PREVIEW__.storyStore` without having to wait, and
@@ -4016,8 +4026,8 @@ var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
4016
4026
  {
4017
4027
  get: /* @__PURE__ */ n((e, t) => {
4018
4028
  if (this.storyStoreValue)
4019
- return yi("Accessing the Story Store is deprecated and will be removed in 9.0"), this.storyStoreValue[t];
4020
- throw new vi();
4029
+ return Qs("Accessing the Story Store is deprecated and will be removed in 9.0"), this.storyStoreValue[t];
4030
+ throw new pi();
4021
4031
  }, "get")
4022
4032
  }
4023
4033
  );
@@ -4036,15 +4046,15 @@ var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
4036
4046
  return this.storeInitializationPromise;
4037
4047
  }
4038
4048
  setupListeners() {
4039
- this.channel.on(Ri, this.onStoryIndexChanged.bind(this)), this.channel.on(wi, this.onUpdateGlobals.bind(this)), this.channel.on(Ei, this.
4040
- onUpdateArgs.bind(this)), this.channel.on(mi, this.onRequestArgTypesInfo.bind(this)), this.channel.on(Si, this.onResetArgs.bind(this)), this.
4041
- channel.on(bi, this.onForceReRender.bind(this)), this.channel.on(gi, this.onForceRemount.bind(this));
4049
+ this.channel.on(ii, this.onStoryIndexChanged.bind(this)), this.channel.on(ai, this.onUpdateGlobals.bind(this)), this.channel.on(li, this.
4050
+ onUpdateArgs.bind(this)), this.channel.on(Zs, this.onRequestArgTypesInfo.bind(this)), this.channel.on(oi, this.onResetArgs.bind(this)), this.
4051
+ channel.on(ti, this.onForceReRender.bind(this)), this.channel.on(ri, this.onForceRemount.bind(this));
4042
4052
  }
4043
4053
  async getProjectAnnotationsOrRenderError() {
4044
4054
  try {
4045
4055
  let e = await this.getProjectAnnotations();
4046
4056
  if (this.renderToCanvas = e.renderToCanvas, !this.renderToCanvas)
4047
- throw new Ai();
4057
+ throw new ci();
4048
4058
  return e;
4049
4059
  } catch (e) {
4050
4060
  throw this.renderPreviewEntryError("Error reading preview.js:", e), e;
@@ -4068,10 +4078,10 @@ var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
4068
4078
  }
4069
4079
  }
4070
4080
  async getStoryIndexFromServer() {
4071
- let e = await Fi(Ii);
4081
+ let e = await fi(yi);
4072
4082
  if (e.status === 200)
4073
4083
  return e.json();
4074
- throw new Ci({ text: await e.text() });
4084
+ throw new di({ text: await e.text() });
4075
4085
  }
4076
4086
  // If initialization gets as far as the story index, this function runs.
4077
4087
  initializeWithStoryIndex(e) {
@@ -4093,7 +4103,7 @@ var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
4093
4103
  globals: this.storyStoreValue.userGlobals.get() || {},
4094
4104
  globalTypes: this.storyStoreValue.projectAnnotations.globalTypes || {}
4095
4105
  };
4096
- this.channel.emit(Ti, e);
4106
+ this.channel.emit(ni, e);
4097
4107
  }
4098
4108
  // EVENT HANDLERS
4099
4109
  // This happens when a config file gets reloaded
@@ -4138,7 +4148,7 @@ var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
4138
4148
  throw new W({ methodName: "onUpdateGlobals" });
4139
4149
  if (this.storyStoreValue.userGlobals.update(e), t) {
4140
4150
  let { initialGlobals: o, storyGlobals: s, userGlobals: i, globals: a } = this.storyStoreValue.getStoryContext(t);
4141
- this.channel.emit(Mo, {
4151
+ this.channel.emit(So, {
4142
4152
  initialGlobals: o,
4143
4153
  userGlobals: i,
4144
4154
  storyGlobals: s,
@@ -4146,7 +4156,7 @@ var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
4146
4156
  });
4147
4157
  } else {
4148
4158
  let { initialGlobals: o, globals: s } = this.storyStoreValue.userGlobals;
4149
- this.channel.emit(Mo, {
4159
+ this.channel.emit(So, {
4150
4160
  initialGlobals: o,
4151
4161
  userGlobals: s,
4152
4162
  storyGlobals: {},
@@ -4166,7 +4176,7 @@ var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
4166
4176
  o.story && o.story.usesMount ? o.remount() : o.rerender()
4167
4177
  )
4168
4178
  )
4169
- ), this.channel.emit(xi, {
4179
+ ), this.channel.emit(si, {
4170
4180
  storyId: e,
4171
4181
  args: this.storyStoreValue.args.get(e)
4172
4182
  });
@@ -4175,14 +4185,14 @@ var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
4175
4185
  try {
4176
4186
  await this.storeInitializationPromise;
4177
4187
  let o = await this.storyStoreValue?.loadStory(t);
4178
- this.channel.emit(jo, {
4188
+ this.channel.emit(bo, {
4179
4189
  id: e,
4180
4190
  success: !0,
4181
4191
  payload: { argTypes: o?.argTypes || {} },
4182
4192
  error: null
4183
4193
  });
4184
4194
  } catch (o) {
4185
- this.channel.emit(jo, {
4195
+ this.channel.emit(bo, {
4186
4196
  id: e,
4187
4197
  success: !1,
4188
4198
  error: o?.message
@@ -4255,59 +4265,57 @@ var { fetch: Fi } = Pi, Ii = "./index.json", Yr = class Yr {
4255
4265
  }
4256
4266
  // UTILITIES
4257
4267
  renderPreviewEntryError(e, t) {
4258
- this.previewEntryError = t, ko.error(e), ko.error(t), this.channel.emit(hi, t);
4268
+ this.previewEntryError = t, go.error(e), go.error(t), this.channel.emit(ei, t);
4259
4269
  }
4260
4270
  };
4261
- n(Yr, "Preview");
4262
- var Se = Yr;
4263
4271
 
4264
4272
  // src/preview-api/modules/preview-web/PreviewWeb.tsx
4265
- import { global as hl } from "@storybook/global";
4273
+ import { global as el } from "@storybook/global";
4266
4274
 
4267
4275
  // src/preview-api/modules/preview-web/PreviewWithSelection.tsx
4268
4276
  import { logger as Ze } from "storybook/internal/client-logger";
4269
4277
  import {
4270
- CURRENT_STORY_WAS_SET as Lo,
4271
- DOCS_PREPARED as Mi,
4272
- GLOBALS_UPDATED as _o,
4273
- PRELOAD_ENTRIES as Li,
4274
- PREVIEW_KEYDOWN as _i,
4275
- SET_CURRENT_STORY as Ni,
4276
- STORY_CHANGED as qi,
4277
- STORY_ERRORED as zi,
4278
- STORY_MISSING as No,
4279
- STORY_PREPARED as Bi,
4280
- STORY_RENDER_PHASE_CHANGED as qo,
4281
- STORY_SPECIFIED as Gi,
4282
- STORY_THREW_EXCEPTION as Ui,
4283
- STORY_UNCHANGED as Vi,
4284
- UPDATE_QUERY_PARAMS as Hi
4278
+ CURRENT_STORY_WAS_SET as To,
4279
+ DOCS_PREPARED as Si,
4280
+ GLOBALS_UPDATED as xo,
4281
+ PRELOAD_ENTRIES as Ti,
4282
+ PREVIEW_KEYDOWN as xi,
4283
+ SET_CURRENT_STORY as Ri,
4284
+ STORY_CHANGED as wi,
4285
+ STORY_ERRORED as Ei,
4286
+ STORY_MISSING as Ro,
4287
+ STORY_PREPARED as Ai,
4288
+ STORY_RENDER_PHASE_CHANGED as wo,
4289
+ STORY_SPECIFIED as Ci,
4290
+ STORY_THREW_EXCEPTION as vi,
4291
+ STORY_UNCHANGED as Pi,
4292
+ UPDATE_QUERY_PARAMS as Fi
4285
4293
  } from "storybook/internal/core-events";
4286
4294
  import {
4287
- CalledPreviewMethodBeforeInitializationError as Zr,
4288
- EmptyIndexError as Wi,
4289
- MdxFileWithNoCsfReferencesError as $i,
4290
- NoStoryMatchError as Yi
4295
+ CalledPreviewMethodBeforeInitializationError as Br,
4296
+ EmptyIndexError as Ii,
4297
+ MdxFileWithNoCsfReferencesError as Oi,
4298
+ NoStoryMatchError as Di
4291
4299
  } from "storybook/internal/preview-errors";
4292
4300
 
4293
4301
  // ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
4294
- var Oi = !1, Kr = "Invariant failed";
4302
+ var mi = !1, zr = "Invariant failed";
4295
4303
  function Qe(r, e) {
4296
4304
  if (!r) {
4297
- if (Oi)
4298
- throw new Error(Kr);
4299
- var t = typeof e == "function" ? e() : e, o = t ? "".concat(Kr, ": ").concat(t) : Kr;
4305
+ if (mi)
4306
+ throw new Error(zr);
4307
+ var t = typeof e == "function" ? e() : e, o = t ? "".concat(zr, ": ").concat(t) : zr;
4300
4308
  throw new Error(o);
4301
4309
  }
4302
4310
  }
4303
4311
  n(Qe, "invariant");
4304
4312
 
4305
4313
  // src/preview-api/modules/preview-web/render/CsfDocsRender.ts
4306
- import { DOCS_RENDERED as ki } from "storybook/internal/core-events";
4314
+ import { DOCS_RENDERED as gi } from "storybook/internal/core-events";
4307
4315
 
4308
4316
  // src/preview-api/modules/preview-web/docs-context/DocsContext.ts
4309
- import { isStory as Di } from "storybook/internal/csf";
4310
- var Xr = class Xr {
4317
+ import { isStory as hi } from "storybook/internal/csf";
4318
+ var Q = class {
4311
4319
  constructor(e, t, o, s) {
4312
4320
  this.channel = e;
4313
4321
  this.store = t;
@@ -4346,6 +4354,9 @@ mCSFFile");
4346
4354
  this.referenceCSFFile(i);
4347
4355
  });
4348
4356
  }
4357
+ static {
4358
+ n(this, "DocsContext");
4359
+ }
4349
4360
  // This docs entry references this CSF file and can synchronously load the stories, as well
4350
4361
  // as reference them by module export. If the CSF is part of the "component" stories, they
4351
4362
  // can also be referenced by name and are in the componentStories list.
@@ -4407,7 +4418,7 @@ CSF file?"
4407
4418
  if (t)
4408
4419
  return { type: "meta", csfFile: t };
4409
4420
  let o = this.exportToStory.get(
4410
- Di(e) ? e.input : e
4421
+ hi(e) ? e.input : e
4411
4422
  );
4412
4423
  return o ? { type: "story", story: o } : { type: "component", component: e };
4413
4424
  }
@@ -4445,11 +4456,9 @@ CSF file?"
4445
4456
  }
4446
4457
  }
4447
4458
  };
4448
- n(Xr, "DocsContext");
4449
- var Q = Xr;
4450
4459
 
4451
4460
  // src/preview-api/modules/preview-web/render/CsfDocsRender.ts
4452
- var Jr = class Jr {
4461
+ var je = class {
4453
4462
  constructor(e, t, o, s) {
4454
4463
  this.channel = e;
4455
4464
  this.store = t;
@@ -4462,6 +4471,9 @@ var Jr = class Jr {
4462
4471
  this.preparing = !1;
4463
4472
  this.id = o.id;
4464
4473
  }
4474
+ static {
4475
+ n(this, "CsfDocsRender");
4476
+ }
4465
4477
  isPreparing() {
4466
4478
  return this.preparing;
4467
4479
  }
@@ -4501,7 +4513,7 @@ var Jr = class Jr {
4501
4513
  );
4502
4514
  let i = await s.renderer(), { render: a } = i, l = /* @__PURE__ */ n(async () => {
4503
4515
  try {
4504
- await a(o, s, e), this.channel.emit(ki, this.id);
4516
+ await a(o, s, e), this.channel.emit(gi, this.id);
4505
4517
  } catch (c) {
4506
4518
  this.callbacks.showException(c);
4507
4519
  }
@@ -4514,12 +4526,10 @@ var Jr = class Jr {
4514
4526
  this.teardownRender?.({ viewModeChanged: e }), this.torndown = !0;
4515
4527
  }
4516
4528
  };
4517
- n(Jr, "CsfDocsRender");
4518
- var je = Jr;
4519
4529
 
4520
4530
  // src/preview-api/modules/preview-web/render/MdxDocsRender.ts
4521
- import { DOCS_RENDERED as ji } from "storybook/internal/core-events";
4522
- var Qr = class Qr {
4531
+ import { DOCS_RENDERED as bi } from "storybook/internal/core-events";
4532
+ var Me = class {
4523
4533
  constructor(e, t, o, s) {
4524
4534
  this.channel = e;
4525
4535
  this.store = t;
@@ -4532,6 +4542,9 @@ var Qr = class Qr {
4532
4542
  this.preparing = !1;
4533
4543
  this.id = o.id;
4534
4544
  }
4545
+ static {
4546
+ n(this, "MdxDocsRender");
4547
+ }
4535
4548
  isPreparing() {
4536
4549
  return this.preparing;
4537
4550
  }
@@ -4565,7 +4578,7 @@ var Qr = class Qr {
4565
4578
  );
4566
4579
  let i = { ...s, page: this.exports.default }, a = await s.renderer(), { render: l } = a, c = /* @__PURE__ */ n(async () => {
4567
4580
  try {
4568
- await l(o, i, e), this.channel.emit(ji, this.id);
4581
+ await l(o, i, e), this.channel.emit(bi, this.id);
4569
4582
  } catch (d) {
4570
4583
  this.callbacks.showException(d);
4571
4584
  }
@@ -4578,34 +4591,32 @@ var Qr = class Qr {
4578
4591
  this.teardownRender?.({ viewModeChanged: e }), this.torndown = !0;
4579
4592
  }
4580
4593
  };
4581
- n(Qr, "MdxDocsRender");
4582
- var Me = Qr;
4583
4594
 
4584
4595
  // src/preview-api/modules/preview-web/PreviewWithSelection.tsx
4585
- var Ki = globalThis;
4586
- function Xi(r) {
4596
+ var ki = globalThis;
4597
+ function ji(r) {
4587
4598
  let e = r.composedPath && r.composedPath()[0] || r.target;
4588
4599
  return /input|textarea/i.test(e.tagName) || e.getAttribute("contenteditable") !== null;
4589
4600
  }
4590
- n(Xi, "focusInInput");
4591
- var zo = "attached-mdx", Ji = "unattached-mdx";
4592
- function Qi({ tags: r }) {
4593
- return r?.includes(Ji) || r?.includes(zo);
4601
+ n(ji, "focusInInput");
4602
+ var Eo = "attached-mdx", Mi = "unattached-mdx";
4603
+ function _i({ tags: r }) {
4604
+ return r?.includes(Mi) || r?.includes(Eo);
4594
4605
  }
4595
- n(Qi, "isMdxEntry");
4596
- function et(r) {
4606
+ n(_i, "isMdxEntry");
4607
+ function Gr(r) {
4597
4608
  return r.type === "story";
4598
4609
  }
4599
- n(et, "isStoryRender");
4600
- function Zi(r) {
4610
+ n(Gr, "isStoryRender");
4611
+ function Li(r) {
4601
4612
  return r.type === "docs";
4602
4613
  }
4603
- n(Zi, "isDocsRender");
4604
- function ea(r) {
4605
- return Zi(r) && r.subtype === "csf";
4614
+ n(Li, "isDocsRender");
4615
+ function Ni(r) {
4616
+ return Li(r) && r.subtype === "csf";
4606
4617
  }
4607
- n(ea, "isCsfDocsRender");
4608
- var rt = class rt extends Se {
4618
+ n(Ni, "isCsfDocsRender");
4619
+ var Te = class extends Se {
4609
4620
  constructor(t, o, s, i) {
4610
4621
  super(t, o, void 0, !1);
4611
4622
  this.importFn = t;
@@ -4614,13 +4625,16 @@ var rt = class rt extends Se {
4614
4625
  this.view = i;
4615
4626
  this.initialize();
4616
4627
  }
4628
+ static {
4629
+ n(this, "PreviewWithSelection");
4630
+ }
4617
4631
  setupListeners() {
4618
- super.setupListeners(), Ki.onkeydown = this.onKeydown.bind(this), this.channel.on(Ni, this.onSetCurrentStory.bind(this)), this.channel.on(
4619
- Hi, this.onUpdateQueryParams.bind(this)), this.channel.on(Li, this.onPreloadStories.bind(this));
4632
+ super.setupListeners(), ki.onkeydown = this.onKeydown.bind(this), this.channel.on(Ri, this.onSetCurrentStory.bind(this)), this.channel.on(
4633
+ Fi, this.onUpdateQueryParams.bind(this)), this.channel.on(Ti, this.onPreloadStories.bind(this));
4620
4634
  }
4621
4635
  async setInitialGlobals() {
4622
4636
  if (!this.storyStoreValue)
4623
- throw new Zr({ methodName: "setInitialGlobals" });
4637
+ throw new Br({ methodName: "setInitialGlobals" });
4624
4638
  let { globals: t } = this.selectionStore.selectionSpecifier || {};
4625
4639
  t && this.storyStoreValue.userGlobals.updateFromPersisted(t), this.emitGlobals();
4626
4640
  }
@@ -4631,7 +4645,7 @@ var rt = class rt extends Se {
4631
4645
  // Use the selection specifier to choose a story, then render it
4632
4646
  async selectSpecifiedStory() {
4633
4647
  if (!this.storyStoreValue)
4634
- throw new Zr({
4648
+ throw new Br({
4635
4649
  methodName: "selectSpecifiedStory"
4636
4650
  });
4637
4651
  if (this.selectionStore.selection) {
@@ -4644,14 +4658,14 @@ var rt = class rt extends Se {
4644
4658
  }
4645
4659
  let { storySpecifier: t, args: o } = this.selectionStore.selectionSpecifier, s = this.storyStoreValue.storyIndex.entryFromSpecifier(t);
4646
4660
  if (!s) {
4647
- t === "*" ? this.renderStoryLoadingException(t, new Wi()) : this.renderStoryLoadingException(
4661
+ t === "*" ? this.renderStoryLoadingException(t, new Ii()) : this.renderStoryLoadingException(
4648
4662
  t,
4649
- new Yi({ storySpecifier: t.toString() })
4663
+ new Di({ storySpecifier: t.toString() })
4650
4664
  );
4651
4665
  return;
4652
4666
  }
4653
4667
  let { id: i, type: a } = s;
4654
- this.selectionStore.setSelection({ storyId: i, viewMode: a }), this.channel.emit(Gi, this.selectionStore.selection), this.channel.emit(Lo,
4668
+ this.selectionStore.setSelection({ storyId: i, viewMode: a }), this.channel.emit(Ci, this.selectionStore.selection), this.channel.emit(To,
4655
4669
  this.selectionStore.selection), await this.renderSelection({ persistedArgs: o });
4656
4670
  }
4657
4671
  // EVENT HANDLERS
@@ -4670,15 +4684,15 @@ var rt = class rt extends Se {
4670
4684
  selectSpecifiedStory();
4671
4685
  }
4672
4686
  onKeydown(t) {
4673
- if (!this.storyRenders.find((o) => o.disableKeyListeners) && !Xi(t)) {
4687
+ if (!this.storyRenders.find((o) => o.disableKeyListeners) && !ji(t)) {
4674
4688
  let { altKey: o, ctrlKey: s, metaKey: i, shiftKey: a, key: l, code: c, keyCode: d } = t;
4675
- this.channel.emit(_i, {
4689
+ this.channel.emit(xi, {
4676
4690
  event: { altKey: o, ctrlKey: s, metaKey: i, shiftKey: a, key: l, code: c, keyCode: d }
4677
4691
  });
4678
4692
  }
4679
4693
  }
4680
4694
  async onSetCurrentStory(t) {
4681
- this.selectionStore.setSelection({ viewMode: "story", ...t }), await this.storeInitializationPromise, this.channel.emit(Lo, this.selectionStore.
4695
+ this.selectionStore.setSelection({ viewMode: "story", ...t }), await this.storeInitializationPromise, this.channel.emit(To, this.selectionStore.
4682
4696
  selection), this.renderSelection();
4683
4697
  }
4684
4698
  onUpdateQueryParams(t) {
@@ -4704,7 +4718,7 @@ var rt = class rt extends Se {
4704
4718
  async renderSelection({ persistedArgs: t } = {}) {
4705
4719
  let { renderToCanvas: o } = this;
4706
4720
  if (!this.storyStoreValue || !o)
4707
- throw new Zr({ methodName: "renderSelection" });
4721
+ throw new Br({ methodName: "renderSelection" });
4708
4722
  let { selection: s } = this.selectionStore;
4709
4723
  if (!s)
4710
4724
  throw new Error("Cannot call renderSelection as no selection was made");
@@ -4726,7 +4740,7 @@ var rt = class rt extends Se {
4726
4740
  this.mainStoryCallbacks(i),
4727
4741
  i,
4728
4742
  "story"
4729
- ) : Qi(a) ? d = new Me(
4743
+ ) : _i(a) ? d = new Me(
4730
4744
  this.channel,
4731
4745
  this.storyStoreValue,
4732
4746
  a,
@@ -4748,11 +4762,11 @@ var rt = class rt extends Se {
4748
4762
  return;
4749
4763
  }
4750
4764
  let y = !l && u && !d.isEqual(u);
4751
- if (t && et(d) && (Qe(!!d.story), this.storyStoreValue.args.updateFromPersisted(d.story, t)), u && !u.torndown && !l && !y && !c) {
4752
- this.currentRender = u, this.channel.emit(Vi, i), this.view.showMain();
4765
+ if (t && Gr(d) && (Qe(!!d.story), this.storyStoreValue.args.updateFromPersisted(d.story, t)), u && !u.torndown && !l && !y && !c) {
4766
+ this.currentRender = u, this.channel.emit(Pi, i), this.view.showMain();
4753
4767
  return;
4754
4768
  }
4755
- if (u && await this.teardownRender(u, { viewModeChanged: c }), p && (l || c) && this.channel.emit(qi, i), et(d)) {
4769
+ if (u && await this.teardownRender(u, { viewModeChanged: c }), p && (l || c) && this.channel.emit(wi, i), Gr(d)) {
4756
4770
  Qe(!!d.story);
4757
4771
  let {
4758
4772
  parameters: g,
@@ -4764,33 +4778,33 @@ var rt = class rt extends Se {
4764
4778
  storyGlobals: f,
4765
4779
  globals: x
4766
4780
  } = this.storyStoreValue.getStoryContext(d.story);
4767
- this.channel.emit(Bi, {
4781
+ this.channel.emit(Ai, {
4768
4782
  id: i,
4769
4783
  parameters: g,
4770
4784
  initialArgs: S,
4771
4785
  argTypes: b,
4772
4786
  args: h
4773
- }), this.channel.emit(_o, { userGlobals: m, storyGlobals: f, globals: x, initialGlobals: T });
4787
+ }), this.channel.emit(xo, { userGlobals: m, storyGlobals: f, globals: x, initialGlobals: T });
4774
4788
  } else {
4775
4789
  let { parameters: g } = this.storyStoreValue.projectAnnotations, { initialGlobals: S, globals: b } = this.storyStoreValue.userGlobals;
4776
- if (this.channel.emit(_o, {
4790
+ if (this.channel.emit(xo, {
4777
4791
  globals: b,
4778
4792
  initialGlobals: S,
4779
4793
  storyGlobals: {},
4780
4794
  userGlobals: b
4781
- }), ea(d) || d.entry.tags?.includes(zo)) {
4795
+ }), Ni(d) || d.entry.tags?.includes(Eo)) {
4782
4796
  if (!d.csfFiles)
4783
- throw new $i({ storyId: i });
4797
+ throw new Oi({ storyId: i });
4784
4798
  ({ parameters: g } = this.storyStoreValue.preparedMetaFromCSFFile({
4785
4799
  csfFile: d.csfFiles[0]
4786
4800
  }));
4787
4801
  }
4788
- this.channel.emit(Mi, {
4802
+ this.channel.emit(Si, {
4789
4803
  id: i,
4790
4804
  parameters: g
4791
4805
  });
4792
4806
  }
4793
- et(d) ? (Qe(!!d.story), this.storyRenders.push(d), this.currentRender.renderToElement(
4807
+ Gr(d) ? (Qe(!!d.story), this.storyRenders.push(d), this.currentRender.renderToElement(
4794
4808
  this.view.prepareForStory(d.story)
4795
4809
  )) : this.currentRender.renderToElement(
4796
4810
  this.view.prepareForDocs(),
@@ -4814,41 +4828,39 @@ var rt = class rt extends Se {
4814
4828
  super.renderPreviewEntryError(t, o), this.view.showErrorDisplay(o);
4815
4829
  }
4816
4830
  renderMissingStory() {
4817
- this.view.showNoPreview(), this.channel.emit(No);
4831
+ this.view.showNoPreview(), this.channel.emit(Ro);
4818
4832
  }
4819
4833
  renderStoryLoadingException(t, o) {
4820
- Ze.error(o), this.view.showErrorDisplay(o), this.channel.emit(No, t);
4834
+ Ze.error(o), this.view.showErrorDisplay(o), this.channel.emit(Ro, t);
4821
4835
  }
4822
4836
  // renderException is used if we fail to render the story and it is uncaught by the app layer
4823
4837
  renderException(t, o) {
4824
4838
  let { name: s = "Error", message: i = String(o), stack: a } = o;
4825
- this.channel.emit(Ui, { name: s, message: i, stack: a }), this.channel.emit(qo, { newPhase: "errored", storyId: t }), this.view.showErrorDisplay(
4839
+ this.channel.emit(vi, { name: s, message: i, stack: a }), this.channel.emit(wo, { newPhase: "errored", storyId: t }), this.view.showErrorDisplay(
4826
4840
  o), Ze.error(`Error rendering story '${t}':`), Ze.error(o);
4827
4841
  }
4828
4842
  // renderError is used by the various app layers to inform the user they have done something
4829
4843
  // wrong -- for instance returned the wrong thing from a story
4830
4844
  renderError(t, { title: o, description: s }) {
4831
- Ze.error(`Error rendering story ${o}: ${s}`), this.channel.emit(zi, { title: o, description: s }), this.channel.emit(qo, { newPhase: "er\
4845
+ Ze.error(`Error rendering story ${o}: ${s}`), this.channel.emit(Ei, { title: o, description: s }), this.channel.emit(wo, { newPhase: "er\
4832
4846
  rored", storyId: t }), this.view.showErrorDisplay({
4833
4847
  message: o,
4834
4848
  stack: s
4835
4849
  });
4836
4850
  }
4837
4851
  };
4838
- n(rt, "PreviewWithSelection");
4839
- var Te = rt;
4840
4852
 
4841
4853
  // src/preview-api/modules/preview-web/UrlStore.ts
4842
- var _e = fe(nr(), 1);
4843
- import { global as Fa } from "@storybook/global";
4854
+ var Le = fe(nr(), 1);
4855
+ import { global as fa } from "@storybook/global";
4844
4856
 
4845
4857
  // src/preview-api/modules/preview-web/parseArgsParam.ts
4846
- import { once as Ca } from "storybook/internal/client-logger";
4847
- var Zo = fe(nr(), 1);
4848
- var Qo = /^[a-zA-Z0-9 _-]*$/, en = /^-?[0-9]+(\.[0-9]+)?$/, va = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, rn = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,
4849
- lt = /* @__PURE__ */ n((r = "", e) => r === null || r === "" || !Qo.test(r) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
4850
- typeof e == "boolean" ? !0 : typeof e == "string" ? Qo.test(e) || en.test(e) || va.test(e) || rn.test(e) : Array.isArray(e) ? e.every((t) => lt(
4851
- r, t)) : k(e) ? Object.entries(e).every(([t, o]) => lt(t, o)) : !1, "validateArgs"), Pa = {
4858
+ import { once as da } from "storybook/internal/client-logger";
4859
+ var Lo = fe(nr(), 1);
4860
+ var _o = /^[a-zA-Z0-9 _-]*$/, No = /^-?[0-9]+(\.[0-9]+)?$/, pa = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, qo = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,
4861
+ Kr = /* @__PURE__ */ n((r = "", e) => r === null || r === "" || !_o.test(r) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
4862
+ typeof e == "boolean" ? !0 : typeof e == "string" ? _o.test(e) || No.test(e) || pa.test(e) || qo.test(e) : Array.isArray(e) ? e.every((t) => Kr(
4863
+ r, t)) : k(e) ? Object.entries(e).every(([t, o]) => Kr(t, o)) : !1, "validateArgs"), ua = {
4852
4864
  delimiter: ";",
4853
4865
  // we're parsing a single query param
4854
4866
  nesting: !0,
@@ -4870,17 +4882,17 @@ r, t)) : k(e) ? Object.entries(e).every(([t, o]) => lt(t, o)) : !1, "validateArg
4870
4882
  return new Date(r.replaceAll(" ", "+").slice(6, -1));
4871
4883
  if (r.startsWith("!hex(") && r.endsWith(")"))
4872
4884
  return `#${r.slice(5, -1)}`;
4873
- let e = r.slice(1).match(rn);
4885
+ let e = r.slice(1).match(qo);
4874
4886
  if (e)
4875
4887
  return r.startsWith("!rgba") || r.startsWith("!RGBA") ? `${e[1]}(${e[2]}, ${e[3]}, ${e[4]}, ${e[5]})` : r.startsWith("!hsla") || r.startsWith(
4876
4888
  "!HSLA") ? `${e[1]}(${e[2]}, ${e[3]}%, ${e[4]}%, ${e[5]})` : r.startsWith("!rgb") || r.startsWith("!RGB") ? `${e[1]}(${e[2]}, ${e[3]}\
4877
4889
  , ${e[4]})` : `${e[1]}(${e[2]}, ${e[3]}%, ${e[4]}%)`;
4878
4890
  }
4879
- return en.test(r) ? Number(r) : r;
4891
+ return No.test(r) ? Number(r) : r;
4880
4892
  }
4881
- }, ct = /* @__PURE__ */ n((r) => {
4893
+ }, Xr = /* @__PURE__ */ n((r) => {
4882
4894
  let e = r.split(";").map((t) => t.replace("=", "~").replace(":", "="));
4883
- return Object.entries((0, Zo.parse)(e.join(";"), Pa)).reduce((t, [o, s]) => lt(o, s) ? Object.assign(t, { [o]: s }) : (Ca.warn(P`
4895
+ return Object.entries((0, Lo.parse)(e.join(";"), ua)).reduce((t, [o, s]) => Kr(o, s) ? Object.assign(t, { [o]: s }) : (da.warn(P`
4884
4896
  Omitted potentially unsafe URL args.
4885
4897
 
4886
4898
  More info: https://storybook.js.org/docs/writing-stories/args#setting-args-through-the-url
@@ -4888,88 +4900,89 @@ r, t)) : k(e) ? Object.entries(e).every(([t, o]) => lt(t, o)) : !1, "validateArg
4888
4900
  }, "parseArgsParam");
4889
4901
 
4890
4902
  // src/preview-api/modules/preview-web/UrlStore.ts
4891
- var { history: tn, document: Z } = Fa;
4892
- function Ia(r) {
4903
+ var { history: zo, document: Z } = fa;
4904
+ function ya(r) {
4893
4905
  let e = (r || "").match(/^\/story\/(.+)/);
4894
4906
  if (!e)
4895
4907
  throw new Error(`Invalid path '${r}', must start with '/story/'`);
4896
4908
  return e[1];
4897
4909
  }
4898
- n(Ia, "pathToId");
4899
- var on = /* @__PURE__ */ n(({
4910
+ n(ya, "pathToId");
4911
+ var Bo = /* @__PURE__ */ n(({
4900
4912
  selection: r,
4901
4913
  extraParams: e
4902
4914
  }) => {
4903
- let t = Z?.location.search.slice(1), { path: o, selectedKind: s, selectedStory: i, ...a } = (0, _e.parse)(t);
4904
- return `?${(0, _e.stringify)({
4915
+ let t = Z?.location.search.slice(1), { path: o, selectedKind: s, selectedStory: i, ...a } = (0, Le.parse)(t);
4916
+ return `?${(0, Le.stringify)({
4905
4917
  ...a,
4906
4918
  ...e,
4907
4919
  ...r && { id: r.storyId, viewMode: r.viewMode }
4908
4920
  })}`;
4909
- }, "getQueryString"), Oa = /* @__PURE__ */ n((r) => {
4921
+ }, "getQueryString"), ma = /* @__PURE__ */ n((r) => {
4910
4922
  if (!r)
4911
4923
  return;
4912
- let e = on({ selection: r }), { hash: t = "" } = Z.location;
4913
- Z.title = r.storyId, tn.replaceState({}, "", `${Z.location.pathname}${e}${t}`);
4914
- }, "setPath"), Da = /* @__PURE__ */ n((r) => r != null && typeof r == "object" && Array.isArray(r) === !1, "isObject"), Le = /* @__PURE__ */ n(
4924
+ let e = Bo({ selection: r }), { hash: t = "" } = Z.location;
4925
+ Z.title = r.storyId, zo.replaceState({}, "", `${Z.location.pathname}${e}${t}`);
4926
+ }, "setPath"), ha = /* @__PURE__ */ n((r) => r != null && typeof r == "object" && Array.isArray(r) === !1, "isObject"), _e = /* @__PURE__ */ n(
4915
4927
  (r) => {
4916
4928
  if (r !== void 0) {
4917
4929
  if (typeof r == "string")
4918
4930
  return r;
4919
4931
  if (Array.isArray(r))
4920
- return Le(r[0]);
4921
- if (Da(r))
4922
- return Le(
4932
+ return _e(r[0]);
4933
+ if (ha(r))
4934
+ return _e(
4923
4935
  Object.values(r).filter(Boolean)
4924
4936
  );
4925
4937
  }
4926
- }, "getFirstString"), ka = /* @__PURE__ */ n(() => {
4938
+ }, "getFirstString"), ga = /* @__PURE__ */ n(() => {
4927
4939
  if (typeof Z < "u") {
4928
- let r = Z.location.search.slice(1), e = (0, _e.parse)(r), t = typeof e.args == "string" ? ct(e.args) : void 0, o = typeof e.globals == "\
4929
- string" ? ct(e.globals) : void 0, s = Le(e.viewMode);
4940
+ let r = Z.location.search.slice(1), e = (0, Le.parse)(r), t = typeof e.args == "string" ? Xr(e.args) : void 0, o = typeof e.globals == "\
4941
+ string" ? Xr(e.globals) : void 0, s = _e(e.viewMode);
4930
4942
  (typeof s != "string" || !s.match(/docs|story/)) && (s = "story");
4931
- let i = Le(e.path), a = i ? Ia(i) : Le(e.id);
4943
+ let i = _e(e.path), a = i ? ya(i) : _e(e.id);
4932
4944
  if (a)
4933
4945
  return { storySpecifier: a, args: t, globals: o, viewMode: s };
4934
4946
  }
4935
4947
  return null;
4936
- }, "getSelectionSpecifierFromPath"), dt = class dt {
4948
+ }, "getSelectionSpecifierFromPath"), xe = class {
4949
+ static {
4950
+ n(this, "UrlStore");
4951
+ }
4937
4952
  constructor() {
4938
- this.selectionSpecifier = ka();
4953
+ this.selectionSpecifier = ga();
4939
4954
  }
4940
4955
  setSelection(e) {
4941
- this.selection = e, Oa(this.selection);
4956
+ this.selection = e, ma(this.selection);
4942
4957
  }
4943
4958
  setQueryParams(e) {
4944
- let t = on({ extraParams: e }), { hash: o = "" } = Z.location;
4945
- tn.replaceState({}, "", `${Z.location.pathname}${t}${o}`);
4959
+ let t = Bo({ extraParams: e }), { hash: o = "" } = Z.location;
4960
+ zo.replaceState({}, "", `${Z.location.pathname}${t}${o}`);
4946
4961
  }
4947
4962
  };
4948
- n(dt, "UrlStore");
4949
- var xe = dt;
4950
4963
 
4951
4964
  // src/preview-api/modules/preview-web/WebView.ts
4952
- var Ln = fe(kn(), 1), _n = fe(nr(), 1);
4953
- import { logger as yl } from "storybook/internal/client-logger";
4954
- import { global as ml } from "@storybook/global";
4955
- var { document: D } = ml, jn = 100, Nn = /* @__PURE__ */ ((i) => (i.MAIN = "MAIN", i.NOPREVIEW = "NOPREVIEW", i.PREPARING_STORY = "PREPARING\
4956
- _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Nn || {}), gt = {
4965
+ var Tn = fe(gn(), 1), xn = fe(nr(), 1);
4966
+ import { logger as Qa } from "storybook/internal/client-logger";
4967
+ import { global as Za } from "@storybook/global";
4968
+ var { document: D } = Za, bn = 100, Rn = /* @__PURE__ */ ((i) => (i.MAIN = "MAIN", i.NOPREVIEW = "NOPREVIEW", i.PREPARING_STORY = "PREPARING\
4969
+ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Rn || {}), ot = {
4957
4970
  PREPARING_STORY: "sb-show-preparing-story",
4958
4971
  PREPARING_DOCS: "sb-show-preparing-docs",
4959
4972
  MAIN: "sb-show-main",
4960
4973
  NOPREVIEW: "sb-show-nopreview",
4961
4974
  ERROR: "sb-show-errordisplay"
4962
- }, bt = {
4975
+ }, nt = {
4963
4976
  centered: "sb-main-centered",
4964
4977
  fullscreen: "sb-main-fullscreen",
4965
4978
  padded: "sb-main-padded"
4966
- }, Mn = new Ln.default({
4979
+ }, Sn = new Tn.default({
4967
4980
  escapeXML: !0
4968
- }), St = class St {
4981
+ }), Re = class {
4969
4982
  constructor() {
4970
4983
  this.testing = !1;
4971
4984
  if (typeof D < "u") {
4972
- let { __SPECIAL_TEST_PARAMETER__: e } = (0, _n.parse)(D.location.search.slice(1));
4985
+ let { __SPECIAL_TEST_PARAMETER__: e } = (0, xn.parse)(D.location.search.slice(1));
4973
4986
  switch (e) {
4974
4987
  case "preparing-story": {
4975
4988
  this.showPreparingStory(), this.testing = !0;
@@ -4983,6 +4996,9 @@ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Nn || {}),
4983
4996
  }
4984
4997
  }
4985
4998
  }
4999
+ static {
5000
+ n(this, "WebView");
5001
+ }
4986
5002
  // Get ready to render a story, returning the element to render to
4987
5003
  prepareForStory(e) {
4988
5004
  return this.showStory(), this.applyLayout(e.parameters.layout), D.documentElement.scrollTop = 0, D.documentElement.scrollLeft = 0, this.
@@ -5004,27 +5020,27 @@ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Nn || {}),
5004
5020
  return;
5005
5021
  }
5006
5022
  this.checkIfLayoutExists(e);
5007
- let t = bt[e];
5023
+ let t = nt[e];
5008
5024
  D.body.classList.remove(this.currentLayoutClass), D.body.classList.add(t), this.currentLayoutClass = t;
5009
5025
  }
5010
5026
  checkIfLayoutExists(e) {
5011
- bt[e] || yl.warn(
5027
+ nt[e] || Qa.warn(
5012
5028
  P`
5013
5029
  The desired layout: ${e} is not a valid option.
5014
- The possible options are: ${Object.keys(bt).join(", ")}, none.
5030
+ The possible options are: ${Object.keys(nt).join(", ")}, none.
5015
5031
  `
5016
5032
  );
5017
5033
  }
5018
5034
  showMode(e) {
5019
- clearTimeout(this.preparingTimeout), Object.keys(Nn).forEach((t) => {
5020
- t === e ? D.body.classList.add(gt[t]) : D.body.classList.remove(gt[t]);
5035
+ clearTimeout(this.preparingTimeout), Object.keys(Rn).forEach((t) => {
5036
+ t === e ? D.body.classList.add(ot[t]) : D.body.classList.remove(ot[t]);
5021
5037
  });
5022
5038
  }
5023
5039
  showErrorDisplay({ message: e = "", stack: t = "" }) {
5024
5040
  let o = e, s = t, i = e.split(`
5025
5041
  `);
5026
5042
  i.length > 1 && ([o] = i, s = i.slice(1).join(`
5027
- `).replace(/^\n/, "")), D.getElementById("error-message").innerHTML = Mn.toHtml(o), D.getElementById("error-stack").innerHTML = Mn.toHtml(s),
5043
+ `).replace(/^\n/, "")), D.getElementById("error-message").innerHTML = Sn.toHtml(o), D.getElementById("error-stack").innerHTML = Sn.toHtml(s),
5028
5044
  this.showMode("ERROR");
5029
5045
  }
5030
5046
  showNoPreview() {
@@ -5034,12 +5050,12 @@ true"));
5034
5050
  showPreparingStory({ immediate: e = !1 } = {}) {
5035
5051
  clearTimeout(this.preparingTimeout), e ? this.showMode("PREPARING_STORY") : this.preparingTimeout = setTimeout(
5036
5052
  () => this.showMode("PREPARING_STORY"),
5037
- jn
5053
+ bn
5038
5054
  );
5039
5055
  }
5040
5056
  showPreparingDocs({ immediate: e = !1 } = {}) {
5041
5057
  clearTimeout(this.preparingTimeout), e ? this.showMode("PREPARING_DOCS") : this.preparingTimeout = setTimeout(() => this.showMode("PREPA\
5042
- RING_DOCS"), jn);
5058
+ RING_DOCS"), bn);
5043
5059
  }
5044
5060
  showMain() {
5045
5061
  this.showMode("MAIN");
@@ -5051,27 +5067,26 @@ RING_DOCS"), jn);
5051
5067
  this.docsRoot().setAttribute("hidden", "true"), this.storyRoot().removeAttribute("hidden");
5052
5068
  }
5053
5069
  showStoryDuringRender() {
5054
- D.body.classList.add(gt.MAIN);
5070
+ D.body.classList.add(ot.MAIN);
5055
5071
  }
5056
5072
  };
5057
- n(St, "WebView");
5058
- var Re = St;
5059
5073
 
5060
5074
  // src/preview-api/modules/preview-web/PreviewWeb.tsx
5061
- var Tt = class Tt extends Te {
5075
+ var ur = class extends Te {
5062
5076
  constructor(t, o) {
5063
5077
  super(t, o, new xe(), new Re());
5064
5078
  this.importFn = t;
5065
5079
  this.getProjectAnnotations = o;
5066
- hl.__STORYBOOK_PREVIEW__ = this;
5080
+ el.__STORYBOOK_PREVIEW__ = this;
5081
+ }
5082
+ static {
5083
+ n(this, "PreviewWeb");
5067
5084
  }
5068
5085
  };
5069
- n(Tt, "PreviewWeb");
5070
- var ur = Tt;
5071
5086
 
5072
5087
  // src/preview-api/modules/preview-web/simulate-pageload.ts
5073
- import { global as gl } from "@storybook/global";
5074
- var { document: pe } = gl, bl = [
5088
+ import { global as rl } from "@storybook/global";
5089
+ var { document: pe } = rl, tl = [
5075
5090
  "application/javascript",
5076
5091
  "application/ecmascript",
5077
5092
  "application/x-ecmascript",
@@ -5090,53 +5105,53 @@ var { document: pe } = gl, bl = [
5090
5105
  "text/x-javascript",
5091
5106
  // Support modern javascript
5092
5107
  "module"
5093
- ], Sl = "script", qn = "scripts-root";
5108
+ ], ol = "script", wn = "scripts-root";
5094
5109
  function fr() {
5095
5110
  let r = pe.createEvent("Event");
5096
5111
  r.initEvent("DOMContentLoaded", !0, !0), pe.dispatchEvent(r);
5097
5112
  }
5098
5113
  n(fr, "simulateDOMContentLoaded");
5099
- function Tl(r, e, t) {
5114
+ function nl(r, e, t) {
5100
5115
  let o = pe.createElement("script");
5101
5116
  o.type = r.type === "module" ? "module" : "text/javascript", r.src ? (o.onload = e, o.onerror = e, o.src = r.src) : o.textContent = r.innerText,
5102
5117
  t ? t.appendChild(o) : pe.head.appendChild(o), r.parentNode.removeChild(r), r.src || e();
5103
5118
  }
5104
- n(Tl, "insertScript");
5105
- function zn(r, e, t = 0) {
5119
+ n(nl, "insertScript");
5120
+ function En(r, e, t = 0) {
5106
5121
  r[t](() => {
5107
- t++, t === r.length ? e() : zn(r, e, t);
5122
+ t++, t === r.length ? e() : En(r, e, t);
5108
5123
  });
5109
5124
  }
5110
- n(zn, "insertScriptsSequentially");
5111
- function Bn(r) {
5112
- let e = pe.getElementById(qn);
5113
- e ? e.innerHTML = "" : (e = pe.createElement("div"), e.id = qn, pe.body.appendChild(e));
5114
- let t = Array.from(r.querySelectorAll(Sl));
5125
+ n(En, "insertScriptsSequentially");
5126
+ function An(r) {
5127
+ let e = pe.getElementById(wn);
5128
+ e ? e.innerHTML = "" : (e = pe.createElement("div"), e.id = wn, pe.body.appendChild(e));
5129
+ let t = Array.from(r.querySelectorAll(ol));
5115
5130
  if (t.length) {
5116
5131
  let o = [];
5117
5132
  t.forEach((s) => {
5118
5133
  let i = s.getAttribute("type");
5119
- (!i || bl.includes(i)) && o.push((a) => Tl(s, a, e));
5120
- }), o.length && zn(o, fr, void 0);
5134
+ (!i || tl.includes(i)) && o.push((a) => nl(s, a, e));
5135
+ }), o.length && En(o, fr, void 0);
5121
5136
  } else
5122
5137
  fr();
5123
5138
  }
5124
- n(Bn, "simulatePageLoad");
5139
+ n(An, "simulatePageLoad");
5125
5140
 
5126
5141
  // src/docs-tools/shared.ts
5127
- var Gn = "storybook/docs", Vf = `${Gn}/panel`;
5128
- var Un = `${Gn}/snippet-rendered`;
5142
+ var Cn = "storybook/docs", Pf = `${Cn}/panel`;
5143
+ var vn = `${Cn}/snippet-rendered`;
5129
5144
 
5130
5145
  // src/preview-api/modules/preview-web/emitTransformCode.ts
5131
- async function Vn(r, e) {
5146
+ async function Pn(r, e) {
5132
5147
  let t = e.parameters?.docs?.source?.transform, { id: o, unmappedArgs: s } = e, i = t && r ? t?.(r, e) : r, a = i ? await i : void 0;
5133
- L.getChannel().emit(Un, {
5148
+ _.getChannel().emit(vn, {
5134
5149
  id: o,
5135
5150
  source: a,
5136
5151
  args: s
5137
5152
  });
5138
5153
  }
5139
- n(Vn, "emitTransformCode");
5154
+ n(Pn, "emitTransformCode");
5140
5155
  export {
5141
5156
  Q as DocsContext,
5142
5157
  te as HooksContext,
@@ -5147,46 +5162,46 @@ export {
5147
5162
  be as StoryStore,
5148
5163
  xe as UrlStore,
5149
5164
  Re as WebView,
5150
- L as addons,
5151
- xr as applyHooks,
5165
+ _ as addons,
5166
+ Tr as applyHooks,
5152
5167
  Pe as combineArgs,
5153
- _ as combineParameters,
5168
+ L as combineParameters,
5154
5169
  K as composeConfigs,
5155
- Gr as composeStepRunners,
5156
- Qs as composeStories,
5157
- wo as composeStory,
5158
- Zs as createPlaywrightTest,
5159
- bo as decorateStory,
5160
- Nr as defaultDecorateStory,
5161
- Zn as definePreview,
5162
- Vn as emitTransformCode,
5170
+ Lr as composeStepRunners,
5171
+ _s as composeStories,
5172
+ io as composeStory,
5173
+ Ls as createPlaywrightTest,
5174
+ ro as decorateStory,
5175
+ kr as defaultDecorateStory,
5176
+ Ln as definePreview,
5177
+ Pn as emitTransformCode,
5163
5178
  Ke as filterArgTypes,
5164
5179
  oe as getCoreAnnotations,
5165
- Vr as getCsfFactoryAnnotations,
5180
+ Nr as getCsfFactoryAnnotations,
5166
5181
  Oe as inferControls,
5167
- hs as makeDecorator,
5182
+ es as makeDecorator,
5168
5183
  mr as mockChannel,
5169
5184
  ge as normalizeProjectAnnotations,
5170
5185
  he as normalizeStory,
5171
- qr as prepareMeta,
5186
+ jr as prepareMeta,
5172
5187
  Ie as prepareStory,
5173
- So as sanitizeStoryContextUpdate,
5174
- Ws as setDefaultProjectAnnotations,
5175
- Xs as setProjectAnnotations,
5188
+ to as sanitizeStoryContextUpdate,
5189
+ Is as setDefaultProjectAnnotations,
5190
+ js as setProjectAnnotations,
5176
5191
  fr as simulateDOMContentLoaded,
5177
- Bn as simulatePageLoad,
5178
- li as sortStoriesV7,
5179
- ys as useArgs,
5192
+ An as simulatePageLoad,
5193
+ Ws as sortStoriesV7,
5194
+ Qn as useArgs,
5180
5195
  ve as useCallback,
5181
- us as useChannel,
5182
- vt as useEffect,
5183
- ms as useGlobals,
5184
- as as useMemo,
5185
- fs as useParameter,
5186
- ps as useReducer,
5187
- ls as useRef,
5188
- ds as useState,
5196
+ Xn as useChannel,
5197
+ pt as useEffect,
5198
+ Zn as useGlobals,
5199
+ Hn as useMemo,
5200
+ Jn as useParameter,
5201
+ Kn as useReducer,
5202
+ Wn as useRef,
5203
+ Yn as useState,
5189
5204
  Ge as useStoryContext,
5190
- ii as userOrAutoTitle,
5191
- Co as userOrAutoTitleFromSpecifier
5205
+ Vs as userOrAutoTitle,
5206
+ co as userOrAutoTitleFromSpecifier
5192
5207
  };