storybook 9.0.0-alpha.2 → 9.0.0-alpha.21

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