@pie-players/pie-tool-theme 1.0.0-beta.1 → 1.0.0-beta.10

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.
@@ -1,2778 +1,17 @@
1
- import { coerceBooleanAttributes as vs } from "@pie-players/pie-players-shared/ui/attribute-coercion";
2
- import { ZIndexLayer as hs, connectToolRuntimeContext as _s, createToolCoordinatorRegistration as ps } from "@pie-players/pie-assessment-toolkit/tools/registration";
3
- import { applyPieColorScheme as gs, listPieColorSchemes as ms, observePieColorSchemes as ws, resolvePieThemeHost as bs } from "@pie-players/pie-theme";
4
- import { createFocusTrap as ys } from "@pie-players/pie-players-shared";
5
- import { resolveInterfaceI18n as ks } from "@pie-players/pie-players-shared/i18n/provider";
6
- if (typeof window < "u") {
7
- var Mn, An;
8
- ((Mn = (An = window).__svelte ?? (An.__svelte = {})).v ?? (Mn.v = /* @__PURE__ */ new Set())).add("5");
9
- }
10
- var bt = {}, q = /* @__PURE__ */ Symbol("uninitialized");
11
- var Xn = Array.isArray, $s = Array.prototype.indexOf, vr = Array.prototype.includes, Mr = Array.from, hr = Object.keys, qt = Object.defineProperty, et = Object.getOwnPropertyDescriptor, xs = Object.getOwnPropertyDescriptors, Ss = Object.prototype, Es = Array.prototype, Jn = Object.getPrototypeOf, On = Object.isExtensible, Ts = () => {
12
- };
13
- function Ms(e) {
14
- for (var t = 0; t < e.length; t++) e[t]();
15
- }
16
- function Qn() {
17
- var e, t;
18
- return {
19
- promise: new Promise((r, n) => {
20
- e = r, t = n;
21
- }),
22
- resolve: e,
23
- reject: t
24
- };
25
- }
26
- function Ht(e) {
27
- "@babel/helpers - typeof";
28
- return Ht = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
29
- return typeof t;
30
- } : function(t) {
31
- return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
32
- }, Ht(e);
33
- }
34
- function As(e, t) {
35
- if (Ht(e) != "object" || !e) return e;
36
- var r = e[Symbol.toPrimitive];
37
- if (r !== void 0) {
38
- var n = r.call(e, t || "default");
39
- if (Ht(n) != "object") return n;
40
- throw new TypeError("@@toPrimitive must return a primitive value.");
41
- }
42
- return (t === "string" ? String : Number)(e);
43
- }
44
- function Os(e) {
45
- var t = As(e, "string");
46
- return Ht(t) == "symbol" ? t : t + "";
47
- }
48
- function I(e, t, r) {
49
- return (t = Os(t)) in e ? Object.defineProperty(e, t, {
50
- value: r,
51
- enumerable: !0,
52
- configurable: !0,
53
- writable: !0
54
- }) : e[t] = r, e;
55
- }
56
- var Ca = 1 << 24, ue = 1024, oe = 2048, ot = 4096, ln = 8192, Cs = 16384, fn = 32768, Cn = 1 << 25, un = 65536, Ra = 1 << 17, Pa = 1 << 18, St = 1 << 19, Rs = 1 << 20, Lt = 1 << 25, Rn = 1 << 21, Ps = 1 << 22, _r = 1 << 23, jt = /* @__PURE__ */ Symbol("$state"), ei = /* @__PURE__ */ Symbol("component"), ti = /* @__PURE__ */ Symbol("legacy props"), Is = /* @__PURE__ */ Symbol(""), Ns = /* @__PURE__ */ Symbol("proxy path"), Yr = /* @__PURE__ */ Symbol("attributes"), Kr = /* @__PURE__ */ Symbol("class"), Vr = /* @__PURE__ */ Symbol("style"), fr = /* @__PURE__ */ Symbol("text");
57
- var Kt = new class extends Error {
58
- constructor(...t) {
59
- super(...t), I(this, "name", "StaleReactionError"), I(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
60
- }
61
- }(), Ws = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
62
- function Ls() {
63
- console.warn("https://svelte.dev/e/derived_inert");
64
- }
65
- function Ar(e) {
66
- console.warn("https://svelte.dev/e/hydration_mismatch");
67
- }
68
- function js() {
69
- console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
70
- }
71
- var O = !1;
72
- function Ie(e) {
73
- O = e;
74
- }
75
- var C;
76
- function Z(e) {
77
- if (e === null)
78
- throw Ar(), bt;
79
- return C = e;
80
- }
81
- function Or() {
82
- return Z(/* @__PURE__ */ Ce(C));
83
- }
84
- function J(e) {
85
- if (O) {
86
- if (/* @__PURE__ */ Ce(C) !== null)
87
- throw Ar(), bt;
88
- C = e;
89
- }
90
- }
91
- function ri(e = 1) {
92
- if (O) {
93
- for (var t = e, r = C; t--; ) r = /* @__PURE__ */ Ce(r);
94
- C = r;
95
- }
96
- }
97
- function pr(e = !0) {
98
- for (var t = 0, r = C; ; ) {
99
- if (r.nodeType === 8) {
100
- var n = r.data;
101
- if (n === "]") {
102
- if (t === 0) return r;
103
- t -= 1;
104
- } else (n === "[" || n === "[!" || n[0] === "[" && !isNaN(Number(n.slice(1)))) && (t += 1);
105
- }
106
- var i = /* @__PURE__ */ Ce(r);
107
- e && r.remove(), r = i;
108
- }
109
- }
110
- function ni(e) {
111
- if (!e || e.nodeType !== 8)
112
- throw Ar(), bt;
113
- return e.data;
114
- }
115
- function ii(e) {
116
- return e === this.v;
117
- }
118
- function Ds(e, t) {
119
- return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
120
- }
121
- function si(e) {
122
- return !Ds(e, this.v);
123
- }
124
- function Fs(e) {
125
- throw new Error("https://svelte.dev/e/lifecycle_outside_component");
126
- }
127
- function qs() {
128
- throw new Error("https://svelte.dev/e/async_derived_orphan");
129
- }
130
- function Hs(e, t, r) {
131
- throw new Error("https://svelte.dev/e/each_key_duplicate");
132
- }
133
- function zs(e) {
134
- throw new Error("https://svelte.dev/e/effect_in_teardown");
135
- }
136
- function Bs() {
137
- throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
138
- }
139
- function Us(e) {
140
- throw new Error("https://svelte.dev/e/effect_orphan");
141
- }
142
- function Ys() {
143
- throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
144
- }
145
- function Ks() {
146
- throw new Error("https://svelte.dev/e/hydration_failed");
147
- }
148
- function Vs(e) {
149
- throw new Error("https://svelte.dev/e/props_invalid_value");
150
- }
151
- function Gs() {
152
- throw new Error("https://svelte.dev/e/state_descriptors_fixed");
153
- }
154
- function Zs() {
155
- throw new Error("https://svelte.dev/e/state_prototype_fixed");
156
- }
157
- function Xs() {
158
- throw new Error("https://svelte.dev/e/state_unsafe_mutation");
159
- }
160
- function Js() {
161
- throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
162
- }
163
- var Be = !1, Vt = !1;
164
- function Pn(e, t) {
165
- return e.label = t, Qs(e.v, t), e;
166
- }
167
- function Qs(e, t) {
168
- return e?.[Ns]?.(t), e;
169
- }
170
- var W = null;
171
- function yt(e) {
172
- W = e;
173
- }
174
- function oi(e, t = !1, r) {
175
- W = {
176
- p: W,
177
- i: !1,
178
- c: null,
179
- e: null,
180
- s: e,
181
- x: null,
182
- r: E,
183
- l: Vt && !t ? {
184
- s: null,
185
- u: null,
186
- $: []
187
- } : null
188
- };
189
- }
190
- function ai(e) {
191
- var t = W, r = t.e;
192
- if (r !== null) {
193
- t.e = null;
194
- for (var n of r) Oi(n);
195
- }
196
- return e !== void 0 && (t.x = e), t.i = !0, W = t.p, cn(e);
197
- }
198
- function cn(e = {}) {
199
- return qt(e, ei, { value: !0 }), e;
200
- }
201
- function Gt() {
202
- return !Vt || W !== null && W.l === null;
203
- }
204
- var Xe = [];
205
- function li() {
206
- var e = Xe;
207
- Xe = [], Ms(e);
208
- }
209
- function ze(e) {
210
- if (Xe.length === 0 && !Dt) {
211
- var t = Xe;
212
- queueMicrotask(() => {
213
- t === Xe && li();
214
- });
215
- }
216
- Xe.push(e);
217
- }
218
- function eo() {
219
- for (; Xe.length > 0; ) li();
220
- }
221
- var to = ~(oe | ot | ue);
222
- function j(e, t) {
223
- e.f = e.f & to | t;
224
- }
225
- function dn(e) {
226
- (e.f & 512) !== 0 || e.deps === null ? j(e, ue) : j(e, ot);
227
- }
228
- function fi(e, t, r) {
229
- (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), j(e, ue);
230
- }
231
- function Cr(e) {
232
- var t = T, r = E;
233
- de(null), Oe(null);
234
- try {
235
- return e();
236
- } finally {
237
- de(t), Oe(r);
238
- }
239
- }
240
- function ro(e, t, r, n) {
241
- const i = Gt() ? zt : vn;
242
- var s = e.filter((u) => !u.settled), o = t.map(i);
243
- if (r.length === 0 && s.length === 0) {
244
- n(o);
245
- return;
246
- }
247
- var l = E, f = no(), h = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((u) => u.promise)) : null;
248
- function _(u) {
249
- if ((l.f & 16384) === 0) {
250
- f();
251
- try {
252
- n([...o, ...u]);
253
- } catch (g) {
254
- Ae(g, l);
255
- }
256
- gr();
257
- }
258
- }
259
- var c = ui();
260
- if (r.length === 0) {
261
- h.then(() => _([])).finally(c);
262
- return;
263
- }
264
- function v() {
265
- Promise.all(r.map((u) => /* @__PURE__ */ so(u))).then(_).catch((u) => Ae(u, l)).finally(c);
266
- }
267
- h ? h.then(() => {
268
- f(), v(), gr();
269
- }) : v();
270
- }
271
- function no() {
272
- var e = E, t = T, r = W, n = S;
273
- if (0) var i;
274
- return function(o = !0) {
275
- Oe(e), de(t), yt(r), o && (e.f & 16384) === 0 && (n?.activate(), n?.apply());
276
- };
277
- }
278
- var io = !1;
279
- function gr(e = !0) {
280
- io = !1, Oe(null), de(null), yt(null), e && S?.deactivate();
281
- }
282
- function ui() {
283
- var e = E, t = e.b, r = S, n = !!t?.is_rendered();
284
- return t?.update_pending_count(1, r), r.increment(n, e), () => {
285
- t?.update_pending_count(-1, r), r.decrement(n, e);
286
- };
287
- }
288
- // @__NO_SIDE_EFFECTS__
289
- function zt(e) {
290
- var t = 2 | oe;
291
- return E !== null && (E.f |= St), {
292
- ctx: W,
293
- deps: null,
294
- effects: null,
295
- equals: ii,
296
- f: t,
297
- fn: e,
298
- reactions: null,
299
- rv: 0,
300
- v: q,
301
- wv: 0,
302
- parent: E,
303
- ac: null
304
- };
305
- }
306
- var Rt = /* @__PURE__ */ Symbol("obsolete");
307
- // @__NO_SIDE_EFFECTS__
308
- function so(e, t, r) {
309
- let n = E;
310
- n === null && qs();
311
- var i = void 0, s = st(q), o = !T, l = /* @__PURE__ */ new Set();
312
- return So(() => {
313
- var f = E, h = Qn();
314
- i = h.promise;
315
- try {
316
- Promise.resolve(e()).then(h.resolve, (u) => {
317
- u !== Kt && h.reject(u);
318
- }).finally(gr);
319
- } catch (u) {
320
- h.reject(u), gr();
321
- }
322
- var _ = S;
323
- if (o) {
324
- if ((f.f & 32768) !== 0) var c = ui();
325
- if (n.b?.is_rendered()) _.async_deriveds.get(f)?.reject(Rt);
326
- else for (const u of l.values()) u.reject(Rt);
327
- l.add(h), _.async_deriveds.set(f, h);
328
- }
329
- const v = (u, g = void 0) => {
330
- c?.(), l.delete(h), g !== Rt && (_.activate(), g ? (s.f |= _r, kt(s, g)) : ((s.f & 8388608) !== 0 && (s.f ^= _r), kt(s, u)), _.deactivate());
331
- };
332
- h.promise.then(v, (u) => v(null, u || "unknown"));
333
- }), ko(() => {
334
- for (const f of l) f.reject(Rt);
335
- }), new Promise((f) => {
336
- function h(_) {
337
- function c() {
338
- _ === i ? f(s) : h(i);
339
- }
340
- _.then(c, c);
341
- }
342
- h(i);
343
- });
344
- }
345
- // @__NO_SIDE_EFFECTS__
346
- function Ue(e) {
347
- const t = /* @__PURE__ */ zt(e);
348
- return Be || Wi(t), t;
349
- }
350
- // @__NO_SIDE_EFFECTS__
351
- function vn(e) {
352
- const t = /* @__PURE__ */ zt(e);
353
- return t.equals = si, t;
354
- }
355
- function oo(e) {
356
- var t = e.effects;
357
- if (t !== null) {
358
- e.effects = null;
359
- for (var r = 0; r < t.length; r += 1) X(t[r]);
360
- }
361
- }
362
- function hn(e) {
363
- var t, r = E, n = e.parent;
364
- if (!Le && n !== null && e.v !== q && (n.f & 24576) !== 0)
365
- return Ls(), e.v;
366
- Oe(n);
367
- try {
368
- oo(e), t = Fi(e);
369
- } finally {
370
- Oe(r);
371
- }
372
- return t;
373
- }
374
- function ci(e) {
375
- var t = hn(e);
376
- if (!e.equals(t) && (e.wv = ji(), (!S?.is_fork || e.deps === null) && (S !== null ? (S.capture(e, t, !0), Gr?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
377
- j(e, ue);
378
- return;
379
- }
380
- Le || (V !== null ? (wn() || S?.is_fork) && V.set(e, t) : dn(e));
381
- }
382
- function ao(e) {
383
- if (e.effects !== null)
384
- for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && Cr(() => {
385
- t.ac.abort(Kt), t.ac = null;
386
- }), t.fn !== null && (t.teardown = Ts), Ut(t, 0), kn(t));
387
- }
388
- function di(e) {
389
- if (e.effects !== null)
390
- for (const t of e.effects) t.teardown && t.fn !== null && $t(t);
391
- }
392
- function vi(e, t) {
393
- if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
394
- }
395
- function _n(e, t) {
396
- vi(e, t), t.add(e);
397
- }
398
- function y(e, t, r) {
399
- vi(e, t), t.set(e, r);
400
- }
401
- function k(e, t, r) {
402
- if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r;
403
- throw new TypeError("Private element is not present on this object");
404
- }
405
- function b(e, t, r) {
406
- return e.set(k(e, t), r), r;
407
- }
408
- function a(e, t) {
409
- return e.get(k(e, t));
410
- }
411
- var hi, mr = null, ht = null, S = null, Gr = null, V = null, Zr = null, Dt = !1, Nr = !1, Bt = null, wr = null, _i = 0;
412
- var lo = 1, br = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), yr = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakMap(), ur = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakSet(), at = class pi {
413
- constructor() {
414
- _n(this, N), I(this, "id", lo++), y(this, br, !1), I(this, "linked", !0), y(this, tt, null), y(this, Je, null), I(this, "async_deriveds", /* @__PURE__ */ new Map()), I(this, "current", /* @__PURE__ */ new Map()), I(this, "previous", /* @__PURE__ */ new Map()), y(this, yr, /* @__PURE__ */ new Set()), y(this, nr, /* @__PURE__ */ new Set()), y(this, _t, 0), y(this, Ve, /* @__PURE__ */ new Map()), y(this, Pt, null), y(this, ge, []), y(this, Xr, []), y(this, it, /* @__PURE__ */ new Set()), y(this, Ne, /* @__PURE__ */ new Set()), y(this, qe, /* @__PURE__ */ new Map()), y(this, ur, /* @__PURE__ */ new Set()), I(this, "is_fork", !1), y(this, It, !1), ht === null ? mr = ht = this : (b(Je, ht, this), b(tt, this, ht)), ht = this;
415
- }
416
- skip_effect(t) {
417
- a(qe, this).has(t) || a(qe, this).set(t, {
418
- d: [],
419
- m: []
420
- }), a(ur, this).delete(t);
421
- }
422
- unskip_effect(t, r = (n) => this.schedule(n)) {
423
- var n = a(qe, this).get(t);
424
- if (n) {
425
- a(qe, this).delete(t);
426
- for (var i of n.d)
427
- j(i, oe), r(i);
428
- for (i of n.m)
429
- j(i, ot), r(i);
430
- }
431
- a(ur, this).add(t);
432
- }
433
- capture(t, r, n = !1) {
434
- t.v !== q && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, n]), V?.set(t, r)), this.is_fork || (t.v = r);
435
- }
436
- activate() {
437
- S = this;
438
- }
439
- deactivate() {
440
- S = null, V = null;
441
- }
442
- flush() {
443
- try {
444
- Nr = !0, S = this, k(N, this, kr).call(this);
445
- } finally {
446
- _i = 0, Zr = null, Bt = null, wr = null, Nr = !1, S = null, V = null, Me.clear();
447
- }
448
- }
449
- discard() {
450
- for (const t of a(nr, this)) t(this);
451
- a(nr, this).clear();
452
- for (const t of this.async_deriveds.values()) t.reject(Rt);
453
- k(N, this, $r).call(this), a(Pt, this)?.resolve();
454
- }
455
- register_created_effect(t) {
456
- a(Xr, this).push(t);
457
- }
458
- increment(t, r) {
459
- if (b(_t, this, a(_t, this) + 1), t) {
460
- let n = a(Ve, this).get(r) ?? 0;
461
- a(Ve, this).set(r, n + 1);
462
- }
463
- }
464
- decrement(t, r) {
465
- if (b(_t, this, a(_t, this) - 1), t) {
466
- let n = a(Ve, this).get(r) ?? 0;
467
- n === 1 ? a(Ve, this).delete(r) : a(Ve, this).set(r, n - 1);
468
- }
469
- a(It, this) || (b(It, this, !0), ze(() => {
470
- b(It, this, !1), this.linked && this.flush();
471
- }));
472
- }
473
- transfer_effects(t, r) {
474
- for (const n of t) a(it, this).add(n);
475
- for (const n of r) a(Ne, this).add(n);
476
- t.clear(), r.clear();
477
- }
478
- oncommit(t) {
479
- a(yr, this).add(t);
480
- }
481
- ondiscard(t) {
482
- a(nr, this).add(t);
483
- }
484
- settled() {
485
- return (a(Pt, this) ?? b(Pt, this, Qn())).promise;
486
- }
487
- static ensure() {
488
- if (S === null) {
489
- const t = S = new pi();
490
- !Nr && !Dt && ze(() => {
491
- a(br, t) || t.flush();
492
- });
493
- }
494
- return S;
495
- }
496
- apply() {
497
- if (!Be || !this.is_fork && a(tt, this) === null && a(Je, this) === null) {
498
- V = null;
499
- return;
500
- }
501
- V = /* @__PURE__ */ new Map();
502
- for (const [r, [n]] of this.current) V.set(r, n);
503
- for (let r = mr; r !== null; r = a(Je, r))
504
- if (!(r === this || r.is_fork)) {
505
- var t = !1;
506
- if (r.id < this.id) {
507
- for (const [n, [, i]] of r.current)
508
- if (!i && this.current.has(n)) {
509
- t = !0;
510
- break;
511
- }
512
- }
513
- if (!t)
514
- for (const [n, i] of r.previous) V.has(n) || V.set(n, i);
515
- }
516
- }
517
- schedule(t) {
518
- if (Zr = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
519
- t.b.defer_effect(t);
520
- return;
521
- }
522
- a(ge, this).push(t);
523
- }
524
- };
525
- hi = at;
526
- function In() {
527
- if (this.is_fork) return !0;
528
- for (const r of a(Ve, this).keys()) {
529
- for (var e = r, t = !1; e.parent !== null; ) {
530
- if (a(qe, this).has(e)) {
531
- t = !0;
532
- break;
533
- }
534
- e = e.parent;
535
- }
536
- if (!t) return !0;
537
- }
538
- return !1;
539
- }
540
- function gi() {
541
- var e = [];
542
- for (const i of a(ge, this))
543
- if (!((i.f & 16384) !== 0 || (i.f & 6144) === 0)) {
544
- for (var t = i, r = !1; t.parent !== null; ) {
545
- t = t.parent;
546
- var n = t.f;
547
- if ((n & 96) !== 0) {
548
- if ((n & 1024) === 0) {
549
- r = !0;
550
- break;
551
- }
552
- t.f ^= ue;
553
- }
554
- }
555
- r || e.push(t);
556
- }
557
- return b(ge, this, []), e;
558
- }
559
- function kr() {
560
- b(br, this, !0);
561
- for (const o of a(it, this))
562
- a(Ne, this).delete(o), j(o, oe), this.schedule(o);
563
- for (const o of a(Ne, this))
564
- j(o, ot), this.schedule(o);
565
- this.apply();
566
- for (var e = Bt = [], t = [], r = wr = []; a(ge, this).length > 0; ) {
567
- _i++ > 1e3 && (k(N, this, $r).call(this), vo());
568
- for (const o of k(N, this, gi).call(this)) try {
569
- k(N, this, mi).call(this, o, e, t);
570
- } catch (l) {
571
- throw yi(o), k(N, this, In).call(this) || this.discard(), l;
572
- }
573
- }
574
- if (S = null, r.length > 0) {
575
- var n = hi.ensure();
576
- for (const o of r) n.schedule(o);
577
- }
578
- if (Bt = null, wr = null, k(N, this, In).call(this)) {
579
- k(N, this, Nt).call(this, t), k(N, this, Nt).call(this, e);
580
- for (const [o, l] of a(qe, this)) bi(o, l);
581
- r.length > 0 && k(N, S, kr).call(S);
582
- return;
583
- }
584
- const i = k(N, this, fo).call(this);
585
- if (i) {
586
- k(N, this, Nt).call(this, t), k(N, this, Nt).call(this, e), k(N, i, uo).call(i, this);
587
- return;
588
- }
589
- a(it, this).clear(), a(Ne, this).clear();
590
- for (const o of a(yr, this)) o(this);
591
- a(yr, this).clear(), Gr = this, Nn(t), Nn(e), Gr = null, a(Pt, this)?.resolve();
592
- var s = S;
593
- if (a(_t, this) === 0 && (a(ge, this).length === 0 || s !== null) && (k(N, this, $r).call(this), Be && (k(N, this, co).call(this), S = s)), a(ge, this).length > 0)
594
- if (s !== null) {
595
- for (const o of a(ge, this)) a(ge, s).push(o);
596
- b(ge, this, []);
597
- } else s = this;
598
- s !== null && (Me.clear(), k(N, s, kr).call(s));
599
- }
600
- function mi(e, t, r) {
601
- e.f ^= ue;
602
- for (var n = e.first; n !== null; ) {
603
- var i = n.f, s = (i & 96) !== 0;
604
- if (!(s && (i & 1024) !== 0 || (i & 8192) !== 0 || a(qe, this).has(n)) && n.fn !== null) {
605
- s ? n.f ^= ue : (i & 4) !== 0 ? t.push(n) : Be && (i & 16777224) !== 0 ? r.push(n) : Zt(n) && ((i & 16) !== 0 && a(Ne, this).add(n), $t(n));
606
- var o = n.first;
607
- if (o !== null) {
608
- n = o;
609
- continue;
610
- }
611
- }
612
- for (; n !== null; ) {
613
- var l = n.next;
614
- if (l !== null) {
615
- n = l;
616
- break;
617
- }
618
- n = n.parent;
619
- }
620
- }
621
- }
622
- function fo() {
623
- for (var e = a(tt, this); e !== null; ) {
624
- if (!e.is_fork) {
625
- for (const [t, [, r]] of this.current) if (e.current.has(t) && !r) return e;
626
- }
627
- e = a(tt, e);
628
- }
629
- return null;
630
- }
631
- function uo(e) {
632
- for (const [r, n] of e.current)
633
- !this.previous.has(r) && e.previous.has(r) && this.previous.set(r, e.previous.get(r)), this.current.set(r, n);
634
- for (const [r, n] of e.async_deriveds) {
635
- const i = this.async_deriveds.get(r);
636
- i && n.promise.then(i.resolve).catch(i.reject);
637
- }
638
- e.async_deriveds.clear(), this.transfer_effects(a(it, e), a(Ne, e));
639
- const t = (r) => {
640
- var n = r.reactions;
641
- if (n !== null && !((r.f & 2) !== 0 && (r.f & 6144) === 0))
642
- for (const o of n) {
643
- var i = o.f;
644
- if ((i & 2) !== 0) t(o);
645
- else {
646
- var s = o;
647
- i & 4194320 && !this.async_deriveds.has(s) && (a(Ne, this).delete(s), j(s, oe), this.schedule(s));
648
- }
649
- }
650
- };
651
- for (const r of this.current.keys()) t(r);
652
- this.oncommit(() => e.discard()), k(N, e, $r).call(e), S = this, k(N, this, kr).call(this);
653
- }
654
- function Nt(e) {
655
- for (var t = 0; t < e.length; t += 1) fi(e[t], a(it, this), a(Ne, this));
656
- }
657
- function co() {
658
- for (let _ = mr; _ !== null; _ = a(Je, _)) {
659
- var e = _.id < this.id, t = [];
660
- for (const [c, [v, u]] of this.current) {
661
- if (_.current.has(c)) {
662
- var r = _.current.get(c)[0];
663
- if (e && v !== r) _.current.set(c, [v, u]);
664
- else continue;
665
- }
666
- t.push(c);
667
- }
668
- if (e) for (const [c, v] of this.async_deriveds) {
669
- const u = _.async_deriveds.get(c);
670
- u && v.promise.then(u.resolve).catch(u.reject);
671
- }
672
- var n = [..._.current.keys()].filter((c) => !_.current.get(c)[1]);
673
- if (!(!a(br, _) || n.length === 0)) {
674
- var i = n.filter((c) => !this.current.has(c));
675
- if (i.length === 0)
676
- e && _.discard();
677
- else if (t.length > 0) {
678
- if (e) for (const c of a(ur, this)) _.unskip_effect(c, (v) => {
679
- (v.f & 4194320) !== 0 ? _.schedule(v) : k(N, _, Nt).call(_, [v]);
680
- });
681
- _.activate();
682
- var s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
683
- for (var l of t) wi(l, i, s, o);
684
- o = /* @__PURE__ */ new Map();
685
- var f = [..._.current].filter(([c, v]) => {
686
- const u = this.current.get(c);
687
- return u ? u[0] !== v[0] || u[1] !== v[1] : !0;
688
- }).map(([c]) => c);
689
- if (f.length > 0)
690
- for (const c of a(Xr, this)) (c.f & 155648) === 0 && pn(c, f, o) && ((c.f & 4194320) !== 0 ? (j(c, oe), _.schedule(c)) : a(it, _).add(c));
691
- if (a(ge, _).length > 0 && !a(It, _)) {
692
- _.apply();
693
- for (var h of k(N, _, gi).call(_)) k(N, _, mi).call(_, h, [], []);
694
- }
695
- _.deactivate();
696
- }
697
- }
698
- }
699
- }
700
- function $r() {
701
- if (this.linked) {
702
- var e = a(tt, this), t = a(Je, this);
703
- e === null ? mr = t : b(Je, e, t), t === null ? ht = e : b(tt, t, e), this.linked = !1;
704
- }
705
- }
706
- function Jr(e) {
707
- var t = Dt;
708
- Dt = !0;
709
- try {
710
- var r;
711
- for (e && (S !== null && !S.is_fork && S.flush(), r = e()); ; ) {
712
- if (eo(), S === null) return r;
713
- S.flush();
714
- }
715
- } finally {
716
- Dt = t;
717
- }
718
- }
719
- function vo() {
720
- if (0) {
721
- var e;
722
- for (const r of S.current.keys()) for (const [n, i] of r.updated ?? [])
723
- var t;
724
- }
725
- try {
726
- Ys();
727
- } catch (r) {
728
- Ae(r, Zr);
729
- }
730
- }
731
- var Ee = null;
732
- function Nn(e) {
733
- var t = e.length;
734
- if (t !== 0) {
735
- for (var r = 0; r < t; ) {
736
- var n = e[r++];
737
- if ((n.f & 24576) === 0 && Zt(n) && (Ee = /* @__PURE__ */ new Set(), $t(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Pi(n), Ee?.size > 0)) {
738
- Me.clear();
739
- for (const i of Ee) {
740
- if ((i.f & 24576) !== 0) continue;
741
- const s = [i];
742
- let o = i.parent;
743
- for (; o !== null; )
744
- Ee.has(o) && (Ee.delete(o), s.push(o)), o = o.parent;
745
- for (let l = s.length - 1; l >= 0; l--) {
746
- const f = s[l];
747
- (f.f & 24576) === 0 && $t(f);
748
- }
749
- }
750
- Ee.clear();
751
- }
752
- }
753
- Ee = null;
754
- }
755
- }
756
- function wi(e, t, r, n) {
757
- if (!r.has(e) && (r.add(e), e.reactions !== null))
758
- for (const i of e.reactions) {
759
- const s = i.f;
760
- (s & 2) !== 0 ? wi(i, t, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && pn(i, t, n) && (j(i, oe), gn(i));
761
- }
762
- }
763
- function pn(e, t, r) {
764
- const n = r.get(e);
765
- if (n !== void 0) return n;
766
- if (e.deps !== null) for (const i of e.deps) {
767
- if (vr.call(t, i)) return !0;
768
- if ((i.f & 2) !== 0 && pn(i, t, r))
769
- return r.set(i, !0), !0;
770
- }
771
- return r.set(e, !1), !1;
772
- }
773
- function gn(e) {
774
- S.schedule(e);
775
- }
776
- function bi(e, t) {
777
- if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
778
- (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), j(e, ue);
779
- for (var r = e.first; r !== null; )
780
- bi(r, t), r = r.next;
781
- }
782
- }
783
- function yi(e) {
784
- j(e, ue);
785
- for (var t = e.first; t !== null; )
786
- yi(t), t = t.next;
787
- }
788
- var xr = /* @__PURE__ */ new Set(), Me = /* @__PURE__ */ new Map();
789
- var ki = !1;
790
- function st(e, t) {
791
- var r = {
792
- f: 0,
793
- v: e,
794
- reactions: null,
795
- equals: ii,
796
- rv: 0,
797
- wv: 0
798
- };
799
- return r;
800
- }
801
- // @__NO_SIDE_EFFECTS__
802
- function G(e, t) {
803
- const r = st(e, t);
804
- return Wi(r), r;
805
- }
806
- // @__NO_SIDE_EFFECTS__
807
- function $i(e, t = !1, r = !0) {
808
- const n = st(e);
809
- if (t || (n.equals = si), Vt && r && W !== null && W.l !== null) {
810
- var i;
811
- ((i = W.l).s ?? (i.s = [])).push(n);
812
- }
813
- return n;
814
- }
815
- function L(e, t, r = !1) {
816
- T !== null && (!me || (T.f & 131072) !== 0) && Gt() && (T.f & 4325394) !== 0 && (be === null || !be.has(e)) && Xs();
817
- let n = r ? mt(t) : t;
818
- return kt(e, n, wr);
819
- }
820
- var Ze = null, Qr = 0;
821
- function kt(e, t, r = null) {
822
- if (!e.equals(t)) {
823
- Le ? Me.set(e, t) : Me.has(e) || Me.set(e, e.v);
824
- var n = at.ensure();
825
- if (n.capture(e, t), (e.f & 2) !== 0) {
826
- const i = e;
827
- (e.f & 2048) !== 0 && hn(i), V === null && dn(i);
828
- }
829
- e.wv = ji(), Ze = null, Qr = 0, xi(e, oe, r), Ze = null, Gt() && E !== null && (E.f & 1024) !== 0 && (E.f & 96) === 0 && (fe === null ? Ao([e]) : fe.push(e)), !n.is_fork && xr.size > 0 && !ki && ho();
830
- }
831
- return t;
832
- }
833
- function ho() {
834
- ki = !1;
835
- for (const e of xr) {
836
- (e.f & 1024) !== 0 && j(e, ot);
837
- let t;
838
- try {
839
- t = Zt(e);
840
- } catch {
841
- t = !0;
842
- }
843
- t && $t(e);
844
- }
845
- xr.clear();
846
- }
847
- function Ft(e) {
848
- L(e, e.v + 1);
849
- }
850
- function xi(e, t, r) {
851
- var n = e.reactions;
852
- if (n !== null) {
853
- var i = Gt(), s = n.length;
854
- if (Qr += s, Qr > 1e5 && Ze === null && (Ze = /* @__PURE__ */ new Set()), Ze !== null) {
855
- if (Ze.has(e)) return;
856
- Ze.add(e);
857
- }
858
- for (var o = 0; o < s; o++) {
859
- var l = n[o], f = l.f;
860
- if (!(!i && l === E)) {
861
- var h = (f & oe) === 0;
862
- if (h && j(l, t), (f & 131072) !== 0) xr.add(l);
863
- else if ((f & 2) !== 0) {
864
- var _ = l;
865
- V?.delete(_), xi(_, ot, r);
866
- } else if (h) {
867
- var c = l;
868
- (f & 16) !== 0 && Ee !== null && Ee.add(c), r !== null ? r.push(c) : gn(c);
869
- }
870
- }
871
- }
872
- }
873
- }
874
- var _o = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
875
- function mt(e) {
876
- if (typeof e != "object" || e === null || jt in e || ei in e) return e;
877
- const t = Jn(e);
878
- if (t !== Ss && t !== Es) return e;
879
- var r = /* @__PURE__ */ new Map(), n = Xn(e), i = /* @__PURE__ */ G(0), s = null, o = rt, l = (c) => {
880
- if (rt === o) return c();
881
- var v = T, u = rt;
882
- de(null), jn(o);
883
- var g = c();
884
- return de(v), jn(u), g;
885
- };
886
- n && r.set("length", /* @__PURE__ */ G(e.length, s));
887
- var f = "";
888
- let h = !1;
889
- function _(c) {
890
- if (!h) {
891
- h = !0, f = c, Pn(i, `${f} version`);
892
- for (const [v, u] of r) Pn(u, po(f, v));
893
- h = !1;
894
- }
895
- }
896
- return new Proxy(e, {
897
- defineProperty(c, v, u) {
898
- (!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && Gs();
899
- var g = r.get(v);
900
- return g === void 0 ? l(() => {
901
- var m = /* @__PURE__ */ G(u.value, s);
902
- return r.set(v, m), m;
903
- }) : L(g, u.value, !0), !0;
904
- },
905
- deleteProperty(c, v) {
906
- var u = r.get(v);
907
- if (u === void 0) {
908
- if (v in c) {
909
- const g = l(() => /* @__PURE__ */ G(q, s));
910
- r.set(v, g), Ft(i);
911
- }
912
- } else
913
- L(u, q), Ft(i);
914
- return !0;
915
- },
916
- get(c, v, u) {
917
- if (v === jt) return e;
918
- var g = r.get(v), m = v in c;
919
- if (g === void 0 && (!m || et(c, v)?.writable) && (g = l(() => {
920
- var w = mt(m ? c[v] : q), A = /* @__PURE__ */ G(w, s);
921
- return A;
922
- }), r.set(v, g)), g !== void 0) {
923
- var p = d(g);
924
- return p === q ? void 0 : p;
925
- }
926
- return Reflect.get(c, v, u);
927
- },
928
- getOwnPropertyDescriptor(c, v) {
929
- this.has?.(c, v);
930
- var u = Reflect.getOwnPropertyDescriptor(c, v), g = r.get(v);
931
- if (g !== void 0) {
932
- var m = d(g);
933
- if (m === q) return;
934
- if (u && "value" in u) u.value = m;
935
- else return {
936
- enumerable: !0,
937
- configurable: !0,
938
- value: m,
939
- writable: !0
940
- };
941
- }
942
- return u;
943
- },
944
- has(c, v) {
945
- if (v === jt) return !0;
946
- var u = r.get(v), g = u !== void 0 && u.v !== q || Reflect.has(c, v);
947
- return (u !== void 0 || E !== null && (!g || et(c, v)?.writable)) && (u === void 0 && (u = l(() => {
948
- var m = g ? mt(c[v]) : q, p = /* @__PURE__ */ G(m, s);
949
- return p;
950
- }), r.set(v, u)), d(u) === q) ? !1 : g;
951
- },
952
- set(c, v, u, g) {
953
- var m = r.get(v), p = v in c;
954
- if (n && v === "length") for (var w = u; w < m.v; w += 1) {
955
- var A = r.get(w + "");
956
- A !== void 0 ? L(A, q) : w in c && (A = l(() => /* @__PURE__ */ G(q, s)), r.set(w + "", A));
957
- }
958
- if (m === void 0)
959
- (!p || et(c, v)?.writable) && (m = l(() => /* @__PURE__ */ G(void 0, s)), L(m, mt(u)), r.set(v, m));
960
- else {
961
- p = m.v !== q;
962
- var R = l(() => mt(u));
963
- L(m, R);
964
- }
965
- var $ = Reflect.getOwnPropertyDescriptor(c, v);
966
- if ($?.set && $.set.call(g, u), !p) {
967
- if (n && typeof v == "string") {
968
- var U = r.get("length"), F = Number(v);
969
- Number.isInteger(F) && F >= U.v && L(U, F + 1);
970
- }
971
- Ft(i);
972
- }
973
- return !0;
974
- },
975
- ownKeys(c) {
976
- d(i);
977
- var v = Reflect.ownKeys(c).filter((m) => {
978
- var p = r.get(m);
979
- return p === void 0 || p.v !== q;
980
- });
981
- for (var [u, g] of r) g.v !== q && !(u in c) && v.push(u);
982
- return v;
983
- },
984
- setPrototypeOf() {
985
- Zs();
986
- }
987
- });
988
- }
989
- function po(e, t) {
990
- return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : _o.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
991
- }
992
- var Wn, go, Si, Ei, Ti;
993
- function en() {
994
- if (Wn === void 0) {
995
- Wn = window, go = document, Si = /Firefox/.test(navigator.userAgent);
996
- var e = Element.prototype, t = Node.prototype, r = Text.prototype;
997
- Ei = et(t, "firstChild").get, Ti = et(t, "nextSibling").get, On(e) && (e[Kr] = void 0, e[Yr] = null, e[Vr] = void 0, e.__e = void 0), On(r) && (r[fr] = void 0);
998
- }
999
- }
1000
- function ie(e = "") {
1001
- return document.createTextNode(e);
1002
- }
1003
- // @__NO_SIDE_EFFECTS__
1004
- function re(e) {
1005
- return Ei.call(e);
1006
- }
1007
- // @__NO_SIDE_EFFECTS__
1008
- function Ce(e) {
1009
- return Ti.call(e);
1010
- }
1011
- function ee(e, t) {
1012
- if (!O) return /* @__PURE__ */ re(e);
1013
- var r = /* @__PURE__ */ re(C);
1014
- if (r === null) r = C.appendChild(ie());
1015
- else if (t && r.nodeType !== 3) {
1016
- var n = ie();
1017
- return r?.before(n), Z(n), n;
1018
- }
1019
- return t && Rr(r), Z(r), r;
1020
- }
1021
- function mo(e, t = !1) {
1022
- if (!O) {
1023
- var r = /* @__PURE__ */ re(e);
1024
- return r instanceof Comment && r.data === "" ? /* @__PURE__ */ Ce(r) : r;
1025
- }
1026
- if (t) {
1027
- if (C?.nodeType !== 3) {
1028
- var n = ie();
1029
- return C?.before(n), Z(n), n;
1030
- }
1031
- Rr(C);
1032
- }
1033
- return C;
1034
- }
1035
- function Mt(e, t = !1) {
1036
- if (!O) return /* @__PURE__ */ re(e);
1037
- var r = ee(e, t);
1038
- return J(e), r;
1039
- }
1040
- function _e(e, t = 1, r = !1) {
1041
- let n = O ? C : e;
1042
- for (var i; t--; )
1043
- i = n, n = /* @__PURE__ */ Ce(n);
1044
- if (!O) return n;
1045
- if (r) {
1046
- if (n?.nodeType !== 3) {
1047
- var s = ie();
1048
- return n === null ? i?.after(s) : n.before(s), Z(s), s;
1049
- }
1050
- Rr(n);
1051
- }
1052
- return Z(n), n;
1053
- }
1054
- function Mi(e) {
1055
- e.textContent = "";
1056
- }
1057
- function Ai() {
1058
- return !Be || Ee !== null ? !1 : (E.f & fn) !== 0;
1059
- }
1060
- function mn(e, t, r) {
1061
- return t == null || t === "http://www.w3.org/1999/xhtml" ? r ? document.createElement(e, { is: r }) : document.createElement(e) : r ? document.createElementNS(t, e, { is: r }) : document.createElementNS(t, e);
1062
- }
1063
- function Rr(e) {
1064
- if (e.nodeValue.length < 65536) return;
1065
- let t = e.nextSibling;
1066
- for (; t !== null && t.nodeType === 3; )
1067
- t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1068
- }
1069
- function wo(e) {
1070
- var t = E;
1071
- if (t === null)
1072
- return T.f |= _r, e;
1073
- if ((t.f & 32768) === 0 && (t.f & 4) === 0)
1074
- throw e;
1075
- Ae(e, t);
1076
- }
1077
- function Ae(e, t) {
1078
- if (!(t !== null && (t.f & 16384) !== 0)) {
1079
- for (; t !== null; ) {
1080
- if ((t.f & 128) !== 0 && (t.f & 33570816) === 0) {
1081
- if ((t.f & 32768) === 0) throw e;
1082
- try {
1083
- t.b.error(e);
1084
- return;
1085
- } catch (r) {
1086
- e = r;
1087
- }
1088
- }
1089
- t = t.parent;
1090
- }
1091
- throw e;
1092
- }
1093
- }
1094
- function bo(e) {
1095
- E === null && (T === null && Us(e), Bs()), Le && zs(e);
1096
- }
1097
- function yo(e, t) {
1098
- var r = t.last;
1099
- r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
1100
- }
1101
- function Re(e, t) {
1102
- var r = E;
1103
- r !== null && (r.f & 8192) !== 0 && (e |= ln);
1104
- var n = {
1105
- ctx: W,
1106
- deps: null,
1107
- nodes: null,
1108
- f: e | oe | 512,
1109
- first: null,
1110
- fn: t,
1111
- last: null,
1112
- next: null,
1113
- parent: r,
1114
- b: r && r.b,
1115
- prev: null,
1116
- teardown: null,
1117
- wv: 0,
1118
- ac: null
1119
- };
1120
- S?.register_created_effect(n);
1121
- var i = n;
1122
- if ((e & 4) !== 0)
1123
- Bt !== null ? Bt.push(n) : at.ensure().schedule(n);
1124
- else if (t !== null) {
1125
- try {
1126
- $t(n);
1127
- } catch (o) {
1128
- throw X(n), o;
1129
- }
1130
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= un));
1131
- }
1132
- if (i !== null && (i.parent = r, r !== null && yo(i, r), T !== null && (T.f & 2) !== 0 && (e & 64) === 0)) {
1133
- var s = T;
1134
- (s.effects ?? (s.effects = [])).push(i);
1135
- }
1136
- return n;
1137
- }
1138
- function wn() {
1139
- return T !== null && !me;
1140
- }
1141
- function ko(e) {
1142
- const t = Re(8, null);
1143
- return j(t, ue), t.teardown = e, t;
1144
- }
1145
- function Ge(e) {
1146
- bo("$effect");
1147
- var t = E.f;
1148
- if (!T && (t & 32) !== 0 && W !== null && !W.i) {
1149
- var r = W;
1150
- (r.e ?? (r.e = [])).push(e);
1151
- } else return Oi(e);
1152
- }
1153
- function Oi(e) {
1154
- return Re(4 | Rs, e);
1155
- }
1156
- function $o(e) {
1157
- at.ensure();
1158
- const t = Re(64 | St, e);
1159
- return () => {
1160
- X(t);
1161
- };
1162
- }
1163
- function xo(e) {
1164
- at.ensure();
1165
- const t = Re(64 | St, e);
1166
- return (r = {}) => new Promise((n) => {
1167
- r.outro ? lt(t, () => {
1168
- X(t), n(void 0);
1169
- }) : (X(t), n(void 0));
1170
- });
1171
- }
1172
- function Ci(e) {
1173
- return Re(4, e);
1174
- }
1175
- function So(e) {
1176
- return Re(Ps | St, e);
1177
- }
1178
- function bn(e, t = 0) {
1179
- return Re(8 | t, e);
1180
- }
1181
- function ir(e, t = [], r = [], n = []) {
1182
- ro(n, t, r, (i) => {
1183
- Re(8, () => {
1184
- e(...i.map(d));
1185
- });
1186
- });
1187
- }
1188
- function yn(e, t = 0) {
1189
- var r = Re(16 | t, e);
1190
- return r;
1191
- }
1192
- function ce(e) {
1193
- return Re(32 | St, e);
1194
- }
1195
- function Ri(e) {
1196
- var t = e.teardown;
1197
- if (t !== null) {
1198
- const r = Le, n = T;
1199
- Ln(!0), de(null);
1200
- try {
1201
- t.call(null);
1202
- } catch (i) {
1203
- Ae(i, e.parent);
1204
- } finally {
1205
- Ln(r), de(n);
1206
- }
1207
- }
1208
- }
1209
- function kn(e, t = !1) {
1210
- var r = e.first;
1211
- for (e.first = e.last = null; r !== null; ) {
1212
- const i = r.ac;
1213
- i !== null && Cr(() => {
1214
- i.abort(Kt);
1215
- });
1216
- var n = r.next;
1217
- (r.f & 64) !== 0 ? r.parent = null : X(r, t), r = n;
1218
- }
1219
- }
1220
- function Eo(e) {
1221
- for (var t = e.first; t !== null; ) {
1222
- var r = t.next;
1223
- (t.f & 32) === 0 && X(t), t = r;
1224
- }
1225
- }
1226
- function X(e, t = !0) {
1227
- var r = !1;
1228
- (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (To(e.nodes.start, e.nodes.end), r = !0), e.f |= Cn, kn(e, t && !r), Ut(e, 0);
1229
- var n = e.nodes && e.nodes.t;
1230
- if (n !== null) for (const s of n) s.stop();
1231
- Ri(e), e.f ^= Cn, e.f |= Cs;
1232
- var i = e.parent;
1233
- i !== null && i.first !== null && Pi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1234
- }
1235
- function To(e, t) {
1236
- for (; e !== null; ) {
1237
- var r = e === t ? null : /* @__PURE__ */ Ce(e);
1238
- e.remove(), e = r;
1239
- }
1240
- }
1241
- function Pi(e) {
1242
- var t = e.parent, r = e.prev, n = e.next;
1243
- r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
1244
- }
1245
- function lt(e, t, r = !0) {
1246
- var n = [];
1247
- e.f |= 256, Ii(e, n, !0);
1248
- var i = () => {
1249
- r && X(e), t && t();
1250
- }, s = n.length;
1251
- if (s > 0) {
1252
- var o = () => --s || i();
1253
- for (var l of n) l.out(o);
1254
- } else i();
1255
- }
1256
- function Ii(e, t, r) {
1257
- if ((e.f & 8192) === 0) {
1258
- e.f ^= ln;
1259
- var n = e.nodes && e.nodes.t;
1260
- if (n !== null)
1261
- for (const l of n) (l.is_global || r) && t.push(l);
1262
- for (var i = e.first; i !== null; ) {
1263
- var s = i.next;
1264
- if ((i.f & 64) === 0) {
1265
- var o = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (e.f & 16) !== 0;
1266
- Ii(i, t, o ? r : !1);
1267
- }
1268
- i = s;
1269
- }
1270
- }
1271
- }
1272
- function Sr(e) {
1273
- e.f &= -257, Ni(e, !0);
1274
- }
1275
- function Ni(e, t) {
1276
- if ((e.f & 256) === 0 && (e.f & 8192) !== 0) {
1277
- e.f ^= ln, (e.f & 1024) === 0 && (j(e, oe), at.ensure().schedule(e));
1278
- for (var r = e.first; r !== null; ) {
1279
- var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
1280
- Ni(r, i ? t : !1), r = n;
1281
- }
1282
- var s = e.nodes && e.nodes.t;
1283
- if (s !== null)
1284
- for (const o of s) (o.is_global || t) && o.in();
1285
- }
1286
- }
1287
- function $n(e, t) {
1288
- if (e.nodes)
1289
- for (var r = e.nodes.start, n = e.nodes.end; r !== null; ) {
1290
- var i = r === n ? null : /* @__PURE__ */ Ce(r);
1291
- t.append(r), r = i;
1292
- }
1293
- }
1294
- var Mo = null, cr = !1, Le = !1;
1295
- function Ln(e) {
1296
- Le = e;
1297
- }
1298
- var T = null, me = !1;
1299
- function de(e) {
1300
- T = e;
1301
- }
1302
- var E = null;
1303
- function Oe(e) {
1304
- E = e;
1305
- }
1306
- var be = null;
1307
- function Wi(e) {
1308
- T !== null && (!Be && (T.f & 2097152) !== 0 || (T.f & 2) !== 0) && (be ?? (be = /* @__PURE__ */ new Set())).add(e);
1309
- }
1310
- var Q = null, te = 0, fe = null;
1311
- function Ao(e) {
1312
- fe = e;
1313
- }
1314
- var Li = 1, Qe = 0, rt = Qe;
1315
- function jn(e) {
1316
- rt = e;
1317
- }
1318
- function ji() {
1319
- return ++Li;
1320
- }
1321
- function Zt(e) {
1322
- var t = e.f;
1323
- if ((t & 2048) !== 0) return !0;
1324
- if ((t & 4096) !== 0) {
1325
- for (var r = e.deps, n = r.length, i = 0; i < n; i++) {
1326
- var s = r[i];
1327
- if (Zt(s) && ci(s), s.wv > e.wv) return !0;
1328
- }
1329
- (t & 512) !== 0 && V === null && j(e, ue);
1330
- }
1331
- return !1;
1332
- }
1333
- function Di(e, t, r = !0) {
1334
- var n = e.reactions;
1335
- if (n !== null && !(!Be && be !== null && be.has(e)))
1336
- for (var i = 0; i < n.length; i++) {
1337
- var s = n[i];
1338
- (s.f & 2) !== 0 ? Di(s, t, !1) : t === s && (r ? j(s, oe) : (s.f & 1024) !== 0 && j(s, ot), gn(s));
1339
- }
1340
- }
1341
- function Fi(e) {
1342
- var t = Q, r = te, n = fe, i = T, s = be, o = W, l = me, f = rt, h = e.f;
1343
- Q = null, te = 0, fe = null, T = (h & 96) === 0 ? e : null, be = null, yt(e.ctx), me = !1, rt = ++Qe, e.ac !== null && (Cr(() => {
1344
- e.ac.abort(Kt);
1345
- }), e.ac = null);
1346
- try {
1347
- e.f |= Rn;
1348
- var _ = e.fn, c = _();
1349
- e.f |= fn;
1350
- var v = Dn(e);
1351
- if (Gt() && fe !== null && !me && v !== null && (e.f & 6146) === 0) for (var u = 0; u < fe.length; u++) Di(fe[u], e);
1352
- if (i !== null && i !== e) {
1353
- if (Qe++, i.deps !== null) for (let g = 0; g < r; g += 1) i.deps[g].rv = Qe;
1354
- if (t !== null) for (const g of t) g.rv = Qe;
1355
- fe !== null && (n === null ? n = fe : n.push(...fe));
1356
- }
1357
- return (e.f & 8388608) !== 0 && (e.f ^= _r), c;
1358
- } catch (g) {
1359
- return Dn(e), wo(g);
1360
- } finally {
1361
- e.f ^= Rn, Q = t, te = r, fe = n, T = i, be = s, yt(o), me = l, rt = f;
1362
- }
1363
- }
1364
- function Dn(e) {
1365
- var t = e.deps, r = S?.is_fork;
1366
- if (Q !== null) {
1367
- var n;
1368
- if (r || Ut(e, te), t !== null && te > 0)
1369
- for (t.length = te + Q.length, n = 0; n < Q.length; n++) t[te + n] = Q[n];
1370
- else e.deps = t = Q;
1371
- if (wn() && (e.f & 512) !== 0) for (n = te; n < t.length; n++) {
1372
- var i;
1373
- ((i = t[n]).reactions ?? (i.reactions = [])).push(e);
1374
- }
1375
- } else !r && t !== null && te < t.length && (Ut(e, te), t.length = te);
1376
- return t;
1377
- }
1378
- function Oo(e, t) {
1379
- let r = t.reactions;
1380
- if (r !== null) {
1381
- var n = $s.call(r, e);
1382
- if (n !== -1) {
1383
- var i = r.length - 1;
1384
- i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
1385
- }
1386
- }
1387
- if (r === null && (t.f & 2) !== 0 && (Q === null || !vr.call(Q, t))) {
1388
- var s = t;
1389
- (s.f & 512) !== 0 && (s.f ^= 512), s.v !== q && dn(s), s.ac !== null && Cr(() => {
1390
- s.ac.abort(Kt), s.ac = null, j(s, oe);
1391
- }), ao(s), Ut(s, 0);
1392
- }
1393
- }
1394
- function Ut(e, t) {
1395
- var r = e.deps;
1396
- if (r !== null)
1397
- for (var n = t; n < r.length; n++) Oo(e, r[n]);
1398
- }
1399
- function $t(e) {
1400
- var t = e.f;
1401
- if ((t & 16384) === 0) {
1402
- j(e, ue);
1403
- var r = E, n = cr;
1404
- if (E = e, cr = (t & 96) === 0, 0)
1405
- var i, s;
1406
- try {
1407
- (t & 16777232) !== 0 ? Eo(e) : kn(e), Ri(e);
1408
- var o = Fi(e);
1409
- if (e.teardown = typeof o == "function" ? o : null, e.wv = Li, 0)
1410
- for (var l of e.deps) ;
1411
- } finally {
1412
- cr = n, E = r;
1413
- }
1414
- }
1415
- }
1416
- function d(e) {
1417
- var t = (e.f & 2) !== 0;
1418
- if (Mo?.add(e), T !== null && !me && !(E !== null && (E.f & 16384) !== 0) && (be === null || !be.has(e))) {
1419
- var r = T.deps;
1420
- if ((T.f & 2097152) !== 0)
1421
- e.rv < Qe && (e.rv = Qe, Q === null && r !== null && r[te] === e ? te++ : Q === null ? Q = [e] : Q.push(e));
1422
- else {
1423
- var n;
1424
- (n = T).deps ?? (n.deps = []), vr.call(T.deps, e) || T.deps.push(e);
1425
- var i = e.reactions;
1426
- i === null ? e.reactions = [T] : vr.call(i, T) || i.push(T);
1427
- }
1428
- }
1429
- if (0) {
1430
- if (!me && reactivity_loss_tracker && S === null && Gr === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1431
- var s;
1432
- if (tracing_mode_flag && !me && tracing_expressions !== null && T !== null && tracing_expressions.reaction === T && !e.trace) {
1433
- if (s)
1434
- var o, l;
1435
- }
1436
- }
1437
- if (Le && Me.has(e)) return Me.get(e);
1438
- if (t) {
1439
- var f = e;
1440
- if (Le) {
1441
- var h = f.v;
1442
- return ((f.f & 1024) === 0 && f.reactions !== null || Hi(f)) && (h = hn(f)), Me.set(f, h), h;
1443
- }
1444
- var _ = (f.f & 512) === 0 && !me && T !== null && (cr || (T.f & 512) !== 0), c = (f.f & fn) === 0;
1445
- Zt(f) && (_ && (f.f |= 512), ci(f)), _ && !c && (di(f), qi(f));
1446
- }
1447
- if (V?.has(e)) return V.get(e);
1448
- if ((e.f & 8388608) !== 0) throw e.v;
1449
- return e.v;
1450
- }
1451
- function qi(e) {
1452
- if (e.f |= 512, e.deps !== null)
1453
- for (const t of e.deps)
1454
- (t.reactions ?? (t.reactions = [])).push(e), (t.f & 2) !== 0 && (t.f & 512) === 0 && (di(t), qi(t));
1455
- }
1456
- function Hi(e) {
1457
- if (e.v === q) return !0;
1458
- if (e.deps === null) return !1;
1459
- for (const t of e.deps)
1460
- if (Me.has(t) || (t.f & 2) !== 0 && Hi(t)) return !0;
1461
- return !1;
1462
- }
1463
- function xt(e) {
1464
- var t = me;
1465
- try {
1466
- return me = !0, e();
1467
- } finally {
1468
- me = t;
1469
- }
1470
- }
1471
- var wt = /* @__PURE__ */ Symbol("events"), zi = /* @__PURE__ */ new Set(), tn = /* @__PURE__ */ new Set();
1472
- function Wr(e, t, r) {
1473
- (t[wt] ?? (t[wt] = {}))[e] = r;
1474
- }
1475
- function Co(e) {
1476
- for (var t = 0; t < e.length; t++) zi.add(e[t]);
1477
- for (var r of tn) r(e);
1478
- }
1479
- var Lr = null, jr = !1;
1480
- function Fn(e) {
1481
- var t = this, r = t.ownerDocument, n = e.type, i = e.composedPath?.() || [], s = i[0] || e.target;
1482
- Lr = e, jr || (jr = !0, setTimeout(() => {
1483
- jr = !1, Lr = null;
1484
- }));
1485
- var o = 0, l = Lr === e && e[wt];
1486
- if (l) {
1487
- var f = i.indexOf(l);
1488
- if (f !== -1 && (t === document || t === window)) {
1489
- e[wt] = t;
1490
- return;
1491
- }
1492
- var h = i.indexOf(t);
1493
- if (h === -1) return;
1494
- f <= h && (o = f);
1495
- }
1496
- if (s = i[o] || e.target, s !== t) {
1497
- qt(e, "currentTarget", {
1498
- configurable: !0,
1499
- get() {
1500
- return s || r;
1501
- }
1502
- });
1503
- var _ = T, c = E;
1504
- de(null), Oe(null);
1505
- try {
1506
- for (var v, u = []; s !== null && s !== t; ) {
1507
- try {
1508
- var g = s[wt]?.[n];
1509
- g != null && (!s.disabled || e.target === s) && g.call(s, e);
1510
- } catch (m) {
1511
- v ? u.push(m) : v = m;
1512
- }
1513
- if (e.cancelBubble) break;
1514
- o++, s = o < i.length ? i[o] : null;
1515
- }
1516
- if (v) {
1517
- for (let m of u) queueMicrotask(() => {
1518
- throw m;
1519
- });
1520
- throw v;
1521
- }
1522
- } finally {
1523
- e[wt] = t, delete e.currentTarget, de(_), Oe(c);
1524
- }
1525
- }
1526
- }
1527
- var Ro = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1528
- function Po(e) {
1529
- return Ro?.createHTML(e) ?? e;
1530
- }
1531
- function Bi(e) {
1532
- var t = mn("template");
1533
- return t.innerHTML = Po(e.replaceAll("<!>", "<!---->")), t.content;
1534
- }
1535
- function We(e, t) {
1536
- var r = E;
1537
- r.nodes === null && (r.nodes = {
1538
- start: e,
1539
- end: t,
1540
- a: null,
1541
- t: null
1542
- });
1543
- }
1544
- // @__NO_SIDE_EFFECTS__
1545
- function Xt(e, t) {
1546
- var r = (t & 1) !== 0, n = (t & 2) !== 0, i, s = !e.startsWith("<!>");
1547
- return () => {
1548
- if (O)
1549
- return We(C, null), C;
1550
- i === void 0 && (i = Bi(s ? e : "<!>" + e), r || (i = /* @__PURE__ */ re(i)));
1551
- var o = n || Si ? document.importNode(i, !0) : i.cloneNode(!0);
1552
- if (r) {
1553
- var l = /* @__PURE__ */ re(o), f = o.lastChild;
1554
- We(l, f);
1555
- } else We(o, o);
1556
- return o;
1557
- };
1558
- }
1559
- // @__NO_SIDE_EFFECTS__
1560
- function Io(e, t, r = "svg") {
1561
- var n = !e.startsWith("<!>"), i = (t & 1) !== 0, s = `<${r}>${n ? e : "<!>" + e}</${r}>`, o;
1562
- return () => {
1563
- if (O)
1564
- return We(C, null), C;
1565
- if (!o) {
1566
- var l = Bi(s), f = /* @__PURE__ */ re(l);
1567
- if (i)
1568
- for (o = document.createDocumentFragment(); /* @__PURE__ */ re(f); ) o.appendChild(/* @__PURE__ */ re(f));
1569
- else o = /* @__PURE__ */ re(f);
1570
- }
1571
- var h = o.cloneNode(!0);
1572
- if (i) {
1573
- var _ = /* @__PURE__ */ re(h), c = h.lastChild;
1574
- We(_, c);
1575
- } else We(h, h);
1576
- return h;
1577
- };
1578
- }
1579
- // @__NO_SIDE_EFFECTS__
1580
- function No(e, t) {
1581
- return /* @__PURE__ */ Io(e, t, "svg");
1582
- }
1583
- function Wo(e = "") {
1584
- if (!O) {
1585
- var t = ie(e + "");
1586
- return We(t, t), t;
1587
- }
1588
- var r = C;
1589
- return r.nodeType !== 3 ? (r.before(r = ie()), Z(r)) : Rr(r), We(r, r), r;
1590
- }
1591
- function Fe(e, t) {
1592
- if (O) {
1593
- var r = E;
1594
- ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = C), Or();
1595
- return;
1596
- }
1597
- e !== null && e.before(t);
1598
- }
1599
- var Lo = [
1600
- "allowfullscreen",
1601
- "async",
1602
- "autofocus",
1603
- "autoplay",
1604
- "checked",
1605
- "controls",
1606
- "default",
1607
- "disabled",
1608
- "formnovalidate",
1609
- "indeterminate",
1610
- "inert",
1611
- "ismap",
1612
- "loop",
1613
- "multiple",
1614
- "muted",
1615
- "nomodule",
1616
- "novalidate",
1617
- "open",
1618
- "playsinline",
1619
- "readonly",
1620
- "required",
1621
- "reversed",
1622
- "seamless",
1623
- "selected",
1624
- "webkitdirectory",
1625
- "defer",
1626
- "disablepictureinpicture",
1627
- "disableremoteplayback"
1628
- ], Na = [
1629
- ...Lo,
1630
- "formNoValidate",
1631
- "isMap",
1632
- "noModule",
1633
- "playsInline",
1634
- "readOnly",
1635
- "value",
1636
- "volume",
1637
- "defaultValue",
1638
- "defaultChecked",
1639
- "srcObject",
1640
- "noValidate",
1641
- "allowFullscreen",
1642
- "disablePictureInPicture",
1643
- "disableRemotePlayback"
1644
- ], jo = ["touchstart", "touchmove"];
1645
- function Do(e) {
1646
- return jo.includes(e);
1647
- }
1648
- var Fo = [
1649
- "$state",
1650
- "$state.raw",
1651
- "$derived",
1652
- "$derived.by"
1653
- ], Wa = [
1654
- ...Fo,
1655
- "$state.eager",
1656
- "$state.snapshot",
1657
- "$props",
1658
- "$props.id",
1659
- "$bindable",
1660
- "$effect",
1661
- "$effect.pre",
1662
- "$effect.tracking",
1663
- "$effect.root",
1664
- "$effect.pending",
1665
- "$inspect",
1666
- "$inspect().with",
1667
- "$inspect.trace",
1668
- "$host"
1669
- ];
1670
- function qo(e) {
1671
- let t = 0, r = st(0), n;
1672
- return () => {
1673
- wn() && (d(r), bn(() => (t === 0 && (n = xt(() => e(() => Ft(r)))), t += 1, () => {
1674
- ze(() => {
1675
- t -= 1, t === 0 && (n?.(), n = void 0, Ft(r));
1676
- });
1677
- })));
1678
- };
1679
- }
1680
- var Ho = un | St;
1681
- function zo(e, t, r, n) {
1682
- new Bo(e, t, r, n);
1683
- }
1684
- var ye = /* @__PURE__ */ new WeakMap(), rn = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), nn = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakSet(), Bo = class {
1685
- constructor(e, t, r, n) {
1686
- _n(this, H), I(this, "parent", void 0), I(this, "is_pending", !1), I(this, "transform_error", void 0), y(this, ye, void 0), y(this, rn, O ? C : null), y(this, Te, void 0), y(this, Yt, void 0), y(this, ne, void 0), y(this, ke, null), y(this, se, null), y(this, we, null), y(this, He, null), y(this, pt, 0), y(this, nt, 0), y(this, sr, !1), y(this, nn, /* @__PURE__ */ new Set()), y(this, sn, /* @__PURE__ */ new Set()), y(this, Ye, null), y(this, qn, qo(() => (b(Ye, this, st(a(pt, this))), () => {
1687
- b(Ye, this, null);
1688
- }))), b(ye, this, e), b(Te, this, t), b(Yt, this, (i) => {
1689
- var s = E;
1690
- s.b = this, s.f |= 128, r(i);
1691
- }), this.parent = E.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), b(ne, this, yn(() => {
1692
- if (O) {
1693
- const i = a(rn, this);
1694
- Or();
1695
- const s = i.data === "[!";
1696
- if (i.data.startsWith("[?")) {
1697
- const o = JSON.parse(i.data.slice(2));
1698
- k(H, this, Yo).call(this, o);
1699
- } else s ? k(H, this, Ko).call(this) : k(H, this, Uo).call(this);
1700
- } else k(H, this, Yi).call(this);
1701
- }, Ho)), O && b(ye, this, C);
1702
- }
1703
- defer_effect(e) {
1704
- fi(e, a(nn, this), a(sn, this));
1705
- }
1706
- is_rendered() {
1707
- return !this.is_pending && (!this.parent || this.parent.is_rendered());
1708
- }
1709
- has_pending_snippet() {
1710
- return !!a(Te, this).pending;
1711
- }
1712
- update_pending_count(e, t) {
1713
- k(H, this, Ki).call(this, e, t), b(pt, this, a(pt, this) + e), !(!a(Ye, this) || a(sr, this)) && (b(sr, this, !0), ze(() => {
1714
- b(sr, this, !1), a(Ye, this) && kt(a(Ye, this), a(pt, this));
1715
- }));
1716
- }
1717
- get_effect_pending() {
1718
- return a(qn, this).call(this), d(a(Ye, this));
1719
- }
1720
- error(e) {
1721
- if (!a(Te, this).onerror && !a(Te, this).failed) throw e;
1722
- S?.is_fork ? (a(ke, this) && S.skip_effect(a(ke, this)), a(se, this) && S.skip_effect(a(se, this)), a(we, this) && S.skip_effect(a(we, this)), S.oncommit(() => {
1723
- k(H, this, Hn).call(this, e);
1724
- })) : k(H, this, Hn).call(this, e);
1725
- }
1726
- };
1727
- function Uo() {
1728
- try {
1729
- b(ke, this, ce(() => a(Yt, this).call(this, a(ye, this))));
1730
- } catch (e) {
1731
- this.error(e);
1732
- }
1733
- }
1734
- function Yo(e) {
1735
- const t = a(Te, this).failed, { reset: r, invoke_onerror: n } = k(H, this, Ui).call(this, e);
1736
- ze(n), t && b(we, this, ce(() => {
1737
- t(a(ye, this), () => e, () => r);
1738
- }));
1739
- }
1740
- function Ui(e) {
1741
- var t = !1, r = !1;
1742
- const n = () => {
1743
- if (t) {
1744
- js();
1745
- return;
1746
- }
1747
- t = !0, r && Js(), a(we, this) !== null && lt(a(we, this), () => {
1748
- b(we, this, null);
1749
- }), k(H, this, xn).call(this, () => {
1750
- k(H, this, Yi).call(this);
1751
- });
1752
- };
1753
- return {
1754
- reset: n,
1755
- invoke_onerror: () => {
1756
- try {
1757
- r = !0, a(Te, this).onerror?.(e, n), r = !1;
1758
- } catch (s) {
1759
- Ae(s, a(ne, this) && a(ne, this).parent);
1760
- }
1761
- }
1762
- };
1763
- }
1764
- function Ko() {
1765
- const e = a(Te, this).pending;
1766
- e && (this.is_pending = !0, b(se, this, ce(() => e(a(ye, this)))), ze(() => {
1767
- var t = b(He, this, document.createDocumentFragment()), r = ie(), n = !1;
1768
- if (t.append(r), b(ke, this, k(H, this, xn).call(this, () => {
1769
- try {
1770
- return ce(() => a(Yt, this).call(this, r));
1771
- } catch (i) {
1772
- try {
1773
- this.error(i), n = !0;
1774
- } catch (s) {
1775
- Ae(s, a(ne, this).parent);
1776
- }
1777
- return null;
1778
- }
1779
- })), a(ke, this) === null) {
1780
- b(He, this, null), n && k(H, this, Er).call(this, S);
1781
- return;
1782
- }
1783
- a(nt, this) === 0 && (a(ye, this).before(t), b(He, this, null), lt(a(se, this), () => {
1784
- b(se, this, null);
1785
- }), k(H, this, Er).call(this, S));
1786
- }));
1787
- }
1788
- function Yi() {
1789
- try {
1790
- if (this.is_pending = this.has_pending_snippet(), b(nt, this, 0), b(pt, this, 0), b(ke, this, ce(() => {
1791
- a(Yt, this).call(this, a(ye, this));
1792
- })), a(nt, this) > 0) {
1793
- var e = b(He, this, document.createDocumentFragment());
1794
- $n(a(ke, this), e);
1795
- const t = a(Te, this).pending;
1796
- b(se, this, ce(() => t(a(ye, this))));
1797
- } else k(H, this, Er).call(this, S);
1798
- } catch (t) {
1799
- this.error(t);
1800
- }
1801
- }
1802
- function Er(e) {
1803
- this.is_pending = !1, e.transfer_effects(a(nn, this), a(sn, this));
1804
- }
1805
- function xn(e) {
1806
- var t = E, r = T, n = W;
1807
- Oe(a(ne, this)), de(a(ne, this)), yt(a(ne, this).ctx);
1808
- try {
1809
- return at.ensure(), e();
1810
- } finally {
1811
- Oe(t), de(r), yt(n);
1812
- }
1813
- }
1814
- function Ki(e, t) {
1815
- if (!this.has_pending_snippet()) {
1816
- if (this.parent) {
1817
- var r;
1818
- k(H, r = this.parent, Ki).call(r, e, t);
1819
- }
1820
- return;
1821
- }
1822
- b(nt, this, a(nt, this) + e), a(nt, this) === 0 && (k(H, this, Er).call(this, t), a(se, this) && lt(a(se, this), () => {
1823
- b(se, this, null);
1824
- }), a(He, this) && (a(ye, this).before(a(He, this)), b(He, this, null)));
1825
- }
1826
- function Hn(e) {
1827
- a(ke, this) && (X(a(ke, this)), b(ke, this, null)), a(se, this) && (X(a(se, this)), b(se, this, null)), a(we, this) && (X(a(we, this)), b(we, this, null)), O && (Z(a(rn, this)), ri(), Z(pr()));
1828
- let t = a(Te, this).failed;
1829
- const r = (n) => {
1830
- const { reset: i, invoke_onerror: s } = k(H, this, Ui).call(this, n);
1831
- s(), t && b(we, this, k(H, this, xn).call(this, () => {
1832
- try {
1833
- return ce(() => {
1834
- var o = E;
1835
- o.b = this, o.f |= 128, t(a(ye, this), () => n, () => i);
1836
- });
1837
- } catch (o) {
1838
- return Ae(o, a(ne, this).parent), null;
1839
- }
1840
- }));
1841
- };
1842
- ze(() => {
1843
- var n;
1844
- try {
1845
- n = this.transform_error(e);
1846
- } catch (i) {
1847
- Ae(i, a(ne, this) && a(ne, this).parent);
1848
- return;
1849
- }
1850
- n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => Ae(i, a(ne, this) && a(ne, this).parent)) : r(n);
1851
- });
1852
- }
1853
- var zn = !0;
1854
- function dt(e, t) {
1855
- var r = t == null ? "" : typeof t == "object" ? `${t}` : t;
1856
- r !== (e[fr] ?? (e[fr] = e.nodeValue)) && (e[fr] = r, e.nodeValue = `${r}`);
1857
- }
1858
- function Vi(e, t) {
1859
- return Gi(e, t);
1860
- }
1861
- function Vo(e, t) {
1862
- en(), t.intro = t.intro ?? !1;
1863
- const r = t.target, n = O, i = C;
1864
- try {
1865
- for (var s = /* @__PURE__ */ re(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ Ce(s);
1866
- if (!s) throw bt;
1867
- Ie(!0), Z(s);
1868
- const o = Gi(e, {
1869
- ...t,
1870
- anchor: s
1871
- });
1872
- return Ie(!1), o;
1873
- } catch (o) {
1874
- if (o instanceof Error && o.message.split(`
1875
- `).some((l) => l.startsWith("https://svelte.dev/e/"))) throw o;
1876
- return o !== bt && console.warn("Failed to hydrate: ", o), t.recover === !1 && Ks(), en(), Mi(r), Ie(!1), Vi(e, t);
1877
- } finally {
1878
- Ie(n), Z(i);
1879
- }
1880
- }
1881
- var or = /* @__PURE__ */ new Map();
1882
- function Gi(e, { target: t, anchor: r, props: n = {}, events: i, context: s, intro: o = !0, transformError: l }) {
1883
- en();
1884
- var f = void 0, h = xo(() => {
1885
- var _ = r ?? t.appendChild(ie());
1886
- zo(_, { pending: () => {
1887
- } }, (u) => {
1888
- oi({});
1889
- var g = W;
1890
- if (s && (g.c = s), i && (n.$$events = i), O && We(u, null), zn = o, f = e(u, n) || cn(), zn = !0, O && (E.nodes.end = C, C === null || C.nodeType !== 8 || C.data !== "]"))
1891
- throw Ar(), bt;
1892
- ai();
1893
- }, l);
1894
- var c = /* @__PURE__ */ new Set(), v = (u) => {
1895
- for (var g = 0; g < u.length; g++) {
1896
- var m = u[g];
1897
- if (!c.has(m)) {
1898
- c.add(m);
1899
- var p = Do(m);
1900
- for (const R of [t, document]) {
1901
- var w = or.get(R);
1902
- w === void 0 && (w = /* @__PURE__ */ new Map(), or.set(R, w));
1903
- var A = w.get(m);
1904
- A === void 0 ? (R.addEventListener(m, Fn, { passive: p }), w.set(m, 1)) : w.set(m, A + 1);
1905
- }
1906
- }
1907
- }
1908
- };
1909
- return v(Mr(zi)), tn.add(v), () => {
1910
- for (var u of c) for (const p of [t, document]) {
1911
- var g = or.get(p), m = g.get(u);
1912
- --m == 0 ? (p.removeEventListener(u, Fn), g.delete(u), g.size === 0 && or.delete(p)) : g.set(u, m);
1913
- }
1914
- tn.delete(v), _ !== r && _.parentNode?.removeChild(_);
1915
- };
1916
- });
1917
- return on.set(f, h), f;
1918
- }
1919
- var on = /* @__PURE__ */ new WeakMap();
1920
- function Go(e, t) {
1921
- const r = on.get(e);
1922
- return r ? (on.delete(e), r(t)) : Promise.resolve();
1923
- }
1924
- var Pe = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), Fr = /* @__PURE__ */ new WeakMap(), Bn = /* @__PURE__ */ new WeakMap(), Zo = class {
1925
- constructor(e, t = !0) {
1926
- I(this, "anchor", void 0), y(this, Pe, /* @__PURE__ */ new Map()), y(this, je, /* @__PURE__ */ new Map()), y(this, pe, /* @__PURE__ */ new Map()), y(this, At, /* @__PURE__ */ new Set()), y(this, Dr, !0), y(this, Fr, (r) => {
1927
- if (a(Pe, this).has(r)) {
1928
- var n = a(Pe, this).get(r), i = a(je, this).get(n);
1929
- if (i)
1930
- Sr(i), a(At, this).delete(n);
1931
- else {
1932
- var s = a(pe, this).get(n);
1933
- s && (Sr(s.effect), a(je, this).set(n, s.effect), a(pe, this).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), i = s.effect);
1934
- }
1935
- for (const [o, l] of a(Pe, this)) {
1936
- if (a(Pe, this).delete(o), o === r) break;
1937
- const f = a(pe, this).get(l);
1938
- f && (X(f.effect), a(pe, this).delete(l));
1939
- }
1940
- for (const [o, l] of a(je, this)) {
1941
- if (o === n || a(At, this).has(o)) continue;
1942
- const f = () => {
1943
- if (Array.from(a(Pe, this).values()).includes(o)) {
1944
- var h = document.createDocumentFragment();
1945
- $n(l, h), h.append(ie()), a(pe, this).set(o, {
1946
- effect: l,
1947
- fragment: h
1948
- });
1949
- } else X(l);
1950
- a(At, this).delete(o), a(je, this).delete(o);
1951
- };
1952
- a(Dr, this) || !i ? (a(At, this).add(o), lt(l, f, !1)) : f();
1953
- }
1954
- }
1955
- }), y(this, Bn, (r) => {
1956
- a(Pe, this).delete(r);
1957
- const n = Array.from(a(Pe, this).values());
1958
- for (const [i, s] of a(pe, this)) n.includes(i) || (X(s.effect), a(pe, this).delete(i));
1959
- }), this.anchor = e, b(Dr, this, t);
1960
- }
1961
- ensure(e, t) {
1962
- var r = S, n = Ai();
1963
- if (t && !a(je, this).has(e) && !a(pe, this).has(e))
1964
- if (n) {
1965
- var i = document.createDocumentFragment(), s = ie();
1966
- i.append(s), a(pe, this).set(e, {
1967
- effect: ce(() => t(s)),
1968
- fragment: i
1969
- });
1970
- } else a(je, this).set(e, ce(() => t(this.anchor)));
1971
- if (a(Pe, this).set(r, e), n) {
1972
- for (const [o, l] of a(je, this)) o === e ? r.unskip_effect(l) : r.skip_effect(l);
1973
- for (const [o, l] of a(pe, this)) o === e ? r.unskip_effect(l.effect) : r.skip_effect(l.effect);
1974
- r.oncommit(a(Fr, this)), r.ondiscard(a(Bn, this));
1975
- } else
1976
- O && (this.anchor = C), a(Fr, this).call(this, r);
1977
- }
1978
- };
1979
- function Xo(e) {
1980
- W === null && Fs("onMount"), Vt && W.l !== null ? Jo(W).m.push(e) : Ge(() => {
1981
- const t = xt(e);
1982
- if (typeof t == "function") return t;
1983
- });
1984
- }
1985
- function Jo(e) {
1986
- var t = e.l;
1987
- return t.u ?? (t.u = {
1988
- a: [],
1989
- b: [],
1990
- m: []
1991
- });
1992
- }
1993
- function Ot(e, t, r = !1) {
1994
- var n;
1995
- O && (n = C, Or());
1996
- var i = new Zo(e), s = r ? un : 0;
1997
- function o(l, f) {
1998
- if (O) {
1999
- var h = ni(n);
2000
- if (l !== parseInt(h.substring(1))) {
2001
- var _ = pr();
2002
- Z(_), i.anchor = _, Ie(!1), i.ensure(l, f), Ie(!0);
2003
- return;
2004
- }
2005
- }
2006
- i.ensure(l, f);
2007
- }
2008
- yn(() => {
2009
- var l = !1;
2010
- t((f, h = 0) => {
2011
- l = !0, o(h, f);
2012
- }), l || o(-1, null);
2013
- }, s);
2014
- }
2015
- function Qo(e, t, r) {
2016
- for (var n = [], i = t.length, s, o = t.length, l = 0; l < i; l++) {
2017
- let c = t[l];
2018
- lt(c, () => {
2019
- if (s) {
2020
- if (s.pending.delete(c), s.done.add(c), s.pending.size === 0) {
2021
- var v = e.outrogroups;
2022
- an(e, Mr(s.done)), v.delete(s), v.size === 0 && (e.outrogroups = null);
2023
- }
2024
- } else o -= 1;
2025
- }, !1);
2026
- }
2027
- if (o === 0) {
2028
- var f = n.length === 0 && r !== null && e.pending.size === 0;
2029
- if (f) {
2030
- var h = r, _ = h.parentNode;
2031
- Mi(_), _.append(h), e.items.clear();
2032
- }
2033
- an(e, t, !f);
2034
- } else
2035
- s = {
2036
- pending: new Set(t),
2037
- done: /* @__PURE__ */ new Set()
2038
- }, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(s);
2039
- }
2040
- function an(e, t, r = !0) {
2041
- var n;
2042
- if (e.pending.size > 0) {
2043
- n = /* @__PURE__ */ new Set();
2044
- for (const o of e.pending.values()) for (const l of o) n.add(e.items.get(l).e);
2045
- }
2046
- for (var i = 0; i < t.length; i++) {
2047
- var s = t[i];
2048
- if (n?.has(s)) {
2049
- s.f |= Lt;
2050
- const o = document.createDocumentFragment();
2051
- $n(s, o);
2052
- } else X(t[i], r);
2053
- }
2054
- }
2055
- var ar;
2056
- function ea(e, t, r, n, i, s = null) {
2057
- var o = e, l = /* @__PURE__ */ new Map();
2058
- if ((t & 4) !== 0) {
2059
- var f = e;
2060
- o = O ? Z(/* @__PURE__ */ re(f)) : f.appendChild(ie());
2061
- }
2062
- O && Or();
2063
- var h = null, _ = /* @__PURE__ */ vn(() => {
2064
- var w = r();
2065
- return Xn(w) ? w : w == null ? [] : Mr(w);
2066
- }), c, v = /* @__PURE__ */ new Map(), u = !0;
2067
- function g(w) {
2068
- (p.effect.f & 16384) === 0 && (p.pending.delete(w), p.fallback = h, ta(p, c, o, t, n), h !== null && (c.length === 0 ? (h.f & 33554432) === 0 ? Sr(h) : (h.f ^= Lt, Wt(h, null, o)) : lt(h, () => {
2069
- h = null;
2070
- })));
2071
- }
2072
- function m(w) {
2073
- p.pending.delete(w);
2074
- }
2075
- var p = {
2076
- effect: yn(() => {
2077
- c = d(_);
2078
- var w = c.length;
2079
- let A = !1;
2080
- O && ni(o) === "[!" != (w === 0) && (o = pr(), Z(o), Ie(!1), A = !0);
2081
- for (var R = /* @__PURE__ */ new Set(), $ = S, U = Ai(), F = 0; F < w; F += 1) {
2082
- O && C.nodeType === 8 && C.data === "]" && (o = C, A = !0, Ie(!1));
2083
- var ae = c[F], P = n(ae, F);
2084
- if (0)
2085
- var Jt;
2086
- var z = u ? null : l.get(P);
2087
- z ? (z.v && kt(z.v, ae), z.i && kt(z.i, F), U && $.unskip_effect(z.e)) : (z = ra(l, u ? o : ar ?? (ar = ie()), ae, P, F, i, t, r), u || (z.e.f |= Lt), l.set(P, z)), R.add(P);
2088
- }
2089
- if (w === 0 && s && !h && (u ? h = ce(() => s(o)) : (h = ce(() => s(ar ?? (ar = ie()))), h.f |= Lt)), w > R.size && Hs("", "", ""), O && w > 0 && Z(pr()), !u)
2090
- if (v.set($, R), U) {
2091
- for (const [Pr, Qt] of l) R.has(Pr) || $.skip_effect(Qt.e);
2092
- $.oncommit(g), $.ondiscard(m);
2093
- } else g($);
2094
- A && Ie(!0), d(_);
2095
- }),
2096
- flags: t,
2097
- items: l,
2098
- pending: v,
2099
- outrogroups: null,
2100
- fallback: h
2101
- };
2102
- u = !1, O && (o = C);
2103
- }
2104
- function Ct(e) {
2105
- for (; e !== null && (e.f & 32) === 0; ) e = e.next;
2106
- return e;
2107
- }
2108
- function ta(e, t, r, n, i) {
2109
- var s = (n & 8) !== 0, o = t.length, l = e.items, f = Ct(e.effect.first), h, _ = null, c, v = [], u = [], g, m, p, w;
2110
- if (s) for (w = 0; w < o; w += 1)
2111
- g = t[w], m = i(g, w), p = l.get(m).e, (p.f & 33554432) === 0 && (p.nodes?.a?.measure(), (c ?? (c = /* @__PURE__ */ new Set())).add(p));
2112
- for (w = 0; w < o; w += 1) {
2113
- if (g = t[w], m = i(g, w), p = l.get(m).e, e.outrogroups !== null) for (const z of e.outrogroups)
2114
- z.pending.delete(p), z.done.delete(p);
2115
- if ((p.f & 8192) !== 0 && (Sr(p), s && (p.nodes?.a?.unfix(), (c ?? (c = /* @__PURE__ */ new Set())).delete(p))), (p.f & 33554432) !== 0)
2116
- if (p.f ^= Lt, p === f) Wt(p, null, r);
2117
- else {
2118
- var A = _ ? _.next : f;
2119
- p === e.effect.last && (e.effect.last = p.prev), p.prev && (p.prev.next = p.next), p.next && (p.next.prev = p.prev), De(e, _, p), De(e, p, A), Wt(p, A, r), _ = p, v = [], u = [], f = Ct(_.next);
2120
- continue;
2121
- }
2122
- if (p !== f) {
2123
- if (h !== void 0 && h.has(p)) {
2124
- if (v.length < u.length) {
2125
- var R = u[0], $;
2126
- _ = R.prev;
2127
- var U = v[0], F = v[v.length - 1];
2128
- for ($ = 0; $ < v.length; $ += 1) Wt(v[$], R, r);
2129
- for ($ = 0; $ < u.length; $ += 1) h.delete(u[$]);
2130
- De(e, U.prev, F.next), De(e, _, U), De(e, F, R), f = R, _ = F, w -= 1, v = [], u = [];
2131
- } else
2132
- h.delete(p), Wt(p, f, r), De(e, p.prev, p.next), De(e, p, _ === null ? e.effect.first : _.next), De(e, _, p), _ = p;
2133
- continue;
2134
- }
2135
- for (v = [], u = []; f !== null && f !== p; )
2136
- (h ?? (h = /* @__PURE__ */ new Set())).add(f), u.push(f), f = Ct(f.next);
2137
- if (f === null) continue;
2138
- }
2139
- (p.f & 33554432) === 0 && v.push(p), _ = p, f = Ct(p.next);
2140
- }
2141
- if (e.outrogroups !== null) {
2142
- for (const z of e.outrogroups) z.pending.size === 0 && (an(e, Mr(z.done)), e.outrogroups?.delete(z));
2143
- e.outrogroups.size === 0 && (e.outrogroups = null);
2144
- }
2145
- if (f !== null || h !== void 0) {
2146
- var ae = [];
2147
- if (h !== void 0)
2148
- for (p of h) (p.f & 8192) === 0 && ae.push(p);
2149
- for (; f !== null; )
2150
- (f.f & 8192) === 0 && f !== e.fallback && ae.push(f), f = Ct(f.next);
2151
- var P = ae.length;
2152
- if (P > 0) {
2153
- var Jt = (n & 4) !== 0 && o === 0 ? r : null;
2154
- if (s) {
2155
- for (w = 0; w < P; w += 1) ae[w].nodes?.a?.measure();
2156
- for (w = 0; w < P; w += 1) ae[w].nodes?.a?.fix();
2157
- }
2158
- Qo(e, ae, Jt);
2159
- }
2160
- }
2161
- s && ze(() => {
2162
- if (c !== void 0)
2163
- for (p of c) p.nodes?.a?.apply();
2164
- });
2165
- }
2166
- function ra(e, t, r, n, i, s, o, l) {
2167
- var f = (o & 1) !== 0 ? (o & 16) === 0 ? /* @__PURE__ */ $i(r, !1, !1) : st(r) : null, h = (o & 2) !== 0 ? st(i) : null;
2168
- return {
2169
- v: f,
2170
- i: h,
2171
- e: ce(() => (s(t, f ?? r, h ?? i, l), () => {
2172
- e.delete(n);
2173
- }))
2174
- };
2175
- }
2176
- function Wt(e, t, r) {
2177
- if (e.nodes)
2178
- for (var n = e.nodes.start, i = e.nodes.end, s = t && (t.f & 33554432) === 0 ? t.nodes.start : r; n !== null; ) {
2179
- var o = /* @__PURE__ */ Ce(n);
2180
- if (s.before(n), n === i) return;
2181
- n = o;
2182
- }
2183
- }
2184
- function De(e, t, r) {
2185
- t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
2186
- }
2187
- function na(e, t) {
2188
- Ci(() => {
2189
- e = E?.parent?.nodes?.start ?? e;
2190
- var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
2191
- if (!n.querySelector("#" + t.hash)) {
2192
- const i = mn("style");
2193
- i.id = t.hash, i.textContent = t.code, n.appendChild(i);
2194
- }
2195
- });
2196
- }
2197
- var Un = [...`
2198
- \r\f \v\uFEFF`];
2199
- function ia(e, t, r) {
2200
- var n = e == null ? "" : "" + e;
2201
- if (t && (n = n ? n + " " + t : t), r) {
2202
- for (var i of Object.keys(r)) if (r[i]) n = n ? n + " " + i : i;
2203
- else if (n.length)
2204
- for (var s = i.length, o = 0; (o = n.indexOf(i, o)) >= 0; ) {
2205
- var l = o + s;
2206
- (o === 0 || Un.includes(n[o - 1])) && (l === n.length || Un.includes(n[l])) ? n = (o === 0 ? "" : n.substring(0, o)) + n.substring(l + 1) : o = l;
2207
- }
2208
- }
2209
- return n === "" ? null : n;
2210
- }
2211
- function Yn(e, t = !1) {
2212
- var r = t ? " !important;" : ";", n = "";
2213
- for (var i of Object.keys(e)) {
2214
- var s = e[i];
2215
- s != null && s !== "" && (n += " " + i + ": " + s + r);
2216
- }
2217
- return n;
2218
- }
2219
- function qr(e) {
2220
- return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
2221
- }
2222
- function sa(e, t) {
2223
- if (t) {
2224
- var r = "", n, i;
2225
- if (Array.isArray(t) ? (n = t[0], i = t[1]) : n = t, e) {
2226
- e = String(e).replaceAll(/\/\*.*?\*\//g, "").trim();
2227
- var s = !1, o = 0, l = !1, f = [];
2228
- n && f.push(...Object.keys(n).map(qr)), i && f.push(...Object.keys(i).map(qr));
2229
- var h = 0, _ = -1;
2230
- const m = e.length;
2231
- for (var c = 0; c < m; c++) {
2232
- var v = e[c];
2233
- if (l ? v === "/" && e[c - 1] === "*" && (l = !1) : s ? s === v && (s = !1) : v === "/" && e[c + 1] === "*" ? l = !0 : v === '"' || v === "'" ? s = v : v === "(" ? o++ : v === ")" && o--, !l && s === !1 && o === 0) {
2234
- if (v === ":" && _ === -1) _ = c;
2235
- else if (v === ";" || c === m - 1) {
2236
- if (_ !== -1) {
2237
- var u = qr(e.substring(h, _).trim());
2238
- if (!f.includes(u)) {
2239
- v !== ";" && c++;
2240
- var g = e.substring(h, c).trim();
2241
- r += " " + g + ";";
2242
- }
2243
- }
2244
- h = c + 1, _ = -1;
2245
- }
2246
- }
2247
- }
2248
- }
2249
- return n && (r += Yn(n)), i && (r += Yn(i, !0)), r = r.trim(), r === "" ? null : r;
2250
- }
2251
- return e == null ? null : String(e);
2252
- }
2253
- function Kn(e, t, r, n, i, s) {
2254
- var o = e[Kr];
2255
- if (O || o !== r || o === void 0) {
2256
- var l = ia(r, n, s);
2257
- (!O || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : t ? e.className = l : e.setAttribute("class", l)), e[Kr] = r;
2258
- } else if (s && i !== s) for (var f in s) {
2259
- var h = !!s[f];
2260
- (i == null || h !== !!i[f]) && e.classList.toggle(f, h);
2261
- }
2262
- return s;
2263
- }
2264
- function Hr(e, t = {}, r, n) {
2265
- for (var i in r) {
2266
- var s = r[i];
2267
- t[i] !== s && (r[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, s, n));
2268
- }
2269
- }
2270
- function vt(e, t, r, n) {
2271
- var i = e[Vr];
2272
- if (O || i !== t) {
2273
- var s = sa(t, n);
2274
- (!O || s !== e.getAttribute("style")) && (s == null ? e.removeAttribute("style") : e.style.cssText = s), e[Vr] = t;
2275
- } else n && (Array.isArray(n) ? (Hr(e, r?.[0], n[0]), Hr(e, r?.[1], n[1], "important")) : Hr(e, r, n));
2276
- return n;
2277
- }
2278
- var oa = /* @__PURE__ */ Symbol("is custom element"), aa = /* @__PURE__ */ Symbol("is html"), la = Ws ? "link" : "LINK";
2279
- function xe(e, t, r, n) {
2280
- var i = fa(e);
2281
- if (O && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === la)) {
2282
- n || void 0;
2283
- return;
2284
- }
2285
- i[t] !== (i[t] = r) && (t === "loading" && (e[Is] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && ua(e).has(t) ? e[t] = r : e.setAttribute(t, r));
2286
- }
2287
- function fa(e) {
2288
- return e[Yr] ?? (e[Yr] = {
2289
- [oa]: e.nodeName.includes("-"),
2290
- [aa]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
2291
- });
2292
- }
2293
- var Vn = /* @__PURE__ */ new Map();
2294
- function ua(e) {
2295
- var t = e.getAttribute("is") || e.nodeName, r = Vn.get(t);
2296
- if (r) return r;
2297
- Vn.set(t, r = /* @__PURE__ */ new Set());
2298
- for (var n, i = e, s = Element.prototype; s !== i; ) {
2299
- n = xs(i);
2300
- for (var o in n) n[o].set && o !== "innerHTML" && o !== "textContent" && o !== "innerText" && r.add(o);
2301
- i = Jn(i);
2302
- }
2303
- return r;
2304
- }
2305
- var Zi, gt = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), zr = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakSet(), Xi = class {
2306
- constructor(e) {
2307
- _n(this, Gn), y(this, gt, /* @__PURE__ */ new WeakMap()), y(this, Tr, void 0), y(this, zr, void 0), b(zr, this, e);
2308
- }
2309
- observe(e, t) {
2310
- var r = a(gt, this).get(e) || /* @__PURE__ */ new Set();
2311
- return r.add(t), a(gt, this).set(e, r), k(Gn, this, ca).call(this).observe(e, a(zr, this)), () => {
2312
- var n = a(gt, this).get(e);
2313
- n.delete(t), n.size === 0 && (a(gt, this).delete(e), a(Tr, this).unobserve(e));
2314
- };
2315
- }
2316
- };
2317
- Zi = Xi;
2318
- function ca() {
2319
- return a(Tr, this) ?? b(Tr, this, new ResizeObserver((e) => {
2320
- for (var t of e) {
2321
- Zi.entries.set(t.target, t);
2322
- for (var r of a(gt, this).get(t.target) || []) r(t);
2323
- }
2324
- }));
2325
- }
2326
- I(Xi, "entries", /* @__PURE__ */ new WeakMap());
2327
- function Br(e, t) {
2328
- return e === t || e?.[jt] === t;
2329
- }
2330
- function Ur(e = cn(), t, r, n) {
2331
- var i = W.r, s = E;
2332
- return Ci(() => {
2333
- var o, l;
2334
- return bn(() => {
2335
- o = l, l = n?.() || [], xt(() => {
2336
- Br(r(...l), e) || (t(e, ...l), o && Br(r(...o), e) && t(null, ...o));
2337
- });
2338
- }), () => {
2339
- let f = s;
2340
- for (; f !== i && f.parent !== null && f.parent.f & 33554432; ) f = f.parent;
2341
- const h = () => {
2342
- l && Br(r(...l), e) && t(null, ...l);
2343
- }, _ = f.teardown;
2344
- f.teardown = () => {
2345
- h(), _?.();
2346
- };
2347
- };
2348
- }), e;
2349
- }
2350
- var lr = !1;
2351
- function da(e) {
2352
- var t = lr;
2353
- try {
2354
- return lr = !1, [e(), lr];
2355
- } finally {
2356
- lr = t;
2357
- }
2358
- }
2359
- function Zn(e, t, r, n) {
2360
- var i = !Vt || (r & 2) !== 0, s = (r & 8) !== 0, o = (r & 16) !== 0, l = n, f = !0, h = void 0, _ = () => o && i ? (h ?? (h = /* @__PURE__ */ zt(n)), d(h)) : (f && (f = !1, l = o ? xt(n) : n), l);
2361
- let c;
2362
- if (s) {
2363
- var v = jt in e || ti in e;
2364
- c = et(e, t)?.set ?? (v && t in e ? ($) => e[t] = $ : void 0);
2365
- }
2366
- var u, g = !1;
2367
- s ? [u, g] = da(() => e[t]) : u = e[t], u === void 0 && n !== void 0 && (u = _(), c && (i && Vs(t), c(u)));
2368
- var m;
2369
- if (i ? m = () => {
2370
- var $ = e[t];
2371
- return $ === void 0 ? _() : (f = !0, $);
2372
- } : m = () => {
2373
- var $ = e[t];
2374
- return $ !== void 0 && (l = void 0), $ === void 0 ? l : $;
2375
- }, i && (r & 4) === 0) return m;
2376
- if (c) {
2377
- var p = e.$$legacy;
2378
- return (function($, U) {
2379
- return arguments.length > 0 ? ((!i || !U || p || g) && c(U ? m() : $), $) : m();
2380
- });
2381
- }
2382
- var w = !1, A = ((r & 1) !== 0 ? zt : vn)(() => (w = !1, m()));
2383
- s && d(A);
2384
- var R = E;
2385
- return (function($, U) {
2386
- if (arguments.length > 0) {
2387
- const F = U ? d(A) : i && s ? mt($) : $;
2388
- return L(A, F), w = !0, l !== void 0 && (l = F), $;
2389
- }
2390
- return Le && w || (R.f & 16384) !== 0 ? A.v : d(A);
2391
- });
2392
- }
2393
- function va(e) {
2394
- return new ha(e);
2395
- }
2396
- var Ke = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), ha = class {
2397
- constructor(e) {
2398
- y(this, Ke, void 0), y(this, Se, void 0);
2399
- var t = /* @__PURE__ */ new Map(), r = (i, s) => {
2400
- var o = /* @__PURE__ */ $i(s, !1, !1);
2401
- return t.set(i, o), o;
2402
- };
2403
- const n = new Proxy({
2404
- ...e.props || {},
2405
- $$events: {}
2406
- }, {
2407
- get(i, s) {
2408
- return d(t.get(s) ?? r(s, Reflect.get(i, s)));
2409
- },
2410
- has(i, s) {
2411
- return s === ti ? !0 : (d(t.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
2412
- },
2413
- set(i, s, o) {
2414
- return L(t.get(s) ?? r(s, o), o), Reflect.set(i, s, o);
2415
- }
2416
- });
2417
- b(Se, this, (e.hydrate ? Vo : Vi)(e.component, {
2418
- target: e.target,
2419
- anchor: e.anchor,
2420
- props: n,
2421
- context: e.context,
2422
- intro: e.intro ?? !1,
2423
- recover: e.recover,
2424
- transformError: e.transformError
2425
- })), !Be && (!e?.props?.$$host || e.sync === !1) && Jr(), b(Ke, this, n.$$events);
2426
- for (const i of Object.keys(a(Se, this)))
2427
- i === "$set" || i === "$destroy" || i === "$on" || qt(this, i, {
2428
- get() {
2429
- return a(Se, this)[i];
2430
- },
2431
- set(s) {
2432
- a(Se, this)[i] = s;
2433
- },
2434
- enumerable: !0
2435
- });
2436
- a(Se, this).$set = (i) => {
2437
- Object.assign(n, i);
2438
- }, a(Se, this).$destroy = () => {
2439
- Go(a(Se, this));
2440
- };
2441
- }
2442
- $set(e) {
2443
- a(Se, this).$set(e);
2444
- }
2445
- $on(e, t) {
2446
- a(Ke, this)[e] = a(Ke, this)[e] || [];
2447
- const r = (...n) => t.call(this, ...n);
2448
- return a(Ke, this)[e].push(r), () => {
2449
- a(Ke, this)[e] = a(Ke, this)[e].filter((n) => n !== r);
2450
- };
2451
- }
2452
- $destroy() {
2453
- a(Se, this).$destroy();
2454
- }
2455
- }, Ji;
2456
- typeof HTMLElement == "function" && (Ji = class extends HTMLElement {
2457
- constructor(e, t, r) {
2458
- super(), I(this, "$$ctor", void 0), I(this, "$$s", void 0), I(this, "$$c", void 0), I(this, "$$cn", !1), I(this, "$$d", {}), I(this, "$$r", !1), I(this, "$$p_d", {}), I(this, "$$l", {}), I(this, "$$l_u", /* @__PURE__ */ new Map()), I(this, "$$me", void 0), I(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
2459
- }
2460
- addEventListener(e, t, r) {
2461
- if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
2462
- const n = this.$$c.$on(e, t);
2463
- this.$$l_u.set(t, n);
2464
- }
2465
- super.addEventListener(e, t, r);
2466
- }
2467
- removeEventListener(e, t, r) {
2468
- if (super.removeEventListener(e, t, r), this.$$c) {
2469
- const n = this.$$l_u.get(t);
2470
- n && (n(), this.$$l_u.delete(t));
2471
- }
2472
- }
2473
- async connectedCallback() {
2474
- if (this.$$cn = !0, !this.$$c) {
2475
- let e = function(n) {
2476
- return (i) => {
2477
- const s = mn("slot");
2478
- n !== "default" && (s.name = n), Fe(i, s);
2479
- };
2480
- };
2481
- if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2482
- const t = {}, r = _a(this);
2483
- for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
2484
- for (const n of this.attributes) {
2485
- const i = this.$$g_p(n.name);
2486
- i in this.$$d || (this.$$d[i] = dr(i, n.value, this.$$p_d, "toProp"));
2487
- }
2488
- for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
2489
- this.$$c = va({
2490
- component: this.$$ctor,
2491
- target: this.$$shadowRoot || this,
2492
- props: {
2493
- ...this.$$d,
2494
- $$slots: t,
2495
- $$host: this
2496
- }
2497
- }), this.$$me = $o(() => {
2498
- bn(() => {
2499
- this.$$r = !0;
2500
- for (const n of hr(this.$$c)) {
2501
- if (!this.$$p_d[n]?.reflect) continue;
2502
- this.$$d[n] = this.$$c[n];
2503
- const i = dr(n, this.$$d[n], this.$$p_d, "toAttribute");
2504
- i == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, i);
2505
- }
2506
- this.$$r = !1;
2507
- });
2508
- });
2509
- for (const n in this.$$l) for (const i of this.$$l[n]) {
2510
- const s = this.$$c.$on(n, i);
2511
- this.$$l_u.set(i, s);
2512
- }
2513
- this.$$l = {};
2514
- }
2515
- }
2516
- attributeChangedCallback(e, t, r) {
2517
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = dr(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2518
- }
2519
- disconnectedCallback() {
2520
- this.$$cn = !1, Promise.resolve().then(() => {
2521
- !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
2522
- });
2523
- }
2524
- $$g_p(e) {
2525
- return hr(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2526
- }
2527
- });
2528
- function dr(e, t, r, n) {
2529
- const i = r[e]?.type;
2530
- if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e]) return t;
2531
- if (n === "toAttribute") switch (i) {
2532
- case "Object":
2533
- case "Array":
2534
- return t == null ? null : JSON.stringify(t);
2535
- case "Boolean":
2536
- return t ? "" : null;
2537
- case "Number":
2538
- return t ?? null;
2539
- default:
2540
- return t;
2541
- }
2542
- else switch (i) {
2543
- case "Object":
2544
- case "Array":
2545
- return t && JSON.parse(t);
2546
- case "Boolean":
2547
- return t;
2548
- case "Number":
2549
- return t != null ? +t : t;
2550
- default:
2551
- return t;
2552
- }
2553
- }
2554
- function _a(e) {
2555
- const t = {};
2556
- return e.childNodes.forEach((r) => {
2557
- t[r.slot || "default"] = !0;
2558
- }), t;
2559
- }
2560
- function pa(e, t, r, n, i, s) {
2561
- let o = class extends Ji {
2562
- constructor() {
2563
- super(e, r, i), this.$$p_d = t;
2564
- }
2565
- static get observedAttributes() {
2566
- return hr(t).map((l) => (t[l].attribute || l).toLowerCase());
2567
- }
2568
- };
2569
- return hr(t).forEach((l) => {
2570
- qt(o.prototype, l, {
2571
- get() {
2572
- return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
2573
- },
2574
- set(f) {
2575
- f = dr(l, f, t), this.$$d[l] = f;
2576
- var h = this.$$c;
2577
- h && (et(h, l)?.get ? h[l] = f : h.$set({ [l]: f }));
2578
- }
2579
- });
2580
- }), n.forEach((l) => {
2581
- qt(o.prototype, l, { get() {
2582
- return this.$$c?.[l];
2583
- } });
2584
- }), s && (o = s(o)), e.element = o, o;
2585
- }
2586
- var ga = /* @__PURE__ */ Xt('<div class="pie-tool-color-scheme__current svelte-1k3xgut"><div class="pie-tool-color-scheme__preview svelte-1k3xgut"><div class="pie-tool-color-scheme__preview-bg svelte-1k3xgut"><div class="pie-tool-color-scheme__preview-text svelte-1k3xgut">A</div> <div class="pie-tool-color-scheme__preview-primary svelte-1k3xgut"></div></div></div> <div class="pie-tool-color-scheme__current-info svelte-1k3xgut"><div class="pie-tool-color-scheme__current-name svelte-1k3xgut"> </div> <div class="pie-tool-color-scheme__current-description svelte-1k3xgut"> </div></div> <svg class="pie-tool-color-scheme__dropdown-arrow svelte-1k3xgut" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M7,10L12,15L17,10H7Z"></path></svg></div>'), ma = /* @__PURE__ */ No('<svg xmlns="http://www.w3.org/2000/svg" class="pie-tool-color-scheme__check svelte-1k3xgut" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"></polyline></svg>'), wa = /* @__PURE__ */ Xt('<button type="button" role="menuitem"><div class="pie-tool-color-scheme__preview svelte-1k3xgut"><div class="pie-tool-color-scheme__preview-bg svelte-1k3xgut"><div class="pie-tool-color-scheme__preview-text svelte-1k3xgut">A</div> <div class="pie-tool-color-scheme__preview-primary svelte-1k3xgut"></div></div></div> <div class="pie-tool-color-scheme__info svelte-1k3xgut"><div class="pie-tool-color-scheme__name svelte-1k3xgut"> </div> <div class="pie-tool-color-scheme__description svelte-1k3xgut"> </div></div> <!></button>'), ba = /* @__PURE__ */ Xt('<div id="pie-tool-color-scheme-menu" class="pie-tool-color-scheme__dropdown svelte-1k3xgut" role="menu"></div>'), ya = /* @__PURE__ */ Xt('<div class="pie-tool-color-scheme svelte-1k3xgut" role="dialog" tabindex="-1"><div class="pie-tool-color-scheme__content svelte-1k3xgut"><p class="pie-tool-color-scheme__description svelte-1k3xgut"> </p> <button type="button" class="pie-tool-color-scheme__dropdown-trigger svelte-1k3xgut" aria-haspopup="menu" aria-controls="pie-tool-color-scheme-menu"><!></button> <p id="pie-tool-color-scheme-status" role="status" aria-live="polite"><!></p> <!></div></div>'), ka = /* @__PURE__ */ Xt('<div style="display: none;" aria-hidden="true"></div> <!>', 1), $a = {
2587
- hash: "svelte-1k3xgut",
2588
- code: `.pie-tool-color-scheme.svelte-1k3xgut {position:relative;width:100%;height:100%;min-height:0;background-color:var(--pie-background, white);display:flex;flex-direction:column;}.pie-tool-color-scheme__content.svelte-1k3xgut {padding:1rem;position:relative;display:flex;flex-direction:column;gap:1rem;min-height:0;overflow:auto;}.pie-tool-color-scheme__description.svelte-1k3xgut {margin:0 0 1rem 0;color:var(--pie-text, black);font-size:0.875rem;}.pie-tool-color-scheme__dropdown-trigger.svelte-1k3xgut {width:100%;padding:0.75rem;border:2px solid var(--pie-button-border, #767676);border-radius:0.5rem;background-color:var(--pie-button-bg, white);color:var(--pie-button-color, black);cursor:pointer;transition:all 0.15s ease;}.pie-tool-color-scheme__dropdown-trigger.svelte-1k3xgut:hover {border-color:var(--pie-button-hover-border, #767676);background-color:var(--pie-button-hover-bg, #f0f0f0);color:var(--pie-button-hover-color, black);}.pie-tool-color-scheme__current.svelte-1k3xgut {display:flex;align-items:center;gap:0.75rem;}.pie-tool-color-scheme__current-info.svelte-1k3xgut {flex:1;text-align:left;}.pie-tool-color-scheme__current-name.svelte-1k3xgut {font-size:0.875rem;font-weight:600;color:inherit;}.pie-tool-color-scheme__current-description.svelte-1k3xgut {font-size:0.75rem;color:inherit;}.pie-tool-color-scheme__status.svelte-1k3xgut {margin:0;padding:0.75rem;border:2px solid var(--pie-button-border, #767676);border-radius:0.5rem;background-color:var(--pie-button-bg, #f0f0f0);color:var(--pie-button-color, #000000);font-size:0.875rem;line-height:1.4;}.pie-tool-color-scheme__status--empty.svelte-1k3xgut {display:block;width:0;height:0;padding:0;margin:0;overflow:hidden;border:0;}.pie-tool-color-scheme__dropdown-arrow.svelte-1k3xgut {width:1.5rem;height:1.5rem;flex-shrink:0;}.pie-tool-color-scheme__dropdown.svelte-1k3xgut {position:relative;width:100%;max-height:24rem;background-color:var(--pie-background, white);border:2px solid var(--pie-border, #ccc);border-radius:0.5rem;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow-y:auto;overflow-x:hidden;margin-top:0.5rem;}.pie-tool-color-scheme__option.svelte-1k3xgut {display:flex;align-items:center;gap:0.75rem;width:100%;padding:0.75rem 1rem;border:none;background-color:transparent;color:var(--pie-text, black);cursor:pointer;text-align:left;transition:background-color 0.15s ease;}.pie-tool-color-scheme__option.svelte-1k3xgut:hover {background-color:var(--pie-button-hover-bg, rgba(0, 0, 0, 0.05));color:var(--pie-button-hover-color, black);}.pie-tool-color-scheme__option--active.svelte-1k3xgut {background-color:var(--pie-button-active-bg, #f3f4f6);color:var(--pie-button-color, var(--pie-text, #374151));}.pie-tool-color-scheme__option.svelte-1k3xgut:disabled {outline:2px dashed var(--pie-button-border, #767676);outline-offset:-2px;background-color:var(--pie-button-bg, #f0f0f0);color:var(--pie-button-color, #000000);cursor:not-allowed;}.pie-tool-color-scheme__preview.svelte-1k3xgut {flex-shrink:0;width:2.5rem;height:2.5rem;border:2px solid var(--pie-border, #ccc);border-radius:0.25rem;overflow:hidden;}.pie-tool-color-scheme__preview-bg.svelte-1k3xgut {width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;background-color:#ffffff;}.pie-tool-color-scheme__preview-text.svelte-1k3xgut {font-weight:700;font-size:1.25rem;color:#000000;}.pie-tool-color-scheme__preview-primary.svelte-1k3xgut {position:absolute;bottom:0;right:0;width:0.75rem;height:0.75rem;border-radius:50%;background-color:#3f51b5;}.pie-tool-color-scheme__info.svelte-1k3xgut {flex:1;}.pie-tool-color-scheme__name.svelte-1k3xgut {font-size:0.875rem;font-weight:600;color:inherit;line-height:1.25;}.pie-tool-color-scheme__info.svelte-1k3xgut .pie-tool-color-scheme__description:where(.svelte-1k3xgut) {font-size:0.75rem;color:inherit;}.pie-tool-color-scheme__check.svelte-1k3xgut {flex-shrink:0;width:1rem;height:1rem;color:currentColor;}
1
+ import{coerceBooleanAttributes as us}from"@pie-players/pie-players-shared/ui/attribute-coercion";import{ZIndexLayer as cs,connectToolRuntimeContext as vs,createToolCoordinatorRegistration as hs}from"@pie-players/pie-assessment-toolkit/tools/registration";import{applyPieColorScheme as ds,listPieColorSchemes as ps,observePieColorSchemes as _s,resolvePieThemeHost as gs}from"@pie-players/pie-theme";import{createFocusTrap as ms}from"@pie-players/pie-players-shared";import{resolveInterfaceI18n as ws}from"@pie-players/pie-players-shared/i18n/provider";if(typeof window<"u"){var Si,Ei;((Si=(Ei=window).__svelte??(Ei.__svelte={})).v??(Si.v=new Set)).add("5")}var ze={},Y=Symbol("uninitialized"),Mi=Array.isArray,bs=Array.prototype.indexOf,Tt=Array.prototype.includes,sr=Array.from,or=Object.keys,At=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,ys=Object.getOwnPropertyDescriptors,$s=Object.prototype,xs=Array.prototype,Ti=Object.getPrototypeOf,Ai=Object.isExtensible,ks=()=>{};function Ss(e){for(var t=0;t<e.length;t++)e[t]()}function Ci(){var e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function Ct(e){"@babel/helpers - typeof";return Ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(e)}function Es(e,t){if(Ct(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Ct(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ms(e){var t=Es(e,"string");return Ct(t)=="symbol"?t:t+""}function O(e,t,r){return(t=Ms(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ve=1024,X=2048,Be=4096,Nr=8192,Oi=16384,Wr=32768,Ir=1<<25,Lr=65536,ht=1<<19,Ts=1<<20,Ot=1<<25,Pi=1<<21,As=1<<22,lr=1<<23,Pt=Symbol("$state"),Ri=Symbol("component"),Ni=Symbol("legacy props"),Cs=Symbol(""),Dr=Symbol("attributes"),jr=Symbol("class"),zr=Symbol("style"),ar=Symbol("text"),Rt=new class extends Error{constructor(...t){super(...t),O(this,"name","StaleReactionError"),O(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Os=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Ps(){console.warn("https://svelte.dev/e/derived_inert")}function fr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Rs(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var A=!1;function Ne(e){A=e}var C;function V(e){if(e===null)throw fr(),ze;return C=e}function ur(){return V(Me(C))}function Q(e){if(A){if(Me(C)!==null)throw fr(),ze;C=e}}function Wi(e=1){if(A){for(var t=e,r=C;t--;)r=Me(r);C=r}}function cr(e=!0){for(var t=0,r=C;;){if(r.nodeType===8){var i=r.data;if(i==="]"){if(t===0)return r;t-=1}else(i==="["||i==="[!"||i[0]==="["&&!isNaN(Number(i.slice(1))))&&(t+=1)}var n=Me(r);e&&r.remove(),r=n}}function Br(e){if(!e||e.nodeType!==8)throw fr(),ze;return e.data}function Ii(e){return e===this.v}function Ns(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Li(e){return!Ns(e,this.v)}function Ws(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Is(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ls(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Ds(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function js(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function zs(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Bs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qs(){throw new Error("https://svelte.dev/e/hydration_failed")}function Fs(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Hs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ys(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ks(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Us(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var We=!1,Nt=!1,L=null;function dt(e){L=e}function Di(e,t=!1,r){L={p:L,i:!1,c:null,e:null,s:e,x:null,r:S,l:Nt&&!t?{s:null,u:null,$:[]}:null}}function ji(e){var t=L,r=t.e;if(r!==null){t.e=null;for(var i of r)vn(i)}return e!==void 0&&(t.x=e),t.i=!0,L=t.p,qr(e)}function qr(e={}){return At(e,Ri,{value:!0}),e}function Wt(){return!Nt||L!==null&&L.l===null}var Je=[];function zi(){var e=Je;Je=[],Ss(e)}function qe(e){if(Je.length===0&&!Dt){var t=Je;queueMicrotask(()=>{t===Je&&zi()})}Je.push(e)}function Vs(){for(;Je.length>0;)zi()}var Gs=~(X|Be|ve);function z(e,t){e.f=e.f&Gs|t}function Fr(e){(e.f&512)!==0||e.deps===null?z(e,ve):z(e,Be)}function Bi(e,t){(e.f&2048)!==0?t.set(e,X):(e.f&4096)!==0&&t.get(e)!==2048&&t.set(e,Be),z(e,ve)}function vr(e){var t=T,r=S;de(null),Ce(null);try{return e()}finally{de(t),Ce(r)}}function Js(e,t,r,i){const n=Wt()?It:Hr;var s=e.filter(p=>!p.settled),o=t.map(n);if(r.length===0&&s.length===0){i(o);return}var a=S,f=Zs(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(p=>p.promise)):null;function c(p){if((a.f&16384)===0){f();try{i([...o,...p])}catch(w){Te(w,a)}hr()}}var h=qi();if(r.length===0){u.then(()=>c([])).finally(h);return}function d(){Promise.all(r.map(p=>Xs(p))).then(c).catch(p=>Te(p,a)).finally(h)}u?u.then(()=>{if((a.f&16384)!==0){h();return}f(),d(),hr()}):d()}function Zs(){var e=S,t=T,r=L,i=M;return function(s=!0){Ce(e),de(t),dt(r),s&&(e.f&16384)===0&&(i?.activate(),i?.apply())}}function hr(e=!0){Ce(null),de(null),dt(null),e&&M?.deactivate()}function qi(){var e=S,t=e.b,r=M,i=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(i,e),()=>{t?.update_pending_count(-1,r),r.decrement(i,e)}}function It(e){var t=2|X;return S!==null&&(S.f|=ht),{ctx:L,deps:null,effects:null,equals:Ii,f:t,fn:e,reactions:null,rv:0,v:Y,wv:0,parent:S,ac:null}}var Lt=Symbol("obsolete");function Xs(e,t,r){let i=S;i===null&&Is();var n=void 0,s=tt(Y),o=!T,a=new Set;return _o(()=>{var f=S,u=Ci();n=u.promise;try{Promise.resolve(e()).then(u.resolve,p=>{p!==Rt&&u.reject(p)}).finally(hr)}catch(p){u.reject(p),hr()}var c=M;if(o){if((f.f&32768)!==0)var h=qi();if(i.b?.is_rendered())c.async_deriveds.get(f)?.reject(Lt);else for(const p of a.values())p.reject(Lt);a.add(u),c.async_deriveds.set(f,u)}const d=(p,w=void 0)=>{h?.(),a.delete(u),w!==Lt&&(c.activate(),w?(s.f|=lr,mt(s,w)):((s.f&8388608)!==0&&(s.f^=lr),mt(s,p)),c.deactivate())};u.promise.then(d,p=>d(null,p||"unknown"))}),vo(()=>{for(const f of a)f.reject(Lt)}),new Promise(f=>{function u(c){function h(){c===n?f(s):u(n)}c.then(h,h)}u(n)})}function Ze(e){const t=It(e);return We||wn(t),t}function Hr(e){const t=It(e);return t.equals=Li,t}function Qs(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)J(t[r])}}function Yr(e){var t,r=S,i=e.parent;if(!Ie&&i!==null&&e.v!==Y&&(i.f&24576)!==0)return Ps(),e.v;Ce(i);try{Qs(e),t=kn(e)}finally{Ce(r)}return t}function Fi(e){var t=Yr(e);if(!e.equals(t)&&(e.wv=$n(),(!M?.is_fork||e.deps===null)&&(M!==null?(M.capture(e,t,!0),_t?.capture(e,t,!0)):e.v=t,e.deps===null))){z(e,ve);return}Ie||(G!==null?(ti()||M?.is_fork)&&G.set(e,t):Fr(e))}function eo(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&vr(()=>{t.ac.abort(Rt),t.ac=null}),t.fn!==null&&(t.teardown=ks),Ut(t,0),ni(t))}function Hi(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&bt(t)}function Yi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Kr(e,t){Yi(e,t),t.add(e)}function k(e,t,r){Yi(e,t),t.set(e,r)}function m(e,t,r){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function l(e,t){return e.get(m(e,t))}function x(e,t,r){return e.set(m(e,t),r),r}var Ki,dr=null,pt=null,M=null,_t=null,G=null,Ur=null,Dt=!1,Vr=!1,jt=null,pr=null,Ui=0,to=1,_r=new WeakMap,gr=new WeakMap,gt=new WeakMap,Xe=new WeakMap,zt=new WeakMap,Qe=new WeakMap,Gr=new WeakMap,Fe=new WeakMap,He=new WeakMap,mr=new WeakMap,Bt=new WeakMap,P=new WeakSet,et=class Gn{constructor(){Kr(this,P),O(this,"id",to++),O(this,"started",!1),O(this,"linked",!0),O(this,"prev",null),O(this,"next",null),O(this,"async_deriveds",new Map),O(this,"current",new Map),O(this,"previous",new Map),k(this,_r,new Set),k(this,gr,new Set),k(this,gt,0),k(this,Xe,new Map),k(this,zt,null),k(this,Qe,[]),k(this,Gr,[]),k(this,Fe,new Map),k(this,He,new Map),k(this,mr,new Set),O(this,"is_fork",!1),k(this,Bt,!1),pt===null?dr=pt=this:(pt.next=this,this.prev=pt),pt=this}skip_effect(t){l(He,this).has(t)||l(He,this).set(t,{d:[],m:[]}),l(mr,this).delete(t)}unskip_effect(t,r=i=>this.schedule(i)){var i=l(He,this).get(t);if(i){l(He,this).delete(t);for(var n of i.d)z(n,X),r(n);for(n of i.m)z(n,Be),r(n)}l(mr,this).add(t)}capture(t,r,i=!1){t.v!==Y&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,i]),G?.set(t,r)),this.is_fork||(t.v=r)}activate(){M=this}deactivate(){M=null,G=null}flush(){try{Vr=!0,M=this,m(P,this,wr).call(this)}finally{Ui=0,Ur=null,jt=null,pr=null,Vr=!1,M=null,G=null,Ee.clear()}}discard(){for(const t of l(gr,this))t(this);l(gr,this).clear();for(const t of this.async_deriveds.values())t.reject(Lt);m(P,this,br).call(this),l(zt,this)?.resolve()}register_created_effect(t){l(Gr,this).push(t)}increment(t,r){if(x(gt,this,l(gt,this)+1),t){let i=l(Xe,this).get(r)??0;l(Xe,this).set(r,i+1)}}decrement(t,r){if(x(gt,this,l(gt,this)-1),t){let i=l(Xe,this).get(r)??0;i===1?l(Xe,this).delete(r):l(Xe,this).set(r,i-1)}l(Bt,this)||(x(Bt,this,!0),qe(()=>{x(Bt,this,!1),this.linked&&this.flush()}))}transfer_reactions(t){for(const[r,i]of t)this.add_dirty_reaction(r,i);t.clear()}add_dirty_reaction(t,r){(r===2048||l(Fe,this).get(t)!==2048)&&l(Fe,this).set(t,r)}oncommit(t){l(_r,this).add(t)}ondiscard(t){l(gr,this).add(t)}settled(){return(l(zt,this)??x(zt,this,Ci())).promise}static ensure(){if(M===null){const t=M=new Gn;!Vr&&!Dt&&qe(()=>{t.started||t.flush()})}return M}apply(){if(!We||!this.is_fork&&this.prev===null&&this.next===null){G=null;return}G=new Map;for(const[t,[r]]of this.current)G.set(t,r);for(let t=dr;t!==null;t=t.next)if(!(t===this||t.is_fork)&&(t.id>=this.id||!m(P,t,Zi).call(t,this)))for(const[r,i]of t.previous)G.has(r)||G.set(r,i)}schedule(t){if(Ur=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}l(Qe,this).push(t)}};Ki=et;function Vi(){if(this.is_fork)return!0;for(const e of l(Xe,this).keys())if(!m(P,this,ro).call(this,e))return!0;return!1}function ro(e){for(var t=e;t!==null;t=t.parent)if(l(He,this).has(t))return!0;return!1}function Gi(){var e=[];for(const n of l(Qe,this))if(!((n.f&16384)!==0||(n.f&6144)===0)){for(var t=n,r=!1;t.parent!==null;){t=t.parent;var i=t.f;if((i&96)!==0){if((i&1024)===0){r=!0;break}t.f^=ve}}r||e.push(t)}return x(Qe,this,[]),e}function wr(){this.started=!0;for(const[o,a]of l(Fe,this))z(o,a),this.schedule(o);this.apply();for(var e=jt=[],t=[],r=pr=[];l(Qe,this).length>0;){Ui++>1e3&&(m(P,this,br).call(this),oo());for(const o of m(P,this,Gi).call(this))try{m(P,this,Ji).call(this,o,e,t)}catch(a){throw tn(o),m(P,this,Vi).call(this)||this.discard(),a}}if(M=null,r.length>0){var i=Ki.ensure();for(const o of r)i.schedule(o)}if(jt=null,pr=null,m(P,this,Vi).call(this)){m(P,this,qt).call(this,t),m(P,this,qt).call(this,e);for(const[o,a]of l(He,this))en(o,a);r.length>0&&m(P,M,wr).call(M);return}const n=m(P,this,io).call(this);if(n){m(P,this,qt).call(this,t),m(P,this,qt).call(this,e),m(P,n,no).call(n,this);return}l(Fe,this).clear();for(const o of l(_r,this))o(this);l(_r,this).clear(),_t=this,Xi(t),Xi(e),_t=null,l(zt,this)?.resolve();var s=M;l(gt,this)===0&&(l(Qe,this).length===0||s!==null)&&(m(P,this,br).call(this),We&&(m(P,this,so).call(this),M=s)),s!==null&&(Ee.clear(),m(P,s,wr).call(s))}function Ji(e,t,r){e.f^=ve;for(var i=e.first;i!==null;){var n=i.f,s=(n&96)!==0;if(!(s&&(n&1024)!==0||(n&8192)!==0||l(He,this).has(i))&&i.fn!==null){s?i.f^=ve:(n&4)!==0?t.push(i):We&&(n&16777224)!==0?r.push(i):Kt(i)&&((n&16)!==0&&this.add_dirty_reaction(i,Be),bt(i));var o=i.first;if(o!==null){i=o;continue}}for(;i!==null;){var a=i.next;if(a!==null){i=a;break}i=i.parent}}}function io(){for(var e=this.prev;e!==null;e=e.prev)if(!e.is_fork&&m(P,this,Zi).call(this,e))return e;return null}function Zi(e){for(const[t,[,r]]of this.current)if(!r&&e.current.has(t))return!0;return!1}function no(e){for(const[r,i]of e.current)!this.previous.has(r)&&e.previous.has(r)&&this.previous.set(r,e.previous.get(r)),this.current.set(r,i);for(const[r,i]of e.async_deriveds){const n=this.async_deriveds.get(r);n&&i.promise.then(n.resolve).catch(n.reject)}e.async_deriveds.clear(),this.transfer_reactions(l(Fe,e));const t=r=>{var i=r.reactions;if(i!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const o of i){var n=o.f;if((n&2)!==0)t(o);else{var s=o;n&4194320&&!this.async_deriveds.has(s)&&(l(Fe,this).delete(s),z(s,X),this.schedule(s))}}};for(const r of this.current.keys())t(r);this.oncommit(()=>e.discard()),m(P,e,br).call(e),M=this,m(P,this,wr).call(this)}function qt(e){for(var t=0;t<e.length;t+=1)Bi(e[t],l(Fe,this))}function so(){for(let c=dr;c!==null;c=c.next){var e=c.id<this.id,t=[];for(const[h,[d,p]]of this.current){if(c.current.has(h)){var r=c.current.get(h)[0];if(e&&d!==r)c.current.set(h,[d,p]);else continue}t.push(h)}if(e)for(const[h,d]of this.async_deriveds){const p=c.async_deriveds.get(h);p&&d.promise.then(p.resolve).catch(p.reject)}var i=[...c.current.keys()].filter(h=>!c.current.get(h)[1]);if(!(!c.started||i.length===0)){var n=i.filter(h=>!this.current.has(h));if(n.length===0)e&&c.discard();else if(t.length>0){if(e)for(const h of l(mr,this))c.unskip_effect(h,d=>{(d.f&4194320)!==0?c.schedule(d):m(P,c,qt).call(c,[d])});c.activate();var s=new Set,o=new Map;for(var a of t)Qi(a,n,s,o);o=new Map;var f=[...c.current].filter(([h,d])=>{const p=this.current.get(h);return p?p[0]!==d[0]||p[1]!==d[1]:!0}).map(([h])=>h);if(f.length>0)for(const h of l(Gr,this))(h.f&155648)===0&&Jr(h,f,o)&&((h.f&4194320)!==0?(z(h,X),c.schedule(h)):c.add_dirty_reaction(h,X));if(l(Qe,c).length>0&&!l(Bt,c)){c.apply();for(var u of m(P,c,Gi).call(c))m(P,c,Ji).call(c,u,[],[])}c.deactivate()}}}}function br(){if(this.linked){var e=this.prev,t=this.next;e===null?dr=t:e.next=t,t===null?pt=e:t.prev=e,this.linked=!1}}function Ft(e){var t=Dt,r=_t;_t=null,Dt=!0;try{var i;for(e&&(Ft(),i=e());;){if(Vs(),M===null)return i;M.flush()}}finally{Dt=t,_t=r}}function oo(){try{Bs()}catch(e){Te(e,Ur)}}var Se=null;function Xi(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var i=e[r++];if((i.f&24576)===0&&Kt(i)&&(Se=new Set,bt(i),i.deps===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&pn(i),Se?.size>0)){Ee.clear();for(const n of Se){if((n.f&24576)!==0)continue;const s=[n];let o=n.parent;for(;o!==null;)Se.has(o)&&(Se.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const f=s[a];(f.f&24576)===0&&bt(f)}}Se.clear()}}Se=null}}function Qi(e,t,r,i){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const n of e.reactions){const s=n.f;(s&2)!==0?Qi(n,t,r,i):(s&4194320)!==0&&(s&2048)===0&&Jr(n,t,i)&&(z(n,X),Zr(n))}}function Jr(e,t,r){const i=r.get(e);if(i!==void 0)return i;if(e.deps!==null)for(const n of e.deps){if(Tt.call(t,n))return!0;if((n.f&2)!==0&&Jr(n,t,r))return r.set(n,!0),!0}return r.set(e,!1),!1}function Zr(e){M.schedule(e)}function en(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),z(e,ve);for(var r=e.first;r!==null;)en(r,t),r=r.next}}function tn(e){z(e,ve);for(var t=e.first;t!==null;)tn(t),t=t.next}var yr=new Set,Ee=new Map,rn=!1;function tt(e,t){return{f:0,v:e,reactions:null,equals:Ii,rv:0,wv:0}}function K(e,t){const r=tt(e,t);return wn(r),r}function nn(e,t=!1,r=!0){const i=tt(e);if(t||(i.equals=Li),Nt&&r&&L!==null&&L.l!==null){var n;((n=L.l).s??(n.s=[])).push(i)}return i}function W(e,t,r=!1){return T!==null&&(!ge||(T.f&131072)!==0)&&Wt()&&(T.f&4325394)!==0&&(me===null||!me.has(e))&&Ks(),mt(e,r?wt(t):t,pr)}var rt=null,Xr=0;function mt(e,t,r=null){if(!e.equals(t)){Ie?Ee.set(e,t):Ee.has(e)||Ee.set(e,e.v);var i=et.ensure();if(i.capture(e,t),(e.f&2)!==0){const n=e;(e.f&2048)!==0&&Yr(n),G===null&&Fr(n)}e.wv=$n(),rt=null,Xr=0,sn(e,X,r),rt=null,Wt()&&S!==null&&(S.f&1024)!==0&&(S.f&96)===0&&(pe===null?bo([e]):pe.push(e)),!i.is_fork&&yr.size>0&&!rn&&lo()}return t}function lo(){rn=!1;for(const e of yr){(e.f&1024)!==0&&z(e,Be);let t;try{t=Kt(e)}catch{t=!0}t&&bt(e)}yr.clear()}function Ht(e){W(e,e.v+1)}function sn(e,t,r){var i=e.reactions;if(i!==null){var n=Wt(),s=i.length;if(Xr+=s,Xr>1e5&&rt===null&&(rt=new Set),rt!==null){if(rt.has(e))return;rt.add(e)}for(var o=0;o<s;o++){var a=i[o],f=a.f;if(!(!n&&a===S)){var u=(f&X)===0;if(u&&z(a,t),(f&131072)!==0)yr.add(a);else if((f&2)!==0){var c=a;G?.delete(c),sn(c,Be,r)}else if(u){var h=a;(f&16)!==0&&Se!==null&&Se.add(h),r!==null?r.push(h):Zr(h)}}}}}function wt(e){if(typeof e!="object"||e===null||Pt in e||Ri in e)return e;const t=Ti(e);if(t!==$s&&t!==xs)return e;var r=new Map,i=Mi(e),n=K(0),s=null,o=ot,a=f=>{if(ot===o)return f();var u=T,c=ot;de(null),yn(o);var h=f();return de(u),yn(c),h};return i&&r.set("length",K(e.length,s)),new Proxy(e,{defineProperty(f,u,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Hs();var h=r.get(u);return h===void 0?a(()=>{var d=K(c.value,s);return r.set(u,d),d}):W(h,c.value,!0),!0},deleteProperty(f,u){var c=r.get(u);if(c===void 0){if(u in f){const h=a(()=>K(Y,s));r.set(u,h),Ht(n)}}else W(c,Y),Ht(n);return!0},get(f,u,c){if(u===Pt)return e;var h=r.get(u),d=u in f;if(h===void 0&&(!d||Ge(f,u)?.writable)&&(h=a(()=>K(wt(d?f[u]:Y),s)),r.set(u,h)),h!==void 0){var p=v(h);return p===Y?void 0:p}return Reflect.get(f,u,c)},getOwnPropertyDescriptor(f,u){this.has?.(f,u);var c=Reflect.getOwnPropertyDescriptor(f,u),h=r.get(u);if(h!==void 0){var d=v(h);if(d===Y)return;if(c&&"value"in c)c.value=d;else return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(f,u){if(u===Pt)return!0;var c=r.get(u),h=c!==void 0&&c.v!==Y||Reflect.has(f,u);return(c!==void 0||(S!==null||T!==null)&&(!h||Ge(f,u)?.writable))&&(c===void 0&&(c=a(()=>K(h?wt(f[u]):Y,s)),r.set(u,c)),v(c)===Y)?!1:h},set(f,u,c,h){var d=r.get(u),p=u in f;if(i&&u==="length")for(var w=c;w<d.v;w+=1){var b=r.get(w+"");b!==void 0?W(b,Y):w in f&&(b=a(()=>K(Y,s)),r.set(w+"",b))}if(d===void 0)(!p||Ge(f,u)?.writable)&&(d=a(()=>K(void 0,s)),W(d,wt(c)),r.set(u,d));else{p=d.v!==Y;var _=a(()=>wt(c));W(d,_)}var g=Reflect.getOwnPropertyDescriptor(f,u);if(g?.set&&g.set.call(h,c),!p){if(i&&typeof u=="string"){var j=r.get("length"),N=Number(u);Number.isInteger(N)&&N>=j.v&&W(j,N+1)}Ht(n)}return!0},ownKeys(f){v(n);var u=Reflect.ownKeys(f).filter(d=>{var p=r.get(d);return p===void 0||p.v!==Y});for(var[c,h]of r)h.v!==Y&&!(c in f)&&u.push(c);return u},setPrototypeOf(){Ys()}})}var on,ln,an,fn;function Qr(){if(on===void 0){on=window,ln=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;an=Ge(t,"firstChild").get,fn=Ge(t,"nextSibling").get,Ai(e)&&(e[jr]=void 0,e[Dr]=null,e[zr]=void 0,e.__e=void 0),Ai(r)&&(r[ar]=void 0)}}function oe(e=""){return document.createTextNode(e)}function le(e){return an.call(e)}function Me(e){return fn.call(e)}function ae(e,t){if(!A)return le(e);var r=le(C);if(r===null)r=C.appendChild(oe());else if(t&&r.nodeType!==3){var i=oe();return r?.before(i),V(i),i}return t&&$r(r),V(r),r}function ao(e,t=!1){if(!A){var r=le(e);return r instanceof Comment&&r.data===""?Me(r):r}if(t){if(C?.nodeType!==3){var i=oe();return C?.before(i),V(i),i}$r(C)}return C}function Yt(e,t=!1){if(!A)return le(e);var r=ae(e,t);return Q(e),r}function _e(e,t=1,r=!1){let i=A?C:e;for(var n;t--;)n=i,i=Me(i);if(!A)return i;if(r){if(i?.nodeType!==3){var s=oe();return i===null?n?.after(s):i.before(s),V(s),s}$r(i)}return V(i),i}function un(e){e.textContent=""}function cn(){return!We||Se!==null?!1:(S.f&Wr)!==0}function ei(e,t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function $r(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function fo(e){var t=S;if(t===null)return T.f|=lr,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;Te(e,t)}function Te(e,t){if(e===ze)throw e;if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0&&(t.f&33570816)===0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}function uo(e){S===null&&(T===null&&zs(e),js()),Ie&&Ds(e)}function co(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ae(e,t){var r=S;r!==null&&(r.f&8192)!==0&&(e|=Nr);var i={ctx:L,deps:null,nodes:null,f:e|X|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};M?.register_created_effect(i);var n=i;if((e&4)!==0)jt!==null?jt.push(i):et.ensure().schedule(i);else if(t!==null){try{bt(i)}catch(o){throw J(i),o}n.deps===null&&n.teardown===null&&n.nodes===null&&n.first===n.last&&(n.f&524288)===0&&(n=n.first,(e&16)!==0&&(e&65536)!==0&&n!==null&&(n.f|=Lr))}if(n!==null&&(n.parent=r,r!==null&&co(n,r),T!==null&&(T.f&2)!==0&&(e&64)===0)){var s=T;(s.effects??(s.effects=[])).push(n)}return i}function ti(){return T!==null&&!ge}function vo(e){const t=Ae(8,null);return z(t,ve),t.teardown=e,t}function it(e){uo("$effect");var t=S.f;if(!T&&(t&32)!==0&&L!==null&&!L.i){var r=L;(r.e??(r.e=[])).push(e)}else return vn(e)}function vn(e){return Ae(4|Ts,e)}function ho(e){et.ensure();const t=Ae(64|ht,e);return()=>{J(t)}}function po(e){et.ensure();const t=Ae(64|ht,e);return(r={})=>new Promise(i=>{r.outro?nt(t,()=>{J(t),i(void 0)}):(J(t),i(void 0))})}function hn(e){return Ae(4,e)}function _o(e){return Ae(As|ht,e)}function ri(e,t=0){return Ae(8|t,e)}function xr(e,t=[],r=[],i=[]){Js(i,t,r,n=>{Ae(8,()=>{e(...n.map(v))})})}function ii(e,t=0){return Ae(16|t,e)}function he(e){return Ae(32|ht,e)}function dn(e){var t=e.teardown;if(t!==null){const r=Ie,i=T;mn(!0),de(null);try{t.call(null)}catch(n){Te(n,e.parent)}finally{mn(r),de(i)}}}function ni(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const n=r.ac;n!==null&&vr(()=>{n.abort(Rt)});var i=r.next;(r.f&64)!==0?r.parent=null:J(r,t),r=i}}function go(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&J(t),t=r}}function J(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(mo(e.nodes.start,e.nodes.end),r=!0),e.f|=Ir,ni(e,t&&!r),Ut(e,0);var i=e.nodes&&e.nodes.t;if(i!==null)for(const s of i)s.stop();dn(e),e.f^=Ir,e.f|=Oi;var n=e.parent;n!==null&&n.first!==null&&pn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function mo(e,t){for(;e!==null;){var r=e===t?null:Me(e);e.remove(),e=r}}function pn(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function nt(e,t,r=!0){var i=[];e.f|=256,_n(e,i,!0);var n=()=>{r&&J(e),t&&t()},s=i.length;if(s>0){var o=()=>--s||n();for(var a of i)a.out(o)}else n()}function _n(e,t,r){if((e.f&8192)===0){e.f^=Nr;var i=e.nodes&&e.nodes.t;if(i!==null)for(const a of i)(a.is_global||r)&&t.push(a);for(var n=e.first;n!==null;){var s=n.next;if((n.f&64)===0){var o=(n.f&65536)!==0||(n.f&32)!==0&&(e.f&16)!==0;_n(n,t,o?r:!1)}n=s}}}function kr(e){e.f&=-257,gn(e,!0)}function gn(e,t){if((e.f&256)===0&&(e.f&8192)!==0){e.f^=Nr,(e.f&1024)===0&&(z(e,X),et.ensure().schedule(e));for(var r=e.first;r!==null;){var i=r.next,n=(r.f&65536)!==0||(r.f&32)!==0;gn(r,n?t:!1),r=i}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function si(e,t){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end;r!==null;){var n=r===i?null:Me(r);t.append(r),r=n}}var wo=null,Ie=!1;function mn(e){Ie=e}var T=null,ge=!1;function de(e){T=e}var S=null;function Ce(e){S=e}var me=null;function wn(e){T!==null&&(!We&&(T.f&2097152)!==0||(T.f&2)!==0)&&(me??(me=new Set)).add(e)}var ee=null,fe=0,pe=null;function bo(e){pe=e}var bn=1,st=0,ot=st;function yn(e){ot=e}function $n(){return++bn}function Kt(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){for(var r=e.deps,i=r.length,n=0;n<i;n++){var s=r[n];if(Kt(s)&&Fi(s),s.wv>e.wv)return!0}(t&512)!==0&&G===null&&z(e,ve)}return!1}function xn(e,t,r=!0){var i=e.reactions;if(i!==null&&!(!We&&me!==null&&me.has(e)))for(var n=0;n<i.length;n++){var s=i[n];(s.f&2)!==0?xn(s,t,!1):t===s&&(r?z(s,X):(s.f&1024)!==0&&z(s,Be),Zr(s))}}function kn(e){var t=ee,r=fe,i=pe,n=T,s=me,o=L,a=ge,f=ot,u=e.f;ee=null,fe=0,pe=null,T=(u&96)===0?e:null,me=null,dt(e.ctx),ge=!1,ot=++st,e.ac!==null&&(vr(()=>{e.ac.abort(Rt)}),e.ac=null);try{e.f|=Pi;var c=e.fn,h=c();e.f|=Wr;var d=Sn(e);if(Wt()&&pe!==null&&!ge&&d!==null&&(e.f&6146)===0)for(var p=0;p<pe.length;p++)xn(pe[p],e);if(n!==null&&n!==e){if(st++,n.deps!==null)for(let w=0;w<r;w+=1)n.deps[w].rv=st;if(t!==null)for(const w of t)w.rv=st;pe!==null&&(i===null?i=pe:i.push(...pe))}return(e.f&8388608)!==0&&(e.f^=lr),h}catch(w){return Sn(e),fo(w)}finally{e.f^=Pi,ee=t,fe=r,pe=i,T=n,me=s,dt(o),ge=a,ot=f}}function Sn(e){var t=e.deps,r=M?.is_fork;if(ee!==null){var i;if(r||Ut(e,fe),t!==null&&fe>0)for(t.length=fe+ee.length,i=0;i<ee.length;i++)t[fe+i]=ee[i];else e.deps=t=ee;if(ti()&&(e.f&512)!==0)for(i=fe;i<t.length;i++){var n;((n=t[i]).reactions??(n.reactions=[])).push(e)}}else!r&&t!==null&&fe<t.length&&(Ut(e,fe),t.length=fe);return t}function yo(e,t){let r=t.reactions;if(r!==null){var i=bs.call(r,e);if(i!==-1){var n=r.length-1;n===0?r=t.reactions=null:(r[i]=r[n],r.pop())}}if(r===null&&(t.f&2)!==0&&(ee===null||!Tt.call(ee,t))){var s=t;(s.f&512)!==0&&(s.f^=512),s.v!==Y&&Fr(s),s.ac!==null&&vr(()=>{s.ac.abort(Rt),s.ac=null,z(s,X)}),eo(s),Ut(s,0)}}function Ut(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)yo(e,r[i])}function bt(e){var t=e.f;if((t&16384)===0){z(e,ve);var r=S;S=e;try{(t&16777232)!==0?go(e):ni(e),dn(e);var i=kn(e);e.teardown=typeof i=="function"?i:null,e.wv=bn}finally{S=r}}}async function $o(){if(We)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),Ft()}function v(e){var t=(e.f&2)!==0;if(wo?.add(e),T!==null&&!ge&&!(S!==null&&(S.f&16384)!==0)&&(me===null||!me.has(e))){var r=T.deps;if((T.f&2097152)!==0)e.rv<st&&(e.rv=st,ee===null&&r!==null&&r[fe]===e?fe++:ee===null?ee=[e]:ee.push(e));else{var i;(i=T).deps??(i.deps=[]),Tt.call(T.deps,e)||T.deps.push(e);var n=e.reactions;n===null?e.reactions=[T]:Tt.call(n,T)||n.push(T)}}if(Ie&&Ee.has(e))return Ee.get(e);if(t){var s=e;if(Ie){var o=s.v;return((s.f&1024)===0&&s.reactions!==null||Mn(s))&&(o=Yr(s)),Ee.set(s,o),o}var a=(s.f&512)===0&&!ge&&T!==null&&(T.f&512)!==0,f=(s.f&Wr)===0;Kt(s)&&(a&&(s.f|=512),Fi(s)),a&&!f&&(Hi(s),En(s))}if(G?.has(e))return G.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function En(e){if(e.f|=512,e.deps!==null)for(const r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:Tt.call(t,e)||t.push(e),(r.f&2)!==0&&(r.f&512)===0&&(Hi(r),En(r))}}function Mn(e){if(e.v===Y)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Ee.has(t)||(t.f&2)!==0&&Mn(t))return!0;return!1}function yt(e){var t=ge;try{return ge=!0,e()}finally{ge=t}}var $t=Symbol("events"),Tn=new Set,oi=new Set;function li(e,t,r){(t[$t]??(t[$t]={}))[e]=r}function xo(e){for(var t=0;t<e.length;t++)Tn.add(e[t]);for(var r of oi)r(e)}var ai=null,fi=!1;function An(e){var t=this,r=t.ownerDocument,i=e.type,n=e.composedPath?.()||[],s=n[0]||e.target;ai=e,fi||(fi=!0,setTimeout(()=>{fi=!1,ai=null}));var o=0,a=ai===e&&e[$t];if(a){var f=n.indexOf(a);if(f!==-1&&(t===document||t===window)){e[$t]=t;return}var u=n.indexOf(t);if(u===-1)return;f<=u&&(o=f)}if(s=n[o]||e.target,s!==t){At(e,"currentTarget",{configurable:!0,get(){return s||r}});var c=T,h=S;de(null),Ce(null);try{for(var d,p=[];s!==null&&s!==t;){try{var w=s[$t]?.[i];w!=null&&(!s.disabled||e.target===s)&&w.call(s,e)}catch(b){d?p.push(b):d=b}if(e.cancelBubble)break;o++,s=o<n.length?n[o]:null}if(d){for(let b of p)queueMicrotask(()=>{throw b});throw d}}finally{e[$t]=t,delete e.currentTarget,de(c),Ce(h)}}}var ko=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function So(e){return ko?.createHTML(e)??e}function Cn(e){var t=ei("template");return t.innerHTML=So(e.replaceAll("<!>","<!---->")),t.content}function Le(e,t){var r=S;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function Vt(e,t){var r=(t&1)!==0,i=(t&2)!==0,n,s=!e.startsWith("<!>");return()=>{if(A)return Le(C,null),C;n===void 0&&(n=Cn(s?e:"<!>"+e),r||(n=le(n)));var o=i||ln?document.importNode(n,!0):n.cloneNode(!0);if(r){var a=le(o),f=o.lastChild;Le(a,f)}else Le(o,o);return o}}function Eo(e,t,r="svg"){var i=!e.startsWith("<!>"),n=(t&1)!==0,s=`<${r}>${i?e:"<!>"+e}</${r}>`,o;return()=>{if(A)return Le(C,null),C;if(!o){var a=le(Cn(s));if(n)for(o=document.createDocumentFragment();le(a);)o.appendChild(le(a));else o=le(a)}var f=o.cloneNode(!0);if(n){var u=le(f),c=f.lastChild;Le(u,c)}else Le(f,f);return f}}function Mo(e,t){return Eo(e,t,"svg")}function To(e=""){if(!A){var t=oe(e+"");return Le(t,t),t}var r=C;return r.nodeType!==3?(r.before(r=oe()),V(r)):$r(r),Le(r,r),r}function Ye(e,t){if(A){var r=S;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=C),ur();return}e!==null&&e.before(t)}var Ao=["touchstart","touchmove"];function Co(e){return Ao.includes(e)}function Oo(e){let t=0,r=tt(0),i;return()=>{ti()&&(v(r),ri(()=>(t===0&&(i=yt(()=>e(()=>Ht(r)))),t+=1,()=>{qe(()=>{t-=1,t===0&&(i?.(),i=void 0,Ht(r))})})))}}var Po=Lr|ht;function Ro(e,t,r,i){new No(e,t,r,i)}var we=new WeakMap,ui=new WeakMap,Oe=new WeakMap,Gt=new WeakMap,te=new WeakMap,be=new WeakMap,ue=new WeakMap,ye=new WeakMap,Ke=new WeakMap,xt=new WeakMap,lt=new WeakMap,Sr=new WeakMap,ci=new WeakMap,at=new WeakMap,On=new WeakMap,R=new WeakSet,No=class{constructor(e,t,r,i){Kr(this,R),O(this,"parent",void 0),O(this,"is_pending",!1),O(this,"transform_error",void 0),k(this,we,void 0),k(this,ui,A?C:null),k(this,Oe,void 0),k(this,Gt,void 0),k(this,te,void 0),k(this,be,null),k(this,ue,null),k(this,ye,null),k(this,Ke,null),k(this,xt,0),k(this,lt,0),k(this,Sr,!1),k(this,ci,new Map),k(this,at,null),k(this,On,Oo(()=>(x(at,this,tt(l(xt,this))),()=>{x(at,this,null)}))),x(we,this,e),x(Oe,this,t),x(Gt,this,n=>{var s=S;s.b=this,s.f|=128,r(n)}),this.parent=S.b,this.transform_error=i??this.parent?.transform_error??(n=>n),x(te,this,ii(()=>{if(A){const n=Br(l(ui,this));ur();const s=n==="[!";if(n.startsWith("[?")){const o=JSON.parse(n.slice(2));m(R,this,Io).call(this,o)}else s?m(R,this,Lo).call(this):m(R,this,Wo).call(this)}else m(R,this,Rn).call(this)},Po)),A&&x(we,this,C)}defer_effect(e){Bi(e,l(ci,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!l(Oe,this).pending}update_pending_count(e,t){m(R,this,Nn).call(this,e,t),x(xt,this,l(xt,this)+e),!(!l(at,this)||l(Sr,this))&&(x(Sr,this,!0),qe(()=>{x(Sr,this,!1),l(at,this)&&mt(l(at,this),l(xt,this))}))}get_effect_pending(){return l(On,this).call(this),v(l(at,this))}error(e){if(e===ze||!l(Oe,this).onerror&&!l(Oe,this).failed)throw e;M?.is_fork?(l(be,this)&&M.skip_effect(l(be,this)),l(ue,this)&&M.skip_effect(l(ue,this)),l(ye,this)&&M.skip_effect(l(ye,this)),M.oncommit(()=>{m(R,this,ft).call(this)||m(R,this,Wn).call(this,e)})):m(R,this,Wn).call(this,e)}};function Wo(){try{x(be,this,he(()=>l(Gt,this).call(this,l(we,this))))}catch(e){this.error(e)}}function Io(e){const t=l(Oe,this).failed,{reset:r,invoke_onerror:i}=m(R,this,Pn).call(this,e);qe(i),t&&x(ye,this,he(()=>{t(l(we,this),()=>e,()=>r)}))}function Pn(e){var t=!1,r=!1;const i=()=>{if(!m(R,this,ft).call(this)){if(t){Rs();return}t=!0,r&&Us(),l(ye,this)!==null&&nt(l(ye,this),()=>{x(ye,this,null)}),m(R,this,vi).call(this,()=>{m(R,this,Rn).call(this)})}};return{reset:i,invoke_onerror:()=>{if(!m(R,this,ft).call(this))try{r=!0,l(Oe,this).onerror?.(e,i),r=!1}catch(s){Te(s,l(te,this)&&l(te,this).parent)}}}}function ft(){return(l(te,this).f&(Oi|Ir))!==0}function Lo(){const e=l(Oe,this).pending;e&&(this.is_pending=!0,x(ue,this,he(()=>e(l(we,this)))),qe(()=>{if(!m(R,this,ft).call(this)){var t=x(Ke,this,document.createDocumentFragment()),r=oe(),i=!1;if(t.append(r),x(be,this,m(R,this,vi).call(this,()=>{try{return he(()=>l(Gt,this).call(this,r))}catch(n){try{this.error(n),i=!0}catch(s){Te(s,l(te,this).parent)}return null}})),l(be,this)===null){x(Ke,this,null),i&&m(R,this,Er).call(this,M);return}l(lt,this)===0&&(l(we,this).before(t),x(Ke,this,null),nt(l(ue,this),()=>{x(ue,this,null)}),m(R,this,Er).call(this,M))}}))}function Rn(){try{if(this.is_pending=this.has_pending_snippet(),x(lt,this,0),x(xt,this,0),x(be,this,he(()=>{l(Gt,this).call(this,l(we,this))})),l(lt,this)>0){var e=x(Ke,this,document.createDocumentFragment());si(l(be,this),e);const t=l(Oe,this).pending;x(ue,this,he(()=>t(l(we,this))))}else m(R,this,Er).call(this,M)}catch(t){this.error(t)}}function Er(e){this.is_pending=!1,e.transfer_reactions(l(ci,this))}function vi(e){var t=S,r=T,i=L;Ce(l(te,this)),de(l(te,this)),dt(l(te,this).ctx);try{return et.ensure(),e()}finally{Ce(t),de(r),dt(i)}}function Nn(e,t){if(!this.has_pending_snippet()){if(this.parent){var r;m(R,r=this.parent,Nn).call(r,e,t)}return}x(lt,this,l(lt,this)+e),l(lt,this)===0&&(m(R,this,Er).call(this,t),l(ue,this)&&nt(l(ue,this),()=>{x(ue,this,null)}),l(Ke,this)&&(l(we,this).before(l(Ke,this)),x(Ke,this,null)))}function Wn(e){l(be,this)&&(J(l(be,this)),x(be,this,null)),l(ue,this)&&(J(l(ue,this)),x(ue,this,null)),l(ye,this)&&(J(l(ye,this)),x(ye,this,null)),A&&(V(l(ui,this)),Wi(),V(cr()));let t=l(Oe,this).failed;const r=i=>{if(m(R,this,ft).call(this))return;const{reset:n,invoke_onerror:s}=m(R,this,Pn).call(this,i);s(),t&&!m(R,this,ft).call(this)&&x(ye,this,m(R,this,vi).call(this,()=>{try{return he(()=>{var o=S;o.b=this,o.f|=128,t(l(we,this),()=>i,()=>n)})}catch(o){return Te(o,l(te,this).parent),null}}))};qe(()=>{if(!m(R,this,ft).call(this)){var i;try{i=this.transform_error(e)}catch(n){Te(n,l(te,this)&&l(te,this).parent);return}i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(r,n=>Te(n,l(te,this)&&l(te,this).parent)):r(i)}})}function kt(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[ar]??(e[ar]=e.nodeValue))&&(e[ar]=r,e.nodeValue=`${r}`)}function In(e,t){return Ln(e,t)}function Do(e,t){Qr(),t.intro=t.intro??!1;const r=t.target,i=A,n=C;try{for(var s=le(r);s&&(s.nodeType!==8||s.data!=="[");)s=Me(s);if(!s)throw ze;Ne(!0),V(s);const o=Ln(e,{...t,anchor:s});return Ne(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
+ `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==ze&&console.warn("Failed to hydrate: ",o),t.recover===!1&&qs(),Qr(),un(r),Ne(!1),In(e,t)}finally{Ne(i),V(n)}}var Mr=new Map;function Ln(e,{target:t,anchor:r,props:i={},events:n,context:s,intro:o=!0,transformError:a}){Qr();var f=void 0,u=po(()=>{var c=r??t.appendChild(oe());Ro(c,{pending:()=>{}},p=>{Di({});var w=L;if(s&&(w.c=s),n&&(i.$$events=n),A&&Le(p,null),f=e(p,i)||qr(),A&&(S.nodes.end=C,C===null||C.nodeType!==8||C.data!=="]"))throw fr(),ze;ji()},a);var h=new Set,d=p=>{for(var w=0;w<p.length;w++){var b=p[w];if(!h.has(b)){h.add(b);var _=Co(b);for(const N of[t,document]){var g=Mr.get(N);g===void 0&&(g=new Map,Mr.set(N,g));var j=g.get(b);j===void 0?(N.addEventListener(b,An,{passive:_}),g.set(b,1)):g.set(b,j+1)}}}};return d(sr(Tn)),oi.add(d),()=>{for(var p of h)for(const _ of[t,document]){var w=Mr.get(_),b=w.get(p);--b==0?(_.removeEventListener(p,An),w.delete(p),w.size===0&&Mr.delete(_)):w.set(p,b)}oi.delete(d),c!==r&&c.parentNode?.removeChild(c)}});return hi.set(f,u),f}var hi=new WeakMap;function jo(e,t){const r=hi.get(e);return r?(hi.delete(e),r(t)):Promise.resolve()}var De=new WeakMap,Ue=new WeakMap,$e=new WeakMap,Jt=new WeakMap,di=new WeakMap,pi=new WeakMap,Dn=new WeakMap,zo=class{constructor(e,t=!0){O(this,"anchor",void 0),k(this,De,new Map),k(this,Ue,new Map),k(this,$e,new Map),k(this,Jt,new Set),k(this,di,!0),k(this,pi,r=>{if(l(De,this).has(r)){var i=l(De,this).get(r),n=l(Ue,this).get(i);if(n)kr(n),l(Jt,this).delete(i);else{var s=l($e,this).get(i);s&&(kr(s.effect),l(Ue,this).set(i,s.effect),l($e,this).delete(i),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),n=s.effect)}for(const[o,a]of l(De,this)){if(l(De,this).delete(o),o===r)break;const f=l($e,this).get(a);f&&(J(f.effect),l($e,this).delete(a))}for(const[o,a]of l(Ue,this)){if(o===i||l(Jt,this).has(o))continue;const f=()=>{if(Array.from(l(De,this).values()).includes(o)){var u=document.createDocumentFragment();si(a,u),u.append(oe()),l($e,this).set(o,{effect:a,fragment:u})}else J(a);l(Jt,this).delete(o),l(Ue,this).delete(o)};l(di,this)||!n?(l(Jt,this).add(o),nt(a,f,!1)):f()}}}),k(this,Dn,r=>{l(De,this).delete(r);const i=Array.from(l(De,this).values());for(const[n,s]of l($e,this))i.includes(n)||(J(s.effect),l($e,this).delete(n))}),this.anchor=e,x(di,this,t)}ensure(e,t){var r=M,i=cn();if(t&&!l(Ue,this).has(e)&&!l($e,this).has(e))if(i){var n=document.createDocumentFragment(),s=oe();n.append(s),l($e,this).set(e,{effect:he(()=>t(s)),fragment:n})}else l(Ue,this).set(e,he(()=>t(this.anchor)));if(l(De,this).set(r,e),i){for(const[o,a]of l(Ue,this))o===e?r.unskip_effect(a):r.skip_effect(a);for(const[o,a]of l($e,this))o===e?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(l(pi,this)),r.ondiscard(l(Dn,this))}else A&&(this.anchor=C),l(pi,this).call(this,r)}};function Bo(e){L===null&&Ws("onMount"),Nt&&L.l!==null?qo(L).m.push(e):it(()=>{const t=yt(e);if(typeof t=="function")return t})}function qo(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function Zt(e,t,r=!1){var i;A&&(i=C,ur());var n=new zo(e),s=r?Lr:0;function o(a,f){if(A){var u=Br(i);if(a!==parseInt(u.substring(1))){var c=cr();V(c),n.anchor=c,Ne(!1),n.ensure(a,f),Ne(!0);return}}n.ensure(a,f)}ii(()=>{var a=!1;t((f,u=0)=>{a=!0,o(u,f)}),a||o(-1,null)},s)}function Fo(e,t,r){for(var i=[],n=t.length,s,o=t.length,a=0;a<n;a++){let h=t[a];nt(h,()=>{if(s){if(s.pending.delete(h),s.done.add(h),s.pending.size===0){var d=e.outrogroups;_i(e,sr(s.done)),d.delete(s),d.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var f=i.length===0&&r!==null&&e.pending.size===0;if(f){var u=r,c=u.parentNode;un(c),c.append(u),e.items.clear()}_i(e,t,!f)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function _i(e,t,r=!0){var i;if(e.pending.size>0){i=new Set;for(const o of e.pending.values())for(const a of o)i.add(e.items.get(a).e)}for(var n=0;n<t.length;n++){var s=t[n];i?.has(s)?(s.f|=Ot,si(s,document.createDocumentFragment())):J(t[n],r)}}var Tr;function Ho(e,t,r,i,n,s=null){var o=e,a=new Map;if((t&4)!==0){var f=e;o=A?V(le(f)):f.appendChild(oe())}A&&ur();var u=null,c=Hr(()=>{var _=r();return Mi(_)?_:_==null?[]:sr(_)}),h=new Map,d=!0;function p(_){if((b.effect.f&16384)===0){b.pending.delete(_);var g=v(c);b.fallback=u,Yo(b,g,o,t,i),u!==null&&(g.length===0?(u.f&33554432)===0?kr(u):(u.f^=Ot,Qt(u,null,o)):nt(u,()=>{u=null}))}}function w(_){b.pending.delete(_)}var b={effect:ii(()=>{var _=v(c),g=_.length;let j=!1;A&&Br(o)==="[!"!=(g===0)&&(o=cr(),V(o),Ne(!1),j=!0);for(var N=new Set,$=M,D=cn(),B=0;B<g;B+=1){A&&C.nodeType===8&&C.data==="]"&&(o=C,j=!0,Ne(!1));var re=_[B],xe=i(re,B),ie=d?null:a.get(xe);ie?(ie.v&&mt(ie.v,re),ie.i&&mt(ie.i,B),D&&$.unskip_effect(ie.e)):(ie=Ko(a,d?o:Tr??(Tr=oe()),re,xe,B,n,t,r),d||(ie.e.f|=Ot),a.set(xe,ie)),N.add(xe)}if(g===0&&s&&!u&&(d?u=he(()=>s(o)):(u=he(()=>s(Tr??(Tr=oe()))),u.f|=Ot)),g>N.size&&Ls("","",""),A&&g>0&&V(cr()),!d)if(h.set($,N),D){for(const[ke,q]of a)N.has(ke)||$.skip_effect(q.e);$.oncommit(p),$.ondiscard(w)}else p($);j&&Ne(!0),v(c)}),flags:t,items:a,pending:h,outrogroups:null,fallback:u};d=!1,A&&(o=C)}function Xt(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function Yo(e,t,r,i,n){var s=(i&8)!==0,o=t.length,a=e.items,f=Xt(e.effect.first),u,c=null,h,d=[],p=[],w,b,_,g;if(s)for(g=0;g<o;g+=1)w=t[g],b=n(w,g),_=a.get(b).e,(_.f&33554432)===0&&(_.nodes?.a?.measure(),(h??(h=new Set)).add(_));for(g=0;g<o;g+=1){if(w=t[g],b=n(w,g),_=a.get(b).e,e.outrogroups!==null)for(const ke of e.outrogroups)ke.pending.delete(_),ke.done.delete(_);if((_.f&8192)!==0&&(kr(_),s&&(_.nodes?.a?.unfix(),(h??(h=new Set)).delete(_))),(_.f&33554432)!==0)if(_.f^=Ot,_===f)Qt(_,null,r);else{var j=c?c.next:f;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ve(e,c,_),Ve(e,_,j),Qt(_,j,r),c=_,d=[],p=[],f=Xt(c.next);continue}if(_!==f){if(u!==void 0&&u.has(_)){if(d.length<p.length){var N=p[0],$;c=N.prev;var D=d[0],B=d[d.length-1];for($=0;$<d.length;$+=1)Qt(d[$],N,r);for($=0;$<p.length;$+=1)u.delete(p[$]);Ve(e,D.prev,B.next),Ve(e,c,D),Ve(e,B,N),f=N,c=B,g-=1,d=[],p=[]}else u.delete(_),Qt(_,f,r),Ve(e,_.prev,_.next),Ve(e,_,c===null?e.effect.first:c.next),Ve(e,c,_),c=_;continue}for(d=[],p=[];f!==null&&f!==_;)(u??(u=new Set)).add(f),p.push(f),f=Xt(f.next);if(f===null)continue}(_.f&33554432)===0&&d.push(_),c=_,f=Xt(_.next)}if(e.outrogroups!==null){for(const ke of e.outrogroups)ke.pending.size===0&&(_i(e,sr(ke.done)),e.outrogroups?.delete(ke));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||u!==void 0){var re=[];if(u!==void 0)for(_ of u)(_.f&8192)===0&&re.push(_);for(;f!==null;)(f.f&8192)===0&&f!==e.fallback&&re.push(f),f=Xt(f.next);var xe=re.length;if(xe>0){var ie=(i&4)!==0&&o===0?r:null;if(s){for(g=0;g<xe;g+=1)re[g].nodes?.a?.measure();for(g=0;g<xe;g+=1)re[g].nodes?.a?.fix()}Fo(e,re,ie)}}s&&qe(()=>{if(h!==void 0)for(_ of h)_.nodes?.a?.apply()})}function Ko(e,t,r,i,n,s,o,a){var f=(o&1)!==0?(o&16)===0?nn(r,!1,!1):tt(r):null,u=(o&2)!==0?tt(n):null;return{v:f,i:u,e:he(()=>(s(t,f??r,u??n,a),()=>{e.delete(i)}))}}function Qt(e,t,r){if(e.nodes)for(var i=e.nodes.start,n=e.nodes.end,s=t&&(t.f&33554432)===0?t.nodes.start:r;i!==null;){var o=Me(i);if(s.before(i),i===n)return;i=o}}function Ve(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function Uo(e,t){hn(()=>{e=S?.parent?.nodes?.start??e;var r=e.getRootNode(),i=r.host?r:r.head??r.ownerDocument.head;if(!i.querySelector("#"+t.hash)){const n=ei("style");n.id=t.hash,n.textContent=t.code,i.appendChild(n)}})}var jn=[...`
3
+ \r\f \v\uFEFF`];function Vo(e,t,r){var i=e==null?"":""+e;if(t&&(i=i?i+" "+t:t),r){for(var n of Object.keys(r))if(r[n])i=i?i+" "+n:n;else if(i.length)for(var s=n.length,o=0;(o=i.indexOf(n,o))>=0;){var a=o+s;(o===0||jn.includes(i[o-1]))&&(a===i.length||jn.includes(i[a]))?i=(o===0?"":i.substring(0,o))+i.substring(a+1):o=a}}return i===""?null:i}function zn(e,t=!1){var r=t?" !important;":";",i="";for(var n of Object.keys(e)){var s=e[n];s!=null&&s!==""&&(i+=" "+n+": "+s+r)}return i}function gi(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Go(e,t){if(t){var r="",i,n;if(Array.isArray(t)?(i=t[0],n=t[1]):i=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var s=!1,o=0,a=!1,f=[];i&&f.push(...Object.keys(i).map(gi)),n&&f.push(...Object.keys(n).map(gi));var u=0,c=-1;const b=e.length;for(var h=0;h<b;h++){var d=e[h];if(a?d==="/"&&e[h-1]==="*"&&(a=!1):s?s===d&&(s=!1):d==="/"&&e[h+1]==="*"?a=!0:d==='"'||d==="'"?s=d:d==="("?o++:d===")"&&o--,!a&&s===!1&&o===0){if(d===":"&&c===-1)c=h;else if(d===";"||h===b-1){if(c!==-1){var p=gi(e.substring(u,c).trim());if(!f.includes(p)){d!==";"&&h++;var w=e.substring(u,h).trim();r+=" "+w+";"}}u=h+1,c=-1}}}}return i&&(r+=zn(i)),n&&(r+=zn(n,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Bn(e,t,r,i,n,s){var o=e[jr];if(A||o!==r||o===void 0){var a=Vo(r,i,s);(!A||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e[jr]=r}else if(s&&n!==s)for(var f in s){var u=!!s[f];(n==null||u!==!!n[f])&&e.classList.toggle(f,u)}return s}function mi(e,t={},r,i){for(var n in r){var s=r[n];t[n]!==s&&(r[n]==null?e.style.removeProperty(n):e.style.setProperty(n,s,i))}}function St(e,t,r,i){var n=e[zr];if(A||n!==t){var s=Go(t,i);(!A||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[zr]=t}else i&&(Array.isArray(i)?(mi(e,r?.[0],i[0]),mi(e,r?.[1],i[1],"important")):mi(e,r,i));return i}var Jo=Symbol("is custom element"),Zo=Symbol("is html"),Xo=Os?"link":"LINK";function Pe(e,t,r,i){var n=Qo(e);if(!(A&&(n[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===Xo))){var s=n[t];s!==(n[t]=r)&&(t==="loading"&&(e[Cs]=r),r==null?e.removeAttribute(t):typeof r!="string"&&el(e).has(t)?e[t]=r:A&&(typeof r=="number"||typeof r=="boolean")&&s===String(r)||e.setAttribute(t,r))}}function Qo(e){return e[Dr]??(e[Dr]={[Jo]:e.nodeName.includes("-"),[Zo]:e.namespaceURI==="http://www.w3.org/1999/xhtml"})}var qn=new Map;function el(e){var t=e.getAttribute("is")||e.nodeName,r=qn.get(t);if(r)return r;qn.set(t,r=new Set);for(var i,n=e,s=Element.prototype;s!==n;){i=ys(n);for(var o in i)i[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.add(o);n=Ti(n)}return r}var Fn,Et=new WeakMap,Ar=new WeakMap,wi=new WeakMap,Hn=new WeakSet,Yn=class{constructor(e){Kr(this,Hn),k(this,Et,new WeakMap),k(this,Ar,void 0),k(this,wi,void 0),x(wi,this,e)}observe(e,t){var r=l(Et,this).get(e)||new Set;return r.add(t),l(Et,this).set(e,r),m(Hn,this,tl).call(this).observe(e,l(wi,this)),()=>{var i=l(Et,this).get(e);i.delete(t),i.size===0&&(l(Et,this).delete(e),l(Ar,this).unobserve(e))}}};Fn=Yn;function tl(){return l(Ar,this)??x(Ar,this,new ResizeObserver(e=>{for(var t of e){Fn.entries.set(t.target,t);for(var r of l(Et,this).get(t.target)||[])r(t)}}))}O(Yn,"entries",new WeakMap);function bi(e,t){return e===t||e?.[Pt]===t}function er(e=qr(),t,r,i){var n=L.r,s=S;return hn(()=>{var o,a;return ri(()=>{o=a,a=i?.()||[],yt(()=>{bi(r(...a),e)||(t(e,...a),o&&bi(r(...o),e)&&t(null,...o))})}),()=>{let f=s;for(;f!==n&&f.parent!==null&&f.parent.f&33554432;)f=f.parent;const u=()=>{a&&bi(r(...a),e)&&t(null,...a)},c=f.teardown;f.teardown=()=>{u(),c?.()}}}),e}var Cr=!1;function rl(e){var t=Cr;try{return Cr=!1,[e(),Cr]}finally{Cr=t}}function Kn(e,t,r,i){var n=!Nt||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,a=i,f=!0,u=void 0,c=()=>o&&n?(u??(u=It(i)),v(u)):(f&&(f=!1,a=o?yt(i):i),a);let h;if(s){var d=Pt in e||Ni in e;h=Ge(e,t)?.set??(d&&t in e?$=>e[t]=$:void 0)}var p,w=!1;s?[p,w]=rl(()=>e[t]):p=e[t],p===void 0&&i!==void 0&&(p=c(),h&&(n&&Fs(t),h(p)));var b;if(n?b=()=>{var $=e[t];return $===void 0?c():(f=!0,$)}:b=()=>{var $=e[t];return $!==void 0&&(a=void 0),$===void 0?a:$},n&&(r&4)===0)return b;if(h){var _=e.$$legacy;return(function($,D){return arguments.length>0?((!n||!D||_||w)&&h(D?b():$),$):b()})}var g=!1,j=((r&1)!==0?It:Hr)(()=>(g=!1,b()));s&&v(j);var N=S;return(function($,D){if(arguments.length>0){const B=D?v(j):n&&s?wt($):$;return W(j,B),g=!0,a!==void 0&&(a=B),$}return Ie&&g||(N.f&16384)!==0?j.v:v(j)})}function il(e){return new nl(e)}var ut=new WeakMap,Re=new WeakMap,nl=class{constructor(e){k(this,ut,void 0),k(this,Re,void 0);var t=new Map,r=(n,s)=>{var o=nn(s,!1,!1);return t.set(n,o),o};const i=new Proxy({...e.props||{},$$events:{}},{get(n,s){return v(t.get(s)??r(s,Reflect.get(n,s)))},has(n,s){return s===Ni?!0:(v(t.get(s)??r(s,Reflect.get(n,s))),Reflect.has(n,s))},set(n,s,o){return W(t.get(s)??r(s,o),o),Reflect.set(n,s,o)}});x(Re,this,(e.hydrate?Do:In)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError})),!We&&(!e?.props?.$$host||e.sync===!1)&&Ft(),x(ut,this,i.$$events);for(const n of Object.keys(l(Re,this)))n==="$set"||n==="$destroy"||n==="$on"||At(this,n,{get(){return l(Re,this)[n]},set(s){l(Re,this)[n]=s},enumerable:!0});l(Re,this).$set=n=>{Object.assign(i,n)},l(Re,this).$destroy=()=>{jo(l(Re,this))}}$set(e){l(Re,this).$set(e)}$on(e,t){l(ut,this)[e]=l(ut,this)[e]||[];const r=(...i)=>t.call(this,...i);return l(ut,this)[e].push(r),()=>{l(ut,this)[e]=l(ut,this)[e].filter(i=>i!==r)}}$destroy(){l(Re,this).$destroy()}},Un;typeof HTMLElement=="function"&&(Un=class extends HTMLElement{constructor(e,t,r){super(),O(this,"$$ctor",void 0),O(this,"$$s",void 0),O(this,"$$c",void 0),O(this,"$$cn",!1),O(this,"$$d",{}),O(this,"$$r",!1),O(this,"$$p_d",{}),O(this,"$$l",{}),O(this,"$$l_u",new Map),O(this,"$$me",void 0),O(this,"$$shadowRoot",null),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const i=this.$$c.$on(e,t);this.$$l_u.set(t,i)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const i=this.$$l_u.get(t);i&&(i(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(i){return n=>{const s=ei("slot");i!=="default"&&(s.name=i),Ye(n,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=sl(this);for(const i of this.$$s)i in r&&(i==="default"&&!this.$$d.children?(this.$$d.children=e(i),t.default=!0):t[i]=e(i));for(const i of this.attributes){const n=this.$$g_p(i.name);n in this.$$d||(this.$$d[n]=Or(n,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=il({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ho(()=>{ri(()=>{this.$$r=!0;for(const i of or(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const n=Or(i,this.$$d[i],this.$$p_d,"toAttribute");n==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,n)}this.$$r=!1})});for(const i in this.$$l)for(const n of this.$$l[i]){const s=this.$$c.$on(i,n);this.$$l_u.set(n,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Or(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return or(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Or(e,t,r,i){const n=r[e]?.type;if(t=n==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(n){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(n){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function sl(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ol(e,t,r,i,n,s){let o=class extends Un{constructor(){super(e,r,n),this.$$p_d=t}static get observedAttributes(){return or(t).map(a=>(t[a].attribute||a).toLowerCase())}};return or(t).forEach(a=>{At(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(f){f=Or(a,f,t),this.$$d[a]=f;var u=this.$$c;u&&(Ge(u,a)?.get?u[a]=f:u.$set({[a]:f}))}})}),i.forEach(a=>{At(o.prototype,a,{get(){return this.$$c?.[a]}})}),s&&(o=s(o)),e.element=o,o}var ll=Vt('<div class="pie-tool-color-scheme__current svelte-13gvt6x"><div class="pie-tool-color-scheme__preview svelte-13gvt6x" aria-hidden="true"><div class="pie-tool-color-scheme__preview-bg svelte-13gvt6x"><div class="pie-tool-color-scheme__preview-text svelte-13gvt6x"></div> <div class="pie-tool-color-scheme__preview-primary svelte-13gvt6x"></div></div></div> <div class="pie-tool-color-scheme__current-info svelte-13gvt6x"><div class="pie-tool-color-scheme__current-name svelte-13gvt6x"> </div> <div class="pie-tool-color-scheme__current-description svelte-13gvt6x"> </div></div> <svg class="pie-tool-color-scheme__dropdown-arrow svelte-13gvt6x" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M7,10L12,15L17,10H7Z"></path></svg></div>'),al=Mo('<svg xmlns="http://www.w3.org/2000/svg" class="pie-tool-color-scheme__check svelte-13gvt6x" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"></polyline></svg>'),fl=Vt('<button type="button" role="menuitem"><div class="pie-tool-color-scheme__preview svelte-13gvt6x" aria-hidden="true"><div class="pie-tool-color-scheme__preview-bg svelte-13gvt6x"><div class="pie-tool-color-scheme__preview-text svelte-13gvt6x"></div> <div class="pie-tool-color-scheme__preview-primary svelte-13gvt6x"></div></div></div> <div class="pie-tool-color-scheme__info svelte-13gvt6x"><div class="pie-tool-color-scheme__name svelte-13gvt6x"> </div> <div class="pie-tool-color-scheme__description svelte-13gvt6x"> </div></div> <!></button>'),ul=Vt('<div id="pie-tool-color-scheme-menu" class="pie-tool-color-scheme__dropdown svelte-13gvt6x" role="menu"></div>'),cl=Vt('<div class="pie-tool-color-scheme svelte-13gvt6x" role="dialog" tabindex="-1"><div class="pie-tool-color-scheme__content svelte-13gvt6x"><p class="pie-tool-color-scheme__description svelte-13gvt6x"> </p> <button type="button" class="pie-tool-color-scheme__dropdown-trigger svelte-13gvt6x" aria-haspopup="menu" aria-controls="pie-tool-color-scheme-menu"><!></button> <p id="pie-tool-color-scheme-status" role="status" aria-live="polite"><!></p> <!></div></div>'),vl=Vt('<div style="display: none;" aria-hidden="true"></div> <!>',1),hl={hash:"svelte-13gvt6x",code:`.pie-tool-color-scheme.svelte-13gvt6x {position:relative;width:100%;height:100%;min-height:0;background-color:var(--pie-background, white);display:flex;flex-direction:column;}.pie-tool-color-scheme__content.svelte-13gvt6x {padding:1rem;position:relative;display:flex;flex-direction:column;gap:1rem;min-height:0;overflow:auto;}.pie-tool-color-scheme__description.svelte-13gvt6x {margin:0;color:var(--pie-text, black);font-size:0.875rem;}.pie-tool-color-scheme__dropdown-trigger.svelte-13gvt6x {width:100%;padding:0.75rem;border:2px solid var(--pie-button-border, #767676);border-radius:0.5rem;background-color:var(--pie-button-bg, white);color:var(--pie-button-color, black);cursor:pointer;transition:all 0.15s ease;}.pie-tool-color-scheme__dropdown-trigger.svelte-13gvt6x:hover {border-color:var(--pie-button-hover-border, #767676);background-color:var(--pie-button-hover-bg, #f0f0f0);color:var(--pie-button-hover-color, black);}.pie-tool-color-scheme__current.svelte-13gvt6x {display:flex;align-items:center;gap:0.75rem;}.pie-tool-color-scheme__current-info.svelte-13gvt6x {flex:1;text-align:left;}.pie-tool-color-scheme__current-name.svelte-13gvt6x {font-size:0.875rem;font-weight:600;color:inherit;}.pie-tool-color-scheme__current-description.svelte-13gvt6x {font-size:0.75rem;color:inherit;}.pie-tool-color-scheme__status.svelte-13gvt6x {margin:0;padding:0.75rem;border:2px solid var(--pie-button-border, #767676);border-radius:0.5rem;background-color:var(--pie-button-bg, #f0f0f0);color:var(--pie-button-color, #000000);font-size:0.875rem;line-height:1.4;}
2589
4
 
2590
- /* Keyboard focus styling */.pie-tool-color-scheme__dropdown-trigger.svelte-1k3xgut:focus-visible,
2591
- .pie-tool-color-scheme__option.svelte-1k3xgut:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:-2px;}`
2592
- };
2593
- function xa(e, t) {
2594
- oi(t, !0), na(e, $a);
2595
- const r = typeof window < "u";
2596
- let n = Zn(t, "visible", 7, !1), i = Zn(t, "toolId", 7, "theme"), s = /* @__PURE__ */ G(void 0), o = /* @__PURE__ */ G(void 0), l = /* @__PURE__ */ G(void 0), f = /* @__PURE__ */ G(null);
2597
- const h = /* @__PURE__ */ Ue(() => d(f)?.toolCoordinator), _ = ps("Theme", hs.MODAL);
2598
- Ge(() => {
2599
- if (d(s))
2600
- return _s(d(s), (x) => {
2601
- L(f, x, !0);
2602
- });
2603
- });
2604
- function c() {
2605
- return bs(d(s));
2606
- }
2607
- function v() {
2608
- return c()?.getAttribute("scheme")?.trim() || "default";
2609
- }
2610
- const u = /* @__PURE__ */ Ue(() => d(f)?.elementToolStateStore ?? null), g = /* @__PURE__ */ Ue(() => {
2611
- const x = d(f)?.assessmentId, M = d(f)?.sectionId;
2612
- return !d(u) || !x || !M ? null : d(u).getGlobalElementId({
2613
- assessmentId: x,
2614
- sectionId: M,
2615
- attemptId: d(f)?.attemptId ?? "",
2616
- itemId: "",
2617
- elementId: ""
2618
- });
2619
- }), m = /* @__PURE__ */ Ue(() => ks(d(f)));
2620
- let p = /* @__PURE__ */ G(ms());
2621
- const w = /* @__PURE__ */ Ue(() => d(p).schemes.map((x) => ({
2622
- ...x,
2623
- description: x.description || "",
2624
- available: !0
2625
- })));
2626
- let A = /* @__PURE__ */ G("default"), R = /* @__PURE__ */ G(!1), $ = null;
2627
- function U(x) {
2628
- r && gs(x, {
2629
- from: d(s),
2630
- persistenceKey: null
2631
- });
2632
- }
2633
- function F(x) {
2634
- L(A, x, !0), L(R, !1), U(x), d(u) && d(g) && d(u).setState(d(g), i(), x), d(h)?.hideTool(i());
2635
- }
2636
- function ae() {
2637
- L(R, !d(R));
2638
- }
2639
- const P = /* @__PURE__ */ Ue(() => {
2640
- const x = d(w).find((Y) => Y.id === d(A));
2641
- if (x) return x;
2642
- const M = d(w).find((Y) => Y.id === "default") || d(w)[0];
2643
- return M ? {
2644
- id: d(A),
2645
- name: d(m).t("tools.theme.unavailableName", { id: d(A) }),
2646
- description: d(m).t("tools.theme.unavailableDescription"),
2647
- kind: "unavailable",
2648
- preview: M.preview,
2649
- available: !1
2650
- } : null;
2651
- }), Jt = /* @__PURE__ */ Ue(() => d(P) && !d(P).available ? [d(P), ...d(w)] : d(w));
2652
- function z(x) {
2653
- if (x.key === "Escape")
2654
- d(R) && (x.preventDefault(), x.stopPropagation(), L(R, !1), queueMicrotask(() => d(l)?.focus()));
2655
- else if (d(R) && (x.key === "ArrowDown" || x.key === "ArrowUp")) {
2656
- x.preventDefault();
2657
- const M = d(o)?.querySelectorAll(".pie-tool-color-scheme__option:not([disabled])");
2658
- if (!M || M.length === 0) return;
2659
- const Y = Array.from(M).findIndex((ft) => ft === x.composedPath()[0]);
2660
- let ve;
2661
- x.key === "ArrowDown" ? ve = Y === -1 ? 0 : (Y + 1) % M.length : ve = Y === -1 ? M.length - 1 : (Y - 1 + M.length) % M.length, M[ve]?.focus();
2662
- }
2663
- }
2664
- Ge(() => {
2665
- if (!r) return;
2666
- const x = d(g), M = x ? d(u)?.getState(x, i()) : void 0;
2667
- xt(() => {
2668
- typeof M == "string" && M ? (L(A, M, !0), v() !== M && U(M)) : L(A, v(), !0);
2669
- });
2670
- }), Ge(() => {
2671
- n() && xt(() => L(A, v(), !0));
2672
- }), Ge(() => _.sync(d(h), i())), Ge(() => {
2673
- d(h) && d(o) && i() && d(h).updateToolElement(i(), d(o));
2674
- }), Ge(() => {
2675
- !n() && $ ? ($(), $ = null) : n() && d(o) && !$ && ($ = ys(d(o)));
2676
- }), Xo(() => {
2677
- const x = ws((Y) => {
2678
- const ve = d(o)?.getRootNode(), ft = (ve instanceof ShadowRoot ? ve.activeElement?.closest(".pie-tool-color-scheme__option") : null)?.getAttribute("data-scheme-id");
2679
- L(p, Y), ft && !Y.schemes.some(($e) => $e.id === ft) && queueMicrotask(() => d(l)?.focus());
2680
- });
2681
- function M(Y) {
2682
- if (!d(R)) return;
2683
- const ve = Y.composedPath();
2684
- (!d(o) || !ve.includes(d(o))) && L(R, !1);
2685
- }
2686
- return document.addEventListener("click", M), () => {
2687
- x(), document.removeEventListener("click", M), _.release();
2688
- };
2689
- });
2690
- var Pr = {
2691
- get visible() {
2692
- return n();
2693
- },
2694
- set visible(x = !1) {
2695
- n(x), Jr();
2696
- },
2697
- get toolId() {
2698
- return i();
2699
- },
2700
- set toolId(x = "theme") {
2701
- i(x), Jr();
2702
- }
2703
- }, Qt = ka(), Sn = mo(Qt);
2704
- Ur(Sn, (x) => L(s, x), () => d(s));
2705
- var Qi = _e(Sn, 2), es = (x) => {
2706
- var M = ya(), Y = ee(M), ve = ee(Y), ft = Mt(ve, !0), $e = _e(ve, 2), ts = ee($e), rs = (B) => {
2707
- var le = ga(), he = ee(le), D = ee(he), K = ee(D), tr = _e(K, 2);
2708
- J(D), J(he);
2709
- var ut = _e(he, 2), ct = ee(ut), rr = Mt(ct, !0), Ir = _e(ct, 2), Et = Mt(Ir, !0);
2710
- J(ut), ri(2), J(le), ir(() => {
2711
- vt(D, `background-color: ${d(P).preview.bg ?? ""}`), vt(K, `color: ${d(P).preview.text ?? ""}`), vt(tr, `background-color: ${d(P).preview.primary ?? ""}`), dt(rr, d(P).name), dt(Et, d(P).description);
2712
- }), Fe(B, le);
2713
- };
2714
- Ot(ts, (B) => {
2715
- d(P) && B(rs);
2716
- }), J($e), Ur($e, (B) => L(l, B), () => d(l));
2717
- var er = _e($e, 2);
2718
- let En;
2719
- var ns = ee(er), is = (B) => {
2720
- var le = Wo();
2721
- ir((he) => dt(le, he), [() => d(m).t("tools.theme.unavailableStatus")]), Fe(B, le);
2722
- };
2723
- Ot(ns, (B) => {
2724
- d(P) && !d(P).available && B(is);
2725
- }), J(er);
2726
- var ss = _e(er, 2), os = (B) => {
2727
- var le = ba();
2728
- ea(le, 21, () => d(Jt), (he) => he.id, (he, D) => {
2729
- var K = wa();
2730
- let tr;
2731
- var ut = ee(K), ct = ee(ut), rr = ee(ct), Ir = _e(rr, 2);
2732
- J(ct), J(ut);
2733
- var Et = _e(ut, 2), Tn = ee(Et), as = Mt(Tn, !0), ls = _e(Tn, 2), fs = Mt(ls, !0);
2734
- J(Et);
2735
- var us = _e(Et, 2), cs = (Tt) => {
2736
- var ds = ma();
2737
- Fe(Tt, ds);
2738
- };
2739
- Ot(us, (Tt) => {
2740
- d(A) === d(D).id && Tt(cs);
2741
- }), J(K), ir((Tt) => {
2742
- tr = Kn(K, 1, "pie-tool-color-scheme__option svelte-1k3xgut", null, tr, { "pie-tool-color-scheme__option--active": d(A) === d(D).id }), xe(K, "aria-label", Tt), xe(K, "aria-current", d(A) === d(D).id), xe(K, "aria-disabled", !d(D).available), K.disabled = !d(D).available, xe(K, "data-scheme-id", d(D).id), vt(ct, `background-color: ${d(D).preview.bg ?? ""}`), vt(rr, `color: ${d(D).preview.text ?? ""}`), vt(Ir, `background-color: ${d(D).preview.primary ?? ""}`), dt(as, d(D).name), dt(fs, d(D).description);
2743
- }, [() => d(D).available ? d(D).name : d(m).t("tools.theme.optionUnavailableA11y", { name: d(D).name })]), Wr("click", K, () => F(d(D).id)), Fe(he, K);
2744
- }), J(le), Fe(B, le);
2745
- };
2746
- Ot(ss, (B) => {
2747
- d(R) && B(os);
2748
- }), J(Y), J(M), Ur(M, (B) => L(o, B), () => d(o)), ir((B, le, he, D, K) => {
2749
- xe(M, "lang", B), xe(M, "dir", le), xe(M, "aria-label", he), dt(ft, D), xe($e, "aria-label", K), xe($e, "aria-expanded", d(R)), xe($e, "aria-describedby", d(P) && !d(P).available ? "pie-tool-color-scheme-status" : void 0), En = Kn(er, 1, "pie-tool-color-scheme__status svelte-1k3xgut", null, En, { "pie-tool-color-scheme__status--empty": d(P)?.available !== !1 }), M.dir = M.dir;
2750
- }, [
2751
- () => d(m).getLocale(),
2752
- () => d(m).getDirection?.() ?? "ltr",
2753
- () => d(m).t("tools.theme.selectorA11y"),
2754
- () => d(m).t("tools.theme.hint"),
2755
- () => d(P) ? d(m).t("tools.theme.selectCurrentA11y", { name: d(P).name }) : d(m).t("tools.theme.selectA11y")
2756
- ]), Wr("keydown", M, z), Wr("click", $e, ae), Fe(x, M);
2757
- };
2758
- return Ot(Qi, (x) => {
2759
- n() && x(es);
2760
- }), Fe(e, Qt), ai(Pr);
2761
- }
2762
- Co(["keydown", "click"]);
2763
- Sa("pie-tool-theme", pa(xa, {
2764
- visible: {
2765
- attribute: "visible",
2766
- type: "Boolean"
2767
- },
2768
- toolId: {
2769
- attribute: "tool-id",
2770
- type: "String"
2771
- }
2772
- }, [], [], { mode: "open" }, vs));
2773
- function Sa(e, t) {
2774
- customElements.get(e) || customElements.define(e, t);
2775
- }
2776
- export {
2777
- xa as default
2778
- };
5
+ /* Out of the flex flow, so the empty live region costs no gap, while staying
6
+ in the accessibility tree to announce a later status. */.pie-tool-color-scheme__status--empty.svelte-13gvt6x {position:absolute;display:block;width:0;height:0;padding:0;margin:0;overflow:hidden;border:0;}.pie-tool-color-scheme__dropdown-arrow.svelte-13gvt6x {width:1.5rem;height:1.5rem;flex-shrink:0;}
7
+
8
+ /* The menu fills the panel's remaining height and scrolls its options. A
9
+ scroll container's automatic minimum height is 0, so when the contents
10
+ outgrow the panel (larger text, zoom, a short window) the floor keeps about
11
+ two options showing and the content area scrolls instead. Border-box sizing
12
+ keeps the border inside \`width: 100%\`. */.pie-tool-color-scheme__dropdown.svelte-13gvt6x {position:relative;box-sizing:border-box;width:100%;min-height:9rem;max-height:24rem;background-color:var(--pie-background, white);border:2px solid var(--pie-border, #ccc);border-radius:0.5rem;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow-y:auto;overflow-x:hidden;}.pie-tool-color-scheme__option.svelte-13gvt6x {display:flex;align-items:center;gap:0.75rem;width:100%;padding:0.75rem 1rem;border:none;background-color:transparent;color:var(--pie-text, black);cursor:pointer;text-align:left;transition:background-color 0.15s ease;}.pie-tool-color-scheme__option.svelte-13gvt6x:hover {background-color:var(--pie-button-hover-bg, rgba(0, 0, 0, 0.05));color:var(--pie-button-hover-color, black);}.pie-tool-color-scheme__option--active.svelte-13gvt6x {background-color:var(--pie-button-active-bg, #f3f4f6);color:var(--pie-button-color, var(--pie-text, #374151));}.pie-tool-color-scheme__option.svelte-13gvt6x:disabled {outline:2px dashed var(--pie-button-border, #767676);outline-offset:-2px;background-color:var(--pie-button-bg, #f0f0f0);color:var(--pie-button-color, #000000);cursor:not-allowed;}.pie-tool-color-scheme__preview.svelte-13gvt6x {flex-shrink:0;width:2.5rem;height:2.5rem;border:2px solid var(--pie-border, #ccc);border-radius:0.25rem;overflow:hidden;}.pie-tool-color-scheme__preview-bg.svelte-13gvt6x {width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;background-color:#ffffff;}.pie-tool-color-scheme__preview-text.svelte-13gvt6x {font-weight:700;font-size:1.25rem;color:#000000;}
13
+
14
+ /* A decorative type sample, separate from the theme's visible label. */.pie-tool-color-scheme__preview-text.svelte-13gvt6x::before {content:'A';}.pie-tool-color-scheme__preview-primary.svelte-13gvt6x {position:absolute;bottom:0;right:0;width:0.75rem;height:0.75rem;border-radius:50%;background-color:#3f51b5;}.pie-tool-color-scheme__info.svelte-13gvt6x {flex:1;}.pie-tool-color-scheme__name.svelte-13gvt6x {font-size:0.875rem;font-weight:600;color:inherit;line-height:1.25;}.pie-tool-color-scheme__info.svelte-13gvt6x .pie-tool-color-scheme__description:where(.svelte-13gvt6x) {font-size:0.75rem;color:inherit;}.pie-tool-color-scheme__check.svelte-13gvt6x {flex-shrink:0;width:1rem;height:1rem;color:currentColor;}
15
+
16
+ /* Keyboard focus styling */.pie-tool-color-scheme__dropdown-trigger.svelte-13gvt6x:focus-visible,
17
+ .pie-tool-color-scheme__option.svelte-13gvt6x:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:-2px;}`};function Vn(e,t){Di(t,!0),Uo(e,hl);const r=typeof window<"u";let i=Kn(t,"visible",7,!1),n=Kn(t,"toolId",7,"theme"),s=K(void 0),o=K(void 0),a=K(void 0),f=K(void 0),u=K(void 0),c=K(null);const h=Ze(()=>v(c)?.toolCoordinator),d=hs("Theme",cs.MODAL);it(()=>{if(v(s))return vs(v(s),y=>{W(c,y,!0)})});function p(){return gs(v(s))}function w(){return p()?.getAttribute("scheme")?.trim()||"default"}const b=Ze(()=>v(c)?.elementToolStateStore??null),_=Ze(()=>{const y=v(c)?.assessmentId,E=v(c)?.sectionId;return!v(b)||!y||!E?null:v(b).getGlobalElementId({assessmentId:y,sectionId:E,attemptId:v(c)?.attemptId??"",itemId:"",elementId:""})}),g=Ze(()=>ws(v(c)));let j=K(ps());const N=Ze(()=>v(j).schemes.map(y=>({...y,description:y.description||"",available:!0})));let $=K("default"),D=K(!1),B=null;function re(y){r&&ds(y,{from:v(s),persistenceKey:null})}function xe(y){W($,y,!0),W(D,!1),re(y),v(b)&&v(_)&&v(b).setState(v(_),n(),y),v(h)?.hideTool(n())}function ie(){W(D,!v(D)),v(D)&&$o().then(ke)}function ke(){if(!v(f)||!v(u)||!v(a))return;const y=v(f).getBoundingClientRect(),E=y.top+v(f).clientHeight,F=v(u).getBoundingClientRect().bottom-E,Z=v(u).firstElementChild?.getBoundingClientRect(),je=Z?Z.bottom-E:0,ce=v(a).getBoundingClientRect().top-y.top,tr=Math.min(F,Math.max(ce,je));tr>0&&(v(f).scrollTop+=tr)}const q=Ze(()=>{const y=v(N).find(F=>F.id===v($));if(y)return y;const E=v(N).find(F=>F.id==="default")||v(N)[0];return E?{id:v($),name:v(g).t("tools.theme.unavailableName",{id:v($)}),description:v(g).t("tools.theme.unavailableDescription"),kind:"unavailable",preview:E.preview,available:!1}:null}),Jn=Ze(()=>v(q)&&!v(q).available?[v(q),...v(N)]:v(N));function Zn(y){if(y.key==="Escape")v(D)&&(y.preventDefault(),y.stopPropagation(),W(D,!1),queueMicrotask(()=>v(a)?.focus()));else if(v(D)&&(y.key==="ArrowDown"||y.key==="ArrowUp")){y.preventDefault();const E=v(o)?.querySelectorAll(".pie-tool-color-scheme__option:not([disabled])");if(!E||E.length===0)return;const F=Array.from(E).findIndex(je=>je===y.composedPath()[0]);let Z;y.key==="ArrowDown"?Z=F===-1?0:(F+1)%E.length:Z=F===-1?E.length-1:(F-1+E.length)%E.length,E[Z]?.focus()}}it(()=>{if(!r)return;const y=v(_),E=y?v(b)?.getState(y,n()):void 0;yt(()=>{typeof E=="string"&&E?(W($,E,!0),w()!==E&&re(E)):W($,w(),!0)})}),it(()=>{i()&&yt(()=>W($,w(),!0))}),it(()=>d.sync(v(h),n())),it(()=>{v(h)&&v(o)&&n()&&v(h).updateToolElement(n(),v(o))}),it(()=>{!i()&&B?(B(),B=null):i()&&v(o)&&!B&&(B=ms(v(o)))}),Bo(()=>{const y=_s(F=>{const Z=v(o)?.getRootNode(),je=(Z instanceof ShadowRoot?Z.activeElement?.closest(".pie-tool-color-scheme__option"):null)?.getAttribute("data-scheme-id");W(j,F),je&&!F.schemes.some(ce=>ce.id===je)&&queueMicrotask(()=>v(a)?.focus())});function E(F){if(!v(D))return;const Z=F.composedPath();(!v(o)||!Z.includes(v(o)))&&W(D,!1)}return document.addEventListener("click",E),()=>{y(),document.removeEventListener("click",E),d.release()}});var Xn={get visible(){return i()},set visible(y=!1){i(y),Ft()},get toolId(){return n()},set toolId(y="theme"){n(y),Ft()}},yi=vl(),$i=ao(yi);er($i,y=>W(s,y),()=>v(s));var Qn=_e($i,2),es=y=>{var E=cl(),F=ae(E),Z=ae(F),je=Yt(Z,!0),ce=_e(Z,2),tr=ae(ce),ts=H=>{var ne=ll(),se=ae(ne),I=ae(se),U=ae(I),ir=_e(U,2);Q(I),Q(se);var ct=_e(se,2),vt=ae(ct),nr=Yt(vt,!0),Pr=Yt(_e(vt,2),!0);Q(ct),Wi(2),Q(ne),xr(()=>{St(I,`background-color: ${v(q).preview.bg??""}`),St(U,`color: ${v(q).preview.text??""}`),St(ir,`background-color: ${v(q).preview.primary??""}`),kt(nr,v(q).name),kt(Pr,v(q).description)}),Ye(H,ne)};Zt(tr,H=>{v(q)&&H(ts)}),Q(ce),er(ce,H=>W(a,H),()=>v(a));var rr=_e(ce,2);let xi;var rs=ae(rr),is=H=>{var ne=To();xr(se=>kt(ne,se),[()=>v(g).t("tools.theme.unavailableStatus")]),Ye(H,ne)};Zt(rs,H=>{v(q)&&!v(q).available&&H(is)}),Q(rr);var ns=_e(rr,2),ss=H=>{var ne=ul();Ho(ne,21,()=>v(Jn),se=>se.id,(se,I)=>{var U=fl();let ir;var ct=ae(U),vt=ae(ct),nr=ae(vt),Pr=_e(nr,2);Q(vt),Q(ct);var Rr=_e(ct,2),ki=ae(Rr),os=Yt(ki,!0),ls=Yt(_e(ki,2),!0);Q(Rr);var as=_e(Rr,2),fs=Mt=>{Ye(Mt,al())};Zt(as,Mt=>{v($)===v(I).id&&Mt(fs)}),Q(U),xr(Mt=>{ir=Bn(U,1,"pie-tool-color-scheme__option svelte-13gvt6x",null,ir,{"pie-tool-color-scheme__option--active":v($)===v(I).id}),Pe(U,"aria-label",Mt),Pe(U,"aria-current",v($)===v(I).id),Pe(U,"aria-disabled",!v(I).available),U.disabled=!v(I).available,Pe(U,"data-scheme-id",v(I).id),St(vt,`background-color: ${v(I).preview.bg??""}`),St(nr,`color: ${v(I).preview.text??""}`),St(Pr,`background-color: ${v(I).preview.primary??""}`),kt(os,v(I).name),kt(ls,v(I).description)},[()=>v(I).available?`${v(I).name} ${v(I).description}`.trim():v(g).t("tools.theme.optionUnavailableA11y",{name:`${v(I).name} ${v(I).description}`.trim()})]),li("click",U,()=>xe(v(I).id)),Ye(se,U)}),Q(ne),er(ne,se=>W(u,se),()=>v(u)),Ye(H,ne)};Zt(ns,H=>{v(D)&&H(ss)}),Q(F),er(F,H=>W(f,H),()=>v(f)),Q(E),er(E,H=>W(o,H),()=>v(o)),xr((H,ne,se,I,U)=>{Pe(E,"lang",H),Pe(E,"dir",ne),Pe(E,"aria-label",se),kt(je,I),Pe(ce,"aria-label",U),Pe(ce,"aria-expanded",v(D)),Pe(ce,"aria-describedby",v(q)&&!v(q).available?"pie-tool-color-scheme-status":void 0),xi=Bn(rr,1,"pie-tool-color-scheme__status svelte-13gvt6x",null,xi,{"pie-tool-color-scheme__status--empty":v(q)?.available!==!1}),E.dir=E.dir},[()=>v(g).getLocale(),()=>v(g).getDirection?.()??"ltr",()=>v(g).t("tools.theme.selectorA11y"),()=>v(g).t("tools.theme.hint"),()=>v(q)?v(g).t("tools.theme.selectCurrentA11y",{name:`${v(q).name} ${v(q).description}`.trim()}):v(g).t("tools.theme.selectA11y")]),li("keydown",E,Zn),li("click",ce,ie),Ye(y,E)};return Zt(Qn,y=>{i()&&y(es)}),Ye(e,yi),ji(Xn)}xo(["keydown","click"]),dl("pie-tool-theme",ol(Vn,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"}},[],[],{mode:"open"},us));function dl(e,t){customElements.get(e)||customElements.define(e,t)}export{Vn as default};