storybook 9.0.0-alpha.9 → 9.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/assets/docs/addon-backgrounds.gif +0 -0
  2. package/assets/docs/addon-controls-args-annotated.png +0 -0
  3. package/assets/docs/addon-controls-args-background-color.png +0 -0
  4. package/assets/docs/addon-controls-args-background-string.png +0 -0
  5. package/assets/docs/addon-controls-args-docs.png +0 -0
  6. package/assets/docs/addon-controls-args-logging.png +0 -0
  7. package/assets/docs/addon-controls-args-no-annotation.png +0 -0
  8. package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
  9. package/assets/docs/addon-controls-args-reflow.png +0 -0
  10. package/assets/docs/addon-controls-args-template.png +0 -0
  11. package/assets/docs/addon-controls-expanded.png +0 -0
  12. package/assets/docs/addon-controls-hero.gif +0 -0
  13. package/assets/docs/addon-controls-install.png +0 -0
  14. package/assets/docs/hero.gif +0 -0
  15. package/assets/docs/highlight.png +0 -0
  16. package/assets/docs/viewport.png +0 -0
  17. package/assets/server/base-preview-head.html +1 -3
  18. package/bin/index.cjs +2 -2
  19. package/dist/actions/decorator.js +67 -72
  20. package/dist/actions/index.cjs +27 -31
  21. package/dist/actions/index.d.ts +0 -3
  22. package/dist/actions/index.js +27 -31
  23. package/dist/actions/preview.cjs +23 -27
  24. package/dist/actions/preview.d.ts +0 -1
  25. package/dist/actions/preview.js +19 -23
  26. package/dist/babel/index.cjs +822 -816
  27. package/dist/babel/index.js +822 -816
  28. package/dist/backgrounds/index.cjs +148 -0
  29. package/dist/backgrounds/index.d.ts +91 -0
  30. package/dist/backgrounds/index.js +130 -0
  31. package/dist/backgrounds/preview.cjs +143 -0
  32. package/dist/backgrounds/preview.d.ts +54 -0
  33. package/dist/backgrounds/preview.js +127 -0
  34. package/dist/bin/index.cjs +73 -92
  35. package/dist/bin/index.js +66 -85
  36. package/dist/builder-manager/index.cjs +316 -296
  37. package/dist/builder-manager/index.js +567 -547
  38. package/dist/channels/index.cjs +1020 -950
  39. package/dist/channels/index.js +1256 -1201
  40. package/dist/cli/bin/index.cjs +198 -198
  41. package/dist/cli/bin/index.js +204 -204
  42. package/dist/cli/index.cjs +61735 -7589
  43. package/dist/cli/index.d.ts +24 -20
  44. package/dist/cli/index.js +61776 -7630
  45. package/dist/common/index.cjs +16133 -9095
  46. package/dist/common/index.d.ts +32 -24
  47. package/dist/common/index.js +16227 -9183
  48. package/dist/component-testing/index.cjs +23 -0
  49. package/dist/component-testing/index.d.ts +3 -0
  50. package/dist/component-testing/index.js +5 -0
  51. package/dist/component-testing/preview.cjs +40 -0
  52. package/dist/component-testing/preview.d.ts +5 -0
  53. package/dist/component-testing/preview.js +25 -0
  54. package/dist/components/index.cjs +6479 -13005
  55. package/dist/components/index.d.ts +8 -257
  56. package/dist/components/index.js +6160 -18689
  57. package/dist/controls/decorator.d.ts +5 -0
  58. package/dist/controls/decorator.js +8 -0
  59. package/dist/controls/index.cjs +26 -0
  60. package/dist/controls/index.d.ts +39 -0
  61. package/dist/controls/index.js +6 -0
  62. package/dist/controls/preview.cjs +26 -0
  63. package/dist/controls/preview.d.ts +54 -0
  64. package/dist/controls/preview.js +9 -0
  65. package/dist/core-events/index.cjs +91 -106
  66. package/dist/core-events/index.d.ts +2 -80
  67. package/dist/core-events/index.js +79 -94
  68. package/dist/core-server/index.cjs +12409 -12231
  69. package/dist/core-server/index.d.ts +32 -23
  70. package/dist/core-server/index.js +12567 -12389
  71. package/dist/core-server/presets/common-manager.css +170 -0
  72. package/dist/core-server/presets/common-manager.js +12153 -12
  73. package/dist/core-server/presets/common-preset.cjs +3004 -3151
  74. package/dist/core-server/presets/common-preset.js +2833 -2981
  75. package/dist/csf/index.d.ts +1 -3
  76. package/dist/csf-tools/index.cjs +412 -403
  77. package/dist/csf-tools/index.d.ts +0 -4
  78. package/dist/csf-tools/index.js +410 -401
  79. package/dist/docs-tools/index.cjs +2569 -575
  80. package/dist/docs-tools/index.js +2565 -564
  81. package/dist/highlight/index.cjs +27 -0
  82. package/dist/highlight/index.d.ts +61 -0
  83. package/dist/highlight/index.js +7 -0
  84. package/dist/highlight/preview.cjs +535 -0
  85. package/dist/highlight/preview.d.ts +54 -0
  86. package/dist/highlight/preview.js +519 -0
  87. package/dist/instrumenter/index.cjs +1411 -1758
  88. package/dist/instrumenter/index.d.ts +8 -7
  89. package/dist/instrumenter/index.js +1325 -1663
  90. package/dist/manager/globals-module-info.cjs +22 -33
  91. package/dist/manager/globals-module-info.js +7 -18
  92. package/dist/manager/globals-runtime.js +45452 -49541
  93. package/dist/manager/runtime.js +4392 -3774
  94. package/dist/manager-api/index.cjs +2622 -2529
  95. package/dist/manager-api/index.d.ts +109 -114
  96. package/dist/manager-api/index.js +2603 -2475
  97. package/dist/manager-errors.js +41 -37
  98. package/dist/measure/index.cjs +476 -0
  99. package/dist/measure/index.d.ts +66 -0
  100. package/dist/measure/index.js +464 -0
  101. package/dist/measure/preview.cjs +466 -0
  102. package/dist/measure/preview.d.ts +59 -0
  103. package/dist/measure/preview.js +450 -0
  104. package/dist/outline/index.cjs +528 -0
  105. package/dist/outline/index.d.ts +66 -0
  106. package/dist/outline/index.js +500 -0
  107. package/dist/outline/preview.cjs +518 -0
  108. package/dist/outline/preview.d.ts +59 -0
  109. package/dist/outline/preview.js +486 -0
  110. package/dist/preview/runtime.js +41973 -38159
  111. package/dist/preview-api/index.cjs +1204 -1293
  112. package/dist/preview-api/index.d.ts +126 -178
  113. package/dist/preview-api/index.js +1614 -1685
  114. package/dist/preview-errors.cjs +65 -51
  115. package/dist/preview-errors.d.ts +6 -2
  116. package/dist/preview-errors.js +176 -142
  117. package/dist/server-errors.cjs +160 -113
  118. package/dist/server-errors.d.ts +12 -2
  119. package/dist/server-errors.js +157 -110
  120. package/dist/telemetry/index.cjs +374 -370
  121. package/dist/telemetry/index.d.ts +1 -1
  122. package/dist/telemetry/index.js +460 -456
  123. package/dist/test/index.cjs +1553 -1552
  124. package/dist/test/index.js +9603 -9514
  125. package/dist/test/preview.cjs +1906 -1905
  126. package/dist/test/preview.d.ts +0 -6
  127. package/dist/test/preview.js +3664 -3603
  128. package/dist/test/spy.cjs +65 -64
  129. package/dist/test/spy.js +59 -58
  130. package/dist/types/index.cjs +11 -12
  131. package/dist/types/index.d.ts +601 -334
  132. package/dist/types/index.js +1 -2
  133. package/dist/viewport/index.cjs +310 -0
  134. package/dist/viewport/index.d.ts +320 -0
  135. package/dist/viewport/index.js +290 -0
  136. package/dist/viewport/preview.cjs +35 -0
  137. package/dist/viewport/preview.d.ts +68 -0
  138. package/dist/viewport/preview.js +19 -0
  139. package/package.json +207 -12
  140. package/dist/actions/manager.js +0 -1196
@@ -1,324 +1,420 @@
1
1
  "use strict";
2
- var Ne = Object.create;
3
- var q = Object.defineProperty;
4
- var Re = Object.getOwnPropertyDescriptor;
5
- var je = Object.getOwnPropertyNames;
6
- var De = Object.getPrototypeOf, Le = Object.prototype.hasOwnProperty;
7
- var o = (t, e) => q(t, "name", { value: e, configurable: !0 });
8
- var J = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), Me = (t, e) => {
2
+ var Mt = Object.create;
3
+ var Z = Object.defineProperty;
4
+ var Ut = Object.getOwnPropertyDescriptor;
5
+ var Gt = Object.getOwnPropertyNames;
6
+ var kt = Object.getPrototypeOf, Wt = Object.prototype.hasOwnProperty;
7
+ var s = (t, e) => Z(t, "name", { value: e, configurable: !0 });
8
+ var ke = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), qt = (t, e) => {
9
9
  for (var r in e)
10
- q(t, r, { get: e[r], enumerable: !0 });
11
- }, pe = (t, e, r, n) => {
10
+ Z(t, r, { get: e[r], enumerable: !0 });
11
+ }, We = (t, e, r, n) => {
12
12
  if (e && typeof e == "object" || typeof e == "function")
13
- for (let a of je(e))
14
- !Le.call(t, a) && a !== r && q(t, a, { get: () => e[a], enumerable: !(n = Re(e, a)) || n.enumerable });
13
+ for (let o of Gt(e))
14
+ !Wt.call(t, o) && o !== r && Z(t, o, { get: () => e[o], enumerable: !(n = Ut(e, o)) || n.enumerable });
15
15
  return t;
16
16
  };
17
- var z = (t, e, r) => (r = t != null ? Ne(De(t)) : {}, pe(
17
+ var ee = (t, e, r) => (r = t != null ? Mt(kt(t)) : {}, We(
18
18
  // If the importer is in node compatibility mode or this is not an ESM
19
19
  // file that has been converted to a CommonJS file using a Babel-
20
20
  // compatible transform (i.e. "__esModule" has not been set), then set
21
21
  // "default" to the CommonJS "module.exports" for node compatibility.
22
- e || !t || !t.__esModule ? q(r, "default", { value: t, enumerable: !0 }) : r,
22
+ e || !t || !t.__esModule ? Z(r, "default", { value: t, enumerable: !0 }) : r,
23
23
  t
24
- )), Fe = (t) => pe(q({}, "__esModule", { value: !0 }), t);
24
+ )), Bt = (t) => We(Z({}, "__esModule", { value: !0 }), t);
25
25
 
26
26
  // ../node_modules/ts-dedent/dist/index.js
27
- var he = J((B) => {
27
+ var Be = ke((te) => {
28
28
  "use strict";
29
- Object.defineProperty(B, "__esModule", { value: !0 });
30
- B.dedent = void 0;
31
- function fe(t) {
29
+ Object.defineProperty(te, "__esModule", { value: !0 });
30
+ te.dedent = void 0;
31
+ function qe(t) {
32
32
  for (var e = [], r = 1; r < arguments.length; r++)
33
33
  e[r - 1] = arguments[r];
34
34
  var n = Array.from(typeof t == "string" ? [t] : t);
35
35
  n[n.length - 1] = n[n.length - 1].replace(/\r?\n([\t ]*)$/, "");
36
- var a = n.reduce(function(c, i) {
37
- var h = i.match(/\n([\t ]+|(?!\s).)/g);
38
- return h ? c.concat(h.map(function(p) {
36
+ var o = n.reduce(function(c, i) {
37
+ var l = i.match(/\n([\t ]+|(?!\s).)/g);
38
+ return l ? c.concat(l.map(function(d) {
39
39
  var u, y;
40
- return (y = (u = p.match(/[\t ]/g)) === null || u === void 0 ? void 0 : u.length) !== null && y !== void 0 ? y : 0;
40
+ return (y = (u = d.match(/[\t ]/g)) === null || u === void 0 ? void 0 : u.length) !== null && y !== void 0 ? y : 0;
41
41
  })) : c;
42
42
  }, []);
43
- if (a.length) {
44
- var s = new RegExp(`
45
- [ ]{` + Math.min.apply(Math, a) + "}", "g");
43
+ if (o.length) {
44
+ var p = new RegExp(`
45
+ [ ]{` + Math.min.apply(Math, o) + "}", "g");
46
46
  n = n.map(function(c) {
47
- return c.replace(s, `
47
+ return c.replace(p, `
48
48
  `);
49
49
  });
50
50
  }
51
51
  n[0] = n[0].replace(/^\r?\n/, "");
52
- var l = n[0];
52
+ var a = n[0];
53
53
  return e.forEach(function(c, i) {
54
- var h = l.match(/(?:^|\n)( *)$/), p = h ? h[1] : "", u = c;
54
+ var l = a.match(/(?:^|\n)( *)$/), d = l ? l[1] : "", u = c;
55
55
  typeof c == "string" && c.includes(`
56
56
  `) && (u = String(c).split(`
57
- `).map(function(y, d) {
58
- return d === 0 ? y : "" + p + y;
57
+ `).map(function(y, g) {
58
+ return g === 0 ? y : "" + d + y;
59
59
  }).join(`
60
- `)), l += u + n[i + 1];
61
- }), l;
60
+ `)), a += u + n[i + 1];
61
+ }), a;
62
62
  }
63
- o(fe, "dedent");
64
- B.dedent = fe;
65
- B.default = fe;
66
- });
67
-
68
- // ../node_modules/map-or-similar/src/similar.js
69
- var de = J((st, ye) => {
70
- function I() {
71
- return this.list = [], this.lastItem = void 0, this.size = 0, this;
72
- }
73
- o(I, "Similar");
74
- I.prototype.get = function(t) {
75
- var e;
76
- if (this.lastItem && this.isEqual(this.lastItem.key, t))
77
- return this.lastItem.val;
78
- if (e = this.indexOf(t), e >= 0)
79
- return this.lastItem = this.list[e], this.list[e].val;
80
- };
81
- I.prototype.set = function(t, e) {
82
- var r;
83
- return this.lastItem && this.isEqual(this.lastItem.key, t) ? (this.lastItem.val = e, this) : (r = this.indexOf(t), r >= 0 ? (this.lastItem =
84
- this.list[r], this.list[r].val = e, this) : (this.lastItem = { key: t, val: e }, this.list.push(this.lastItem), this.size++, this));
85
- };
86
- I.prototype.delete = function(t) {
87
- var e;
88
- if (this.lastItem && this.isEqual(this.lastItem.key, t) && (this.lastItem = void 0), e = this.indexOf(t), e >= 0)
89
- return this.size--, this.list.splice(e, 1)[0];
90
- };
91
- I.prototype.has = function(t) {
92
- var e;
93
- return this.lastItem && this.isEqual(this.lastItem.key, t) ? !0 : (e = this.indexOf(t), e >= 0 ? (this.lastItem = this.list[e], !0) : !1);
94
- };
95
- I.prototype.forEach = function(t, e) {
96
- var r;
97
- for (r = 0; r < this.size; r++)
98
- t.call(e || this, this.list[r].val, this.list[r].key, this);
99
- };
100
- I.prototype.indexOf = function(t) {
101
- var e;
102
- for (e = 0; e < this.size; e++)
103
- if (this.isEqual(this.list[e].key, t))
104
- return e;
105
- return -1;
106
- };
107
- I.prototype.isEqual = function(t, e) {
108
- return t === e || t !== t && e !== e;
109
- };
110
- ye.exports = I;
111
- });
112
-
113
- // ../node_modules/map-or-similar/src/map-or-similar.js
114
- var me = J((ct, ge) => {
115
- ge.exports = function(t) {
116
- if (typeof Map != "function" || t) {
117
- var e = de();
118
- return new e();
119
- } else
120
- return /* @__PURE__ */ new Map();
121
- };
122
- });
123
-
124
- // ../node_modules/memoizerific/src/memoizerific.js
125
- var Ee = J((ut, _e) => {
126
- var ve = me();
127
- _e.exports = function(t) {
128
- var e = new ve(process.env.FORCE_SIMILAR_INSTEAD_OF_MAP === "true"), r = [];
129
- return function(n) {
130
- var a = /* @__PURE__ */ o(function() {
131
- var s = e, l, c, i = arguments.length - 1, h = Array(i + 1), p = !0, u;
132
- if ((a.numArgs || a.numArgs === 0) && a.numArgs !== i + 1)
133
- throw new Error("Memoizerific functions should always be called with the same number of arguments");
134
- for (u = 0; u < i; u++) {
135
- if (h[u] = {
136
- cacheItem: s,
137
- arg: arguments[u]
138
- }, s.has(arguments[u])) {
139
- s = s.get(arguments[u]);
140
- continue;
141
- }
142
- p = !1, l = new ve(process.env.FORCE_SIMILAR_INSTEAD_OF_MAP === "true"), s.set(arguments[u], l), s = l;
143
- }
144
- return p && (s.has(arguments[i]) ? c = s.get(arguments[i]) : p = !1), p || (c = n.apply(null, arguments), s.set(arguments[i], c)), t >
145
- 0 && (h[i] = {
146
- cacheItem: s,
147
- arg: arguments[i]
148
- }, p ? Ge(r, h) : r.push(h), r.length > t && He(r.shift())), a.wasMemoized = p, a.numArgs = i + 1, c;
149
- }, "memoizerific");
150
- return a.limit = t, a.wasMemoized = !1, a.cache = e, a.lru = r, a;
151
- };
152
- };
153
- function Ge(t, e) {
154
- var r = t.length, n = e.length, a, s, l;
155
- for (s = 0; s < r; s++) {
156
- for (a = !0, l = 0; l < n; l++)
157
- if (!We(t[s][l].arg, e[l].arg)) {
158
- a = !1;
159
- break;
160
- }
161
- if (a)
162
- break;
163
- }
164
- t.push(t.splice(s, 1)[0]);
165
- }
166
- o(Ge, "moveToMostRecentLru");
167
- function He(t) {
168
- var e = t.length, r = t[e - 1], n, a;
169
- for (r.cacheItem.delete(r.arg), a = e - 2; a >= 0 && (r = t[a], n = r.cacheItem.get(r.arg), !n || !n.size); a--)
170
- r.cacheItem.delete(r.arg);
171
- }
172
- o(He, "removeCachedResult");
173
- function We(t, e) {
174
- return t === e || t !== t && e !== e;
175
- }
176
- o(We, "isEqual");
63
+ s(qe, "dedent");
64
+ te.dedent = qe;
65
+ te.default = qe;
177
66
  });
178
67
 
179
68
  // ../node_modules/telejson/dist/index.js
180
- var ne = J((exports, module) => {
69
+ var Ne = ke((ms, Et) => {
181
70
  "use strict";
182
- var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.
183
- getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJS = /* @__PURE__ */ o(
184
- (t, e) => /* @__PURE__ */ o(function() {
185
- return e || (0, t[__getOwnPropNames(t)[0]])((e = { exports: {} }).exports, e), e.exports;
186
- }, "__require"), "__commonJS"), __export = /* @__PURE__ */ o((t, e) => {
71
+ var zt = Object.create, fe = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, Ke = Object.getOwnPropertyNames, Kt = Object.getPrototypeOf,
72
+ Xt = Object.prototype.hasOwnProperty, f = /* @__PURE__ */ s((t, e) => /* @__PURE__ */ s(function() {
73
+ return e || (0, t[Ke(t)[0]])((e = { exports: {} }).exports, e), e.exports;
74
+ }, "__require"), "__commonJS"), Qt = /* @__PURE__ */ s((t, e) => {
187
75
  for (var r in e)
188
- __defProp(t, r, { get: e[r], enumerable: !0 });
189
- }, "__export"), __copyProps = /* @__PURE__ */ o((t, e, r, n) => {
76
+ fe(t, r, { get: e[r], enumerable: !0 });
77
+ }, "__export"), Xe = /* @__PURE__ */ s((t, e, r, n) => {
190
78
  if (e && typeof e == "object" || typeof e == "function")
191
- for (let a of __getOwnPropNames(e))
192
- !__hasOwnProp.call(t, a) && a !== r && __defProp(t, a, { get: /* @__PURE__ */ o(() => e[a], "get"), enumerable: !(n = __getOwnPropDesc(
193
- e, a)) || n.enumerable });
79
+ for (let o of Ke(e))
80
+ !Xt.call(t, o) && o !== r && fe(t, o, { get: /* @__PURE__ */ s(() => e[o], "get"), enumerable: !(n = Yt(e, o)) || n.enumerable });
194
81
  return t;
195
- }, "__copyProps"), __toESM = /* @__PURE__ */ o((t, e, r) => (r = t != null ? __create(__getProtoOf(t)) : {}, __copyProps(
196
- e || !t || !t.__esModule ? __defProp(r, "default", { value: t, enumerable: !0 }) : r,
82
+ }, "__copyProps"), _e = /* @__PURE__ */ s((t, e, r) => (r = t != null ? zt(Kt(t)) : {}, Xe(
83
+ // If the importer is in node compatibility mode or this is not an ESM
84
+ // file that has been converted to a CommonJS file using a Babel-
85
+ // compatible transform (i.e. "__esModule" has not been set), then set
86
+ // "default" to the CommonJS "module.exports" for node compatibility.
87
+ e || !t || !t.__esModule ? fe(r, "default", { value: t, enumerable: !0 }) : r,
197
88
  t
198
- )), "__toESM"), __toCommonJS = /* @__PURE__ */ o((t) => __copyProps(__defProp({}, "__esModule", { value: !0 }), t), "__toCommonJS"), require_shams = __commonJS(
199
- {
200
- "node_modules/has-symbols/shams.js"(t, e) {
89
+ )), "__toESM"), Zt = /* @__PURE__ */ s((t) => Xe(fe({}, "__esModule", { value: !0 }), t), "__toCommonJS"), Qe = f({
90
+ "node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(t, e) {
91
+ "use strict";
92
+ e.exports = Object;
93
+ }
94
+ }), er = f({
95
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(t, e) {
96
+ "use strict";
97
+ e.exports = Error;
98
+ }
99
+ }), tr = f({
100
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(t, e) {
101
+ "use strict";
102
+ e.exports = EvalError;
103
+ }
104
+ }), rr = f({
105
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(t, e) {
106
+ "use strict";
107
+ e.exports = RangeError;
108
+ }
109
+ }), nr = f({
110
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(t, e) {
111
+ "use strict";
112
+ e.exports = ReferenceError;
113
+ }
114
+ }), or = f({
115
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(t, e) {
116
+ "use strict";
117
+ e.exports = SyntaxError;
118
+ }
119
+ }), be = f({
120
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(t, e) {
121
+ "use strict";
122
+ e.exports = TypeError;
123
+ }
124
+ }), sr = f({
125
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(t, e) {
126
+ "use strict";
127
+ e.exports = URIError;
128
+ }
129
+ }), ir = f({
130
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(t, e) {
131
+ "use strict";
132
+ e.exports = Math.abs;
133
+ }
134
+ }), ar = f({
135
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(t, e) {
136
+ "use strict";
137
+ e.exports = Math.floor;
138
+ }
139
+ }), pr = f({
140
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(t, e) {
141
+ "use strict";
142
+ e.exports = Math.max;
143
+ }
144
+ }), cr = f({
145
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(t, e) {
146
+ "use strict";
147
+ e.exports = Math.min;
148
+ }
149
+ }), lr = f({
150
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(t, e) {
151
+ "use strict";
152
+ e.exports = Math.pow;
153
+ }
154
+ }), ur = f({
155
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(t, e) {
156
+ "use strict";
157
+ e.exports = Math.round;
158
+ }
159
+ }), fr = f({
160
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(t, e) {
161
+ "use strict";
162
+ e.exports = Number.isNaN || /* @__PURE__ */ s(function(n) {
163
+ return n !== n;
164
+ }, "isNaN2");
165
+ }
166
+ }), dr = f({
167
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(t, e) {
168
+ "use strict";
169
+ var r = fr();
170
+ e.exports = /* @__PURE__ */ s(function(o) {
171
+ return r(o) || o === 0 ? o : o < 0 ? -1 : 1;
172
+ }, "sign");
173
+ }
174
+ }), yr = f({
175
+ "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(t, e) {
176
+ "use strict";
177
+ e.exports = Object.getOwnPropertyDescriptor;
178
+ }
179
+ }), Se = f({
180
+ "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(t, e) {
181
+ "use strict";
182
+ var r = yr();
183
+ if (r)
184
+ try {
185
+ r([], "length");
186
+ } catch {
187
+ r = null;
188
+ }
189
+ e.exports = r;
190
+ }
191
+ }), hr = f({
192
+ "node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(t, e) {
193
+ "use strict";
194
+ var r = Object.defineProperty || !1;
195
+ if (r)
196
+ try {
197
+ r({}, "a", { value: 1 });
198
+ } catch {
199
+ r = !1;
200
+ }
201
+ e.exports = r;
202
+ }
203
+ }), Ze = f({
204
+ "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(t, e) {
201
205
  "use strict";
202
- e.exports = /* @__PURE__ */ o(function() {
206
+ e.exports = /* @__PURE__ */ s(function() {
203
207
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
204
208
  return !1;
205
209
  if (typeof Symbol.iterator == "symbol")
206
210
  return !0;
207
- var n = {}, a = Symbol("test"), s = Object(a);
208
- if (typeof a == "string" || Object.prototype.toString.call(a) !== "[object Symbol]" || Object.prototype.toString.call(s) !== "[objec\
211
+ var n = {}, o = Symbol("test"), p = Object(o);
212
+ if (typeof o == "string" || Object.prototype.toString.call(o) !== "[object Symbol]" || Object.prototype.toString.call(p) !== "[objec\
209
213
  t Symbol]")
210
214
  return !1;
211
- var l = 42;
212
- n[a] = l;
213
- for (a in n)
215
+ var a = 42;
216
+ n[o] = a;
217
+ for (var c in n)
214
218
  return !1;
215
219
  if (typeof Object.keys == "function" && Object.keys(n).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(
216
220
  n).length !== 0)
217
221
  return !1;
218
- var c = Object.getOwnPropertySymbols(n);
219
- if (c.length !== 1 || c[0] !== a || !Object.prototype.propertyIsEnumerable.call(n, a))
222
+ var i = Object.getOwnPropertySymbols(n);
223
+ if (i.length !== 1 || i[0] !== o || !Object.prototype.propertyIsEnumerable.call(n, o))
220
224
  return !1;
221
225
  if (typeof Object.getOwnPropertyDescriptor == "function") {
222
- var i = Object.getOwnPropertyDescriptor(n, a);
223
- if (i.value !== l || i.enumerable !== !0)
226
+ var l = (
227
+ /** @type {PropertyDescriptor} */
228
+ Object.getOwnPropertyDescriptor(n, o)
229
+ );
230
+ if (l.value !== a || l.enumerable !== !0)
224
231
  return !1;
225
232
  }
226
233
  return !0;
227
234
  }, "hasSymbols");
228
235
  }
229
- }), require_has_symbols = __commonJS({
230
- "node_modules/has-symbols/index.js"(t, e) {
236
+ }), et = f({
237
+ "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(t, e) {
231
238
  "use strict";
232
- var r = typeof Symbol < "u" && Symbol, n = require_shams();
233
- e.exports = /* @__PURE__ */ o(function() {
239
+ var r = typeof Symbol < "u" && Symbol, n = Ze();
240
+ e.exports = /* @__PURE__ */ s(function() {
234
241
  return typeof r != "function" || typeof Symbol != "function" || typeof r("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
235
242
  n();
236
243
  }, "hasNativeSymbols");
237
244
  }
238
- }), require_implementation = __commonJS({
239
- "node_modules/function-bind/implementation.js"(t, e) {
245
+ }), tt = f({
246
+ "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(t, e) {
247
+ "use strict";
248
+ e.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
249
+ }
250
+ }), rt = f({
251
+ "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(t, e) {
240
252
  "use strict";
241
- var r = "Function.prototype.bind called on incompatible ", n = Array.prototype.slice, a = Object.prototype.toString, s = "[object Func\
242
- tion]";
243
- e.exports = /* @__PURE__ */ o(function(c) {
244
- var i = this;
245
- if (typeof i != "function" || a.call(i) !== s)
246
- throw new TypeError(r + i);
247
- for (var h = n.call(arguments, 1), p, u = /* @__PURE__ */ o(function() {
248
- if (this instanceof p) {
249
- var T = i.apply(
253
+ var r = Qe();
254
+ e.exports = r.getPrototypeOf || null;
255
+ }
256
+ }), gr = f({
257
+ "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(t, e) {
258
+ "use strict";
259
+ var r = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, o = Math.max, p = "[object Function]", a = /* @__PURE__ */ s(
260
+ function(d, u) {
261
+ for (var y = [], g = 0; g < d.length; g += 1)
262
+ y[g] = d[g];
263
+ for (var h = 0; h < u.length; h += 1)
264
+ y[h + d.length] = u[h];
265
+ return y;
266
+ }, "concatty2"), c = /* @__PURE__ */ s(function(d, u) {
267
+ for (var y = [], g = u || 0, h = 0; g < d.length; g += 1, h += 1)
268
+ y[h] = d[g];
269
+ return y;
270
+ }, "slicy2"), i = /* @__PURE__ */ s(function(l, d) {
271
+ for (var u = "", y = 0; y < l.length; y += 1)
272
+ u += l[y], y + 1 < l.length && (u += d);
273
+ return u;
274
+ }, "joiny");
275
+ e.exports = /* @__PURE__ */ s(function(d) {
276
+ var u = this;
277
+ if (typeof u != "function" || n.apply(u) !== p)
278
+ throw new TypeError(r + u);
279
+ for (var y = c(arguments, 1), g, h = /* @__PURE__ */ s(function() {
280
+ if (this instanceof g) {
281
+ var I = u.apply(
250
282
  this,
251
- h.concat(n.call(arguments))
252
- );
253
- return Object(T) === T ? T : this;
254
- } else
255
- return i.apply(
256
- c,
257
- h.concat(n.call(arguments))
283
+ a(y, arguments)
258
284
  );
259
- }, "binder"), y = Math.max(0, i.length - h.length), d = [], v = 0; v < y; v++)
260
- d.push("$" + v);
261
- if (p = Function("binder", "return function (" + d.join(",") + "){ return binder.apply(this,arguments); }")(u), i.prototype) {
262
- var w = /* @__PURE__ */ o(function() {
285
+ return Object(I) === I ? I : this;
286
+ }
287
+ return u.apply(
288
+ d,
289
+ a(y, arguments)
290
+ );
291
+ }, "binder"), C = o(0, u.length - y.length), w = [], A = 0; A < C; A++)
292
+ w[A] = "$" + A;
293
+ if (g = Function("binder", "return function (" + i(w, ",") + "){ return binder.apply(this,arguments); }")(h), u.prototype) {
294
+ var L = /* @__PURE__ */ s(function() {
263
295
  }, "Empty2");
264
- w.prototype = i.prototype, p.prototype = new w(), w.prototype = null;
296
+ L.prototype = u.prototype, g.prototype = new L(), L.prototype = null;
265
297
  }
266
- return p;
298
+ return g;
267
299
  }, "bind");
268
300
  }
269
- }), require_function_bind = __commonJS({
270
- "node_modules/function-bind/index.js"(t, e) {
301
+ }), de = f({
302
+ "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(t, e) {
271
303
  "use strict";
272
- var r = require_implementation();
304
+ var r = gr();
273
305
  e.exports = Function.prototype.bind || r;
274
306
  }
275
- }), require_src = __commonJS({
276
- "node_modules/has/src/index.js"(t, e) {
307
+ }), Te = f({
308
+ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(t, e) {
277
309
  "use strict";
278
- var r = require_function_bind();
279
- e.exports = r.call(Function.call, Object.prototype.hasOwnProperty);
310
+ e.exports = Function.prototype.call;
280
311
  }
281
- }), require_get_intrinsic = __commonJS({
282
- "node_modules/get-intrinsic/index.js"(t, e) {
312
+ }), nt = f({
313
+ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(t, e) {
283
314
  "use strict";
284
- var r, n = SyntaxError, a = Function, s = TypeError, l = /* @__PURE__ */ o(function(A) {
285
- try {
286
- return a('"use strict"; return (' + A + ").constructor;")();
287
- } catch {
288
- }
289
- }, "getEvalledConstructor"), c = Object.getOwnPropertyDescriptor;
290
- if (c)
315
+ e.exports = Function.prototype.apply;
316
+ }
317
+ }), mr = f({
318
+ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(t, e) {
319
+ "use strict";
320
+ e.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
321
+ }
322
+ }), vr = f({
323
+ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(t, e) {
324
+ "use strict";
325
+ var r = de(), n = nt(), o = Te(), p = mr();
326
+ e.exports = p || r.call(o, n);
327
+ }
328
+ }), ot = f({
329
+ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(t, e) {
330
+ "use strict";
331
+ var r = de(), n = be(), o = Te(), p = vr();
332
+ e.exports = /* @__PURE__ */ s(function(c) {
333
+ if (c.length < 1 || typeof c[0] != "function")
334
+ throw new n("a function is required");
335
+ return p(r, o, c);
336
+ }, "callBindBasic");
337
+ }
338
+ }), Er = f({
339
+ "node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(t, e) {
340
+ "use strict";
341
+ var r = ot(), n = Se(), o;
342
+ try {
343
+ o = /** @type {{ __proto__?: typeof Array.prototype }} */
344
+ [].__proto__ === Array.prototype;
345
+ } catch (i) {
346
+ if (!i || typeof i != "object" || !("code" in i) || i.code !== "ERR_PROTO_ACCESS")
347
+ throw i;
348
+ }
349
+ var p = !!o && n && n(
350
+ Object.prototype,
351
+ /** @type {keyof typeof Object.prototype} */
352
+ "__proto__"
353
+ ), a = Object, c = a.getPrototypeOf;
354
+ e.exports = p && typeof p.get == "function" ? r([p.get]) : typeof c == "function" ? (
355
+ /** @type {import('./get')} */
356
+ /* @__PURE__ */ s(function(l) {
357
+ return c(l == null ? l : a(l));
358
+ }, "getDunder")
359
+ ) : !1;
360
+ }
361
+ }), _r = f({
362
+ "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(t, e) {
363
+ "use strict";
364
+ var r = tt(), n = rt(), o = Er();
365
+ e.exports = r ? /* @__PURE__ */ s(function(a) {
366
+ return r(a);
367
+ }, "getProto") : n ? /* @__PURE__ */ s(function(a) {
368
+ if (!a || typeof a != "object" && typeof a != "function")
369
+ throw new TypeError("getProto: not an object");
370
+ return n(a);
371
+ }, "getProto") : o ? /* @__PURE__ */ s(function(a) {
372
+ return o(a);
373
+ }, "getProto") : null;
374
+ }
375
+ }), st = f({
376
+ "node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(t, e) {
377
+ "use strict";
378
+ var r = Function.prototype.call, n = Object.prototype.hasOwnProperty, o = de();
379
+ e.exports = o.call(r, n);
380
+ }
381
+ }), br = f({
382
+ "node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(t, e) {
383
+ "use strict";
384
+ var r, n = Qe(), o = er(), p = tr(), a = rr(), c = nr(), i = or(), l = be(), d = sr(), u = ir(), y = ar(), g = pr(), h = cr(), C = lr(),
385
+ w = ur(), A = dr(), L = Function, I = /* @__PURE__ */ s(function(P) {
291
386
  try {
292
- c({}, "");
387
+ return L('"use strict"; return (' + P + ").constructor;")();
293
388
  } catch {
294
- c = null;
295
389
  }
296
- var i = /* @__PURE__ */ o(function() {
297
- throw new s();
298
- }, "throwTypeError"), h = c ? function() {
390
+ }, "getEvalledConstructor"), Y = Se(), xt = hr(), ge = /* @__PURE__ */ s(function() {
391
+ throw new l();
392
+ }, "throwTypeError"), wt = Y ? function() {
299
393
  try {
300
- return arguments.callee, i;
394
+ return arguments.callee, ge;
301
395
  } catch {
302
396
  try {
303
- return c(arguments, "callee").get;
397
+ return Y(arguments, "callee").get;
304
398
  } catch {
305
- return i;
399
+ return ge;
306
400
  }
307
401
  }
308
- }() : i, p = require_has_symbols()(), u = Object.getPrototypeOf || function(A) {
309
- return A.__proto__;
310
- }, y = {}, d = typeof Uint8Array > "u" ? r : u(Uint8Array), v = {
402
+ }() : ge, D = et()(), E = _r(), Pt = rt(), Ot = tt(), Fe = nt(), K = Te(), $ = {}, Ct = typeof Uint8Array > "u" || !E ? r : E(Uint8Array),
403
+ R = {
404
+ __proto__: null,
311
405
  "%AggregateError%": typeof AggregateError > "u" ? r : AggregateError,
312
406
  "%Array%": Array,
313
407
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? r : ArrayBuffer,
314
- "%ArrayIteratorPrototype%": p ? u([][Symbol.iterator]()) : r,
408
+ "%ArrayIteratorPrototype%": D && E ? E([][Symbol.iterator]()) : r,
315
409
  "%AsyncFromSyncIteratorPrototype%": r,
316
- "%AsyncFunction%": y,
317
- "%AsyncGenerator%": y,
318
- "%AsyncGeneratorFunction%": y,
319
- "%AsyncIteratorPrototype%": y,
410
+ "%AsyncFunction%": $,
411
+ "%AsyncGenerator%": $,
412
+ "%AsyncGeneratorFunction%": $,
413
+ "%AsyncIteratorPrototype%": $,
320
414
  "%Atomics%": typeof Atomics > "u" ? r : Atomics,
321
415
  "%BigInt%": typeof BigInt > "u" ? r : BigInt,
416
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? r : BigInt64Array,
417
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? r : BigUint64Array,
322
418
  "%Boolean%": Boolean,
323
419
  "%DataView%": typeof DataView > "u" ? r : DataView,
324
420
  "%Date%": Date,
@@ -326,69 +422,92 @@ tion]";
326
422
  "%decodeURIComponent%": decodeURIComponent,
327
423
  "%encodeURI%": encodeURI,
328
424
  "%encodeURIComponent%": encodeURIComponent,
329
- "%Error%": Error,
425
+ "%Error%": o,
330
426
  "%eval%": eval,
331
- "%EvalError%": EvalError,
427
+ // eslint-disable-line no-eval
428
+ "%EvalError%": p,
429
+ "%Float16Array%": typeof Float16Array > "u" ? r : Float16Array,
332
430
  "%Float32Array%": typeof Float32Array > "u" ? r : Float32Array,
333
431
  "%Float64Array%": typeof Float64Array > "u" ? r : Float64Array,
334
432
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? r : FinalizationRegistry,
335
- "%Function%": a,
336
- "%GeneratorFunction%": y,
433
+ "%Function%": L,
434
+ "%GeneratorFunction%": $,
337
435
  "%Int8Array%": typeof Int8Array > "u" ? r : Int8Array,
338
436
  "%Int16Array%": typeof Int16Array > "u" ? r : Int16Array,
339
437
  "%Int32Array%": typeof Int32Array > "u" ? r : Int32Array,
340
438
  "%isFinite%": isFinite,
341
439
  "%isNaN%": isNaN,
342
- "%IteratorPrototype%": p ? u(u([][Symbol.iterator]())) : r,
440
+ "%IteratorPrototype%": D && E ? E(E([][Symbol.iterator]())) : r,
343
441
  "%JSON%": typeof JSON == "object" ? JSON : r,
344
442
  "%Map%": typeof Map > "u" ? r : Map,
345
- "%MapIteratorPrototype%": typeof Map > "u" || !p ? r : u((/* @__PURE__ */ new Map())[Symbol.iterator]()),
443
+ "%MapIteratorPrototype%": typeof Map > "u" || !D || !E ? r : E((/* @__PURE__ */ new Map())[Symbol.iterator]()),
346
444
  "%Math%": Math,
347
445
  "%Number%": Number,
348
- "%Object%": Object,
446
+ "%Object%": n,
447
+ "%Object.getOwnPropertyDescriptor%": Y,
349
448
  "%parseFloat%": parseFloat,
350
449
  "%parseInt%": parseInt,
351
450
  "%Promise%": typeof Promise > "u" ? r : Promise,
352
451
  "%Proxy%": typeof Proxy > "u" ? r : Proxy,
353
- "%RangeError%": RangeError,
354
- "%ReferenceError%": ReferenceError,
452
+ "%RangeError%": a,
453
+ "%ReferenceError%": c,
355
454
  "%Reflect%": typeof Reflect > "u" ? r : Reflect,
356
455
  "%RegExp%": RegExp,
357
456
  "%Set%": typeof Set > "u" ? r : Set,
358
- "%SetIteratorPrototype%": typeof Set > "u" || !p ? r : u((/* @__PURE__ */ new Set())[Symbol.iterator]()),
457
+ "%SetIteratorPrototype%": typeof Set > "u" || !D || !E ? r : E((/* @__PURE__ */ new Set())[Symbol.iterator]()),
359
458
  "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? r : SharedArrayBuffer,
360
459
  "%String%": String,
361
- "%StringIteratorPrototype%": p ? u(""[Symbol.iterator]()) : r,
362
- "%Symbol%": p ? Symbol : r,
363
- "%SyntaxError%": n,
364
- "%ThrowTypeError%": h,
365
- "%TypedArray%": d,
366
- "%TypeError%": s,
460
+ "%StringIteratorPrototype%": D && E ? E(""[Symbol.iterator]()) : r,
461
+ "%Symbol%": D ? Symbol : r,
462
+ "%SyntaxError%": i,
463
+ "%ThrowTypeError%": wt,
464
+ "%TypedArray%": Ct,
465
+ "%TypeError%": l,
367
466
  "%Uint8Array%": typeof Uint8Array > "u" ? r : Uint8Array,
368
467
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? r : Uint8ClampedArray,
369
468
  "%Uint16Array%": typeof Uint16Array > "u" ? r : Uint16Array,
370
469
  "%Uint32Array%": typeof Uint32Array > "u" ? r : Uint32Array,
371
- "%URIError%": URIError,
470
+ "%URIError%": d,
372
471
  "%WeakMap%": typeof WeakMap > "u" ? r : WeakMap,
373
472
  "%WeakRef%": typeof WeakRef > "u" ? r : WeakRef,
374
- "%WeakSet%": typeof WeakSet > "u" ? r : WeakSet
375
- }, w = /* @__PURE__ */ o(function A(g) {
376
- var E;
377
- if (g === "%AsyncFunction%")
378
- E = l("async function () {}");
379
- else if (g === "%GeneratorFunction%")
380
- E = l("function* () {}");
381
- else if (g === "%AsyncGeneratorFunction%")
382
- E = l("async function* () {}");
383
- else if (g === "%AsyncGenerator%") {
384
- var m = A("%AsyncGeneratorFunction%");
385
- m && (E = m.prototype);
386
- } else if (g === "%AsyncIteratorPrototype%") {
387
- var b = A("%AsyncGenerator%");
388
- b && (E = u(b.prototype));
473
+ "%WeakSet%": typeof WeakSet > "u" ? r : WeakSet,
474
+ "%Function.prototype.call%": K,
475
+ "%Function.prototype.apply%": Fe,
476
+ "%Object.defineProperty%": xt,
477
+ "%Object.getPrototypeOf%": Pt,
478
+ "%Math.abs%": u,
479
+ "%Math.floor%": y,
480
+ "%Math.max%": g,
481
+ "%Math.min%": h,
482
+ "%Math.pow%": C,
483
+ "%Math.round%": w,
484
+ "%Math.sign%": A,
485
+ "%Reflect.getPrototypeOf%": Ot
486
+ };
487
+ if (E)
488
+ try {
489
+ null.error;
490
+ } catch (P) {
491
+ Me = E(E(P)), R["%Error.prototype%"] = Me;
389
492
  }
390
- return v[g] = E, E;
391
- }, "doEval2"), T = {
493
+ var Me, Nt = /* @__PURE__ */ s(function P(m) {
494
+ var b;
495
+ if (m === "%AsyncFunction%")
496
+ b = I("async function () {}");
497
+ else if (m === "%GeneratorFunction%")
498
+ b = I("function* () {}");
499
+ else if (m === "%AsyncGeneratorFunction%")
500
+ b = I("async function* () {}");
501
+ else if (m === "%AsyncGenerator%") {
502
+ var v = P("%AsyncGeneratorFunction%");
503
+ v && (b = v.prototype);
504
+ } else if (m === "%AsyncIteratorPrototype%") {
505
+ var S = P("%AsyncGenerator%");
506
+ S && E && (b = E(S.prototype));
507
+ }
508
+ return R[m] = b, b;
509
+ }, "doEval2"), Ue = {
510
+ __proto__: null,
392
511
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
393
512
  "%ArrayPrototype%": ["Array", "prototype"],
394
513
  "%ArrayProto_entries%": ["Array", "prototype", "entries"],
@@ -440,270 +559,265 @@ tion]";
440
559
  "%URIErrorPrototype%": ["URIError", "prototype"],
441
560
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
442
561
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
443
- }, x = require_function_bind(), R = require_src(), j = x.call(Function.call, Array.prototype.concat), D = x.call(Function.apply, Array.
444
- prototype.splice), ue = x.call(Function.call, String.prototype.replace), K = x.call(Function.call, String.prototype.slice), Oe = x.call(
445
- Function.call, RegExp.prototype.exec), we = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
446
- Pe = /\\(\\)?/g, Ie = /* @__PURE__ */ o(function(g) {
447
- var E = K(g, 0, 1), m = K(g, -1);
448
- if (E === "%" && m !== "%")
449
- throw new n("invalid intrinsic syntax, expected closing `%`");
450
- if (m === "%" && E !== "%")
451
- throw new n("invalid intrinsic syntax, expected opening `%`");
452
- var b = [];
453
- return ue(g, we, function(O, L, S, Y) {
454
- b[b.length] = S ? ue(Y, Pe, "$1") : L || O;
455
- }), b;
456
- }, "stringToPath3"), xe = /* @__PURE__ */ o(function(g, E) {
457
- var m = g, b;
458
- if (R(T, m) && (b = T[m], m = "%" + b[0] + "%"), R(v, m)) {
459
- var O = v[m];
460
- if (O === y && (O = w(m)), typeof O > "u" && !E)
461
- throw new s("intrinsic " + g + " exists, but is not available. Please file an issue!");
562
+ }, X = de(), se = st(), It = X.call(K, Array.prototype.concat), Rt = X.call(Fe, Array.prototype.splice), Ge = X.call(K, String.prototype.
563
+ replace), ie = X.call(K, String.prototype.slice), jt = X.call(K, RegExp.prototype.exec), Lt = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
564
+ Dt = /\\(\\)?/g, $t = /* @__PURE__ */ s(function(m) {
565
+ var b = ie(m, 0, 1), v = ie(m, -1);
566
+ if (b === "%" && v !== "%")
567
+ throw new i("invalid intrinsic syntax, expected closing `%`");
568
+ if (v === "%" && b !== "%")
569
+ throw new i("invalid intrinsic syntax, expected opening `%`");
570
+ var S = [];
571
+ return Ge(m, Lt, function(O, F, T, ae) {
572
+ S[S.length] = T ? Ge(ae, Dt, "$1") : F || O;
573
+ }), S;
574
+ }, "stringToPath3"), Ft = /* @__PURE__ */ s(function(m, b) {
575
+ var v = m, S;
576
+ if (se(Ue, v) && (S = Ue[v], v = "%" + S[0] + "%"), se(R, v)) {
577
+ var O = R[v];
578
+ if (O === $ && (O = Nt(v)), typeof O > "u" && !b)
579
+ throw new l("intrinsic " + m + " exists, but is not available. Please file an issue!");
462
580
  return {
463
- alias: b,
464
- name: m,
581
+ alias: S,
582
+ name: v,
465
583
  value: O
466
584
  };
467
585
  }
468
- throw new n("intrinsic " + g + " does not exist!");
586
+ throw new i("intrinsic " + m + " does not exist!");
469
587
  }, "getBaseIntrinsic2");
470
- e.exports = /* @__PURE__ */ o(function(g, E) {
471
- if (typeof g != "string" || g.length === 0)
472
- throw new s("intrinsic name must be a non-empty string");
473
- if (arguments.length > 1 && typeof E != "boolean")
474
- throw new s('"allowMissing" argument must be a boolean');
475
- if (Oe(/^%?[^%]*%?$/, g) === null)
476
- throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
477
- var m = Ie(g), b = m.length > 0 ? m[0] : "", O = xe("%" + b + "%", E), L = O.name, S = O.value, Y = !1, te = O.alias;
478
- te && (b = te[0], D(m, j([0, 1], te)));
479
- for (var X = 1, W = !0; X < m.length; X += 1) {
480
- var P = m[X], Z = K(P, 0, 1), Q = K(P, -1);
481
- if ((Z === '"' || Z === "'" || Z === "`" || Q === '"' || Q === "'" || Q === "`") && Z !== Q)
482
- throw new n("property names with quotes must have matching quotes");
483
- if ((P === "constructor" || !W) && (Y = !0), b += "." + P, L = "%" + b + "%", R(v, L))
484
- S = v[L];
485
- else if (S != null) {
486
- if (!(P in S)) {
487
- if (!E)
488
- throw new s("base intrinsic for " + g + " exists, but the property is not available.");
588
+ e.exports = /* @__PURE__ */ s(function(m, b) {
589
+ if (typeof m != "string" || m.length === 0)
590
+ throw new l("intrinsic name must be a non-empty string");
591
+ if (arguments.length > 1 && typeof b != "boolean")
592
+ throw new l('"allowMissing" argument must be a boolean');
593
+ if (jt(/^%?[^%]*%?$/, m) === null)
594
+ throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
595
+ var v = $t(m), S = v.length > 0 ? v[0] : "", O = Ft("%" + S + "%", b), F = O.name, T = O.value, ae = !1, me = O.alias;
596
+ me && (S = me[0], Rt(v, It([0, 1], me)));
597
+ for (var pe = 1, Q = !0; pe < v.length; pe += 1) {
598
+ var N = v[pe], ce = ie(N, 0, 1), le = ie(N, -1);
599
+ if ((ce === '"' || ce === "'" || ce === "`" || le === '"' || le === "'" || le === "`") && ce !== le)
600
+ throw new i("property names with quotes must have matching quotes");
601
+ if ((N === "constructor" || !Q) && (ae = !0), S += "." + N, F = "%" + S + "%", se(R, F))
602
+ T = R[F];
603
+ else if (T != null) {
604
+ if (!(N in T)) {
605
+ if (!b)
606
+ throw new l("base intrinsic for " + m + " exists, but the property is not available.");
489
607
  return;
490
608
  }
491
- if (c && X + 1 >= m.length) {
492
- var ee = c(S, P);
493
- W = !!ee, W && "get" in ee && !("originalValue" in ee.get) ? S = ee.get : S = S[P];
609
+ if (Y && pe + 1 >= v.length) {
610
+ var ue = Y(T, N);
611
+ Q = !!ue, Q && "get" in ue && !("originalValue" in ue.get) ? T = ue.get : T = T[N];
494
612
  } else
495
- W = R(S, P), S = S[P];
496
- W && !Y && (v[L] = S);
613
+ Q = se(T, N), T = T[N];
614
+ Q && !ae && (R[F] = T);
497
615
  }
498
616
  }
499
- return S;
617
+ return T;
500
618
  }, "GetIntrinsic");
501
619
  }
502
- }), require_call_bind = __commonJS({
503
- "node_modules/call-bind/index.js"(t, e) {
620
+ }), Ae = f({
621
+ "node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(t, e) {
504
622
  "use strict";
505
- var r = require_function_bind(), n = require_get_intrinsic(), a = n("%Function.prototype.apply%"), s = n("%Function.prototype.call%"),
506
- l = n("%Reflect.apply%", !0) || r.call(s, a), c = n("%Object.getOwnPropertyDescriptor%", !0), i = n("%Object.defineProperty%", !0), h = n(
507
- "%Math.max%");
508
- if (i)
509
- try {
510
- i({}, "a", { value: 1 });
511
- } catch {
512
- i = null;
513
- }
514
- e.exports = /* @__PURE__ */ o(function(y) {
515
- var d = l(r, s, arguments);
516
- if (c && i) {
517
- var v = c(d, "length");
518
- v.configurable && i(
519
- d,
520
- "length",
521
- { value: 1 + h(0, y.length - (arguments.length - 1)) }
522
- );
523
- }
524
- return d;
525
- }, "callBind");
526
- var p = /* @__PURE__ */ o(function() {
527
- return l(r, a, arguments);
528
- }, "applyBind2");
529
- i ? i(e.exports, "apply", { value: p }) : e.exports.apply = p;
530
- }
531
- }), require_callBound = __commonJS({
532
- "node_modules/call-bind/callBound.js"(t, e) {
533
- "use strict";
534
- var r = require_get_intrinsic(), n = require_call_bind(), a = n(r("String.prototype.indexOf"));
535
- e.exports = /* @__PURE__ */ o(function(l, c) {
536
- var i = r(l, !!c);
537
- return typeof i == "function" && a(l, ".prototype.") > -1 ? n(i) : i;
623
+ var r = br(), n = ot(), o = n([r("%String.prototype.indexOf%")]);
624
+ e.exports = /* @__PURE__ */ s(function(a, c) {
625
+ var i = (
626
+ /** @type {(this: unknown, ...args: unknown[]) => unknown} */
627
+ r(a, !!c)
628
+ );
629
+ return typeof i == "function" && o(a, ".prototype.") > -1 ? n(
630
+ /** @type {const} */
631
+ [i]
632
+ ) : i;
538
633
  }, "callBoundIntrinsic");
539
634
  }
540
- }), require_shams2 = __commonJS({
541
- "node_modules/has-tostringtag/shams.js"(t, e) {
635
+ }), Sr = f({
636
+ "node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(t, e) {
542
637
  "use strict";
543
- var r = require_shams();
544
- e.exports = /* @__PURE__ */ o(function() {
638
+ var r = Ze();
639
+ e.exports = /* @__PURE__ */ s(function() {
545
640
  return r() && !!Symbol.toStringTag;
546
641
  }, "hasToStringTagShams");
547
642
  }
548
- }), require_is_regex = __commonJS({
549
- "node_modules/is-regex/index.js"(t, e) {
643
+ }), it = f({
644
+ "node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js"(t, e) {
550
645
  "use strict";
551
- var r = require_callBound(), n = require_shams2()(), a, s, l, c;
552
- n && (a = r("Object.prototype.hasOwnProperty"), s = r("RegExp.prototype.exec"), l = {}, i = /* @__PURE__ */ o(function() {
553
- throw l;
554
- }, "throwRegexMarker"), c = {
555
- toString: i,
556
- valueOf: i
557
- }, typeof Symbol.toPrimitive == "symbol" && (c[Symbol.toPrimitive] = i));
558
- var i, h = r("Object.prototype.toString"), p = Object.getOwnPropertyDescriptor, u = "[object RegExp]";
559
- e.exports = /* @__PURE__ */ o(n ? function(d) {
560
- if (!d || typeof d != "object")
646
+ var r = Ae(), n = Sr()(), o = st(), p = Se(), a;
647
+ n ? (c = r("RegExp.prototype.exec"), i = {}, l = /* @__PURE__ */ s(function() {
648
+ throw i;
649
+ }, "throwRegexMarker"), d = {
650
+ toString: l,
651
+ valueOf: l
652
+ }, typeof Symbol.toPrimitive == "symbol" && (d[Symbol.toPrimitive] = l), a = /* @__PURE__ */ s(function(h) {
653
+ if (!h || typeof h != "object")
561
654
  return !1;
562
- var v = p(d, "lastIndex"), w = v && a(v, "value");
655
+ var C = (
656
+ /** @type {NonNullable<typeof gOPD>} */
657
+ p(
658
+ /** @type {{ lastIndex?: unknown }} */
659
+ h,
660
+ "lastIndex"
661
+ )
662
+ ), w = C && o(C, "value");
563
663
  if (!w)
564
664
  return !1;
565
665
  try {
566
- s(d, c);
567
- } catch (T) {
568
- return T === l;
666
+ c(
667
+ h,
668
+ /** @type {string} */
669
+ /** @type {unknown} */
670
+ d
671
+ );
672
+ } catch (A) {
673
+ return A === i;
569
674
  }
570
- } : function(d) {
571
- return !d || typeof d != "object" && typeof d != "function" ? !1 : h(d) === u;
572
- }, "isRegex");
675
+ }, "isRegex")) : (u = r("Object.prototype.toString"), y = "[object RegExp]", a = /* @__PURE__ */ s(function(h) {
676
+ return !h || typeof h != "object" && typeof h != "function" ? !1 : u(h) === y;
677
+ }, "isRegex"));
678
+ var c, i, l, d, u, y;
679
+ e.exports = a;
573
680
  }
574
- }), require_is_function = __commonJS({
575
- "node_modules/is-function/index.js"(t, e) {
681
+ }), Tr = f({
682
+ "node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js"(t, e) {
576
683
  e.exports = n;
577
684
  var r = Object.prototype.toString;
578
- function n(a) {
579
- if (!a)
685
+ function n(o) {
686
+ if (!o)
580
687
  return !1;
581
- var s = r.call(a);
582
- return s === "[object Function]" || typeof a == "function" && s !== "[object RegExp]" || typeof window < "u" && (a === window.setTimeout ||
583
- a === window.alert || a === window.confirm || a === window.prompt);
688
+ var p = r.call(o);
689
+ return p === "[object Function]" || typeof o == "function" && p !== "[object RegExp]" || typeof window < "u" && // IE8 and below
690
+ (o === window.setTimeout || o === window.alert || o === window.confirm || o === window.prompt);
584
691
  }
585
- o(n, "isFunction3");
692
+ s(n, "isFunction3");
586
693
  }
587
- }), require_is_symbol = __commonJS({
588
- "node_modules/is-symbol/index.js"(t, e) {
694
+ }), Ar = f({
695
+ "node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js"(t, e) {
589
696
  "use strict";
590
- var r = Object.prototype.toString, n = require_has_symbols()();
591
- n ? (a = Symbol.prototype.toString, s = /^Symbol\(.*\)$/, l = /* @__PURE__ */ o(function(i) {
592
- return typeof i.valueOf() != "symbol" ? !1 : s.test(a.call(i));
593
- }, "isRealSymbolObject"), e.exports = /* @__PURE__ */ o(function(i) {
594
- if (typeof i == "symbol")
697
+ var r = Ae(), n = it(), o = r("RegExp.prototype.exec"), p = be();
698
+ e.exports = /* @__PURE__ */ s(function(c) {
699
+ if (!n(c))
700
+ throw new p("`regex` must be a RegExp");
701
+ return /* @__PURE__ */ s(function(l) {
702
+ return o(c, l) !== null;
703
+ }, "test");
704
+ }, "regexTester");
705
+ }
706
+ }), xr = f({
707
+ "node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js"(t, e) {
708
+ "use strict";
709
+ var r = Ae(), n = r("Object.prototype.toString"), o = et()(), p = Ar();
710
+ o ? (a = r("Symbol.prototype.toString"), c = p(/^Symbol\(.*\)$/), i = /* @__PURE__ */ s(function(d) {
711
+ return typeof d.valueOf() != "symbol" ? !1 : c(a(d));
712
+ }, "isRealSymbolObject"), e.exports = /* @__PURE__ */ s(function(d) {
713
+ if (typeof d == "symbol")
595
714
  return !0;
596
- if (r.call(i) !== "[object Symbol]")
715
+ if (!d || typeof d != "object" || n(d) !== "[object Symbol]")
597
716
  return !1;
598
717
  try {
599
- return l(i);
718
+ return i(d);
600
719
  } catch {
601
720
  return !1;
602
721
  }
603
- }, "isSymbol3")) : e.exports = /* @__PURE__ */ o(function(i) {
722
+ }, "isSymbol3")) : e.exports = /* @__PURE__ */ s(function(d) {
604
723
  return !1;
605
724
  }, "isSymbol3");
606
- var a, s, l;
725
+ var a, c, i;
607
726
  }
608
- }), src_exports = {};
609
- __export(src_exports, {
610
- isJSON: /* @__PURE__ */ o(() => isJSON, "isJSON"),
611
- parse: /* @__PURE__ */ o(() => parse, "parse"),
612
- replacer: /* @__PURE__ */ o(() => replacer, "replacer"),
613
- reviver: /* @__PURE__ */ o(() => reviver2, "reviver"),
614
- stringify: /* @__PURE__ */ o(() => stringify, "stringify")
727
+ }), at = {};
728
+ Qt(at, {
729
+ isJSON: /* @__PURE__ */ s(() => yt, "isJSON"),
730
+ parse: /* @__PURE__ */ s(() => Zo, "parse"),
731
+ replacer: /* @__PURE__ */ s(() => gt, "replacer"),
732
+ reviver: /* @__PURE__ */ s(() => mt, "reviver"),
733
+ stringify: /* @__PURE__ */ s(() => Xo, "stringify")
615
734
  });
616
- module.exports = __toCommonJS(src_exports);
617
- var import_is_regex = __toESM(require_is_regex()), import_is_function = __toESM(require_is_function()), import_is_symbol = __toESM(require_is_symbol());
618
- function isObject(t) {
735
+ Et.exports = Zt(at);
736
+ var wr = _e(it()), Pr = _e(Tr()), Or = _e(xr());
737
+ function Cr(t) {
619
738
  return t != null && typeof t == "object" && Array.isArray(t) === !1;
620
739
  }
621
- o(isObject, "isObject");
622
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global, freeGlobal_default = freeGlobal, freeSelf = typeof self ==
623
- "object" && self && self.Object === Object && self, root2 = freeGlobal_default || freeSelf || Function("return this")(), root_default = root2,
624
- Symbol2 = root_default.Symbol, Symbol_default = Symbol2, objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, nativeObjectToString = objectProto.
625
- toString, symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
626
- function getRawTag(t) {
627
- var e = hasOwnProperty.call(t, symToStringTag), r = t[symToStringTag];
740
+ s(Cr, "isObject");
741
+ var Nr = typeof global == "object" && global && global.Object === Object && global, Ir = Nr, Rr = typeof self == "object" && self && self.
742
+ Object === Object && self, jr = Ir || Rr || Function("return this")(), xe = jr, Lr = xe.Symbol, G = Lr, pt = Object.prototype, Dr = pt.hasOwnProperty,
743
+ $r = pt.toString, re = G ? G.toStringTag : void 0;
744
+ function Fr(t) {
745
+ var e = Dr.call(t, re), r = t[re];
628
746
  try {
629
- t[symToStringTag] = void 0;
747
+ t[re] = void 0;
630
748
  var n = !0;
631
749
  } catch {
632
750
  }
633
- var a = nativeObjectToString.call(t);
634
- return n && (e ? t[symToStringTag] = r : delete t[symToStringTag]), a;
635
- }
636
- o(getRawTag, "getRawTag");
637
- var getRawTag_default = getRawTag, objectProto2 = Object.prototype, nativeObjectToString2 = objectProto2.toString;
638
- function objectToString(t) {
639
- return nativeObjectToString2.call(t);
640
- }
641
- o(objectToString, "objectToString");
642
- var objectToString_default = objectToString, nullTag = "[object Null]", undefinedTag = "[object Undefined]", symToStringTag2 = Symbol_default ?
643
- Symbol_default.toStringTag : void 0;
644
- function baseGetTag(t) {
645
- return t == null ? t === void 0 ? undefinedTag : nullTag : symToStringTag2 && symToStringTag2 in Object(t) ? getRawTag_default(t) : objectToString_default(
646
- t);
647
- }
648
- o(baseGetTag, "baseGetTag");
649
- var baseGetTag_default = baseGetTag;
650
- function isObjectLike(t) {
751
+ var o = $r.call(t);
752
+ return n && (e ? t[re] = r : delete t[re]), o;
753
+ }
754
+ s(Fr, "getRawTag");
755
+ var Mr = Fr, Ur = Object.prototype, Gr = Ur.toString;
756
+ function kr(t) {
757
+ return Gr.call(t);
758
+ }
759
+ s(kr, "objectToString");
760
+ var Wr = kr, qr = "[object Null]", Br = "[object Undefined]", He = G ? G.toStringTag : void 0;
761
+ function Hr(t) {
762
+ return t == null ? t === void 0 ? Br : qr : He && He in Object(t) ? Mr(t) : Wr(t);
763
+ }
764
+ s(Hr, "baseGetTag");
765
+ var ct = Hr;
766
+ function Vr(t) {
651
767
  return t != null && typeof t == "object";
652
768
  }
653
- o(isObjectLike, "isObjectLike");
654
- var isObjectLike_default = isObjectLike, symbolTag = "[object Symbol]";
655
- function isSymbol(t) {
656
- return typeof t == "symbol" || isObjectLike_default(t) && baseGetTag_default(t) == symbolTag;
657
- }
658
- o(isSymbol, "isSymbol");
659
- var isSymbol_default = isSymbol;
660
- function arrayMap(t, e) {
661
- for (var r = -1, n = t == null ? 0 : t.length, a = Array(n); ++r < n; )
662
- a[r] = e(t[r], r, t);
663
- return a;
664
- }
665
- o(arrayMap, "arrayMap");
666
- var arrayMap_default = arrayMap, isArray = Array.isArray, isArray_default = isArray, INFINITY = 1 / 0, symbolProto = Symbol_default ? Symbol_default.
667
- prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
668
- function baseToString(t) {
769
+ s(Vr, "isObjectLike");
770
+ var Jr = Vr, zr = "[object Symbol]";
771
+ function Yr(t) {
772
+ return typeof t == "symbol" || Jr(t) && ct(t) == zr;
773
+ }
774
+ s(Yr, "isSymbol");
775
+ var we = Yr;
776
+ function Kr(t, e) {
777
+ for (var r = -1, n = t == null ? 0 : t.length, o = Array(n); ++r < n; )
778
+ o[r] = e(t[r], r, t);
779
+ return o;
780
+ }
781
+ s(Kr, "arrayMap");
782
+ var Xr = Kr, Qr = Array.isArray, Pe = Qr, Zr = 1 / 0, Ve = G ? G.prototype : void 0, Je = Ve ? Ve.toString : void 0;
783
+ function lt(t) {
669
784
  if (typeof t == "string")
670
785
  return t;
671
- if (isArray_default(t))
672
- return arrayMap_default(t, baseToString) + "";
673
- if (isSymbol_default(t))
674
- return symbolToString ? symbolToString.call(t) : "";
786
+ if (Pe(t))
787
+ return Xr(t, lt) + "";
788
+ if (we(t))
789
+ return Je ? Je.call(t) : "";
675
790
  var e = t + "";
676
- return e == "0" && 1 / t == -INFINITY ? "-0" : e;
791
+ return e == "0" && 1 / t == -Zr ? "-0" : e;
677
792
  }
678
- o(baseToString, "baseToString");
679
- var baseToString_default = baseToString;
680
- function isObject2(t) {
793
+ s(lt, "baseToString");
794
+ var en = lt;
795
+ function tn(t) {
681
796
  var e = typeof t;
682
797
  return t != null && (e == "object" || e == "function");
683
798
  }
684
- o(isObject2, "isObject2");
685
- var isObject_default = isObject2, asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]",
686
- proxyTag = "[object Proxy]";
687
- function isFunction(t) {
688
- if (!isObject_default(t))
799
+ s(tn, "isObject2");
800
+ var ut = tn, rn = "[object AsyncFunction]", nn = "[object Function]", on = "[object GeneratorFunction]", sn = "[object Proxy]";
801
+ function an(t) {
802
+ if (!ut(t))
689
803
  return !1;
690
- var e = baseGetTag_default(t);
691
- return e == funcTag || e == genTag || e == asyncTag || e == proxyTag;
804
+ var e = ct(t);
805
+ return e == nn || e == on || e == rn || e == sn;
692
806
  }
693
- o(isFunction, "isFunction");
694
- var isFunction_default = isFunction, coreJsData = root_default["__core-js_shared__"], coreJsData_default = coreJsData, maskSrcKey = function() {
695
- var t = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
807
+ s(an, "isFunction");
808
+ var pn = an, cn = xe["__core-js_shared__"], Ee = cn, ze = function() {
809
+ var t = /[^.]+$/.exec(Ee && Ee.keys && Ee.keys.IE_PROTO || "");
696
810
  return t ? "Symbol(src)_1." + t : "";
697
811
  }();
698
- function isMasked(t) {
699
- return !!maskSrcKey && maskSrcKey in t;
812
+ function ln(t) {
813
+ return !!ze && ze in t;
700
814
  }
701
- o(isMasked, "isMasked");
702
- var isMasked_default = isMasked, funcProto = Function.prototype, funcToString = funcProto.toString;
703
- function toSource(t) {
815
+ s(ln, "isMasked");
816
+ var un = ln, fn = Function.prototype, dn = fn.toString;
817
+ function yn(t) {
704
818
  if (t != null) {
705
819
  try {
706
- return funcToString.call(t);
820
+ return dn.call(t);
707
821
  } catch {
708
822
  }
709
823
  try {
@@ -713,264 +827,262 @@ tion]";
713
827
  }
714
828
  return "";
715
829
  }
716
- o(toSource, "toSource");
717
- var toSource_default = toSource, reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reIsHostCtor = /^\[object .+?Constructor\]$/, funcProto2 = Function.
718
- prototype, objectProto3 = Object.prototype, funcToString2 = funcProto2.toString, hasOwnProperty2 = objectProto3.hasOwnProperty, reIsNative = RegExp(
719
- "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
720
- "$1.*?") + "$"
830
+ s(yn, "toSource");
831
+ var hn = yn, gn = /[\\^$.*+?()[\]{}|]/g, mn = /^\[object .+?Constructor\]$/, vn = Function.prototype, En = Object.prototype, _n = vn.toString,
832
+ bn = En.hasOwnProperty, Sn = RegExp(
833
+ "^" + _n.call(bn).replace(gn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
721
834
  );
722
- function baseIsNative(t) {
723
- if (!isObject_default(t) || isMasked_default(t))
835
+ function Tn(t) {
836
+ if (!ut(t) || un(t))
724
837
  return !1;
725
- var e = isFunction_default(t) ? reIsNative : reIsHostCtor;
726
- return e.test(toSource_default(t));
838
+ var e = pn(t) ? Sn : mn;
839
+ return e.test(hn(t));
727
840
  }
728
- o(baseIsNative, "baseIsNative");
729
- var baseIsNative_default = baseIsNative;
730
- function getValue(t, e) {
841
+ s(Tn, "baseIsNative");
842
+ var An = Tn;
843
+ function xn(t, e) {
731
844
  return t?.[e];
732
845
  }
733
- o(getValue, "getValue");
734
- var getValue_default = getValue;
735
- function getNative(t, e) {
736
- var r = getValue_default(t, e);
737
- return baseIsNative_default(r) ? r : void 0;
846
+ s(xn, "getValue");
847
+ var wn = xn;
848
+ function Pn(t, e) {
849
+ var r = wn(t, e);
850
+ return An(r) ? r : void 0;
738
851
  }
739
- o(getNative, "getNative");
740
- var getNative_default = getNative;
741
- function eq(t, e) {
852
+ s(Pn, "getNative");
853
+ var ft = Pn;
854
+ function On(t, e) {
742
855
  return t === e || t !== t && e !== e;
743
856
  }
744
- o(eq, "eq");
745
- var eq_default = eq, reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
746
- function isKey(t, e) {
747
- if (isArray_default(t))
857
+ s(On, "eq");
858
+ var Cn = On, Nn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, In = /^\w*$/;
859
+ function Rn(t, e) {
860
+ if (Pe(t))
748
861
  return !1;
749
862
  var r = typeof t;
750
- return r == "number" || r == "symbol" || r == "boolean" || t == null || isSymbol_default(t) ? !0 : reIsPlainProp.test(t) || !reIsDeepProp.
751
- test(t) || e != null && t in Object(e);
863
+ return r == "number" || r == "symbol" || r == "boolean" || t == null || we(t) ? !0 : In.test(t) || !Nn.test(t) || e != null && t in Object(
864
+ e);
752
865
  }
753
- o(isKey, "isKey");
754
- var isKey_default = isKey, nativeCreate = getNative_default(Object, "create"), nativeCreate_default = nativeCreate;
755
- function hashClear() {
756
- this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {}, this.size = 0;
866
+ s(Rn, "isKey");
867
+ var jn = Rn, Ln = ft(Object, "create"), ne = Ln;
868
+ function Dn() {
869
+ this.__data__ = ne ? ne(null) : {}, this.size = 0;
757
870
  }
758
- o(hashClear, "hashClear");
759
- var hashClear_default = hashClear;
760
- function hashDelete(t) {
871
+ s(Dn, "hashClear");
872
+ var $n = Dn;
873
+ function Fn(t) {
761
874
  var e = this.has(t) && delete this.__data__[t];
762
875
  return this.size -= e ? 1 : 0, e;
763
876
  }
764
- o(hashDelete, "hashDelete");
765
- var hashDelete_default = hashDelete, HASH_UNDEFINED = "__lodash_hash_undefined__", objectProto4 = Object.prototype, hasOwnProperty3 = objectProto4.
766
- hasOwnProperty;
767
- function hashGet(t) {
877
+ s(Fn, "hashDelete");
878
+ var Mn = Fn, Un = "__lodash_hash_undefined__", Gn = Object.prototype, kn = Gn.hasOwnProperty;
879
+ function Wn(t) {
768
880
  var e = this.__data__;
769
- if (nativeCreate_default) {
881
+ if (ne) {
770
882
  var r = e[t];
771
- return r === HASH_UNDEFINED ? void 0 : r;
883
+ return r === Un ? void 0 : r;
772
884
  }
773
- return hasOwnProperty3.call(e, t) ? e[t] : void 0;
885
+ return kn.call(e, t) ? e[t] : void 0;
774
886
  }
775
- o(hashGet, "hashGet");
776
- var hashGet_default = hashGet, objectProto5 = Object.prototype, hasOwnProperty4 = objectProto5.hasOwnProperty;
777
- function hashHas(t) {
887
+ s(Wn, "hashGet");
888
+ var qn = Wn, Bn = Object.prototype, Hn = Bn.hasOwnProperty;
889
+ function Vn(t) {
778
890
  var e = this.__data__;
779
- return nativeCreate_default ? e[t] !== void 0 : hasOwnProperty4.call(e, t);
891
+ return ne ? e[t] !== void 0 : Hn.call(e, t);
780
892
  }
781
- o(hashHas, "hashHas");
782
- var hashHas_default = hashHas, HASH_UNDEFINED2 = "__lodash_hash_undefined__";
783
- function hashSet(t, e) {
893
+ s(Vn, "hashHas");
894
+ var Jn = Vn, zn = "__lodash_hash_undefined__";
895
+ function Yn(t, e) {
784
896
  var r = this.__data__;
785
- return this.size += this.has(t) ? 0 : 1, r[t] = nativeCreate_default && e === void 0 ? HASH_UNDEFINED2 : e, this;
897
+ return this.size += this.has(t) ? 0 : 1, r[t] = ne && e === void 0 ? zn : e, this;
786
898
  }
787
- o(hashSet, "hashSet");
788
- var hashSet_default = hashSet;
789
- function Hash(t) {
899
+ s(Yn, "hashSet");
900
+ var Kn = Yn;
901
+ function k(t) {
790
902
  var e = -1, r = t == null ? 0 : t.length;
791
903
  for (this.clear(); ++e < r; ) {
792
904
  var n = t[e];
793
905
  this.set(n[0], n[1]);
794
906
  }
795
907
  }
796
- o(Hash, "Hash");
797
- Hash.prototype.clear = hashClear_default;
798
- Hash.prototype.delete = hashDelete_default;
799
- Hash.prototype.get = hashGet_default;
800
- Hash.prototype.has = hashHas_default;
801
- Hash.prototype.set = hashSet_default;
802
- var Hash_default = Hash;
803
- function listCacheClear() {
908
+ s(k, "Hash");
909
+ k.prototype.clear = $n;
910
+ k.prototype.delete = Mn;
911
+ k.prototype.get = qn;
912
+ k.prototype.has = Jn;
913
+ k.prototype.set = Kn;
914
+ var Ye = k;
915
+ function Xn() {
804
916
  this.__data__ = [], this.size = 0;
805
917
  }
806
- o(listCacheClear, "listCacheClear");
807
- var listCacheClear_default = listCacheClear;
808
- function assocIndexOf(t, e) {
918
+ s(Xn, "listCacheClear");
919
+ var Qn = Xn;
920
+ function Zn(t, e) {
809
921
  for (var r = t.length; r--; )
810
- if (eq_default(t[r][0], e))
922
+ if (Cn(t[r][0], e))
811
923
  return r;
812
924
  return -1;
813
925
  }
814
- o(assocIndexOf, "assocIndexOf");
815
- var assocIndexOf_default = assocIndexOf, arrayProto = Array.prototype, splice = arrayProto.splice;
816
- function listCacheDelete(t) {
817
- var e = this.__data__, r = assocIndexOf_default(e, t);
926
+ s(Zn, "assocIndexOf");
927
+ var ye = Zn, eo = Array.prototype, to = eo.splice;
928
+ function ro(t) {
929
+ var e = this.__data__, r = ye(e, t);
818
930
  if (r < 0)
819
931
  return !1;
820
932
  var n = e.length - 1;
821
- return r == n ? e.pop() : splice.call(e, r, 1), --this.size, !0;
933
+ return r == n ? e.pop() : to.call(e, r, 1), --this.size, !0;
822
934
  }
823
- o(listCacheDelete, "listCacheDelete");
824
- var listCacheDelete_default = listCacheDelete;
825
- function listCacheGet(t) {
826
- var e = this.__data__, r = assocIndexOf_default(e, t);
935
+ s(ro, "listCacheDelete");
936
+ var no = ro;
937
+ function oo(t) {
938
+ var e = this.__data__, r = ye(e, t);
827
939
  return r < 0 ? void 0 : e[r][1];
828
940
  }
829
- o(listCacheGet, "listCacheGet");
830
- var listCacheGet_default = listCacheGet;
831
- function listCacheHas(t) {
832
- return assocIndexOf_default(this.__data__, t) > -1;
941
+ s(oo, "listCacheGet");
942
+ var so = oo;
943
+ function io(t) {
944
+ return ye(this.__data__, t) > -1;
833
945
  }
834
- o(listCacheHas, "listCacheHas");
835
- var listCacheHas_default = listCacheHas;
836
- function listCacheSet(t, e) {
837
- var r = this.__data__, n = assocIndexOf_default(r, t);
946
+ s(io, "listCacheHas");
947
+ var ao = io;
948
+ function po(t, e) {
949
+ var r = this.__data__, n = ye(r, t);
838
950
  return n < 0 ? (++this.size, r.push([t, e])) : r[n][1] = e, this;
839
951
  }
840
- o(listCacheSet, "listCacheSet");
841
- var listCacheSet_default = listCacheSet;
842
- function ListCache(t) {
952
+ s(po, "listCacheSet");
953
+ var co = po;
954
+ function W(t) {
843
955
  var e = -1, r = t == null ? 0 : t.length;
844
956
  for (this.clear(); ++e < r; ) {
845
957
  var n = t[e];
846
958
  this.set(n[0], n[1]);
847
959
  }
848
960
  }
849
- o(ListCache, "ListCache");
850
- ListCache.prototype.clear = listCacheClear_default;
851
- ListCache.prototype.delete = listCacheDelete_default;
852
- ListCache.prototype.get = listCacheGet_default;
853
- ListCache.prototype.has = listCacheHas_default;
854
- ListCache.prototype.set = listCacheSet_default;
855
- var ListCache_default = ListCache, Map2 = getNative_default(root_default, "Map"), Map_default = Map2;
856
- function mapCacheClear() {
961
+ s(W, "ListCache");
962
+ W.prototype.clear = Qn;
963
+ W.prototype.delete = no;
964
+ W.prototype.get = so;
965
+ W.prototype.has = ao;
966
+ W.prototype.set = co;
967
+ var lo = W, uo = ft(xe, "Map"), fo = uo;
968
+ function yo() {
857
969
  this.size = 0, this.__data__ = {
858
- hash: new Hash_default(),
859
- map: new (Map_default || ListCache_default)(),
860
- string: new Hash_default()
970
+ hash: new Ye(),
971
+ map: new (fo || lo)(),
972
+ string: new Ye()
861
973
  };
862
974
  }
863
- o(mapCacheClear, "mapCacheClear");
864
- var mapCacheClear_default = mapCacheClear;
865
- function isKeyable(t) {
975
+ s(yo, "mapCacheClear");
976
+ var ho = yo;
977
+ function go(t) {
866
978
  var e = typeof t;
867
979
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
868
980
  }
869
- o(isKeyable, "isKeyable");
870
- var isKeyable_default = isKeyable;
871
- function getMapData(t, e) {
981
+ s(go, "isKeyable");
982
+ var mo = go;
983
+ function vo(t, e) {
872
984
  var r = t.__data__;
873
- return isKeyable_default(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
985
+ return mo(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
874
986
  }
875
- o(getMapData, "getMapData");
876
- var getMapData_default = getMapData;
877
- function mapCacheDelete(t) {
878
- var e = getMapData_default(this, t).delete(t);
987
+ s(vo, "getMapData");
988
+ var he = vo;
989
+ function Eo(t) {
990
+ var e = he(this, t).delete(t);
879
991
  return this.size -= e ? 1 : 0, e;
880
992
  }
881
- o(mapCacheDelete, "mapCacheDelete");
882
- var mapCacheDelete_default = mapCacheDelete;
883
- function mapCacheGet(t) {
884
- return getMapData_default(this, t).get(t);
993
+ s(Eo, "mapCacheDelete");
994
+ var _o = Eo;
995
+ function bo(t) {
996
+ return he(this, t).get(t);
885
997
  }
886
- o(mapCacheGet, "mapCacheGet");
887
- var mapCacheGet_default = mapCacheGet;
888
- function mapCacheHas(t) {
889
- return getMapData_default(this, t).has(t);
998
+ s(bo, "mapCacheGet");
999
+ var So = bo;
1000
+ function To(t) {
1001
+ return he(this, t).has(t);
890
1002
  }
891
- o(mapCacheHas, "mapCacheHas");
892
- var mapCacheHas_default = mapCacheHas;
893
- function mapCacheSet(t, e) {
894
- var r = getMapData_default(this, t), n = r.size;
1003
+ s(To, "mapCacheHas");
1004
+ var Ao = To;
1005
+ function xo(t, e) {
1006
+ var r = he(this, t), n = r.size;
895
1007
  return r.set(t, e), this.size += r.size == n ? 0 : 1, this;
896
1008
  }
897
- o(mapCacheSet, "mapCacheSet");
898
- var mapCacheSet_default = mapCacheSet;
899
- function MapCache(t) {
1009
+ s(xo, "mapCacheSet");
1010
+ var wo = xo;
1011
+ function q(t) {
900
1012
  var e = -1, r = t == null ? 0 : t.length;
901
1013
  for (this.clear(); ++e < r; ) {
902
1014
  var n = t[e];
903
1015
  this.set(n[0], n[1]);
904
1016
  }
905
1017
  }
906
- o(MapCache, "MapCache");
907
- MapCache.prototype.clear = mapCacheClear_default;
908
- MapCache.prototype.delete = mapCacheDelete_default;
909
- MapCache.prototype.get = mapCacheGet_default;
910
- MapCache.prototype.has = mapCacheHas_default;
911
- MapCache.prototype.set = mapCacheSet_default;
912
- var MapCache_default = MapCache, FUNC_ERROR_TEXT = "Expected a function";
913
- function memoize(t, e) {
1018
+ s(q, "MapCache");
1019
+ q.prototype.clear = ho;
1020
+ q.prototype.delete = _o;
1021
+ q.prototype.get = So;
1022
+ q.prototype.has = Ao;
1023
+ q.prototype.set = wo;
1024
+ var dt = q, Po = "Expected a function";
1025
+ function Oe(t, e) {
914
1026
  if (typeof t != "function" || e != null && typeof e != "function")
915
- throw new TypeError(FUNC_ERROR_TEXT);
916
- var r = /* @__PURE__ */ o(function() {
917
- var n = arguments, a = e ? e.apply(this, n) : n[0], s = r.cache;
918
- if (s.has(a))
919
- return s.get(a);
920
- var l = t.apply(this, n);
921
- return r.cache = s.set(a, l) || s, l;
1027
+ throw new TypeError(Po);
1028
+ var r = /* @__PURE__ */ s(function() {
1029
+ var n = arguments, o = e ? e.apply(this, n) : n[0], p = r.cache;
1030
+ if (p.has(o))
1031
+ return p.get(o);
1032
+ var a = t.apply(this, n);
1033
+ return r.cache = p.set(o, a) || p, a;
922
1034
  }, "memoized");
923
- return r.cache = new (memoize.Cache || MapCache_default)(), r;
924
- }
925
- o(memoize, "memoize");
926
- memoize.Cache = MapCache_default;
927
- var memoize_default = memoize, MAX_MEMOIZE_SIZE = 500;
928
- function memoizeCapped(t) {
929
- var e = memoize_default(t, function(n) {
930
- return r.size === MAX_MEMOIZE_SIZE && r.clear(), n;
1035
+ return r.cache = new (Oe.Cache || dt)(), r;
1036
+ }
1037
+ s(Oe, "memoize");
1038
+ Oe.Cache = dt;
1039
+ var Oo = Oe, Co = 500;
1040
+ function No(t) {
1041
+ var e = Oo(t, function(n) {
1042
+ return r.size === Co && r.clear(), n;
931
1043
  }), r = e.cache;
932
1044
  return e;
933
1045
  }
934
- o(memoizeCapped, "memoizeCapped");
935
- var memoizeCapped_default = memoizeCapped, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
936
- reEscapeChar = /\\(\\)?/g, stringToPath = memoizeCapped_default(function(t) {
1046
+ s(No, "memoizeCapped");
1047
+ var Io = No, Ro = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, jo = /\\(\\)?/g, Lo = Io(
1048
+ function(t) {
937
1049
  var e = [];
938
- return t.charCodeAt(0) === 46 && e.push(""), t.replace(rePropName, function(r, n, a, s) {
939
- e.push(a ? s.replace(reEscapeChar, "$1") : n || r);
1050
+ return t.charCodeAt(0) === 46 && e.push(""), t.replace(Ro, function(r, n, o, p) {
1051
+ e.push(o ? p.replace(jo, "$1") : n || r);
940
1052
  }), e;
941
- }), stringToPath_default = stringToPath;
942
- function toString(t) {
943
- return t == null ? "" : baseToString_default(t);
944
- }
945
- o(toString, "toString");
946
- var toString_default = toString;
947
- function castPath(t, e) {
948
- return isArray_default(t) ? t : isKey_default(t, e) ? [t] : stringToPath_default(toString_default(t));
949
- }
950
- o(castPath, "castPath");
951
- var castPath_default = castPath, INFINITY2 = 1 / 0;
952
- function toKey(t) {
953
- if (typeof t == "string" || isSymbol_default(t))
1053
+ }), Do = Lo;
1054
+ function $o(t) {
1055
+ return t == null ? "" : en(t);
1056
+ }
1057
+ s($o, "toString");
1058
+ var Fo = $o;
1059
+ function Mo(t, e) {
1060
+ return Pe(t) ? t : jn(t, e) ? [t] : Do(Fo(t));
1061
+ }
1062
+ s(Mo, "castPath");
1063
+ var Uo = Mo, Go = 1 / 0;
1064
+ function ko(t) {
1065
+ if (typeof t == "string" || we(t))
954
1066
  return t;
955
1067
  var e = t + "";
956
- return e == "0" && 1 / t == -INFINITY2 ? "-0" : e;
1068
+ return e == "0" && 1 / t == -Go ? "-0" : e;
957
1069
  }
958
- o(toKey, "toKey");
959
- var toKey_default = toKey;
960
- function baseGet(t, e) {
961
- e = castPath_default(e, t);
1070
+ s(ko, "toKey");
1071
+ var Wo = ko;
1072
+ function qo(t, e) {
1073
+ e = Uo(e, t);
962
1074
  for (var r = 0, n = e.length; t != null && r < n; )
963
- t = t[toKey_default(e[r++])];
1075
+ t = t[Wo(e[r++])];
964
1076
  return r && r == n ? t : void 0;
965
1077
  }
966
- o(baseGet, "baseGet");
967
- var baseGet_default = baseGet;
968
- function get(t, e, r) {
969
- var n = t == null ? void 0 : baseGet_default(t, e);
1078
+ s(qo, "baseGet");
1079
+ var Bo = qo;
1080
+ function Ho(t, e, r) {
1081
+ var n = t == null ? void 0 : Bo(t, e);
970
1082
  return n === void 0 ? r : n;
971
1083
  }
972
- o(get, "get");
973
- var get_default = get, import_memoizerific = __toESM(Ee()), eventProperties = [
1084
+ s(Ho, "get");
1085
+ var Vo = Ho, Jo = [
974
1086
  "bubbles",
975
1087
  "cancelBubble",
976
1088
  "cancelable",
@@ -984,60 +1096,42 @@ tion]";
984
1096
  "target",
985
1097
  "timeStamp",
986
1098
  "type"
987
- ], customEventSpecificProperties = ["detail"];
988
- function extractEventHiddenProperties(t) {
989
- let e = eventProperties.filter((r) => t[r] !== void 0).reduce((r, n) => ({ ...r, [n]: t[n] }), {});
990
- return t instanceof CustomEvent && customEventSpecificProperties.filter((r) => t[r] !== void 0).forEach((r) => {
991
- e[r] = t[r];
992
- }), e;
1099
+ ], zo = ["detail"];
1100
+ function Yo(t) {
1101
+ let e = Jo.filter((r) => t[r] !== void 0).reduce((r, n) => (r[n] = t[n], r), {});
1102
+ if (t instanceof CustomEvent)
1103
+ for (let r of zo.filter(
1104
+ (n) => t[n] !== void 0
1105
+ ))
1106
+ e[r] = t[r];
1107
+ return e;
993
1108
  }
994
- o(extractEventHiddenProperties, "extractEventHiddenProperties");
995
- var isObject3 = isObject, removeCodeComments = /* @__PURE__ */ o((t) => {
996
- let e = null, r = !1, n = !1, a = !1, s = "";
997
- if (t.indexOf("//") >= 0 || t.indexOf("/*") >= 0)
998
- for (let l = 0; l < t.length; l += 1)
999
- !e && !r && !n && !a ? t[l] === '"' || t[l] === "'" || t[l] === "`" ? e = t[l] : t[l] === "/" && t[l + 1] === "*" ? r = !0 : t[l] ===
1000
- "/" && t[l + 1] === "/" ? n = !0 : t[l] === "/" && t[l + 1] !== "/" && (a = !0) : (e && (t[l] === e && t[l - 1] !== "\\" || t[l] ===
1001
- `
1002
- ` && e !== "`") && (e = null), a && (t[l] === "/" && t[l - 1] !== "\\" || t[l] === `
1003
- `) && (a = !1), r && t[l - 1] === "/" && t[l - 2] === "*" && (r = !1), n && t[l] === `
1004
- ` && (n = !1)), !r && !n && (s += t[l]);
1005
- else
1006
- s = t;
1007
- return s;
1008
- }, "removeCodeComments"), cleanCode = (0, import_memoizerific.default)(1e4)(
1009
- (t) => removeCodeComments(t).replace(/\n\s*/g, "").trim()
1010
- ), convertShorthandMethods = /* @__PURE__ */ o(function(e, r) {
1011
- let n = r.slice(0, r.indexOf("{")), a = r.slice(r.indexOf("{"));
1012
- if (n.includes("=>") || n.includes("function"))
1013
- return r;
1014
- let s = n;
1015
- return s = s.replace(e, "function"), s + a;
1016
- }, "convertShorthandMethods2"), dateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/, isJSON = /* @__PURE__ */ o((t) => t.match(
1017
- /^[\[\{\"\}].*[\]\}\"]$/), "isJSON");
1018
- function convertUnconventionalData(t) {
1019
- if (!isObject3(t))
1109
+ s(Yo, "extractEventHiddenProperties");
1110
+ var Ce = Cr, Ko = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/, yt = /* @__PURE__ */ s((t) => t.match(/^[\[\{\"\}].*[\]\}\"]$/), "is\
1111
+ JSON");
1112
+ function ht(t) {
1113
+ if (!Ce(t))
1020
1114
  return t;
1021
1115
  let e = t, r = !1;
1022
- return typeof Event < "u" && t instanceof Event && (e = extractEventHiddenProperties(e), r = !0), e = Object.keys(e).reduce((n, a) => {
1116
+ return typeof Event < "u" && t instanceof Event && (e = Yo(e), r = !0), e = Object.keys(e).reduce((n, o) => {
1023
1117
  try {
1024
- e[a] && e[a].toJSON, n[a] = e[a];
1118
+ e[o] && e[o].toJSON, n[o] = e[o];
1025
1119
  } catch {
1026
1120
  r = !0;
1027
1121
  }
1028
1122
  return n;
1029
1123
  }, {}), r ? e : t;
1030
1124
  }
1031
- o(convertUnconventionalData, "convertUnconventionalData");
1032
- var replacer = /* @__PURE__ */ o(function(e) {
1033
- let r, n, a, s;
1034
- return /* @__PURE__ */ o(function(c, i) {
1125
+ s(ht, "convertUnconventionalData");
1126
+ var gt = /* @__PURE__ */ s(function(e) {
1127
+ let r, n, o, p;
1128
+ return /* @__PURE__ */ s(function(c, i) {
1035
1129
  try {
1036
1130
  if (c === "")
1037
- return s = [], r = /* @__PURE__ */ new Map([[i, "[]"]]), n = /* @__PURE__ */ new Map(), a = [], i;
1038
- let h = n.get(this) || this;
1039
- for (; a.length && h !== a[0]; )
1040
- a.shift(), s.pop();
1131
+ return p = [], r = /* @__PURE__ */ new Map([[i, "[]"]]), n = /* @__PURE__ */ new Map(), o = [], i;
1132
+ let l = n.get(this) || this;
1133
+ for (; o.length && l !== o[0]; )
1134
+ o.shift(), p.pop();
1041
1135
  if (typeof i == "boolean")
1042
1136
  return i;
1043
1137
  if (i === void 0)
@@ -1045,36 +1139,31 @@ tion]";
1045
1139
  if (i === null)
1046
1140
  return null;
1047
1141
  if (typeof i == "number")
1048
- return i === -1 / 0 ? "_-Infinity_" : i === 1 / 0 ? "_Infinity_" : Number.isNaN(i) ? "_NaN_" : i;
1142
+ return i === Number.NEGATIVE_INFINITY ? "_-Infinity_" : i === Number.POSITIVE_INFINITY ? "_Infinity_" : Number.isNaN(i) ? "_NaN_" :
1143
+ i;
1049
1144
  if (typeof i == "bigint")
1050
1145
  return `_bigint_${i.toString()}`;
1051
1146
  if (typeof i == "string")
1052
- return dateFormat.test(i) ? e.allowDate ? `_date_${i}` : void 0 : i;
1053
- if ((0, import_is_regex.default)(i))
1147
+ return Ko.test(i) ? e.allowDate ? `_date_${i}` : void 0 : i;
1148
+ if ((0, wr.default)(i))
1054
1149
  return e.allowRegExp ? `_regexp_${i.flags}|${i.source}` : void 0;
1055
- if ((0, import_is_function.default)(i)) {
1056
- if (!e.allowFunction)
1057
- return;
1058
- let { name: u } = i, y = i.toString();
1059
- return y.match(
1060
- /(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/
1061
- ) ? `_function_${u}|${(() => {
1062
- }).toString()}` : `_function_${u}|${cleanCode(convertShorthandMethods(c, y))}`;
1063
- }
1064
- if ((0, import_is_symbol.default)(i)) {
1150
+ if ((0, Pr.default)(i))
1151
+ return;
1152
+ if ((0, Or.default)(i)) {
1065
1153
  if (!e.allowSymbol)
1066
1154
  return;
1067
1155
  let u = Symbol.keyFor(i);
1068
1156
  return u !== void 0 ? `_gsymbol_${u}` : `_symbol_${i.toString().slice(7, -1)}`;
1069
1157
  }
1070
- if (a.length >= e.maxDepth)
1158
+ if (o.length >= e.maxDepth)
1071
1159
  return Array.isArray(i) ? `[Array(${i.length})]` : "[Object]";
1072
1160
  if (i === this)
1073
- return `_duplicate_${JSON.stringify(s)}`;
1161
+ return `_duplicate_${JSON.stringify(p)}`;
1074
1162
  if (i instanceof Error && e.allowError)
1075
1163
  return {
1076
1164
  __isConvertedError__: !0,
1077
1165
  errorProperties: {
1166
+ // @ts-expect-error cause is not defined in the current tsconfig target(es2020)
1078
1167
  ...i.cause ? { cause: i.cause } : {},
1079
1168
  ...i,
1080
1169
  name: i.name,
@@ -1083,120 +1172,108 @@ tion]";
1083
1172
  "_constructor-name_": i.constructor.name
1084
1173
  }
1085
1174
  };
1086
- if (i.constructor && i.constructor.name && i.constructor.name !== "Object" && !Array.isArray(i) && !e.allowClass)
1087
- return;
1088
- let p = r.get(i);
1089
- if (!p) {
1090
- let u = Array.isArray(i) ? i : convertUnconventionalData(i);
1091
- if (i.constructor && i.constructor.name && i.constructor.name !== "Object" && !Array.isArray(i) && e.allowClass)
1092
- try {
1093
- Object.assign(u, { "_constructor-name_": i.constructor.name });
1094
- } catch {
1095
- }
1096
- return s.push(c), a.unshift(u), r.set(i, JSON.stringify(s)), i !== u && n.set(i, u), u;
1175
+ if (i?.constructor?.name && i.constructor.name !== "Object" && !Array.isArray(i)) {
1176
+ let u = r.get(i);
1177
+ if (!u) {
1178
+ let y = {
1179
+ __isClassInstance__: !0,
1180
+ __className__: i.constructor.name,
1181
+ ...Object.getOwnPropertyNames(i).reduce(
1182
+ (g, h) => {
1183
+ try {
1184
+ g[h] = i[h];
1185
+ } catch {
1186
+ }
1187
+ return g;
1188
+ },
1189
+ {}
1190
+ )
1191
+ };
1192
+ return p.push(c), o.unshift(y), r.set(i, JSON.stringify(p)), i !== y && n.set(i, y), y;
1193
+ }
1194
+ return `_duplicate_${u}`;
1195
+ }
1196
+ let d = r.get(i);
1197
+ if (!d) {
1198
+ let u = Array.isArray(i) ? i : ht(i);
1199
+ return p.push(c), o.unshift(u), r.set(i, JSON.stringify(p)), i !== u && n.set(i, u), u;
1097
1200
  }
1098
- return `_duplicate_${p}`;
1201
+ return `_duplicate_${d}`;
1099
1202
  } catch {
1100
1203
  return;
1101
1204
  }
1102
1205
  }, "replace");
1103
- }, "replacer2"), reviver2 = /* @__PURE__ */ o(function reviver(options) {
1104
- let refs = [], root;
1105
- return /* @__PURE__ */ o(function revive(key, value) {
1106
- if (key === "" && (root = value, refs.forEach(({ target: t, container: e, replacement: r }) => {
1107
- let n = isJSON(r) ? JSON.parse(r) : r.split(".");
1108
- n.length === 0 ? e[t] = root : e[t] = get_default(root, n);
1109
- })), key === "_constructor-name_")
1110
- return value;
1111
- if (isObject3(value) && value.__isConvertedError__) {
1112
- let { message: t, ...e } = value.errorProperties, r = new Error(t);
1113
- return Object.assign(r, e), r;
1114
- }
1115
- if (isObject3(value) && value["_constructor-name_"] && options.allowFunction) {
1116
- let t = value["_constructor-name_"];
1117
- if (t !== "Object") {
1118
- let e = new Function(`return function ${t.replace(/[^a-zA-Z0-9$_]+/g, "")}(){}`)();
1119
- Object.setPrototypeOf(value, new e());
1120
- }
1121
- return delete value["_constructor-name_"], value;
1122
- }
1123
- if (typeof value == "string" && value.startsWith("_function_") && options.allowFunction) {
1124
- let [, name, source] = value.match(/_function_([^|]*)\|(.*)/) || [], sourceSanitized = source.replace(/[(\(\))|\\| |\]|`]*$/, "");
1125
- if (!options.lazyEval)
1126
- return eval(`(${sourceSanitized})`);
1127
- let result = /* @__PURE__ */ o((...args) => {
1128
- let f = eval(`(${sourceSanitized})`);
1129
- return f(...args);
1130
- }, "result");
1131
- return Object.defineProperty(result, "toString", {
1132
- value: /* @__PURE__ */ o(() => sourceSanitized, "value")
1133
- }), Object.defineProperty(result, "name", {
1134
- value: name
1135
- }), result;
1206
+ }, "replacer2"), mt = /* @__PURE__ */ s(function(e) {
1207
+ let r = [], n;
1208
+ return /* @__PURE__ */ s(function(p, a) {
1209
+ if (p === "" && (n = a, r.forEach(({ target: c, container: i, replacement: l }) => {
1210
+ let d = yt(l) ? JSON.parse(l) : l.split(".");
1211
+ d.length === 0 ? i[c] = n : i[c] = Vo(n, d);
1212
+ })), p === "_constructor-name_")
1213
+ return a;
1214
+ if (Ce(a) && a.__isConvertedError__) {
1215
+ let { message: c, ...i } = a.errorProperties, l = new Error(c);
1216
+ return Object.assign(l, i), l;
1136
1217
  }
1137
- if (typeof value == "string" && value.startsWith("_regexp_") && options.allowRegExp) {
1138
- let [, t, e] = value.match(/_regexp_([^|]*)\|(.*)/) || [];
1139
- return new RegExp(e, t);
1218
+ if (typeof a == "string" && a.startsWith("_regexp_") && e.allowRegExp) {
1219
+ let [, c, i] = a.match(/_regexp_([^|]*)\|(.*)/) || [];
1220
+ return new RegExp(i, c);
1140
1221
  }
1141
- return typeof value == "string" && value.startsWith("_date_") && options.allowDate ? new Date(value.replace("_date_", "")) : typeof value ==
1142
- "string" && value.startsWith("_duplicate_") ? (refs.push({ target: key, container: this, replacement: value.replace(/^_duplicate_/, "") }),
1143
- null) : typeof value == "string" && value.startsWith("_symbol_") && options.allowSymbol ? Symbol(value.replace("_symbol_", "")) : typeof value ==
1144
- "string" && value.startsWith("_gsymbol_") && options.allowSymbol ? Symbol.for(value.replace("_gsymbol_", "")) : typeof value == "strin\
1145
- g" && value === "_-Infinity_" ? -1 / 0 : typeof value == "string" && value === "_Infinity_" ? 1 / 0 : typeof value == "string" && value === "\
1146
- _NaN_" ? NaN : typeof value == "string" && value.startsWith("_bigint_") && typeof BigInt == "function" ? BigInt(value.replace("_bigint_", "")) :
1147
- value;
1222
+ return typeof a == "string" && a.startsWith("_date_") && e.allowDate ? new Date(a.replace("_date_", "")) : typeof a == "string" && a.startsWith(
1223
+ "_duplicate_") ? (r.push({ target: p, container: this, replacement: a.replace(/^_duplicate_/, "") }), null) : typeof a == "string" && a.
1224
+ startsWith("_symbol_") && e.allowSymbol ? Symbol(a.replace("_symbol_", "")) : typeof a == "string" && a.startsWith("_gsymbol_") && e.allowSymbol ?
1225
+ Symbol.for(a.replace("_gsymbol_", "")) : typeof a == "string" && a === "_-Infinity_" ? Number.NEGATIVE_INFINITY : typeof a == "string" &&
1226
+ a === "_Infinity_" ? Number.POSITIVE_INFINITY : typeof a == "string" && a === "_NaN_" ? Number.NaN : typeof a == "string" && a.startsWith(
1227
+ "_bigint_") && typeof BigInt == "function" ? BigInt(a.replace("_bigint_", "")) : a;
1148
1228
  }, "revive");
1149
- }, "reviver"), defaultOptions = {
1229
+ }, "reviver2"), vt = {
1150
1230
  maxDepth: 10,
1151
1231
  space: void 0,
1152
- allowFunction: !0,
1153
1232
  allowRegExp: !0,
1154
1233
  allowDate: !0,
1155
- allowClass: !0,
1156
1234
  allowError: !0,
1157
1235
  allowUndefined: !0,
1158
- allowSymbol: !0,
1159
- lazyEval: !0
1160
- }, stringify = /* @__PURE__ */ o((t, e = {}) => {
1161
- let r = { ...defaultOptions, ...e };
1162
- return JSON.stringify(convertUnconventionalData(t), replacer(r), e.space);
1163
- }, "stringify"), mutator = /* @__PURE__ */ o(() => {
1236
+ allowSymbol: !0
1237
+ }, Xo = /* @__PURE__ */ s((t, e = {}) => {
1238
+ let r = { ...vt, ...e };
1239
+ return JSON.stringify(ht(t), gt(r), e.space);
1240
+ }, "stringify"), Qo = /* @__PURE__ */ s(() => {
1164
1241
  let t = /* @__PURE__ */ new Map();
1165
- return /* @__PURE__ */ o(function e(r) {
1166
- isObject3(r) && Object.entries(r).forEach(([n, a]) => {
1167
- a === "_undefined_" ? r[n] = void 0 : t.get(a) || (t.set(a, !0), e(a));
1168
- }), Array.isArray(r) && r.forEach((n, a) => {
1169
- n === "_undefined_" ? (t.set(n, !0), r[a] = void 0) : t.get(n) || (t.set(n, !0), e(n));
1242
+ return /* @__PURE__ */ s(function e(r) {
1243
+ Ce(r) && Object.entries(r).forEach(([n, o]) => {
1244
+ o === "_undefined_" ? r[n] = void 0 : t.get(o) || (t.set(o, !0), e(o));
1245
+ }), Array.isArray(r) && r.forEach((n, o) => {
1246
+ n === "_undefined_" ? (t.set(n, !0), r[o] = void 0) : t.get(n) || (t.set(n, !0), e(n));
1170
1247
  });
1171
1248
  }, "mutateUndefined");
1172
- }, "mutator"), parse = /* @__PURE__ */ o((t, e = {}) => {
1173
- let r = { ...defaultOptions, ...e }, n = JSON.parse(t, reviver2(r));
1174
- return mutator()(n), n;
1249
+ }, "mutator"), Zo = /* @__PURE__ */ s((t, e = {}) => {
1250
+ let r = { ...vt, ...e }, n = JSON.parse(t, mt(r));
1251
+ return Qo()(n), n;
1175
1252
  }, "parse");
1176
1253
  });
1177
1254
 
1178
1255
  // src/channels/index.ts
1179
- var Xe = {};
1180
- Me(Xe, {
1181
- Channel: () => F,
1182
- HEARTBEAT_INTERVAL: () => le,
1183
- HEARTBEAT_MAX_LATENCY: () => ce,
1184
- PostMessageTransport: () => $,
1185
- WebsocketTransport: () => G,
1186
- createBrowserChannel: () => Ye,
1187
- default: () => Ke
1256
+ var as = {};
1257
+ qt(as, {
1258
+ Channel: () => U,
1259
+ HEARTBEAT_INTERVAL: () => De,
1260
+ HEARTBEAT_MAX_LATENCY: () => $e,
1261
+ PostMessageTransport: () => H,
1262
+ WebsocketTransport: () => J,
1263
+ createBrowserChannel: () => is,
1264
+ default: () => ss
1188
1265
  });
1189
- module.exports = Fe(Xe);
1190
- var Ae = require("@storybook/global");
1266
+ module.exports = Bt(as);
1267
+ var At = require("@storybook/global");
1191
1268
 
1192
1269
  // src/shared/universal-store/index.ts
1193
- var N = z(he(), 1);
1270
+ var j = ee(Be(), 1);
1194
1271
 
1195
1272
  // src/shared/universal-store/instances.ts
1196
- var re = /* @__PURE__ */ new Map();
1273
+ var ve = /* @__PURE__ */ new Map();
1197
1274
 
1198
1275
  // src/shared/universal-store/index.ts
1199
- var Ue = "UNIVERSAL_STORE:", C = {
1276
+ var Ht = "UNIVERSAL_STORE:", x = {
1200
1277
  PENDING: "PENDING",
1201
1278
  RESOLVED: "RESOLVED",
1202
1279
  REJECTED: "REJECTED"
@@ -1207,28 +1284,28 @@ var Ue = "UNIVERSAL_STORE:", C = {
1207
1284
  // TODO: narrow type of listeners based on event type
1208
1285
  this.listeners = /* @__PURE__ */ new Map([["*", /* @__PURE__ */ new Set()]]);
1209
1286
  /** Gets the current state */
1210
- this.getState = /* @__PURE__ */ o(() => (this.debug("getState", { state: this.state }), this.state), "getState");
1287
+ this.getState = /* @__PURE__ */ s(() => (this.debug("getState", { state: this.state }), this.state), "getState");
1211
1288
  /**
1212
1289
  * Subscribes to store events
1213
1290
  *
1214
1291
  * @returns A function to unsubscribe
1215
1292
  */
1216
- this.subscribe = /* @__PURE__ */ o((e, r) => {
1217
- let n = typeof e == "function", a = n ? "*" : e, s = n ? e : r;
1218
- if (this.debug("subscribe", { eventType: a, listener: s }), !s)
1293
+ this.subscribe = /* @__PURE__ */ s((e, r) => {
1294
+ let n = typeof e == "function", o = n ? "*" : e, p = n ? e : r;
1295
+ if (this.debug("subscribe", { eventType: o, listener: p }), !p)
1219
1296
  throw new TypeError(
1220
1297
  `Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'`
1221
1298
  );
1222
- return this.listeners.has(a) || this.listeners.set(a, /* @__PURE__ */ new Set()), this.listeners.get(a).add(s), () => {
1223
- this.debug("unsubscribe", { eventType: a, listener: s }), this.listeners.has(a) && (this.listeners.get(a).delete(s), this.listeners.
1224
- get(a)?.size === 0 && this.listeners.delete(a));
1299
+ return this.listeners.has(o) || this.listeners.set(o, /* @__PURE__ */ new Set()), this.listeners.get(o).add(p), () => {
1300
+ this.debug("unsubscribe", { eventType: o, listener: p }), this.listeners.has(o) && (this.listeners.get(o).delete(p), this.listeners.
1301
+ get(o)?.size === 0 && this.listeners.delete(o));
1225
1302
  };
1226
1303
  }, "subscribe");
1227
1304
  /** Sends a custom event to the other stores */
1228
- this.send = /* @__PURE__ */ o((e) => {
1305
+ this.send = /* @__PURE__ */ s((e) => {
1229
1306
  if (this.debug("send", { event: e }), this.status !== t.Status.READY)
1230
1307
  throw new TypeError(
1231
- N.dedent`Cannot send event before store is ready. You can get the current status with store.status,
1308
+ j.dedent`Cannot send event before store is ready. You can get the current status with store.status,
1232
1309
  or await store.readyPromise to wait for the store to be ready before sending events.
1233
1310
  ${JSON.stringify(
1234
1311
  {
@@ -1248,40 +1325,40 @@ var Ue = "UNIVERSAL_STORE:", C = {
1248
1325
  "UniversalStore is not constructable - use UniversalStore.create() instead"
1249
1326
  );
1250
1327
  if (t.isInternalConstructing = !1, this.id = e.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
1251
- actorType = e.leader ? t.ActorType.LEADER : t.ActorType.FOLLOWER, this.state = e.initialState, this.channelEventName = `${Ue}${this.id}`,
1328
+ actorType = e.leader ? t.ActorType.LEADER : t.ActorType.FOLLOWER, this.state = e.initialState, this.channelEventName = `${Ht}${this.id}`,
1252
1329
  this.debug("constructor", {
1253
1330
  options: e,
1254
1331
  environmentOverrides: r,
1255
1332
  channelEventName: this.channelEventName
1256
1333
  }), this.actor.type === t.ActorType.LEADER)
1257
1334
  this.syncing = {
1258
- state: C.RESOLVED,
1335
+ state: x.RESOLVED,
1259
1336
  promise: Promise.resolve()
1260
1337
  };
1261
1338
  else {
1262
- let n, a, s = new Promise((l, c) => {
1263
- n = /* @__PURE__ */ o(() => {
1264
- this.syncing.state === C.PENDING && (this.syncing.state = C.RESOLVED, l());
1265
- }, "syncingResolve"), a = /* @__PURE__ */ o((i) => {
1266
- this.syncing.state === C.PENDING && (this.syncing.state = C.REJECTED, c(i));
1339
+ let n, o, p = new Promise((a, c) => {
1340
+ n = /* @__PURE__ */ s(() => {
1341
+ this.syncing.state === x.PENDING && (this.syncing.state = x.RESOLVED, a());
1342
+ }, "syncingResolve"), o = /* @__PURE__ */ s((i) => {
1343
+ this.syncing.state === x.PENDING && (this.syncing.state = x.REJECTED, c(i));
1267
1344
  }, "syncingReject");
1268
1345
  });
1269
1346
  this.syncing = {
1270
- state: C.PENDING,
1271
- promise: s,
1347
+ state: x.PENDING,
1348
+ promise: p,
1272
1349
  resolve: n,
1273
- reject: a
1350
+ reject: o
1274
1351
  };
1275
1352
  }
1276
1353
  this.getState = this.getState.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), this.onStateChange =
1277
1354
  this.onStateChange.bind(this), this.send = this.send.bind(this), this.emitToChannel = this.emitToChannel.bind(this), this.prepareThis = this.
1278
1355
  prepareThis.bind(this), this.emitToListeners = this.emitToListeners.bind(this), this.handleChannelEvents = this.handleChannelEvents.bind(
1279
1356
  this), this.debug = this.debug.bind(this), this.channel = r?.channel ?? t.preparation.channel, this.environment = r?.environment ?? t.preparation.
1280
- environment, this.channel && this.environment ? this.prepareThis({ channel: this.channel, environment: this.environment }) : t.preparation.
1281
- promise.then(this.prepareThis);
1357
+ environment, this.channel && this.environment ? (t.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis(
1358
+ { channel: this.channel, environment: this.environment })) : t.preparation.promise.then(this.prepareThis);
1282
1359
  }
1283
1360
  static {
1284
- o(this, "UniversalStore");
1361
+ s(this, "UniversalStore");
1285
1362
  }
1286
1363
  static {
1287
1364
  /**
@@ -1339,11 +1416,11 @@ var Ue = "UNIVERSAL_STORE:", C = {
1339
1416
  }
1340
1417
  static setupPreparationPromise() {
1341
1418
  let e, r, n = new Promise(
1342
- (a, s) => {
1343
- e = /* @__PURE__ */ o((l) => {
1344
- a(l);
1345
- }, "resolveRef"), r = /* @__PURE__ */ o((...l) => {
1346
- s(l);
1419
+ (o, p) => {
1420
+ e = /* @__PURE__ */ s((a) => {
1421
+ o(a);
1422
+ }, "resolveRef"), r = /* @__PURE__ */ s((...a) => {
1423
+ p(a);
1347
1424
  }, "rejectRef");
1348
1425
  }
1349
1426
  );
@@ -1369,12 +1446,12 @@ var Ue = "UNIVERSAL_STORE:", C = {
1369
1446
  if (!this.channel || !this.environment)
1370
1447
  return t.Status.UNPREPARED;
1371
1448
  switch (this.syncing?.state) {
1372
- case C.PENDING:
1449
+ case x.PENDING:
1373
1450
  case void 0:
1374
1451
  return t.Status.SYNCING;
1375
- case C.REJECTED:
1452
+ case x.REJECTED:
1376
1453
  return t.Status.ERROR;
1377
- case C.RESOLVED:
1454
+ case x.RESOLVED:
1378
1455
  default:
1379
1456
  return t.Status.READY;
1380
1457
  }
@@ -1394,17 +1471,17 @@ var Ue = "UNIVERSAL_STORE:", C = {
1394
1471
  if (!e || typeof e?.id != "string")
1395
1472
  throw new TypeError("id is required and must be a string, when creating a UniversalStore");
1396
1473
  e.debug && console.debug(
1397
- N.dedent`[UniversalStore]
1474
+ j.dedent`[UniversalStore]
1398
1475
  create`,
1399
1476
  { options: e }
1400
1477
  );
1401
- let r = re.get(e.id);
1478
+ let r = ve.get(e.id);
1402
1479
  if (r)
1403
- return console.warn(N.dedent`UniversalStore with id "${e.id}" already exists in this environment, re-using existing.
1480
+ return console.warn(j.dedent`UniversalStore with id "${e.id}" already exists in this environment, re-using existing.
1404
1481
  You should reuse the existing instance instead of trying to create a new one.`), r;
1405
1482
  t.isInternalConstructing = !0;
1406
1483
  let n = new t(e);
1407
- return re.set(e.id, n), n;
1484
+ return ve.set(e.id, n), n;
1408
1485
  }
1409
1486
  /**
1410
1487
  * Used by Storybook to set the channel for all instances of UniversalStore in the given
@@ -1424,7 +1501,7 @@ var Ue = "UNIVERSAL_STORE:", C = {
1424
1501
  let r = this.state, n = typeof e == "function" ? e(r) : e;
1425
1502
  if (this.debug("setState", { newState: n, previousState: r, updater: e }), this.status !== t.Status.READY)
1426
1503
  throw new TypeError(
1427
- N.dedent`Cannot set state before store is ready. You can get the current status with store.status,
1504
+ j.dedent`Cannot set state before store is ready. You can get the current status with store.status,
1428
1505
  or await store.readyPromise to wait for the store to be ready before sending events.
1429
1506
  ${JSON.stringify(
1430
1507
  {
@@ -1438,14 +1515,14 @@ var Ue = "UNIVERSAL_STORE:", C = {
1438
1515
  )}`
1439
1516
  );
1440
1517
  this.state = n;
1441
- let a = {
1518
+ let o = {
1442
1519
  type: t.InternalEventType.SET_STATE,
1443
1520
  payload: {
1444
1521
  state: n,
1445
1522
  previousState: r
1446
1523
  }
1447
1524
  };
1448
- this.emitToChannel(a, { actor: this.actor }), this.emitToListeners(a, { actor: this.actor });
1525
+ this.emitToChannel(o, { actor: this.actor }), this.emitToListeners(o, { actor: this.actor });
1449
1526
  }
1450
1527
  /**
1451
1528
  * Subscribes to state changes
@@ -1490,14 +1567,14 @@ var Ue = "UNIVERSAL_STORE:", C = {
1490
1567
  }, 1e3));
1491
1568
  }
1492
1569
  emitToListeners(e, r) {
1493
- let n = this.listeners.get(e.type), a = this.listeners.get("*");
1570
+ let n = this.listeners.get(e.type), o = this.listeners.get("*");
1494
1571
  this.debug("emitToListeners", {
1495
1572
  event: e,
1496
1573
  eventInfo: r,
1497
1574
  eventTypeListeners: n,
1498
- everythingListeners: a
1499
- }), [...n ?? [], ...a ?? []].forEach(
1500
- (s) => s(e, r)
1575
+ everythingListeners: o
1576
+ }), [...n ?? [], ...o ?? []].forEach(
1577
+ (p) => p(e, r)
1501
1578
  );
1502
1579
  }
1503
1580
  handleChannelEvents(e) {
@@ -1505,28 +1582,28 @@ var Ue = "UNIVERSAL_STORE:", C = {
1505
1582
  if ([n.actor.id, n.forwardingActor?.id].includes(this.actor.id)) {
1506
1583
  this.debug("handleChannelEvents: Ignoring event from self", { channelEvent: e });
1507
1584
  return;
1508
- } else if (this.syncing?.state === C.PENDING && r.type !== t.InternalEventType.EXISTING_STATE_RESPONSE) {
1585
+ } else if (this.syncing?.state === x.PENDING && r.type !== t.InternalEventType.EXISTING_STATE_RESPONSE) {
1509
1586
  this.debug("handleChannelEvents: Ignoring event while syncing", { channelEvent: e });
1510
1587
  return;
1511
1588
  }
1512
1589
  if (this.debug("handleChannelEvents", { channelEvent: e }), this.actor.type === t.ActorType.LEADER) {
1513
- let a = !0;
1590
+ let o = !0;
1514
1591
  switch (r.type) {
1515
1592
  case t.InternalEventType.EXISTING_STATE_REQUEST:
1516
- a = !1;
1517
- let s = {
1593
+ o = !1;
1594
+ let p = {
1518
1595
  type: t.InternalEventType.EXISTING_STATE_RESPONSE,
1519
1596
  payload: this.state
1520
1597
  };
1521
1598
  this.debug("handleChannelEvents: responding to existing state request", {
1522
- responseEvent: s
1523
- }), this.emitToChannel(s, { actor: this.actor });
1599
+ responseEvent: p
1600
+ }), this.emitToChannel(p, { actor: this.actor }), this.emitToListeners(p, { actor: this.actor });
1524
1601
  break;
1525
1602
  case t.InternalEventType.LEADER_CREATED:
1526
- a = !1, this.syncing.state = C.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
1603
+ o = !1, this.syncing.state = x.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
1527
1604
  event: r
1528
1605
  }), console.error(
1529
- N.dedent`Detected multiple UniversalStore leaders created with the same id "${this.id}".
1606
+ j.dedent`Detected multiple UniversalStore leaders created with the same id "${this.id}".
1530
1607
  Only one leader can exists at a time, your stores are now in an invalid state.
1531
1608
  Leaders detected:
1532
1609
  this: ${JSON.stringify(this.actor, null, 2)}
@@ -1534,7 +1611,7 @@ var Ue = "UNIVERSAL_STORE:", C = {
1534
1611
  );
1535
1612
  break;
1536
1613
  }
1537
- a && (this.debug("handleChannelEvents: forwarding event", { channelEvent: e }), this.emitToChannel(r, { actor: n.actor, forwardingActor: this.
1614
+ o && (this.debug("handleChannelEvents: forwarding event", { channelEvent: e }), this.emitToChannel(r, { actor: n.actor, forwardingActor: this.
1538
1615
  actor }));
1539
1616
  }
1540
1617
  if (this.actor.type === t.ActorType.FOLLOWER)
@@ -1542,17 +1619,17 @@ var Ue = "UNIVERSAL_STORE:", C = {
1542
1619
  case t.InternalEventType.EXISTING_STATE_RESPONSE:
1543
1620
  if (this.debug("handleChannelEvents: Setting state from leader's existing state response", {
1544
1621
  event: r
1545
- }), this.syncing?.state !== C.PENDING)
1622
+ }), this.syncing?.state !== x.PENDING)
1546
1623
  break;
1547
1624
  this.syncing.resolve?.();
1548
- let a = {
1625
+ let o = {
1549
1626
  type: t.InternalEventType.SET_STATE,
1550
1627
  payload: {
1551
1628
  state: r.payload,
1552
1629
  previousState: this.state
1553
1630
  }
1554
1631
  };
1555
- this.state = r.payload, this.emitToListeners(a, n);
1632
+ this.state = r.payload, this.emitToListeners(o, n);
1556
1633
  break;
1557
1634
  }
1558
1635
  switch (r.type) {
@@ -1564,7 +1641,7 @@ var Ue = "UNIVERSAL_STORE:", C = {
1564
1641
  }
1565
1642
  debug(e, r) {
1566
1643
  this.debugging && console.debug(
1567
- N.dedent`[UniversalStore::${this.id}::${this.environment ?? t.Environment.UNKNOWN}]
1644
+ j.dedent`[UniversalStore::${this.id}::${this.environment ?? t.Environment.UNKNOWN}]
1568
1645
  ${e}`,
1569
1646
  JSON.stringify(
1570
1647
  {
@@ -1589,21 +1666,21 @@ var Ue = "UNIVERSAL_STORE:", C = {
1589
1666
  };
1590
1667
 
1591
1668
  // src/channels/main.ts
1592
- var $e = /* @__PURE__ */ o((t) => t.transports !== void 0, "isMulti"), ke = /* @__PURE__ */ o(() => Math.random().toString(16).slice(2), "ge\
1593
- nerateRandomId"), F = class {
1669
+ var Vt = /* @__PURE__ */ s((t) => t.transports !== void 0, "isMulti"), Jt = /* @__PURE__ */ s(() => Math.random().toString(16).slice(2), "ge\
1670
+ nerateRandomId"), U = class {
1594
1671
  constructor(e = {}) {
1595
- this.sender = ke();
1672
+ this.sender = Jt();
1596
1673
  this.events = {};
1597
1674
  this.data = {};
1598
1675
  this.transports = [];
1599
- this.isAsync = e.async || !1, $e(e) ? (this.transports = e.transports || [], this.transports.forEach((r) => {
1676
+ this.isAsync = e.async || !1, Vt(e) ? (this.transports = e.transports || [], this.transports.forEach((r) => {
1600
1677
  r.setHandler((n) => this.handleEvent(n));
1601
1678
  })) : this.transports = e.transport ? [e.transport] : [], this.transports.forEach((r) => {
1602
1679
  r.setHandler((n) => this.handleEvent(n));
1603
1680
  });
1604
1681
  }
1605
1682
  static {
1606
- o(this, "Channel");
1683
+ s(this, "Channel");
1607
1684
  }
1608
1685
  get hasTransport() {
1609
1686
  return this.transports.length > 0;
@@ -1612,14 +1689,14 @@ nerateRandomId"), F = class {
1612
1689
  this.events[e] = this.events[e] || [], this.events[e].push(r);
1613
1690
  }
1614
1691
  emit(e, ...r) {
1615
- let n = { type: e, args: r, from: this.sender }, a = {};
1616
- r.length >= 1 && r[0] && r[0].options && (a = r[0].options);
1617
- let s = /* @__PURE__ */ o(() => {
1618
- this.transports.forEach((l) => {
1619
- l.send(n, a);
1692
+ let n = { type: e, args: r, from: this.sender }, o = {};
1693
+ r.length >= 1 && r[0] && r[0].options && (o = r[0].options);
1694
+ let p = /* @__PURE__ */ s(() => {
1695
+ this.transports.forEach((a) => {
1696
+ a.send(n, o);
1620
1697
  }), this.handleEvent(n);
1621
1698
  }, "handler");
1622
- this.isAsync ? setImmediate(s) : s();
1699
+ this.isAsync ? setImmediate(p) : p();
1623
1700
  }
1624
1701
  last(e) {
1625
1702
  return this.data[e];
@@ -1643,7 +1720,7 @@ nerateRandomId"), F = class {
1643
1720
  }
1644
1721
  removeListener(e, r) {
1645
1722
  let n = this.listeners(e);
1646
- n && (this.events[e] = n.filter((a) => a !== r));
1723
+ n && (this.events[e] = n.filter((o) => o !== r));
1647
1724
  }
1648
1725
  on(e, r) {
1649
1726
  this.addListener(e, r);
@@ -1658,60 +1735,60 @@ nerateRandomId"), F = class {
1658
1735
  }), this.data[e.type] = e.args;
1659
1736
  }
1660
1737
  onceListener(e, r) {
1661
- let n = /* @__PURE__ */ o((...a) => (this.removeListener(e, n), r(...a)), "onceListener");
1738
+ let n = /* @__PURE__ */ s((...o) => (this.removeListener(e, n), r(...o)), "onceListener");
1662
1739
  return n;
1663
1740
  }
1664
1741
  };
1665
1742
 
1666
1743
  // src/channels/postmessage/index.ts
1667
- var U = require("storybook/internal/client-logger"), Je = z(require("storybook/internal/core-events"), 1), _ = require("@storybook/global"),
1668
- k = z(ne(), 1);
1744
+ var B = require("storybook/internal/client-logger"), ts = ee(require("storybook/internal/core-events"), 1), _ = require("@storybook/global"),
1745
+ V = ee(Ne(), 1);
1669
1746
 
1670
1747
  // ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
1671
- var qe = process.env.NODE_ENV === "production", ae = "Invariant failed";
1672
- function V(t, e) {
1748
+ var es = process.env.NODE_ENV === "production", Ie = "Invariant failed";
1749
+ function oe(t, e) {
1673
1750
  if (!t) {
1674
- if (qe)
1675
- throw new Error(ae);
1676
- var r = typeof e == "function" ? e() : e, n = r ? "".concat(ae, ": ").concat(r) : ae;
1751
+ if (es)
1752
+ throw new Error(Ie);
1753
+ var r = typeof e == "function" ? e() : e, n = r ? "".concat(Ie, ": ").concat(r) : Ie;
1677
1754
  throw new Error(n);
1678
1755
  }
1679
1756
  }
1680
- o(V, "invariant");
1757
+ s(oe, "invariant");
1681
1758
 
1682
1759
  // src/channels/postmessage/getEventSourceUrl.ts
1683
- var be = require("storybook/internal/client-logger");
1684
- var Se = /* @__PURE__ */ o((t) => {
1760
+ var _t = require("storybook/internal/client-logger");
1761
+ var bt = /* @__PURE__ */ s((t) => {
1685
1762
  let e = Array.from(
1686
1763
  document.querySelectorAll("iframe[data-is-storybook]")
1687
- ), [r, ...n] = e.filter((s) => {
1764
+ ), [r, ...n] = e.filter((p) => {
1688
1765
  try {
1689
- return s.contentWindow?.location.origin === t.source.location.origin && s.contentWindow?.location.pathname === t.source.location.pathname;
1766
+ return p.contentWindow?.location.origin === t.source.location.origin && p.contentWindow?.location.pathname === t.source.location.pathname;
1690
1767
  } catch {
1691
1768
  }
1692
1769
  try {
1693
- return s.contentWindow === t.source;
1770
+ return p.contentWindow === t.source;
1694
1771
  } catch {
1695
1772
  }
1696
- let l = s.getAttribute("src"), c;
1773
+ let a = p.getAttribute("src"), c;
1697
1774
  try {
1698
- if (!l)
1775
+ if (!a)
1699
1776
  return !1;
1700
- ({ origin: c } = new URL(l, document.location.toString()));
1777
+ ({ origin: c } = new URL(a, document.location.toString()));
1701
1778
  } catch {
1702
1779
  return !1;
1703
1780
  }
1704
1781
  return c === t.origin;
1705
- }), a = r?.getAttribute("src");
1706
- if (a && n.length === 0) {
1707
- let { protocol: s, host: l, pathname: c } = new URL(a, document.location.toString());
1708
- return `${s}//${l}${c}`;
1782
+ }), o = r?.getAttribute("src");
1783
+ if (o && n.length === 0) {
1784
+ let { protocol: p, host: a, pathname: c } = new URL(o, document.location.toString());
1785
+ return `${p}//${a}${c}`;
1709
1786
  }
1710
- return n.length > 0 && be.logger.error("found multiple candidates for event source"), null;
1787
+ return n.length > 0 && _t.logger.error("found multiple candidates for event source"), null;
1711
1788
  }, "getEventSourceUrl");
1712
1789
 
1713
1790
  // src/channels/postmessage/index.ts
1714
- var { document: oe, location: ie } = _.global, Te = "storybook-channel", ze = { allowFunction: !1, maxDepth: 25 }, $ = class {
1791
+ var { document: Re, location: je } = _.global, St = "storybook-channel", rs = { maxDepth: 25 }, H = class {
1715
1792
  constructor(e) {
1716
1793
  this.config = e;
1717
1794
  this.connected = !1;
@@ -1720,7 +1797,7 @@ var { document: oe, location: ie } = _.global, Te = "storybook-channel", ze = {
1720
1797
  throw new Error(`postmsg-channel: "config.page" cannot be "${e.page}"`);
1721
1798
  }
1722
1799
  static {
1723
- o(this, "PostMessageTransport");
1800
+ s(this, "PostMessageTransport");
1724
1801
  }
1725
1802
  setHandler(e) {
1726
1803
  this.handler = (...r) => {
@@ -1737,49 +1814,43 @@ var { document: oe, location: ie } = _.global, Te = "storybook-channel", ze = {
1737
1814
  let {
1738
1815
  target: n,
1739
1816
  // telejson options
1740
- allowRegExp: a,
1741
- allowFunction: s,
1742
- allowSymbol: l,
1743
- allowDate: c,
1744
- allowError: i,
1745
- allowUndefined: h,
1746
- allowClass: p,
1747
- maxDepth: u,
1748
- space: y,
1749
- lazyEval: d
1750
- } = r || {}, v = Object.fromEntries(
1817
+ allowRegExp: o,
1818
+ allowSymbol: p,
1819
+ allowDate: a,
1820
+ allowError: c,
1821
+ allowUndefined: i,
1822
+ maxDepth: l,
1823
+ space: d
1824
+ } = r || {}, u = Object.fromEntries(
1751
1825
  Object.entries({
1752
- allowRegExp: a,
1753
- allowFunction: s,
1754
- allowSymbol: l,
1755
- allowDate: c,
1756
- allowError: i,
1757
- allowUndefined: h,
1758
- allowClass: p,
1759
- maxDepth: u,
1760
- space: y,
1761
- lazyEval: d
1762
- }).filter(([j, D]) => typeof D < "u")
1763
- ), w = {
1764
- ...ze,
1826
+ allowRegExp: o,
1827
+ allowSymbol: p,
1828
+ allowDate: a,
1829
+ allowError: c,
1830
+ allowUndefined: i,
1831
+ maxDepth: l,
1832
+ space: d
1833
+ }).filter(([w, A]) => typeof A < "u")
1834
+ ), y = {
1835
+ ...rs,
1765
1836
  ..._.global.CHANNEL_OPTIONS || {},
1766
- ...v
1767
- }, T = this.getFrames(n), x = new URLSearchParams(ie?.search || ""), R = (0, k.stringify)(
1837
+ ...u
1838
+ }, g = this.getFrames(n), h = new URLSearchParams(je?.search || ""), C = (0, V.stringify)(
1768
1839
  {
1769
- key: Te,
1840
+ key: St,
1770
1841
  event: e,
1771
- refId: x.get("refId")
1842
+ refId: h.get("refId")
1772
1843
  },
1773
- w
1844
+ y
1774
1845
  );
1775
- return T.length ? (this.buffer.length && this.flush(), T.forEach((j) => {
1846
+ return g.length ? (this.buffer.length && this.flush(), g.forEach((w) => {
1776
1847
  try {
1777
- j.postMessage(R, "*");
1848
+ w.postMessage(C, "*");
1778
1849
  } catch {
1779
- U.logger.error("sending over postmessage fail");
1850
+ B.logger.error("sending over postmessage fail");
1780
1851
  }
1781
- }), Promise.resolve(null)) : new Promise((j, D) => {
1782
- this.buffer.push({ event: e, resolve: j, reject: D });
1852
+ }), Promise.resolve(null)) : new Promise((w, A) => {
1853
+ this.buffer.push({ event: e, resolve: w, reject: A });
1783
1854
  });
1784
1855
  }
1785
1856
  flush() {
@@ -1791,10 +1862,10 @@ var { document: oe, location: ie } = _.global, Te = "storybook-channel", ze = {
1791
1862
  getFrames(e) {
1792
1863
  if (this.config.page === "manager") {
1793
1864
  let n = Array.from(
1794
- oe.querySelectorAll("iframe[data-is-storybook][data-is-loaded]")
1795
- ).flatMap((a) => {
1865
+ Re.querySelectorAll("iframe[data-is-storybook][data-is-loaded]")
1866
+ ).flatMap((o) => {
1796
1867
  try {
1797
- return a.contentWindow && a.dataset.isStorybook !== void 0 && a.id === e ? [a.contentWindow] : [];
1868
+ return o.contentWindow && o.dataset.isStorybook !== void 0 && o.id === e ? [o.contentWindow] : [];
1798
1869
  } catch {
1799
1870
  return [];
1800
1871
  }
@@ -1805,71 +1876,71 @@ var { document: oe, location: ie } = _.global, Te = "storybook-channel", ze = {
1805
1876
  }
1806
1877
  getCurrentFrames() {
1807
1878
  return this.config.page === "manager" ? Array.from(
1808
- oe.querySelectorAll('[data-is-storybook="true"]')
1879
+ Re.querySelectorAll('[data-is-storybook="true"]')
1809
1880
  ).flatMap((r) => r.contentWindow ? [r.contentWindow] : []) : _.global && _.global.parent ? [_.global.parent] : [];
1810
1881
  }
1811
1882
  getLocalFrame() {
1812
1883
  return this.config.page === "manager" ? Array.from(
1813
- oe.querySelectorAll("#storybook-preview-iframe")
1884
+ Re.querySelectorAll("#storybook-preview-iframe")
1814
1885
  ).flatMap((r) => r.contentWindow ? [r.contentWindow] : []) : _.global && _.global.parent ? [_.global.parent] : [];
1815
1886
  }
1816
1887
  handleEvent(e) {
1817
1888
  try {
1818
- let { data: r } = e, { key: n, event: a, refId: s } = typeof r == "string" && (0, k.isJSON)(r) ? (0, k.parse)(r, _.global.CHANNEL_OPTIONS ||
1889
+ let { data: r } = e, { key: n, event: o, refId: p } = typeof r == "string" && (0, V.isJSON)(r) ? (0, V.parse)(r, _.global.CHANNEL_OPTIONS ||
1819
1890
  {}) : r;
1820
- if (n === Te) {
1821
- let l = this.config.page === "manager" ? '<span style="color: #37D5D3; background: black"> manager </span>' : '<span style="color: #\
1822
- 1EA7FD; background: black"> preview </span>', c = Object.values(Je).includes(a.type) ? `<span style="color: #FF4785">${a.type}</span>` : `<s\
1823
- pan style="color: #FFAE00">${a.type}</span>`;
1824
- if (s && (a.refId = s), a.source = this.config.page === "preview" ? e.origin : Se(e), !a.source) {
1825
- U.pretty.error(
1826
- `${l} received ${c} but was unable to determine the source of the event`
1891
+ if (n === St) {
1892
+ let a = this.config.page === "manager" ? '<span style="color: #37D5D3; background: black"> manager </span>' : '<span style="color: #\
1893
+ 1EA7FD; background: black"> preview </span>', c = Object.values(ts).includes(o.type) ? `<span style="color: #FF4785">${o.type}</span>` : `<s\
1894
+ pan style="color: #FFAE00">${o.type}</span>`;
1895
+ if (p && (o.refId = p), o.source = this.config.page === "preview" ? e.origin : bt(e), !o.source) {
1896
+ B.pretty.error(
1897
+ `${a} received ${c} but was unable to determine the source of the event`
1827
1898
  );
1828
1899
  return;
1829
1900
  }
1830
- let i = `${l} received ${c} (${r.length})`;
1831
- U.pretty.debug(
1832
- ie.origin !== a.source ? i : `${i} <span style="color: gray">(on ${ie.origin} from ${a.source})</span>`,
1833
- ...a.args
1834
- ), V(this.handler, "ChannelHandler should be set"), this.handler(a);
1901
+ let i = `${a} received ${c} (${r.length})`;
1902
+ B.pretty.debug(
1903
+ je.origin !== o.source ? i : `${i} <span style="color: gray">(on ${je.origin} from ${o.source})</span>`,
1904
+ ...o.args
1905
+ ), oe(this.handler, "ChannelHandler should be set"), this.handler(o);
1835
1906
  }
1836
1907
  } catch (r) {
1837
- U.logger.error(r);
1908
+ B.logger.error(r);
1838
1909
  }
1839
1910
  }
1840
1911
  };
1841
1912
 
1842
1913
  // src/channels/websocket/index.ts
1843
- var Ce = z(require("storybook/internal/core-events"), 1), se = require("@storybook/global"), H = z(ne(), 1);
1844
- var { WebSocket: Be } = se.global, le = 15e3, ce = 5e3, G = class {
1914
+ var Tt = ee(require("storybook/internal/core-events"), 1), Le = require("@storybook/global"), z = ee(Ne(), 1);
1915
+ var { WebSocket: ns } = Le.global, De = 15e3, $e = 5e3, J = class {
1845
1916
  constructor({ url: e, onError: r, page: n }) {
1846
1917
  this.buffer = [];
1847
1918
  this.isReady = !1;
1848
1919
  this.isClosed = !1;
1849
1920
  this.pingTimeout = 0;
1850
- this.socket = new Be(e), this.socket.onopen = () => {
1921
+ this.socket = new ns(e), this.socket.onopen = () => {
1851
1922
  this.isReady = !0, this.heartbeat(), this.flush();
1852
- }, this.socket.onmessage = ({ data: a }) => {
1853
- let s = typeof a == "string" && (0, H.isJSON)(a) ? (0, H.parse)(a) : a;
1854
- V(this.handler, "WebsocketTransport handler should be set"), this.handler(s), s.type === "ping" && (this.heartbeat(), this.send({ type: "\
1923
+ }, this.socket.onmessage = ({ data: o }) => {
1924
+ let p = typeof o == "string" && (0, z.isJSON)(o) ? (0, z.parse)(o) : o;
1925
+ oe(this.handler, "WebsocketTransport handler should be set"), this.handler(p), p.type === "ping" && (this.heartbeat(), this.send({ type: "\
1855
1926
  pong" }));
1856
- }, this.socket.onerror = (a) => {
1857
- r && r(a);
1858
- }, this.socket.onclose = (a) => {
1859
- V(this.handler, "WebsocketTransport handler should be set"), this.handler({
1860
- type: Ce.CHANNEL_WS_DISCONNECT,
1861
- args: [{ reason: a.reason, code: a.code }],
1927
+ }, this.socket.onerror = (o) => {
1928
+ r && r(o);
1929
+ }, this.socket.onclose = (o) => {
1930
+ oe(this.handler, "WebsocketTransport handler should be set"), this.handler({
1931
+ type: Tt.CHANNEL_WS_DISCONNECT,
1932
+ args: [{ reason: o.reason, code: o.code }],
1862
1933
  from: n || "preview"
1863
1934
  }), this.isClosed = !0, clearTimeout(this.pingTimeout);
1864
1935
  };
1865
1936
  }
1866
1937
  static {
1867
- o(this, "WebsocketTransport");
1938
+ s(this, "WebsocketTransport");
1868
1939
  }
1869
1940
  heartbeat() {
1870
1941
  clearTimeout(this.pingTimeout), this.pingTimeout = setTimeout(() => {
1871
1942
  this.socket.close(3008, "timeout");
1872
- }, le + ce);
1943
+ }, De + $e);
1873
1944
  }
1874
1945
  setHandler(e) {
1875
1946
  this.handler = e;
@@ -1881,10 +1952,9 @@ pong" }));
1881
1952
  this.buffer.push(e);
1882
1953
  }
1883
1954
  sendNow(e) {
1884
- let r = (0, H.stringify)(e, {
1955
+ let r = (0, z.stringify)(e, {
1885
1956
  maxDepth: 15,
1886
- allowFunction: !1,
1887
- ...se.global.CHANNEL_OPTIONS
1957
+ ...Le.global.CHANNEL_OPTIONS
1888
1958
  });
1889
1959
  this.socket.send(r);
1890
1960
  }
@@ -1895,19 +1965,19 @@ pong" }));
1895
1965
  };
1896
1966
 
1897
1967
  // src/channels/index.ts
1898
- var { CONFIG_TYPE: Ve } = Ae.global, Ke = F;
1899
- function Ye({ page: t, extraTransports: e = [] }) {
1900
- let r = [new $({ page: t }), ...e];
1901
- if (Ve === "DEVELOPMENT") {
1902
- let a = window.location.protocol === "http:" ? "ws" : "wss", { hostname: s, port: l } = window.location, c = `${a}://${s}:${l}/storybook\
1968
+ var { CONFIG_TYPE: os } = At.global, ss = U;
1969
+ function is({ page: t, extraTransports: e = [] }) {
1970
+ let r = [new H({ page: t }), ...e];
1971
+ if (os === "DEVELOPMENT") {
1972
+ let o = window.location.protocol === "http:" ? "ws" : "wss", { hostname: p, port: a } = window.location, c = `${o}://${p}:${a}/storybook\
1903
1973
  -server-channel`;
1904
- r.push(new G({ url: c, onError: /* @__PURE__ */ o(() => {
1974
+ r.push(new J({ url: c, onError: /* @__PURE__ */ s(() => {
1905
1975
  }, "onError"), page: t }));
1906
1976
  }
1907
- let n = new F({ transports: r });
1977
+ let n = new U({ transports: r });
1908
1978
  return M.__prepare(
1909
1979
  n,
1910
1980
  t === "manager" ? M.Environment.MANAGER : M.Environment.PREVIEW
1911
1981
  ), n;
1912
1982
  }
1913
- o(Ye, "createBrowserChannel");
1983
+ s(is, "createBrowserChannel");