@vezham/start 0.0.1-poc-test

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,2278 @@
1
+ var dt = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var ht = (e, t, n) => t.has(e) || dt("Cannot " + n);
5
+ var d = (e, t, n) => (ht(e, t, "read from private field"), n ? n.call(e) : t.get(e)), v = (e, t, n) => t.has(e) ? dt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), p = (e, t, n, r) => (ht(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
6
+ import * as k from "react";
7
+ import { u as Ct, o as Tt } from "./index-C6MRz9Z4.mjs";
8
+ import { jsx as xt } from "react/jsx-runtime";
9
+ var h = {
10
+ context: void 0,
11
+ registry: void 0,
12
+ effects: void 0,
13
+ done: !1,
14
+ getContextId() {
15
+ return gt(this.context.count);
16
+ },
17
+ getNextContextId() {
18
+ return gt(this.context.count++);
19
+ }
20
+ };
21
+ function gt(e) {
22
+ const t = String(e), n = t.length - 1;
23
+ return h.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
24
+ }
25
+ function he(e) {
26
+ h.context = e;
27
+ }
28
+ var un = (e, t) => e === t, $e = Symbol("solid-proxy"), Nt = typeof Proxy == "function", kt = Symbol("solid-track"), Be = {
29
+ equals: un
30
+ }, Pt = Vt, $ = 1, je = 2, It = {
31
+ owned: null,
32
+ cleanups: null,
33
+ context: null,
34
+ owner: null
35
+ }, We = {}, m = null, Ye = null, cn = null, w = null, x = null, _ = null, Ke = 0;
36
+ function K(e, t) {
37
+ const n = w, r = m, s = e.length === 0, i = t === void 0 ? r : t, o = s ? It : {
38
+ owned: null,
39
+ cleanups: null,
40
+ context: i ? i.context : null,
41
+ owner: i
42
+ }, l = s ? e : () => e(() => T(() => pe(o)));
43
+ m = o, w = null;
44
+ try {
45
+ return V(l, !0);
46
+ } finally {
47
+ w = n, m = r;
48
+ }
49
+ }
50
+ function A(e, t) {
51
+ t = t ? Object.assign({}, Be, t) : Be;
52
+ const n = {
53
+ value: e,
54
+ observers: null,
55
+ observerSlots: null,
56
+ comparator: t.equals || void 0
57
+ }, r = (s) => (typeof s == "function" && (s = s(n.value)), Lt(n, s));
58
+ return [Dt.bind(n), r];
59
+ }
60
+ function fn(e, t, n) {
61
+ const r = Qe(e, t, !0, $);
62
+ de(r);
63
+ }
64
+ function Q(e, t, n) {
65
+ const r = Qe(e, t, !1, $);
66
+ de(r);
67
+ }
68
+ function Rt(e, t, n) {
69
+ Pt = Sn;
70
+ const r = Qe(e, t, !1, $);
71
+ (!n || !n.render) && (r.user = !0), _ ? _.push(r) : de(r);
72
+ }
73
+ function P(e, t, n) {
74
+ n = n ? Object.assign({}, Be, n) : Be;
75
+ const r = Qe(e, t, !0, 0);
76
+ return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, de(r), Dt.bind(r);
77
+ }
78
+ function dn(e) {
79
+ return e && typeof e == "object" && "then" in e;
80
+ }
81
+ function hn(e, t, n) {
82
+ let r, s, i;
83
+ r = !0, s = e, i = {};
84
+ let o = null, l = We, a = null, u = !1, f = "initialValue" in i, c = typeof r == "function" && P(r);
85
+ const g = /* @__PURE__ */ new Set(), [y, S] = (i.storage || A)(i.initialValue), [C, B] = A(void 0), [U, M] = A(void 0, {
86
+ equals: !1
87
+ }), [I, D] = A(f ? "ready" : "unresolved");
88
+ h.context && (a = h.getNextContextId(), i.ssrLoadFrom === "initial" ? l = i.initialValue : h.load && h.has(a) && (l = h.load(a)));
89
+ function R(N, E, O, G) {
90
+ return o === N && (o = null, G !== void 0 && (f = !0), (N === l || E === l) && i.onHydrated && queueMicrotask(
91
+ () => i.onHydrated(G, {
92
+ value: E
93
+ })
94
+ ), l = We, Ge(E, O)), E;
95
+ }
96
+ function Ge(N, E) {
97
+ V(() => {
98
+ E === void 0 && S(() => N), D(E !== void 0 ? "errored" : f ? "ready" : "unresolved"), B(E);
99
+ for (const O of g.keys())
100
+ O.decrement();
101
+ g.clear();
102
+ }, !1);
103
+ }
104
+ function He() {
105
+ const N = vn, E = y(), O = C();
106
+ if (O !== void 0 && !o)
107
+ throw O;
108
+ return w && w.user, E;
109
+ }
110
+ function Xe(N = !0) {
111
+ if (N !== !1 && u)
112
+ return;
113
+ u = !1;
114
+ const E = c ? c() : r;
115
+ if (E == null || E === !1) {
116
+ R(o, T(y));
117
+ return;
118
+ }
119
+ const O = l !== We ? l : T(
120
+ () => s(E, {
121
+ value: y(),
122
+ refetching: N
123
+ })
124
+ );
125
+ return dn(O) ? (o = O, "value" in O ? (O.status === "success" ? R(o, O.value, void 0, E) : R(o, void 0, et(O.value), E), O) : (u = !0, queueMicrotask(() => u = !1), V(() => {
126
+ D(f ? "refreshing" : "pending"), M();
127
+ }, !1), O.then(
128
+ (G) => R(O, G, void 0, E),
129
+ (G) => R(O, void 0, et(G), E)
130
+ ))) : (R(o, O, void 0, E), O);
131
+ }
132
+ return Object.defineProperties(He, {
133
+ state: {
134
+ get: () => I()
135
+ },
136
+ error: {
137
+ get: () => C()
138
+ },
139
+ loading: {
140
+ get() {
141
+ const N = I();
142
+ return N === "pending" || N === "refreshing";
143
+ }
144
+ },
145
+ latest: {
146
+ get() {
147
+ if (!f)
148
+ return He();
149
+ const N = C();
150
+ if (N && !o)
151
+ throw N;
152
+ return y();
153
+ }
154
+ }
155
+ }), c ? fn(() => Xe(!1)) : Xe(!1), [
156
+ He,
157
+ {
158
+ refetch: Xe,
159
+ mutate: S
160
+ }
161
+ ];
162
+ }
163
+ function jr(e) {
164
+ return V(e, !1);
165
+ }
166
+ function T(e) {
167
+ if (w === null)
168
+ return e();
169
+ const t = w;
170
+ w = null;
171
+ try {
172
+ return e();
173
+ } finally {
174
+ w = t;
175
+ }
176
+ }
177
+ function Ur(e, t, n) {
178
+ const r = Array.isArray(e);
179
+ let s, i = n && n.defer;
180
+ return (o) => {
181
+ let l;
182
+ if (r) {
183
+ l = Array(e.length);
184
+ for (let u = 0; u < e.length; u++)
185
+ l[u] = e[u]();
186
+ } else
187
+ l = e();
188
+ if (i)
189
+ return i = !1, o;
190
+ const a = T(() => t(l, s, o));
191
+ return s = l, a;
192
+ };
193
+ }
194
+ function gn(e) {
195
+ Rt(() => T(e));
196
+ }
197
+ function me(e) {
198
+ return m === null || (m.cleanups === null ? m.cleanups = [e] : m.cleanups.push(e)), e;
199
+ }
200
+ function yt() {
201
+ return m;
202
+ }
203
+ function yn(e, t) {
204
+ const n = m, r = w;
205
+ m = e, w = null;
206
+ try {
207
+ return V(t, !0);
208
+ } catch (s) {
209
+ ft(s);
210
+ } finally {
211
+ m = n, w = r;
212
+ }
213
+ }
214
+ function mn(e) {
215
+ const t = w, n = m;
216
+ return Promise.resolve().then(() => {
217
+ w = t, m = n;
218
+ let r;
219
+ return V(e, !1), w = m = null, r ? r.done : void 0;
220
+ });
221
+ }
222
+ var [pn, qr] = /* @__PURE__ */ A(!1);
223
+ function Fr() {
224
+ return [pn, mn];
225
+ }
226
+ function Kr(e, t) {
227
+ const n = Symbol("context");
228
+ return {
229
+ id: n,
230
+ Provider: An(n),
231
+ defaultValue: e
232
+ };
233
+ }
234
+ function Qr(e) {
235
+ let t;
236
+ return m && m.context && (t = m.context[e.id]) !== void 0 ? t : e.defaultValue;
237
+ }
238
+ function Mt(e) {
239
+ const t = P(e), n = P(() => tt(t()));
240
+ return n.toArray = () => {
241
+ const r = n();
242
+ return Array.isArray(r) ? r : r != null ? [r] : [];
243
+ }, n;
244
+ }
245
+ var vn;
246
+ function Dt() {
247
+ if (this.sources && this.state)
248
+ if (this.state === $)
249
+ de(this);
250
+ else {
251
+ const e = x;
252
+ x = null, V(() => qe(this), !1), x = e;
253
+ }
254
+ if (w) {
255
+ const e = this.observers ? this.observers.length : 0;
256
+ w.sources ? (w.sources.push(this), w.sourceSlots.push(e)) : (w.sources = [this], w.sourceSlots = [e]), this.observers ? (this.observers.push(w), this.observerSlots.push(w.sources.length - 1)) : (this.observers = [w], this.observerSlots = [w.sources.length - 1]);
257
+ }
258
+ return this.value;
259
+ }
260
+ function Lt(e, t, n) {
261
+ let r = e.value;
262
+ return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && V(() => {
263
+ for (let s = 0; s < e.observers.length; s += 1) {
264
+ const i = e.observers[s], o = Ye && Ye.running;
265
+ o && Ye.disposed.has(i), (o ? !i.tState : !i.state) && (i.pure ? x.push(i) : _.push(i), i.observers && _t(i)), o || (i.state = $);
266
+ }
267
+ if (x.length > 1e6)
268
+ throw x = [], new Error();
269
+ }, !1)), t;
270
+ }
271
+ function de(e) {
272
+ if (!e.fn)
273
+ return;
274
+ pe(e);
275
+ const t = Ke;
276
+ wn(
277
+ e,
278
+ e.value,
279
+ t
280
+ );
281
+ }
282
+ function wn(e, t, n) {
283
+ let r;
284
+ const s = m, i = w;
285
+ w = m = e;
286
+ try {
287
+ r = e.fn(t);
288
+ } catch (o) {
289
+ return e.pure && (e.state = $, e.owned && e.owned.forEach(pe), e.owned = null), e.updatedAt = n + 1, ft(o);
290
+ } finally {
291
+ w = i, m = s;
292
+ }
293
+ (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Lt(e, r) : e.value = r, e.updatedAt = n);
294
+ }
295
+ function Qe(e, t, n, r = $, s) {
296
+ const i = {
297
+ fn: e,
298
+ state: r,
299
+ updatedAt: null,
300
+ owned: null,
301
+ sources: null,
302
+ sourceSlots: null,
303
+ cleanups: null,
304
+ value: t,
305
+ owner: m,
306
+ context: m ? m.context : null,
307
+ pure: n
308
+ };
309
+ return m === null || m !== It && (m.owned ? m.owned.push(i) : m.owned = [i]), i;
310
+ }
311
+ function Ue(e) {
312
+ if (e.state === 0)
313
+ return;
314
+ if (e.state === je)
315
+ return qe(e);
316
+ if (e.suspense && T(e.suspense.inFallback))
317
+ return e.suspense.effects.push(e);
318
+ const t = [e];
319
+ for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Ke); )
320
+ e.state && t.push(e);
321
+ for (let n = t.length - 1; n >= 0; n--)
322
+ if (e = t[n], e.state === $)
323
+ de(e);
324
+ else if (e.state === je) {
325
+ const r = x;
326
+ x = null, V(() => qe(e, t[0]), !1), x = r;
327
+ }
328
+ }
329
+ function V(e, t) {
330
+ if (x)
331
+ return e();
332
+ let n = !1;
333
+ t || (x = []), _ ? n = !0 : _ = [], Ke++;
334
+ try {
335
+ const r = e();
336
+ return bn(n), r;
337
+ } catch (r) {
338
+ n || (_ = null), x = null, ft(r);
339
+ }
340
+ }
341
+ function bn(e) {
342
+ if (x && (Vt(x), x = null), e)
343
+ return;
344
+ const t = _;
345
+ _ = null, t.length && V(() => Pt(t), !1);
346
+ }
347
+ function Vt(e) {
348
+ for (let t = 0; t < e.length; t++)
349
+ Ue(e[t]);
350
+ }
351
+ function Sn(e) {
352
+ let t, n = 0;
353
+ for (t = 0; t < e.length; t++) {
354
+ const r = e[t];
355
+ r.user ? e[n++] = r : Ue(r);
356
+ }
357
+ if (h.context) {
358
+ if (h.count) {
359
+ h.effects || (h.effects = []), h.effects.push(...e.slice(0, n));
360
+ return;
361
+ }
362
+ he();
363
+ }
364
+ for (h.effects && (h.done || !h.count) && (e = [...h.effects, ...e], n += h.effects.length, delete h.effects), t = 0; t < n; t++)
365
+ Ue(e[t]);
366
+ }
367
+ function qe(e, t) {
368
+ e.state = 0;
369
+ for (let n = 0; n < e.sources.length; n += 1) {
370
+ const r = e.sources[n];
371
+ if (r.sources) {
372
+ const s = r.state;
373
+ s === $ ? r !== t && (!r.updatedAt || r.updatedAt < Ke) && Ue(r) : s === je && qe(r, t);
374
+ }
375
+ }
376
+ }
377
+ function _t(e) {
378
+ for (let t = 0; t < e.observers.length; t += 1) {
379
+ const n = e.observers[t];
380
+ n.state || (n.state = je, n.pure ? x.push(n) : _.push(n), n.observers && _t(n));
381
+ }
382
+ }
383
+ function pe(e) {
384
+ let t;
385
+ if (e.sources)
386
+ for (; e.sources.length; ) {
387
+ const n = e.sources.pop(), r = e.sourceSlots.pop(), s = n.observers;
388
+ if (s && s.length) {
389
+ const i = s.pop(), o = n.observerSlots.pop();
390
+ r < s.length && (i.sourceSlots[o] = r, s[r] = i, n.observerSlots[r] = o);
391
+ }
392
+ }
393
+ if (e.tOwned) {
394
+ for (t = e.tOwned.length - 1; t >= 0; t--)
395
+ pe(e.tOwned[t]);
396
+ delete e.tOwned;
397
+ }
398
+ if (e.owned) {
399
+ for (t = e.owned.length - 1; t >= 0; t--)
400
+ pe(e.owned[t]);
401
+ e.owned = null;
402
+ }
403
+ if (e.cleanups) {
404
+ for (t = e.cleanups.length - 1; t >= 0; t--)
405
+ e.cleanups[t]();
406
+ e.cleanups = null;
407
+ }
408
+ e.state = 0;
409
+ }
410
+ function et(e) {
411
+ return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
412
+ cause: e
413
+ });
414
+ }
415
+ function ft(e, t = m) {
416
+ throw et(e);
417
+ }
418
+ function tt(e) {
419
+ if (typeof e == "function" && !e.length)
420
+ return tt(e());
421
+ if (Array.isArray(e)) {
422
+ const t = [];
423
+ for (let n = 0; n < e.length; n++) {
424
+ const r = tt(e[n]);
425
+ Array.isArray(r) ? t.push.apply(t, r) : t.push(r);
426
+ }
427
+ return t;
428
+ }
429
+ return e;
430
+ }
431
+ function An(e, t) {
432
+ return function(r) {
433
+ let s;
434
+ return Q(
435
+ () => s = T(() => (m.context = {
436
+ ...m.context,
437
+ [e]: r.value
438
+ }, Mt(() => r.children))),
439
+ void 0
440
+ ), s;
441
+ };
442
+ }
443
+ var nt = Symbol("fallback");
444
+ function Fe(e) {
445
+ for (let t = 0; t < e.length; t++)
446
+ e[t]();
447
+ }
448
+ function En(e, t, n = {}) {
449
+ let r = [], s = [], i = [], o = 0, l = t.length > 1 ? [] : null;
450
+ return me(() => Fe(i)), () => {
451
+ let a = e() || [], u = a.length, f, c;
452
+ return a[kt], T(() => {
453
+ let y, S, C, B, U, M, I, D, R;
454
+ if (u === 0)
455
+ o !== 0 && (Fe(i), i = [], r = [], s = [], o = 0, l && (l = [])), n.fallback && (r = [nt], s[0] = K((Ge) => (i[0] = Ge, n.fallback())), o = 1);
456
+ else if (o === 0) {
457
+ for (s = new Array(u), c = 0; c < u; c++)
458
+ r[c] = a[c], s[c] = K(g);
459
+ o = u;
460
+ } else {
461
+ for (C = new Array(u), B = new Array(u), l && (U = new Array(u)), M = 0, I = Math.min(o, u); M < I && r[M] === a[M]; M++)
462
+ ;
463
+ for (I = o - 1, D = u - 1; I >= M && D >= M && r[I] === a[D]; I--, D--)
464
+ C[D] = s[I], B[D] = i[I], l && (U[D] = l[I]);
465
+ for (y = /* @__PURE__ */ new Map(), S = new Array(D + 1), c = D; c >= M; c--)
466
+ R = a[c], f = y.get(R), S[c] = f === void 0 ? -1 : f, y.set(R, c);
467
+ for (f = M; f <= I; f++)
468
+ R = r[f], c = y.get(R), c !== void 0 && c !== -1 ? (C[c] = s[f], B[c] = i[f], l && (U[c] = l[f]), c = S[c], y.set(R, c)) : i[f]();
469
+ for (c = M; c < u; c++)
470
+ c in C ? (s[c] = C[c], i[c] = B[c], l && (l[c] = U[c], l[c](c))) : s[c] = K(g);
471
+ s = s.slice(0, o = u), r = a.slice(0);
472
+ }
473
+ return s;
474
+ });
475
+ function g(y) {
476
+ if (i[c] = y, l) {
477
+ const [S, C] = A(c);
478
+ return l[c] = C, t(a[c], S);
479
+ }
480
+ return t(a[c]);
481
+ }
482
+ };
483
+ }
484
+ function On(e, t, n = {}) {
485
+ let r = [], s = [], i = [], o = [], l = 0, a;
486
+ return me(() => Fe(i)), () => {
487
+ const u = e() || [], f = u.length;
488
+ return u[kt], T(() => {
489
+ if (f === 0)
490
+ return l !== 0 && (Fe(i), i = [], r = [], s = [], l = 0, o = []), n.fallback && (r = [nt], s[0] = K((g) => (i[0] = g, n.fallback())), l = 1), s;
491
+ for (r[0] === nt && (i[0](), i = [], r = [], s = [], l = 0), a = 0; a < f; a++)
492
+ a < r.length && r[a] !== u[a] ? o[a](() => u[a]) : a >= r.length && (s[a] = K(c));
493
+ for (; a < r.length; a++)
494
+ i[a]();
495
+ return l = o.length = i.length = f, r = u.slice(0), s = s.slice(0, l);
496
+ });
497
+ function c(g) {
498
+ i[a] = g;
499
+ const [y, S] = A(u[a]);
500
+ return o[a] = S, t(y, a);
501
+ }
502
+ };
503
+ }
504
+ function $t(e, t) {
505
+ return T(() => e(t || {}));
506
+ }
507
+ function Re() {
508
+ return !0;
509
+ }
510
+ var rt = {
511
+ get(e, t, n) {
512
+ return t === $e ? n : e.get(t);
513
+ },
514
+ has(e, t) {
515
+ return t === $e ? !0 : e.has(t);
516
+ },
517
+ set: Re,
518
+ deleteProperty: Re,
519
+ getOwnPropertyDescriptor(e, t) {
520
+ return {
521
+ configurable: !0,
522
+ enumerable: !0,
523
+ get() {
524
+ return e.get(t);
525
+ },
526
+ set: Re,
527
+ deleteProperty: Re
528
+ };
529
+ },
530
+ ownKeys(e) {
531
+ return e.keys();
532
+ }
533
+ };
534
+ function Ze(e) {
535
+ return (e = typeof e == "function" ? e() : e) ? e : {};
536
+ }
537
+ function Cn() {
538
+ for (let e = 0, t = this.length; e < t; ++e) {
539
+ const n = this[e]();
540
+ if (n !== void 0)
541
+ return n;
542
+ }
543
+ }
544
+ function Bt(...e) {
545
+ let t = !1;
546
+ for (let o = 0; o < e.length; o++) {
547
+ const l = e[o];
548
+ t = t || !!l && $e in l, e[o] = typeof l == "function" ? (t = !0, P(l)) : l;
549
+ }
550
+ if (Nt && t)
551
+ return new Proxy(
552
+ {
553
+ get(o) {
554
+ for (let l = e.length - 1; l >= 0; l--) {
555
+ const a = Ze(e[l])[o];
556
+ if (a !== void 0)
557
+ return a;
558
+ }
559
+ },
560
+ has(o) {
561
+ for (let l = e.length - 1; l >= 0; l--)
562
+ if (o in Ze(e[l]))
563
+ return !0;
564
+ return !1;
565
+ },
566
+ keys() {
567
+ const o = [];
568
+ for (let l = 0; l < e.length; l++)
569
+ o.push(...Object.keys(Ze(e[l])));
570
+ return [...new Set(o)];
571
+ }
572
+ },
573
+ rt
574
+ );
575
+ const n = {}, r = /* @__PURE__ */ Object.create(null);
576
+ for (let o = e.length - 1; o >= 0; o--) {
577
+ const l = e[o];
578
+ if (!l)
579
+ continue;
580
+ const a = Object.getOwnPropertyNames(l);
581
+ for (let u = a.length - 1; u >= 0; u--) {
582
+ const f = a[u];
583
+ if (f === "__proto__" || f === "constructor")
584
+ continue;
585
+ const c = Object.getOwnPropertyDescriptor(l, f);
586
+ if (!r[f])
587
+ r[f] = c.get ? {
588
+ enumerable: !0,
589
+ configurable: !0,
590
+ get: Cn.bind(n[f] = [c.get.bind(l)])
591
+ } : c.value !== void 0 ? c : void 0;
592
+ else {
593
+ const g = n[f];
594
+ g && (c.get ? g.push(c.get.bind(l)) : c.value !== void 0 && g.push(() => c.value));
595
+ }
596
+ }
597
+ }
598
+ const s = {}, i = Object.keys(r);
599
+ for (let o = i.length - 1; o >= 0; o--) {
600
+ const l = i[o], a = r[l];
601
+ a && a.get ? Object.defineProperty(s, l, a) : s[l] = a ? a.value : void 0;
602
+ }
603
+ return s;
604
+ }
605
+ function Tn(e, ...t) {
606
+ if (Nt && $e in e) {
607
+ const s = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((o) => new Proxy(
608
+ {
609
+ get(l) {
610
+ return o.includes(l) ? e[l] : void 0;
611
+ },
612
+ has(l) {
613
+ return o.includes(l) && l in e;
614
+ },
615
+ keys() {
616
+ return o.filter((l) => l in e);
617
+ }
618
+ },
619
+ rt
620
+ ));
621
+ return i.push(
622
+ new Proxy(
623
+ {
624
+ get(o) {
625
+ return s.has(o) ? void 0 : e[o];
626
+ },
627
+ has(o) {
628
+ return s.has(o) ? !1 : o in e;
629
+ },
630
+ keys() {
631
+ return Object.keys(e).filter((o) => !s.has(o));
632
+ }
633
+ },
634
+ rt
635
+ )
636
+ ), i;
637
+ }
638
+ const n = {}, r = t.map(() => ({}));
639
+ for (const s of Object.getOwnPropertyNames(e)) {
640
+ const i = Object.getOwnPropertyDescriptor(e, s), o = !i.get && !i.set && i.enumerable && i.writable && i.configurable;
641
+ let l = !1, a = 0;
642
+ for (const u of t)
643
+ u.includes(s) && (l = !0, o ? r[a][s] = i.value : Object.defineProperty(r[a], s, i)), ++a;
644
+ l || (o ? n[s] = i.value : Object.defineProperty(n, s, i));
645
+ }
646
+ return [...r, n];
647
+ }
648
+ function jt(e) {
649
+ let t, n;
650
+ const r = (s) => {
651
+ const i = h.context;
652
+ if (i) {
653
+ const [l, a] = A();
654
+ h.count || (h.count = 0), h.count++, (n || (n = e())).then((u) => {
655
+ !h.done && he(i), h.count--, a(() => u.default), he();
656
+ }), t = l;
657
+ } else if (!t) {
658
+ const [l] = hn(() => (n || (n = e())).then((a) => a.default));
659
+ t = l;
660
+ }
661
+ let o;
662
+ return P(
663
+ () => (o = t()) ? T(() => {
664
+ if (!i || h.done)
665
+ return o(s);
666
+ const l = h.context;
667
+ he(i);
668
+ const a = o(s);
669
+ return he(l), a;
670
+ }) : ""
671
+ );
672
+ };
673
+ return r.preload = () => n || ((n = e()).then((s) => t = () => s.default), n), r;
674
+ }
675
+ var xn = 0;
676
+ function zr() {
677
+ return h.context ? h.getNextContextId() : `cl-${xn++}`;
678
+ }
679
+ var Ut = (e) => `Stale read from <${e}>.`;
680
+ function Gr(e) {
681
+ const t = "fallback" in e && {
682
+ fallback: () => e.fallback
683
+ };
684
+ return P(En(() => e.each, e.children, t || void 0));
685
+ }
686
+ function Hr(e) {
687
+ const t = "fallback" in e && {
688
+ fallback: () => e.fallback
689
+ };
690
+ return P(On(() => e.each, e.children, t || void 0));
691
+ }
692
+ function Xr(e) {
693
+ const t = e.keyed, n = P(() => e.when, void 0, {
694
+ equals: (r, s) => t ? r === s : !r == !s
695
+ });
696
+ return P(
697
+ () => {
698
+ const r = n();
699
+ if (r) {
700
+ const s = e.children;
701
+ return typeof s == "function" && s.length > 0 ? T(
702
+ () => s(
703
+ t ? r : () => {
704
+ if (!T(n))
705
+ throw Ut("Show");
706
+ return e.when;
707
+ }
708
+ )
709
+ ) : s;
710
+ }
711
+ return e.fallback;
712
+ },
713
+ void 0,
714
+ void 0
715
+ );
716
+ }
717
+ function Wr(e) {
718
+ let t = !1;
719
+ const n = (i, o) => (t ? i[1] === o[1] : !i[1] == !o[1]) && i[2] === o[2], r = Mt(() => e.children), s = P(
720
+ () => {
721
+ let i = r();
722
+ Array.isArray(i) || (i = [i]);
723
+ for (let o = 0; o < i.length; o++) {
724
+ const l = i[o].when;
725
+ if (l)
726
+ return t = !!i[o].keyed, [o, l, i[o]];
727
+ }
728
+ return [-1];
729
+ },
730
+ void 0,
731
+ {
732
+ equals: n
733
+ }
734
+ );
735
+ return P(
736
+ () => {
737
+ const [i, o, l] = s();
738
+ if (i < 0)
739
+ return e.fallback;
740
+ const a = l.children;
741
+ return typeof a == "function" && a.length > 0 ? T(
742
+ () => a(
743
+ t ? o : () => {
744
+ if (T(s)[0] !== i)
745
+ throw Ut("Match");
746
+ return l.when;
747
+ }
748
+ )
749
+ ) : a;
750
+ },
751
+ void 0,
752
+ void 0
753
+ );
754
+ }
755
+ function Yr(e) {
756
+ return e;
757
+ }
758
+ var Nn = [
759
+ "allowfullscreen",
760
+ "async",
761
+ "autofocus",
762
+ "autoplay",
763
+ "checked",
764
+ "controls",
765
+ "default",
766
+ "disabled",
767
+ "formnovalidate",
768
+ "hidden",
769
+ "indeterminate",
770
+ "inert",
771
+ "ismap",
772
+ "loop",
773
+ "multiple",
774
+ "muted",
775
+ "nomodule",
776
+ "novalidate",
777
+ "open",
778
+ "playsinline",
779
+ "readonly",
780
+ "required",
781
+ "reversed",
782
+ "seamless",
783
+ "selected"
784
+ ], kn = /* @__PURE__ */ new Set([
785
+ "className",
786
+ "value",
787
+ "readOnly",
788
+ "formNoValidate",
789
+ "isMap",
790
+ "noModule",
791
+ "playsInline",
792
+ ...Nn
793
+ ]), Pn = /* @__PURE__ */ new Set([
794
+ "innerHTML",
795
+ "textContent",
796
+ "innerText",
797
+ "children"
798
+ ]), In = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
799
+ className: "class",
800
+ htmlFor: "for"
801
+ }), Rn = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
802
+ class: "className",
803
+ formnovalidate: {
804
+ $: "formNoValidate",
805
+ BUTTON: 1,
806
+ INPUT: 1
807
+ },
808
+ ismap: {
809
+ $: "isMap",
810
+ IMG: 1
811
+ },
812
+ nomodule: {
813
+ $: "noModule",
814
+ SCRIPT: 1
815
+ },
816
+ playsinline: {
817
+ $: "playsInline",
818
+ VIDEO: 1
819
+ },
820
+ readonly: {
821
+ $: "readOnly",
822
+ INPUT: 1,
823
+ TEXTAREA: 1
824
+ }
825
+ });
826
+ function Mn(e, t) {
827
+ const n = Rn[e];
828
+ return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
829
+ }
830
+ var Dn = /* @__PURE__ */ new Set([
831
+ "beforeinput",
832
+ "click",
833
+ "dblclick",
834
+ "contextmenu",
835
+ "focusin",
836
+ "focusout",
837
+ "input",
838
+ "keydown",
839
+ "keyup",
840
+ "mousedown",
841
+ "mousemove",
842
+ "mouseout",
843
+ "mouseover",
844
+ "mouseup",
845
+ "pointerdown",
846
+ "pointermove",
847
+ "pointerout",
848
+ "pointerover",
849
+ "pointerup",
850
+ "touchend",
851
+ "touchmove",
852
+ "touchstart"
853
+ ]), Ln = /* @__PURE__ */ new Set([
854
+ "altGlyph",
855
+ "altGlyphDef",
856
+ "altGlyphItem",
857
+ "animate",
858
+ "animateColor",
859
+ "animateMotion",
860
+ "animateTransform",
861
+ "circle",
862
+ "clipPath",
863
+ "color-profile",
864
+ "cursor",
865
+ "defs",
866
+ "desc",
867
+ "ellipse",
868
+ "feBlend",
869
+ "feColorMatrix",
870
+ "feComponentTransfer",
871
+ "feComposite",
872
+ "feConvolveMatrix",
873
+ "feDiffuseLighting",
874
+ "feDisplacementMap",
875
+ "feDistantLight",
876
+ "feDropShadow",
877
+ "feFlood",
878
+ "feFuncA",
879
+ "feFuncB",
880
+ "feFuncG",
881
+ "feFuncR",
882
+ "feGaussianBlur",
883
+ "feImage",
884
+ "feMerge",
885
+ "feMergeNode",
886
+ "feMorphology",
887
+ "feOffset",
888
+ "fePointLight",
889
+ "feSpecularLighting",
890
+ "feSpotLight",
891
+ "feTile",
892
+ "feTurbulence",
893
+ "filter",
894
+ "font",
895
+ "font-face",
896
+ "font-face-format",
897
+ "font-face-name",
898
+ "font-face-src",
899
+ "font-face-uri",
900
+ "foreignObject",
901
+ "g",
902
+ "glyph",
903
+ "glyphRef",
904
+ "hkern",
905
+ "image",
906
+ "line",
907
+ "linearGradient",
908
+ "marker",
909
+ "mask",
910
+ "metadata",
911
+ "missing-glyph",
912
+ "mpath",
913
+ "path",
914
+ "pattern",
915
+ "polygon",
916
+ "polyline",
917
+ "radialGradient",
918
+ "rect",
919
+ "set",
920
+ "stop",
921
+ "svg",
922
+ "switch",
923
+ "symbol",
924
+ "text",
925
+ "textPath",
926
+ "tref",
927
+ "tspan",
928
+ "use",
929
+ "view",
930
+ "vkern"
931
+ ]), Vn = {
932
+ xlink: "http://www.w3.org/1999/xlink",
933
+ xml: "http://www.w3.org/XML/1998/namespace"
934
+ };
935
+ function _n(e, t, n) {
936
+ let r = n.length, s = t.length, i = r, o = 0, l = 0, a = t[s - 1].nextSibling, u = null;
937
+ for (; o < s || l < i; ) {
938
+ if (t[o] === n[l]) {
939
+ o++, l++;
940
+ continue;
941
+ }
942
+ for (; t[s - 1] === n[i - 1]; )
943
+ s--, i--;
944
+ if (s === o) {
945
+ const f = i < r ? l ? n[l - 1].nextSibling : n[i - l] : a;
946
+ for (; l < i; )
947
+ e.insertBefore(n[l++], f);
948
+ } else if (i === l)
949
+ for (; o < s; )
950
+ (!u || !u.has(t[o])) && t[o].remove(), o++;
951
+ else if (t[o] === n[i - 1] && n[l] === t[s - 1]) {
952
+ const f = t[--s].nextSibling;
953
+ e.insertBefore(n[l++], t[o++].nextSibling), e.insertBefore(n[--i], f), t[s] = n[i];
954
+ } else {
955
+ if (!u) {
956
+ u = /* @__PURE__ */ new Map();
957
+ let c = l;
958
+ for (; c < i; )
959
+ u.set(n[c], c++);
960
+ }
961
+ const f = u.get(t[o]);
962
+ if (f != null)
963
+ if (l < f && f < i) {
964
+ let c = o, g = 1, y;
965
+ for (; ++c < s && c < i && !((y = u.get(t[c])) == null || y !== f + g); )
966
+ g++;
967
+ if (g > f - l) {
968
+ const S = t[o];
969
+ for (; l < f; )
970
+ e.insertBefore(n[l++], S);
971
+ } else
972
+ e.replaceChild(n[l++], t[o++]);
973
+ } else
974
+ o++;
975
+ else
976
+ t[o++].remove();
977
+ }
978
+ }
979
+ }
980
+ var ge = "_$DX_DELEGATE";
981
+ function qt(e, t, n, r = {}) {
982
+ let s;
983
+ return K((i) => {
984
+ s = i, t === document ? e() : it(t, e(), t.firstChild ? null : void 0, n);
985
+ }, r.owner), () => {
986
+ s(), t.textContent = "";
987
+ };
988
+ }
989
+ function Zr(e, t, n) {
990
+ let r;
991
+ const s = () => {
992
+ const o = document.createElement("template");
993
+ return o.innerHTML = e, o.content.firstChild;
994
+ }, i = () => (r || (r = s())).cloneNode(!0);
995
+ return i.cloneNode = i, i;
996
+ }
997
+ function $n(e, t = window.document) {
998
+ const n = t[ge] || (t[ge] = /* @__PURE__ */ new Set());
999
+ for (let r = 0, s = e.length; r < s; r++) {
1000
+ const i = e[r];
1001
+ n.has(i) || (n.add(i), t.addEventListener(i, Ft));
1002
+ }
1003
+ }
1004
+ function Jr(e = window.document) {
1005
+ if (e[ge]) {
1006
+ for (let t of e[ge].keys())
1007
+ e.removeEventListener(t, Ft);
1008
+ delete e[ge];
1009
+ }
1010
+ }
1011
+ function st(e, t, n) {
1012
+ z(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
1013
+ }
1014
+ function Bn(e, t, n, r) {
1015
+ z(e) || (r == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, r));
1016
+ }
1017
+ function jn(e, t, n) {
1018
+ z(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
1019
+ }
1020
+ function Un(e, t) {
1021
+ z(e) || (t == null ? e.removeAttribute("class") : e.className = t);
1022
+ }
1023
+ function qn(e, t, n, r) {
1024
+ if (r)
1025
+ Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
1026
+ else if (Array.isArray(n)) {
1027
+ const s = n[0];
1028
+ e.addEventListener(t, n[0] = (i) => s.call(e, n[1], i));
1029
+ } else
1030
+ e.addEventListener(t, n, typeof n != "function" && n);
1031
+ }
1032
+ function Fn(e, t, n = {}) {
1033
+ const r = Object.keys(t || {}), s = Object.keys(n);
1034
+ let i, o;
1035
+ for (i = 0, o = s.length; i < o; i++) {
1036
+ const l = s[i];
1037
+ !l || l === "undefined" || t[l] || (mt(e, l, !1), delete n[l]);
1038
+ }
1039
+ for (i = 0, o = r.length; i < o; i++) {
1040
+ const l = r[i], a = !!t[l];
1041
+ !l || l === "undefined" || n[l] === a || !a || (mt(e, l, !0), n[l] = a);
1042
+ }
1043
+ return n;
1044
+ }
1045
+ function Kn(e, t, n) {
1046
+ if (!t)
1047
+ return n ? st(e, "style") : t;
1048
+ const r = e.style;
1049
+ if (typeof t == "string")
1050
+ return r.cssText = t;
1051
+ typeof n == "string" && (r.cssText = n = void 0), n || (n = {}), t || (t = {});
1052
+ let s, i;
1053
+ for (i in n)
1054
+ t[i] == null && r.removeProperty(i), delete n[i];
1055
+ for (i in t)
1056
+ s = t[i], s !== n[i] && (r.setProperty(i, s), n[i] = s);
1057
+ return n;
1058
+ }
1059
+ function Qn(e, t = {}, n, r) {
1060
+ const s = {};
1061
+ return r || Q(
1062
+ () => s.children = ve(e, t.children, s.children)
1063
+ ), Q(() => typeof t.ref == "function" && zn(t.ref, e)), Q(() => Gn(e, t, n, !0, s, !0)), s;
1064
+ }
1065
+ function zn(e, t, n) {
1066
+ return T(() => e(t, n));
1067
+ }
1068
+ function it(e, t, n, r) {
1069
+ if (n !== void 0 && !r && (r = []), typeof t != "function")
1070
+ return ve(e, t, r, n);
1071
+ Q((s) => ve(e, t(), s, n), r);
1072
+ }
1073
+ function Gn(e, t, n, r, s = {}, i = !1) {
1074
+ t || (t = {});
1075
+ for (const o in s)
1076
+ if (!(o in t)) {
1077
+ if (o === "children")
1078
+ continue;
1079
+ s[o] = pt(e, o, null, s[o], n, i, t);
1080
+ }
1081
+ for (const o in t) {
1082
+ if (o === "children")
1083
+ continue;
1084
+ const l = t[o];
1085
+ s[o] = pt(e, o, l, s[o], n, i, t);
1086
+ }
1087
+ }
1088
+ function Hn(e) {
1089
+ let t, n;
1090
+ return !z() || !(t = h.registry.get(n = Wn())) ? e() : (h.completed && h.completed.add(t), h.registry.delete(n), t);
1091
+ }
1092
+ function z(e) {
1093
+ return !!h.context && !h.done && (!e || e.isConnected);
1094
+ }
1095
+ function Xn(e) {
1096
+ return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
1097
+ }
1098
+ function mt(e, t, n) {
1099
+ const r = t.trim().split(/\s+/);
1100
+ for (let s = 0, i = r.length; s < i; s++)
1101
+ e.classList.toggle(r[s], n);
1102
+ }
1103
+ function pt(e, t, n, r, s, i, o) {
1104
+ let l, a, u, f, c;
1105
+ if (t === "style")
1106
+ return Kn(e, n, r);
1107
+ if (t === "classList")
1108
+ return Fn(e, n, r);
1109
+ if (n === r)
1110
+ return r;
1111
+ if (t === "ref")
1112
+ i || n(e);
1113
+ else if (t.slice(0, 3) === "on:") {
1114
+ const g = t.slice(3);
1115
+ r && e.removeEventListener(g, r, typeof r != "function" && r), n && e.addEventListener(g, n, typeof n != "function" && n);
1116
+ } else if (t.slice(0, 10) === "oncapture:") {
1117
+ const g = t.slice(10);
1118
+ r && e.removeEventListener(g, r, !0), n && e.addEventListener(g, n, !0);
1119
+ } else if (t.slice(0, 2) === "on") {
1120
+ const g = t.slice(2).toLowerCase(), y = Dn.has(g);
1121
+ if (!y && r) {
1122
+ const S = Array.isArray(r) ? r[0] : r;
1123
+ e.removeEventListener(g, S);
1124
+ }
1125
+ (y || n) && (qn(e, g, n, y), y && $n([g]));
1126
+ } else if (t.slice(0, 5) === "attr:")
1127
+ st(e, t.slice(5), n);
1128
+ else if (t.slice(0, 5) === "bool:")
1129
+ jn(e, t.slice(5), n);
1130
+ else if ((c = t.slice(0, 5) === "prop:") || (u = Pn.has(t)) || !s && ((f = Mn(t, e.tagName)) || (a = kn.has(t))) || (l = e.nodeName.includes("-") || "is" in o)) {
1131
+ if (c)
1132
+ t = t.slice(5), a = !0;
1133
+ else if (z(e))
1134
+ return n;
1135
+ t === "class" || t === "className" ? Un(e, n) : l && !a && !u ? e[Xn(t)] = n : e[f || t] = n;
1136
+ } else {
1137
+ const g = s && t.indexOf(":") > -1 && Vn[t.split(":")[0]];
1138
+ g ? Bn(e, g, t, n) : st(e, In[t] || t, n);
1139
+ }
1140
+ return n;
1141
+ }
1142
+ function Ft(e) {
1143
+ if (h.registry && h.events && h.events.find(([a, u]) => u === e))
1144
+ return;
1145
+ let t = e.target;
1146
+ const n = `$$${e.type}`, r = e.target, s = e.currentTarget, i = (a) => Object.defineProperty(e, "target", {
1147
+ configurable: !0,
1148
+ value: a
1149
+ }), o = () => {
1150
+ const a = t[n];
1151
+ if (a && !t.disabled) {
1152
+ const u = t[`${n}Data`];
1153
+ if (u !== void 0 ? a.call(t, u, e) : a.call(t, e), e.cancelBubble)
1154
+ return;
1155
+ }
1156
+ return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && i(t.host), !0;
1157
+ }, l = () => {
1158
+ for (; o() && (t = t._$host || t.parentNode || t.host); )
1159
+ ;
1160
+ };
1161
+ if (Object.defineProperty(e, "currentTarget", {
1162
+ configurable: !0,
1163
+ get() {
1164
+ return t || document;
1165
+ }
1166
+ }), h.registry && !h.done && (h.done = _$HY.done = !0), e.composedPath) {
1167
+ const a = e.composedPath();
1168
+ i(a[0]);
1169
+ for (let u = 0; u < a.length - 2 && (t = a[u], !!o()); u++) {
1170
+ if (t._$host) {
1171
+ t = t._$host, l();
1172
+ break;
1173
+ }
1174
+ if (t.parentNode === s)
1175
+ break;
1176
+ }
1177
+ } else
1178
+ l();
1179
+ i(r);
1180
+ }
1181
+ function ve(e, t, n, r, s) {
1182
+ const i = z(e);
1183
+ if (i) {
1184
+ !n && (n = [...e.childNodes]);
1185
+ let a = [];
1186
+ for (let u = 0; u < n.length; u++) {
1187
+ const f = n[u];
1188
+ f.nodeType === 8 && f.data.slice(0, 2) === "!$" ? f.remove() : a.push(f);
1189
+ }
1190
+ n = a;
1191
+ }
1192
+ for (; typeof n == "function"; )
1193
+ n = n();
1194
+ if (t === n)
1195
+ return n;
1196
+ const o = typeof t, l = r !== void 0;
1197
+ if (e = l && n[0] && n[0].parentNode || e, o === "string" || o === "number") {
1198
+ if (i || o === "number" && (t = t.toString(), t === n))
1199
+ return n;
1200
+ if (l) {
1201
+ let a = n[0];
1202
+ a && a.nodeType === 3 ? a.data !== t && (a.data = t) : a = document.createTextNode(t), n = H(e, n, r, a);
1203
+ } else
1204
+ n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
1205
+ } else if (t == null || o === "boolean") {
1206
+ if (i)
1207
+ return n;
1208
+ n = H(e, n, r);
1209
+ } else {
1210
+ if (o === "function")
1211
+ return Q(() => {
1212
+ let a = t();
1213
+ for (; typeof a == "function"; )
1214
+ a = a();
1215
+ n = ve(e, a, n, r);
1216
+ }), () => n;
1217
+ if (Array.isArray(t)) {
1218
+ const a = [], u = n && Array.isArray(n);
1219
+ if (ot(a, t, n, s))
1220
+ return Q(() => n = ve(e, a, n, r, !0)), () => n;
1221
+ if (i) {
1222
+ if (!a.length)
1223
+ return n;
1224
+ if (r === void 0)
1225
+ return n = [...e.childNodes];
1226
+ let f = a[0];
1227
+ if (f.parentNode !== e)
1228
+ return n;
1229
+ const c = [f];
1230
+ for (; (f = f.nextSibling) !== r; )
1231
+ c.push(f);
1232
+ return n = c;
1233
+ }
1234
+ if (a.length === 0) {
1235
+ if (n = H(e, n, r), l)
1236
+ return n;
1237
+ } else u ? n.length === 0 ? vt(e, a, r) : _n(e, n, a) : (n && H(e), vt(e, a));
1238
+ n = a;
1239
+ } else if (t.nodeType) {
1240
+ if (i && t.parentNode)
1241
+ return n = l ? [t] : t;
1242
+ if (Array.isArray(n)) {
1243
+ if (l)
1244
+ return n = H(e, n, r, t);
1245
+ H(e, n, null, t);
1246
+ } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
1247
+ n = t;
1248
+ }
1249
+ }
1250
+ return n;
1251
+ }
1252
+ function ot(e, t, n, r) {
1253
+ let s = !1;
1254
+ for (let i = 0, o = t.length; i < o; i++) {
1255
+ let l = t[i], a = n && n[e.length], u;
1256
+ if (!(l == null || l === !0 || l === !1))
1257
+ if ((u = typeof l) == "object" && l.nodeType)
1258
+ e.push(l);
1259
+ else if (Array.isArray(l))
1260
+ s = ot(e, l, a) || s;
1261
+ else if (u === "function")
1262
+ if (r) {
1263
+ for (; typeof l == "function"; )
1264
+ l = l();
1265
+ s = ot(
1266
+ e,
1267
+ Array.isArray(l) ? l : [l],
1268
+ Array.isArray(a) ? a : [a]
1269
+ ) || s;
1270
+ } else
1271
+ e.push(l), s = !0;
1272
+ else {
1273
+ const f = String(l);
1274
+ a && a.nodeType === 3 && a.data === f ? e.push(a) : e.push(document.createTextNode(f));
1275
+ }
1276
+ }
1277
+ return s;
1278
+ }
1279
+ function vt(e, t, n = null) {
1280
+ for (let r = 0, s = t.length; r < s; r++)
1281
+ e.insertBefore(t[r], n);
1282
+ }
1283
+ function H(e, t, n, r) {
1284
+ if (n === void 0)
1285
+ return e.textContent = "";
1286
+ const s = r || document.createTextNode("");
1287
+ if (t.length) {
1288
+ let i = !1;
1289
+ for (let o = t.length - 1; o >= 0; o--) {
1290
+ const l = t[o];
1291
+ if (s !== l) {
1292
+ const a = l.parentNode === e;
1293
+ !i && !o ? a ? e.replaceChild(s, l) : e.insertBefore(s, n) : a && l.remove();
1294
+ } else
1295
+ i = !0;
1296
+ }
1297
+ } else
1298
+ e.insertBefore(s, n);
1299
+ return [s];
1300
+ }
1301
+ function Wn() {
1302
+ return h.getNextContextId();
1303
+ }
1304
+ var Yn = "http://www.w3.org/2000/svg";
1305
+ function Kt(e, t = !1) {
1306
+ return t ? document.createElementNS(Yn, e) : document.createElement(e);
1307
+ }
1308
+ function es(e) {
1309
+ const { useShadow: t } = e, n = document.createTextNode(""), r = () => e.mount || document.body, s = yt();
1310
+ let i, o = !!h.context;
1311
+ return Rt(
1312
+ () => {
1313
+ o && (yt().user = o = !1), i || (i = yn(s, () => P(() => e.children)));
1314
+ const l = r();
1315
+ if (l instanceof HTMLHeadElement) {
1316
+ const [a, u] = A(!1), f = () => u(!0);
1317
+ K((c) => it(l, () => a() ? c() : i(), null)), me(f);
1318
+ } else {
1319
+ const a = Kt(e.isSVG ? "g" : "div", e.isSVG), u = t && a.attachShadow ? a.attachShadow({
1320
+ mode: "open"
1321
+ }) : a;
1322
+ Object.defineProperty(a, "_$host", {
1323
+ get() {
1324
+ return n.parentNode;
1325
+ },
1326
+ configurable: !0
1327
+ }), it(u, i), l.appendChild(a), e.ref && e.ref(a), me(() => l.removeChild(a));
1328
+ }
1329
+ },
1330
+ void 0,
1331
+ {
1332
+ render: !o
1333
+ }
1334
+ ), n;
1335
+ }
1336
+ function ts(e) {
1337
+ const [t, n] = Tn(e, ["component"]), r = P(() => t.component);
1338
+ return P(() => {
1339
+ const s = r();
1340
+ switch (typeof s) {
1341
+ case "function":
1342
+ return T(() => s(n));
1343
+ case "string":
1344
+ const i = Ln.has(s), o = h.context ? Hn() : Kt(s, i);
1345
+ return Qn(o, n, i), o;
1346
+ }
1347
+ });
1348
+ }
1349
+ var Zn = class {
1350
+ constructor() {
1351
+ this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
1352
+ }
1353
+ set(e, t) {
1354
+ this.keyToValue.set(e, t), this.valueToKey.set(t, e);
1355
+ }
1356
+ getByKey(e) {
1357
+ return this.keyToValue.get(e);
1358
+ }
1359
+ getByValue(e) {
1360
+ return this.valueToKey.get(e);
1361
+ }
1362
+ clear() {
1363
+ this.keyToValue.clear(), this.valueToKey.clear();
1364
+ }
1365
+ }, Qt = class {
1366
+ constructor(e) {
1367
+ this.generateIdentifier = e, this.kv = new Zn();
1368
+ }
1369
+ register(e, t) {
1370
+ this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
1371
+ }
1372
+ clear() {
1373
+ this.kv.clear();
1374
+ }
1375
+ getIdentifier(e) {
1376
+ return this.kv.getByValue(e);
1377
+ }
1378
+ getValue(e) {
1379
+ return this.kv.getByKey(e);
1380
+ }
1381
+ }, Jn = class extends Qt {
1382
+ constructor() {
1383
+ super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
1384
+ }
1385
+ register(e, t) {
1386
+ typeof t == "object" ? (t.allowProps && this.classToAllowedProps.set(e, t.allowProps), super.register(e, t.identifier)) : super.register(e, t);
1387
+ }
1388
+ getAllowedProps(e) {
1389
+ return this.classToAllowedProps.get(e);
1390
+ }
1391
+ };
1392
+ function er(e) {
1393
+ if ("values" in Object)
1394
+ return Object.values(e);
1395
+ const t = [];
1396
+ for (const n in e)
1397
+ e.hasOwnProperty(n) && t.push(e[n]);
1398
+ return t;
1399
+ }
1400
+ function tr(e, t) {
1401
+ const n = er(e);
1402
+ if ("find" in n)
1403
+ return n.find(t);
1404
+ const r = n;
1405
+ for (let s = 0; s < r.length; s++) {
1406
+ const i = r[s];
1407
+ if (t(i))
1408
+ return i;
1409
+ }
1410
+ }
1411
+ function fe(e, t) {
1412
+ Object.entries(e).forEach(([n, r]) => t(r, n));
1413
+ }
1414
+ function _e(e, t) {
1415
+ return e.indexOf(t) !== -1;
1416
+ }
1417
+ function wt(e, t) {
1418
+ for (let n = 0; n < e.length; n++) {
1419
+ const r = e[n];
1420
+ if (t(r))
1421
+ return r;
1422
+ }
1423
+ }
1424
+ var nr = class {
1425
+ constructor() {
1426
+ this.transfomers = {};
1427
+ }
1428
+ register(e) {
1429
+ this.transfomers[e.name] = e;
1430
+ }
1431
+ findApplicable(e) {
1432
+ return tr(this.transfomers, (t) => t.isApplicable(e));
1433
+ }
1434
+ findByName(e) {
1435
+ return this.transfomers[e];
1436
+ }
1437
+ }, rr = (e) => Object.prototype.toString.call(e).slice(8, -1), zt = (e) => typeof e > "u", sr = (e) => e === null, we = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, lt = (e) => we(e) && Object.keys(e).length === 0, j = (e) => Array.isArray(e), ir = (e) => typeof e == "string", or = (e) => typeof e == "number" && !isNaN(e), lr = (e) => typeof e == "boolean", ar = (e) => e instanceof RegExp, be = (e) => e instanceof Map, Se = (e) => e instanceof Set, Gt = (e) => rr(e) === "Symbol", ur = (e) => e instanceof Date && !isNaN(e.valueOf()), cr = (e) => e instanceof Error, bt = (e) => typeof e == "number" && isNaN(e), fr = (e) => lr(e) || sr(e) || zt(e) || or(e) || ir(e) || Gt(e), dr = (e) => typeof e == "bigint", hr = (e) => e === 1 / 0 || e === -1 / 0, gr = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), yr = (e) => e instanceof URL, Ht = (e) => e.replace(/\./g, "\\."), Je = (e) => e.map(String).map(Ht).join("."), ye = (e) => {
1438
+ const t = [];
1439
+ let n = "";
1440
+ for (let s = 0; s < e.length; s++) {
1441
+ let i = e.charAt(s);
1442
+ if (i === "\\" && e.charAt(s + 1) === ".") {
1443
+ n += ".", s++;
1444
+ continue;
1445
+ }
1446
+ if (i === ".") {
1447
+ t.push(n), n = "";
1448
+ continue;
1449
+ }
1450
+ n += i;
1451
+ }
1452
+ const r = n;
1453
+ return t.push(r), t;
1454
+ };
1455
+ function L(e, t, n, r) {
1456
+ return {
1457
+ isApplicable: e,
1458
+ annotation: t,
1459
+ transform: n,
1460
+ untransform: r
1461
+ };
1462
+ }
1463
+ var Xt = [
1464
+ L(zt, "undefined", () => null, () => {
1465
+ }),
1466
+ L(dr, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
1467
+ L(ur, "Date", (e) => e.toISOString(), (e) => new Date(e)),
1468
+ L(cr, "Error", (e, t) => {
1469
+ const n = {
1470
+ name: e.name,
1471
+ message: e.message
1472
+ };
1473
+ return t.allowedErrorProps.forEach((r) => {
1474
+ n[r] = e[r];
1475
+ }), n;
1476
+ }, (e, t) => {
1477
+ const n = new Error(e.message);
1478
+ return n.name = e.name, n.stack = e.stack, t.allowedErrorProps.forEach((r) => {
1479
+ n[r] = e[r];
1480
+ }), n;
1481
+ }),
1482
+ L(ar, "regexp", (e) => "" + e, (e) => {
1483
+ const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
1484
+ return new RegExp(t, n);
1485
+ }),
1486
+ L(
1487
+ Se,
1488
+ "set",
1489
+ // (sets only exist in es6+)
1490
+ // eslint-disable-next-line es5/no-es6-methods
1491
+ (e) => [...e.values()],
1492
+ (e) => new Set(e)
1493
+ ),
1494
+ L(be, "map", (e) => [...e.entries()], (e) => new Map(e)),
1495
+ L((e) => bt(e) || hr(e), "number", (e) => bt(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
1496
+ L((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
1497
+ L(yr, "URL", (e) => e.toString(), (e) => new URL(e))
1498
+ ];
1499
+ function ze(e, t, n, r) {
1500
+ return {
1501
+ isApplicable: e,
1502
+ annotation: t,
1503
+ transform: n,
1504
+ untransform: r
1505
+ };
1506
+ }
1507
+ var Wt = ze((e, t) => Gt(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
1508
+ const r = n.symbolRegistry.getValue(t[1]);
1509
+ if (!r)
1510
+ throw new Error("Trying to deserialize unknown symbol");
1511
+ return r;
1512
+ }), mr = [
1513
+ Int8Array,
1514
+ Uint8Array,
1515
+ Int16Array,
1516
+ Uint16Array,
1517
+ Int32Array,
1518
+ Uint32Array,
1519
+ Float32Array,
1520
+ Float64Array,
1521
+ Uint8ClampedArray
1522
+ ].reduce((e, t) => (e[t.name] = t, e), {}), Yt = ze(gr, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
1523
+ const n = mr[t[1]];
1524
+ if (!n)
1525
+ throw new Error("Trying to deserialize unknown typed array");
1526
+ return new n(e);
1527
+ });
1528
+ function Zt(e, t) {
1529
+ return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
1530
+ }
1531
+ var Jt = ze(Zt, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
1532
+ const n = t.classRegistry.getAllowedProps(e.constructor);
1533
+ if (!n)
1534
+ return { ...e };
1535
+ const r = {};
1536
+ return n.forEach((s) => {
1537
+ r[s] = e[s];
1538
+ }), r;
1539
+ }, (e, t, n) => {
1540
+ const r = n.classRegistry.getValue(t[1]);
1541
+ if (!r)
1542
+ throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
1543
+ return Object.assign(Object.create(r.prototype), e);
1544
+ }), en = ze((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
1545
+ const r = n.customTransformerRegistry.findByName(t[1]);
1546
+ if (!r)
1547
+ throw new Error("Trying to deserialize unknown custom value");
1548
+ return r.deserialize(e);
1549
+ }), pr = [Jt, Wt, en, Yt], St = (e, t) => {
1550
+ const n = wt(pr, (s) => s.isApplicable(e, t));
1551
+ if (n)
1552
+ return {
1553
+ value: n.transform(e, t),
1554
+ type: n.annotation(e, t)
1555
+ };
1556
+ const r = wt(Xt, (s) => s.isApplicable(e, t));
1557
+ if (r)
1558
+ return {
1559
+ value: r.transform(e, t),
1560
+ type: r.annotation
1561
+ };
1562
+ }, tn = {};
1563
+ Xt.forEach((e) => {
1564
+ tn[e.annotation] = e;
1565
+ });
1566
+ var vr = (e, t, n) => {
1567
+ if (j(t))
1568
+ switch (t[0]) {
1569
+ case "symbol":
1570
+ return Wt.untransform(e, t, n);
1571
+ case "class":
1572
+ return Jt.untransform(e, t, n);
1573
+ case "custom":
1574
+ return en.untransform(e, t, n);
1575
+ case "typed-array":
1576
+ return Yt.untransform(e, t, n);
1577
+ default:
1578
+ throw new Error("Unknown transformation: " + t);
1579
+ }
1580
+ else {
1581
+ const r = tn[t];
1582
+ if (!r)
1583
+ throw new Error("Unknown transformation: " + t);
1584
+ return r.untransform(e, n);
1585
+ }
1586
+ }, X = (e, t) => {
1587
+ const n = e.keys();
1588
+ for (; t > 0; )
1589
+ n.next(), t--;
1590
+ return n.next().value;
1591
+ };
1592
+ function nn(e) {
1593
+ if (_e(e, "__proto__"))
1594
+ throw new Error("__proto__ is not allowed as a property");
1595
+ if (_e(e, "prototype"))
1596
+ throw new Error("prototype is not allowed as a property");
1597
+ if (_e(e, "constructor"))
1598
+ throw new Error("constructor is not allowed as a property");
1599
+ }
1600
+ var wr = (e, t) => {
1601
+ nn(t);
1602
+ for (let n = 0; n < t.length; n++) {
1603
+ const r = t[n];
1604
+ if (Se(e))
1605
+ e = X(e, +r);
1606
+ else if (be(e)) {
1607
+ const s = +r, i = +t[++n] == 0 ? "key" : "value", o = X(e, s);
1608
+ switch (i) {
1609
+ case "key":
1610
+ e = o;
1611
+ break;
1612
+ case "value":
1613
+ e = e.get(o);
1614
+ break;
1615
+ }
1616
+ } else
1617
+ e = e[r];
1618
+ }
1619
+ return e;
1620
+ }, at = (e, t, n) => {
1621
+ if (nn(t), t.length === 0)
1622
+ return n(e);
1623
+ let r = e;
1624
+ for (let i = 0; i < t.length - 1; i++) {
1625
+ const o = t[i];
1626
+ if (j(r)) {
1627
+ const l = +o;
1628
+ r = r[l];
1629
+ } else if (we(r))
1630
+ r = r[o];
1631
+ else if (Se(r)) {
1632
+ const l = +o;
1633
+ r = X(r, l);
1634
+ } else if (be(r)) {
1635
+ if (i === t.length - 2)
1636
+ break;
1637
+ const a = +o, u = +t[++i] == 0 ? "key" : "value", f = X(r, a);
1638
+ switch (u) {
1639
+ case "key":
1640
+ r = f;
1641
+ break;
1642
+ case "value":
1643
+ r = r.get(f);
1644
+ break;
1645
+ }
1646
+ }
1647
+ }
1648
+ const s = t[t.length - 1];
1649
+ if (j(r) ? r[+s] = n(r[+s]) : we(r) && (r[s] = n(r[s])), Se(r)) {
1650
+ const i = X(r, +s), o = n(i);
1651
+ i !== o && (r.delete(i), r.add(o));
1652
+ }
1653
+ if (be(r)) {
1654
+ const i = +t[t.length - 2], o = X(r, i);
1655
+ switch (+s == 0 ? "key" : "value") {
1656
+ case "key": {
1657
+ const a = n(o);
1658
+ r.set(a, r.get(o)), a !== o && r.delete(o);
1659
+ break;
1660
+ }
1661
+ case "value": {
1662
+ r.set(o, n(r.get(o)));
1663
+ break;
1664
+ }
1665
+ }
1666
+ }
1667
+ return e;
1668
+ };
1669
+ function ut(e, t, n = []) {
1670
+ if (!e)
1671
+ return;
1672
+ if (!j(e)) {
1673
+ fe(e, (i, o) => ut(i, t, [...n, ...ye(o)]));
1674
+ return;
1675
+ }
1676
+ const [r, s] = e;
1677
+ s && fe(s, (i, o) => {
1678
+ ut(i, t, [...n, ...ye(o)]);
1679
+ }), t(r, n);
1680
+ }
1681
+ function br(e, t, n) {
1682
+ return ut(t, (r, s) => {
1683
+ e = at(e, s, (i) => vr(i, r, n));
1684
+ }), e;
1685
+ }
1686
+ function Sr(e, t) {
1687
+ function n(r, s) {
1688
+ const i = wr(e, ye(s));
1689
+ r.map(ye).forEach((o) => {
1690
+ e = at(e, o, () => i);
1691
+ });
1692
+ }
1693
+ if (j(t)) {
1694
+ const [r, s] = t;
1695
+ r.forEach((i) => {
1696
+ e = at(e, ye(i), () => e);
1697
+ }), s && fe(s, n);
1698
+ } else
1699
+ fe(t, n);
1700
+ return e;
1701
+ }
1702
+ var Ar = (e, t) => we(e) || j(e) || be(e) || Se(e) || Zt(e, t);
1703
+ function Er(e, t, n) {
1704
+ const r = n.get(e);
1705
+ r ? r.push(t) : n.set(e, [t]);
1706
+ }
1707
+ function Or(e, t) {
1708
+ const n = {};
1709
+ let r;
1710
+ return e.forEach((s) => {
1711
+ if (s.length <= 1)
1712
+ return;
1713
+ t || (s = s.map((l) => l.map(String)).sort((l, a) => l.length - a.length));
1714
+ const [i, ...o] = s;
1715
+ i.length === 0 ? r = o.map(Je) : n[Je(i)] = o.map(Je);
1716
+ }), r ? lt(n) ? [r] : [r, n] : lt(n) ? void 0 : n;
1717
+ }
1718
+ var rn = (e, t, n, r, s = [], i = [], o = /* @__PURE__ */ new Map()) => {
1719
+ const l = fr(e);
1720
+ if (!l) {
1721
+ Er(e, s, t);
1722
+ const y = o.get(e);
1723
+ if (y)
1724
+ return r ? {
1725
+ transformedValue: null
1726
+ } : y;
1727
+ }
1728
+ if (!Ar(e, n)) {
1729
+ const y = St(e, n), S = y ? {
1730
+ transformedValue: y.value,
1731
+ annotations: [y.type]
1732
+ } : {
1733
+ transformedValue: e
1734
+ };
1735
+ return l || o.set(e, S), S;
1736
+ }
1737
+ if (_e(i, e))
1738
+ return {
1739
+ transformedValue: null
1740
+ };
1741
+ const a = St(e, n), u = (a == null ? void 0 : a.value) ?? e, f = j(u) ? [] : {}, c = {};
1742
+ fe(u, (y, S) => {
1743
+ if (S === "__proto__" || S === "constructor" || S === "prototype")
1744
+ throw new Error(`Detected property ${S}. This is a prototype pollution risk, please remove it from your object.`);
1745
+ const C = rn(y, t, n, r, [...s, S], [...i, e], o);
1746
+ f[S] = C.transformedValue, j(C.annotations) ? c[S] = C.annotations : we(C.annotations) && fe(C.annotations, (B, U) => {
1747
+ c[Ht(S) + "." + U] = B;
1748
+ });
1749
+ });
1750
+ const g = lt(c) ? {
1751
+ transformedValue: f,
1752
+ annotations: a ? [a.type] : void 0
1753
+ } : {
1754
+ transformedValue: f,
1755
+ annotations: a ? [a.type, c] : c
1756
+ };
1757
+ return l || o.set(e, g), g;
1758
+ };
1759
+ function sn(e) {
1760
+ return Object.prototype.toString.call(e).slice(8, -1);
1761
+ }
1762
+ function At(e) {
1763
+ return sn(e) === "Array";
1764
+ }
1765
+ function Cr(e) {
1766
+ if (sn(e) !== "Object")
1767
+ return !1;
1768
+ const t = Object.getPrototypeOf(e);
1769
+ return !!t && t.constructor === Object && t === Object.prototype;
1770
+ }
1771
+ function Tr(e, t, n, r, s) {
1772
+ const i = {}.propertyIsEnumerable.call(r, t) ? "enumerable" : "nonenumerable";
1773
+ i === "enumerable" && (e[t] = n), s && i === "nonenumerable" && Object.defineProperty(e, t, {
1774
+ value: n,
1775
+ enumerable: !1,
1776
+ writable: !0,
1777
+ configurable: !0
1778
+ });
1779
+ }
1780
+ function ct(e, t = {}) {
1781
+ if (At(e))
1782
+ return e.map((s) => ct(s, t));
1783
+ if (!Cr(e))
1784
+ return e;
1785
+ const n = Object.getOwnPropertyNames(e), r = Object.getOwnPropertySymbols(e);
1786
+ return [...n, ...r].reduce((s, i) => {
1787
+ if (At(t.props) && !t.props.includes(i))
1788
+ return s;
1789
+ const o = e[i], l = ct(o, t);
1790
+ return Tr(s, i, l, e, t.nonenumerable), s;
1791
+ }, {});
1792
+ }
1793
+ var b = class {
1794
+ /**
1795
+ * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
1796
+ */
1797
+ constructor({ dedupe: e = !1 } = {}) {
1798
+ this.classRegistry = new Jn(), this.symbolRegistry = new Qt((t) => t.description ?? ""), this.customTransformerRegistry = new nr(), this.allowedErrorProps = [], this.dedupe = e;
1799
+ }
1800
+ serialize(e) {
1801
+ const t = /* @__PURE__ */ new Map(), n = rn(e, t, this, this.dedupe), r = {
1802
+ json: n.transformedValue
1803
+ };
1804
+ n.annotations && (r.meta = {
1805
+ ...r.meta,
1806
+ values: n.annotations
1807
+ });
1808
+ const s = Or(t, this.dedupe);
1809
+ return s && (r.meta = {
1810
+ ...r.meta,
1811
+ referentialEqualities: s
1812
+ }), r;
1813
+ }
1814
+ deserialize(e) {
1815
+ const { json: t, meta: n } = e;
1816
+ let r = ct(t);
1817
+ return n != null && n.values && (r = br(r, n.values, this)), n != null && n.referentialEqualities && (r = Sr(r, n.referentialEqualities)), r;
1818
+ }
1819
+ stringify(e) {
1820
+ return JSON.stringify(this.serialize(e));
1821
+ }
1822
+ parse(e) {
1823
+ return this.deserialize(JSON.parse(e));
1824
+ }
1825
+ registerClass(e, t) {
1826
+ this.classRegistry.register(e, t);
1827
+ }
1828
+ registerSymbol(e, t) {
1829
+ this.symbolRegistry.register(e, t);
1830
+ }
1831
+ registerCustom(e, t) {
1832
+ this.customTransformerRegistry.register({
1833
+ name: t,
1834
+ ...e
1835
+ });
1836
+ }
1837
+ allowErrorProps(...e) {
1838
+ this.allowedErrorProps.push(...e);
1839
+ }
1840
+ };
1841
+ b.defaultInstance = new b();
1842
+ b.serialize = b.defaultInstance.serialize.bind(b.defaultInstance);
1843
+ b.deserialize = b.defaultInstance.deserialize.bind(b.defaultInstance);
1844
+ b.stringify = b.defaultInstance.stringify.bind(b.defaultInstance);
1845
+ b.parse = b.defaultInstance.parse.bind(b.defaultInstance);
1846
+ b.registerClass = b.defaultInstance.registerClass.bind(b.defaultInstance);
1847
+ b.registerSymbol = b.defaultInstance.registerSymbol.bind(b.defaultInstance);
1848
+ b.registerCustom = b.defaultInstance.registerCustom.bind(b.defaultInstance);
1849
+ b.allowErrorProps = b.defaultInstance.allowErrorProps.bind(b.defaultInstance);
1850
+ var xr = b.serialize, ns = b.stringify;
1851
+ function rs(e) {
1852
+ return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
1853
+ }
1854
+ function ss(e, t) {
1855
+ return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
1856
+ }
1857
+ function is({
1858
+ queryState: e,
1859
+ observerCount: t,
1860
+ isStale: n
1861
+ }) {
1862
+ return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
1863
+ }
1864
+ function os({
1865
+ status: e,
1866
+ isPaused: t
1867
+ }) {
1868
+ return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
1869
+ }
1870
+ function ls(e) {
1871
+ return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
1872
+ }
1873
+ var as = (e, t = !1) => {
1874
+ const {
1875
+ json: n
1876
+ } = xr(e);
1877
+ return JSON.stringify(n, null, t ? 2 : void 0);
1878
+ }, Me = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Nr = (e, t) => e.queryHash.localeCompare(t.queryHash), on = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, kr = (e, t) => Me(e) === Me(t) ? on(e, t) : Me(e) > Me(t) ? 1 : -1, us = {
1879
+ status: kr,
1880
+ "query hash": Nr,
1881
+ "last updated": on
1882
+ }, De = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, ln = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Pr = (e, t) => De(e) === De(t) ? ln(e, t) : De(e) > De(t) ? 1 : -1, cs = {
1883
+ status: Pr,
1884
+ "last updated": ln
1885
+ }, fs = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), ds = () => {
1886
+ const [e, t] = A("dark");
1887
+ return gn(() => {
1888
+ const n = window.matchMedia("(prefers-color-scheme: dark)");
1889
+ t(n.matches ? "dark" : "light");
1890
+ const r = (s) => {
1891
+ t(s.matches ? "dark" : "light");
1892
+ };
1893
+ n.addEventListener("change", r), me(() => n.removeEventListener("change", r));
1894
+ }), e;
1895
+ }, Le = (e, t, n) => {
1896
+ if (t.length === 0)
1897
+ return n;
1898
+ if (e instanceof Map) {
1899
+ const r = new Map(e);
1900
+ if (t.length === 1)
1901
+ return r.set(t[0], n), r;
1902
+ const [s, ...i] = t;
1903
+ return r.set(s, Le(r.get(s), i, n)), r;
1904
+ }
1905
+ if (e instanceof Set) {
1906
+ const r = Le(Array.from(e), t, n);
1907
+ return new Set(r);
1908
+ }
1909
+ if (Array.isArray(e)) {
1910
+ const r = [...e];
1911
+ if (t.length === 1)
1912
+ return r[t[0]] = n, r;
1913
+ const [s, ...i] = t;
1914
+ return r[s] = Le(r[s], i, n), r;
1915
+ }
1916
+ if (e instanceof Object) {
1917
+ const r = {
1918
+ ...e
1919
+ };
1920
+ if (t.length === 1)
1921
+ return r[t[0]] = n, r;
1922
+ const [s, ...i] = t;
1923
+ return r[s] = Le(r[s], i, n), r;
1924
+ }
1925
+ return e;
1926
+ }, Ve = (e, t) => {
1927
+ if (e instanceof Map) {
1928
+ const n = new Map(e);
1929
+ if (t.length === 1)
1930
+ return n.delete(t[0]), n;
1931
+ const [r, ...s] = t;
1932
+ return n.set(r, Ve(n.get(r), s)), n;
1933
+ }
1934
+ if (e instanceof Set) {
1935
+ const n = Ve(Array.from(e), t);
1936
+ return new Set(n);
1937
+ }
1938
+ if (Array.isArray(e)) {
1939
+ const n = [...e];
1940
+ if (t.length === 1)
1941
+ return n.filter((i, o) => o.toString() !== t[0]);
1942
+ const [r, ...s] = t;
1943
+ return n[r] = Ve(n[r], s), n;
1944
+ }
1945
+ if (e instanceof Object) {
1946
+ const n = {
1947
+ ...e
1948
+ };
1949
+ if (t.length === 1)
1950
+ return delete n[t[0]], n;
1951
+ const [r, ...s] = t;
1952
+ return n[r] = Ve(n[r], s), n;
1953
+ }
1954
+ return e;
1955
+ }, an = (e, t) => {
1956
+ if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober")))
1957
+ return;
1958
+ const r = document.createElement("style"), s = document.createTextNode("");
1959
+ r.appendChild(s), r.id = "_goober", r.setAttribute("nonce", e), t ? t.appendChild(r) : document.head.appendChild(r);
1960
+ }, W, Ae, Ee, Oe, q, Ce, Y, Z, J, ee, te, ne, Te, Et, Ir = (Et = class {
1961
+ constructor(e) {
1962
+ v(this, W);
1963
+ v(this, Ae);
1964
+ v(this, Ee);
1965
+ v(this, Oe);
1966
+ v(this, q, !1);
1967
+ v(this, Ce);
1968
+ v(this, Y);
1969
+ v(this, Z);
1970
+ v(this, J);
1971
+ v(this, ee);
1972
+ v(this, te);
1973
+ v(this, ne);
1974
+ v(this, Te);
1975
+ const {
1976
+ client: t,
1977
+ queryFlavor: n,
1978
+ version: r,
1979
+ onlineManager: s,
1980
+ buttonPosition: i,
1981
+ position: o,
1982
+ initialIsOpen: l,
1983
+ errorTypes: a,
1984
+ styleNonce: u,
1985
+ shadowDOMTarget: f
1986
+ } = e;
1987
+ p(this, W, A(t)), p(this, Ee, n), p(this, Oe, r), p(this, Ae, s), p(this, Ce, u), p(this, Y, f), p(this, Z, A(i)), p(this, J, A(o)), p(this, ee, A(l)), p(this, te, A(a));
1988
+ }
1989
+ setButtonPosition(e) {
1990
+ d(this, Z)[1](e);
1991
+ }
1992
+ setPosition(e) {
1993
+ d(this, J)[1](e);
1994
+ }
1995
+ setInitialIsOpen(e) {
1996
+ d(this, ee)[1](e);
1997
+ }
1998
+ setErrorTypes(e) {
1999
+ d(this, te)[1](e);
2000
+ }
2001
+ setClient(e) {
2002
+ d(this, W)[1](e);
2003
+ }
2004
+ mount(e) {
2005
+ if (d(this, q))
2006
+ throw new Error("Devtools is already mounted");
2007
+ const t = qt(() => {
2008
+ const n = this, [r] = d(this, Z), [s] = d(this, J), [i] = d(this, ee), [o] = d(this, te), [l] = d(this, W);
2009
+ let a;
2010
+ return d(this, ne) ? a = d(this, ne) : (a = jt(() => import("./J3FDRF32-DpD_L3XO.mjs")), p(this, ne, a)), an(d(this, Ce), d(this, Y)), $t(a, Bt({
2011
+ get queryFlavor() {
2012
+ return d(n, Ee);
2013
+ },
2014
+ get version() {
2015
+ return d(n, Oe);
2016
+ },
2017
+ get onlineManager() {
2018
+ return d(n, Ae);
2019
+ },
2020
+ get shadowDOMTarget() {
2021
+ return d(n, Y);
2022
+ }
2023
+ }, {
2024
+ get client() {
2025
+ return l();
2026
+ },
2027
+ get buttonPosition() {
2028
+ return r();
2029
+ },
2030
+ get position() {
2031
+ return s();
2032
+ },
2033
+ get initialIsOpen() {
2034
+ return i();
2035
+ },
2036
+ get errorTypes() {
2037
+ return o();
2038
+ }
2039
+ }));
2040
+ }, e);
2041
+ p(this, q, !0), p(this, Te, t);
2042
+ }
2043
+ unmount() {
2044
+ var e;
2045
+ if (!d(this, q))
2046
+ throw new Error("Devtools is not mounted");
2047
+ (e = d(this, Te)) == null || e.call(this), p(this, q, !1);
2048
+ }
2049
+ }, W = new WeakMap(), Ae = new WeakMap(), Ee = new WeakMap(), Oe = new WeakMap(), q = new WeakMap(), Ce = new WeakMap(), Y = new WeakMap(), Z = new WeakMap(), J = new WeakMap(), ee = new WeakMap(), te = new WeakMap(), ne = new WeakMap(), Te = new WeakMap(), Et), re, xe, Ne, ke, F, Pe, se, ie, oe, le, ae, ue, ce, Ie, Ot, Rr = (Ot = class {
2050
+ constructor(e) {
2051
+ v(this, re);
2052
+ v(this, xe);
2053
+ v(this, Ne);
2054
+ v(this, ke);
2055
+ v(this, F, !1);
2056
+ v(this, Pe);
2057
+ v(this, se);
2058
+ v(this, ie);
2059
+ v(this, oe);
2060
+ v(this, le);
2061
+ v(this, ae);
2062
+ v(this, ue);
2063
+ v(this, ce);
2064
+ v(this, Ie);
2065
+ const {
2066
+ client: t,
2067
+ queryFlavor: n,
2068
+ version: r,
2069
+ onlineManager: s,
2070
+ buttonPosition: i,
2071
+ position: o,
2072
+ initialIsOpen: l,
2073
+ errorTypes: a,
2074
+ styleNonce: u,
2075
+ shadowDOMTarget: f,
2076
+ onClose: c
2077
+ } = e;
2078
+ p(this, re, A(t)), p(this, Ne, n), p(this, ke, r), p(this, xe, s), p(this, Pe, u), p(this, se, f), p(this, ie, A(i)), p(this, oe, A(o)), p(this, le, A(l)), p(this, ae, A(a)), p(this, ue, A(c));
2079
+ }
2080
+ setButtonPosition(e) {
2081
+ d(this, ie)[1](e);
2082
+ }
2083
+ setPosition(e) {
2084
+ d(this, oe)[1](e);
2085
+ }
2086
+ setInitialIsOpen(e) {
2087
+ d(this, le)[1](e);
2088
+ }
2089
+ setErrorTypes(e) {
2090
+ d(this, ae)[1](e);
2091
+ }
2092
+ setClient(e) {
2093
+ d(this, re)[1](e);
2094
+ }
2095
+ setOnClose(e) {
2096
+ d(this, ue)[1](() => e);
2097
+ }
2098
+ mount(e) {
2099
+ if (d(this, F))
2100
+ throw new Error("Devtools is already mounted");
2101
+ const t = qt(() => {
2102
+ const n = this, [r] = d(this, ie), [s] = d(this, oe), [i] = d(this, le), [o] = d(this, ae), [l] = d(this, re), [a] = d(this, ue);
2103
+ let u;
2104
+ return d(this, ce) ? u = d(this, ce) : (u = jt(() => import("./3VW64HDT-B55s2eeV.mjs")), p(this, ce, u)), an(d(this, Pe), d(this, se)), $t(u, Bt({
2105
+ get queryFlavor() {
2106
+ return d(n, Ne);
2107
+ },
2108
+ get version() {
2109
+ return d(n, ke);
2110
+ },
2111
+ get onlineManager() {
2112
+ return d(n, xe);
2113
+ },
2114
+ get shadowDOMTarget() {
2115
+ return d(n, se);
2116
+ }
2117
+ }, {
2118
+ get client() {
2119
+ return l();
2120
+ },
2121
+ get buttonPosition() {
2122
+ return r();
2123
+ },
2124
+ get position() {
2125
+ return s();
2126
+ },
2127
+ get initialIsOpen() {
2128
+ return i();
2129
+ },
2130
+ get errorTypes() {
2131
+ return o();
2132
+ },
2133
+ get onClose() {
2134
+ return a();
2135
+ }
2136
+ }));
2137
+ }, e);
2138
+ p(this, F, !0), p(this, Ie, t);
2139
+ }
2140
+ unmount() {
2141
+ var e;
2142
+ if (!d(this, F))
2143
+ throw new Error("Devtools is not mounted");
2144
+ (e = d(this, Ie)) == null || e.call(this), p(this, F, !1);
2145
+ }
2146
+ }, re = new WeakMap(), xe = new WeakMap(), Ne = new WeakMap(), ke = new WeakMap(), F = new WeakMap(), Pe = new WeakMap(), se = new WeakMap(), ie = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), ce = new WeakMap(), Ie = new WeakMap(), Ot);
2147
+ function Mr(e) {
2148
+ const t = Ct(e.client), n = k.useRef(null), {
2149
+ buttonPosition: r,
2150
+ position: s,
2151
+ initialIsOpen: i,
2152
+ errorTypes: o,
2153
+ styleNonce: l,
2154
+ shadowDOMTarget: a
2155
+ } = e, [u] = k.useState(
2156
+ new Ir({
2157
+ client: t,
2158
+ queryFlavor: "React Query",
2159
+ version: "5",
2160
+ onlineManager: Tt,
2161
+ buttonPosition: r,
2162
+ position: s,
2163
+ initialIsOpen: i,
2164
+ errorTypes: o,
2165
+ styleNonce: l,
2166
+ shadowDOMTarget: a
2167
+ })
2168
+ );
2169
+ return k.useEffect(() => {
2170
+ u.setClient(t);
2171
+ }, [t, u]), k.useEffect(() => {
2172
+ r && u.setButtonPosition(r);
2173
+ }, [r, u]), k.useEffect(() => {
2174
+ s && u.setPosition(s);
2175
+ }, [s, u]), k.useEffect(() => {
2176
+ u.setInitialIsOpen(i || !1);
2177
+ }, [i, u]), k.useEffect(() => {
2178
+ u.setErrorTypes(o || []);
2179
+ }, [o, u]), k.useEffect(() => (n.current && u.mount(n.current), () => {
2180
+ u.unmount();
2181
+ }), [u]), /* @__PURE__ */ xt("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
2182
+ }
2183
+ function Dr(e) {
2184
+ const t = Ct(e.client), n = k.useRef(null), { errorTypes: r, styleNonce: s, shadowDOMTarget: i } = e, [o] = k.useState(
2185
+ new Rr({
2186
+ client: t,
2187
+ queryFlavor: "React Query",
2188
+ version: "5",
2189
+ onlineManager: Tt,
2190
+ buttonPosition: "bottom-left",
2191
+ position: "bottom",
2192
+ initialIsOpen: !0,
2193
+ errorTypes: r,
2194
+ styleNonce: s,
2195
+ shadowDOMTarget: i,
2196
+ onClose: e.onClose
2197
+ })
2198
+ );
2199
+ return k.useEffect(() => {
2200
+ o.setClient(t);
2201
+ }, [t, o]), k.useEffect(() => {
2202
+ o.setOnClose(e.onClose ?? (() => {
2203
+ }));
2204
+ }, [e.onClose, o]), k.useEffect(() => {
2205
+ o.setErrorTypes(r || []);
2206
+ }, [r, o]), k.useEffect(() => (n.current && o.mount(n.current), () => {
2207
+ o.unmount();
2208
+ }), [o]), /* @__PURE__ */ xt(
2209
+ "div",
2210
+ {
2211
+ style: { height: "500px", ...e.style },
2212
+ className: "tsqd-parent-container",
2213
+ ref: n
2214
+ }
2215
+ );
2216
+ }
2217
+ var Lr = process.env.NODE_ENV !== "development" ? function() {
2218
+ return null;
2219
+ } : Mr, Vr = process.env.NODE_ENV !== "development" ? function() {
2220
+ return null;
2221
+ } : Dr;
2222
+ const hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2223
+ __proto__: null,
2224
+ ReactQueryDevtools: Lr,
2225
+ ReactQueryDevtoolsPanel: Vr
2226
+ }, Symbol.toStringTag, { value: "Module" }));
2227
+ export {
2228
+ kt as $,
2229
+ ls as A,
2230
+ as as B,
2231
+ fs as C,
2232
+ T as D,
2233
+ Fr as E,
2234
+ Gr as F,
2235
+ Qn as G,
2236
+ Bt as H,
2237
+ K as I,
2238
+ xr as J,
2239
+ Hr as K,
2240
+ Le as L,
2241
+ qn as M,
2242
+ ns as N,
2243
+ Yr as O,
2244
+ es as P,
2245
+ Wr as Q,
2246
+ Ve as R,
2247
+ Xr as S,
2248
+ Tn as T,
2249
+ ts as U,
2250
+ fn as V,
2251
+ hs as W,
2252
+ $t as a,
2253
+ Kr as b,
2254
+ P as c,
2255
+ A as d,
2256
+ Rt as e,
2257
+ Q as f,
2258
+ ds as g,
2259
+ Un as h,
2260
+ it as i,
2261
+ Ur as j,
2262
+ st as k,
2263
+ Jr as l,
2264
+ cs as m,
2265
+ $n as n,
2266
+ gn as o,
2267
+ me as p,
2268
+ ss as q,
2269
+ zn as r,
2270
+ us as s,
2271
+ Zr as t,
2272
+ Qr as u,
2273
+ zr as v,
2274
+ jr as w,
2275
+ rs as x,
2276
+ os as y,
2277
+ is as z
2278
+ };