storybook 9.0.0-alpha.1 → 9.0.0-alpha.2

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 (211) hide show
  1. package/README.md +31 -29
  2. package/assets/browser/favicon.svg +1 -0
  3. package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
  4. package/assets/browser/nunito-sans-bold.woff2 +0 -0
  5. package/assets/browser/nunito-sans-italic.woff2 +0 -0
  6. package/assets/browser/nunito-sans-regular.woff2 +0 -0
  7. package/assets/docs/message-reference.png +0 -0
  8. package/assets/server/addon.tsconfig.json +6 -0
  9. package/assets/server/base-preview-body.html +119 -0
  10. package/assets/server/base-preview-head.html +451 -0
  11. package/assets/server/template.ejs +87 -0
  12. package/bin/index.cjs +1 -1
  13. package/dist/babel/index.cjs +54034 -0
  14. package/dist/babel/index.d.ts +7488 -0
  15. package/dist/babel/index.js +54044 -0
  16. package/dist/bin/index.cjs +124 -0
  17. package/dist/bin/index.js +118 -0
  18. package/dist/builder-manager/index.cjs +2167 -0
  19. package/dist/builder-manager/index.d.ts +19 -0
  20. package/dist/builder-manager/index.js +2189 -0
  21. package/dist/channels/index.cjs +1938 -0
  22. package/dist/channels/index.d.ts +108 -0
  23. package/dist/channels/index.js +1885 -0
  24. package/dist/cli/bin/index.cjs +2687 -0
  25. package/dist/cli/bin/index.d.ts +2 -0
  26. package/dist/cli/bin/index.js +2707 -0
  27. package/dist/cli/index.cjs +17327 -0
  28. package/dist/cli/index.d.ts +209 -0
  29. package/dist/cli/index.js +17349 -0
  30. package/dist/client-logger/index.cjs +112 -0
  31. package/dist/client-logger/index.d.ts +29 -0
  32. package/dist/client-logger/index.js +70 -0
  33. package/dist/common/index.cjs +20558 -0
  34. package/dist/common/index.d.ts +955 -0
  35. package/dist/common/index.js +20643 -0
  36. package/dist/components/index.cjs +30056 -0
  37. package/dist/components/index.d.ts +1423 -0
  38. package/dist/components/index.js +25416 -0
  39. package/dist/core-events/index.cjs +167 -0
  40. package/dist/core-events/index.d.ts +313 -0
  41. package/dist/core-events/index.js +149 -0
  42. package/dist/core-server/index.cjs +37872 -0
  43. package/dist/core-server/index.d.ts +462 -0
  44. package/dist/core-server/index.js +37966 -0
  45. package/dist/core-server/presets/common-manager.js +28 -0
  46. package/dist/core-server/presets/common-override-preset.cjs +4824 -0
  47. package/dist/core-server/presets/common-override-preset.js +4829 -0
  48. package/dist/core-server/presets/common-preset.cjs +10228 -0
  49. package/dist/core-server/presets/common-preset.js +10306 -0
  50. package/dist/csf/index.cjs +223 -0
  51. package/dist/csf/index.d.ts +752 -0
  52. package/dist/csf/index.js +216 -0
  53. package/dist/csf-tools/index.cjs +1422 -0
  54. package/dist/csf-tools/index.d.ts +250 -0
  55. package/dist/csf-tools/index.js +1439 -0
  56. package/dist/docs-tools/index.cjs +923 -0
  57. package/dist/docs-tools/index.d.ts +162 -0
  58. package/dist/docs-tools/index.js +909 -0
  59. package/dist/index.cjs +17 -1
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.js +2 -7
  62. package/dist/instrumenter/index.cjs +3273 -0
  63. package/dist/instrumenter/index.d.ts +104 -0
  64. package/dist/instrumenter/index.js +4800 -0
  65. package/dist/manager/globals-module-info.cjs +666 -0
  66. package/dist/manager/globals-module-info.d.ts +36 -0
  67. package/dist/manager/globals-module-info.js +653 -0
  68. package/dist/manager/globals-runtime.js +41567 -0
  69. package/dist/manager/globals.cjs +43 -0
  70. package/dist/manager/globals.d.ts +21 -0
  71. package/dist/manager/globals.js +30 -0
  72. package/dist/manager/runtime.js +12043 -0
  73. package/dist/manager-api/index.cjs +10772 -0
  74. package/dist/manager-api/index.d.ts +1211 -0
  75. package/dist/manager-api/index.js +4547 -0
  76. package/dist/manager-errors.d.ts +65 -0
  77. package/dist/manager-errors.js +83 -0
  78. package/dist/node-logger/index.cjs +1642 -0
  79. package/dist/node-logger/index.d.ts +117 -0
  80. package/dist/node-logger/index.js +1652 -0
  81. package/dist/preview/globals.cjs +34 -0
  82. package/dist/preview/globals.d.ts +12 -0
  83. package/dist/preview/globals.js +21 -0
  84. package/dist/preview/runtime.js +7723 -0
  85. package/dist/preview-api/index.cjs +5658 -0
  86. package/dist/preview-api/index.d.ts +1356 -0
  87. package/dist/preview-api/index.js +5665 -0
  88. package/dist/preview-errors.cjs +486 -0
  89. package/dist/preview-errors.d.ts +188 -0
  90. package/dist/preview-errors.js +433 -0
  91. package/dist/router/index.cjs +3320 -0
  92. package/dist/router/index.d.ts +385 -0
  93. package/dist/router/index.js +1849 -0
  94. package/dist/server-errors.cjs +710 -0
  95. package/dist/server-errors.d.ts +272 -0
  96. package/dist/server-errors.js +711 -0
  97. package/dist/telemetry/index.cjs +3683 -0
  98. package/dist/telemetry/index.d.ts +112 -0
  99. package/dist/telemetry/index.js +3720 -0
  100. package/dist/theming/create.cjs +2422 -0
  101. package/dist/theming/create.d.ts +50 -0
  102. package/dist/theming/create.js +990 -0
  103. package/dist/theming/index.cjs +4832 -0
  104. package/dist/theming/index.d.ts +11939 -0
  105. package/dist/theming/index.js +3253 -0
  106. package/dist/types/index.cjs +27 -0
  107. package/dist/types/index.d.ts +2541 -0
  108. package/dist/types/index.js +7 -0
  109. package/package.json +308 -212
  110. package/.eslintrc.cjs +0 -31
  111. package/__mocks__/@aw-web-design/x-default-browser.js +0 -2
  112. package/core/babel/index.cjs +0 -1
  113. package/core/babel/index.d.ts +0 -2
  114. package/core/babel/index.js +0 -1
  115. package/core/builder-manager/index.cjs +0 -1
  116. package/core/builder-manager/index.d.ts +0 -2
  117. package/core/builder-manager/index.js +0 -1
  118. package/core/channels/index.cjs +0 -1
  119. package/core/channels/index.d.ts +0 -2
  120. package/core/channels/index.js +0 -1
  121. package/core/cli/bin/index.cjs +0 -1
  122. package/core/cli/bin/index.d.ts +0 -2
  123. package/core/cli/bin/index.js +0 -1
  124. package/core/cli/index.cjs +0 -1
  125. package/core/cli/index.d.ts +0 -2
  126. package/core/cli/index.js +0 -1
  127. package/core/client-logger/index.cjs +0 -1
  128. package/core/client-logger/index.d.ts +0 -2
  129. package/core/client-logger/index.js +0 -1
  130. package/core/common/index.cjs +0 -1
  131. package/core/common/index.d.ts +0 -2
  132. package/core/common/index.js +0 -1
  133. package/core/components/index.cjs +0 -1
  134. package/core/components/index.d.ts +0 -2
  135. package/core/components/index.js +0 -1
  136. package/core/core-events/index.cjs +0 -1
  137. package/core/core-events/index.d.ts +0 -2
  138. package/core/core-events/index.js +0 -1
  139. package/core/core-server/index.cjs +0 -1
  140. package/core/core-server/index.d.ts +0 -2
  141. package/core/core-server/index.js +0 -1
  142. package/core/core-server/presets/common-manager.js +0 -1
  143. package/core/core-server/presets/common-override-preset.cjs +0 -1
  144. package/core/core-server/presets/common-override-preset.js +0 -1
  145. package/core/core-server/presets/common-preset.cjs +0 -1
  146. package/core/core-server/presets/common-preset.js +0 -1
  147. package/core/csf/index.cjs +0 -1
  148. package/core/csf/index.d.ts +0 -2
  149. package/core/csf/index.js +0 -1
  150. package/core/csf-tools/index.cjs +0 -1
  151. package/core/csf-tools/index.d.ts +0 -2
  152. package/core/csf-tools/index.js +0 -1
  153. package/core/docs-tools/index.cjs +0 -1
  154. package/core/docs-tools/index.d.ts +0 -2
  155. package/core/docs-tools/index.js +0 -1
  156. package/core/index.cjs +0 -1
  157. package/core/index.d.ts +0 -2
  158. package/core/index.js +0 -1
  159. package/core/manager/globals-module-info.cjs +0 -1
  160. package/core/manager/globals-module-info.d.ts +0 -2
  161. package/core/manager/globals-module-info.js +0 -1
  162. package/core/manager/globals-runtime.js +0 -1
  163. package/core/manager/globals.cjs +0 -1
  164. package/core/manager/globals.d.ts +0 -2
  165. package/core/manager/globals.js +0 -1
  166. package/core/manager-api/index.cjs +0 -1
  167. package/core/manager-api/index.d.ts +0 -2
  168. package/core/manager-api/index.js +0 -1
  169. package/core/manager-errors.d.ts +0 -2
  170. package/core/manager-errors.js +0 -1
  171. package/core/node-logger/index.cjs +0 -1
  172. package/core/node-logger/index.d.ts +0 -2
  173. package/core/node-logger/index.js +0 -1
  174. package/core/preview/globals.cjs +0 -1
  175. package/core/preview/globals.d.ts +0 -2
  176. package/core/preview/globals.js +0 -1
  177. package/core/preview/runtime.js +0 -1
  178. package/core/preview-api/index.cjs +0 -1
  179. package/core/preview-api/index.d.ts +0 -2
  180. package/core/preview-api/index.js +0 -1
  181. package/core/preview-errors.cjs +0 -1
  182. package/core/preview-errors.d.ts +0 -2
  183. package/core/preview-errors.js +0 -1
  184. package/core/router/index.cjs +0 -1
  185. package/core/router/index.d.ts +0 -2
  186. package/core/router/index.js +0 -1
  187. package/core/server-errors.cjs +0 -1
  188. package/core/server-errors.d.ts +0 -2
  189. package/core/server-errors.js +0 -1
  190. package/core/telemetry/index.cjs +0 -1
  191. package/core/telemetry/index.d.ts +0 -2
  192. package/core/telemetry/index.js +0 -1
  193. package/core/theming/create.cjs +0 -1
  194. package/core/theming/create.d.ts +0 -2
  195. package/core/theming/create.js +0 -1
  196. package/core/theming/index.cjs +0 -1
  197. package/core/theming/index.d.ts +0 -2
  198. package/core/theming/index.js +0 -1
  199. package/core/types/index.cjs +0 -1
  200. package/core/types/index.d.ts +0 -2
  201. package/core/types/index.js +0 -1
  202. package/core.cjs +0 -0
  203. package/core.d.ts +0 -0
  204. package/core.js +0 -1
  205. package/dist/chunk-OWLSIX54.js +0 -8
  206. package/dist/core-path.cjs +0 -1
  207. package/dist/core-path.d.ts +0 -3
  208. package/dist/core-path.js +0 -9
  209. package/dist/proxy.cjs +0 -1
  210. package/dist/proxy.d.ts +0 -2
  211. package/dist/proxy.js +0 -9
@@ -0,0 +1,4800 @@
1
+ var mc = Object.defineProperty;
2
+ var i = (e, t) => mc(e, "name", { value: t, configurable: !0 });
3
+ var E = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
4
+
5
+ // ../node_modules/has-symbols/shams.js
6
+ var hr = E((Cy, Hn) => {
7
+ "use strict";
8
+ Hn.exports = /* @__PURE__ */ i(function() {
9
+ if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
10
+ return !1;
11
+ if (typeof Symbol.iterator == "symbol")
12
+ return !0;
13
+ var t = {}, r = Symbol("test"), n = Object(r);
14
+ if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Sy\
15
+ mbol]")
16
+ return !1;
17
+ var o = 42;
18
+ t[r] = o;
19
+ for (var s in t)
20
+ return !1;
21
+ if (typeof Object.keys == "function" && Object.keys(t).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(
22
+ t).length !== 0)
23
+ return !1;
24
+ var c = Object.getOwnPropertySymbols(t);
25
+ if (c.length !== 1 || c[0] !== r || !Object.prototype.propertyIsEnumerable.call(t, r))
26
+ return !1;
27
+ if (typeof Object.getOwnPropertyDescriptor == "function") {
28
+ var a = (
29
+ /** @type {PropertyDescriptor} */
30
+ Object.getOwnPropertyDescriptor(t, r)
31
+ );
32
+ if (a.value !== o || a.enumerable !== !0)
33
+ return !1;
34
+ }
35
+ return !0;
36
+ }, "hasSymbols");
37
+ });
38
+
39
+ // ../node_modules/has-tostringtag/shams.js
40
+ var yt = E((Ry, Jn) => {
41
+ "use strict";
42
+ var ka = hr();
43
+ Jn.exports = /* @__PURE__ */ i(function() {
44
+ return ka() && !!Symbol.toStringTag;
45
+ }, "hasToStringTagShams");
46
+ });
47
+
48
+ // ../node_modules/es-object-atoms/index.js
49
+ var dr = E((Ny, Kn) => {
50
+ "use strict";
51
+ Kn.exports = Object;
52
+ });
53
+
54
+ // ../node_modules/es-errors/index.js
55
+ var Zn = E((xy, Xn) => {
56
+ "use strict";
57
+ Xn.exports = Error;
58
+ });
59
+
60
+ // ../node_modules/es-errors/eval.js
61
+ var eo = E((My, Qn) => {
62
+ "use strict";
63
+ Qn.exports = EvalError;
64
+ });
65
+
66
+ // ../node_modules/es-errors/range.js
67
+ var ro = E((vy, to) => {
68
+ "use strict";
69
+ to.exports = RangeError;
70
+ });
71
+
72
+ // ../node_modules/es-errors/ref.js
73
+ var oo = E((Fy, no) => {
74
+ "use strict";
75
+ no.exports = ReferenceError;
76
+ });
77
+
78
+ // ../node_modules/es-errors/syntax.js
79
+ var br = E((Dy, io) => {
80
+ "use strict";
81
+ io.exports = SyntaxError;
82
+ });
83
+
84
+ // ../node_modules/es-errors/type.js
85
+ var Ue = E((Ly, so) => {
86
+ "use strict";
87
+ so.exports = TypeError;
88
+ });
89
+
90
+ // ../node_modules/es-errors/uri.js
91
+ var ao = E((By, co) => {
92
+ "use strict";
93
+ co.exports = URIError;
94
+ });
95
+
96
+ // ../node_modules/math-intrinsics/abs.js
97
+ var lo = E((ky, uo) => {
98
+ "use strict";
99
+ uo.exports = Math.abs;
100
+ });
101
+
102
+ // ../node_modules/math-intrinsics/floor.js
103
+ var po = E((Uy, fo) => {
104
+ "use strict";
105
+ fo.exports = Math.floor;
106
+ });
107
+
108
+ // ../node_modules/math-intrinsics/max.js
109
+ var go = E((qy, yo) => {
110
+ "use strict";
111
+ yo.exports = Math.max;
112
+ });
113
+
114
+ // ../node_modules/math-intrinsics/min.js
115
+ var ho = E((zy, mo) => {
116
+ "use strict";
117
+ mo.exports = Math.min;
118
+ });
119
+
120
+ // ../node_modules/math-intrinsics/pow.js
121
+ var So = E((Wy, bo) => {
122
+ "use strict";
123
+ bo.exports = Math.pow;
124
+ });
125
+
126
+ // ../node_modules/math-intrinsics/round.js
127
+ var Oo = E((Gy, Ao) => {
128
+ "use strict";
129
+ Ao.exports = Math.round;
130
+ });
131
+
132
+ // ../node_modules/math-intrinsics/isNaN.js
133
+ var Eo = E((Vy, wo) => {
134
+ "use strict";
135
+ wo.exports = Number.isNaN || /* @__PURE__ */ i(function(t) {
136
+ return t !== t;
137
+ }, "isNaN");
138
+ });
139
+
140
+ // ../node_modules/math-intrinsics/sign.js
141
+ var To = E((Hy, _o) => {
142
+ "use strict";
143
+ var Ua = Eo();
144
+ _o.exports = /* @__PURE__ */ i(function(t) {
145
+ return Ua(t) || t === 0 ? t : t < 0 ? -1 : 1;
146
+ }, "sign");
147
+ });
148
+
149
+ // ../node_modules/gopd/gOPD.js
150
+ var Po = E((Ky, $o) => {
151
+ "use strict";
152
+ $o.exports = Object.getOwnPropertyDescriptor;
153
+ });
154
+
155
+ // ../node_modules/gopd/index.js
156
+ var $e = E((Xy, Co) => {
157
+ "use strict";
158
+ var gt = Po();
159
+ if (gt)
160
+ try {
161
+ gt([], "length");
162
+ } catch {
163
+ gt = null;
164
+ }
165
+ Co.exports = gt;
166
+ });
167
+
168
+ // ../node_modules/es-define-property/index.js
169
+ var qe = E((Zy, Io) => {
170
+ "use strict";
171
+ var mt = Object.defineProperty || !1;
172
+ if (mt)
173
+ try {
174
+ mt({}, "a", { value: 1 });
175
+ } catch {
176
+ mt = !1;
177
+ }
178
+ Io.exports = mt;
179
+ });
180
+
181
+ // ../node_modules/has-symbols/index.js
182
+ var No = E((Qy, jo) => {
183
+ "use strict";
184
+ var Ro = typeof Symbol < "u" && Symbol, qa = hr();
185
+ jo.exports = /* @__PURE__ */ i(function() {
186
+ return typeof Ro != "function" || typeof Symbol != "function" || typeof Ro("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
187
+ qa();
188
+ }, "hasNativeSymbols");
189
+ });
190
+
191
+ // ../node_modules/get-proto/Reflect.getPrototypeOf.js
192
+ var Sr = E((tg, xo) => {
193
+ "use strict";
194
+ xo.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
195
+ });
196
+
197
+ // ../node_modules/get-proto/Object.getPrototypeOf.js
198
+ var Ar = E((rg, Mo) => {
199
+ "use strict";
200
+ var za = dr();
201
+ Mo.exports = za.getPrototypeOf || null;
202
+ });
203
+
204
+ // ../node_modules/function-bind/implementation.js
205
+ var Do = E((ng, Fo) => {
206
+ "use strict";
207
+ var Wa = "Function.prototype.bind called on incompatible ", Ga = Object.prototype.toString, Va = Math.max, Ya = "[object Function]", vo = /* @__PURE__ */ i(
208
+ function(t, r) {
209
+ for (var n = [], o = 0; o < t.length; o += 1)
210
+ n[o] = t[o];
211
+ for (var s = 0; s < r.length; s += 1)
212
+ n[s + t.length] = r[s];
213
+ return n;
214
+ }, "concatty"), Ha = /* @__PURE__ */ i(function(t, r) {
215
+ for (var n = [], o = r || 0, s = 0; o < t.length; o += 1, s += 1)
216
+ n[s] = t[o];
217
+ return n;
218
+ }, "slicy"), Ja = /* @__PURE__ */ i(function(e, t) {
219
+ for (var r = "", n = 0; n < e.length; n += 1)
220
+ r += e[n], n + 1 < e.length && (r += t);
221
+ return r;
222
+ }, "joiny");
223
+ Fo.exports = /* @__PURE__ */ i(function(t) {
224
+ var r = this;
225
+ if (typeof r != "function" || Ga.apply(r) !== Ya)
226
+ throw new TypeError(Wa + r);
227
+ for (var n = Ha(arguments, 1), o, s = /* @__PURE__ */ i(function() {
228
+ if (this instanceof o) {
229
+ var p = r.apply(
230
+ this,
231
+ vo(n, arguments)
232
+ );
233
+ return Object(p) === p ? p : this;
234
+ }
235
+ return r.apply(
236
+ t,
237
+ vo(n, arguments)
238
+ );
239
+ }, "binder"), c = Va(0, r.length - n.length), a = [], u = 0; u < c; u++)
240
+ a[u] = "$" + u;
241
+ if (o = Function("binder", "return function (" + Ja(a, ",") + "){ return binder.apply(this,arguments); }")(s), r.prototype) {
242
+ var f = /* @__PURE__ */ i(function() {
243
+ }, "Empty");
244
+ f.prototype = r.prototype, o.prototype = new f(), f.prototype = null;
245
+ }
246
+ return o;
247
+ }, "bind");
248
+ });
249
+
250
+ // ../node_modules/function-bind/index.js
251
+ var Pe = E((ig, Lo) => {
252
+ "use strict";
253
+ var Ka = Do();
254
+ Lo.exports = Function.prototype.bind || Ka;
255
+ });
256
+
257
+ // ../node_modules/call-bind-apply-helpers/functionCall.js
258
+ var ht = E((sg, Bo) => {
259
+ "use strict";
260
+ Bo.exports = Function.prototype.call;
261
+ });
262
+
263
+ // ../node_modules/call-bind-apply-helpers/functionApply.js
264
+ var dt = E((cg, ko) => {
265
+ "use strict";
266
+ ko.exports = Function.prototype.apply;
267
+ });
268
+
269
+ // ../node_modules/call-bind-apply-helpers/reflectApply.js
270
+ var qo = E((ag, Uo) => {
271
+ "use strict";
272
+ Uo.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
273
+ });
274
+
275
+ // ../node_modules/call-bind-apply-helpers/actualApply.js
276
+ var Or = E((ug, zo) => {
277
+ "use strict";
278
+ var Xa = Pe(), Za = dt(), Qa = ht(), eu = qo();
279
+ zo.exports = eu || Xa.call(Qa, Za);
280
+ });
281
+
282
+ // ../node_modules/call-bind-apply-helpers/index.js
283
+ var bt = E((lg, Wo) => {
284
+ "use strict";
285
+ var tu = Pe(), ru = Ue(), nu = ht(), ou = Or();
286
+ Wo.exports = /* @__PURE__ */ i(function(t) {
287
+ if (t.length < 1 || typeof t[0] != "function")
288
+ throw new ru("a function is required");
289
+ return ou(tu, nu, t);
290
+ }, "callBindBasic");
291
+ });
292
+
293
+ // ../node_modules/dunder-proto/get.js
294
+ var Ko = E((pg, Jo) => {
295
+ "use strict";
296
+ var iu = bt(), Go = $e(), Yo;
297
+ try {
298
+ Yo = /** @type {{ __proto__?: typeof Array.prototype }} */
299
+ [].__proto__ === Array.prototype;
300
+ } catch (e) {
301
+ if (!e || typeof e != "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS")
302
+ throw e;
303
+ }
304
+ var wr = !!Yo && Go && Go(
305
+ Object.prototype,
306
+ /** @type {keyof typeof Object.prototype} */
307
+ "__proto__"
308
+ ), Ho = Object, Vo = Ho.getPrototypeOf;
309
+ Jo.exports = wr && typeof wr.get == "function" ? iu([wr.get]) : typeof Vo == "function" ? (
310
+ /** @type {import('./get')} */
311
+ /* @__PURE__ */ i(function(t) {
312
+ return Vo(t == null ? t : Ho(t));
313
+ }, "getDunder")
314
+ ) : !1;
315
+ });
316
+
317
+ // ../node_modules/get-proto/index.js
318
+ var ti = E((gg, ei) => {
319
+ "use strict";
320
+ var Xo = Sr(), Zo = Ar(), Qo = Ko();
321
+ ei.exports = Xo ? /* @__PURE__ */ i(function(t) {
322
+ return Xo(t);
323
+ }, "getProto") : Zo ? /* @__PURE__ */ i(function(t) {
324
+ if (!t || typeof t != "object" && typeof t != "function")
325
+ throw new TypeError("getProto: not an object");
326
+ return Zo(t);
327
+ }, "getProto") : Qo ? /* @__PURE__ */ i(function(t) {
328
+ return Qo(t);
329
+ }, "getProto") : null;
330
+ });
331
+
332
+ // ../node_modules/hasown/index.js
333
+ var ni = E((hg, ri) => {
334
+ "use strict";
335
+ var su = Function.prototype.call, cu = Object.prototype.hasOwnProperty, au = Pe();
336
+ ri.exports = au.call(su, cu);
337
+ });
338
+
339
+ // ../node_modules/get-intrinsic/index.js
340
+ var Ot = E((dg, ui) => {
341
+ "use strict";
342
+ var I, uu = dr(), lu = Zn(), fu = eo(), pu = ro(), yu = oo(), je = br(), Re = Ue(), gu = ao(), mu = lo(), hu = po(), du = go(), bu = ho(),
343
+ Su = So(), Au = Oo(), Ou = To(), ci = Function, Er = /* @__PURE__ */ i(function(e) {
344
+ try {
345
+ return ci('"use strict"; return (' + e + ").constructor;")();
346
+ } catch {
347
+ }
348
+ }, "getEvalledConstructor"), ze = $e(), wu = qe(), _r = /* @__PURE__ */ i(function() {
349
+ throw new Re();
350
+ }, "throwTypeError"), Eu = ze ? function() {
351
+ try {
352
+ return arguments.callee, _r;
353
+ } catch {
354
+ try {
355
+ return ze(arguments, "callee").get;
356
+ } catch {
357
+ return _r;
358
+ }
359
+ }
360
+ }() : _r, Ce = No()(), k = ti(), _u = Ar(), Tu = Sr(), ai = dt(), We = ht(), Ie = {}, $u = typeof Uint8Array > "u" || !k ? I : k(Uint8Array),
361
+ Se = {
362
+ __proto__: null,
363
+ "%AggregateError%": typeof AggregateError > "u" ? I : AggregateError,
364
+ "%Array%": Array,
365
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? I : ArrayBuffer,
366
+ "%ArrayIteratorPrototype%": Ce && k ? k([][Symbol.iterator]()) : I,
367
+ "%AsyncFromSyncIteratorPrototype%": I,
368
+ "%AsyncFunction%": Ie,
369
+ "%AsyncGenerator%": Ie,
370
+ "%AsyncGeneratorFunction%": Ie,
371
+ "%AsyncIteratorPrototype%": Ie,
372
+ "%Atomics%": typeof Atomics > "u" ? I : Atomics,
373
+ "%BigInt%": typeof BigInt > "u" ? I : BigInt,
374
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? I : BigInt64Array,
375
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? I : BigUint64Array,
376
+ "%Boolean%": Boolean,
377
+ "%DataView%": typeof DataView > "u" ? I : DataView,
378
+ "%Date%": Date,
379
+ "%decodeURI%": decodeURI,
380
+ "%decodeURIComponent%": decodeURIComponent,
381
+ "%encodeURI%": encodeURI,
382
+ "%encodeURIComponent%": encodeURIComponent,
383
+ "%Error%": lu,
384
+ "%eval%": eval,
385
+ // eslint-disable-line no-eval
386
+ "%EvalError%": fu,
387
+ "%Float32Array%": typeof Float32Array > "u" ? I : Float32Array,
388
+ "%Float64Array%": typeof Float64Array > "u" ? I : Float64Array,
389
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? I : FinalizationRegistry,
390
+ "%Function%": ci,
391
+ "%GeneratorFunction%": Ie,
392
+ "%Int8Array%": typeof Int8Array > "u" ? I : Int8Array,
393
+ "%Int16Array%": typeof Int16Array > "u" ? I : Int16Array,
394
+ "%Int32Array%": typeof Int32Array > "u" ? I : Int32Array,
395
+ "%isFinite%": isFinite,
396
+ "%isNaN%": isNaN,
397
+ "%IteratorPrototype%": Ce && k ? k(k([][Symbol.iterator]())) : I,
398
+ "%JSON%": typeof JSON == "object" ? JSON : I,
399
+ "%Map%": typeof Map > "u" ? I : Map,
400
+ "%MapIteratorPrototype%": typeof Map > "u" || !Ce || !k ? I : k((/* @__PURE__ */ new Map())[Symbol.iterator]()),
401
+ "%Math%": Math,
402
+ "%Number%": Number,
403
+ "%Object%": uu,
404
+ "%Object.getOwnPropertyDescriptor%": ze,
405
+ "%parseFloat%": parseFloat,
406
+ "%parseInt%": parseInt,
407
+ "%Promise%": typeof Promise > "u" ? I : Promise,
408
+ "%Proxy%": typeof Proxy > "u" ? I : Proxy,
409
+ "%RangeError%": pu,
410
+ "%ReferenceError%": yu,
411
+ "%Reflect%": typeof Reflect > "u" ? I : Reflect,
412
+ "%RegExp%": RegExp,
413
+ "%Set%": typeof Set > "u" ? I : Set,
414
+ "%SetIteratorPrototype%": typeof Set > "u" || !Ce || !k ? I : k((/* @__PURE__ */ new Set())[Symbol.iterator]()),
415
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? I : SharedArrayBuffer,
416
+ "%String%": String,
417
+ "%StringIteratorPrototype%": Ce && k ? k(""[Symbol.iterator]()) : I,
418
+ "%Symbol%": Ce ? Symbol : I,
419
+ "%SyntaxError%": je,
420
+ "%ThrowTypeError%": Eu,
421
+ "%TypedArray%": $u,
422
+ "%TypeError%": Re,
423
+ "%Uint8Array%": typeof Uint8Array > "u" ? I : Uint8Array,
424
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? I : Uint8ClampedArray,
425
+ "%Uint16Array%": typeof Uint16Array > "u" ? I : Uint16Array,
426
+ "%Uint32Array%": typeof Uint32Array > "u" ? I : Uint32Array,
427
+ "%URIError%": gu,
428
+ "%WeakMap%": typeof WeakMap > "u" ? I : WeakMap,
429
+ "%WeakRef%": typeof WeakRef > "u" ? I : WeakRef,
430
+ "%WeakSet%": typeof WeakSet > "u" ? I : WeakSet,
431
+ "%Function.prototype.call%": We,
432
+ "%Function.prototype.apply%": ai,
433
+ "%Object.defineProperty%": wu,
434
+ "%Object.getPrototypeOf%": _u,
435
+ "%Math.abs%": mu,
436
+ "%Math.floor%": hu,
437
+ "%Math.max%": du,
438
+ "%Math.min%": bu,
439
+ "%Math.pow%": Su,
440
+ "%Math.round%": Au,
441
+ "%Math.sign%": Ou,
442
+ "%Reflect.getPrototypeOf%": Tu
443
+ };
444
+ if (k)
445
+ try {
446
+ null.error;
447
+ } catch (e) {
448
+ oi = k(k(e)), Se["%Error.prototype%"] = oi;
449
+ }
450
+ var oi, Pu = /* @__PURE__ */ i(function e(t) {
451
+ var r;
452
+ if (t === "%AsyncFunction%")
453
+ r = Er("async function () {}");
454
+ else if (t === "%GeneratorFunction%")
455
+ r = Er("function* () {}");
456
+ else if (t === "%AsyncGeneratorFunction%")
457
+ r = Er("async function* () {}");
458
+ else if (t === "%AsyncGenerator%") {
459
+ var n = e("%AsyncGeneratorFunction%");
460
+ n && (r = n.prototype);
461
+ } else if (t === "%AsyncIteratorPrototype%") {
462
+ var o = e("%AsyncGenerator%");
463
+ o && k && (r = k(o.prototype));
464
+ }
465
+ return Se[t] = r, r;
466
+ }, "doEval"), ii = {
467
+ __proto__: null,
468
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
469
+ "%ArrayPrototype%": ["Array", "prototype"],
470
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
471
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
472
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
473
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
474
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
475
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
476
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
477
+ "%BooleanPrototype%": ["Boolean", "prototype"],
478
+ "%DataViewPrototype%": ["DataView", "prototype"],
479
+ "%DatePrototype%": ["Date", "prototype"],
480
+ "%ErrorPrototype%": ["Error", "prototype"],
481
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
482
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
483
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
484
+ "%FunctionPrototype%": ["Function", "prototype"],
485
+ "%Generator%": ["GeneratorFunction", "prototype"],
486
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
487
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
488
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
489
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
490
+ "%JSONParse%": ["JSON", "parse"],
491
+ "%JSONStringify%": ["JSON", "stringify"],
492
+ "%MapPrototype%": ["Map", "prototype"],
493
+ "%NumberPrototype%": ["Number", "prototype"],
494
+ "%ObjectPrototype%": ["Object", "prototype"],
495
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
496
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
497
+ "%PromisePrototype%": ["Promise", "prototype"],
498
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
499
+ "%Promise_all%": ["Promise", "all"],
500
+ "%Promise_reject%": ["Promise", "reject"],
501
+ "%Promise_resolve%": ["Promise", "resolve"],
502
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
503
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
504
+ "%RegExpPrototype%": ["RegExp", "prototype"],
505
+ "%SetPrototype%": ["Set", "prototype"],
506
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
507
+ "%StringPrototype%": ["String", "prototype"],
508
+ "%SymbolPrototype%": ["Symbol", "prototype"],
509
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
510
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
511
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
512
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
513
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
514
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
515
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
516
+ "%URIErrorPrototype%": ["URIError", "prototype"],
517
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
518
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
519
+ }, Ge = Pe(), St = ni(), Cu = Ge.call(We, Array.prototype.concat), Iu = Ge.call(ai, Array.prototype.splice), si = Ge.call(We, String.prototype.
520
+ replace), At = Ge.call(We, String.prototype.slice), Ru = Ge.call(We, RegExp.prototype.exec), ju = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
521
+ Nu = /\\(\\)?/g, xu = /* @__PURE__ */ i(function(t) {
522
+ var r = At(t, 0, 1), n = At(t, -1);
523
+ if (r === "%" && n !== "%")
524
+ throw new je("invalid intrinsic syntax, expected closing `%`");
525
+ if (n === "%" && r !== "%")
526
+ throw new je("invalid intrinsic syntax, expected opening `%`");
527
+ var o = [];
528
+ return si(t, ju, function(s, c, a, u) {
529
+ o[o.length] = a ? si(u, Nu, "$1") : c || s;
530
+ }), o;
531
+ }, "stringToPath"), Mu = /* @__PURE__ */ i(function(t, r) {
532
+ var n = t, o;
533
+ if (St(ii, n) && (o = ii[n], n = "%" + o[0] + "%"), St(Se, n)) {
534
+ var s = Se[n];
535
+ if (s === Ie && (s = Pu(n)), typeof s > "u" && !r)
536
+ throw new Re("intrinsic " + t + " exists, but is not available. Please file an issue!");
537
+ return {
538
+ alias: o,
539
+ name: n,
540
+ value: s
541
+ };
542
+ }
543
+ throw new je("intrinsic " + t + " does not exist!");
544
+ }, "getBaseIntrinsic");
545
+ ui.exports = /* @__PURE__ */ i(function(t, r) {
546
+ if (typeof t != "string" || t.length === 0)
547
+ throw new Re("intrinsic name must be a non-empty string");
548
+ if (arguments.length > 1 && typeof r != "boolean")
549
+ throw new Re('"allowMissing" argument must be a boolean');
550
+ if (Ru(/^%?[^%]*%?$/, t) === null)
551
+ throw new je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
552
+ var n = xu(t), o = n.length > 0 ? n[0] : "", s = Mu("%" + o + "%", r), c = s.name, a = s.value, u = !1, f = s.alias;
553
+ f && (o = f[0], Iu(n, Cu([0, 1], f)));
554
+ for (var p = 1, l = !0; p < n.length; p += 1) {
555
+ var d = n[p], y = At(d, 0, 1), g = At(d, -1);
556
+ if ((y === '"' || y === "'" || y === "`" || g === '"' || g === "'" || g === "`") && y !== g)
557
+ throw new je("property names with quotes must have matching quotes");
558
+ if ((d === "constructor" || !l) && (u = !0), o += "." + d, c = "%" + o + "%", St(Se, c))
559
+ a = Se[c];
560
+ else if (a != null) {
561
+ if (!(d in a)) {
562
+ if (!r)
563
+ throw new Re("base intrinsic for " + t + " exists, but the property is not available.");
564
+ return;
565
+ }
566
+ if (ze && p + 1 >= n.length) {
567
+ var m = ze(a, d);
568
+ l = !!m, l && "get" in m && !("originalValue" in m.get) ? a = m.get : a = a[d];
569
+ } else
570
+ l = St(a, d), a = a[d];
571
+ l && !u && (Se[c] = a);
572
+ }
573
+ }
574
+ return a;
575
+ }, "GetIntrinsic");
576
+ });
577
+
578
+ // ../node_modules/define-data-property/index.js
579
+ var yi = E((Sg, pi) => {
580
+ "use strict";
581
+ var li = qe(), vu = br(), Ne = Ue(), fi = $e();
582
+ pi.exports = /* @__PURE__ */ i(function(t, r, n) {
583
+ if (!t || typeof t != "object" && typeof t != "function")
584
+ throw new Ne("`obj` must be an object or a function`");
585
+ if (typeof r != "string" && typeof r != "symbol")
586
+ throw new Ne("`property` must be a string or a symbol`");
587
+ if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
588
+ throw new Ne("`nonEnumerable`, if provided, must be a boolean or null");
589
+ if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
590
+ throw new Ne("`nonWritable`, if provided, must be a boolean or null");
591
+ if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
592
+ throw new Ne("`nonConfigurable`, if provided, must be a boolean or null");
593
+ if (arguments.length > 6 && typeof arguments[6] != "boolean")
594
+ throw new Ne("`loose`, if provided, must be a boolean");
595
+ var o = arguments.length > 3 ? arguments[3] : null, s = arguments.length > 4 ? arguments[4] : null, c = arguments.length > 5 ? arguments[5] :
596
+ null, a = arguments.length > 6 ? arguments[6] : !1, u = !!fi && fi(t, r);
597
+ if (li)
598
+ li(t, r, {
599
+ configurable: c === null && u ? u.configurable : !c,
600
+ enumerable: o === null && u ? u.enumerable : !o,
601
+ value: n,
602
+ writable: s === null && u ? u.writable : !s
603
+ });
604
+ else if (a || !o && !s && !c)
605
+ t[r] = n;
606
+ else
607
+ throw new vu("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
608
+ }, "defineDataProperty");
609
+ });
610
+
611
+ // ../node_modules/has-property-descriptors/index.js
612
+ var hi = E((Og, mi) => {
613
+ "use strict";
614
+ var Tr = qe(), gi = /* @__PURE__ */ i(function() {
615
+ return !!Tr;
616
+ }, "hasPropertyDescriptors");
617
+ gi.hasArrayLengthDefineBug = /* @__PURE__ */ i(function() {
618
+ if (!Tr)
619
+ return null;
620
+ try {
621
+ return Tr([], "length", { value: 1 }).length !== 1;
622
+ } catch {
623
+ return !0;
624
+ }
625
+ }, "hasArrayLengthDefineBug");
626
+ mi.exports = gi;
627
+ });
628
+
629
+ // ../node_modules/set-function-length/index.js
630
+ var Oi = E((Eg, Ai) => {
631
+ "use strict";
632
+ var Fu = Ot(), di = yi(), Du = hi()(), bi = $e(), Si = Ue(), Lu = Fu("%Math.floor%");
633
+ Ai.exports = /* @__PURE__ */ i(function(t, r) {
634
+ if (typeof t != "function")
635
+ throw new Si("`fn` is not a function");
636
+ if (typeof r != "number" || r < 0 || r > 4294967295 || Lu(r) !== r)
637
+ throw new Si("`length` must be a positive 32-bit integer");
638
+ var n = arguments.length > 2 && !!arguments[2], o = !0, s = !0;
639
+ if ("length" in t && bi) {
640
+ var c = bi(t, "length");
641
+ c && !c.configurable && (o = !1), c && !c.writable && (s = !1);
642
+ }
643
+ return (o || s || !n) && (Du ? di(
644
+ /** @type {Parameters<define>[0]} */
645
+ t,
646
+ "length",
647
+ r,
648
+ !0,
649
+ !0
650
+ ) : di(
651
+ /** @type {Parameters<define>[0]} */
652
+ t,
653
+ "length",
654
+ r
655
+ )), t;
656
+ }, "setFunctionLength");
657
+ });
658
+
659
+ // ../node_modules/call-bind-apply-helpers/applyBind.js
660
+ var Ei = E((Tg, wi) => {
661
+ "use strict";
662
+ var Bu = Pe(), ku = dt(), Uu = Or();
663
+ wi.exports = /* @__PURE__ */ i(function() {
664
+ return Uu(Bu, ku, arguments);
665
+ }, "applyBind");
666
+ });
667
+
668
+ // ../node_modules/call-bind/index.js
669
+ var $r = E((Pg, wt) => {
670
+ "use strict";
671
+ var qu = Oi(), _i = qe(), zu = bt(), Ti = Ei();
672
+ wt.exports = /* @__PURE__ */ i(function(t) {
673
+ var r = zu(arguments), n = t.length - (arguments.length - 1);
674
+ return qu(
675
+ r,
676
+ 1 + (n > 0 ? n : 0),
677
+ !0
678
+ );
679
+ }, "callBind");
680
+ _i ? _i(wt.exports, "apply", { value: Ti }) : wt.exports.apply = Ti;
681
+ });
682
+
683
+ // ../node_modules/call-bind/callBound.js
684
+ var Ii = E((Ig, Ci) => {
685
+ "use strict";
686
+ var $i = Ot(), Pi = $r(), Wu = Pi($i("String.prototype.indexOf"));
687
+ Ci.exports = /* @__PURE__ */ i(function(t, r) {
688
+ var n = $i(t, !!r);
689
+ return typeof n == "function" && Wu(t, ".prototype.") > -1 ? Pi(n) : n;
690
+ }, "callBoundIntrinsic");
691
+ });
692
+
693
+ // ../node_modules/is-arguments/index.js
694
+ var Ni = E((jg, ji) => {
695
+ "use strict";
696
+ var Gu = yt()(), Vu = Ii(), Pr = Vu("Object.prototype.toString"), Et = /* @__PURE__ */ i(function(t) {
697
+ return Gu && t && typeof t == "object" && Symbol.toStringTag in t ? !1 : Pr(t) === "[object Arguments]";
698
+ }, "isArguments"), Ri = /* @__PURE__ */ i(function(t) {
699
+ return Et(t) ? !0 : t !== null && typeof t == "object" && typeof t.length == "number" && t.length >= 0 && Pr(t) !== "[object Array]" && Pr(
700
+ t.callee) === "[object Function]";
701
+ }, "isArguments"), Yu = function() {
702
+ return Et(arguments);
703
+ }();
704
+ Et.isLegacyArguments = Ri;
705
+ ji.exports = Yu ? Et : Ri;
706
+ });
707
+
708
+ // ../node_modules/is-generator-function/index.js
709
+ var vi = E((xg, Mi) => {
710
+ "use strict";
711
+ var Hu = Object.prototype.toString, Ju = Function.prototype.toString, Ku = /^\s*(?:function)?\*/, xi = yt()(), Cr = Object.getPrototypeOf,
712
+ Xu = /* @__PURE__ */ i(function() {
713
+ if (!xi)
714
+ return !1;
715
+ try {
716
+ return Function("return function*() {}")();
717
+ } catch {
718
+ }
719
+ }, "getGeneratorFunc"), Ir;
720
+ Mi.exports = /* @__PURE__ */ i(function(t) {
721
+ if (typeof t != "function")
722
+ return !1;
723
+ if (Ku.test(Ju.call(t)))
724
+ return !0;
725
+ if (!xi) {
726
+ var r = Hu.call(t);
727
+ return r === "[object GeneratorFunction]";
728
+ }
729
+ if (!Cr)
730
+ return !1;
731
+ if (typeof Ir > "u") {
732
+ var n = Xu();
733
+ Ir = n ? Cr(n) : !1;
734
+ }
735
+ return Cr(t) === Ir;
736
+ }, "isGeneratorFunction");
737
+ });
738
+
739
+ // ../node_modules/is-callable/index.js
740
+ var Bi = E((vg, Li) => {
741
+ "use strict";
742
+ var Di = Function.prototype.toString, xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, jr, _t;
743
+ if (typeof xe == "function" && typeof Object.defineProperty == "function")
744
+ try {
745
+ jr = Object.defineProperty({}, "length", {
746
+ get: /* @__PURE__ */ i(function() {
747
+ throw _t;
748
+ }, "get")
749
+ }), _t = {}, xe(function() {
750
+ throw 42;
751
+ }, null, jr);
752
+ } catch (e) {
753
+ e !== _t && (xe = null);
754
+ }
755
+ else
756
+ xe = null;
757
+ var Zu = /^\s*class\b/, Nr = /* @__PURE__ */ i(function(t) {
758
+ try {
759
+ var r = Di.call(t);
760
+ return Zu.test(r);
761
+ } catch {
762
+ return !1;
763
+ }
764
+ }, "isES6ClassFunction"), Rr = /* @__PURE__ */ i(function(t) {
765
+ try {
766
+ return Nr(t) ? !1 : (Di.call(t), !0);
767
+ } catch {
768
+ return !1;
769
+ }
770
+ }, "tryFunctionToStr"), Tt = Object.prototype.toString, Qu = "[object Object]", el = "[object Function]", tl = "[object GeneratorFunction]",
771
+ rl = "[object HTMLAllCollection]", nl = "[object HTML document.all class]", ol = "[object HTMLCollection]", il = typeof Symbol == "functio\
772
+ n" && !!Symbol.toStringTag, sl = !(0 in [,]), xr = /* @__PURE__ */ i(function() {
773
+ return !1;
774
+ }, "isDocumentDotAll");
775
+ typeof document == "object" && (Fi = document.all, Tt.call(Fi) === Tt.call(document.all) && (xr = /* @__PURE__ */ i(function(t) {
776
+ if ((sl || !t) && (typeof t > "u" || typeof t == "object"))
777
+ try {
778
+ var r = Tt.call(t);
779
+ return (r === rl || r === nl || r === ol || r === Qu) && t("") == null;
780
+ } catch {
781
+ }
782
+ return !1;
783
+ }, "isDocumentDotAll")));
784
+ var Fi;
785
+ Li.exports = /* @__PURE__ */ i(xe ? function(t) {
786
+ if (xr(t))
787
+ return !0;
788
+ if (!t || typeof t != "function" && typeof t != "object")
789
+ return !1;
790
+ try {
791
+ xe(t, null, jr);
792
+ } catch (r) {
793
+ if (r !== _t)
794
+ return !1;
795
+ }
796
+ return !Nr(t) && Rr(t);
797
+ } : function(t) {
798
+ if (xr(t))
799
+ return !0;
800
+ if (!t || typeof t != "function" && typeof t != "object")
801
+ return !1;
802
+ if (il)
803
+ return Rr(t);
804
+ if (Nr(t))
805
+ return !1;
806
+ var r = Tt.call(t);
807
+ return r !== el && r !== tl && !/^\[object HTML/.test(r) ? !1 : Rr(t);
808
+ }, "isCallable");
809
+ });
810
+
811
+ // ../node_modules/for-each/index.js
812
+ var qi = E((Dg, Ui) => {
813
+ "use strict";
814
+ var cl = Bi(), al = Object.prototype.toString, ki = Object.prototype.hasOwnProperty, ul = /* @__PURE__ */ i(function(t, r, n) {
815
+ for (var o = 0, s = t.length; o < s; o++)
816
+ ki.call(t, o) && (n == null ? r(t[o], o, t) : r.call(n, t[o], o, t));
817
+ }, "forEachArray"), ll = /* @__PURE__ */ i(function(t, r, n) {
818
+ for (var o = 0, s = t.length; o < s; o++)
819
+ n == null ? r(t.charAt(o), o, t) : r.call(n, t.charAt(o), o, t);
820
+ }, "forEachString"), fl = /* @__PURE__ */ i(function(t, r, n) {
821
+ for (var o in t)
822
+ ki.call(t, o) && (n == null ? r(t[o], o, t) : r.call(n, t[o], o, t));
823
+ }, "forEachObject"), pl = /* @__PURE__ */ i(function(t, r, n) {
824
+ if (!cl(r))
825
+ throw new TypeError("iterator must be a function");
826
+ var o;
827
+ arguments.length >= 3 && (o = n), al.call(t) === "[object Array]" ? ul(t, r, o) : typeof t == "string" ? ll(t, r, o) : fl(t, r, o);
828
+ }, "forEach");
829
+ Ui.exports = pl;
830
+ });
831
+
832
+ // ../node_modules/possible-typed-array-names/index.js
833
+ var Wi = E((Bg, zi) => {
834
+ "use strict";
835
+ zi.exports = [
836
+ "Float32Array",
837
+ "Float64Array",
838
+ "Int8Array",
839
+ "Int16Array",
840
+ "Int32Array",
841
+ "Uint8Array",
842
+ "Uint8ClampedArray",
843
+ "Uint16Array",
844
+ "Uint32Array",
845
+ "BigInt64Array",
846
+ "BigUint64Array"
847
+ ];
848
+ });
849
+
850
+ // ../node_modules/available-typed-arrays/index.js
851
+ var Vi = E((kg, Gi) => {
852
+ "use strict";
853
+ var Mr = Wi(), yl = typeof globalThis > "u" ? global : globalThis;
854
+ Gi.exports = /* @__PURE__ */ i(function() {
855
+ for (var t = [], r = 0; r < Mr.length; r++)
856
+ typeof yl[Mr[r]] == "function" && (t[t.length] = Mr[r]);
857
+ return t;
858
+ }, "availableTypedArrays");
859
+ });
860
+
861
+ // ../node_modules/call-bound/index.js
862
+ var Ki = E((qg, Ji) => {
863
+ "use strict";
864
+ var Yi = Ot(), Hi = bt(), gl = Hi([Yi("%String.prototype.indexOf%")]);
865
+ Ji.exports = /* @__PURE__ */ i(function(t, r) {
866
+ var n = (
867
+ /** @type {Parameters<typeof callBindBasic>[0][0]} */
868
+ Yi(t, !!r)
869
+ );
870
+ return typeof n == "function" && gl(t, ".prototype.") > -1 ? Hi([n]) : n;
871
+ }, "callBoundIntrinsic");
872
+ });
873
+
874
+ // ../node_modules/which-typed-array/index.js
875
+ var Br = E((Wg, es) => {
876
+ "use strict";
877
+ var Pt = qi(), ml = Vi(), Xi = $r(), Dr = Ki(), $t = $e(), hl = Dr("Object.prototype.toString"), Qi = yt()(), Zi = typeof globalThis > "u" ?
878
+ global : globalThis, Fr = ml(), Lr = Dr("String.prototype.slice"), vr = Object.getPrototypeOf, dl = Dr("Array.prototype.indexOf", !0) || /* @__PURE__ */ i(
879
+ function(t, r) {
880
+ for (var n = 0; n < t.length; n += 1)
881
+ if (t[n] === r)
882
+ return n;
883
+ return -1;
884
+ }, "indexOf"), Ct = { __proto__: null };
885
+ Qi && $t && vr ? Pt(Fr, function(e) {
886
+ var t = new Zi[e]();
887
+ if (Symbol.toStringTag in t) {
888
+ var r = vr(t), n = $t(r, Symbol.toStringTag);
889
+ if (!n) {
890
+ var o = vr(r);
891
+ n = $t(o, Symbol.toStringTag);
892
+ }
893
+ Ct["$" + e] = Xi(n.get);
894
+ }
895
+ }) : Pt(Fr, function(e) {
896
+ var t = new Zi[e](), r = t.slice || t.set;
897
+ r && (Ct["$" + e] = Xi(r));
898
+ });
899
+ var bl = /* @__PURE__ */ i(function(t) {
900
+ var r = !1;
901
+ return Pt(
902
+ // eslint-disable-next-line no-extra-parens
903
+ /** @type {Record<`\$${TypedArrayName}`, Getter>} */
904
+ /** @type {any} */
905
+ Ct,
906
+ /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
907
+ function(n, o) {
908
+ if (!r)
909
+ try {
910
+ "$" + n(t) === o && (r = Lr(o, 1));
911
+ } catch {
912
+ }
913
+ }
914
+ ), r;
915
+ }, "tryAllTypedArrays"), Sl = /* @__PURE__ */ i(function(t) {
916
+ var r = !1;
917
+ return Pt(
918
+ // eslint-disable-next-line no-extra-parens
919
+ /** @type {Record<`\$${TypedArrayName}`, Getter>} */
920
+ /** @type {any} */
921
+ Ct,
922
+ /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
923
+ function(n, o) {
924
+ if (!r)
925
+ try {
926
+ n(t), r = Lr(o, 1);
927
+ } catch {
928
+ }
929
+ }
930
+ ), r;
931
+ }, "tryAllSlices");
932
+ es.exports = /* @__PURE__ */ i(function(t) {
933
+ if (!t || typeof t != "object")
934
+ return !1;
935
+ if (!Qi) {
936
+ var r = Lr(hl(t), 8, -1);
937
+ return dl(Fr, r) > -1 ? r : r !== "Object" ? !1 : Sl(t);
938
+ }
939
+ return $t ? bl(t) : null;
940
+ }, "whichTypedArray");
941
+ });
942
+
943
+ // ../node_modules/is-typed-array/index.js
944
+ var rs = E((Vg, ts) => {
945
+ "use strict";
946
+ var Al = Br();
947
+ ts.exports = /* @__PURE__ */ i(function(t) {
948
+ return !!Al(t);
949
+ }, "isTypedArray");
950
+ });
951
+
952
+ // ../node_modules/util/support/types.js
953
+ var hs = E((P) => {
954
+ "use strict";
955
+ var Ol = Ni(), wl = vi(), ce = Br(), ns = rs();
956
+ function Me(e) {
957
+ return e.call.bind(e);
958
+ }
959
+ i(Me, "uncurryThis");
960
+ var os = typeof BigInt < "u", is = typeof Symbol < "u", re = Me(Object.prototype.toString), El = Me(Number.prototype.valueOf), _l = Me(String.
961
+ prototype.valueOf), Tl = Me(Boolean.prototype.valueOf);
962
+ os && (ss = Me(BigInt.prototype.valueOf));
963
+ var ss;
964
+ is && (cs = Me(Symbol.prototype.valueOf));
965
+ var cs;
966
+ function Ye(e, t) {
967
+ if (typeof e != "object")
968
+ return !1;
969
+ try {
970
+ return t(e), !0;
971
+ } catch {
972
+ return !1;
973
+ }
974
+ }
975
+ i(Ye, "checkBoxedPrimitive");
976
+ P.isArgumentsObject = Ol;
977
+ P.isGeneratorFunction = wl;
978
+ P.isTypedArray = ns;
979
+ function $l(e) {
980
+ return typeof Promise < "u" && e instanceof Promise || e !== null && typeof e == "object" && typeof e.then == "function" && typeof e.catch ==
981
+ "function";
982
+ }
983
+ i($l, "isPromise");
984
+ P.isPromise = $l;
985
+ function Pl(e) {
986
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : ns(e) || us(e);
987
+ }
988
+ i(Pl, "isArrayBufferView");
989
+ P.isArrayBufferView = Pl;
990
+ function Cl(e) {
991
+ return ce(e) === "Uint8Array";
992
+ }
993
+ i(Cl, "isUint8Array");
994
+ P.isUint8Array = Cl;
995
+ function Il(e) {
996
+ return ce(e) === "Uint8ClampedArray";
997
+ }
998
+ i(Il, "isUint8ClampedArray");
999
+ P.isUint8ClampedArray = Il;
1000
+ function Rl(e) {
1001
+ return ce(e) === "Uint16Array";
1002
+ }
1003
+ i(Rl, "isUint16Array");
1004
+ P.isUint16Array = Rl;
1005
+ function jl(e) {
1006
+ return ce(e) === "Uint32Array";
1007
+ }
1008
+ i(jl, "isUint32Array");
1009
+ P.isUint32Array = jl;
1010
+ function Nl(e) {
1011
+ return ce(e) === "Int8Array";
1012
+ }
1013
+ i(Nl, "isInt8Array");
1014
+ P.isInt8Array = Nl;
1015
+ function xl(e) {
1016
+ return ce(e) === "Int16Array";
1017
+ }
1018
+ i(xl, "isInt16Array");
1019
+ P.isInt16Array = xl;
1020
+ function Ml(e) {
1021
+ return ce(e) === "Int32Array";
1022
+ }
1023
+ i(Ml, "isInt32Array");
1024
+ P.isInt32Array = Ml;
1025
+ function vl(e) {
1026
+ return ce(e) === "Float32Array";
1027
+ }
1028
+ i(vl, "isFloat32Array");
1029
+ P.isFloat32Array = vl;
1030
+ function Fl(e) {
1031
+ return ce(e) === "Float64Array";
1032
+ }
1033
+ i(Fl, "isFloat64Array");
1034
+ P.isFloat64Array = Fl;
1035
+ function Dl(e) {
1036
+ return ce(e) === "BigInt64Array";
1037
+ }
1038
+ i(Dl, "isBigInt64Array");
1039
+ P.isBigInt64Array = Dl;
1040
+ function Ll(e) {
1041
+ return ce(e) === "BigUint64Array";
1042
+ }
1043
+ i(Ll, "isBigUint64Array");
1044
+ P.isBigUint64Array = Ll;
1045
+ function It(e) {
1046
+ return re(e) === "[object Map]";
1047
+ }
1048
+ i(It, "isMapToString");
1049
+ It.working = typeof Map < "u" && It(/* @__PURE__ */ new Map());
1050
+ function Bl(e) {
1051
+ return typeof Map > "u" ? !1 : It.working ? It(e) : e instanceof Map;
1052
+ }
1053
+ i(Bl, "isMap");
1054
+ P.isMap = Bl;
1055
+ function Rt(e) {
1056
+ return re(e) === "[object Set]";
1057
+ }
1058
+ i(Rt, "isSetToString");
1059
+ Rt.working = typeof Set < "u" && Rt(/* @__PURE__ */ new Set());
1060
+ function kl(e) {
1061
+ return typeof Set > "u" ? !1 : Rt.working ? Rt(e) : e instanceof Set;
1062
+ }
1063
+ i(kl, "isSet");
1064
+ P.isSet = kl;
1065
+ function jt(e) {
1066
+ return re(e) === "[object WeakMap]";
1067
+ }
1068
+ i(jt, "isWeakMapToString");
1069
+ jt.working = typeof WeakMap < "u" && jt(/* @__PURE__ */ new WeakMap());
1070
+ function Ul(e) {
1071
+ return typeof WeakMap > "u" ? !1 : jt.working ? jt(e) : e instanceof WeakMap;
1072
+ }
1073
+ i(Ul, "isWeakMap");
1074
+ P.isWeakMap = Ul;
1075
+ function Ur(e) {
1076
+ return re(e) === "[object WeakSet]";
1077
+ }
1078
+ i(Ur, "isWeakSetToString");
1079
+ Ur.working = typeof WeakSet < "u" && Ur(/* @__PURE__ */ new WeakSet());
1080
+ function ql(e) {
1081
+ return Ur(e);
1082
+ }
1083
+ i(ql, "isWeakSet");
1084
+ P.isWeakSet = ql;
1085
+ function Nt(e) {
1086
+ return re(e) === "[object ArrayBuffer]";
1087
+ }
1088
+ i(Nt, "isArrayBufferToString");
1089
+ Nt.working = typeof ArrayBuffer < "u" && Nt(new ArrayBuffer());
1090
+ function as(e) {
1091
+ return typeof ArrayBuffer > "u" ? !1 : Nt.working ? Nt(e) : e instanceof ArrayBuffer;
1092
+ }
1093
+ i(as, "isArrayBuffer");
1094
+ P.isArrayBuffer = as;
1095
+ function xt(e) {
1096
+ return re(e) === "[object DataView]";
1097
+ }
1098
+ i(xt, "isDataViewToString");
1099
+ xt.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && xt(new DataView(new ArrayBuffer(1), 0, 1));
1100
+ function us(e) {
1101
+ return typeof DataView > "u" ? !1 : xt.working ? xt(e) : e instanceof DataView;
1102
+ }
1103
+ i(us, "isDataView");
1104
+ P.isDataView = us;
1105
+ var kr = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
1106
+ function Ve(e) {
1107
+ return re(e) === "[object SharedArrayBuffer]";
1108
+ }
1109
+ i(Ve, "isSharedArrayBufferToString");
1110
+ function ls(e) {
1111
+ return typeof kr > "u" ? !1 : (typeof Ve.working > "u" && (Ve.working = Ve(new kr())), Ve.working ? Ve(e) : e instanceof kr);
1112
+ }
1113
+ i(ls, "isSharedArrayBuffer");
1114
+ P.isSharedArrayBuffer = ls;
1115
+ function zl(e) {
1116
+ return re(e) === "[object AsyncFunction]";
1117
+ }
1118
+ i(zl, "isAsyncFunction");
1119
+ P.isAsyncFunction = zl;
1120
+ function Wl(e) {
1121
+ return re(e) === "[object Map Iterator]";
1122
+ }
1123
+ i(Wl, "isMapIterator");
1124
+ P.isMapIterator = Wl;
1125
+ function Gl(e) {
1126
+ return re(e) === "[object Set Iterator]";
1127
+ }
1128
+ i(Gl, "isSetIterator");
1129
+ P.isSetIterator = Gl;
1130
+ function Vl(e) {
1131
+ return re(e) === "[object Generator]";
1132
+ }
1133
+ i(Vl, "isGeneratorObject");
1134
+ P.isGeneratorObject = Vl;
1135
+ function Yl(e) {
1136
+ return re(e) === "[object WebAssembly.Module]";
1137
+ }
1138
+ i(Yl, "isWebAssemblyCompiledModule");
1139
+ P.isWebAssemblyCompiledModule = Yl;
1140
+ function fs(e) {
1141
+ return Ye(e, El);
1142
+ }
1143
+ i(fs, "isNumberObject");
1144
+ P.isNumberObject = fs;
1145
+ function ps(e) {
1146
+ return Ye(e, _l);
1147
+ }
1148
+ i(ps, "isStringObject");
1149
+ P.isStringObject = ps;
1150
+ function ys(e) {
1151
+ return Ye(e, Tl);
1152
+ }
1153
+ i(ys, "isBooleanObject");
1154
+ P.isBooleanObject = ys;
1155
+ function gs(e) {
1156
+ return os && Ye(e, ss);
1157
+ }
1158
+ i(gs, "isBigIntObject");
1159
+ P.isBigIntObject = gs;
1160
+ function ms(e) {
1161
+ return is && Ye(e, cs);
1162
+ }
1163
+ i(ms, "isSymbolObject");
1164
+ P.isSymbolObject = ms;
1165
+ function Hl(e) {
1166
+ return fs(e) || ps(e) || ys(e) || gs(e) || ms(e);
1167
+ }
1168
+ i(Hl, "isBoxedPrimitive");
1169
+ P.isBoxedPrimitive = Hl;
1170
+ function Jl(e) {
1171
+ return typeof Uint8Array < "u" && (as(e) || ls(e));
1172
+ }
1173
+ i(Jl, "isAnyArrayBuffer");
1174
+ P.isAnyArrayBuffer = Jl;
1175
+ ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(e) {
1176
+ Object.defineProperty(P, e, {
1177
+ enumerable: !1,
1178
+ value: /* @__PURE__ */ i(function() {
1179
+ throw new Error(e + " is not supported in userland");
1180
+ }, "value")
1181
+ });
1182
+ });
1183
+ });
1184
+
1185
+ // ../node_modules/util/support/isBufferBrowser.js
1186
+ var bs = E((Kg, ds) => {
1187
+ ds.exports = /* @__PURE__ */ i(function(t) {
1188
+ return t && typeof t == "object" && typeof t.copy == "function" && typeof t.fill == "function" && typeof t.readUInt8 == "function";
1189
+ }, "isBuffer");
1190
+ });
1191
+
1192
+ // ../node_modules/inherits/inherits_browser.js
1193
+ var Ss = E((Zg, qr) => {
1194
+ typeof Object.create == "function" ? qr.exports = /* @__PURE__ */ i(function(t, r) {
1195
+ r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
1196
+ constructor: {
1197
+ value: t,
1198
+ enumerable: !1,
1199
+ writable: !0,
1200
+ configurable: !0
1201
+ }
1202
+ }));
1203
+ }, "inherits") : qr.exports = /* @__PURE__ */ i(function(t, r) {
1204
+ if (r) {
1205
+ t.super_ = r;
1206
+ var n = /* @__PURE__ */ i(function() {
1207
+ }, "TempCtor");
1208
+ n.prototype = r.prototype, t.prototype = new n(), t.prototype.constructor = t;
1209
+ }
1210
+ }, "inherits");
1211
+ });
1212
+
1213
+ // ../node_modules/util/util.js
1214
+ var Ts = E((C) => {
1215
+ var As = Object.getOwnPropertyDescriptors || /* @__PURE__ */ i(function(t) {
1216
+ for (var r = Object.keys(t), n = {}, o = 0; o < r.length; o++)
1217
+ n[r[o]] = Object.getOwnPropertyDescriptor(t, r[o]);
1218
+ return n;
1219
+ }, "getOwnPropertyDescriptors"), Kl = /%[sdj%]/g;
1220
+ C.format = function(e) {
1221
+ if (!kt(e)) {
1222
+ for (var t = [], r = 0; r < arguments.length; r++)
1223
+ t.push(he(arguments[r]));
1224
+ return t.join(" ");
1225
+ }
1226
+ for (var r = 1, n = arguments, o = n.length, s = String(e).replace(Kl, function(a) {
1227
+ if (a === "%%") return "%";
1228
+ if (r >= o) return a;
1229
+ switch (a) {
1230
+ case "%s":
1231
+ return String(n[r++]);
1232
+ case "%d":
1233
+ return Number(n[r++]);
1234
+ case "%j":
1235
+ try {
1236
+ return JSON.stringify(n[r++]);
1237
+ } catch {
1238
+ return "[Circular]";
1239
+ }
1240
+ default:
1241
+ return a;
1242
+ }
1243
+ }), c = n[r]; r < o; c = n[++r])
1244
+ Bt(c) || !ve(c) ? s += " " + c : s += " " + he(c);
1245
+ return s;
1246
+ };
1247
+ C.deprecate = function(e, t) {
1248
+ if (typeof process < "u" && process.noDeprecation === !0)
1249
+ return e;
1250
+ if (typeof process > "u")
1251
+ return function() {
1252
+ return C.deprecate(e, t).apply(this, arguments);
1253
+ };
1254
+ var r = !1;
1255
+ function n() {
1256
+ if (!r) {
1257
+ if (process.throwDeprecation)
1258
+ throw new Error(t);
1259
+ process.traceDeprecation ? console.trace(t) : console.error(t), r = !0;
1260
+ }
1261
+ return e.apply(this, arguments);
1262
+ }
1263
+ return i(n, "deprecated"), n;
1264
+ };
1265
+ var Mt = {}, Os = /^$/;
1266
+ process.env.NODE_DEBUG && (vt = process.env.NODE_DEBUG, vt = vt.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "\
1267
+ $|^").toUpperCase(), Os = new RegExp("^" + vt + "$", "i"));
1268
+ var vt;
1269
+ C.debuglog = function(e) {
1270
+ if (e = e.toUpperCase(), !Mt[e])
1271
+ if (Os.test(e)) {
1272
+ var t = process.pid;
1273
+ Mt[e] = function() {
1274
+ var r = C.format.apply(C, arguments);
1275
+ console.error("%s %d: %s", e, t, r);
1276
+ };
1277
+ } else
1278
+ Mt[e] = function() {
1279
+ };
1280
+ return Mt[e];
1281
+ };
1282
+ function he(e, t) {
1283
+ var r = {
1284
+ seen: [],
1285
+ stylize: Zl
1286
+ };
1287
+ return arguments.length >= 3 && (r.depth = arguments[2]), arguments.length >= 4 && (r.colors = arguments[3]), Vr(t) ? r.showHidden = t :
1288
+ t && C._extend(r, t), Oe(r.showHidden) && (r.showHidden = !1), Oe(r.depth) && (r.depth = 2), Oe(r.colors) && (r.colors = !1), Oe(r.customInspect) &&
1289
+ (r.customInspect = !0), r.colors && (r.stylize = Xl), Dt(r, e, r.depth);
1290
+ }
1291
+ i(he, "inspect");
1292
+ C.inspect = he;
1293
+ he.colors = {
1294
+ bold: [1, 22],
1295
+ italic: [3, 23],
1296
+ underline: [4, 24],
1297
+ inverse: [7, 27],
1298
+ white: [37, 39],
1299
+ grey: [90, 39],
1300
+ black: [30, 39],
1301
+ blue: [34, 39],
1302
+ cyan: [36, 39],
1303
+ green: [32, 39],
1304
+ magenta: [35, 39],
1305
+ red: [31, 39],
1306
+ yellow: [33, 39]
1307
+ };
1308
+ he.styles = {
1309
+ special: "cyan",
1310
+ number: "yellow",
1311
+ boolean: "yellow",
1312
+ undefined: "grey",
1313
+ null: "bold",
1314
+ string: "green",
1315
+ date: "magenta",
1316
+ // "name": intentionally not styling
1317
+ regexp: "red"
1318
+ };
1319
+ function Xl(e, t) {
1320
+ var r = he.styles[t];
1321
+ return r ? "\x1B[" + he.colors[r][0] + "m" + e + "\x1B[" + he.colors[r][1] + "m" : e;
1322
+ }
1323
+ i(Xl, "stylizeWithColor");
1324
+ function Zl(e, t) {
1325
+ return e;
1326
+ }
1327
+ i(Zl, "stylizeNoColor");
1328
+ function Ql(e) {
1329
+ var t = {};
1330
+ return e.forEach(function(r, n) {
1331
+ t[r] = !0;
1332
+ }), t;
1333
+ }
1334
+ i(Ql, "arrayToHash");
1335
+ function Dt(e, t, r) {
1336
+ if (e.customInspect && t && Ft(t.inspect) && // Filter out the util module, it's inspect function is special
1337
+ t.inspect !== C.inspect && // Also filter out any prototype objects using the circular check.
1338
+ !(t.constructor && t.constructor.prototype === t)) {
1339
+ var n = t.inspect(r, e);
1340
+ return kt(n) || (n = Dt(e, n, r)), n;
1341
+ }
1342
+ var o = ef(e, t);
1343
+ if (o)
1344
+ return o;
1345
+ var s = Object.keys(t), c = Ql(s);
1346
+ if (e.showHidden && (s = Object.getOwnPropertyNames(t)), Je(t) && (s.indexOf("message") >= 0 || s.indexOf("description") >= 0))
1347
+ return zr(t);
1348
+ if (s.length === 0) {
1349
+ if (Ft(t)) {
1350
+ var a = t.name ? ": " + t.name : "";
1351
+ return e.stylize("[Function" + a + "]", "special");
1352
+ }
1353
+ if (He(t))
1354
+ return e.stylize(RegExp.prototype.toString.call(t), "regexp");
1355
+ if (Lt(t))
1356
+ return e.stylize(Date.prototype.toString.call(t), "date");
1357
+ if (Je(t))
1358
+ return zr(t);
1359
+ }
1360
+ var u = "", f = !1, p = ["{", "}"];
1361
+ if (ws(t) && (f = !0, p = ["[", "]"]), Ft(t)) {
1362
+ var l = t.name ? ": " + t.name : "";
1363
+ u = " [Function" + l + "]";
1364
+ }
1365
+ if (He(t) && (u = " " + RegExp.prototype.toString.call(t)), Lt(t) && (u = " " + Date.prototype.toUTCString.call(t)), Je(t) && (u = " " +
1366
+ zr(t)), s.length === 0 && (!f || t.length == 0))
1367
+ return p[0] + u + p[1];
1368
+ if (r < 0)
1369
+ return He(t) ? e.stylize(RegExp.prototype.toString.call(t), "regexp") : e.stylize("[Object]", "special");
1370
+ e.seen.push(t);
1371
+ var d;
1372
+ return f ? d = tf(e, t, r, c, s) : d = s.map(function(y) {
1373
+ return Gr(e, t, r, c, y, f);
1374
+ }), e.seen.pop(), rf(d, u, p);
1375
+ }
1376
+ i(Dt, "formatValue");
1377
+ function ef(e, t) {
1378
+ if (Oe(t))
1379
+ return e.stylize("undefined", "undefined");
1380
+ if (kt(t)) {
1381
+ var r = "'" + JSON.stringify(t).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
1382
+ return e.stylize(r, "string");
1383
+ }
1384
+ if (Es(t))
1385
+ return e.stylize("" + t, "number");
1386
+ if (Vr(t))
1387
+ return e.stylize("" + t, "boolean");
1388
+ if (Bt(t))
1389
+ return e.stylize("null", "null");
1390
+ }
1391
+ i(ef, "formatPrimitive");
1392
+ function zr(e) {
1393
+ return "[" + Error.prototype.toString.call(e) + "]";
1394
+ }
1395
+ i(zr, "formatError");
1396
+ function tf(e, t, r, n, o) {
1397
+ for (var s = [], c = 0, a = t.length; c < a; ++c)
1398
+ _s(t, String(c)) ? s.push(Gr(
1399
+ e,
1400
+ t,
1401
+ r,
1402
+ n,
1403
+ String(c),
1404
+ !0
1405
+ )) : s.push("");
1406
+ return o.forEach(function(u) {
1407
+ u.match(/^\d+$/) || s.push(Gr(
1408
+ e,
1409
+ t,
1410
+ r,
1411
+ n,
1412
+ u,
1413
+ !0
1414
+ ));
1415
+ }), s;
1416
+ }
1417
+ i(tf, "formatArray");
1418
+ function Gr(e, t, r, n, o, s) {
1419
+ var c, a, u;
1420
+ if (u = Object.getOwnPropertyDescriptor(t, o) || { value: t[o] }, u.get ? u.set ? a = e.stylize("[Getter/Setter]", "special") : a = e.stylize(
1421
+ "[Getter]", "special") : u.set && (a = e.stylize("[Setter]", "special")), _s(n, o) || (c = "[" + o + "]"), a || (e.seen.indexOf(u.value) <
1422
+ 0 ? (Bt(r) ? a = Dt(e, u.value, null) : a = Dt(e, u.value, r - 1), a.indexOf(`
1423
+ `) > -1 && (s ? a = a.split(`
1424
+ `).map(function(f) {
1425
+ return " " + f;
1426
+ }).join(`
1427
+ `).slice(2) : a = `
1428
+ ` + a.split(`
1429
+ `).map(function(f) {
1430
+ return " " + f;
1431
+ }).join(`
1432
+ `))) : a = e.stylize("[Circular]", "special")), Oe(c)) {
1433
+ if (s && o.match(/^\d+$/))
1434
+ return a;
1435
+ c = JSON.stringify("" + o), c.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (c = c.slice(1, -1), c = e.stylize(c, "name")) : (c = c.replace(
1436
+ /'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), c = e.stylize(c, "string"));
1437
+ }
1438
+ return c + ": " + a;
1439
+ }
1440
+ i(Gr, "formatProperty");
1441
+ function rf(e, t, r) {
1442
+ var n = 0, o = e.reduce(function(s, c) {
1443
+ return n++, c.indexOf(`
1444
+ `) >= 0 && n++, s + c.replace(/\u001b\[\d\d?m/g, "").length + 1;
1445
+ }, 0);
1446
+ return o > 60 ? r[0] + (t === "" ? "" : t + `
1447
+ `) + " " + e.join(`,
1448
+ `) + " " + r[1] : r[0] + t + " " + e.join(", ") + " " + r[1];
1449
+ }
1450
+ i(rf, "reduceToSingleString");
1451
+ C.types = hs();
1452
+ function ws(e) {
1453
+ return Array.isArray(e);
1454
+ }
1455
+ i(ws, "isArray");
1456
+ C.isArray = ws;
1457
+ function Vr(e) {
1458
+ return typeof e == "boolean";
1459
+ }
1460
+ i(Vr, "isBoolean");
1461
+ C.isBoolean = Vr;
1462
+ function Bt(e) {
1463
+ return e === null;
1464
+ }
1465
+ i(Bt, "isNull");
1466
+ C.isNull = Bt;
1467
+ function nf(e) {
1468
+ return e == null;
1469
+ }
1470
+ i(nf, "isNullOrUndefined");
1471
+ C.isNullOrUndefined = nf;
1472
+ function Es(e) {
1473
+ return typeof e == "number";
1474
+ }
1475
+ i(Es, "isNumber");
1476
+ C.isNumber = Es;
1477
+ function kt(e) {
1478
+ return typeof e == "string";
1479
+ }
1480
+ i(kt, "isString");
1481
+ C.isString = kt;
1482
+ function of(e) {
1483
+ return typeof e == "symbol";
1484
+ }
1485
+ i(of, "isSymbol");
1486
+ C.isSymbol = of;
1487
+ function Oe(e) {
1488
+ return e === void 0;
1489
+ }
1490
+ i(Oe, "isUndefined");
1491
+ C.isUndefined = Oe;
1492
+ function He(e) {
1493
+ return ve(e) && Yr(e) === "[object RegExp]";
1494
+ }
1495
+ i(He, "isRegExp");
1496
+ C.isRegExp = He;
1497
+ C.types.isRegExp = He;
1498
+ function ve(e) {
1499
+ return typeof e == "object" && e !== null;
1500
+ }
1501
+ i(ve, "isObject");
1502
+ C.isObject = ve;
1503
+ function Lt(e) {
1504
+ return ve(e) && Yr(e) === "[object Date]";
1505
+ }
1506
+ i(Lt, "isDate");
1507
+ C.isDate = Lt;
1508
+ C.types.isDate = Lt;
1509
+ function Je(e) {
1510
+ return ve(e) && (Yr(e) === "[object Error]" || e instanceof Error);
1511
+ }
1512
+ i(Je, "isError");
1513
+ C.isError = Je;
1514
+ C.types.isNativeError = Je;
1515
+ function Ft(e) {
1516
+ return typeof e == "function";
1517
+ }
1518
+ i(Ft, "isFunction");
1519
+ C.isFunction = Ft;
1520
+ function sf(e) {
1521
+ return e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string" || typeof e == "symbol" || // ES6 symbol
1522
+ typeof e > "u";
1523
+ }
1524
+ i(sf, "isPrimitive");
1525
+ C.isPrimitive = sf;
1526
+ C.isBuffer = bs();
1527
+ function Yr(e) {
1528
+ return Object.prototype.toString.call(e);
1529
+ }
1530
+ i(Yr, "objectToString");
1531
+ function Wr(e) {
1532
+ return e < 10 ? "0" + e.toString(10) : e.toString(10);
1533
+ }
1534
+ i(Wr, "pad");
1535
+ var cf = [
1536
+ "Jan",
1537
+ "Feb",
1538
+ "Mar",
1539
+ "Apr",
1540
+ "May",
1541
+ "Jun",
1542
+ "Jul",
1543
+ "Aug",
1544
+ "Sep",
1545
+ "Oct",
1546
+ "Nov",
1547
+ "Dec"
1548
+ ];
1549
+ function af() {
1550
+ var e = /* @__PURE__ */ new Date(), t = [
1551
+ Wr(e.getHours()),
1552
+ Wr(e.getMinutes()),
1553
+ Wr(e.getSeconds())
1554
+ ].join(":");
1555
+ return [e.getDate(), cf[e.getMonth()], t].join(" ");
1556
+ }
1557
+ i(af, "timestamp");
1558
+ C.log = function() {
1559
+ console.log("%s - %s", af(), C.format.apply(C, arguments));
1560
+ };
1561
+ C.inherits = Ss();
1562
+ C._extend = function(e, t) {
1563
+ if (!t || !ve(t)) return e;
1564
+ for (var r = Object.keys(t), n = r.length; n--; )
1565
+ e[r[n]] = t[r[n]];
1566
+ return e;
1567
+ };
1568
+ function _s(e, t) {
1569
+ return Object.prototype.hasOwnProperty.call(e, t);
1570
+ }
1571
+ i(_s, "hasOwnProperty");
1572
+ var Ae = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
1573
+ C.promisify = /* @__PURE__ */ i(function(t) {
1574
+ if (typeof t != "function")
1575
+ throw new TypeError('The "original" argument must be of type Function');
1576
+ if (Ae && t[Ae]) {
1577
+ var r = t[Ae];
1578
+ if (typeof r != "function")
1579
+ throw new TypeError('The "util.promisify.custom" argument must be of type Function');
1580
+ return Object.defineProperty(r, Ae, {
1581
+ value: r,
1582
+ enumerable: !1,
1583
+ writable: !1,
1584
+ configurable: !0
1585
+ }), r;
1586
+ }
1587
+ function r() {
1588
+ for (var n, o, s = new Promise(function(u, f) {
1589
+ n = u, o = f;
1590
+ }), c = [], a = 0; a < arguments.length; a++)
1591
+ c.push(arguments[a]);
1592
+ c.push(function(u, f) {
1593
+ u ? o(u) : n(f);
1594
+ });
1595
+ try {
1596
+ t.apply(this, c);
1597
+ } catch (u) {
1598
+ o(u);
1599
+ }
1600
+ return s;
1601
+ }
1602
+ return i(r, "fn"), Object.setPrototypeOf(r, Object.getPrototypeOf(t)), Ae && Object.defineProperty(r, Ae, {
1603
+ value: r,
1604
+ enumerable: !1,
1605
+ writable: !1,
1606
+ configurable: !0
1607
+ }), Object.defineProperties(
1608
+ r,
1609
+ As(t)
1610
+ );
1611
+ }, "promisify");
1612
+ C.promisify.custom = Ae;
1613
+ function uf(e, t) {
1614
+ if (!e) {
1615
+ var r = new Error("Promise was rejected with a falsy value");
1616
+ r.reason = e, e = r;
1617
+ }
1618
+ return t(e);
1619
+ }
1620
+ i(uf, "callbackifyOnRejected");
1621
+ function lf(e) {
1622
+ if (typeof e != "function")
1623
+ throw new TypeError('The "original" argument must be of type Function');
1624
+ function t() {
1625
+ for (var r = [], n = 0; n < arguments.length; n++)
1626
+ r.push(arguments[n]);
1627
+ var o = r.pop();
1628
+ if (typeof o != "function")
1629
+ throw new TypeError("The last argument must be of type Function");
1630
+ var s = this, c = /* @__PURE__ */ i(function() {
1631
+ return o.apply(s, arguments);
1632
+ }, "cb");
1633
+ e.apply(this, r).then(
1634
+ function(a) {
1635
+ process.nextTick(c.bind(null, null, a));
1636
+ },
1637
+ function(a) {
1638
+ process.nextTick(uf.bind(null, a, c));
1639
+ }
1640
+ );
1641
+ }
1642
+ return i(t, "callbackified"), Object.setPrototypeOf(t, Object.getPrototypeOf(e)), Object.defineProperties(
1643
+ t,
1644
+ As(e)
1645
+ ), t;
1646
+ }
1647
+ i(lf, "callbackify");
1648
+ C.callbackify = lf;
1649
+ });
1650
+
1651
+ // src/instrumenter/instrumenter.ts
1652
+ import { once as fp } from "storybook/internal/client-logger";
1653
+ import {
1654
+ FORCE_REMOUNT as lc,
1655
+ SET_CURRENT_STORY as pp,
1656
+ STORY_RENDER_PHASE_CHANGED as yp
1657
+ } from "storybook/internal/core-events";
1658
+ import { addons as gp } from "storybook/internal/preview-api";
1659
+
1660
+ // ../node_modules/@storybook/global/dist/index.mjs
1661
+ var z = (() => {
1662
+ let e;
1663
+ return typeof window < "u" ? e = window : typeof globalThis < "u" ? e = globalThis : typeof global < "u" ? e = global : typeof self < "u" ?
1664
+ e = self : e = {}, e;
1665
+ })();
1666
+
1667
+ // ../node_modules/@vitest/utils/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js
1668
+ var hc = {
1669
+ reset: [0, 0],
1670
+ bold: [1, 22, "\x1B[22m\x1B[1m"],
1671
+ dim: [2, 22, "\x1B[22m\x1B[2m"],
1672
+ italic: [3, 23],
1673
+ underline: [4, 24],
1674
+ inverse: [7, 27],
1675
+ hidden: [8, 28],
1676
+ strikethrough: [9, 29],
1677
+ black: [30, 39],
1678
+ red: [31, 39],
1679
+ green: [32, 39],
1680
+ yellow: [33, 39],
1681
+ blue: [34, 39],
1682
+ magenta: [35, 39],
1683
+ cyan: [36, 39],
1684
+ white: [37, 39],
1685
+ gray: [90, 39],
1686
+ bgBlack: [40, 49],
1687
+ bgRed: [41, 49],
1688
+ bgGreen: [42, 49],
1689
+ bgYellow: [43, 49],
1690
+ bgBlue: [44, 49],
1691
+ bgMagenta: [45, 49],
1692
+ bgCyan: [46, 49],
1693
+ bgWhite: [47, 49],
1694
+ blackBright: [90, 39],
1695
+ redBright: [91, 39],
1696
+ greenBright: [92, 39],
1697
+ yellowBright: [93, 39],
1698
+ blueBright: [94, 39],
1699
+ magentaBright: [95, 39],
1700
+ cyanBright: [96, 39],
1701
+ whiteBright: [97, 39],
1702
+ bgBlackBright: [100, 49],
1703
+ bgRedBright: [101, 49],
1704
+ bgGreenBright: [102, 49],
1705
+ bgYellowBright: [103, 49],
1706
+ bgBlueBright: [104, 49],
1707
+ bgMagentaBright: [105, 49],
1708
+ bgCyanBright: [106, 49],
1709
+ bgWhiteBright: [107, 49]
1710
+ }, dc = Object.entries(hc);
1711
+ function Ht(e) {
1712
+ return String(e);
1713
+ }
1714
+ i(Ht, "a");
1715
+ Ht.open = "";
1716
+ Ht.close = "";
1717
+ function mn(e = !1) {
1718
+ let t = typeof process < "u" ? process : void 0, r = t?.env || {}, n = t?.argv || [];
1719
+ return !("NO_COLOR" in r || n.includes("--no-color")) && ("FORCE_COLOR" in r || n.includes("--color") || t?.platform === "win32" || e && r.
1720
+ TERM !== "dumb" || "CI" in r) || typeof window < "u" && !!window.chrome;
1721
+ }
1722
+ i(mn, "C");
1723
+ function hn(e = !1) {
1724
+ let t = mn(e), r = /* @__PURE__ */ i((c, a, u, f) => {
1725
+ let p = "", l = 0;
1726
+ do
1727
+ p += c.substring(l, f) + u, l = f + a.length, f = c.indexOf(a, l);
1728
+ while (~f);
1729
+ return p + c.substring(l);
1730
+ }, "i"), n = /* @__PURE__ */ i((c, a, u = c) => {
1731
+ let f = /* @__PURE__ */ i((p) => {
1732
+ let l = String(p), d = l.indexOf(a, c.length);
1733
+ return ~d ? c + r(l, a, u, d) + a : c + l + a;
1734
+ }, "o");
1735
+ return f.open = c, f.close = a, f;
1736
+ }, "g"), o = {
1737
+ isColorSupported: t
1738
+ }, s = /* @__PURE__ */ i((c) => `\x1B[${c}m`, "d");
1739
+ for (let [c, a] of dc)
1740
+ o[c] = t ? n(
1741
+ s(a[0]),
1742
+ s(a[1]),
1743
+ a[2]
1744
+ ) : Ht;
1745
+ return o;
1746
+ }
1747
+ i(hn, "p");
1748
+
1749
+ // ../node_modules/@vitest/utils/node_modules/tinyrainbow/dist/browser.js
1750
+ var oe = hn(!1);
1751
+
1752
+ // ../node_modules/@vitest/utils/node_modules/@vitest/pretty-format/dist/index.js
1753
+ function bc(e, t) {
1754
+ let r = Object.keys(e), n = t === null ? r : r.sort(t);
1755
+ if (Object.getOwnPropertySymbols)
1756
+ for (let o of Object.getOwnPropertySymbols(e))
1757
+ Object.getOwnPropertyDescriptor(e, o).enumerable && n.push(o);
1758
+ return n;
1759
+ }
1760
+ i(bc, "getKeysOfEnumerableProperties");
1761
+ function nt(e, t, r, n, o, s, c = ": ") {
1762
+ let a = "", u = 0, f = e.next();
1763
+ if (!f.done) {
1764
+ a += t.spacingOuter;
1765
+ let p = r + t.indent;
1766
+ for (; !f.done; ) {
1767
+ if (a += p, u++ === t.maxWidth) {
1768
+ a += "\u2026";
1769
+ break;
1770
+ }
1771
+ let l = s(
1772
+ f.value[0],
1773
+ t,
1774
+ p,
1775
+ n,
1776
+ o
1777
+ ), d = s(
1778
+ f.value[1],
1779
+ t,
1780
+ p,
1781
+ n,
1782
+ o
1783
+ );
1784
+ a += l + c + d, f = e.next(), f.done ? t.min || (a += ",") : a += `,${t.spacingInner}`;
1785
+ }
1786
+ a += t.spacingOuter + r;
1787
+ }
1788
+ return a;
1789
+ }
1790
+ i(nt, "printIteratorEntries");
1791
+ function Qt(e, t, r, n, o, s) {
1792
+ let c = "", a = 0, u = e.next();
1793
+ if (!u.done) {
1794
+ c += t.spacingOuter;
1795
+ let f = r + t.indent;
1796
+ for (; !u.done; ) {
1797
+ if (c += f, a++ === t.maxWidth) {
1798
+ c += "\u2026";
1799
+ break;
1800
+ }
1801
+ c += s(u.value, t, f, n, o), u = e.next(), u.done ? t.min || (c += ",") : c += `,${t.spacingInner}`;
1802
+ }
1803
+ c += t.spacingOuter + r;
1804
+ }
1805
+ return c;
1806
+ }
1807
+ i(Qt, "printIteratorValues");
1808
+ function tt(e, t, r, n, o, s) {
1809
+ let c = "";
1810
+ e = e instanceof ArrayBuffer ? new DataView(e) : e;
1811
+ let a = /* @__PURE__ */ i((f) => f instanceof DataView, "isDataView"), u = a(e) ? e.byteLength : e.length;
1812
+ if (u > 0) {
1813
+ c += t.spacingOuter;
1814
+ let f = r + t.indent;
1815
+ for (let p = 0; p < u; p++) {
1816
+ if (c += f, p === t.maxWidth) {
1817
+ c += "\u2026";
1818
+ break;
1819
+ }
1820
+ (a(e) || p in e) && (c += s(
1821
+ a(e) ? e.getInt8(p) : e[p],
1822
+ t,
1823
+ f,
1824
+ n,
1825
+ o
1826
+ )), p < u - 1 ? c += `,${t.spacingInner}` : t.min || (c += ",");
1827
+ }
1828
+ c += t.spacingOuter + r;
1829
+ }
1830
+ return c;
1831
+ }
1832
+ i(tt, "printListItems");
1833
+ function er(e, t, r, n, o, s) {
1834
+ let c = "", a = bc(e, t.compareKeys);
1835
+ if (a.length > 0) {
1836
+ c += t.spacingOuter;
1837
+ let u = r + t.indent;
1838
+ for (let f = 0; f < a.length; f++) {
1839
+ let p = a[f], l = s(p, t, u, n, o), d = s(e[p], t, u, n, o);
1840
+ c += `${u + l}: ${d}`, f < a.length - 1 ? c += `,${t.spacingInner}` : t.min || (c += ",");
1841
+ }
1842
+ c += t.spacingOuter + r;
1843
+ }
1844
+ return c;
1845
+ }
1846
+ i(er, "printObjectProperties");
1847
+ var Sc = typeof Symbol == "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621, et = " ", Ac = /* @__PURE__ */ i((e, t, r, n, o, s) => {
1848
+ let c = e.toString();
1849
+ if (c === "ArrayContaining" || c === "ArrayNotContaining")
1850
+ return ++n > t.maxDepth ? `[${c}]` : `${c + et}[${tt(
1851
+ e.sample,
1852
+ t,
1853
+ r,
1854
+ n,
1855
+ o,
1856
+ s
1857
+ )}]`;
1858
+ if (c === "ObjectContaining" || c === "ObjectNotContaining")
1859
+ return ++n > t.maxDepth ? `[${c}]` : `${c + et}{${er(
1860
+ e.sample,
1861
+ t,
1862
+ r,
1863
+ n,
1864
+ o,
1865
+ s
1866
+ )}}`;
1867
+ if (c === "StringMatching" || c === "StringNotMatching" || c === "StringContaining" || c === "StringNotContaining")
1868
+ return c + et + s(e.sample, t, r, n, o);
1869
+ if (typeof e.toAsymmetricMatcher != "function")
1870
+ throw new TypeError(
1871
+ `Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`
1872
+ );
1873
+ return e.toAsymmetricMatcher();
1874
+ }, "serialize$5"), Oc = /* @__PURE__ */ i((e) => e && e.$$typeof === Sc, "test$5"), wc = { serialize: Ac, test: Oc }, Ec = " ", Pn = /* @__PURE__ */ new Set(
1875
+ ["DOMStringMap", "NamedNodeMap"]), _c = /^(?:HTML\w*Collection|NodeList)$/;
1876
+ function Tc(e) {
1877
+ return Pn.has(e) || _c.test(e);
1878
+ }
1879
+ i(Tc, "testName");
1880
+ var $c = /* @__PURE__ */ i((e) => e && e.constructor && !!e.constructor.name && Tc(e.constructor.name), "test$4");
1881
+ function Pc(e) {
1882
+ return e.constructor.name === "NamedNodeMap";
1883
+ }
1884
+ i(Pc, "isNamedNodeMap");
1885
+ var Cc = /* @__PURE__ */ i((e, t, r, n, o, s) => {
1886
+ let c = e.constructor.name;
1887
+ return ++n > t.maxDepth ? `[${c}]` : (t.min ? "" : c + Ec) + (Pn.has(c) ? `{${er(
1888
+ Pc(e) ? [...e].reduce(
1889
+ (a, u) => (a[u.name] = u.value, a),
1890
+ {}
1891
+ ) : { ...e },
1892
+ t,
1893
+ r,
1894
+ n,
1895
+ o,
1896
+ s
1897
+ )}}` : `[${tt(
1898
+ [...e],
1899
+ t,
1900
+ r,
1901
+ n,
1902
+ o,
1903
+ s
1904
+ )}]`);
1905
+ }, "serialize$4"), Ic = { serialize: Cc, test: $c };
1906
+ function Cn(e) {
1907
+ return e.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
1908
+ }
1909
+ i(Cn, "escapeHTML");
1910
+ function tr(e, t, r, n, o, s, c) {
1911
+ let a = n + r.indent, u = r.colors;
1912
+ return e.map((f) => {
1913
+ let p = t[f], l = c(p, r, a, o, s);
1914
+ return typeof p != "string" && (l.includes(`
1915
+ `) && (l = r.spacingOuter + a + l + r.spacingOuter + n), l = `{${l}}`), `${r.spacingInner + n + u.prop.open + f + u.prop.close}=${u.value.open}${l}${u.
1916
+ value.close}`;
1917
+ }).join("");
1918
+ }
1919
+ i(tr, "printProps");
1920
+ function rr(e, t, r, n, o, s) {
1921
+ return e.map(
1922
+ (c) => t.spacingOuter + r + (typeof c == "string" ? In(c, t) : s(c, t, r, n, o))
1923
+ ).join("");
1924
+ }
1925
+ i(rr, "printChildren");
1926
+ function In(e, t) {
1927
+ let r = t.colors.content;
1928
+ return r.open + Cn(e) + r.close;
1929
+ }
1930
+ i(In, "printText");
1931
+ function Rc(e, t) {
1932
+ let r = t.colors.comment;
1933
+ return `${r.open}<!--${Cn(e)}-->${r.close}`;
1934
+ }
1935
+ i(Rc, "printComment");
1936
+ function nr(e, t, r, n, o) {
1937
+ let s = n.colors.tag;
1938
+ return `${s.open}<${e}${t && s.close + t + n.spacingOuter + o + s.open}${r ? `>${s.close}${r}${n.spacingOuter}${o}${s.open}</${e}` : `${t &&
1939
+ !n.min ? "" : " "}/`}>${s.close}`;
1940
+ }
1941
+ i(nr, "printElement");
1942
+ function or(e, t) {
1943
+ let r = t.colors.tag;
1944
+ return `${r.open}<${e}${r.close} \u2026${r.open} />${r.close}`;
1945
+ }
1946
+ i(or, "printElementAsLeaf");
1947
+ var jc = 1, Rn = 3, jn = 8, Nn = 11, Nc = /^(?:(?:HTML|SVG)\w*)?Element$/;
1948
+ function xc(e) {
1949
+ try {
1950
+ return typeof e.hasAttribute == "function" && e.hasAttribute("is");
1951
+ } catch {
1952
+ return !1;
1953
+ }
1954
+ }
1955
+ i(xc, "testHasAttribute");
1956
+ function Mc(e) {
1957
+ let t = e.constructor.name, { nodeType: r, tagName: n } = e, o = typeof n == "string" && n.includes("-") || xc(e);
1958
+ return r === jc && (Nc.test(t) || o) || r === Rn && t === "Text" || r === jn && t === "Comment" || r === Nn && t === "DocumentFragment";
1959
+ }
1960
+ i(Mc, "testNode");
1961
+ var vc = /* @__PURE__ */ i((e) => {
1962
+ var t;
1963
+ return ((t = e?.constructor) == null ? void 0 : t.name) && Mc(e);
1964
+ }, "test$3");
1965
+ function Fc(e) {
1966
+ return e.nodeType === Rn;
1967
+ }
1968
+ i(Fc, "nodeIsText");
1969
+ function Dc(e) {
1970
+ return e.nodeType === jn;
1971
+ }
1972
+ i(Dc, "nodeIsComment");
1973
+ function Jt(e) {
1974
+ return e.nodeType === Nn;
1975
+ }
1976
+ i(Jt, "nodeIsFragment");
1977
+ var Lc = /* @__PURE__ */ i((e, t, r, n, o, s) => {
1978
+ if (Fc(e))
1979
+ return In(e.data, t);
1980
+ if (Dc(e))
1981
+ return Rc(e.data, t);
1982
+ let c = Jt(e) ? "DocumentFragment" : e.tagName.toLowerCase();
1983
+ return ++n > t.maxDepth ? or(c, t) : nr(
1984
+ c,
1985
+ tr(
1986
+ Jt(e) ? [] : Array.from(e.attributes, (a) => a.name).sort(),
1987
+ Jt(e) ? {} : [...e.attributes].reduce(
1988
+ (a, u) => (a[u.name] = u.value, a),
1989
+ {}
1990
+ ),
1991
+ t,
1992
+ r + t.indent,
1993
+ n,
1994
+ o,
1995
+ s
1996
+ ),
1997
+ rr(
1998
+ Array.prototype.slice.call(e.childNodes || e.children),
1999
+ t,
2000
+ r + t.indent,
2001
+ n,
2002
+ o,
2003
+ s
2004
+ ),
2005
+ t,
2006
+ r
2007
+ );
2008
+ }, "serialize$3"), Bc = { serialize: Lc, test: vc }, kc = "@@__IMMUTABLE_ITERABLE__@@", Uc = "@@__IMMUTABLE_LIST__@@", qc = "@@__IMMUTABLE_K\
2009
+ EYED__@@", zc = "@@__IMMUTABLE_MAP__@@", dn = "@@__IMMUTABLE_ORDERED__@@", Wc = "@@__IMMUTABLE_RECORD__@@", Gc = "@@__IMMUTABLE_SEQ__@@", Vc = "\
2010
+ @@__IMMUTABLE_SET__@@", Yc = "@@__IMMUTABLE_STACK__@@", Te = /* @__PURE__ */ i((e) => `Immutable.${e}`, "getImmutableName"), ot = /* @__PURE__ */ i(
2011
+ (e) => `[${e}]`, "printAsLeaf"), ke = " ", bn = "\u2026";
2012
+ function Hc(e, t, r, n, o, s, c) {
2013
+ return ++n > t.maxDepth ? ot(Te(c)) : `${Te(c) + ke}{${nt(
2014
+ e.entries(),
2015
+ t,
2016
+ r,
2017
+ n,
2018
+ o,
2019
+ s
2020
+ )}}`;
2021
+ }
2022
+ i(Hc, "printImmutableEntries");
2023
+ function Jc(e) {
2024
+ let t = 0;
2025
+ return {
2026
+ next() {
2027
+ if (t < e._keys.length) {
2028
+ let r = e._keys[t++];
2029
+ return { done: !1, value: [r, e.get(r)] };
2030
+ }
2031
+ return { done: !0, value: void 0 };
2032
+ }
2033
+ };
2034
+ }
2035
+ i(Jc, "getRecordEntries");
2036
+ function Kc(e, t, r, n, o, s) {
2037
+ let c = Te(e._name || "Record");
2038
+ return ++n > t.maxDepth ? ot(c) : `${c + ke}{${nt(
2039
+ Jc(e),
2040
+ t,
2041
+ r,
2042
+ n,
2043
+ o,
2044
+ s
2045
+ )}}`;
2046
+ }
2047
+ i(Kc, "printImmutableRecord");
2048
+ function Xc(e, t, r, n, o, s) {
2049
+ let c = Te("Seq");
2050
+ return ++n > t.maxDepth ? ot(c) : e[qc] ? `${c + ke}{${// from Immutable collection of entries or from ECMAScript object
2051
+ e._iter || e._object ? nt(
2052
+ e.entries(),
2053
+ t,
2054
+ r,
2055
+ n,
2056
+ o,
2057
+ s
2058
+ ) : bn}}` : `${c + ke}[${e._iter || e._array || e._collection || e._iterable ? Qt(
2059
+ e.values(),
2060
+ t,
2061
+ r,
2062
+ n,
2063
+ o,
2064
+ s
2065
+ ) : bn}]`;
2066
+ }
2067
+ i(Xc, "printImmutableSeq");
2068
+ function Kt(e, t, r, n, o, s, c) {
2069
+ return ++n > t.maxDepth ? ot(Te(c)) : `${Te(c) + ke}[${Qt(
2070
+ e.values(),
2071
+ t,
2072
+ r,
2073
+ n,
2074
+ o,
2075
+ s
2076
+ )}]`;
2077
+ }
2078
+ i(Kt, "printImmutableValues");
2079
+ var Zc = /* @__PURE__ */ i((e, t, r, n, o, s) => e[zc] ? Hc(
2080
+ e,
2081
+ t,
2082
+ r,
2083
+ n,
2084
+ o,
2085
+ s,
2086
+ e[dn] ? "OrderedMap" : "Map"
2087
+ ) : e[Uc] ? Kt(
2088
+ e,
2089
+ t,
2090
+ r,
2091
+ n,
2092
+ o,
2093
+ s,
2094
+ "List"
2095
+ ) : e[Vc] ? Kt(
2096
+ e,
2097
+ t,
2098
+ r,
2099
+ n,
2100
+ o,
2101
+ s,
2102
+ e[dn] ? "OrderedSet" : "Set"
2103
+ ) : e[Yc] ? Kt(
2104
+ e,
2105
+ t,
2106
+ r,
2107
+ n,
2108
+ o,
2109
+ s,
2110
+ "Stack"
2111
+ ) : e[Gc] ? Xc(e, t, r, n, o, s) : Kc(e, t, r, n, o, s), "serialize$2"), Qc = /* @__PURE__ */ i((e) => e && (e[kc] === !0 || e[Wc] === !0), "\
2112
+ test$2"), ea = { serialize: Zc, test: Qc }, Xt = { exports: {} };
2113
+ var R = {};
2114
+ var Sn;
2115
+ function ta() {
2116
+ return Sn || (Sn = 1, function() {
2117
+ var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"),
2118
+ o = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), c = Symbol.for("react.context"), a = Symbol.for("react.server_contex\
2119
+ t"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), l = Symbol.for("react.mem\
2120
+ o"), d = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), g = !1, m = !1, b = !1, A = !1, O = !1, $;
2121
+ $ = Symbol.for("react.module.reference");
2122
+ function h(_) {
2123
+ return !!(typeof _ == "string" || typeof _ == "function" || _ === r || _ === o || O || _ === n || _ === f || _ === p || A || _ === y ||
2124
+ g || m || b || typeof _ == "object" && _ !== null && (_.$$typeof === d || _.$$typeof === l || _.$$typeof === s || _.$$typeof === c || _.
2125
+ $$typeof === u || // This needs to include all possible module reference object
2126
+ // types supported by any Flight configuration anywhere since
2127
+ // we don't know which Flight build this will end up being used
2128
+ // with.
2129
+ _.$$typeof === $ || _.getModuleId !== void 0));
2130
+ }
2131
+ i(h, "isValidElementType");
2132
+ function S(_) {
2133
+ if (typeof _ == "object" && _ !== null) {
2134
+ var Yt = _.$$typeof;
2135
+ switch (Yt) {
2136
+ case e:
2137
+ var Qe = _.type;
2138
+ switch (Qe) {
2139
+ case r:
2140
+ case o:
2141
+ case n:
2142
+ case f:
2143
+ case p:
2144
+ return Qe;
2145
+ default:
2146
+ var gn = Qe && Qe.$$typeof;
2147
+ switch (gn) {
2148
+ case a:
2149
+ case c:
2150
+ case u:
2151
+ case d:
2152
+ case l:
2153
+ case s:
2154
+ return gn;
2155
+ default:
2156
+ return Yt;
2157
+ }
2158
+ }
2159
+ case t:
2160
+ return Yt;
2161
+ }
2162
+ }
2163
+ }
2164
+ i(S, "typeOf");
2165
+ var T = c, w = s, j = e, X = u, ne = r, M = d, q = l, Z = t, V = o, x = n, F = f, D = p, Q = !1, B = !1;
2166
+ function H(_) {
2167
+ return Q || (Q = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
2168
+ }
2169
+ i(H, "isAsyncMode");
2170
+ function ae(_) {
2171
+ return B || (B = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
2172
+ }
2173
+ i(ae, "isConcurrentMode");
2174
+ function J(_) {
2175
+ return S(_) === c;
2176
+ }
2177
+ i(J, "isContextConsumer");
2178
+ function K(_) {
2179
+ return S(_) === s;
2180
+ }
2181
+ i(K, "isContextProvider");
2182
+ function fe(_) {
2183
+ return typeof _ == "object" && _ !== null && _.$$typeof === e;
2184
+ }
2185
+ i(fe, "isElement");
2186
+ function ee(_) {
2187
+ return S(_) === u;
2188
+ }
2189
+ i(ee, "isForwardRef");
2190
+ function Y(_) {
2191
+ return S(_) === r;
2192
+ }
2193
+ i(Y, "isFragment");
2194
+ function ue(_) {
2195
+ return S(_) === d;
2196
+ }
2197
+ i(ue, "isLazy");
2198
+ function _e(_) {
2199
+ return S(_) === l;
2200
+ }
2201
+ i(_e, "isMemo");
2202
+ function ge(_) {
2203
+ return S(_) === t;
2204
+ }
2205
+ i(ge, "isPortal");
2206
+ function Be(_) {
2207
+ return S(_) === o;
2208
+ }
2209
+ i(Be, "isProfiler");
2210
+ function Xe(_) {
2211
+ return S(_) === n;
2212
+ }
2213
+ i(Xe, "isStrictMode");
2214
+ function Ze(_) {
2215
+ return S(_) === f;
2216
+ }
2217
+ i(Ze, "isSuspense");
2218
+ function gc(_) {
2219
+ return S(_) === p;
2220
+ }
2221
+ i(gc, "isSuspenseList"), R.ContextConsumer = T, R.ContextProvider = w, R.Element = j, R.ForwardRef = X, R.Fragment = ne, R.Lazy = M, R.Memo =
2222
+ q, R.Portal = Z, R.Profiler = V, R.StrictMode = x, R.Suspense = F, R.SuspenseList = D, R.isAsyncMode = H, R.isConcurrentMode = ae, R.isContextConsumer =
2223
+ J, R.isContextProvider = K, R.isElement = fe, R.isForwardRef = ee, R.isFragment = Y, R.isLazy = ue, R.isMemo = _e, R.isPortal = ge, R.isProfiler =
2224
+ Be, R.isStrictMode = Xe, R.isSuspense = Ze, R.isSuspenseList = gc, R.isValidElementType = h, R.typeOf = S;
2225
+ }()), R;
2226
+ }
2227
+ i(ta, "requireReactIs_development");
2228
+ var An;
2229
+ function ra() {
2230
+ return An || (An = 1, Xt.exports = ta()), Xt.exports;
2231
+ }
2232
+ i(ra, "requireReactIs");
2233
+ var de = ra();
2234
+ function xn(e, t = []) {
2235
+ if (Array.isArray(e))
2236
+ for (let r of e)
2237
+ xn(r, t);
2238
+ else e != null && e !== !1 && e !== "" && t.push(e);
2239
+ return t;
2240
+ }
2241
+ i(xn, "getChildren");
2242
+ function On(e) {
2243
+ let t = e.type;
2244
+ if (typeof t == "string")
2245
+ return t;
2246
+ if (typeof t == "function")
2247
+ return t.displayName || t.name || "Unknown";
2248
+ if (de.isFragment(e))
2249
+ return "React.Fragment";
2250
+ if (de.isSuspense(e))
2251
+ return "React.Suspense";
2252
+ if (typeof t == "object" && t !== null) {
2253
+ if (de.isContextProvider(e))
2254
+ return "Context.Provider";
2255
+ if (de.isContextConsumer(e))
2256
+ return "Context.Consumer";
2257
+ if (de.isForwardRef(e)) {
2258
+ if (t.displayName)
2259
+ return t.displayName;
2260
+ let r = t.render.displayName || t.render.name || "";
2261
+ return r === "" ? "ForwardRef" : `ForwardRef(${r})`;
2262
+ }
2263
+ if (de.isMemo(e)) {
2264
+ let r = t.displayName || t.type.displayName || t.type.name || "";
2265
+ return r === "" ? "Memo" : `Memo(${r})`;
2266
+ }
2267
+ }
2268
+ return "UNDEFINED";
2269
+ }
2270
+ i(On, "getType");
2271
+ function na(e) {
2272
+ let { props: t } = e;
2273
+ return Object.keys(t).filter((r) => r !== "children" && t[r] !== void 0).sort();
2274
+ }
2275
+ i(na, "getPropKeys$1");
2276
+ var oa = /* @__PURE__ */ i((e, t, r, n, o, s) => ++n > t.maxDepth ? or(On(e), t) : nr(
2277
+ On(e),
2278
+ tr(
2279
+ na(e),
2280
+ e.props,
2281
+ t,
2282
+ r + t.indent,
2283
+ n,
2284
+ o,
2285
+ s
2286
+ ),
2287
+ rr(
2288
+ xn(e.props.children),
2289
+ t,
2290
+ r + t.indent,
2291
+ n,
2292
+ o,
2293
+ s
2294
+ ),
2295
+ t,
2296
+ r
2297
+ ), "serialize$1"), ia = /* @__PURE__ */ i((e) => e != null && de.isElement(e), "test$1"), sa = { serialize: oa, test: ia }, ca = typeof Symbol ==
2298
+ "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
2299
+ function aa(e) {
2300
+ let { props: t } = e;
2301
+ return t ? Object.keys(t).filter((r) => t[r] !== void 0).sort() : [];
2302
+ }
2303
+ i(aa, "getPropKeys");
2304
+ var ua = /* @__PURE__ */ i((e, t, r, n, o, s) => ++n > t.maxDepth ? or(e.type, t) : nr(
2305
+ e.type,
2306
+ e.props ? tr(
2307
+ aa(e),
2308
+ e.props,
2309
+ t,
2310
+ r + t.indent,
2311
+ n,
2312
+ o,
2313
+ s
2314
+ ) : "",
2315
+ e.children ? rr(
2316
+ e.children,
2317
+ t,
2318
+ r + t.indent,
2319
+ n,
2320
+ o,
2321
+ s
2322
+ ) : "",
2323
+ t,
2324
+ r
2325
+ ), "serialize"), la = /* @__PURE__ */ i((e) => e && e.$$typeof === ca, "test"), fa = { serialize: ua, test: la }, Mn = Object.prototype.toString,
2326
+ pa = Date.prototype.toISOString, ya = Error.prototype.toString, wn = RegExp.prototype.toString;
2327
+ function Zt(e) {
2328
+ return typeof e.constructor == "function" && e.constructor.name || "Object";
2329
+ }
2330
+ i(Zt, "getConstructorName");
2331
+ function ga(e) {
2332
+ return typeof window < "u" && e === window;
2333
+ }
2334
+ i(ga, "isWindow");
2335
+ var ma = /^Symbol\((.*)\)(.*)$/, ha = /\n/g, sr = class sr extends Error {
2336
+ constructor(t, r) {
2337
+ super(t), this.stack = r, this.name = this.constructor.name;
2338
+ }
2339
+ };
2340
+ i(sr, "PrettyFormatPluginError");
2341
+ var rt = sr;
2342
+ function da(e) {
2343
+ return e === "[object Array]" || e === "[object ArrayBuffer]" || e === "[object DataView]" || e === "[object Float32Array]" || e === "[obj\
2344
+ ect Float64Array]" || e === "[object Int8Array]" || e === "[object Int16Array]" || e === "[object Int32Array]" || e === "[object Uint8Array]" ||
2345
+ e === "[object Uint8ClampedArray]" || e === "[object Uint16Array]" || e === "[object Uint32Array]";
2346
+ }
2347
+ i(da, "isToStringedArrayType");
2348
+ function ba(e) {
2349
+ return Object.is(e, -0) ? "-0" : String(e);
2350
+ }
2351
+ i(ba, "printNumber");
2352
+ function Sa(e) {
2353
+ return `${e}n`;
2354
+ }
2355
+ i(Sa, "printBigInt");
2356
+ function En(e, t) {
2357
+ return t ? `[Function ${e.name || "anonymous"}]` : "[Function]";
2358
+ }
2359
+ i(En, "printFunction");
2360
+ function _n(e) {
2361
+ return String(e).replace(ma, "Symbol($1)");
2362
+ }
2363
+ i(_n, "printSymbol");
2364
+ function Tn(e) {
2365
+ return `[${ya.call(e)}]`;
2366
+ }
2367
+ i(Tn, "printError");
2368
+ function vn(e, t, r, n) {
2369
+ if (e === !0 || e === !1)
2370
+ return `${e}`;
2371
+ if (e === void 0)
2372
+ return "undefined";
2373
+ if (e === null)
2374
+ return "null";
2375
+ let o = typeof e;
2376
+ if (o === "number")
2377
+ return ba(e);
2378
+ if (o === "bigint")
2379
+ return Sa(e);
2380
+ if (o === "string")
2381
+ return n ? `"${e.replaceAll(/"|\\/g, "\\$&")}"` : `"${e}"`;
2382
+ if (o === "function")
2383
+ return En(e, t);
2384
+ if (o === "symbol")
2385
+ return _n(e);
2386
+ let s = Mn.call(e);
2387
+ return s === "[object WeakMap]" ? "WeakMap {}" : s === "[object WeakSet]" ? "WeakSet {}" : s === "[object Function]" || s === "[object Gen\
2388
+ eratorFunction]" ? En(e, t) : s === "[object Symbol]" ? _n(e) : s === "[object Date]" ? Number.isNaN(+e) ? "Date { NaN }" : pa.call(e) : s ===
2389
+ "[object Error]" ? Tn(e) : s === "[object RegExp]" ? r ? wn.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&") : wn.call(e) : e instanceof Error ?
2390
+ Tn(e) : null;
2391
+ }
2392
+ i(vn, "printBasicValue");
2393
+ function Fn(e, t, r, n, o, s) {
2394
+ if (o.includes(e))
2395
+ return "[Circular]";
2396
+ o = [...o], o.push(e);
2397
+ let c = ++n > t.maxDepth, a = t.min;
2398
+ if (t.callToJSON && !c && e.toJSON && typeof e.toJSON == "function" && !s)
2399
+ return me(e.toJSON(), t, r, n, o, !0);
2400
+ let u = Mn.call(e);
2401
+ return u === "[object Arguments]" ? c ? "[Arguments]" : `${a ? "" : "Arguments "}[${tt(
2402
+ e,
2403
+ t,
2404
+ r,
2405
+ n,
2406
+ o,
2407
+ me
2408
+ )}]` : da(u) ? c ? `[${e.constructor.name}]` : `${a || !t.printBasicPrototype && e.constructor.name === "Array" ? "" : `${e.constructor.name}\
2409
+ `}[${tt(e, t, r, n, o, me)}]` : u === "[object Map]" ? c ? "[Map]" : `Map {${nt(
2410
+ e.entries(),
2411
+ t,
2412
+ r,
2413
+ n,
2414
+ o,
2415
+ me,
2416
+ " => "
2417
+ )}}` : u === "[object Set]" ? c ? "[Set]" : `Set {${Qt(
2418
+ e.values(),
2419
+ t,
2420
+ r,
2421
+ n,
2422
+ o,
2423
+ me
2424
+ )}}` : c || ga(e) ? `[${Zt(e)}]` : `${a || !t.printBasicPrototype && Zt(e) === "Object" ? "" : `${Zt(e)} `}{${er(
2425
+ e,
2426
+ t,
2427
+ r,
2428
+ n,
2429
+ o,
2430
+ me
2431
+ )}}`;
2432
+ }
2433
+ i(Fn, "printComplexValue");
2434
+ function Aa(e) {
2435
+ return e.serialize != null;
2436
+ }
2437
+ i(Aa, "isNewPlugin");
2438
+ function Dn(e, t, r, n, o, s) {
2439
+ let c;
2440
+ try {
2441
+ c = Aa(e) ? e.serialize(t, r, n, o, s, me) : e.print(
2442
+ t,
2443
+ (a) => me(a, r, n, o, s),
2444
+ (a) => {
2445
+ let u = n + r.indent;
2446
+ return u + a.replaceAll(ha, `
2447
+ ${u}`);
2448
+ },
2449
+ {
2450
+ edgeSpacing: r.spacingOuter,
2451
+ min: r.min,
2452
+ spacing: r.spacingInner
2453
+ },
2454
+ r.colors
2455
+ );
2456
+ } catch (a) {
2457
+ throw new rt(a.message, a.stack);
2458
+ }
2459
+ if (typeof c != "string")
2460
+ throw new TypeError(
2461
+ `pretty-format: Plugin must return type "string" but instead returned "${typeof c}".`
2462
+ );
2463
+ return c;
2464
+ }
2465
+ i(Dn, "printPlugin");
2466
+ function Ln(e, t) {
2467
+ for (let r of e)
2468
+ try {
2469
+ if (r.test(t))
2470
+ return r;
2471
+ } catch (n) {
2472
+ throw new rt(n.message, n.stack);
2473
+ }
2474
+ return null;
2475
+ }
2476
+ i(Ln, "findPlugin");
2477
+ function me(e, t, r, n, o, s) {
2478
+ let c = Ln(t.plugins, e);
2479
+ if (c !== null)
2480
+ return Dn(c, e, t, r, n, o);
2481
+ let a = vn(
2482
+ e,
2483
+ t.printFunctionName,
2484
+ t.escapeRegex,
2485
+ t.escapeString
2486
+ );
2487
+ return a !== null ? a : Fn(
2488
+ e,
2489
+ t,
2490
+ r,
2491
+ n,
2492
+ o,
2493
+ s
2494
+ );
2495
+ }
2496
+ i(me, "printer");
2497
+ var ir = {
2498
+ comment: "gray",
2499
+ content: "reset",
2500
+ prop: "yellow",
2501
+ tag: "cyan",
2502
+ value: "green"
2503
+ }, Bn = Object.keys(ir), ie = {
2504
+ callToJSON: !0,
2505
+ compareKeys: void 0,
2506
+ escapeRegex: !1,
2507
+ escapeString: !0,
2508
+ highlight: !1,
2509
+ indent: 2,
2510
+ maxDepth: Number.POSITIVE_INFINITY,
2511
+ maxWidth: Number.POSITIVE_INFINITY,
2512
+ min: !1,
2513
+ plugins: [],
2514
+ printBasicPrototype: !0,
2515
+ printFunctionName: !0,
2516
+ theme: ir
2517
+ };
2518
+ function Oa(e) {
2519
+ for (let t of Object.keys(e))
2520
+ if (!Object.prototype.hasOwnProperty.call(ie, t))
2521
+ throw new Error(`pretty-format: Unknown option "${t}".`);
2522
+ if (e.min && e.indent !== void 0 && e.indent !== 0)
2523
+ throw new Error(
2524
+ 'pretty-format: Options "min" and "indent" cannot be used together.'
2525
+ );
2526
+ }
2527
+ i(Oa, "validateOptions");
2528
+ function wa() {
2529
+ return Bn.reduce((e, t) => {
2530
+ let r = ir[t], n = r && oe[r];
2531
+ if (n && typeof n.close == "string" && typeof n.open == "string")
2532
+ e[t] = n;
2533
+ else
2534
+ throw new Error(
2535
+ `pretty-format: Option "theme" has a key "${t}" whose value "${r}" is undefined in ansi-styles.`
2536
+ );
2537
+ return e;
2538
+ }, /* @__PURE__ */ Object.create(null));
2539
+ }
2540
+ i(wa, "getColorsHighlight");
2541
+ function Ea() {
2542
+ return Bn.reduce((e, t) => (e[t] = { close: "", open: "" }, e), /* @__PURE__ */ Object.create(null));
2543
+ }
2544
+ i(Ea, "getColorsEmpty");
2545
+ function kn(e) {
2546
+ return e?.printFunctionName ?? ie.printFunctionName;
2547
+ }
2548
+ i(kn, "getPrintFunctionName");
2549
+ function Un(e) {
2550
+ return e?.escapeRegex ?? ie.escapeRegex;
2551
+ }
2552
+ i(Un, "getEscapeRegex");
2553
+ function qn(e) {
2554
+ return e?.escapeString ?? ie.escapeString;
2555
+ }
2556
+ i(qn, "getEscapeString");
2557
+ function $n(e) {
2558
+ return {
2559
+ callToJSON: e?.callToJSON ?? ie.callToJSON,
2560
+ colors: e?.highlight ? wa() : Ea(),
2561
+ compareKeys: typeof e?.compareKeys == "function" || e?.compareKeys === null ? e.compareKeys : ie.compareKeys,
2562
+ escapeRegex: Un(e),
2563
+ escapeString: qn(e),
2564
+ indent: e?.min ? "" : _a(e?.indent ?? ie.indent),
2565
+ maxDepth: e?.maxDepth ?? ie.maxDepth,
2566
+ maxWidth: e?.maxWidth ?? ie.maxWidth,
2567
+ min: e?.min ?? ie.min,
2568
+ plugins: e?.plugins ?? ie.plugins,
2569
+ printBasicPrototype: e?.printBasicPrototype ?? !0,
2570
+ printFunctionName: kn(e),
2571
+ spacingInner: e?.min ? " " : `
2572
+ `,
2573
+ spacingOuter: e?.min ? "" : `
2574
+ `
2575
+ };
2576
+ }
2577
+ i($n, "getConfig");
2578
+ function _a(e) {
2579
+ return Array.from({ length: e + 1 }).join(" ");
2580
+ }
2581
+ i(_a, "createIndent");
2582
+ function te(e, t) {
2583
+ if (t && (Oa(t), t.plugins)) {
2584
+ let n = Ln(t.plugins, e);
2585
+ if (n !== null)
2586
+ return Dn(n, e, $n(t), "", 0, []);
2587
+ }
2588
+ let r = vn(
2589
+ e,
2590
+ kn(t),
2591
+ Un(t),
2592
+ qn(t)
2593
+ );
2594
+ return r !== null ? r : Fn(e, $n(t), "", 0, []);
2595
+ }
2596
+ i(te, "format");
2597
+ var it = {
2598
+ AsymmetricMatcher: wc,
2599
+ DOMCollection: Ic,
2600
+ DOMElement: Bc,
2601
+ Immutable: ea,
2602
+ ReactElement: sa,
2603
+ ReactTestComponent: fa
2604
+ };
2605
+
2606
+ // ../node_modules/loupe/lib/helpers.js
2607
+ var zn = {
2608
+ bold: ["1", "22"],
2609
+ dim: ["2", "22"],
2610
+ italic: ["3", "23"],
2611
+ underline: ["4", "24"],
2612
+ // 5 & 6 are blinking
2613
+ inverse: ["7", "27"],
2614
+ hidden: ["8", "28"],
2615
+ strike: ["9", "29"],
2616
+ // 10-20 are fonts
2617
+ // 21-29 are resets for 1-9
2618
+ black: ["30", "39"],
2619
+ red: ["31", "39"],
2620
+ green: ["32", "39"],
2621
+ yellow: ["33", "39"],
2622
+ blue: ["34", "39"],
2623
+ magenta: ["35", "39"],
2624
+ cyan: ["36", "39"],
2625
+ white: ["37", "39"],
2626
+ brightblack: ["30;1", "39"],
2627
+ brightred: ["31;1", "39"],
2628
+ brightgreen: ["32;1", "39"],
2629
+ brightyellow: ["33;1", "39"],
2630
+ brightblue: ["34;1", "39"],
2631
+ brightmagenta: ["35;1", "39"],
2632
+ brightcyan: ["36;1", "39"],
2633
+ brightwhite: ["37;1", "39"],
2634
+ grey: ["90", "39"]
2635
+ }, Ta = {
2636
+ special: "cyan",
2637
+ number: "yellow",
2638
+ bigint: "yellow",
2639
+ boolean: "yellow",
2640
+ undefined: "grey",
2641
+ null: "bold",
2642
+ string: "green",
2643
+ symbol: "green",
2644
+ date: "magenta",
2645
+ regexp: "red"
2646
+ }, pe = "\u2026";
2647
+ function $a(e, t) {
2648
+ let r = zn[Ta[t]] || zn[t] || "";
2649
+ return r ? `\x1B[${r[0]}m${String(e)}\x1B[${r[1]}m` : String(e);
2650
+ }
2651
+ i($a, "colorise");
2652
+ function Wn({
2653
+ showHidden: e = !1,
2654
+ depth: t = 2,
2655
+ colors: r = !1,
2656
+ customInspect: n = !0,
2657
+ showProxy: o = !1,
2658
+ maxArrayLength: s = 1 / 0,
2659
+ breakLength: c = 1 / 0,
2660
+ seen: a = [],
2661
+ // eslint-disable-next-line no-shadow
2662
+ truncate: u = 1 / 0,
2663
+ stylize: f = String
2664
+ } = {}, p) {
2665
+ let l = {
2666
+ showHidden: !!e,
2667
+ depth: Number(t),
2668
+ colors: !!r,
2669
+ customInspect: !!n,
2670
+ showProxy: !!o,
2671
+ maxArrayLength: Number(s),
2672
+ breakLength: Number(c),
2673
+ truncate: Number(u),
2674
+ seen: a,
2675
+ inspect: p,
2676
+ stylize: f
2677
+ };
2678
+ return l.colors && (l.stylize = $a), l;
2679
+ }
2680
+ i(Wn, "normaliseOptions");
2681
+ function Pa(e) {
2682
+ return e >= "\uD800" && e <= "\uDBFF";
2683
+ }
2684
+ i(Pa, "isHighSurrogate");
2685
+ function W(e, t, r = pe) {
2686
+ e = String(e);
2687
+ let n = r.length, o = e.length;
2688
+ if (n > t && o > n)
2689
+ return r;
2690
+ if (o > t && o > n) {
2691
+ let s = t - n;
2692
+ return s > 0 && Pa(e[s - 1]) && (s = s - 1), `${e.slice(0, s)}${r}`;
2693
+ }
2694
+ return e;
2695
+ }
2696
+ i(W, "truncate");
2697
+ function L(e, t, r, n = ", ") {
2698
+ r = r || t.inspect;
2699
+ let o = e.length;
2700
+ if (o === 0)
2701
+ return "";
2702
+ let s = t.truncate, c = "", a = "", u = "";
2703
+ for (let f = 0; f < o; f += 1) {
2704
+ let p = f + 1 === e.length, l = f + 2 === e.length;
2705
+ u = `${pe}(${e.length - f})`;
2706
+ let d = e[f];
2707
+ t.truncate = s - c.length - (p ? 0 : n.length);
2708
+ let y = a || r(d, t) + (p ? "" : n), g = c.length + y.length, m = g + u.length;
2709
+ if (p && g > s && c.length + u.length <= s || !p && !l && m > s || (a = p ? "" : r(e[f + 1], t) + (l ? "" : n), !p && l && m > s && g + a.
2710
+ length > s))
2711
+ break;
2712
+ if (c += y, !p && !l && g + a.length >= s) {
2713
+ u = `${pe}(${e.length - f - 1})`;
2714
+ break;
2715
+ }
2716
+ u = "";
2717
+ }
2718
+ return `${c}${u}`;
2719
+ }
2720
+ i(L, "inspectList");
2721
+ function Ca(e) {
2722
+ return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/) ? e : JSON.stringify(e).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
2723
+ }
2724
+ i(Ca, "quoteComplexKey");
2725
+ function ye([e, t], r) {
2726
+ return r.truncate -= 2, typeof e == "string" ? e = Ca(e) : typeof e != "number" && (e = `[${r.inspect(e, r)}]`), r.truncate -= e.length, t =
2727
+ r.inspect(t, r), `${e}: ${t}`;
2728
+ }
2729
+ i(ye, "inspectProperty");
2730
+
2731
+ // ../node_modules/loupe/lib/array.js
2732
+ function cr(e, t) {
2733
+ let r = Object.keys(e).slice(e.length);
2734
+ if (!e.length && !r.length)
2735
+ return "[]";
2736
+ t.truncate -= 4;
2737
+ let n = L(e, t);
2738
+ t.truncate -= n.length;
2739
+ let o = "";
2740
+ return r.length && (o = L(r.map((s) => [s, e[s]]), t, ye)), `[ ${n}${o ? `, ${o}` : ""} ]`;
2741
+ }
2742
+ i(cr, "inspectArray");
2743
+
2744
+ // ../node_modules/loupe/lib/typedarray.js
2745
+ var Ia = /* @__PURE__ */ i((e) => typeof Buffer == "function" && e instanceof Buffer ? "Buffer" : e[Symbol.toStringTag] ? e[Symbol.toStringTag] :
2746
+ e.constructor.name, "getArrayName");
2747
+ function se(e, t) {
2748
+ let r = Ia(e);
2749
+ t.truncate -= r.length + 4;
2750
+ let n = Object.keys(e).slice(e.length);
2751
+ if (!e.length && !n.length)
2752
+ return `${r}[]`;
2753
+ let o = "";
2754
+ for (let c = 0; c < e.length; c++) {
2755
+ let a = `${t.stylize(W(e[c], t.truncate), "number")}${c === e.length - 1 ? "" : ", "}`;
2756
+ if (t.truncate -= a.length, e[c] !== e.length && t.truncate <= 3) {
2757
+ o += `${pe}(${e.length - e[c] + 1})`;
2758
+ break;
2759
+ }
2760
+ o += a;
2761
+ }
2762
+ let s = "";
2763
+ return n.length && (s = L(n.map((c) => [c, e[c]]), t, ye)), `${r}[ ${o}${s ? `, ${s}` : ""} ]`;
2764
+ }
2765
+ i(se, "inspectTypedArray");
2766
+
2767
+ // ../node_modules/loupe/lib/date.js
2768
+ function ar(e, t) {
2769
+ let r = e.toJSON();
2770
+ if (r === null)
2771
+ return "Invalid Date";
2772
+ let n = r.split("T"), o = n[0];
2773
+ return t.stylize(`${o}T${W(n[1], t.truncate - o.length - 1)}`, "date");
2774
+ }
2775
+ i(ar, "inspectDate");
2776
+
2777
+ // ../node_modules/loupe/lib/function.js
2778
+ function st(e, t) {
2779
+ let r = e[Symbol.toStringTag] || "Function", n = e.name;
2780
+ return n ? t.stylize(`[${r} ${W(n, t.truncate - 11)}]`, "special") : t.stylize(`[${r}]`, "special");
2781
+ }
2782
+ i(st, "inspectFunction");
2783
+
2784
+ // ../node_modules/loupe/lib/map.js
2785
+ function Ra([e, t], r) {
2786
+ return r.truncate -= 4, e = r.inspect(e, r), r.truncate -= e.length, t = r.inspect(t, r), `${e} => ${t}`;
2787
+ }
2788
+ i(Ra, "inspectMapEntry");
2789
+ function ja(e) {
2790
+ let t = [];
2791
+ return e.forEach((r, n) => {
2792
+ t.push([n, r]);
2793
+ }), t;
2794
+ }
2795
+ i(ja, "mapToEntries");
2796
+ function ur(e, t) {
2797
+ return e.size - 1 <= 0 ? "Map{}" : (t.truncate -= 7, `Map{ ${L(ja(e), t, Ra)} }`);
2798
+ }
2799
+ i(ur, "inspectMap");
2800
+
2801
+ // ../node_modules/loupe/lib/number.js
2802
+ var Na = Number.isNaN || ((e) => e !== e);
2803
+ function ct(e, t) {
2804
+ return Na(e) ? t.stylize("NaN", "number") : e === 1 / 0 ? t.stylize("Infinity", "number") : e === -1 / 0 ? t.stylize("-Infinity", "number") :
2805
+ e === 0 ? t.stylize(1 / e === 1 / 0 ? "+0" : "-0", "number") : t.stylize(W(String(e), t.truncate), "number");
2806
+ }
2807
+ i(ct, "inspectNumber");
2808
+
2809
+ // ../node_modules/loupe/lib/bigint.js
2810
+ function at(e, t) {
2811
+ let r = W(e.toString(), t.truncate - 1);
2812
+ return r !== pe && (r += "n"), t.stylize(r, "bigint");
2813
+ }
2814
+ i(at, "inspectBigInt");
2815
+
2816
+ // ../node_modules/loupe/lib/regexp.js
2817
+ function lr(e, t) {
2818
+ let r = e.toString().split("/")[2], n = t.truncate - (2 + r.length), o = e.source;
2819
+ return t.stylize(`/${W(o, n)}/${r}`, "regexp");
2820
+ }
2821
+ i(lr, "inspectRegExp");
2822
+
2823
+ // ../node_modules/loupe/lib/set.js
2824
+ function xa(e) {
2825
+ let t = [];
2826
+ return e.forEach((r) => {
2827
+ t.push(r);
2828
+ }), t;
2829
+ }
2830
+ i(xa, "arrayFromSet");
2831
+ function fr(e, t) {
2832
+ return e.size === 0 ? "Set{}" : (t.truncate -= 7, `Set{ ${L(xa(e), t)} }`);
2833
+ }
2834
+ i(fr, "inspectSet");
2835
+
2836
+ // ../node_modules/loupe/lib/string.js
2837
+ var Gn = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\u\
2838
+ ffff]", "g"), Ma = {
2839
+ "\b": "\\b",
2840
+ " ": "\\t",
2841
+ "\n": "\\n",
2842
+ "\f": "\\f",
2843
+ "\r": "\\r",
2844
+ "'": "\\'",
2845
+ "\\": "\\\\"
2846
+ }, va = 16, Fa = 4;
2847
+ function Da(e) {
2848
+ return Ma[e] || `\\u${`0000${e.charCodeAt(0).toString(va)}`.slice(-Fa)}`;
2849
+ }
2850
+ i(Da, "escape");
2851
+ function ut(e, t) {
2852
+ return Gn.test(e) && (e = e.replace(Gn, Da)), t.stylize(`'${W(e, t.truncate - 2)}'`, "string");
2853
+ }
2854
+ i(ut, "inspectString");
2855
+
2856
+ // ../node_modules/loupe/lib/symbol.js
2857
+ function lt(e) {
2858
+ return "description" in Symbol.prototype ? e.description ? `Symbol(${e.description})` : "Symbol()" : e.toString();
2859
+ }
2860
+ i(lt, "inspectSymbol");
2861
+
2862
+ // ../node_modules/loupe/lib/promise.js
2863
+ var Vn = /* @__PURE__ */ i(() => "Promise{\u2026}", "getPromiseValue");
2864
+ try {
2865
+ let { getPromiseDetails: e, kPending: t, kRejected: r } = process.binding("util");
2866
+ Array.isArray(e(Promise.resolve())) && (Vn = /* @__PURE__ */ i((n, o) => {
2867
+ let [s, c] = e(n);
2868
+ return s === t ? "Promise{<pending>}" : `Promise${s === r ? "!" : ""}{${o.inspect(c, o)}}`;
2869
+ }, "getPromiseValue"));
2870
+ } catch {
2871
+ }
2872
+ var Yn = Vn;
2873
+
2874
+ // ../node_modules/loupe/lib/object.js
2875
+ function be(e, t) {
2876
+ let r = Object.getOwnPropertyNames(e), n = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e) : [];
2877
+ if (r.length === 0 && n.length === 0)
2878
+ return "{}";
2879
+ if (t.truncate -= 4, t.seen = t.seen || [], t.seen.includes(e))
2880
+ return "[Circular]";
2881
+ t.seen.push(e);
2882
+ let o = L(r.map((a) => [a, e[a]]), t, ye), s = L(n.map((a) => [a, e[a]]), t, ye);
2883
+ t.seen.pop();
2884
+ let c = "";
2885
+ return o && s && (c = ", "), `{ ${o}${c}${s} }`;
2886
+ }
2887
+ i(be, "inspectObject");
2888
+
2889
+ // ../node_modules/loupe/lib/class.js
2890
+ var pr = typeof Symbol < "u" && Symbol.toStringTag ? Symbol.toStringTag : !1;
2891
+ function yr(e, t) {
2892
+ let r = "";
2893
+ return pr && pr in e && (r = e[pr]), r = r || e.constructor.name, (!r || r === "_class") && (r = "<Anonymous Class>"), t.truncate -= r.length,
2894
+ `${r}${be(e, t)}`;
2895
+ }
2896
+ i(yr, "inspectClass");
2897
+
2898
+ // ../node_modules/loupe/lib/arguments.js
2899
+ function gr(e, t) {
2900
+ return e.length === 0 ? "Arguments[]" : (t.truncate -= 13, `Arguments[ ${L(e, t)} ]`);
2901
+ }
2902
+ i(gr, "inspectArguments");
2903
+
2904
+ // ../node_modules/loupe/lib/error.js
2905
+ var La = [
2906
+ "stack",
2907
+ "line",
2908
+ "column",
2909
+ "name",
2910
+ "message",
2911
+ "fileName",
2912
+ "lineNumber",
2913
+ "columnNumber",
2914
+ "number",
2915
+ "description",
2916
+ "cause"
2917
+ ];
2918
+ function mr(e, t) {
2919
+ let r = Object.getOwnPropertyNames(e).filter((c) => La.indexOf(c) === -1), n = e.name;
2920
+ t.truncate -= n.length;
2921
+ let o = "";
2922
+ if (typeof e.message == "string" ? o = W(e.message, t.truncate) : r.unshift("message"), o = o ? `: ${o}` : "", t.truncate -= o.length + 5,
2923
+ t.seen = t.seen || [], t.seen.includes(e))
2924
+ return "[Circular]";
2925
+ t.seen.push(e);
2926
+ let s = L(r.map((c) => [c, e[c]]), t, ye);
2927
+ return `${n}${o}${s ? ` { ${s} }` : ""}`;
2928
+ }
2929
+ i(mr, "inspectObject");
2930
+
2931
+ // ../node_modules/loupe/lib/html.js
2932
+ function Ba([e, t], r) {
2933
+ return r.truncate -= 3, t ? `${r.stylize(String(e), "yellow")}=${r.stylize(`"${t}"`, "string")}` : `${r.stylize(String(e), "yellow")}`;
2934
+ }
2935
+ i(Ba, "inspectAttribute");
2936
+ function ft(e, t) {
2937
+ return L(e, t, pt, `
2938
+ `);
2939
+ }
2940
+ i(ft, "inspectHTMLCollection");
2941
+ function pt(e, t) {
2942
+ let r = e.getAttributeNames(), n = e.tagName.toLowerCase(), o = t.stylize(`<${n}`, "special"), s = t.stylize(">", "special"), c = t.stylize(
2943
+ `</${n}>`, "special");
2944
+ t.truncate -= n.length * 2 + 5;
2945
+ let a = "";
2946
+ r.length > 0 && (a += " ", a += L(r.map((p) => [p, e.getAttribute(p)]), t, Ba, " ")), t.truncate -= a.length;
2947
+ let u = t.truncate, f = ft(e.children, t);
2948
+ return f && f.length > u && (f = `${pe}(${e.children.length})`), `${o}${a}${s}${f}${c}`;
2949
+ }
2950
+ i(pt, "inspectHTML");
2951
+
2952
+ // ../node_modules/loupe/lib/index.js
2953
+ var ff = typeof Symbol == "function" && typeof Symbol.for == "function", Hr = ff ? Symbol.for("chai/inspect") : "@@chai/inspect", Fe = !1;
2954
+ try {
2955
+ let e = Ts();
2956
+ Fe = e.inspect ? e.inspect.custom : !1;
2957
+ } catch {
2958
+ Fe = !1;
2959
+ }
2960
+ var $s = /* @__PURE__ */ new WeakMap(), Ps = {}, Cs = {
2961
+ undefined: /* @__PURE__ */ i((e, t) => t.stylize("undefined", "undefined"), "undefined"),
2962
+ null: /* @__PURE__ */ i((e, t) => t.stylize("null", "null"), "null"),
2963
+ boolean: /* @__PURE__ */ i((e, t) => t.stylize(String(e), "boolean"), "boolean"),
2964
+ Boolean: /* @__PURE__ */ i((e, t) => t.stylize(String(e), "boolean"), "Boolean"),
2965
+ number: ct,
2966
+ Number: ct,
2967
+ bigint: at,
2968
+ BigInt: at,
2969
+ string: ut,
2970
+ String: ut,
2971
+ function: st,
2972
+ Function: st,
2973
+ symbol: lt,
2974
+ // A Symbol polyfill will return `Symbol` not `symbol` from typedetect
2975
+ Symbol: lt,
2976
+ Array: cr,
2977
+ Date: ar,
2978
+ Map: ur,
2979
+ Set: fr,
2980
+ RegExp: lr,
2981
+ Promise: Yn,
2982
+ // WeakSet, WeakMap are totally opaque to us
2983
+ WeakSet: /* @__PURE__ */ i((e, t) => t.stylize("WeakSet{\u2026}", "special"), "WeakSet"),
2984
+ WeakMap: /* @__PURE__ */ i((e, t) => t.stylize("WeakMap{\u2026}", "special"), "WeakMap"),
2985
+ Arguments: gr,
2986
+ Int8Array: se,
2987
+ Uint8Array: se,
2988
+ Uint8ClampedArray: se,
2989
+ Int16Array: se,
2990
+ Uint16Array: se,
2991
+ Int32Array: se,
2992
+ Uint32Array: se,
2993
+ Float32Array: se,
2994
+ Float64Array: se,
2995
+ Generator: /* @__PURE__ */ i(() => "", "Generator"),
2996
+ DataView: /* @__PURE__ */ i(() => "", "DataView"),
2997
+ ArrayBuffer: /* @__PURE__ */ i(() => "", "ArrayBuffer"),
2998
+ Error: mr,
2999
+ HTMLCollection: ft,
3000
+ NodeList: ft
3001
+ }, pf = /* @__PURE__ */ i((e, t, r) => Hr in e && typeof e[Hr] == "function" ? e[Hr](t) : Fe && Fe in e && typeof e[Fe] == "function" ? e[Fe](
3002
+ t.depth, t) : "inspect" in e && typeof e.inspect == "function" ? e.inspect(t.depth, t) : "constructor" in e && $s.has(e.constructor) ? $s.get(
3003
+ e.constructor)(e, t) : Ps[r] ? Ps[r](e, t) : "", "inspectCustom"), yf = Object.prototype.toString;
3004
+ function Ut(e, t = {}) {
3005
+ let r = Wn(t, Ut), { customInspect: n } = r, o = e === null ? "null" : typeof e;
3006
+ if (o === "object" && (o = yf.call(e).slice(8, -1)), o in Cs)
3007
+ return Cs[o](e, r);
3008
+ if (n && e) {
3009
+ let c = pf(e, r, o);
3010
+ if (c)
3011
+ return typeof c == "string" ? c : Ut(c, r);
3012
+ }
3013
+ let s = e ? Object.getPrototypeOf(e) : !1;
3014
+ return s === Object.prototype || s === null ? be(e, r) : e && typeof HTMLElement == "function" && e instanceof HTMLElement ? pt(e, r) : "c\
3015
+ onstructor" in e ? e.constructor !== Object ? yr(e, r) : be(e, r) : e === Object(e) ? be(e, r) : r.stylize(String(e), o);
3016
+ }
3017
+ i(Ut, "inspect");
3018
+
3019
+ // ../node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
3020
+ var {
3021
+ AsymmetricMatcher: mf,
3022
+ DOMCollection: hf,
3023
+ DOMElement: df,
3024
+ Immutable: bf,
3025
+ ReactElement: Sf,
3026
+ ReactTestComponent: Af
3027
+ } = it, Is = [
3028
+ Af,
3029
+ Sf,
3030
+ df,
3031
+ hf,
3032
+ bf,
3033
+ mf
3034
+ ];
3035
+ function we(e, t = 10, { maxLength: r, ...n } = {}) {
3036
+ let o = r ?? 1e4, s;
3037
+ try {
3038
+ s = te(e, {
3039
+ maxDepth: t,
3040
+ escapeString: !1,
3041
+ // min: true,
3042
+ plugins: Is,
3043
+ ...n
3044
+ });
3045
+ } catch {
3046
+ s = te(e, {
3047
+ callToJSON: !1,
3048
+ maxDepth: t,
3049
+ escapeString: !1,
3050
+ // min: true,
3051
+ plugins: Is,
3052
+ ...n
3053
+ });
3054
+ }
3055
+ return s.length >= o && t > 1 ? we(e, Math.floor(t / 2)) : s;
3056
+ }
3057
+ i(we, "stringify");
3058
+ var Of = /%[sdjifoOc%]/g;
3059
+ function Rs(...e) {
3060
+ if (typeof e[0] != "string") {
3061
+ let s = [];
3062
+ for (let c = 0; c < e.length; c++)
3063
+ s.push(Ke(e[c], { depth: 0, colors: !1 }));
3064
+ return s.join(" ");
3065
+ }
3066
+ let t = e.length, r = 1, n = e[0], o = String(n).replace(Of, (s) => {
3067
+ if (s === "%%")
3068
+ return "%";
3069
+ if (r >= t)
3070
+ return s;
3071
+ switch (s) {
3072
+ case "%s": {
3073
+ let c = e[r++];
3074
+ return typeof c == "bigint" ? `${c.toString()}n` : typeof c == "number" && c === 0 && 1 / c < 0 ? "-0" : typeof c == "object" && c !==
3075
+ null ? Ke(c, { depth: 0, colors: !1 }) : String(c);
3076
+ }
3077
+ case "%d": {
3078
+ let c = e[r++];
3079
+ return typeof c == "bigint" ? `${c.toString()}n` : Number(c).toString();
3080
+ }
3081
+ case "%i": {
3082
+ let c = e[r++];
3083
+ return typeof c == "bigint" ? `${c.toString()}n` : Number.parseInt(String(c)).toString();
3084
+ }
3085
+ case "%f":
3086
+ return Number.parseFloat(String(e[r++])).toString();
3087
+ case "%o":
3088
+ return Ke(e[r++], { showHidden: !0, showProxy: !0 });
3089
+ case "%O":
3090
+ return Ke(e[r++]);
3091
+ case "%c":
3092
+ return r++, "";
3093
+ case "%j":
3094
+ try {
3095
+ return JSON.stringify(e[r++]);
3096
+ } catch (c) {
3097
+ let a = c.message;
3098
+ if (
3099
+ // chromium
3100
+ a.includes("circular structure") || a.includes("cyclic structures") || a.includes("cyclic object")
3101
+ )
3102
+ return "[Circular]";
3103
+ throw c;
3104
+ }
3105
+ default:
3106
+ return s;
3107
+ }
3108
+ });
3109
+ for (let s = e[r]; r < t; s = e[++r])
3110
+ s === null || typeof s != "object" ? o += ` ${s}` : o += ` ${Ke(s)}`;
3111
+ return o;
3112
+ }
3113
+ i(Rs, "format");
3114
+ function Ke(e, t = {}) {
3115
+ return t.truncate === 0 && (t.truncate = Number.POSITIVE_INFINITY), Ut(e, t);
3116
+ }
3117
+ i(Ke, "inspect");
3118
+ function js(e) {
3119
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3120
+ }
3121
+ i(js, "getDefaultExportFromCjs");
3122
+
3123
+ // ../node_modules/@vitest/utils/dist/helpers.js
3124
+ function wf(e) {
3125
+ return e === Object.prototype || e === Function.prototype || e === RegExp.prototype;
3126
+ }
3127
+ i(wf, "isFinalObj");
3128
+ function qt(e) {
3129
+ return Object.prototype.toString.apply(e).slice(8, -1);
3130
+ }
3131
+ i(qt, "getType");
3132
+ function Ef(e, t) {
3133
+ let r = typeof t == "function" ? t : (n) => t.add(n);
3134
+ Object.getOwnPropertyNames(e).forEach(r), Object.getOwnPropertySymbols(e).forEach(r);
3135
+ }
3136
+ i(Ef, "collectOwnProperties");
3137
+ function Kr(e) {
3138
+ let t = /* @__PURE__ */ new Set();
3139
+ return wf(e) ? [] : (Ef(e, t), Array.from(t));
3140
+ }
3141
+ i(Kr, "getOwnProperties");
3142
+ var Ns = { forceWritable: !1 };
3143
+ function Xr(e, t = Ns) {
3144
+ return Jr(e, /* @__PURE__ */ new WeakMap(), t);
3145
+ }
3146
+ i(Xr, "deepClone");
3147
+ function Jr(e, t, r = Ns) {
3148
+ let n, o;
3149
+ if (t.has(e))
3150
+ return t.get(e);
3151
+ if (Array.isArray(e)) {
3152
+ for (o = Array.from({ length: n = e.length }), t.set(e, o); n--; )
3153
+ o[n] = Jr(e[n], t, r);
3154
+ return o;
3155
+ }
3156
+ if (Object.prototype.toString.call(e) === "[object Object]") {
3157
+ o = Object.create(Object.getPrototypeOf(e)), t.set(e, o);
3158
+ let s = Kr(e);
3159
+ for (let c of s) {
3160
+ let a = Object.getOwnPropertyDescriptor(e, c);
3161
+ if (!a)
3162
+ continue;
3163
+ let u = Jr(e[c], t, r);
3164
+ r.forceWritable ? Object.defineProperty(o, c, {
3165
+ enumerable: a.enumerable,
3166
+ configurable: !0,
3167
+ writable: !0,
3168
+ value: u
3169
+ }) : "get" in a ? Object.defineProperty(o, c, {
3170
+ ...a,
3171
+ get() {
3172
+ return u;
3173
+ }
3174
+ }) : Object.defineProperty(o, c, {
3175
+ ...a,
3176
+ value: u
3177
+ });
3178
+ }
3179
+ return o;
3180
+ }
3181
+ return e;
3182
+ }
3183
+ i(Jr, "clone");
3184
+
3185
+ // ../node_modules/@vitest/utils/dist/diff.js
3186
+ function xs(e) {
3187
+ if (e === void 0)
3188
+ return "undefined";
3189
+ if (e === null)
3190
+ return "null";
3191
+ if (Array.isArray(e))
3192
+ return "array";
3193
+ if (typeof e == "boolean")
3194
+ return "boolean";
3195
+ if (typeof e == "function")
3196
+ return "function";
3197
+ if (typeof e == "number")
3198
+ return "number";
3199
+ if (typeof e == "string")
3200
+ return "string";
3201
+ if (typeof e == "bigint")
3202
+ return "bigint";
3203
+ if (typeof e == "object") {
3204
+ if (e != null) {
3205
+ if (e.constructor === RegExp)
3206
+ return "regexp";
3207
+ if (e.constructor === Map)
3208
+ return "map";
3209
+ if (e.constructor === Set)
3210
+ return "set";
3211
+ if (e.constructor === Date)
3212
+ return "date";
3213
+ }
3214
+ return "object";
3215
+ } else if (typeof e == "symbol")
3216
+ return "symbol";
3217
+ throw new Error(`value of unknown type: ${e}`);
3218
+ }
3219
+ i(xs, "getType");
3220
+ var G = -1, U = 1, v = 0, cn = class cn {
3221
+ 0;
3222
+ 1;
3223
+ constructor(t, r) {
3224
+ this[0] = t, this[1] = r;
3225
+ }
3226
+ };
3227
+ i(cn, "Diff");
3228
+ var N = cn, _f = /* @__PURE__ */ i(function(e, t) {
3229
+ if (!e || !t || e.charAt(0) !== t.charAt(0))
3230
+ return 0;
3231
+ let r = 0, n = Math.min(e.length, t.length), o = n, s = 0;
3232
+ for (; r < o; )
3233
+ e.substring(s, o) === t.substring(s, o) ? (r = o, s = r) : n = o, o = Math.floor((n - r) / 2 + r);
3234
+ return o;
3235
+ }, "diff_commonPrefix"), Hs = /* @__PURE__ */ i(function(e, t) {
3236
+ if (!e || !t || e.charAt(e.length - 1) !== t.charAt(t.length - 1))
3237
+ return 0;
3238
+ let r = 0, n = Math.min(e.length, t.length), o = n, s = 0;
3239
+ for (; r < o; )
3240
+ e.substring(e.length - o, e.length - s) === t.substring(t.length - o, t.length - s) ? (r = o, s = r) : n = o, o = Math.floor((n - r) / 2 +
3241
+ r);
3242
+ return o;
3243
+ }, "diff_commonSuffix"), Ms = /* @__PURE__ */ i(function(e, t) {
3244
+ let r = e.length, n = t.length;
3245
+ if (r === 0 || n === 0)
3246
+ return 0;
3247
+ r > n ? e = e.substring(r - n) : r < n && (t = t.substring(0, r));
3248
+ let o = Math.min(r, n);
3249
+ if (e === t)
3250
+ return o;
3251
+ let s = 0, c = 1;
3252
+ for (; ; ) {
3253
+ let a = e.substring(o - c), u = t.indexOf(a);
3254
+ if (u === -1)
3255
+ return s;
3256
+ c += u, (u === 0 || e.substring(o - c) === t.substring(0, c)) && (s = c, c++);
3257
+ }
3258
+ }, "diff_commonOverlap_"), Tf = /* @__PURE__ */ i(function(e) {
3259
+ let t = !1, r = [], n = 0, o = null, s = 0, c = 0, a = 0, u = 0, f = 0;
3260
+ for (; s < e.length; )
3261
+ e[s][0] === v ? (r[n++] = s, c = u, a = f, u = 0, f = 0, o = e[s][1]) : (e[s][0] === U ? u += e[s][1].length : f += e[s][1].length, o &&
3262
+ o.length <= Math.max(c, a) && o.length <= Math.max(u, f) && (e.splice(
3263
+ r[n - 1],
3264
+ 0,
3265
+ new N(G, o)
3266
+ ), e[r[n - 1] + 1][0] = U, n--, n--, s = n > 0 ? r[n - 1] : -1, c = 0, a = 0, u = 0, f = 0, o = null, t = !0)), s++;
3267
+ for (t && Js(e), Cf(e), s = 1; s < e.length; ) {
3268
+ if (e[s - 1][0] === G && e[s][0] === U) {
3269
+ let p = e[s - 1][1], l = e[s][1], d = Ms(p, l), y = Ms(l, p);
3270
+ d >= y ? (d >= p.length / 2 || d >= l.length / 2) && (e.splice(
3271
+ s,
3272
+ 0,
3273
+ new N(v, l.substring(0, d))
3274
+ ), e[s - 1][1] = p.substring(
3275
+ 0,
3276
+ p.length - d
3277
+ ), e[s + 1][1] = l.substring(d), s++) : (y >= p.length / 2 || y >= l.length / 2) && (e.splice(
3278
+ s,
3279
+ 0,
3280
+ new N(v, p.substring(0, y))
3281
+ ), e[s - 1][0] = U, e[s - 1][1] = l.substring(
3282
+ 0,
3283
+ l.length - y
3284
+ ), e[s + 1][0] = G, e[s + 1][1] = p.substring(y), s++), s++;
3285
+ }
3286
+ s++;
3287
+ }
3288
+ }, "diff_cleanupSemantic"), vs = /[^a-z0-9]/i, Fs = /\s/, Ds = /[\r\n]/, $f = /\n\r?\n$/, Pf = /^\r?\n\r?\n/;
3289
+ function Cf(e) {
3290
+ let t = 1;
3291
+ for (; t < e.length - 1; ) {
3292
+ if (e[t - 1][0] === v && e[t + 1][0] === v) {
3293
+ let r = e[t - 1][1], n = e[t][1], o = e[t + 1][1], s = Hs(r, n);
3294
+ if (s) {
3295
+ let p = n.substring(n.length - s);
3296
+ r = r.substring(0, r.length - s), n = p + n.substring(0, n.length - s), o = p + o;
3297
+ }
3298
+ let c = r, a = n, u = o, f = zt(r, n) + zt(n, o);
3299
+ for (; n.charAt(0) === o.charAt(0); ) {
3300
+ r += n.charAt(0), n = n.substring(1) + o.charAt(0), o = o.substring(1);
3301
+ let p = zt(r, n) + zt(n, o);
3302
+ p >= f && (f = p, c = r, a = n, u = o);
3303
+ }
3304
+ e[t - 1][1] !== c && (c ? e[t - 1][1] = c : (e.splice(t - 1, 1), t--), e[t][1] = a, u ? e[t + 1][1] = u : (e.splice(t + 1, 1), t--));
3305
+ }
3306
+ t++;
3307
+ }
3308
+ }
3309
+ i(Cf, "diff_cleanupSemanticLossless");
3310
+ function Js(e) {
3311
+ e.push(new N(v, ""));
3312
+ let t = 0, r = 0, n = 0, o = "", s = "", c;
3313
+ for (; t < e.length; )
3314
+ switch (e[t][0]) {
3315
+ case U:
3316
+ n++, s += e[t][1], t++;
3317
+ break;
3318
+ case G:
3319
+ r++, o += e[t][1], t++;
3320
+ break;
3321
+ case v:
3322
+ r + n > 1 ? (r !== 0 && n !== 0 && (c = _f(s, o), c !== 0 && (t - r - n > 0 && e[t - r - n - 1][0] === v ? e[t - r - n - 1][1] += s.
3323
+ substring(0, c) : (e.splice(
3324
+ 0,
3325
+ 0,
3326
+ new N(v, s.substring(0, c))
3327
+ ), t++), s = s.substring(c), o = o.substring(c)), c = Hs(s, o), c !== 0 && (e[t][1] = s.substring(s.length - c) + e[t][1], s = s.substring(
3328
+ 0,
3329
+ s.length - c
3330
+ ), o = o.substring(
3331
+ 0,
3332
+ o.length - c
3333
+ ))), t -= r + n, e.splice(t, r + n), o.length && (e.splice(t, 0, new N(G, o)), t++), s.length && (e.splice(t, 0, new N(U, s)), t++),
3334
+ t++) : t !== 0 && e[t - 1][0] === v ? (e[t - 1][1] += e[t][1], e.splice(t, 1)) : t++, n = 0, r = 0, o = "", s = "";
3335
+ break;
3336
+ }
3337
+ e[e.length - 1][1] === "" && e.pop();
3338
+ let a = !1;
3339
+ for (t = 1; t < e.length - 1; )
3340
+ e[t - 1][0] === v && e[t + 1][0] === v && (e[t][1].substring(
3341
+ e[t][1].length - e[t - 1][1].length
3342
+ ) === e[t - 1][1] ? (e[t][1] = e[t - 1][1] + e[t][1].substring(
3343
+ 0,
3344
+ e[t][1].length - e[t - 1][1].length
3345
+ ), e[t + 1][1] = e[t - 1][1] + e[t + 1][1], e.splice(t - 1, 1), a = !0) : e[t][1].substring(0, e[t + 1][1].length) === e[t + 1][1] && (e[t -
3346
+ 1][1] += e[t + 1][1], e[t][1] = e[t][1].substring(e[t + 1][1].length) + e[t + 1][1], e.splice(t + 1, 1), a = !0)), t++;
3347
+ a && Js(e);
3348
+ }
3349
+ i(Js, "diff_cleanupMerge");
3350
+ function zt(e, t) {
3351
+ if (!e || !t)
3352
+ return 6;
3353
+ let r = e.charAt(e.length - 1), n = t.charAt(0), o = r.match(vs), s = n.match(vs), c = o && r.match(Fs), a = s && n.match(Fs), u = c && r.
3354
+ match(Ds), f = a && n.match(Ds), p = u && e.match($f), l = f && t.match(Pf);
3355
+ return p || l ? 5 : u || f ? 4 : o && !c && a ? 3 : c || a ? 2 : o || s ? 1 : 0;
3356
+ }
3357
+ i(zt, "diff_cleanupSemanticScore_");
3358
+ var Ks = "Compared values have no visual difference.", If = "Compared values serialize to the same structure.\nPrinting internal object struc\
3359
+ ture without calling `toJSON` instead.", Wt = {}, Ls;
3360
+ function Rf() {
3361
+ if (Ls) return Wt;
3362
+ Ls = 1, Object.defineProperty(Wt, "__esModule", {
3363
+ value: !0
3364
+ }), Wt.default = d;
3365
+ let e = "diff-sequences", t = 0, r = /* @__PURE__ */ i((y, g, m, b, A) => {
3366
+ let O = 0;
3367
+ for (; y < g && m < b && A(y, m); )
3368
+ y += 1, m += 1, O += 1;
3369
+ return O;
3370
+ }, "countCommonItemsF"), n = /* @__PURE__ */ i((y, g, m, b, A) => {
3371
+ let O = 0;
3372
+ for (; y <= g && m <= b && A(g, b); )
3373
+ g -= 1, b -= 1, O += 1;
3374
+ return O;
3375
+ }, "countCommonItemsR"), o = /* @__PURE__ */ i((y, g, m, b, A, O, $) => {
3376
+ let h = 0, S = -y, T = O[h], w = T;
3377
+ O[h] += r(
3378
+ T + 1,
3379
+ g,
3380
+ b + T - S + 1,
3381
+ m,
3382
+ A
3383
+ );
3384
+ let j = y < $ ? y : $;
3385
+ for (h += 1, S += 2; h <= j; h += 1, S += 2) {
3386
+ if (h !== y && w < O[h])
3387
+ T = O[h];
3388
+ else if (T = w + 1, g <= T)
3389
+ return h - 1;
3390
+ w = O[h], O[h] = T + r(T + 1, g, b + T - S + 1, m, A);
3391
+ }
3392
+ return $;
3393
+ }, "extendPathsF"), s = /* @__PURE__ */ i((y, g, m, b, A, O, $) => {
3394
+ let h = 0, S = y, T = O[h], w = T;
3395
+ O[h] -= n(
3396
+ g,
3397
+ T - 1,
3398
+ m,
3399
+ b + T - S - 1,
3400
+ A
3401
+ );
3402
+ let j = y < $ ? y : $;
3403
+ for (h += 1, S -= 2; h <= j; h += 1, S -= 2) {
3404
+ if (h !== y && O[h] < w)
3405
+ T = O[h];
3406
+ else if (T = w - 1, T < g)
3407
+ return h - 1;
3408
+ w = O[h], O[h] = T - n(
3409
+ g,
3410
+ T - 1,
3411
+ m,
3412
+ b + T - S - 1,
3413
+ A
3414
+ );
3415
+ }
3416
+ return $;
3417
+ }, "extendPathsR"), c = /* @__PURE__ */ i((y, g, m, b, A, O, $, h, S, T, w) => {
3418
+ let j = b - g, X = m - g, M = A - b - X, q = -M - (y - 1), Z = -M + (y - 1), V = t, x = y < h ? y : h;
3419
+ for (let F = 0, D = -y; F <= x; F += 1, D += 2) {
3420
+ let Q = F === 0 || F !== y && V < $[F], B = Q ? $[F] : V, H = Q ? B : B + 1, ae = j + H - D, J = r(
3421
+ H + 1,
3422
+ m,
3423
+ ae + 1,
3424
+ A,
3425
+ O
3426
+ ), K = H + J;
3427
+ if (V = $[F], $[F] = K, q <= D && D <= Z) {
3428
+ let fe = (y - 1 - (D + M)) / 2;
3429
+ if (fe <= T && S[fe] - 1 <= K) {
3430
+ let ee = j + B - (Q ? D + 1 : D - 1), Y = n(
3431
+ g,
3432
+ B,
3433
+ b,
3434
+ ee,
3435
+ O
3436
+ ), ue = B - Y, _e = ee - Y, ge = ue + 1, Be = _e + 1;
3437
+ w.nChangePreceding = y - 1, y - 1 === ge + Be - g - b ? (w.aEndPreceding = g, w.bEndPreceding = b) : (w.aEndPreceding = ge, w.bEndPreceding =
3438
+ Be), w.nCommonPreceding = Y, Y !== 0 && (w.aCommonPreceding = ge, w.bCommonPreceding = Be), w.nCommonFollowing = J, J !== 0 && (w.
3439
+ aCommonFollowing = H + 1, w.bCommonFollowing = ae + 1);
3440
+ let Xe = K + 1, Ze = ae + J + 1;
3441
+ return w.nChangeFollowing = y - 1, y - 1 === m + A - Xe - Ze ? (w.aStartFollowing = m, w.bStartFollowing = A) : (w.aStartFollowing =
3442
+ Xe, w.bStartFollowing = Ze), !0;
3443
+ }
3444
+ }
3445
+ }
3446
+ return !1;
3447
+ }, "extendOverlappablePathsF"), a = /* @__PURE__ */ i((y, g, m, b, A, O, $, h, S, T, w) => {
3448
+ let j = A - m, X = m - g, M = A - b - X, q = M - y, Z = M + y, V = t, x = y < T ? y : T;
3449
+ for (let F = 0, D = y; F <= x; F += 1, D -= 2) {
3450
+ let Q = F === 0 || F !== y && S[F] < V, B = Q ? S[F] : V, H = Q ? B : B - 1, ae = j + H - D, J = n(
3451
+ g,
3452
+ H - 1,
3453
+ b,
3454
+ ae - 1,
3455
+ O
3456
+ ), K = H - J;
3457
+ if (V = S[F], S[F] = K, q <= D && D <= Z) {
3458
+ let fe = (y + (D - M)) / 2;
3459
+ if (fe <= h && K - 1 <= $[fe]) {
3460
+ let ee = ae - J;
3461
+ if (w.nChangePreceding = y, y === K + ee - g - b ? (w.aEndPreceding = g, w.bEndPreceding = b) : (w.aEndPreceding = K, w.bEndPreceding =
3462
+ ee), w.nCommonPreceding = J, J !== 0 && (w.aCommonPreceding = K, w.bCommonPreceding = ee), w.nChangeFollowing = y - 1, y === 1)
3463
+ w.nCommonFollowing = 0, w.aStartFollowing = m, w.bStartFollowing = A;
3464
+ else {
3465
+ let Y = j + B - (Q ? D - 1 : D + 1), ue = r(
3466
+ B,
3467
+ m,
3468
+ Y,
3469
+ A,
3470
+ O
3471
+ );
3472
+ w.nCommonFollowing = ue, ue !== 0 && (w.aCommonFollowing = B, w.bCommonFollowing = Y);
3473
+ let _e = B + ue, ge = Y + ue;
3474
+ y - 1 === m + A - _e - ge ? (w.aStartFollowing = m, w.bStartFollowing = A) : (w.aStartFollowing = _e, w.bStartFollowing = ge);
3475
+ }
3476
+ return !0;
3477
+ }
3478
+ }
3479
+ }
3480
+ return !1;
3481
+ }, "extendOverlappablePathsR"), u = /* @__PURE__ */ i((y, g, m, b, A, O, $, h, S) => {
3482
+ let T = b - g, w = A - m, j = m - g, X = A - b, ne = X - j, M = j, q = j;
3483
+ if ($[0] = g - 1, h[0] = m, ne % 2 === 0) {
3484
+ let Z = (y || ne) / 2, V = (j + X) / 2;
3485
+ for (let x = 1; x <= V; x += 1)
3486
+ if (M = o(x, m, A, T, O, $, M), x < Z)
3487
+ q = s(x, g, b, w, O, h, q);
3488
+ else if (
3489
+ // If a reverse path overlaps a forward path in the same diagonal,
3490
+ // return a division of the index intervals at the middle change.
3491
+ a(
3492
+ x,
3493
+ g,
3494
+ m,
3495
+ b,
3496
+ A,
3497
+ O,
3498
+ $,
3499
+ M,
3500
+ h,
3501
+ q,
3502
+ S
3503
+ )
3504
+ )
3505
+ return;
3506
+ } else {
3507
+ let Z = ((y || ne) + 1) / 2, V = (j + X + 1) / 2, x = 1;
3508
+ for (M = o(x, m, A, T, O, $, M), x += 1; x <= V; x += 1)
3509
+ if (q = s(
3510
+ x - 1,
3511
+ g,
3512
+ b,
3513
+ w,
3514
+ O,
3515
+ h,
3516
+ q
3517
+ ), x < Z)
3518
+ M = o(x, m, A, T, O, $, M);
3519
+ else if (
3520
+ // If a forward path overlaps a reverse path in the same diagonal,
3521
+ // return a division of the index intervals at the middle change.
3522
+ c(
3523
+ x,
3524
+ g,
3525
+ m,
3526
+ b,
3527
+ A,
3528
+ O,
3529
+ $,
3530
+ M,
3531
+ h,
3532
+ q,
3533
+ S
3534
+ )
3535
+ )
3536
+ return;
3537
+ }
3538
+ throw new Error(
3539
+ `${e}: no overlap aStart=${g} aEnd=${m} bStart=${b} bEnd=${A}`
3540
+ );
3541
+ }, "divide"), f = /* @__PURE__ */ i((y, g, m, b, A, O, $, h, S, T) => {
3542
+ if (A - b < m - g) {
3543
+ if (O = !O, O && $.length === 1) {
3544
+ let { foundSubsequence: K, isCommon: fe } = $[0];
3545
+ $[1] = {
3546
+ foundSubsequence: /* @__PURE__ */ i((ee, Y, ue) => {
3547
+ K(ee, ue, Y);
3548
+ }, "foundSubsequence"),
3549
+ isCommon: /* @__PURE__ */ i((ee, Y) => fe(Y, ee), "isCommon")
3550
+ };
3551
+ }
3552
+ let ae = g, J = m;
3553
+ g = b, m = A, b = ae, A = J;
3554
+ }
3555
+ let { foundSubsequence: w, isCommon: j } = $[O ? 1 : 0];
3556
+ u(
3557
+ y,
3558
+ g,
3559
+ m,
3560
+ b,
3561
+ A,
3562
+ j,
3563
+ h,
3564
+ S,
3565
+ T
3566
+ );
3567
+ let {
3568
+ nChangePreceding: X,
3569
+ aEndPreceding: ne,
3570
+ bEndPreceding: M,
3571
+ nCommonPreceding: q,
3572
+ aCommonPreceding: Z,
3573
+ bCommonPreceding: V,
3574
+ nCommonFollowing: x,
3575
+ aCommonFollowing: F,
3576
+ bCommonFollowing: D,
3577
+ nChangeFollowing: Q,
3578
+ aStartFollowing: B,
3579
+ bStartFollowing: H
3580
+ } = T;
3581
+ g < ne && b < M && f(
3582
+ X,
3583
+ g,
3584
+ ne,
3585
+ b,
3586
+ M,
3587
+ O,
3588
+ $,
3589
+ h,
3590
+ S,
3591
+ T
3592
+ ), q !== 0 && w(q, Z, V), x !== 0 && w(x, F, D), B < m && H < A && f(
3593
+ Q,
3594
+ B,
3595
+ m,
3596
+ H,
3597
+ A,
3598
+ O,
3599
+ $,
3600
+ h,
3601
+ S,
3602
+ T
3603
+ );
3604
+ }, "findSubsequences"), p = /* @__PURE__ */ i((y, g) => {
3605
+ if (typeof g != "number")
3606
+ throw new TypeError(`${e}: ${y} typeof ${typeof g} is not a number`);
3607
+ if (!Number.isSafeInteger(g))
3608
+ throw new RangeError(`${e}: ${y} value ${g} is not a safe integer`);
3609
+ if (g < 0)
3610
+ throw new RangeError(`${e}: ${y} value ${g} is a negative integer`);
3611
+ }, "validateLength"), l = /* @__PURE__ */ i((y, g) => {
3612
+ let m = typeof g;
3613
+ if (m !== "function")
3614
+ throw new TypeError(`${e}: ${y} typeof ${m} is not a function`);
3615
+ }, "validateCallback");
3616
+ function d(y, g, m, b) {
3617
+ p("aLength", y), p("bLength", g), l("isCommon", m), l("foundSubsequence", b);
3618
+ let A = r(0, y, 0, g, m);
3619
+ if (A !== 0 && b(A, 0, 0), y !== A || g !== A) {
3620
+ let O = A, $ = A, h = n(
3621
+ O,
3622
+ y - 1,
3623
+ $,
3624
+ g - 1,
3625
+ m
3626
+ ), S = y - h, T = g - h, w = A + h;
3627
+ y !== w && g !== w && f(
3628
+ 0,
3629
+ O,
3630
+ S,
3631
+ $,
3632
+ T,
3633
+ !1,
3634
+ [
3635
+ {
3636
+ foundSubsequence: b,
3637
+ isCommon: m
3638
+ }
3639
+ ],
3640
+ [t],
3641
+ [t],
3642
+ {
3643
+ aCommonFollowing: t,
3644
+ aCommonPreceding: t,
3645
+ aEndPreceding: t,
3646
+ aStartFollowing: t,
3647
+ bCommonFollowing: t,
3648
+ bCommonPreceding: t,
3649
+ bEndPreceding: t,
3650
+ bStartFollowing: t,
3651
+ nChangeFollowing: t,
3652
+ nChangePreceding: t,
3653
+ nCommonFollowing: t,
3654
+ nCommonPreceding: t
3655
+ }
3656
+ ), h !== 0 && b(h, S, T);
3657
+ }
3658
+ }
3659
+ return i(d, "diffSequence"), Wt;
3660
+ }
3661
+ i(Rf, "requireBuild");
3662
+ var jf = Rf(), Xs = /* @__PURE__ */ js(jf);
3663
+ function Nf(e, t) {
3664
+ return e.replace(/\s+$/, (r) => t(r));
3665
+ }
3666
+ i(Nf, "formatTrailingSpaces");
3667
+ function on(e, t, r, n, o, s) {
3668
+ return e.length !== 0 ? r(
3669
+ `${n} ${Nf(e, o)}`
3670
+ ) : n !== " " ? r(n) : t && s.length !== 0 ? r(`${n} ${s}`) : "";
3671
+ }
3672
+ i(on, "printDiffLine");
3673
+ function Zs(e, t, {
3674
+ aColor: r,
3675
+ aIndicator: n,
3676
+ changeLineTrailingSpaceColor: o,
3677
+ emptyFirstOrLastLinePlaceholder: s
3678
+ }) {
3679
+ return on(
3680
+ e,
3681
+ t,
3682
+ r,
3683
+ n,
3684
+ o,
3685
+ s
3686
+ );
3687
+ }
3688
+ i(Zs, "printDeleteLine");
3689
+ function Qs(e, t, {
3690
+ bColor: r,
3691
+ bIndicator: n,
3692
+ changeLineTrailingSpaceColor: o,
3693
+ emptyFirstOrLastLinePlaceholder: s
3694
+ }) {
3695
+ return on(
3696
+ e,
3697
+ t,
3698
+ r,
3699
+ n,
3700
+ o,
3701
+ s
3702
+ );
3703
+ }
3704
+ i(Qs, "printInsertLine");
3705
+ function ec(e, t, {
3706
+ commonColor: r,
3707
+ commonIndicator: n,
3708
+ commonLineTrailingSpaceColor: o,
3709
+ emptyFirstOrLastLinePlaceholder: s
3710
+ }) {
3711
+ return on(
3712
+ e,
3713
+ t,
3714
+ r,
3715
+ n,
3716
+ o,
3717
+ s
3718
+ );
3719
+ }
3720
+ i(ec, "printCommonLine");
3721
+ function Bs(e, t, r, n, { patchColor: o }) {
3722
+ return o(
3723
+ `@@ -${e + 1},${t - e} +${r + 1},${n - r} @@`
3724
+ );
3725
+ }
3726
+ i(Bs, "createPatchMark");
3727
+ function xf(e, t) {
3728
+ let r = e.length, n = t.contextLines, o = n + n, s = r, c = !1, a = 0, u = 0;
3729
+ for (; u !== r; ) {
3730
+ let h = u;
3731
+ for (; u !== r && e[u][0] === v; )
3732
+ u += 1;
3733
+ if (h !== u)
3734
+ if (h === 0)
3735
+ u > n && (s -= u - n, c = !0);
3736
+ else if (u === r) {
3737
+ let S = u - h;
3738
+ S > n && (s -= S - n, c = !0);
3739
+ } else {
3740
+ let S = u - h;
3741
+ S > o && (s -= S - o, a += 1);
3742
+ }
3743
+ for (; u !== r && e[u][0] !== v; )
3744
+ u += 1;
3745
+ }
3746
+ let f = a !== 0 || c;
3747
+ a !== 0 ? s += a + 1 : c && (s += 1);
3748
+ let p = s - 1, l = [], d = 0;
3749
+ f && l.push("");
3750
+ let y = 0, g = 0, m = 0, b = 0, A = /* @__PURE__ */ i((h) => {
3751
+ let S = l.length;
3752
+ l.push(ec(h, S === 0 || S === p, t)), m += 1, b += 1;
3753
+ }, "pushCommonLine"), O = /* @__PURE__ */ i((h) => {
3754
+ let S = l.length;
3755
+ l.push(Zs(h, S === 0 || S === p, t)), m += 1;
3756
+ }, "pushDeleteLine"), $ = /* @__PURE__ */ i((h) => {
3757
+ let S = l.length;
3758
+ l.push(Qs(h, S === 0 || S === p, t)), b += 1;
3759
+ }, "pushInsertLine");
3760
+ for (u = 0; u !== r; ) {
3761
+ let h = u;
3762
+ for (; u !== r && e[u][0] === v; )
3763
+ u += 1;
3764
+ if (h !== u)
3765
+ if (h === 0) {
3766
+ u > n && (h = u - n, y = h, g = h, m = y, b = g);
3767
+ for (let S = h; S !== u; S += 1)
3768
+ A(e[S][1]);
3769
+ } else if (u === r) {
3770
+ let S = u - h > n ? h + n : u;
3771
+ for (let T = h; T !== S; T += 1)
3772
+ A(e[T][1]);
3773
+ } else {
3774
+ let S = u - h;
3775
+ if (S > o) {
3776
+ let T = h + n;
3777
+ for (let j = h; j !== T; j += 1)
3778
+ A(e[j][1]);
3779
+ l[d] = Bs(
3780
+ y,
3781
+ m,
3782
+ g,
3783
+ b,
3784
+ t
3785
+ ), d = l.length, l.push("");
3786
+ let w = S - o;
3787
+ y = m + w, g = b + w, m = y, b = g;
3788
+ for (let j = u - n; j !== u; j += 1)
3789
+ A(e[j][1]);
3790
+ } else
3791
+ for (let T = h; T !== u; T += 1)
3792
+ A(e[T][1]);
3793
+ }
3794
+ for (; u !== r && e[u][0] === G; )
3795
+ O(e[u][1]), u += 1;
3796
+ for (; u !== r && e[u][0] === U; )
3797
+ $(e[u][1]), u += 1;
3798
+ }
3799
+ return f && (l[d] = Bs(y, m, g, b, t)), l.join(`
3800
+ `);
3801
+ }
3802
+ i(xf, "joinAlignedDiffsNoExpand");
3803
+ function Mf(e, t) {
3804
+ return e.map((r, n, o) => {
3805
+ let s = r[1], c = n === 0 || n === o.length - 1;
3806
+ switch (r[0]) {
3807
+ case G:
3808
+ return Zs(s, c, t);
3809
+ case U:
3810
+ return Qs(s, c, t);
3811
+ default:
3812
+ return ec(s, c, t);
3813
+ }
3814
+ }).join(`
3815
+ `);
3816
+ }
3817
+ i(Mf, "joinAlignedDiffsExpand");
3818
+ var Zr = /* @__PURE__ */ i((e) => e, "noColor"), tc = 5, vf = 0;
3819
+ function Ff() {
3820
+ return {
3821
+ aAnnotation: "Expected",
3822
+ aColor: oe.green,
3823
+ aIndicator: "-",
3824
+ bAnnotation: "Received",
3825
+ bColor: oe.red,
3826
+ bIndicator: "+",
3827
+ changeColor: oe.inverse,
3828
+ changeLineTrailingSpaceColor: Zr,
3829
+ commonColor: oe.dim,
3830
+ commonIndicator: " ",
3831
+ commonLineTrailingSpaceColor: Zr,
3832
+ compareKeys: void 0,
3833
+ contextLines: tc,
3834
+ emptyFirstOrLastLinePlaceholder: "",
3835
+ expand: !0,
3836
+ includeChangeCounts: !1,
3837
+ omitAnnotationLines: !1,
3838
+ patchColor: oe.yellow,
3839
+ truncateThreshold: vf,
3840
+ truncateAnnotation: "... Diff result is truncated",
3841
+ truncateAnnotationColor: Zr
3842
+ };
3843
+ }
3844
+ i(Ff, "getDefaultOptions");
3845
+ function Df(e) {
3846
+ return e && typeof e == "function" ? e : void 0;
3847
+ }
3848
+ i(Df, "getCompareKeys");
3849
+ function Lf(e) {
3850
+ return typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : tc;
3851
+ }
3852
+ i(Lf, "getContextLines");
3853
+ function Ee(e = {}) {
3854
+ return {
3855
+ ...Ff(),
3856
+ ...e,
3857
+ compareKeys: Df(e.compareKeys),
3858
+ contextLines: Lf(e.contextLines)
3859
+ };
3860
+ }
3861
+ i(Ee, "normalizeDiffOptions");
3862
+ function De(e) {
3863
+ return e.length === 1 && e[0].length === 0;
3864
+ }
3865
+ i(De, "isEmptyString");
3866
+ function Bf(e) {
3867
+ let t = 0, r = 0;
3868
+ return e.forEach((n) => {
3869
+ switch (n[0]) {
3870
+ case G:
3871
+ t += 1;
3872
+ break;
3873
+ case U:
3874
+ r += 1;
3875
+ break;
3876
+ }
3877
+ }), { a: t, b: r };
3878
+ }
3879
+ i(Bf, "countChanges");
3880
+ function kf({
3881
+ aAnnotation: e,
3882
+ aColor: t,
3883
+ aIndicator: r,
3884
+ bAnnotation: n,
3885
+ bColor: o,
3886
+ bIndicator: s,
3887
+ includeChangeCounts: c,
3888
+ omitAnnotationLines: a
3889
+ }, u) {
3890
+ if (a)
3891
+ return "";
3892
+ let f = "", p = "";
3893
+ if (c) {
3894
+ let y = String(u.a), g = String(u.b), m = n.length - e.length, b = " ".repeat(Math.max(0, m)), A = " ".repeat(Math.max(0, -m)), O = g.length -
3895
+ y.length, $ = " ".repeat(Math.max(0, O)), h = " ".repeat(Math.max(0, -O));
3896
+ f = `${b} ${r} ${$}${y}`, p = `${A} ${s} ${h}${g}`;
3897
+ }
3898
+ let l = `${r} ${e}${f}`, d = `${s} ${n}${p}`;
3899
+ return `${t(l)}
3900
+ ${o(d)}
3901
+
3902
+ `;
3903
+ }
3904
+ i(kf, "printAnnotation");
3905
+ function sn(e, t, r) {
3906
+ return kf(r, Bf(e)) + (r.expand ? Mf(e, r) : xf(e, r)) + (t ? r.truncateAnnotationColor(`
3907
+ ${r.truncateAnnotation}`) : "");
3908
+ }
3909
+ i(sn, "printDiffLines");
3910
+ function Vt(e, t, r) {
3911
+ let n = Ee(r), [o, s] = rc(
3912
+ De(e) ? [] : e,
3913
+ De(t) ? [] : t,
3914
+ n
3915
+ );
3916
+ return sn(o, s, n);
3917
+ }
3918
+ i(Vt, "diffLinesUnified");
3919
+ function Uf(e, t, r, n, o) {
3920
+ if (De(e) && De(r) && (e = [], r = []), De(t) && De(n) && (t = [], n = []), e.length !== r.length || t.length !== n.length)
3921
+ return Vt(e, t, o);
3922
+ let [s, c] = rc(
3923
+ r,
3924
+ n,
3925
+ o
3926
+ ), a = 0, u = 0;
3927
+ return s.forEach((f) => {
3928
+ switch (f[0]) {
3929
+ case G:
3930
+ f[1] = e[a], a += 1;
3931
+ break;
3932
+ case U:
3933
+ f[1] = t[u], u += 1;
3934
+ break;
3935
+ default:
3936
+ f[1] = t[u], a += 1, u += 1;
3937
+ }
3938
+ }), sn(s, c, Ee(o));
3939
+ }
3940
+ i(Uf, "diffLinesUnified2");
3941
+ function rc(e, t, r) {
3942
+ let n = r?.truncateThreshold ?? !1, o = Math.max(
3943
+ Math.floor(r?.truncateThreshold ?? 0),
3944
+ 0
3945
+ ), s = n ? Math.min(e.length, o) : e.length, c = n ? Math.min(t.length, o) : t.length, a = s !== e.length || c !== t.length, u = /* @__PURE__ */ i(
3946
+ (y, g) => e[y] === t[g], "isCommon"), f = [], p = 0, l = 0;
3947
+ for (Xs(s, c, u, /* @__PURE__ */ i((y, g, m) => {
3948
+ for (; p !== g; p += 1)
3949
+ f.push(new N(G, e[p]));
3950
+ for (; l !== m; l += 1)
3951
+ f.push(new N(U, t[l]));
3952
+ for (; y !== 0; y -= 1, p += 1, l += 1)
3953
+ f.push(new N(v, t[l]));
3954
+ }, "foundSubsequence")); p !== s; p += 1)
3955
+ f.push(new N(G, e[p]));
3956
+ for (; l !== c; l += 1)
3957
+ f.push(new N(U, t[l]));
3958
+ return [f, a];
3959
+ }
3960
+ i(rc, "diffLinesRaw");
3961
+ function ks(e) {
3962
+ return e.includes(`\r
3963
+ `) ? `\r
3964
+ ` : `
3965
+ `;
3966
+ }
3967
+ i(ks, "getNewLineSymbol");
3968
+ function qf(e, t, r) {
3969
+ let n = r?.truncateThreshold ?? !1, o = Math.max(
3970
+ Math.floor(r?.truncateThreshold ?? 0),
3971
+ 0
3972
+ ), s = e.length, c = t.length;
3973
+ if (n) {
3974
+ let y = e.includes(`
3975
+ `), g = t.includes(`
3976
+ `), m = ks(e), b = ks(t), A = y ? `${e.split(m, o).join(m)}
3977
+ ` : e, O = g ? `${t.split(b, o).join(b)}
3978
+ ` : t;
3979
+ s = A.length, c = O.length;
3980
+ }
3981
+ let a = s !== e.length || c !== t.length, u = /* @__PURE__ */ i((y, g) => e[y] === t[g], "isCommon"), f = 0, p = 0, l = [];
3982
+ return Xs(s, c, u, /* @__PURE__ */ i((y, g, m) => {
3983
+ f !== g && l.push(new N(G, e.slice(f, g))), p !== m && l.push(new N(U, t.slice(p, m))), f = g + y, p = m + y, l.push(new N(v, t.slice(m,
3984
+ p)));
3985
+ }, "foundSubsequence")), f !== s && l.push(new N(G, e.slice(f))), p !== c && l.push(new N(U, t.slice(p))), [l, a];
3986
+ }
3987
+ i(qf, "diffStrings");
3988
+ function zf(e, t, r) {
3989
+ return t.reduce(
3990
+ (n, o) => n + (o[0] === v ? o[1] : o[0] === e && o[1].length !== 0 ? r(o[1]) : ""),
3991
+ ""
3992
+ );
3993
+ }
3994
+ i(zf, "concatenateRelevantDiffs");
3995
+ var an = class an {
3996
+ op;
3997
+ line;
3998
+ // incomplete line
3999
+ lines;
4000
+ // complete lines
4001
+ changeColor;
4002
+ constructor(t, r) {
4003
+ this.op = t, this.line = [], this.lines = [], this.changeColor = r;
4004
+ }
4005
+ pushSubstring(t) {
4006
+ this.pushDiff(new N(this.op, t));
4007
+ }
4008
+ pushLine() {
4009
+ this.lines.push(
4010
+ this.line.length !== 1 ? new N(
4011
+ this.op,
4012
+ zf(this.op, this.line, this.changeColor)
4013
+ ) : this.line[0][0] === this.op ? this.line[0] : new N(this.op, this.line[0][1])
4014
+ // was common diff
4015
+ ), this.line.length = 0;
4016
+ }
4017
+ isLineEmpty() {
4018
+ return this.line.length === 0;
4019
+ }
4020
+ // Minor input to buffer.
4021
+ pushDiff(t) {
4022
+ this.line.push(t);
4023
+ }
4024
+ // Main input to buffer.
4025
+ align(t) {
4026
+ let r = t[1];
4027
+ if (r.includes(`
4028
+ `)) {
4029
+ let n = r.split(`
4030
+ `), o = n.length - 1;
4031
+ n.forEach((s, c) => {
4032
+ c < o ? (this.pushSubstring(s), this.pushLine()) : s.length !== 0 && this.pushSubstring(s);
4033
+ });
4034
+ } else
4035
+ this.pushDiff(t);
4036
+ }
4037
+ // Output from buffer.
4038
+ moveLinesTo(t) {
4039
+ this.isLineEmpty() || this.pushLine(), t.push(...this.lines), this.lines.length = 0;
4040
+ }
4041
+ };
4042
+ i(an, "ChangeBuffer");
4043
+ var Gt = an, un = class un {
4044
+ deleteBuffer;
4045
+ insertBuffer;
4046
+ lines;
4047
+ constructor(t, r) {
4048
+ this.deleteBuffer = t, this.insertBuffer = r, this.lines = [];
4049
+ }
4050
+ pushDiffCommonLine(t) {
4051
+ this.lines.push(t);
4052
+ }
4053
+ pushDiffChangeLines(t) {
4054
+ let r = t[1].length === 0;
4055
+ (!r || this.deleteBuffer.isLineEmpty()) && this.deleteBuffer.pushDiff(t), (!r || this.insertBuffer.isLineEmpty()) && this.insertBuffer.pushDiff(
4056
+ t);
4057
+ }
4058
+ flushChangeLines() {
4059
+ this.deleteBuffer.moveLinesTo(this.lines), this.insertBuffer.moveLinesTo(this.lines);
4060
+ }
4061
+ // Input to buffer.
4062
+ align(t) {
4063
+ let r = t[0], n = t[1];
4064
+ if (n.includes(`
4065
+ `)) {
4066
+ let o = n.split(`
4067
+ `), s = o.length - 1;
4068
+ o.forEach((c, a) => {
4069
+ if (a === 0) {
4070
+ let u = new N(r, c);
4071
+ this.deleteBuffer.isLineEmpty() && this.insertBuffer.isLineEmpty() ? (this.flushChangeLines(), this.pushDiffCommonLine(u)) : (this.
4072
+ pushDiffChangeLines(u), this.flushChangeLines());
4073
+ } else a < s ? this.pushDiffCommonLine(new N(r, c)) : c.length !== 0 && this.pushDiffChangeLines(new N(r, c));
4074
+ });
4075
+ } else
4076
+ this.pushDiffChangeLines(t);
4077
+ }
4078
+ // Output from buffer.
4079
+ getLines() {
4080
+ return this.flushChangeLines(), this.lines;
4081
+ }
4082
+ };
4083
+ i(un, "CommonBuffer");
4084
+ var en = un;
4085
+ function Wf(e, t) {
4086
+ let r = new Gt(G, t), n = new Gt(U, t), o = new en(r, n);
4087
+ return e.forEach((s) => {
4088
+ switch (s[0]) {
4089
+ case G:
4090
+ r.align(s);
4091
+ break;
4092
+ case U:
4093
+ n.align(s);
4094
+ break;
4095
+ default:
4096
+ o.align(s);
4097
+ }
4098
+ }), o.getLines();
4099
+ }
4100
+ i(Wf, "getAlignedDiffs");
4101
+ function Gf(e, t) {
4102
+ if (t) {
4103
+ let r = e.length - 1;
4104
+ return e.some(
4105
+ (n, o) => n[0] === v && (o !== r || n[1] !== `
4106
+ `)
4107
+ );
4108
+ }
4109
+ return e.some((r) => r[0] === v);
4110
+ }
4111
+ i(Gf, "hasCommonDiff");
4112
+ function Vf(e, t, r) {
4113
+ if (e !== t && e.length !== 0 && t.length !== 0) {
4114
+ let n = e.includes(`
4115
+ `) || t.includes(`
4116
+ `), [o, s] = nc(
4117
+ n ? `${e}
4118
+ ` : e,
4119
+ n ? `${t}
4120
+ ` : t,
4121
+ !0,
4122
+ // cleanupSemantic
4123
+ r
4124
+ );
4125
+ if (Gf(o, n)) {
4126
+ let c = Ee(r), a = Wf(o, c.changeColor);
4127
+ return sn(a, s, c);
4128
+ }
4129
+ }
4130
+ return Vt(e.split(`
4131
+ `), t.split(`
4132
+ `), r);
4133
+ }
4134
+ i(Vf, "diffStringsUnified");
4135
+ function nc(e, t, r, n) {
4136
+ let [o, s] = qf(e, t, n);
4137
+ return r && Tf(o), [o, s];
4138
+ }
4139
+ i(nc, "diffStringsRaw");
4140
+ function tn(e, t) {
4141
+ let { commonColor: r } = Ee(t);
4142
+ return r(e);
4143
+ }
4144
+ i(tn, "getCommonMessage");
4145
+ var {
4146
+ AsymmetricMatcher: Yf,
4147
+ DOMCollection: Hf,
4148
+ DOMElement: Jf,
4149
+ Immutable: Kf,
4150
+ ReactElement: Xf,
4151
+ ReactTestComponent: Zf
4152
+ } = it, oc = [
4153
+ Zf,
4154
+ Xf,
4155
+ Jf,
4156
+ Hf,
4157
+ Kf,
4158
+ Yf
4159
+ ], rn = {
4160
+ plugins: oc
4161
+ }, ic = {
4162
+ callToJSON: !1,
4163
+ maxDepth: 10,
4164
+ plugins: oc
4165
+ };
4166
+ function Qf(e, t, r) {
4167
+ if (Object.is(e, t))
4168
+ return "";
4169
+ let n = xs(e), o = n, s = !1;
4170
+ if (n === "object" && typeof e.asymmetricMatch == "function") {
4171
+ if (e.$$typeof !== Symbol.for("jest.asymmetricMatcher") || typeof e.getExpectedType != "function")
4172
+ return;
4173
+ o = e.getExpectedType(), s = o === "string";
4174
+ }
4175
+ if (o !== xs(t)) {
4176
+ let { aAnnotation: c, aColor: a, aIndicator: u, bAnnotation: f, bColor: p, bIndicator: l } = Ee(r), d = nn(ic, r), y = te(e, d), g = te(
4177
+ t, d), m = `${a(`${u} ${c}:`)}
4178
+ ${y}`, b = `${p(`${l} ${f}:`)}
4179
+ ${g}`;
4180
+ return `${m}
4181
+
4182
+ ${b}`;
4183
+ }
4184
+ if (!s)
4185
+ switch (n) {
4186
+ case "string":
4187
+ return Vt(e.split(`
4188
+ `), t.split(`
4189
+ `), r);
4190
+ case "boolean":
4191
+ case "number":
4192
+ return ep(e, t, r);
4193
+ case "map":
4194
+ return Qr(Us(e), Us(t), r);
4195
+ case "set":
4196
+ return Qr(qs(e), qs(t), r);
4197
+ default:
4198
+ return Qr(e, t, r);
4199
+ }
4200
+ }
4201
+ i(Qf, "diff");
4202
+ function ep(e, t, r) {
4203
+ let n = te(e, rn), o = te(t, rn);
4204
+ return n === o ? "" : Vt(n.split(`
4205
+ `), o.split(`
4206
+ `), r);
4207
+ }
4208
+ i(ep, "comparePrimitive");
4209
+ function Us(e) {
4210
+ return new Map(Array.from(e.entries()).sort());
4211
+ }
4212
+ i(Us, "sortMap");
4213
+ function qs(e) {
4214
+ return new Set(Array.from(e.values()).sort());
4215
+ }
4216
+ i(qs, "sortSet");
4217
+ function Qr(e, t, r) {
4218
+ let n, o = !1;
4219
+ try {
4220
+ let c = nn(rn, r);
4221
+ n = zs(e, t, c, r);
4222
+ } catch {
4223
+ o = !0;
4224
+ }
4225
+ let s = tn(Ks, r);
4226
+ if (n === void 0 || n === s) {
4227
+ let c = nn(ic, r);
4228
+ n = zs(e, t, c, r), n !== s && !o && (n = `${tn(
4229
+ If,
4230
+ r
4231
+ )}
4232
+
4233
+ ${n}`);
4234
+ }
4235
+ return n;
4236
+ }
4237
+ i(Qr, "compareObjects");
4238
+ function nn(e, t) {
4239
+ let { compareKeys: r } = Ee(t);
4240
+ return {
4241
+ ...e,
4242
+ compareKeys: r
4243
+ };
4244
+ }
4245
+ i(nn, "getFormatOptions");
4246
+ function zs(e, t, r, n) {
4247
+ let o = { ...r, indent: 0 }, s = te(e, o), c = te(t, o);
4248
+ if (s === c)
4249
+ return tn(Ks, n);
4250
+ {
4251
+ let a = te(e, r), u = te(t, r);
4252
+ return Uf(
4253
+ a.split(`
4254
+ `),
4255
+ u.split(`
4256
+ `),
4257
+ s.split(`
4258
+ `),
4259
+ c.split(`
4260
+ `),
4261
+ n
4262
+ );
4263
+ }
4264
+ }
4265
+ i(zs, "getObjectsDifference");
4266
+ var Ws = 2e4;
4267
+ function Gs(e) {
4268
+ return qt(e) === "Object" && typeof e.asymmetricMatch == "function";
4269
+ }
4270
+ i(Gs, "isAsymmetricMatcher");
4271
+ function Vs(e, t) {
4272
+ let r = qt(e), n = qt(t);
4273
+ return r === n && (r === "Object" || r === "Array");
4274
+ }
4275
+ i(Vs, "isReplaceable");
4276
+ function sc(e, t, r) {
4277
+ let { aAnnotation: n, bAnnotation: o } = Ee(r);
4278
+ if (typeof e == "string" && typeof t == "string" && e.length > 0 && t.length > 0 && e.length <= Ws && t.length <= Ws && e !== t) {
4279
+ if (e.includes(`
4280
+ `) || t.includes(`
4281
+ `))
4282
+ return Vf(t, e, r);
4283
+ let [p] = nc(t, e, !0), l = p.some((m) => m[0] === v), d = tp(n, o), y = d(n) + op(
4284
+ Ys(p, G, l)
4285
+ ), g = d(o) + np(
4286
+ Ys(p, U, l)
4287
+ );
4288
+ return `${y}
4289
+ ${g}`;
4290
+ }
4291
+ let s = Xr(e, { forceWritable: !0 }), c = Xr(t, { forceWritable: !0 }), { replacedExpected: a, replacedActual: u } = cc(s, c);
4292
+ return Qf(a, u, r);
4293
+ }
4294
+ i(sc, "printDiffOrStringify");
4295
+ function cc(e, t, r = /* @__PURE__ */ new WeakSet(), n = /* @__PURE__ */ new WeakSet()) {
4296
+ return Vs(e, t) ? r.has(e) || n.has(t) ? { replacedActual: e, replacedExpected: t } : (r.add(e), n.add(t), Kr(t).forEach((o) => {
4297
+ let s = t[o], c = e[o];
4298
+ if (Gs(s))
4299
+ s.asymmetricMatch(c) && (e[o] = s);
4300
+ else if (Gs(c))
4301
+ c.asymmetricMatch(s) && (t[o] = c);
4302
+ else if (Vs(c, s)) {
4303
+ let a = cc(
4304
+ c,
4305
+ s,
4306
+ r,
4307
+ n
4308
+ );
4309
+ e[o] = a.replacedActual, t[o] = a.replacedExpected;
4310
+ }
4311
+ }), {
4312
+ replacedActual: e,
4313
+ replacedExpected: t
4314
+ }) : { replacedActual: e, replacedExpected: t };
4315
+ }
4316
+ i(cc, "replaceAsymmetricMatcher");
4317
+ function tp(...e) {
4318
+ let t = e.reduce(
4319
+ (r, n) => n.length > r ? n.length : r,
4320
+ 0
4321
+ );
4322
+ return (r) => `${r}: ${" ".repeat(t - r.length)}`;
4323
+ }
4324
+ i(tp, "getLabelPrinter");
4325
+ var rp = "\xB7";
4326
+ function ac(e) {
4327
+ return e.replace(/\s+$/gm, (t) => rp.repeat(t.length));
4328
+ }
4329
+ i(ac, "replaceTrailingSpaces");
4330
+ function np(e) {
4331
+ return oe.red(ac(we(e)));
4332
+ }
4333
+ i(np, "printReceived");
4334
+ function op(e) {
4335
+ return oe.green(ac(we(e)));
4336
+ }
4337
+ i(op, "printExpected");
4338
+ function Ys(e, t, r) {
4339
+ return e.reduce(
4340
+ (n, o) => n + (o[0] === v ? o[1] : o[0] === t ? r ? oe.inverse(o[1]) : o[1] : ""),
4341
+ ""
4342
+ );
4343
+ }
4344
+ i(Ys, "getCommonAndChangedSubstrings");
4345
+
4346
+ // ../node_modules/@vitest/utils/dist/error.js
4347
+ var ip = "@@__IMMUTABLE_RECORD__@@", sp = "@@__IMMUTABLE_ITERABLE__@@";
4348
+ function cp(e) {
4349
+ return e && (e[sp] || e[ip]);
4350
+ }
4351
+ i(cp, "isImmutable");
4352
+ var ap = Object.getPrototypeOf({});
4353
+ function uc(e) {
4354
+ return e instanceof Error ? `<unserializable>: ${e.message}` : typeof e == "string" ? `<unserializable>: ${e}` : "<unserializable>";
4355
+ }
4356
+ i(uc, "getUnserializableMessage");
4357
+ function Le(e, t = /* @__PURE__ */ new WeakMap()) {
4358
+ if (!e || typeof e == "string")
4359
+ return e;
4360
+ if (typeof e == "function")
4361
+ return `Function<${e.name || "anonymous"}>`;
4362
+ if (typeof e == "symbol")
4363
+ return e.toString();
4364
+ if (typeof e != "object")
4365
+ return e;
4366
+ if (cp(e))
4367
+ return Le(e.toJSON(), t);
4368
+ if (e instanceof Promise || e.constructor && e.constructor.prototype === "AsyncFunction")
4369
+ return "Promise";
4370
+ if (typeof Element < "u" && e instanceof Element)
4371
+ return e.tagName;
4372
+ if (typeof e.asymmetricMatch == "function")
4373
+ return `${e.toString()} ${Rs(e.sample)}`;
4374
+ if (typeof e.toJSON == "function")
4375
+ return Le(e.toJSON(), t);
4376
+ if (t.has(e))
4377
+ return t.get(e);
4378
+ if (Array.isArray(e)) {
4379
+ let r = new Array(e.length);
4380
+ return t.set(e, r), e.forEach((n, o) => {
4381
+ try {
4382
+ r[o] = Le(n, t);
4383
+ } catch (s) {
4384
+ r[o] = uc(s);
4385
+ }
4386
+ }), r;
4387
+ } else {
4388
+ let r = /* @__PURE__ */ Object.create(null);
4389
+ t.set(e, r);
4390
+ let n = e;
4391
+ for (; n && n !== ap; )
4392
+ Object.getOwnPropertyNames(n).forEach((o) => {
4393
+ if (!(o in r))
4394
+ try {
4395
+ r[o] = Le(e[o], t);
4396
+ } catch (s) {
4397
+ delete r[o], r[o] = uc(s);
4398
+ }
4399
+ }), n = Object.getPrototypeOf(n);
4400
+ return r;
4401
+ }
4402
+ }
4403
+ i(Le, "serializeValue");
4404
+ function up(e) {
4405
+ return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "");
4406
+ }
4407
+ i(up, "normalizeErrorMessage");
4408
+ function ln(e, t, r = /* @__PURE__ */ new WeakSet()) {
4409
+ if (!e || typeof e != "object")
4410
+ return { message: String(e) };
4411
+ let n = e;
4412
+ n.stack && (n.stackStr = String(n.stack)), n.name && (n.nameStr = String(n.name)), (n.showDiff || n.showDiff === void 0 && n.expected !== void 0 &&
4413
+ n.actual !== void 0) && (n.diff = sc(n.actual, n.expected, {
4414
+ ...t,
4415
+ ...n.diffOptions
4416
+ })), typeof n.expected != "string" && (n.expected = we(n.expected, 10)), typeof n.actual != "string" && (n.actual = we(n.actual, 10));
4417
+ try {
4418
+ typeof n.message == "string" && (n.message = up(n.message));
4419
+ } catch {
4420
+ }
4421
+ try {
4422
+ !r.has(n) && typeof n.cause == "object" && (r.add(n), n.cause = ln(n.cause, t, r));
4423
+ } catch {
4424
+ }
4425
+ try {
4426
+ return Le(n);
4427
+ } catch (o) {
4428
+ return Le(
4429
+ new Error(
4430
+ `Failed to fully serialize error: ${o?.message}
4431
+ Inner error message: ${n?.message}`
4432
+ )
4433
+ );
4434
+ }
4435
+ }
4436
+ i(ln, "processError");
4437
+
4438
+ // src/instrumenter/types.ts
4439
+ var lp = /* @__PURE__ */ ((o) => (o.DONE = "done", o.ERROR = "error", o.ACTIVE = "active", o.WAITING = "waiting", o))(lp || {});
4440
+
4441
+ // src/instrumenter/instrumenter.ts
4442
+ var le = {
4443
+ CALL: "storybook/instrumenter/call",
4444
+ SYNC: "storybook/instrumenter/sync",
4445
+ START: "storybook/instrumenter/start",
4446
+ BACK: "storybook/instrumenter/back",
4447
+ GOTO: "storybook/instrumenter/goto",
4448
+ NEXT: "storybook/instrumenter/next",
4449
+ END: "storybook/instrumenter/end"
4450
+ }, fc = {
4451
+ start: !1,
4452
+ back: !1,
4453
+ goto: !1,
4454
+ next: !1,
4455
+ end: !1
4456
+ }, mp = new Error(
4457
+ "This function ran after the play function completed. Did you forget to `await` it?"
4458
+ ), pc = /* @__PURE__ */ i((e) => Object.prototype.toString.call(e) === "[object Object]", "isObject"), hp = /* @__PURE__ */ i((e) => Object.
4459
+ prototype.toString.call(e) === "[object Module]", "isModule"), dp = /* @__PURE__ */ i((e) => {
4460
+ if (!pc(e) && !hp(e))
4461
+ return !1;
4462
+ if (e.constructor === void 0)
4463
+ return !0;
4464
+ let t = e.constructor.prototype;
4465
+ return !!pc(t);
4466
+ }, "isInstrumentable"), bp = /* @__PURE__ */ i((e) => {
4467
+ try {
4468
+ return new e.constructor();
4469
+ } catch {
4470
+ return {};
4471
+ }
4472
+ }, "construct"), fn = /* @__PURE__ */ i(() => ({
4473
+ renderPhase: void 0,
4474
+ isDebugging: !1,
4475
+ isPlaying: !1,
4476
+ isLocked: !1,
4477
+ cursor: 0,
4478
+ calls: [],
4479
+ shadowCalls: [],
4480
+ callRefsByResult: /* @__PURE__ */ new Map(),
4481
+ chainedCallIds: /* @__PURE__ */ new Set(),
4482
+ ancestors: [],
4483
+ playUntil: void 0,
4484
+ resolvers: {},
4485
+ syncTimeout: void 0
4486
+ }), "getInitialState"), yc = /* @__PURE__ */ i((e, t = !1) => {
4487
+ let r = (t ? e.shadowCalls : e.calls).filter((o) => o.retain);
4488
+ if (!r.length)
4489
+ return;
4490
+ let n = new Map(
4491
+ Array.from(e.callRefsByResult.entries()).filter(([, o]) => o.retain)
4492
+ );
4493
+ return { cursor: r.length, calls: r, callRefsByResult: n };
4494
+ }, "getRetainedState"), yn = class yn {
4495
+ constructor() {
4496
+ this.initialized = !1;
4497
+ this.channel = gp.getChannel(), this.state = z.window?.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ || {};
4498
+ let t = /* @__PURE__ */ i(({
4499
+ storyId: a,
4500
+ isPlaying: u = !0,
4501
+ isDebugging: f = !1
4502
+ }) => {
4503
+ let p = this.getState(a);
4504
+ this.setState(a, {
4505
+ ...fn(),
4506
+ ...yc(p, f),
4507
+ shadowCalls: f ? p.shadowCalls : [],
4508
+ chainedCallIds: f ? p.chainedCallIds : /* @__PURE__ */ new Set(),
4509
+ playUntil: f ? p.playUntil : void 0,
4510
+ isPlaying: u,
4511
+ isDebugging: f
4512
+ }), this.sync(a);
4513
+ }, "resetState");
4514
+ this.channel.on(lc, t), this.channel.on(yp, ({ storyId: a, newPhase: u }) => {
4515
+ let { isDebugging: f } = this.getState(a);
4516
+ this.setState(a, { renderPhase: u }), u === "preparing" && f && t({ storyId: a }), u === "playing" && t({ storyId: a, isDebugging: f }),
4517
+ u === "played" && this.setState(a, {
4518
+ isLocked: !1,
4519
+ isPlaying: !1,
4520
+ isDebugging: !1
4521
+ }), u === "errored" && this.setState(a, {
4522
+ isLocked: !1,
4523
+ isPlaying: !1
4524
+ });
4525
+ }), this.channel.on(pp, () => {
4526
+ this.initialized ? this.cleanup() : this.initialized = !0;
4527
+ });
4528
+ let r = /* @__PURE__ */ i(({ storyId: a, playUntil: u }) => {
4529
+ this.getState(a).isDebugging || this.setState(a, ({ calls: p }) => ({
4530
+ calls: [],
4531
+ shadowCalls: p.map((l) => ({ ...l, status: "waiting" })),
4532
+ isDebugging: !0
4533
+ }));
4534
+ let f = this.getLog(a);
4535
+ this.setState(a, ({ shadowCalls: p }) => {
4536
+ if (u || !f.length)
4537
+ return { playUntil: u };
4538
+ let l = p.findIndex((d) => d.id === f[0].callId);
4539
+ return {
4540
+ playUntil: p.slice(0, l).filter((d) => d.interceptable && !d.ancestors?.length).slice(-1)[0]?.id
4541
+ };
4542
+ }), this.channel.emit(lc, { storyId: a, isDebugging: !0 });
4543
+ }, "start"), n = /* @__PURE__ */ i(({ storyId: a }) => {
4544
+ let u = this.getLog(a).filter((p) => !p.ancestors?.length), f = u.reduceRight((p, l, d) => p >= 0 || l.status === "waiting" ? p : d, -1);
4545
+ r({ storyId: a, playUntil: u[f - 1]?.callId });
4546
+ }, "back"), o = /* @__PURE__ */ i(({ storyId: a, callId: u }) => {
4547
+ let { calls: f, shadowCalls: p, resolvers: l } = this.getState(a), d = f.find(({ id: g }) => g === u), y = p.find(({ id: g }) => g ===
4548
+ u);
4549
+ if (!d && y && Object.values(l).length > 0) {
4550
+ let g = this.getLog(a).find((m) => m.status === "waiting")?.callId;
4551
+ y.id !== g && this.setState(a, { playUntil: y.id }), Object.values(l).forEach((m) => m());
4552
+ } else
4553
+ r({ storyId: a, playUntil: u });
4554
+ }, "goto"), s = /* @__PURE__ */ i(({ storyId: a }) => {
4555
+ let { resolvers: u } = this.getState(a);
4556
+ if (Object.values(u).length > 0)
4557
+ Object.values(u).forEach((f) => f());
4558
+ else {
4559
+ let f = this.getLog(a).find((p) => p.status === "waiting")?.callId;
4560
+ f ? r({ storyId: a, playUntil: f }) : c({ storyId: a });
4561
+ }
4562
+ }, "next"), c = /* @__PURE__ */ i(({ storyId: a }) => {
4563
+ this.setState(a, { playUntil: void 0, isDebugging: !1 }), Object.values(this.getState(a).resolvers).forEach((u) => u());
4564
+ }, "end");
4565
+ this.channel.on(le.START, r), this.channel.on(le.BACK, n), this.channel.on(le.GOTO, o), this.channel.on(le.NEXT, s), this.channel.on(le.
4566
+ END, c);
4567
+ }
4568
+ getState(t) {
4569
+ return this.state[t] || fn();
4570
+ }
4571
+ setState(t, r) {
4572
+ let n = this.getState(t), o = typeof r == "function" ? r(n) : r;
4573
+ this.state = { ...this.state, [t]: { ...n, ...o } }, z.window?.parent && (z.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ =
4574
+ this.state);
4575
+ }
4576
+ cleanup() {
4577
+ this.state = Object.entries(this.state).reduce(
4578
+ (r, [n, o]) => {
4579
+ let s = yc(o);
4580
+ return s && (r[n] = Object.assign(fn(), s)), r;
4581
+ },
4582
+ {}
4583
+ );
4584
+ let t = { controlStates: fc, logItems: [] };
4585
+ this.channel.emit(le.SYNC, t), z.window?.parent && (z.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ = this.state);
4586
+ }
4587
+ getLog(t) {
4588
+ let { calls: r, shadowCalls: n } = this.getState(t), o = [...n];
4589
+ r.forEach((c, a) => {
4590
+ o[a] = c;
4591
+ });
4592
+ let s = /* @__PURE__ */ new Set();
4593
+ return o.reduceRight((c, a) => (a.args.forEach((u) => {
4594
+ u?.__callId__ && s.add(u.__callId__);
4595
+ }), a.path.forEach((u) => {
4596
+ u.__callId__ && s.add(u.__callId__);
4597
+ }), (a.interceptable || a.exception) && !s.has(a.id) && (c.unshift({ callId: a.id, status: a.status, ancestors: a.ancestors }), s.add(a.
4598
+ id)), c), []);
4599
+ }
4600
+ // Traverses the object structure to recursively patch all function properties.
4601
+ // Returns the original object, or a new object with the same constructor,
4602
+ // depending on whether it should mutate.
4603
+ instrument(t, r, n = 0) {
4604
+ if (!dp(t))
4605
+ return t;
4606
+ let { mutate: o = !1, path: s = [] } = r, c = r.getKeys ? r.getKeys(t, n) : Object.keys(t);
4607
+ return n += 1, c.reduce(
4608
+ (a, u) => {
4609
+ let f = Ap(t, u);
4610
+ if (typeof f?.get == "function") {
4611
+ let l = /* @__PURE__ */ i(() => f?.get?.bind(t)?.(), "getter");
4612
+ return Object.defineProperty(a, u, {
4613
+ get: /* @__PURE__ */ i(() => this.instrument(l(), { ...r, path: s.concat(u) }, n), "get")
4614
+ }), a;
4615
+ }
4616
+ let p = t[u];
4617
+ return typeof p != "function" ? (a[u] = this.instrument(p, { ...r, path: s.concat(u) }, n), a) : "__originalFn__" in p && typeof p.__originalFn__ ==
4618
+ "function" ? (a[u] = p, a) : (a[u] = (...l) => this.track(u, p, t, l, r), a[u].__originalFn__ = p, Object.defineProperty(a[u], "name",
4619
+ { value: u, writable: !1 }), Object.keys(p).length > 0 && Object.assign(
4620
+ a[u],
4621
+ this.instrument({ ...p }, { ...r, path: s.concat(u) }, n)
4622
+ ), a);
4623
+ },
4624
+ o ? t : bp(t)
4625
+ );
4626
+ }
4627
+ // Monkey patch an object method to record calls.
4628
+ // Returns a function that invokes the original function, records the invocation ("call") and
4629
+ // returns the original result.
4630
+ track(t, r, n, o, s) {
4631
+ let c = o?.[0]?.__storyId__ || z.__STORYBOOK_PREVIEW__?.selectionStore?.selection?.storyId, { cursor: a, ancestors: u } = this.getState(
4632
+ c);
4633
+ this.setState(c, { cursor: a + 1 });
4634
+ let f = `${u.slice(-1)[0] || c} [${a}] ${t}`, { path: p = [], intercept: l = !1, retain: d = !1 } = s, y = typeof l == "function" ? l(t,
4635
+ p) : l, g = { id: f, cursor: a, storyId: c, ancestors: u, path: p, method: t, args: o, interceptable: y, retain: d }, b = (y && !u.length ?
4636
+ this.intercept : this.invoke).call(this, r, n, g, s);
4637
+ return this.instrument(b, { ...s, mutate: !0, path: [{ __callId__: g.id }] });
4638
+ }
4639
+ intercept(t, r, n, o) {
4640
+ let { chainedCallIds: s, isDebugging: c, playUntil: a } = this.getState(n.storyId), u = s.has(n.id);
4641
+ return !c || u || a ? (a === n.id && this.setState(n.storyId, { playUntil: void 0 }), this.invoke(t, r, n, o)) : new Promise((f) => {
4642
+ this.setState(n.storyId, ({ resolvers: p }) => ({
4643
+ isLocked: !1,
4644
+ resolvers: { ...p, [n.id]: f }
4645
+ }));
4646
+ }).then(() => (this.setState(n.storyId, (f) => {
4647
+ let { [n.id]: p, ...l } = f.resolvers;
4648
+ return { isLocked: !0, resolvers: l };
4649
+ }), this.invoke(t, r, n, o)));
4650
+ }
4651
+ invoke(t, r, n, o) {
4652
+ let { callRefsByResult: s, renderPhase: c } = this.getState(n.storyId), a = 25, u = /* @__PURE__ */ i((l, d, y) => {
4653
+ if (y.includes(l))
4654
+ return "[Circular]";
4655
+ if (y = [...y, l], d > a)
4656
+ return "...";
4657
+ if (s.has(l))
4658
+ return s.get(l);
4659
+ if (l instanceof Array)
4660
+ return l.map((g) => u(g, ++d, y));
4661
+ if (l instanceof Date)
4662
+ return { __date__: { value: l.toISOString() } };
4663
+ if (l instanceof Error) {
4664
+ let { name: g, message: m, stack: b } = l;
4665
+ return { __error__: { name: g, message: m, stack: b } };
4666
+ }
4667
+ if (l instanceof RegExp) {
4668
+ let { flags: g, source: m } = l;
4669
+ return { __regexp__: { flags: g, source: m } };
4670
+ }
4671
+ if (l instanceof z.window?.HTMLElement) {
4672
+ let { prefix: g, localName: m, id: b, classList: A, innerText: O } = l, $ = Array.from(A);
4673
+ return { __element__: { prefix: g, localName: m, id: b, classNames: $, innerText: O } };
4674
+ }
4675
+ return typeof l == "function" ? {
4676
+ __function__: { name: "getMockName" in l ? l.getMockName() : l.name }
4677
+ } : typeof l == "symbol" ? { __symbol__: { description: l.description } } : typeof l == "object" && l?.constructor?.name && l?.constructor?.
4678
+ name !== "Object" ? { __class__: { name: l.constructor.name } } : Object.prototype.toString.call(l) === "[object Object]" ? Object.fromEntries(
4679
+ Object.entries(l).map(([g, m]) => [g, u(m, ++d, y)])
4680
+ ) : l;
4681
+ }, "serializeValues"), f = {
4682
+ ...n,
4683
+ args: n.args.map((l) => u(l, 0, []))
4684
+ };
4685
+ n.path.forEach((l) => {
4686
+ l?.__callId__ && this.setState(n.storyId, ({ chainedCallIds: d }) => ({
4687
+ chainedCallIds: new Set(Array.from(d).concat(l.__callId__))
4688
+ }));
4689
+ });
4690
+ let p = /* @__PURE__ */ i((l) => {
4691
+ if (l instanceof Error) {
4692
+ let { name: d, message: y, stack: g, callId: m = n.id } = l, {
4693
+ showDiff: b = void 0,
4694
+ diff: A = void 0,
4695
+ actual: O = void 0,
4696
+ expected: $ = void 0
4697
+ } = l.name === "AssertionError" ? ln(l) : l, h = { name: d, message: y, stack: g, callId: m, showDiff: b, diff: A, actual: O, expected: $ };
4698
+ if (this.update({ ...f, status: "error", exception: h }), this.setState(n.storyId, (S) => ({
4699
+ callRefsByResult: new Map([
4700
+ ...Array.from(S.callRefsByResult.entries()),
4701
+ [l, { __callId__: n.id, retain: n.retain }]
4702
+ ])
4703
+ })), n.ancestors?.length)
4704
+ throw Object.prototype.hasOwnProperty.call(l, "callId") || Object.defineProperty(l, "callId", { value: n.id }), l;
4705
+ }
4706
+ throw l;
4707
+ }, "handleException");
4708
+ try {
4709
+ if (c === "played" && !n.retain)
4710
+ throw mp;
4711
+ let d = (o.getArgs ? o.getArgs(n, this.getState(n.storyId)) : n.args).map((g) => typeof g != "function" || Object.keys(g).length ? g :
4712
+ (...m) => {
4713
+ let { cursor: b, ancestors: A } = this.getState(n.storyId);
4714
+ this.setState(n.storyId, { cursor: 0, ancestors: [...A, n.id] });
4715
+ let O = /* @__PURE__ */ i(() => this.setState(n.storyId, { cursor: b, ancestors: A }), "restore"), $ = !1;
4716
+ try {
4717
+ let h = g(...m);
4718
+ return h instanceof Promise ? ($ = !0, h.finally(O)) : h;
4719
+ } finally {
4720
+ $ || O();
4721
+ }
4722
+ }), y = t.apply(r, d);
4723
+ return y && ["object", "function", "symbol"].includes(typeof y) && this.setState(n.storyId, (g) => ({
4724
+ callRefsByResult: new Map([
4725
+ ...Array.from(g.callRefsByResult.entries()),
4726
+ [y, { __callId__: n.id, retain: n.retain }]
4727
+ ])
4728
+ })), this.update({
4729
+ ...f,
4730
+ status: y instanceof Promise ? "active" : "done"
4731
+ }), y instanceof Promise ? y.then((g) => (this.update({ ...f, status: "done" }), g), p) : y;
4732
+ } catch (l) {
4733
+ return p(l);
4734
+ }
4735
+ }
4736
+ // Sends the call info to the manager and synchronizes the log.
4737
+ update(t) {
4738
+ this.channel.emit(le.CALL, t), this.setState(t.storyId, ({ calls: r }) => {
4739
+ let n = r.concat(t).reduce((o, s) => Object.assign(o, { [s.id]: s }), {});
4740
+ return {
4741
+ // Calls are sorted to ensure parent calls always come before calls in their callback.
4742
+ calls: Object.values(n).sort(
4743
+ (o, s) => o.id.localeCompare(s.id, void 0, { numeric: !0 })
4744
+ )
4745
+ };
4746
+ }), this.sync(t.storyId);
4747
+ }
4748
+ // Builds a log of interceptable calls and control states and sends it to the manager.
4749
+ // Uses a 0ms debounce because this might get called many times in one tick.
4750
+ sync(t) {
4751
+ let r = /* @__PURE__ */ i(() => {
4752
+ let { isLocked: n, isPlaying: o } = this.getState(t), s = this.getLog(t), c = s.filter(({ ancestors: l }) => !l.length).find((l) => l.
4753
+ status === "waiting")?.callId, a = s.some((l) => l.status === "active");
4754
+ if (n || a || s.length === 0) {
4755
+ let l = { controlStates: fc, logItems: s };
4756
+ this.channel.emit(le.SYNC, l);
4757
+ return;
4758
+ }
4759
+ let u = s.some(
4760
+ (l) => l.status === "done" || l.status === "error"
4761
+ ), p = { controlStates: {
4762
+ start: u,
4763
+ back: u,
4764
+ goto: !0,
4765
+ next: o,
4766
+ end: o
4767
+ }, logItems: s, pausedAt: c };
4768
+ this.channel.emit(le.SYNC, p);
4769
+ }, "synchronize");
4770
+ this.setState(t, ({ syncTimeout: n }) => (clearTimeout(n), { syncTimeout: setTimeout(r, 0) }));
4771
+ }
4772
+ };
4773
+ i(yn, "Instrumenter");
4774
+ var pn = yn;
4775
+ function Sp(e, t = {}) {
4776
+ try {
4777
+ let r = !1, n = !1;
4778
+ return z.window?.location?.search?.includes("instrument=true") ? r = !0 : z.window?.location?.search?.includes("instrument=false") && (n =
4779
+ !0), z.window?.parent === z.window && !r || n ? e : (z.window && !z.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ && (z.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ =
4780
+ new pn()), (z.window?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__).instrument(e, t));
4781
+ } catch (r) {
4782
+ return fp.warn(r), e;
4783
+ }
4784
+ }
4785
+ i(Sp, "instrument");
4786
+ function Ap(e, t) {
4787
+ let r = e;
4788
+ for (; r != null; ) {
4789
+ let n = Object.getOwnPropertyDescriptor(r, t);
4790
+ if (n)
4791
+ return n;
4792
+ r = Object.getPrototypeOf(r);
4793
+ }
4794
+ }
4795
+ i(Ap, "getPropertyDescriptor");
4796
+ export {
4797
+ lp as CallStates,
4798
+ le as EVENTS,
4799
+ Sp as instrument
4800
+ };