@nil-/xit 0.2.3 → 0.2.5

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.
@@ -0,0 +1,2417 @@
1
+ var rr = Object.defineProperty;
2
+ var vt = (e) => {
3
+ throw TypeError(e);
4
+ };
5
+ var ir = (e, t, r) => t in e ? rr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
6
+ var M = (e, t, r) => ir(e, typeof t != "symbol" ? t + "" : t, r), ze = (e, t, r) => t.has(e) || vt("Cannot " + r);
7
+ var y = (e, t, r) => (ze(e, t, "read from private field"), r ? r.call(e) : t.get(e)), j = (e, t, r) => t.has(e) ? vt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), ce = (e, t, r, i) => (ze(e, t, "write to private field"), i ? i.call(e, r) : t.set(e, r), r), _t = (e, t, r) => (ze(e, t, "access private method"), r);
8
+ import { u as R, l as nr, m as Lt, p as g, H as Pt, q as Oe, v as Mt, F as B, b as re, w as ar, x as Z, E as le, g as T, y as k, z as Se, A as Le, B as N, C as se, S as ie, D as sr, G as fr, I as fe, L as Pe, J as ur, K as lr, M as or, N as cr, U as ue, O as Dt, P as ht, Q as x, R as bt, T as $e, V as q, W as P, X as he, Y as W, h as X, d as J, Z as Te, _ as K, $ as H, a0 as qt, a1 as dr, c as C, a2 as Q, a3 as ee, a4 as xt, a5 as Bt, a6 as vr, a7 as Fe, a8 as Ht, i as U, a9 as tt, aa as rt, ab as Me, ac as it, ad as _r, ae as hr, af as br, ag as $r, ah as pr, ai as zt, aj as gr, ak as wr, al as mr, am as Ar, an as Ze, ao as Er, ap as yr, aq as Sr, ar as z, as as Ft, s as Tr, at as Nr, au as Cr, av as Ir, aw as kr, ax as Rr, ay as Or, az as Lr, aA as Pr, aB as Mr, aC as Dr, f as nt, aD as qr, aE as xr, aF as Br, aG as Hr, aH as zr, aI as ne, n as V, aJ as Fr, aK as Ur, aL as Yr, aM as at, aN as O, aO as me, aP as Ut, aQ as Vr, aR as $t, aS as Gr, r as pt, aT as Yt, a as De, aU as Ne, aV as Kr, aW as Vt, aX as Wr, aY as Xr, aZ as Jr, a_ as Zr, a$ as gt, b0 as Qr, b1 as jr, b2 as ei, b3 as ti, b4 as Ue, b5 as ri, b6 as ii, b7 as ni, b8 as ai, b9 as si, ba as fi, bb as ui, bc as Ce, j as li, bd as oi, be as ci } from "../index.js";
9
+ import { bl as La, bK as Pa, br as Ma, bJ as Da, bz as qa, bO as xa, e as Ba, bW as Ha, bm as za, bI as Fa, bP as Ua, bL as Ya, bk as Va, bp as Ga, bQ as Ka, bH as Wa, bA as Xa, bB as Ja, bu as Za, bC as Qa, bs as ja, bg as es, bU as ts, by as rs, bf as is, bo as ns, bn as as, bq as ss, bG as fs, bF as us, bM as ls, bi as os, bD as cs, bV as ds, bt as vs, bv as _s, bw as hs, bx as bs, t as $s, bh as ps, bE as gs, bR as ws, bS as ms, bT as As, bN as Es, bj as ys } from "../index.js";
10
+ import { l as di } from "../motion.js";
11
+ import { r as Ts } from "../motion.js";
12
+ import { s as vi, g as _i } from "../store.js";
13
+ function qe(e, t, r, i) {
14
+ return e !== t && nr(
15
+ r,
16
+ /** @type {string} */
17
+ Lt(i)
18
+ ), e;
19
+ }
20
+ function Gi(e, t, r, i) {
21
+ return qe(
22
+ e[t] = r,
23
+ R(() => e[t]),
24
+ t,
25
+ i
26
+ );
27
+ }
28
+ function Ki(e, t, r, i) {
29
+ return qe(
30
+ e[t] && (e[t] = r),
31
+ R(() => e[t]),
32
+ t,
33
+ i
34
+ );
35
+ }
36
+ function Wi(e, t, r, i) {
37
+ return qe(
38
+ e[t] || (e[t] = r),
39
+ R(() => e[t]),
40
+ t,
41
+ i
42
+ );
43
+ }
44
+ function Xi(e, t, r, i) {
45
+ return qe(
46
+ e[t] ?? (e[t] = r),
47
+ R(() => e[t]),
48
+ t,
49
+ i
50
+ );
51
+ }
52
+ var wt = /* @__PURE__ */ new Map();
53
+ function Ji(e) {
54
+ var t = wt.get(e);
55
+ if (t) {
56
+ for (const r of t)
57
+ r.remove();
58
+ wt.delete(e);
59
+ }
60
+ }
61
+ function Zi(e, t, r) {
62
+ return (...i) => {
63
+ const n = e(...i);
64
+ var a = g ? n : n.nodeType === 11 ? n.firstChild : n;
65
+ return Gt(a, t, r), n;
66
+ };
67
+ }
68
+ function hi(e, t, r) {
69
+ e.__svelte_meta = {
70
+ loc: { file: t, line: r[0], column: r[1] }
71
+ }, r[2] && Gt(e.firstChild, t, r[2]);
72
+ }
73
+ function Gt(e, t, r) {
74
+ for (var i = 0, n = 0; e && i < r.length; ) {
75
+ if (g && e.nodeType === 8) {
76
+ var a = (
77
+ /** @type {Comment} */
78
+ e
79
+ );
80
+ a.data === Pt || a.data === Oe ? n += 1 : a.data[0] === Mt && (n -= 1);
81
+ }
82
+ n === 0 && e.nodeType === 1 && hi(
83
+ /** @type {Element} */
84
+ e,
85
+ t,
86
+ r[i++]
87
+ ), e = e.nextSibling;
88
+ }
89
+ }
90
+ function Qi(e, t) {
91
+ function r(i, n) {
92
+ let a = {}, s, f = !1;
93
+ return Z(() => {
94
+ const l = t(), u = T(l);
95
+ if (s) {
96
+ for (var c in a) delete a[c];
97
+ Le(s);
98
+ }
99
+ s = k(() => {
100
+ f && Se(!1), Object.defineProperties(
101
+ a,
102
+ Object.getOwnPropertyDescriptors(
103
+ // @ts-expect-error
104
+ new.target ? new u(i, n) : u(i, n)
105
+ )
106
+ ), f && Se(!0);
107
+ });
108
+ }, le), f = !0, g && (i = N), a;
109
+ }
110
+ return r[B] = e[B], r[ar] = {
111
+ // When we accept an update, we set the original source to the new component
112
+ original: e,
113
+ // The `get_source` parameter reads `wrapper[HMR].source`, but in the `accept`
114
+ // function we always replace it with `previous[HMR].source`, which in practice
115
+ // means we only ever update the original
116
+ source: re(e)
117
+ }, r;
118
+ }
119
+ function ji(e) {
120
+ var i, n, a;
121
+ const t = (i = se) == null ? void 0 : i.function, r = (a = (n = se) == null ? void 0 : n.p) == null ? void 0 : a.function;
122
+ return {
123
+ /**
124
+ * @param {string} prop
125
+ * @param {any[]} path
126
+ * @param {any} result
127
+ * @param {number} line
128
+ * @param {number} column
129
+ */
130
+ mutation: (s, f, l, u, c) => {
131
+ const d = f[0];
132
+ if (mt(e, d) || !r)
133
+ return l;
134
+ let o = e;
135
+ for (let h = 0; h < f.length - 1; h++)
136
+ if (o = o[f[h]], !(o != null && o[ie]))
137
+ return l;
138
+ const v = Lt(`${t[B]}:${u}:${c}`);
139
+ return fr(d, v, s, r[B]), l;
140
+ },
141
+ /**
142
+ * @param {any} key
143
+ * @param {any} child_component
144
+ * @param {() => any} value
145
+ */
146
+ binding: (s, f, l) => {
147
+ var u;
148
+ !mt(e, s) && r && ((u = l()) != null && u[ie]) && sr(
149
+ t[B],
150
+ s,
151
+ f[B],
152
+ r[B]
153
+ );
154
+ }
155
+ };
156
+ }
157
+ function mt(e, t) {
158
+ var i;
159
+ const r = ie in e || Pe in e;
160
+ return !!((i = fe(e, t)) != null && i.set) || r && t in e || !(t in e);
161
+ }
162
+ function en(e) {
163
+ e && ur(e[B] ?? "a component", e.name);
164
+ }
165
+ function tn() {
166
+ var r;
167
+ const e = (r = se) == null ? void 0 : r.function;
168
+ function t(i) {
169
+ lr(i, e[B]);
170
+ }
171
+ return {
172
+ $destroy: () => t("$destroy()"),
173
+ $on: () => t("$on(...)"),
174
+ $set: () => t("$set(...)")
175
+ };
176
+ }
177
+ function rn(e, t = console.log) {
178
+ or();
179
+ let r = !0;
180
+ cr(() => {
181
+ var i = ue;
182
+ try {
183
+ i = e();
184
+ } catch (n) {
185
+ console.error(n);
186
+ }
187
+ i !== ue && t(r ? "init" : "update", ...Dt(i, !0)), r = !1;
188
+ });
189
+ }
190
+ function nn(e, ...t) {
191
+ (typeof e != "object" || !(e instanceof Node)) && ht();
192
+ for (let r of t)
193
+ typeof r != "function" && ht();
194
+ }
195
+ const Ye = 0, Ae = 1, Ve = 2;
196
+ function an(e, t, r, i, n) {
197
+ g && x();
198
+ var a = e, s = se, f = ue, l, u, c, d = re(
199
+ /** @type {V} */
200
+ void 0
201
+ ), o = re(void 0), v = !1;
202
+ function h($, m) {
203
+ v = !0, m && (X(w), J(w), Te(s));
204
+ try {
205
+ $ === Ye && r && (l ? K(l) : l = k(() => r(a))), $ === Ae && i && (u ? K(u) : u = k(() => i(a, d))), $ === Ve && n && (c ? K(c) : c = k(() => n(a, o))), $ !== Ye && l && H(l, () => l = null), $ !== Ae && u && H(u, () => u = null), $ !== Ve && c && H(c, () => c = null);
206
+ } finally {
207
+ m && (Te(null), J(null), X(null), qt());
208
+ }
209
+ }
210
+ var w = Z(() => {
211
+ if (f === (f = t())) return;
212
+ let $ = g && bt(f) === (a.data === Oe);
213
+ if ($ && (a = $e(), q(a), P(!1), $ = !0), bt(f)) {
214
+ var m = f;
215
+ v = !1, m.then(
216
+ (E) => {
217
+ m === f && (he(d, E), h(Ae, !0));
218
+ },
219
+ (E) => {
220
+ if (m === f && (he(o, E), h(Ve, !0), !n))
221
+ throw o.v;
222
+ }
223
+ ), g ? r && (l = k(() => r(a))) : W(() => {
224
+ v || h(Ye, !0);
225
+ });
226
+ } else
227
+ he(d, f), h(Ae, !1);
228
+ return $ && P(!0), () => f = ue;
229
+ });
230
+ g && (a = N);
231
+ }
232
+ function sn(e, t, [r, i] = [0, 0]) {
233
+ g && r === 0 && x();
234
+ var n = e, a = null, s = null, f = ue, l = r > 0 ? le : 0, u = !1;
235
+ const c = (o, v = !0) => {
236
+ u = !0, d(v, o);
237
+ }, d = (o, v) => {
238
+ if (f === (f = o)) return;
239
+ let h = !1;
240
+ if (g && i !== -1) {
241
+ if (r === 0) {
242
+ const $ = (
243
+ /** @type {Comment} */
244
+ n.data
245
+ );
246
+ $ === Pt ? i = 0 : $ === Oe ? i = 1 / 0 : (i = parseInt($.substring(1)), i !== i && (i = f ? 1 / 0 : -1));
247
+ }
248
+ const w = i > r;
249
+ !!f === w && (n = $e(), q(n), P(!1), h = !0, i = -1);
250
+ }
251
+ f ? (a ? K(a) : v && (a = k(() => v(n))), s && H(s, () => {
252
+ s = null;
253
+ })) : (s ? K(s) : v && (s = k(() => v(n, [r + 1, i]))), a && H(a, () => {
254
+ a = null;
255
+ })), h && P(!0);
256
+ };
257
+ Z(() => {
258
+ u = !1, t(c), u || d(null, null);
259
+ }, l), g && (n = N);
260
+ }
261
+ function fn(e, t, r) {
262
+ g && x();
263
+ var i = e, n = ue, a, s = dr;
264
+ Z(() => {
265
+ s(n, n = t()) && (a && H(a), a = k(() => r(i)));
266
+ }), g && (i = N);
267
+ }
268
+ function un(e, t) {
269
+ g && q(
270
+ /** @type {TemplateNode} */
271
+ ee(e)
272
+ ), C(() => {
273
+ var r = t();
274
+ for (var i in r) {
275
+ var n = r[i];
276
+ n ? e.style.setProperty(i, n) : e.style.removeProperty(i);
277
+ }
278
+ }), Q(() => {
279
+ e.remove();
280
+ });
281
+ }
282
+ let te = null;
283
+ function At(e) {
284
+ te = e;
285
+ }
286
+ function ln(e, t) {
287
+ return t;
288
+ }
289
+ function bi(e, t, r, i) {
290
+ for (var n = [], a = t.length, s = 0; s < a; s++)
291
+ hr(t[s].e, n, !0);
292
+ var f = a > 0 && n.length === 0 && r !== null;
293
+ if (f) {
294
+ var l = (
295
+ /** @type {Element} */
296
+ /** @type {Element} */
297
+ r.parentNode
298
+ );
299
+ br(l), l.append(
300
+ /** @type {Element} */
301
+ r
302
+ ), i.clear(), Y(e, t[0].prev, t[a - 1].next);
303
+ }
304
+ $r(n, () => {
305
+ for (var u = 0; u < a; u++) {
306
+ var c = t[u];
307
+ f || (i.delete(c.k), Y(e, c.prev, c.next)), Le(c.e, !f);
308
+ }
309
+ });
310
+ }
311
+ function on(e, t, r, i, n, a = null) {
312
+ var s = e, f = { flags: t, items: /* @__PURE__ */ new Map(), first: null }, l = (t & Bt) !== 0;
313
+ if (l) {
314
+ var u = (
315
+ /** @type {Element} */
316
+ e
317
+ );
318
+ s = g ? q(
319
+ /** @type {Comment | Text} */
320
+ ee(u)
321
+ ) : u.appendChild(xt());
322
+ }
323
+ g && x();
324
+ var c = null, d = !1, o = vr(() => {
325
+ var v = r();
326
+ return it(v) ? v : v == null ? [] : Ht(v);
327
+ });
328
+ Z(() => {
329
+ var v = T(o), h = v.length;
330
+ if (d && h === 0)
331
+ return;
332
+ d = h === 0;
333
+ let w = !1;
334
+ if (g) {
335
+ var $ = (
336
+ /** @type {Comment} */
337
+ s.data === Oe
338
+ );
339
+ $ !== (h === 0) && (s = $e(), q(s), P(!1), w = !0);
340
+ }
341
+ if (g) {
342
+ for (var m = null, E, b = 0; b < h; b++) {
343
+ if (N.nodeType === 8 && /** @type {Comment} */
344
+ N.data === Mt) {
345
+ s = /** @type {Comment} */
346
+ N, w = !0, P(!1);
347
+ break;
348
+ }
349
+ var _ = v[b], p = i(_, b);
350
+ E = Kt(
351
+ N,
352
+ f,
353
+ m,
354
+ null,
355
+ _,
356
+ p,
357
+ b,
358
+ n,
359
+ t,
360
+ r
361
+ ), f.items.set(p, E), m = E;
362
+ }
363
+ h > 0 && q($e());
364
+ }
365
+ g || $i(v, f, s, n, t, i, r), a !== null && (h === 0 ? c ? K(c) : c = k(() => a(s)) : c !== null && H(c, () => {
366
+ c = null;
367
+ })), w && P(!0), T(o);
368
+ }), g && (s = N);
369
+ }
370
+ function $i(e, t, r, i, n, a, s) {
371
+ var ut, lt, ot, ct;
372
+ var f = (n & _r) !== 0, l = (n & (tt | rt)) !== 0, u = e.length, c = t.items, d = t.first, o = d, v, h = null, w, $ = [], m = [], E, b, _, p;
373
+ if (f)
374
+ for (p = 0; p < u; p += 1)
375
+ E = e[p], b = a(E, p), _ = c.get(b), _ !== void 0 && ((ut = _.a) == null || ut.measure(), (w ?? (w = /* @__PURE__ */ new Set())).add(_));
376
+ for (p = 0; p < u; p += 1) {
377
+ if (E = e[p], b = a(E, p), _ = c.get(b), _ === void 0) {
378
+ var I = o ? (
379
+ /** @type {TemplateNode} */
380
+ o.e.nodes_start
381
+ ) : r;
382
+ h = Kt(
383
+ I,
384
+ t,
385
+ h,
386
+ h === null ? t.first : h.next,
387
+ E,
388
+ b,
389
+ p,
390
+ i,
391
+ n,
392
+ s
393
+ ), c.set(b, h), $ = [], m = [], o = h.next;
394
+ continue;
395
+ }
396
+ if (l && pi(_, E, p, n), (_.e.f & Fe) !== 0 && (K(_.e), f && ((lt = _.a) == null || lt.unfix(), (w ?? (w = /* @__PURE__ */ new Set())).delete(_))), _ !== o) {
397
+ if (v !== void 0 && v.has(_)) {
398
+ if ($.length < m.length) {
399
+ var A = m[0], S;
400
+ h = A.prev;
401
+ var L = $[0], Be = $[$.length - 1];
402
+ for (S = 0; S < $.length; S += 1)
403
+ Et($[S], A, r);
404
+ for (S = 0; S < m.length; S += 1)
405
+ v.delete(m[S]);
406
+ Y(t, L.prev, Be.next), Y(t, h, L), Y(t, Be, A), o = A, h = Be, p -= 1, $ = [], m = [];
407
+ } else
408
+ v.delete(_), Et(_, o, r), Y(t, _.prev, _.next), Y(t, _, h === null ? t.first : h.next), Y(t, h, _), h = _;
409
+ continue;
410
+ }
411
+ for ($ = [], m = []; o !== null && o.k !== b; )
412
+ (o.e.f & Fe) === 0 && (v ?? (v = /* @__PURE__ */ new Set())).add(o), m.push(o), o = o.next;
413
+ if (o === null)
414
+ continue;
415
+ _ = o;
416
+ }
417
+ $.push(_), h = _, o = _.next;
418
+ }
419
+ if (o !== null || v !== void 0) {
420
+ for (var oe = v === void 0 ? [] : Ht(v); o !== null; )
421
+ (o.e.f & Fe) === 0 && oe.push(o), o = o.next;
422
+ var He = oe.length;
423
+ if (He > 0) {
424
+ var tr = (n & Bt) !== 0 && u === 0 ? r : null;
425
+ if (f) {
426
+ for (p = 0; p < He; p += 1)
427
+ (ot = oe[p].a) == null || ot.measure();
428
+ for (p = 0; p < He; p += 1)
429
+ (ct = oe[p].a) == null || ct.fix();
430
+ }
431
+ bi(t, oe, tr, c);
432
+ }
433
+ }
434
+ f && W(() => {
435
+ var dt;
436
+ if (w !== void 0)
437
+ for (_ of w)
438
+ (dt = _.a) == null || dt.apply();
439
+ }), U.first = t.first && t.first.e, U.last = h && h.e;
440
+ }
441
+ function pi(e, t, r, i) {
442
+ (i & tt) !== 0 && he(e.v, t), (i & rt) !== 0 ? he(
443
+ /** @type {Value<number>} */
444
+ e.i,
445
+ r
446
+ ) : e.i = r;
447
+ }
448
+ function Kt(e, t, r, i, n, a, s, f, l, u) {
449
+ var c = te, d = (l & tt) !== 0, o = (l & pr) === 0, v = d ? o ? Me(n) : re(n) : n, h = (l & rt) === 0 ? s : re(s), w = {
450
+ i: h,
451
+ v,
452
+ k: a,
453
+ a: null,
454
+ // @ts-expect-error
455
+ e: null,
456
+ prev: r,
457
+ next: i
458
+ };
459
+ te = w;
460
+ try {
461
+ return w.e = k(() => f(e, v, h, u), g), w.e.prev = r && r.e, w.e.next = i && i.e, r === null ? t.first = w : (r.next = w, r.e.next = w.e), i !== null && (i.prev = w, i.e.prev = w.e), w;
462
+ } finally {
463
+ te = c;
464
+ }
465
+ }
466
+ function Et(e, t, r) {
467
+ for (var i = e.next ? (
468
+ /** @type {TemplateNode} */
469
+ e.next.e.nodes_start
470
+ ) : r, n = t ? (
471
+ /** @type {TemplateNode} */
472
+ t.e.nodes_start
473
+ ) : r, a = (
474
+ /** @type {TemplateNode} */
475
+ e.e.nodes_start
476
+ ); a !== i; ) {
477
+ var s = (
478
+ /** @type {TemplateNode} */
479
+ zt(a)
480
+ );
481
+ n.before(a), a = s;
482
+ }
483
+ }
484
+ function Y(e, t, r) {
485
+ t === null ? e.first = r : (t.next = r, t.e.next = r && r.e), r !== null && (r.prev = t, r.e.prev = t && t.e);
486
+ }
487
+ function cn(e, t, r = !1, i = !1, n = !1) {
488
+ var a = e, s = "";
489
+ gr(() => {
490
+ var f = (
491
+ /** @type {Effect} */
492
+ U
493
+ );
494
+ if (s === (s = t() ?? "")) {
495
+ g && x();
496
+ return;
497
+ }
498
+ if (f.nodes_start !== null && (wr(
499
+ f.nodes_start,
500
+ /** @type {TemplateNode} */
501
+ f.nodes_end
502
+ ), f.nodes_start = f.nodes_end = null), s !== "") {
503
+ if (g) {
504
+ N.data;
505
+ for (var l = x(), u = l; l !== null && (l.nodeType !== 8 || /** @type {Comment} */
506
+ l.data !== ""); )
507
+ u = l, l = /** @type {TemplateNode} */
508
+ zt(l);
509
+ if (l === null)
510
+ throw mr(), Ar;
511
+ Ze(N, u), a = q(l);
512
+ return;
513
+ }
514
+ var c = s + "";
515
+ r ? c = `<svg>${c}</svg>` : i && (c = `<math>${c}</math>`);
516
+ var d = Er(c);
517
+ if ((r || i) && (d = /** @type {Element} */
518
+ ee(d)), Ze(
519
+ /** @type {TemplateNode} */
520
+ ee(d),
521
+ /** @type {TemplateNode} */
522
+ d.lastChild
523
+ ), r || i)
524
+ for (; ee(d); )
525
+ a.before(
526
+ /** @type {Node} */
527
+ ee(d)
528
+ );
529
+ else
530
+ a.before(d);
531
+ }
532
+ });
533
+ }
534
+ function dn(e, t, r, i, n) {
535
+ var f;
536
+ g && x();
537
+ var a = (f = t.$$slots) == null ? void 0 : f[r], s = !1;
538
+ a === !0 && (a = t[r === "default" ? "children" : r], s = !0), a === void 0 ? n !== null && n(e) : a(e, s ? () => i : i);
539
+ }
540
+ function vn(e) {
541
+ const t = {};
542
+ e.children && (t.default = !0);
543
+ for (const r in e.$$slots)
544
+ t[r] = !0;
545
+ return t;
546
+ }
547
+ function _n(e, t, r) {
548
+ g && x();
549
+ var i = e, n, a;
550
+ Z(() => {
551
+ n !== (n = t()) && (a && (H(a), a = null), n && (a = k(() => r(i, n))));
552
+ }, le), g && (i = N);
553
+ }
554
+ function hn(e, t, r, i, n, a) {
555
+ let s = g;
556
+ g && x();
557
+ var f, l, u = null;
558
+ g && N.nodeType === 1 && (u = /** @type {Element} */
559
+ N, x());
560
+ var c = (
561
+ /** @type {TemplateNode} */
562
+ g ? N : e
563
+ ), d, o = te;
564
+ Z(() => {
565
+ const v = t() || null;
566
+ var h = n ? n() : r || v === "svg" ? yr : null;
567
+ if (v !== f) {
568
+ var w = te;
569
+ At(o), d && (v === null ? H(d, () => {
570
+ d = null, l = null;
571
+ }) : v === l ? K(d) : (Le(d), Se(!1))), v && v !== l && (d = k(() => {
572
+ if (u = g ? (
573
+ /** @type {Element} */
574
+ u
575
+ ) : h ? document.createElementNS(h, v) : document.createElement(v), Ze(u, u), i) {
576
+ g && Sr(v) && u.append(document.createComment(""));
577
+ var $ = (
578
+ /** @type {TemplateNode} */
579
+ g ? ee(u) : u.appendChild(xt())
580
+ );
581
+ g && ($ === null ? P(!1) : q($)), i(u, $);
582
+ }
583
+ U.nodes_end = u, c.before(u);
584
+ })), f = v, f && (l = f), Se(!0), At(w);
585
+ }
586
+ }, le), s && (P(!0), q(c));
587
+ }
588
+ function bn(e, t) {
589
+ W(() => {
590
+ var r = e.getRootNode(), i = (
591
+ /** @type {ShadowRoot} */
592
+ r.host ? (
593
+ /** @type {ShadowRoot} */
594
+ r
595
+ ) : (
596
+ /** @type {Document} */
597
+ r.head ?? /** @type {Document} */
598
+ r.ownerDocument.head
599
+ )
600
+ );
601
+ if (!i.querySelector("#" + t.hash)) {
602
+ const n = document.createElement("style");
603
+ n.id = t.hash, n.textContent = t.code, i.appendChild(n);
604
+ }
605
+ });
606
+ }
607
+ function $n(e, t, r) {
608
+ z(() => {
609
+ var i = R(() => t(e, r == null ? void 0 : r()) || {});
610
+ if (r && (i != null && i.update)) {
611
+ var n = !1, a = (
612
+ /** @type {any} */
613
+ {}
614
+ );
615
+ C(() => {
616
+ var s = r();
617
+ Ft(s), n && Tr(a, s) && (a = s, i.update(s));
618
+ }), n = !0;
619
+ }
620
+ if (i != null && i.destroy)
621
+ return () => (
622
+ /** @type {Function} */
623
+ i.destroy()
624
+ );
625
+ });
626
+ }
627
+ const gi = /[&"<]/g;
628
+ function wi(e, t) {
629
+ const r = String(e ?? ""), i = gi;
630
+ i.lastIndex = 0;
631
+ let n = "", a = 0;
632
+ for (; i.test(r); ) {
633
+ const s = i.lastIndex - 1, f = r[s];
634
+ n += r.substring(a, s) + (f === "&" ? "&amp;" : f === '"' ? "&quot;" : "&lt;"), a = s + 1;
635
+ }
636
+ return n + r.substring(a);
637
+ }
638
+ function Wt(e) {
639
+ var t, r, i = "";
640
+ if (typeof e == "string" || typeof e == "number") i += e;
641
+ else if (typeof e == "object") if (Array.isArray(e)) {
642
+ var n = e.length;
643
+ for (t = 0; t < n; t++) e[t] && (r = Wt(e[t])) && (i && (i += " "), i += r);
644
+ } else for (r in e) e[r] && (i && (i += " "), i += r);
645
+ return i;
646
+ }
647
+ function mi() {
648
+ for (var e, t, r = 0, i = "", n = arguments.length; r < n; r++) (e = arguments[r]) && (t = Wt(e)) && (i && (i += " "), i += t);
649
+ return i;
650
+ }
651
+ const yt = {
652
+ translate: /* @__PURE__ */ new Map([
653
+ [!0, "yes"],
654
+ [!1, "no"]
655
+ ])
656
+ };
657
+ function pn(e, t, r = !1) {
658
+ if (t == null || !t && r) return "";
659
+ const i = e in yt && yt[e].get(t) || t, n = r ? "" : `="${wi(i)}"`;
660
+ return ` ${e}${n}`;
661
+ }
662
+ function Ai(e) {
663
+ return typeof e == "object" ? mi(e) : e ?? "";
664
+ }
665
+ const St = [...`
666
+ \r\f \v\uFEFF`];
667
+ function Ei(e, t, r) {
668
+ var i = e == null ? "" : "" + e;
669
+ if (t && (i = i ? i + " " + t : t), r) {
670
+ for (var n in r)
671
+ if (r[n])
672
+ i = i ? i + " " + n : n;
673
+ else if (i.length)
674
+ for (var a = n.length, s = 0; (s = i.indexOf(n, s)) >= 0; ) {
675
+ var f = s + a;
676
+ (s === 0 || St.includes(i[s - 1])) && (f === i.length || St.includes(i[f])) ? i = (s === 0 ? "" : i.substring(0, s)) + i.substring(f + 1) : s = f;
677
+ }
678
+ }
679
+ return i === "" ? null : i;
680
+ }
681
+ function Tt(e, t = !1) {
682
+ var r = t ? " !important;" : ";", i = "";
683
+ for (var n in e) {
684
+ var a = e[n];
685
+ a != null && a !== "" && (i += " " + n + ": " + a + r);
686
+ }
687
+ return i;
688
+ }
689
+ function Ge(e) {
690
+ return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
691
+ }
692
+ function yi(e, t) {
693
+ if (t) {
694
+ var r = "", i, n;
695
+ if (Array.isArray(t) ? (i = t[0], n = t[1]) : i = t, e) {
696
+ e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
697
+ var a = !1, s = 0, f = !1, l = [];
698
+ i && l.push(...Object.keys(i).map(Ge)), n && l.push(...Object.keys(n).map(Ge));
699
+ var u = 0, c = -1;
700
+ const w = e.length;
701
+ for (var d = 0; d < w; d++) {
702
+ var o = e[d];
703
+ if (f ? o === "/" && e[d - 1] === "*" && (f = !1) : a ? a === o && (a = !1) : o === "/" && e[d + 1] === "*" ? f = !0 : o === '"' || o === "'" ? a = o : o === "(" ? s++ : o === ")" && s--, !f && a === !1 && s === 0) {
704
+ if (o === ":" && c === -1)
705
+ c = d;
706
+ else if (o === ";" || d === w - 1) {
707
+ if (c !== -1) {
708
+ var v = Ge(e.substring(u, c).trim());
709
+ if (!l.includes(v)) {
710
+ o !== ";" && d++;
711
+ var h = e.substring(u, d).trim();
712
+ r += " " + h + ";";
713
+ }
714
+ }
715
+ u = d + 1, c = -1;
716
+ }
717
+ }
718
+ }
719
+ }
720
+ return i && (r += Tt(i)), n && (r += Tt(n, !0)), r = r.trim(), r === "" ? null : r;
721
+ }
722
+ return e == null ? null : String(e);
723
+ }
724
+ function Si(e, t, r, i, n, a) {
725
+ var s = e.__className;
726
+ if (g || s !== r || s === void 0) {
727
+ var f = Ei(r, i, a);
728
+ (!g || f !== e.getAttribute("class")) && (f == null ? e.removeAttribute("class") : t ? e.className = f : e.setAttribute("class", f)), e.__className = r;
729
+ } else if (a && n !== a)
730
+ for (var l in a) {
731
+ var u = !!a[l];
732
+ (n == null || u !== !!n[l]) && e.classList.toggle(l, u);
733
+ }
734
+ return a;
735
+ }
736
+ function Ke(e, t = {}, r, i) {
737
+ for (var n in r) {
738
+ var a = r[n];
739
+ t[n] !== a && (r[n] == null ? e.style.removeProperty(n) : e.style.setProperty(n, a, i));
740
+ }
741
+ }
742
+ function Ti(e, t, r, i) {
743
+ var n = e.__style;
744
+ if (g || n !== t) {
745
+ var a = yi(t, i);
746
+ (!g || a !== e.getAttribute("style")) && (a == null ? e.removeAttribute("style") : e.style.cssText = a), e.__style = t;
747
+ } else i && (Array.isArray(i) ? (Ke(e, r == null ? void 0 : r[0], i[0]), Ke(e, r == null ? void 0 : r[1], i[1], "important")) : Ke(e, r, i));
748
+ return i;
749
+ }
750
+ const de = Symbol("class"), ve = Symbol("style"), Xt = Symbol("is custom element"), Jt = Symbol("is html");
751
+ function gn(e) {
752
+ if (g) {
753
+ var t = !1, r = () => {
754
+ if (!t) {
755
+ if (t = !0, e.hasAttribute("value")) {
756
+ var i = e.value;
757
+ pe(e, "value", null), e.value = i;
758
+ }
759
+ if (e.hasAttribute("checked")) {
760
+ var n = e.checked;
761
+ pe(e, "checked", null), e.checked = n;
762
+ }
763
+ }
764
+ };
765
+ e.__on_r = r, Mr(r), Dr();
766
+ }
767
+ }
768
+ function wn(e, t) {
769
+ var r = xe(e);
770
+ r.value === (r.value = // treat null and undefined the same for the initial value
771
+ t ?? void 0) || // @ts-expect-error
772
+ // `progress` elements always need their value set when it's `0`
773
+ e.value === t && (t !== 0 || e.nodeName !== "PROGRESS") || (e.value = t ?? "");
774
+ }
775
+ function mn(e, t) {
776
+ var r = xe(e);
777
+ r.checked !== (r.checked = // treat null and undefined the same for the initial value
778
+ t ?? void 0) && (e.checked = t);
779
+ }
780
+ function Ni(e, t) {
781
+ t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
782
+ }
783
+ function An(e, t) {
784
+ const r = e.checked;
785
+ e.defaultChecked = t, e.checked = r;
786
+ }
787
+ function En(e, t) {
788
+ const r = e.value;
789
+ e.defaultValue = t, e.value = r;
790
+ }
791
+ function pe(e, t, r, i) {
792
+ var n = xe(e);
793
+ g && (n[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || n[t] !== (n[t] = r) && (t === "loading" && (e[Nr] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && st(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
794
+ }
795
+ function yn(e, t, r) {
796
+ e.setAttributeNS("http://www.w3.org/1999/xlink", t, r);
797
+ }
798
+ function Sn(e, t, r) {
799
+ var i = nt, n = U;
800
+ let a = g;
801
+ g && P(!1), J(null), X(null);
802
+ try {
803
+ // `style` should use `set_attribute` rather than the setter
804
+ t !== "style" && // Don't compute setters for custom elements while they aren't registered yet,
805
+ // because during their upgrade/instantiation they might add more setters.
806
+ // Instead, fall back to a simple "an object, then set as property" heuristic.
807
+ (Qe.has(e.nodeName) || // customElements may not be available in browser extension contexts
808
+ !customElements || customElements.get(e.tagName.toLowerCase()) ? st(e).includes(t) : r && typeof r == "object") ? e[t] = r : pe(e, t, r == null ? r : String(r));
809
+ } finally {
810
+ J(i), X(n), a && P(!0);
811
+ }
812
+ }
813
+ function Tn(e, t, r, i, n = !1) {
814
+ var a = xe(e), s = a[Xt], f = !a[Jt];
815
+ let l = g && s;
816
+ l && P(!1);
817
+ var u = t || {}, c = e.tagName === "OPTION";
818
+ for (var d in t)
819
+ d in r || (r[d] = null);
820
+ r.class ? r.class = Ai(r.class) : (i || r[de]) && (r.class = null), r[ve] && (r.style ?? (r.style = null));
821
+ var o = st(e);
822
+ for (const b in r) {
823
+ let _ = r[b];
824
+ if (c && b === "value" && _ == null) {
825
+ e.value = e.__value = "", u[b] = _;
826
+ continue;
827
+ }
828
+ if (b === "class") {
829
+ var v = e.namespaceURI === "http://www.w3.org/1999/xhtml";
830
+ Si(e, v, _, i, t == null ? void 0 : t[de], r[de]), u[b] = _, u[de] = r[de];
831
+ continue;
832
+ }
833
+ if (b === "style") {
834
+ Ti(e, _, t == null ? void 0 : t[ve], r[ve]), u[b] = _, u[ve] = r[ve];
835
+ continue;
836
+ }
837
+ var h = u[b];
838
+ if (_ !== h) {
839
+ u[b] = _;
840
+ var w = b[0] + b[1];
841
+ if (w !== "$$")
842
+ if (w === "on") {
843
+ const p = {}, I = "$$" + b;
844
+ let A = b.slice(2);
845
+ var $ = qr(A);
846
+ if (Cr(A) && (A = A.slice(0, -7), p.capture = !0), !$ && h) {
847
+ if (_ != null) continue;
848
+ e.removeEventListener(A, u[I], p), u[I] = null;
849
+ }
850
+ if (_ != null)
851
+ if ($)
852
+ e[`__${A}`] = _, kr([A]);
853
+ else {
854
+ let S = function(L) {
855
+ u[b].call(this, L);
856
+ };
857
+ u[I] = Ir(A, e, S, p);
858
+ }
859
+ else $ && (e[`__${A}`] = void 0);
860
+ } else if (b === "style")
861
+ pe(e, b, _);
862
+ else if (b === "autofocus")
863
+ Rr(
864
+ /** @type {HTMLElement} */
865
+ e,
866
+ !!_
867
+ );
868
+ else if (!s && (b === "__value" || b === "value" && _ != null))
869
+ e.value = e.__value = _;
870
+ else if (b === "selected" && c)
871
+ Ni(
872
+ /** @type {HTMLOptionElement} */
873
+ e,
874
+ _
875
+ );
876
+ else {
877
+ var m = b;
878
+ f || (m = Or(m));
879
+ var E = m === "defaultValue" || m === "defaultChecked";
880
+ if (_ == null && !s && !E)
881
+ if (a[b] = null, m === "value" || m === "checked") {
882
+ let p = (
883
+ /** @type {HTMLInputElement} */
884
+ e
885
+ );
886
+ const I = t === void 0;
887
+ if (m === "value") {
888
+ let A = p.defaultValue;
889
+ p.removeAttribute(m), p.defaultValue = A, p.value = p.__value = I ? A : null;
890
+ } else {
891
+ let A = p.defaultChecked;
892
+ p.removeAttribute(m), p.defaultChecked = A, p.checked = I ? A : !1;
893
+ }
894
+ } else
895
+ e.removeAttribute(b);
896
+ else E || o.includes(m) && (s || typeof _ != "string") ? e[m] = _ : typeof _ != "function" && pe(e, m, _);
897
+ }
898
+ }
899
+ }
900
+ return l && P(!0), u;
901
+ }
902
+ function xe(e) {
903
+ return (
904
+ /** @type {Record<string | symbol, unknown>} **/
905
+ // @ts-expect-error
906
+ e.__attributes ?? (e.__attributes = {
907
+ [Xt]: e.nodeName.includes("-"),
908
+ [Jt]: e.namespaceURI === Lr
909
+ })
910
+ );
911
+ }
912
+ var Qe = /* @__PURE__ */ new Map();
913
+ function st(e) {
914
+ var t = Qe.get(e.nodeName);
915
+ if (t) return t;
916
+ Qe.set(e.nodeName, t = []);
917
+ for (var r, i = e, n = Element.prototype; n !== i; ) {
918
+ r = xr(i);
919
+ for (var a in r)
920
+ r[a].set && t.push(a);
921
+ i = Pr(i);
922
+ }
923
+ return t;
924
+ }
925
+ function Ee(e, t) {
926
+ at(() => {
927
+ e.dispatchEvent(new CustomEvent(t));
928
+ });
929
+ }
930
+ function Ci(e) {
931
+ if (e === "float") return "cssFloat";
932
+ if (e === "offset") return "cssOffset";
933
+ if (e.startsWith("--")) return e;
934
+ const t = e.split("-");
935
+ return t.length === 1 ? t[0] : t[0] + t.slice(1).map(
936
+ /** @param {any} word */
937
+ (r) => r[0].toUpperCase() + r.slice(1)
938
+ ).join("");
939
+ }
940
+ function Nt(e) {
941
+ const t = {}, r = e.split(";");
942
+ for (const i of r) {
943
+ const [n, a] = i.split(":");
944
+ if (!n || a === void 0) break;
945
+ const s = Ci(n.trim());
946
+ t[s] = a.trim();
947
+ }
948
+ return t;
949
+ }
950
+ const Ii = (e) => e;
951
+ function Nn(e, t, r) {
952
+ var i = (
953
+ /** @type {EachItem} */
954
+ te
955
+ ), n, a, s, f = null;
956
+ i.a ?? (i.a = {
957
+ element: e,
958
+ measure() {
959
+ n = this.element.getBoundingClientRect();
960
+ },
961
+ apply() {
962
+ if (s == null || s.abort(), a = this.element.getBoundingClientRect(), n.left !== a.left || n.right !== a.right || n.top !== a.top || n.bottom !== a.bottom) {
963
+ const l = t()(this.element, { from: n, to: a }, r == null ? void 0 : r());
964
+ s = Ie(this.element, l, void 0, 1, () => {
965
+ s == null || s.abort(), s = void 0;
966
+ });
967
+ }
968
+ },
969
+ fix() {
970
+ if (!e.getAnimations().length) {
971
+ var { position: l, width: u, height: c } = getComputedStyle(e);
972
+ if (l !== "absolute" && l !== "fixed") {
973
+ var d = (
974
+ /** @type {HTMLElement | SVGElement} */
975
+ e.style
976
+ );
977
+ f = {
978
+ position: d.position,
979
+ width: d.width,
980
+ height: d.height,
981
+ transform: d.transform
982
+ }, d.position = "absolute", d.width = u, d.height = c;
983
+ var o = e.getBoundingClientRect();
984
+ if (n.left !== o.left || n.top !== o.top) {
985
+ var v = `translate(${n.left - o.left}px, ${n.top - o.top}px)`;
986
+ d.transform = d.transform ? `${d.transform} ${v}` : v;
987
+ }
988
+ }
989
+ }
990
+ },
991
+ unfix() {
992
+ if (f) {
993
+ var l = (
994
+ /** @type {HTMLElement | SVGElement} */
995
+ e.style
996
+ );
997
+ l.position = f.position, l.width = f.width, l.height = f.height, l.transform = f.transform;
998
+ }
999
+ }
1000
+ }), i.a.element = e;
1001
+ }
1002
+ function Cn(e, t, r, i) {
1003
+ var n = (e & Ur) !== 0, a = (e & Yr) !== 0, s = n && a, f = (e & Fr) !== 0, l = s ? "both" : n ? "in" : "out", u, c = t.inert, d = t.style.overflow, o, v;
1004
+ function h() {
1005
+ var b = nt, _ = U;
1006
+ J(null), X(null);
1007
+ try {
1008
+ return u ?? (u = r()(t, (i == null ? void 0 : i()) ?? /** @type {P} */
1009
+ {}, {
1010
+ direction: l
1011
+ }));
1012
+ } finally {
1013
+ J(b), X(_);
1014
+ }
1015
+ }
1016
+ var w = {
1017
+ is_global: f,
1018
+ in() {
1019
+ var b;
1020
+ if (t.inert = c, !n) {
1021
+ v == null || v.abort(), (b = v == null ? void 0 : v.reset) == null || b.call(v);
1022
+ return;
1023
+ }
1024
+ a || o == null || o.abort(), Ee(t, "introstart"), o = Ie(t, h(), v, 1, () => {
1025
+ Ee(t, "introend"), o == null || o.abort(), o = u = void 0, t.style.overflow = d;
1026
+ });
1027
+ },
1028
+ out(b) {
1029
+ if (!a) {
1030
+ b == null || b(), u = void 0;
1031
+ return;
1032
+ }
1033
+ t.inert = !0, Ee(t, "outrostart"), v = Ie(t, h(), o, 0, () => {
1034
+ Ee(t, "outroend"), b == null || b();
1035
+ });
1036
+ },
1037
+ stop: () => {
1038
+ o == null || o.abort(), v == null || v.abort();
1039
+ }
1040
+ }, $ = (
1041
+ /** @type {Effect} */
1042
+ U
1043
+ );
1044
+ if (($.transitions ?? ($.transitions = [])).push(w), n && Br) {
1045
+ var m = f;
1046
+ if (!m) {
1047
+ for (var E = (
1048
+ /** @type {Effect | null} */
1049
+ $.parent
1050
+ ); E && (E.f & le) !== 0; )
1051
+ for (; (E = E.parent) && (E.f & Hr) === 0; )
1052
+ ;
1053
+ m = !E || (E.f & zr) !== 0;
1054
+ }
1055
+ m && z(() => {
1056
+ R(() => w.in());
1057
+ });
1058
+ }
1059
+ }
1060
+ function Ie(e, t, r, i, n) {
1061
+ var a = i === 1;
1062
+ if (ne(t)) {
1063
+ var s, f = !1;
1064
+ return W(() => {
1065
+ if (!f) {
1066
+ var $ = t({ direction: a ? "in" : "out" });
1067
+ s = Ie(e, $, r, i, n);
1068
+ }
1069
+ }), {
1070
+ abort: () => {
1071
+ f = !0, s == null || s.abort();
1072
+ },
1073
+ deactivate: () => s.deactivate(),
1074
+ reset: () => s.reset(),
1075
+ t: () => s.t()
1076
+ };
1077
+ }
1078
+ if (r == null || r.deactivate(), !(t != null && t.duration))
1079
+ return n(), {
1080
+ abort: V,
1081
+ deactivate: V,
1082
+ reset: V,
1083
+ t: () => i
1084
+ };
1085
+ const { delay: l = 0, css: u, tick: c, easing: d = Ii } = t;
1086
+ var o = [];
1087
+ if (a && r === void 0 && (c && c(0, 1), u)) {
1088
+ var v = Nt(u(0, 1));
1089
+ o.push(v, v);
1090
+ }
1091
+ var h = () => 1 - i, w = e.animate(o, { duration: l });
1092
+ return w.onfinish = () => {
1093
+ var $ = (r == null ? void 0 : r.t()) ?? 1 - i;
1094
+ r == null || r.abort();
1095
+ var m = i - $, E = (
1096
+ /** @type {number} */
1097
+ t.duration * Math.abs(m)
1098
+ ), b = [];
1099
+ if (E > 0) {
1100
+ var _ = !1;
1101
+ if (u)
1102
+ for (var p = Math.ceil(E / 16.666666666666668), I = 0; I <= p; I += 1) {
1103
+ var A = $ + m * d(I / p), S = Nt(u(A, 1 - A));
1104
+ b.push(S), _ || (_ = S.overflow === "hidden");
1105
+ }
1106
+ _ && (e.style.overflow = "hidden"), h = () => {
1107
+ var L = (
1108
+ /** @type {number} */
1109
+ /** @type {globalThis.Animation} */
1110
+ w.currentTime
1111
+ );
1112
+ return $ + m * d(L / E);
1113
+ }, c && di(() => {
1114
+ if (w.playState !== "running") return !1;
1115
+ var L = h();
1116
+ return c(L, 1 - L), !0;
1117
+ });
1118
+ }
1119
+ w = e.animate(b, { duration: E, fill: "forwards" }), w.onfinish = () => {
1120
+ h = () => i, c == null || c(i, 1 - i), n();
1121
+ };
1122
+ }, {
1123
+ abort: () => {
1124
+ w && (w.cancel(), w.effect = null, w.onfinish = V);
1125
+ },
1126
+ deactivate: () => {
1127
+ n = V;
1128
+ },
1129
+ reset: () => {
1130
+ i === 0 && (c == null || c(1, 0));
1131
+ },
1132
+ t: () => h()
1133
+ };
1134
+ }
1135
+ function In(e) {
1136
+ O(document, ["focusin", "focusout"], (t) => {
1137
+ t && t.type === "focusout" && /** @type {FocusEvent} */
1138
+ t.relatedTarget || e(document.activeElement);
1139
+ });
1140
+ }
1141
+ function kn(e, t, r = t) {
1142
+ me(e, "input", (i) => {
1143
+ var n = i ? e.defaultValue : e.value;
1144
+ if (n = Xe(e) ? Je(n) : n, r(n), n !== (n = t())) {
1145
+ var a = e.selectionStart, s = e.selectionEnd;
1146
+ e.value = n ?? "", s !== null && (e.selectionStart = a, e.selectionEnd = Math.min(s, e.value.length));
1147
+ }
1148
+ }), // If we are hydrating and the value has since changed,
1149
+ // then use the updated value from the input instead.
1150
+ (g && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
1151
+ // TODO Svelte 6: remove input.value check and set to empty string?
1152
+ R(t) == null && e.value) && r(Xe(e) ? Je(e.value) : e.value), C(() => {
1153
+ var i = t();
1154
+ Xe(e) && i === Je(e.value) || e.type === "date" && !i && !e.value || i !== e.value && (e.value = i ?? "");
1155
+ });
1156
+ }
1157
+ const We = /* @__PURE__ */ new Set();
1158
+ function Rn(e, t, r, i, n = i) {
1159
+ var a = r.getAttribute("type") === "checkbox", s = e;
1160
+ let f = !1;
1161
+ if (t !== null)
1162
+ for (var l of t)
1163
+ s = s[l] ?? (s[l] = []);
1164
+ s.push(r), me(
1165
+ r,
1166
+ "change",
1167
+ () => {
1168
+ var u = r.__value;
1169
+ a && (u = Ct(s, u, r.checked)), n(u);
1170
+ },
1171
+ // TODO better default value handling
1172
+ () => n(a ? [] : null)
1173
+ ), C(() => {
1174
+ var u = i();
1175
+ if (g && r.defaultChecked !== r.checked) {
1176
+ f = !0;
1177
+ return;
1178
+ }
1179
+ a ? (u = u || [], r.checked = u.includes(r.__value)) : r.checked = Ut(r.__value, u);
1180
+ }), Q(() => {
1181
+ var u = s.indexOf(r);
1182
+ u !== -1 && s.splice(u, 1);
1183
+ }), We.has(s) || (We.add(s), W(() => {
1184
+ s.sort((u, c) => u.compareDocumentPosition(c) === 4 ? -1 : 1), We.delete(s);
1185
+ })), W(() => {
1186
+ if (f) {
1187
+ var u;
1188
+ if (a)
1189
+ u = Ct(s, u, r.checked);
1190
+ else {
1191
+ var c = s.find((d) => d.checked);
1192
+ u = c == null ? void 0 : c.__value;
1193
+ }
1194
+ n(u);
1195
+ }
1196
+ });
1197
+ }
1198
+ function On(e, t, r = t) {
1199
+ me(e, "change", (i) => {
1200
+ var n = i ? e.defaultChecked : e.checked;
1201
+ r(n);
1202
+ }), // If we are hydrating and the value has since changed,
1203
+ // then use the update value from the input instead.
1204
+ (g && e.defaultChecked !== e.checked || // If defaultChecked is set, then checked == defaultChecked
1205
+ R(t) == null) && r(e.checked), C(() => {
1206
+ var i = t();
1207
+ e.checked = !!i;
1208
+ });
1209
+ }
1210
+ function Ct(e, t, r) {
1211
+ for (var i = /* @__PURE__ */ new Set(), n = 0; n < e.length; n += 1)
1212
+ e[n].checked && i.add(e[n].__value);
1213
+ return r || i.delete(t), Array.from(i);
1214
+ }
1215
+ function Xe(e) {
1216
+ var t = e.type;
1217
+ return t === "number" || t === "range";
1218
+ }
1219
+ function Je(e) {
1220
+ return e === "" ? null : +e;
1221
+ }
1222
+ function Ln(e, t, r = t) {
1223
+ me(e, "change", () => {
1224
+ r(e.files);
1225
+ }), // If we are hydrating and the value has since changed,
1226
+ // then use the updated value from the input instead.
1227
+ g && e.files && r(e.files), C(() => {
1228
+ e.files = t();
1229
+ });
1230
+ }
1231
+ function ft(e) {
1232
+ for (var t = [], r = 0; r < e.length; r += 1)
1233
+ t.push({ start: e.start(r), end: e.end(r) });
1234
+ return t;
1235
+ }
1236
+ function Pn(e, t, r = t) {
1237
+ var i, n, a = () => {
1238
+ cancelAnimationFrame(i), e.paused || (i = requestAnimationFrame(a));
1239
+ var s = e.currentTime;
1240
+ n !== s && r(n = s);
1241
+ };
1242
+ i = requestAnimationFrame(a), e.addEventListener("timeupdate", a), C(() => {
1243
+ var s = Number(t());
1244
+ n !== s && !isNaN(
1245
+ /** @type {any} */
1246
+ s
1247
+ ) && (e.currentTime = n = s);
1248
+ }), Q(() => {
1249
+ cancelAnimationFrame(i), e.removeEventListener("timeupdate", a);
1250
+ });
1251
+ }
1252
+ function Mn(e, t) {
1253
+ O(e, ["loadedmetadata", "progress"], () => t(ft(e.buffered)));
1254
+ }
1255
+ function Dn(e, t) {
1256
+ O(e, ["loadedmetadata"], () => t(ft(e.seekable)));
1257
+ }
1258
+ function qn(e, t) {
1259
+ O(e, ["timeupdate"], () => t(ft(e.played)));
1260
+ }
1261
+ function xn(e, t) {
1262
+ O(e, ["seeking", "seeked"], () => t(e.seeking));
1263
+ }
1264
+ function Bn(e, t) {
1265
+ O(e, ["timeupdate", "ended"], () => t(e.ended));
1266
+ }
1267
+ function Hn(e, t) {
1268
+ O(
1269
+ e,
1270
+ ["loadedmetadata", "loadeddata", "canplay", "canplaythrough", "playing", "waiting", "emptied"],
1271
+ () => t(e.readyState)
1272
+ );
1273
+ }
1274
+ function zn(e, t, r = t) {
1275
+ z(() => {
1276
+ var i = Number(t());
1277
+ i !== e.playbackRate && !isNaN(i) && (e.playbackRate = i);
1278
+ }), z(() => {
1279
+ O(e, ["ratechange"], () => {
1280
+ r(e.playbackRate);
1281
+ });
1282
+ });
1283
+ }
1284
+ function Fn(e, t, r = t) {
1285
+ var i = t(), n = () => {
1286
+ i !== e.paused && r(i = e.paused);
1287
+ };
1288
+ O(e, ["play", "pause", "canplay"], n, i == null), z(() => {
1289
+ (i = !!t()) !== e.paused && (i ? e.pause() : e.play().catch(() => {
1290
+ r(i = !0);
1291
+ }));
1292
+ });
1293
+ }
1294
+ function Un(e, t, r = t) {
1295
+ var i = () => {
1296
+ r(e.volume);
1297
+ };
1298
+ t() == null && i(), O(e, ["volumechange"], i, !1), C(() => {
1299
+ var n = Number(t());
1300
+ n !== e.volume && !isNaN(n) && (e.volume = n);
1301
+ });
1302
+ }
1303
+ function Yn(e, t, r = t) {
1304
+ var i = () => {
1305
+ r(e.muted);
1306
+ };
1307
+ t() == null && i(), O(e, ["volumechange"], i, !1), C(() => {
1308
+ var n = !!t();
1309
+ e.muted !== n && (e.muted = n);
1310
+ });
1311
+ }
1312
+ function Vn(e) {
1313
+ O(window, ["online", "offline"], () => {
1314
+ e(navigator.onLine);
1315
+ });
1316
+ }
1317
+ function Gn(e, t, r) {
1318
+ var i = fe(e, t);
1319
+ i && i.set && (e[t] = r, Q(() => {
1320
+ e[t] = null;
1321
+ }));
1322
+ }
1323
+ function je(e, t, r) {
1324
+ if (e.multiple)
1325
+ return Ri(e, t);
1326
+ for (var i of e.options) {
1327
+ var n = be(i);
1328
+ if (Ut(n, t)) {
1329
+ i.selected = !0;
1330
+ return;
1331
+ }
1332
+ }
1333
+ (!r || t !== void 0) && (e.selectedIndex = -1);
1334
+ }
1335
+ function ki(e, t) {
1336
+ let r = !0;
1337
+ z(() => {
1338
+ t && je(e, R(t), r), r = !1;
1339
+ var i = new MutationObserver(() => {
1340
+ var n = e.__value;
1341
+ je(e, n);
1342
+ });
1343
+ return i.observe(e, {
1344
+ // Listen to option element changes
1345
+ childList: !0,
1346
+ subtree: !0,
1347
+ // because of <optgroup>
1348
+ // Listen to option element value attribute changes
1349
+ // (doesn't get notified of select value changes,
1350
+ // because that property is not reflected as an attribute)
1351
+ attributes: !0,
1352
+ attributeFilter: ["value"]
1353
+ }), () => {
1354
+ i.disconnect();
1355
+ };
1356
+ });
1357
+ }
1358
+ function Kn(e, t, r = t) {
1359
+ var i = !0;
1360
+ me(e, "change", (n) => {
1361
+ var a = n ? "[selected]" : ":checked", s;
1362
+ if (e.multiple)
1363
+ s = [].map.call(e.querySelectorAll(a), be);
1364
+ else {
1365
+ var f = e.querySelector(a) ?? // will fall back to first non-disabled option if no option is selected
1366
+ e.querySelector("option:not([disabled])");
1367
+ s = f && be(f);
1368
+ }
1369
+ r(s);
1370
+ }), z(() => {
1371
+ var n = t();
1372
+ if (je(e, n, i), i && n === void 0) {
1373
+ var a = e.querySelector(":checked");
1374
+ a !== null && (n = be(a), r(n));
1375
+ }
1376
+ e.__value = n, i = !1;
1377
+ }), ki(e);
1378
+ }
1379
+ function Ri(e, t) {
1380
+ for (var r of e.options)
1381
+ r.selected = ~t.indexOf(be(r));
1382
+ }
1383
+ function be(e) {
1384
+ return "__value" in e ? e.__value : e.value;
1385
+ }
1386
+ var G, ae, we, ke, Zt;
1387
+ const Re = class Re {
1388
+ /** @param {ResizeObserverOptions} options */
1389
+ constructor(t) {
1390
+ j(this, ke);
1391
+ /** */
1392
+ j(this, G, /* @__PURE__ */ new WeakMap());
1393
+ /** @type {ResizeObserver | undefined} */
1394
+ j(this, ae);
1395
+ /** @type {ResizeObserverOptions} */
1396
+ j(this, we);
1397
+ ce(this, we, t);
1398
+ }
1399
+ /**
1400
+ * @param {Element} element
1401
+ * @param {(entry: ResizeObserverEntry) => any} listener
1402
+ */
1403
+ observe(t, r) {
1404
+ var i = y(this, G).get(t) || /* @__PURE__ */ new Set();
1405
+ return i.add(r), y(this, G).set(t, i), _t(this, ke, Zt).call(this).observe(t, y(this, we)), () => {
1406
+ var n = y(this, G).get(t);
1407
+ n.delete(r), n.size === 0 && (y(this, G).delete(t), y(this, ae).unobserve(t));
1408
+ };
1409
+ }
1410
+ };
1411
+ G = new WeakMap(), ae = new WeakMap(), we = new WeakMap(), ke = new WeakSet(), Zt = function() {
1412
+ return y(this, ae) ?? ce(this, ae, new ResizeObserver(
1413
+ /** @param {any} entries */
1414
+ (t) => {
1415
+ for (var r of t) {
1416
+ Re.entries.set(r.target, r);
1417
+ for (var i of y(this, G).get(r.target) || [])
1418
+ i(r);
1419
+ }
1420
+ }
1421
+ ));
1422
+ }, /** @static */
1423
+ M(Re, "entries", /* @__PURE__ */ new WeakMap());
1424
+ let ge = Re;
1425
+ var Oi = /* @__PURE__ */ new ge({
1426
+ box: "content-box"
1427
+ }), Qt = /* @__PURE__ */ new ge({
1428
+ box: "border-box"
1429
+ }), Li = /* @__PURE__ */ new ge({
1430
+ box: "device-pixel-content-box"
1431
+ });
1432
+ function Wn(e, t, r) {
1433
+ var i = t === "contentRect" || t === "contentBoxSize" ? Oi : t === "borderBoxSize" ? Qt : Li, n = i.observe(
1434
+ e,
1435
+ /** @param {any} entry */
1436
+ (a) => r(a[t])
1437
+ );
1438
+ Q(n);
1439
+ }
1440
+ function Xn(e, t, r) {
1441
+ var i = Qt.observe(e, () => r(e[t]));
1442
+ z(() => (R(() => r(e[t])), i));
1443
+ }
1444
+ function It(e, t) {
1445
+ return e === t || (e == null ? void 0 : e[ie]) === t;
1446
+ }
1447
+ function Jn(e = {}, t, r, i) {
1448
+ return z(() => {
1449
+ var n, a;
1450
+ return C(() => {
1451
+ n = a, a = (i == null ? void 0 : i()) || [], R(() => {
1452
+ e !== r(...a) && (t(e, ...a), n && It(r(...n), e) && t(null, ...n));
1453
+ });
1454
+ }), () => {
1455
+ W(() => {
1456
+ a && It(r(...a), e) && t(null, ...a);
1457
+ });
1458
+ };
1459
+ }), e;
1460
+ }
1461
+ function Zn(e, t, r, i = r) {
1462
+ t.addEventListener("input", () => {
1463
+ i(t[e]);
1464
+ }), C(() => {
1465
+ var n = r();
1466
+ if (t[e] !== n)
1467
+ if (n == null) {
1468
+ var a = t[e];
1469
+ i(a);
1470
+ } else
1471
+ t[e] = n + "";
1472
+ });
1473
+ }
1474
+ function Qn(e, t, r, i, n) {
1475
+ var a = () => {
1476
+ i(r[e]);
1477
+ };
1478
+ r.addEventListener(t, a), n ? C(() => {
1479
+ r[e] = n();
1480
+ }) : a(), (r === document.body || r === window || r === document) && Q(() => {
1481
+ r.removeEventListener(t, a);
1482
+ });
1483
+ }
1484
+ function jn(e, t) {
1485
+ O(e, ["focus", "blur"], () => {
1486
+ t(e === document.activeElement);
1487
+ });
1488
+ }
1489
+ function ea(e, t, r = t) {
1490
+ var i = e === "x", n = () => at(() => {
1491
+ a = !0, clearTimeout(s), s = setTimeout(f, 100), r(window[i ? "scrollX" : "scrollY"]);
1492
+ });
1493
+ addEventListener("scroll", n, {
1494
+ passive: !0
1495
+ });
1496
+ var a = !1, s, f = () => {
1497
+ a = !1;
1498
+ }, l = !0;
1499
+ C(() => {
1500
+ var u = t();
1501
+ l ? l = !1 : !a && u != null && (a = !0, clearTimeout(s), i ? scrollTo(u, window.scrollY) : scrollTo(window.scrollX, u), s = setTimeout(f, 100));
1502
+ }), z(n), Q(() => {
1503
+ removeEventListener("scroll", n);
1504
+ });
1505
+ }
1506
+ function ta(e, t) {
1507
+ O(window, ["resize"], () => at(() => t(window[e])));
1508
+ }
1509
+ function ra(e) {
1510
+ return function(...t) {
1511
+ var r = (
1512
+ /** @type {Event} */
1513
+ t[0]
1514
+ );
1515
+ r.isTrusted && (e == null || e.apply(this, t));
1516
+ };
1517
+ }
1518
+ function ia(e) {
1519
+ return function(...t) {
1520
+ var r = (
1521
+ /** @type {Event} */
1522
+ t[0]
1523
+ );
1524
+ r.target === this && (e == null || e.apply(this, t));
1525
+ };
1526
+ }
1527
+ function na(e) {
1528
+ return function(...t) {
1529
+ var r = (
1530
+ /** @type {Event} */
1531
+ t[0]
1532
+ );
1533
+ return r.stopPropagation(), e == null ? void 0 : e.apply(this, t);
1534
+ };
1535
+ }
1536
+ function aa(e) {
1537
+ var t = !1;
1538
+ return function(...r) {
1539
+ if (!t)
1540
+ return t = !0, e == null ? void 0 : e.apply(this, r);
1541
+ };
1542
+ }
1543
+ function sa(e) {
1544
+ return function(...t) {
1545
+ var r = (
1546
+ /** @type {Event} */
1547
+ t[0]
1548
+ );
1549
+ return r.stopImmediatePropagation(), e == null ? void 0 : e.apply(this, t);
1550
+ };
1551
+ }
1552
+ function fa(e) {
1553
+ return function(...t) {
1554
+ var r = (
1555
+ /** @type {Event} */
1556
+ t[0]
1557
+ );
1558
+ return r.preventDefault(), e == null ? void 0 : e.apply(this, t);
1559
+ };
1560
+ }
1561
+ function ua(e = !1) {
1562
+ const t = (
1563
+ /** @type {ComponentContextLegacy} */
1564
+ se
1565
+ ), r = t.l.u;
1566
+ if (!r) return;
1567
+ let i = () => Ft(t.s);
1568
+ if (e) {
1569
+ let n = 0, a = (
1570
+ /** @type {Record<string, any>} */
1571
+ {}
1572
+ );
1573
+ const s = Yt(() => {
1574
+ let f = !1;
1575
+ const l = t.s;
1576
+ for (const u in l)
1577
+ l[u] !== a[u] && (a[u] = l[u], f = !0);
1578
+ return f && n++, n;
1579
+ });
1580
+ i = () => T(s);
1581
+ }
1582
+ r.b.length && Vr(() => {
1583
+ kt(t, i), pt(r.b);
1584
+ }), $t(() => {
1585
+ const n = R(() => r.m.map(Gr));
1586
+ return () => {
1587
+ for (const a of n)
1588
+ typeof a == "function" && a();
1589
+ };
1590
+ }), r.a.length && $t(() => {
1591
+ kt(t, i), pt(r.a);
1592
+ });
1593
+ }
1594
+ function kt(e, t) {
1595
+ if (e.l.s)
1596
+ for (const r of e.l.s) T(r);
1597
+ t();
1598
+ }
1599
+ function la(e) {
1600
+ var t = re(0);
1601
+ return function() {
1602
+ return arguments.length === 1 ? (De(t, T(t) + 1), arguments[0]) : (T(t), e());
1603
+ };
1604
+ }
1605
+ function oa(e, t) {
1606
+ var a;
1607
+ var r = (
1608
+ /** @type {Record<string, Function[] | Function>} */
1609
+ (a = e.$$events) == null ? void 0 : a[t.type]
1610
+ ), i = it(r) ? r.slice() : r == null ? [] : [r];
1611
+ for (var n of i)
1612
+ n.call(this, t);
1613
+ }
1614
+ function ca(e, t, r) {
1615
+ var i;
1616
+ e.$$events || (e.$$events = {}), (i = e.$$events)[t] || (i[t] = []), e.$$events[t].push(r);
1617
+ }
1618
+ function da(e) {
1619
+ for (var t in e)
1620
+ t in this && (this[t] = e[t]);
1621
+ }
1622
+ let _e = !1, et = Symbol();
1623
+ function va(e, t, r) {
1624
+ const i = r[t] ?? (r[t] = {
1625
+ store: null,
1626
+ source: Me(void 0),
1627
+ unsubscribe: V
1628
+ });
1629
+ if (i.store !== e && !(et in r))
1630
+ if (i.unsubscribe(), i.store = e ?? null, e == null)
1631
+ i.source.v = void 0, i.unsubscribe = V;
1632
+ else {
1633
+ var n = !0;
1634
+ i.unsubscribe = vi(e, (a) => {
1635
+ n ? i.source.v = a : De(i.source, a);
1636
+ }), n = !1;
1637
+ }
1638
+ return e && et in r ? _i(e) : T(i.source);
1639
+ }
1640
+ function _a(e, t, r) {
1641
+ let i = r[t];
1642
+ return i && i.store !== e && (i.unsubscribe(), i.unsubscribe = V), e;
1643
+ }
1644
+ function Pi(e, t) {
1645
+ return e.set(t), t;
1646
+ }
1647
+ function ha(e, t) {
1648
+ var r = e[t];
1649
+ r.store !== null && Pi(r.store, r.source.v);
1650
+ }
1651
+ function ba() {
1652
+ const e = {};
1653
+ function t() {
1654
+ Q(() => {
1655
+ for (var r in e)
1656
+ e[r].unsubscribe();
1657
+ Ne(e, et, {
1658
+ enumerable: !1,
1659
+ value: !0
1660
+ });
1661
+ });
1662
+ }
1663
+ return [e, t];
1664
+ }
1665
+ function $a(e, t, r) {
1666
+ return e.set(r), t;
1667
+ }
1668
+ function pa(e, t, r = 1) {
1669
+ return e.set(t + r), t;
1670
+ }
1671
+ function ga(e, t, r = 1) {
1672
+ const i = t + r;
1673
+ return e.set(i), i;
1674
+ }
1675
+ function wa() {
1676
+ _e = !0;
1677
+ }
1678
+ function jt(e) {
1679
+ var t = _e;
1680
+ try {
1681
+ return _e = !1, [e(), _e];
1682
+ } finally {
1683
+ _e = t;
1684
+ }
1685
+ }
1686
+ function ma(e, t = 1) {
1687
+ const r = e();
1688
+ return e(r + t), r;
1689
+ }
1690
+ function Aa(e, t = 1) {
1691
+ const r = e() + t;
1692
+ return e(r), r;
1693
+ }
1694
+ const Mi = {
1695
+ get(e, t) {
1696
+ if (!e.exclude.includes(t))
1697
+ return e.props[t];
1698
+ },
1699
+ set(e, t) {
1700
+ return !1;
1701
+ },
1702
+ getOwnPropertyDescriptor(e, t) {
1703
+ if (!e.exclude.includes(t) && t in e.props)
1704
+ return {
1705
+ enumerable: !0,
1706
+ configurable: !0,
1707
+ value: e.props[t]
1708
+ };
1709
+ },
1710
+ has(e, t) {
1711
+ return e.exclude.includes(t) ? !1 : t in e.props;
1712
+ },
1713
+ ownKeys(e) {
1714
+ return Reflect.ownKeys(e.props).filter((t) => !e.exclude.includes(t));
1715
+ }
1716
+ };
1717
+ // @__NO_SIDE_EFFECTS__
1718
+ function Ea(e, t, r) {
1719
+ return new Proxy(
1720
+ { props: e, exclude: t },
1721
+ Mi
1722
+ );
1723
+ }
1724
+ const Di = {
1725
+ get(e, t) {
1726
+ if (!e.exclude.includes(t))
1727
+ return T(e.version), t in e.special ? e.special[t]() : e.props[t];
1728
+ },
1729
+ set(e, t, r) {
1730
+ return t in e.special || (e.special[t] = xi(
1731
+ {
1732
+ get [t]() {
1733
+ return e.props[t];
1734
+ }
1735
+ },
1736
+ /** @type {string} */
1737
+ t,
1738
+ Vt
1739
+ )), e.special[t](r), gt(e.version), !0;
1740
+ },
1741
+ getOwnPropertyDescriptor(e, t) {
1742
+ if (!e.exclude.includes(t) && t in e.props)
1743
+ return {
1744
+ enumerable: !0,
1745
+ configurable: !0,
1746
+ value: e.props[t]
1747
+ };
1748
+ },
1749
+ deleteProperty(e, t) {
1750
+ return e.exclude.includes(t) || (e.exclude.push(t), gt(e.version)), !0;
1751
+ },
1752
+ has(e, t) {
1753
+ return e.exclude.includes(t) ? !1 : t in e.props;
1754
+ },
1755
+ ownKeys(e) {
1756
+ return Reflect.ownKeys(e.props).filter((t) => !e.exclude.includes(t));
1757
+ }
1758
+ };
1759
+ function ya(e, t) {
1760
+ return new Proxy({ props: e, exclude: t, special: {}, version: re(0) }, Di);
1761
+ }
1762
+ const qi = {
1763
+ get(e, t) {
1764
+ let r = e.props.length;
1765
+ for (; r--; ) {
1766
+ let i = e.props[r];
1767
+ if (ne(i) && (i = i()), typeof i == "object" && i !== null && t in i) return i[t];
1768
+ }
1769
+ },
1770
+ set(e, t, r) {
1771
+ let i = e.props.length;
1772
+ for (; i--; ) {
1773
+ let n = e.props[i];
1774
+ ne(n) && (n = n());
1775
+ const a = fe(n, t);
1776
+ if (a && a.set)
1777
+ return a.set(r), !0;
1778
+ }
1779
+ return !1;
1780
+ },
1781
+ getOwnPropertyDescriptor(e, t) {
1782
+ let r = e.props.length;
1783
+ for (; r--; ) {
1784
+ let i = e.props[r];
1785
+ if (ne(i) && (i = i()), typeof i == "object" && i !== null && t in i) {
1786
+ const n = fe(i, t);
1787
+ return n && !n.configurable && (n.configurable = !0), n;
1788
+ }
1789
+ }
1790
+ },
1791
+ has(e, t) {
1792
+ if (t === ie || t === Pe) return !1;
1793
+ for (let r of e.props)
1794
+ if (ne(r) && (r = r()), r != null && t in r) return !0;
1795
+ return !1;
1796
+ },
1797
+ ownKeys(e) {
1798
+ const t = [];
1799
+ for (let r of e.props) {
1800
+ ne(r) && (r = r());
1801
+ for (const i in r)
1802
+ t.includes(i) || t.push(i);
1803
+ }
1804
+ return t;
1805
+ }
1806
+ };
1807
+ function Sa(...e) {
1808
+ return new Proxy({ props: e }, qi);
1809
+ }
1810
+ function Rt(e) {
1811
+ var t;
1812
+ return ((t = e.ctx) == null ? void 0 : t.d) ?? !1;
1813
+ }
1814
+ function xi(e, t, r, i) {
1815
+ var I;
1816
+ var n = (r & Zr) !== 0, a = !0, s = (r & Jr) !== 0, f = (r & Qr) !== 0, l = !1, u;
1817
+ s ? [u, l] = jt(() => (
1818
+ /** @type {V} */
1819
+ e[t]
1820
+ )) : u = /** @type {V} */
1821
+ e[t];
1822
+ var c = ie in e || Pe in e, d = s && (((I = fe(e, t)) == null ? void 0 : I.set) ?? (c && t in e && ((A) => e[t] = A))) || void 0, o = (
1823
+ /** @type {V} */
1824
+ i
1825
+ ), v = !0, h = !1, w = () => (h = !0, v && (v = !1, f ? o = R(
1826
+ /** @type {() => V} */
1827
+ i
1828
+ ) : o = /** @type {V} */
1829
+ i), o);
1830
+ u === void 0 && i !== void 0 && (d && a && Kr(), u = w(), d && d(u));
1831
+ var $;
1832
+ if ($ = () => {
1833
+ var A = (
1834
+ /** @type {V} */
1835
+ e[t]
1836
+ );
1837
+ return A === void 0 ? w() : (v = !0, h = !1, A);
1838
+ }, (r & Vt) === 0)
1839
+ return $;
1840
+ if (d) {
1841
+ var m = e.$$legacy;
1842
+ return function(A, S) {
1843
+ return arguments.length > 0 ? ((!S || m || l) && d(S ? $() : A), A) : $();
1844
+ };
1845
+ }
1846
+ var E = !1, b = !1, _ = Me(u), p = Yt(() => {
1847
+ var A = $(), S = T(_);
1848
+ return E ? (E = !1, b = !0, S) : (b = !1, _.v = A);
1849
+ });
1850
+ return s && T(p), n || (p.equals = Wr), function(A, S) {
1851
+ if (jr !== null && (E = b, $(), T(_)), arguments.length > 0) {
1852
+ const L = S ? T(p) : s ? Xr(A) : A;
1853
+ if (!p.equals(L)) {
1854
+ if (E = !0, De(_, L), h && o !== void 0 && (o = L), Rt(p))
1855
+ return A;
1856
+ R(() => T(p));
1857
+ }
1858
+ return A;
1859
+ }
1860
+ return Rt(p) ? p.v : T(p);
1861
+ };
1862
+ }
1863
+ function Ot(e, t) {
1864
+ var r = U, i = nt, n = se;
1865
+ X(e), J(e), Te(e.ctx);
1866
+ try {
1867
+ t();
1868
+ } finally {
1869
+ X(r), J(i), Te(n);
1870
+ }
1871
+ }
1872
+ function Ta(e, t, r) {
1873
+ var i = e, n;
1874
+ Z(() => {
1875
+ var a = (
1876
+ /** @type {Effect} */
1877
+ U
1878
+ ), s = N, f = !1;
1879
+ a.fn = (l) => {
1880
+ var u = t.onerror;
1881
+ let c = t.failed;
1882
+ if (!u && !c || f)
1883
+ throw l;
1884
+ var d = () => {
1885
+ H(n), Ot(a, () => {
1886
+ f = !1, n = k(() => r(i)), Ue();
1887
+ });
1888
+ };
1889
+ u == null || u(l, d), n ? Le(n) : g && (q(s), ti(), q($e())), c && W(() => {
1890
+ Ot(a, () => {
1891
+ f = !0;
1892
+ try {
1893
+ n = k(() => {
1894
+ c(
1895
+ i,
1896
+ () => l,
1897
+ () => d
1898
+ );
1899
+ });
1900
+ } catch (o) {
1901
+ ri(o, a, null, a.ctx);
1902
+ }
1903
+ Ue(), f = !1;
1904
+ });
1905
+ });
1906
+ }, g && x(), n = k(() => r(i)), Ue();
1907
+ }, le | ei), g && (i = N);
1908
+ }
1909
+ function Na(e, t) {
1910
+ C(() => {
1911
+ const r = /* @__PURE__ */ new Map(), i = e(), n = it(i) ? i : i == null ? [] : Array.from(i), a = n.length;
1912
+ for (let s = 0; s < a; s++) {
1913
+ const f = t(n[s], s);
1914
+ if (r.has(f)) {
1915
+ String(r.get(f));
1916
+ let l = String(f);
1917
+ l.startsWith("[object ") && (l = null), ii();
1918
+ }
1919
+ r.set(f, s);
1920
+ }
1921
+ });
1922
+ }
1923
+ function Ca(e, t, r, i, n) {
1924
+ var s;
1925
+ var a = !1;
1926
+ (s = ni) == null || s[B], C(() => {
1927
+ if (!a) {
1928
+ var [f, l] = jt(t);
1929
+ if (!l) {
1930
+ var u = r(), c = !1, d = C(() => {
1931
+ c || f[u];
1932
+ });
1933
+ c = !0, d.deps === null && (ai(), a = !0);
1934
+ }
1935
+ }
1936
+ });
1937
+ }
1938
+ function Bi(e) {
1939
+ return new Hi(e);
1940
+ }
1941
+ var F, D;
1942
+ class Hi {
1943
+ /**
1944
+ * @param {ComponentConstructorOptions & {
1945
+ * component: any;
1946
+ * }} options
1947
+ */
1948
+ constructor(t) {
1949
+ /** @type {any} */
1950
+ j(this, F);
1951
+ /** @type {Record<string, any>} */
1952
+ j(this, D);
1953
+ var a;
1954
+ var r = /* @__PURE__ */ new Map(), i = (s, f) => {
1955
+ var l = Me(f);
1956
+ return r.set(s, l), l;
1957
+ };
1958
+ const n = new Proxy(
1959
+ { ...t.props || {}, $$events: {} },
1960
+ {
1961
+ get(s, f) {
1962
+ return T(r.get(f) ?? i(f, Reflect.get(s, f)));
1963
+ },
1964
+ has(s, f) {
1965
+ return f === Pe ? !0 : (T(r.get(f) ?? i(f, Reflect.get(s, f))), Reflect.has(s, f));
1966
+ },
1967
+ set(s, f, l) {
1968
+ return De(r.get(f) ?? i(f, l), l), Reflect.set(s, f, l);
1969
+ }
1970
+ }
1971
+ );
1972
+ ce(this, D, (t.hydrate ? si : fi)(t.component, {
1973
+ target: t.target,
1974
+ anchor: t.anchor,
1975
+ props: n,
1976
+ context: t.context,
1977
+ intro: t.intro ?? !1,
1978
+ recover: t.recover
1979
+ })), (!((a = t == null ? void 0 : t.props) != null && a.$$host) || t.sync === !1) && qt(), ce(this, F, n.$$events);
1980
+ for (const s of Object.keys(y(this, D)))
1981
+ s === "$set" || s === "$destroy" || s === "$on" || Ne(this, s, {
1982
+ get() {
1983
+ return y(this, D)[s];
1984
+ },
1985
+ /** @param {any} value */
1986
+ set(f) {
1987
+ y(this, D)[s] = f;
1988
+ },
1989
+ enumerable: !0
1990
+ });
1991
+ y(this, D).$set = /** @param {Record<string, any>} next */
1992
+ (s) => {
1993
+ Object.assign(n, s);
1994
+ }, y(this, D).$destroy = () => {
1995
+ ui(y(this, D));
1996
+ };
1997
+ }
1998
+ /** @param {Record<string, any>} props */
1999
+ $set(t) {
2000
+ y(this, D).$set(t);
2001
+ }
2002
+ /**
2003
+ * @param {string} event
2004
+ * @param {(...args: any[]) => any} callback
2005
+ * @returns {any}
2006
+ */
2007
+ $on(t, r) {
2008
+ y(this, F)[t] = y(this, F)[t] || [];
2009
+ const i = (...n) => r.call(this, ...n);
2010
+ return y(this, F)[t].push(i), () => {
2011
+ y(this, F)[t] = y(this, F)[t].filter(
2012
+ /** @param {any} fn */
2013
+ (n) => n !== i
2014
+ );
2015
+ };
2016
+ }
2017
+ $destroy() {
2018
+ y(this, D).$destroy();
2019
+ }
2020
+ }
2021
+ F = new WeakMap(), D = new WeakMap();
2022
+ let er;
2023
+ typeof HTMLElement == "function" && (er = class extends HTMLElement {
2024
+ /**
2025
+ * @param {*} $$componentCtor
2026
+ * @param {*} $$slots
2027
+ * @param {*} use_shadow_dom
2028
+ */
2029
+ constructor(t, r, i) {
2030
+ super();
2031
+ /** The Svelte component constructor */
2032
+ M(this, "$$ctor");
2033
+ /** Slots */
2034
+ M(this, "$$s");
2035
+ /** @type {any} The Svelte component instance */
2036
+ M(this, "$$c");
2037
+ /** Whether or not the custom element is connected */
2038
+ M(this, "$$cn", !1);
2039
+ /** @type {Record<string, any>} Component props data */
2040
+ M(this, "$$d", {});
2041
+ /** `true` if currently in the process of reflecting component props back to attributes */
2042
+ M(this, "$$r", !1);
2043
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
2044
+ M(this, "$$p_d", {});
2045
+ /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
2046
+ M(this, "$$l", {});
2047
+ /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
2048
+ M(this, "$$l_u", /* @__PURE__ */ new Map());
2049
+ /** @type {any} The managed render effect for reflecting attributes */
2050
+ M(this, "$$me");
2051
+ this.$$ctor = t, this.$$s = r, i && this.attachShadow({ mode: "open" });
2052
+ }
2053
+ /**
2054
+ * @param {string} type
2055
+ * @param {EventListenerOrEventListenerObject} listener
2056
+ * @param {boolean | AddEventListenerOptions} [options]
2057
+ */
2058
+ addEventListener(t, r, i) {
2059
+ if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(r), this.$$c) {
2060
+ const n = this.$$c.$on(t, r);
2061
+ this.$$l_u.set(r, n);
2062
+ }
2063
+ super.addEventListener(t, r, i);
2064
+ }
2065
+ /**
2066
+ * @param {string} type
2067
+ * @param {EventListenerOrEventListenerObject} listener
2068
+ * @param {boolean | AddEventListenerOptions} [options]
2069
+ */
2070
+ removeEventListener(t, r, i) {
2071
+ if (super.removeEventListener(t, r, i), this.$$c) {
2072
+ const n = this.$$l_u.get(r);
2073
+ n && (n(), this.$$l_u.delete(r));
2074
+ }
2075
+ }
2076
+ async connectedCallback() {
2077
+ if (this.$$cn = !0, !this.$$c) {
2078
+ let t = function(n) {
2079
+ return (a) => {
2080
+ const s = document.createElement("slot");
2081
+ n !== "default" && (s.name = n), oi(a, s);
2082
+ };
2083
+ };
2084
+ if (await Promise.resolve(), !this.$$cn || this.$$c)
2085
+ return;
2086
+ const r = {}, i = zi(this);
2087
+ for (const n of this.$$s)
2088
+ n in i && (n === "default" && !this.$$d.children ? (this.$$d.children = t(n), r.default = !0) : r[n] = t(n));
2089
+ for (const n of this.attributes) {
2090
+ const a = this.$$g_p(n.name);
2091
+ a in this.$$d || (this.$$d[a] = ye(a, n.value, this.$$p_d, "toProp"));
2092
+ }
2093
+ for (const n in this.$$p_d)
2094
+ !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
2095
+ this.$$c = Bi({
2096
+ component: this.$$ctor,
2097
+ target: this.shadowRoot || this,
2098
+ props: {
2099
+ ...this.$$d,
2100
+ $$slots: r,
2101
+ $$host: this
2102
+ }
2103
+ }), this.$$me = li(() => {
2104
+ C(() => {
2105
+ var n;
2106
+ this.$$r = !0;
2107
+ for (const a of Ce(this.$$c)) {
2108
+ if (!((n = this.$$p_d[a]) != null && n.reflect)) continue;
2109
+ this.$$d[a] = this.$$c[a];
2110
+ const s = ye(
2111
+ a,
2112
+ this.$$d[a],
2113
+ this.$$p_d,
2114
+ "toAttribute"
2115
+ );
2116
+ s == null ? this.removeAttribute(this.$$p_d[a].attribute || a) : this.setAttribute(this.$$p_d[a].attribute || a, s);
2117
+ }
2118
+ this.$$r = !1;
2119
+ });
2120
+ });
2121
+ for (const n in this.$$l)
2122
+ for (const a of this.$$l[n]) {
2123
+ const s = this.$$c.$on(n, a);
2124
+ this.$$l_u.set(a, s);
2125
+ }
2126
+ this.$$l = {};
2127
+ }
2128
+ }
2129
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
2130
+ // and setting attributes through setAttribute etc, this is helpful
2131
+ /**
2132
+ * @param {string} attr
2133
+ * @param {string} _oldValue
2134
+ * @param {string} newValue
2135
+ */
2136
+ attributeChangedCallback(t, r, i) {
2137
+ var n;
2138
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = ye(t, i, this.$$p_d, "toProp"), (n = this.$$c) == null || n.$set({ [t]: this.$$d[t] }));
2139
+ }
2140
+ disconnectedCallback() {
2141
+ this.$$cn = !1, Promise.resolve().then(() => {
2142
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
2143
+ });
2144
+ }
2145
+ /**
2146
+ * @param {string} attribute_name
2147
+ */
2148
+ $$g_p(t) {
2149
+ return Ce(this.$$p_d).find(
2150
+ (r) => this.$$p_d[r].attribute === t || !this.$$p_d[r].attribute && r.toLowerCase() === t
2151
+ ) || t;
2152
+ }
2153
+ });
2154
+ function ye(e, t, r, i) {
2155
+ var a;
2156
+ const n = (a = r[e]) == null ? void 0 : a.type;
2157
+ if (t = n === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !r[e])
2158
+ return t;
2159
+ if (i === "toAttribute")
2160
+ switch (n) {
2161
+ case "Object":
2162
+ case "Array":
2163
+ return t == null ? null : JSON.stringify(t);
2164
+ case "Boolean":
2165
+ return t ? "" : null;
2166
+ case "Number":
2167
+ return t ?? null;
2168
+ default:
2169
+ return t;
2170
+ }
2171
+ else
2172
+ switch (n) {
2173
+ case "Object":
2174
+ case "Array":
2175
+ return t && JSON.parse(t);
2176
+ case "Boolean":
2177
+ return t;
2178
+ // conversion already handled above
2179
+ case "Number":
2180
+ return t != null ? +t : t;
2181
+ default:
2182
+ return t;
2183
+ }
2184
+ }
2185
+ function zi(e) {
2186
+ const t = {};
2187
+ return e.childNodes.forEach((r) => {
2188
+ t[
2189
+ /** @type {Element} node */
2190
+ r.slot || "default"
2191
+ ] = !0;
2192
+ }), t;
2193
+ }
2194
+ function Ia(e, t, r, i, n, a) {
2195
+ let s = class extends er {
2196
+ constructor() {
2197
+ super(e, r, n), this.$$p_d = t;
2198
+ }
2199
+ static get observedAttributes() {
2200
+ return Ce(t).map(
2201
+ (f) => (t[f].attribute || f).toLowerCase()
2202
+ );
2203
+ }
2204
+ };
2205
+ return Ce(t).forEach((f) => {
2206
+ Ne(s.prototype, f, {
2207
+ get() {
2208
+ return this.$$c && f in this.$$c ? this.$$c[f] : this.$$d[f];
2209
+ },
2210
+ set(l) {
2211
+ var d;
2212
+ l = ye(f, l, t), this.$$d[f] = l;
2213
+ var u = this.$$c;
2214
+ if (u) {
2215
+ var c = (d = fe(u, f)) == null ? void 0 : d.get;
2216
+ c ? u[f] = l : u.$set({ [f]: l });
2217
+ }
2218
+ }
2219
+ });
2220
+ }), i.forEach((f) => {
2221
+ Ne(s.prototype, f, {
2222
+ get() {
2223
+ var l;
2224
+ return (l = this.$$c) == null ? void 0 : l[f];
2225
+ }
2226
+ });
2227
+ }), a && (s = a(s)), e.element = /** @type {any} */
2228
+ s, s;
2229
+ }
2230
+ function ka(e, ...t) {
2231
+ return R(() => {
2232
+ try {
2233
+ let r = !1;
2234
+ const i = [];
2235
+ for (const n of t)
2236
+ n && typeof n == "object" && ie in n ? (i.push(Dt(n, !0)), r = !0) : i.push(n);
2237
+ r && (ci(e), console.log("%c[snapshot]", "color: grey", ...i));
2238
+ } catch {
2239
+ }
2240
+ }), t;
2241
+ }
2242
+ export {
2243
+ de as CLASS,
2244
+ B as FILENAME,
2245
+ ar as HMR,
2246
+ yr as NAMESPACE_SVG,
2247
+ ve as STYLE,
2248
+ $n as action,
2249
+ ca as add_legacy_event_listener,
2250
+ Zi as add_locations,
2251
+ Nn as animation,
2252
+ oi as append,
2253
+ bn as append_styles,
2254
+ La as apply,
2255
+ Gi as assign,
2256
+ Ki as assign_and,
2257
+ Xi as assign_nullish,
2258
+ Wi as assign_or,
2259
+ pn as attr,
2260
+ Rr as autofocus,
2261
+ an as await,
2262
+ In as bind_active_element,
2263
+ Mn as bind_buffered,
2264
+ On as bind_checked,
2265
+ Zn as bind_content_editable,
2266
+ Pn as bind_current_time,
2267
+ Xn as bind_element_size,
2268
+ Bn as bind_ended,
2269
+ Ln as bind_files,
2270
+ jn as bind_focused,
2271
+ Rn as bind_group,
2272
+ Yn as bind_muted,
2273
+ Vn as bind_online,
2274
+ Fn as bind_paused,
2275
+ zn as bind_playback_rate,
2276
+ qn as bind_played,
2277
+ Gn as bind_prop,
2278
+ Qn as bind_property,
2279
+ Hn as bind_ready_state,
2280
+ Wn as bind_resize_observer,
2281
+ Dn as bind_seekable,
2282
+ xn as bind_seeking,
2283
+ Kn as bind_select_value,
2284
+ Jn as bind_this,
2285
+ kn as bind_value,
2286
+ Un as bind_volume,
2287
+ ea as bind_window_scroll,
2288
+ ta as bind_window_size,
2289
+ Ta as boundary,
2290
+ oa as bubble_event,
2291
+ en as check_target,
2292
+ Pa as child,
2293
+ Ji as cleanup_styles,
2294
+ Ai as clsx,
2295
+ Ma as comment,
2296
+ _n as component,
2297
+ Ia as create_custom_element,
2298
+ ji as create_ownership_validator,
2299
+ un as css_props,
2300
+ Da as deep_read,
2301
+ Ft as deep_read_state,
2302
+ kr as delegate,
2303
+ qa as derived,
2304
+ vr as derived_safe_equal,
2305
+ xa as document,
2306
+ on as each,
2307
+ z as effect,
2308
+ li as effect_root,
2309
+ Ba as effect_tracking,
2310
+ hn as element,
2311
+ Ha as equals,
2312
+ za as event,
2313
+ Fa as exclude_from_object,
2314
+ Ua as fallback,
2315
+ Ya as first_child,
2316
+ qt as flush,
2317
+ T as get,
2318
+ Va as head,
2319
+ Qi as hmr,
2320
+ cn as html,
2321
+ Ga as hydrate_template,
2322
+ sn as if,
2323
+ ln as index,
2324
+ ua as init,
2325
+ ki as init_select,
2326
+ rn as inspect,
2327
+ Ka as invalid_default_snippet,
2328
+ Wa as invalidate_inner_signals,
2329
+ ha as invalidate_store,
2330
+ fn as key,
2331
+ tn as legacy_api,
2332
+ Xa as legacy_pre_effect,
2333
+ Ja as legacy_pre_effect_reset,
2334
+ ya as legacy_rest_props,
2335
+ ka as log_if_contains_state,
2336
+ wa as mark_store_binding,
2337
+ Za as mathml_template,
2338
+ Me as mutable_source,
2339
+ Qa as mutate,
2340
+ ti as next,
2341
+ V as noop,
2342
+ ja as ns_template,
2343
+ aa as once,
2344
+ es as pop,
2345
+ fa as preventDefault,
2346
+ ts as prevent_snippet_stringification,
2347
+ xi as prop,
2348
+ rs as props_id,
2349
+ Xr as proxy,
2350
+ is as push,
2351
+ Ts as raf,
2352
+ la as reactive_import,
2353
+ gn as remove_input_defaults,
2354
+ ns as remove_textarea_child,
2355
+ C as render_effect,
2356
+ as as replay_events,
2357
+ ss as reset,
2358
+ Ea as rest_props,
2359
+ fs as safe_get,
2360
+ vn as sanitize_slots,
2361
+ je as select_option,
2362
+ ia as self,
2363
+ De as set,
2364
+ pe as set_attribute,
2365
+ Tn as set_attributes,
2366
+ mn as set_checked,
2367
+ Si as set_class,
2368
+ Sn as set_custom_element_data,
2369
+ An as set_default_checked,
2370
+ En as set_default_value,
2371
+ Ni as set_selected,
2372
+ Ti as set_style,
2373
+ us as set_text,
2374
+ wn as set_value,
2375
+ yn as set_xlink_attribute,
2376
+ ba as setup_stores,
2377
+ ls as sibling,
2378
+ dn as slot,
2379
+ Dt as snapshot,
2380
+ os as snippet,
2381
+ Sa as spread_props,
2382
+ cs as state,
2383
+ sa as stopImmediatePropagation,
2384
+ na as stopPropagation,
2385
+ va as store_get,
2386
+ $a as store_mutate,
2387
+ Pi as store_set,
2388
+ _a as store_unsub,
2389
+ ds as strict_equals,
2390
+ vs as svg_template_with_script,
2391
+ _s as template,
2392
+ gr as template_effect,
2393
+ hs as template_with_script,
2394
+ bs as text,
2395
+ $s as tick,
2396
+ ps as trace,
2397
+ Cn as transition,
2398
+ ra as trusted,
2399
+ R as untrack,
2400
+ gt as update,
2401
+ da as update_legacy_props,
2402
+ gs as update_pre,
2403
+ Aa as update_pre_prop,
2404
+ ga as update_pre_store,
2405
+ ma as update_prop,
2406
+ pa as update_store,
2407
+ $t as user_effect,
2408
+ Vr as user_pre_effect,
2409
+ Ca as validate_binding,
2410
+ ws as validate_dynamic_element_tag,
2411
+ Na as validate_each_keys,
2412
+ nn as validate_snippet_args,
2413
+ ms as validate_store,
2414
+ As as validate_void_dynamic_element,
2415
+ Es as window,
2416
+ ys as wrap_snippet
2417
+ };