@hintergrund/ui 0.1.1
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.
- package/README.md +58 -0
- package/dist/admin.js +28347 -0
- package/dist/global-D2DXJZaD.js +3089 -0
- package/dist/login.js +135 -0
- package/dist/ui.css +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,3089 @@
|
|
|
1
|
+
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
|
|
2
|
+
const at = 1, ft = 2, fn = 4, ir = 8, ar = 16, fr = 1, lr = 2, ur = 4, or = 8, cr = 16, Ns = 4, hr = 1, dr = 2, ln = "[", lt = "[!", Dt = "]", Re = {}, N = Symbol(), _r = "http://www.w3.org/1999/xhtml", un = !1;
|
|
3
|
+
var ut = Array.isArray, vr = Array.prototype.indexOf, Ft = Array.from, tt = Object.keys, Ie = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, pr = Object.getOwnPropertyDescriptors, mr = Object.prototype, gr = Array.prototype, on = Object.getPrototypeOf, zt = Object.isExtensible;
|
|
4
|
+
function Cs(e) {
|
|
5
|
+
return typeof e == "function";
|
|
6
|
+
}
|
|
7
|
+
const Os = () => {
|
|
8
|
+
};
|
|
9
|
+
function Rs(e) {
|
|
10
|
+
return typeof e?.then == "function";
|
|
11
|
+
}
|
|
12
|
+
function $r(e) {
|
|
13
|
+
for (var t = 0; t < e.length; t++)
|
|
14
|
+
e[t]();
|
|
15
|
+
}
|
|
16
|
+
function cn() {
|
|
17
|
+
var e, t, n = new Promise((r, s) => {
|
|
18
|
+
e = r, t = s;
|
|
19
|
+
});
|
|
20
|
+
return { promise: n, resolve: e, reject: t };
|
|
21
|
+
}
|
|
22
|
+
function Is(e, t) {
|
|
23
|
+
if (Array.isArray(e))
|
|
24
|
+
return e;
|
|
25
|
+
if (!(Symbol.iterator in e))
|
|
26
|
+
return Array.from(e);
|
|
27
|
+
const n = [];
|
|
28
|
+
for (const r of e)
|
|
29
|
+
if (n.push(r), n.length === t) break;
|
|
30
|
+
return n;
|
|
31
|
+
}
|
|
32
|
+
const F = 2, qt = 4, jt = 8, Ee = 16, ue = 32, _e = 64, ot = 128, W = 256, nt = 512, P = 1024, U = 2048, ve = 4096, H = 8192, fe = 16384, Bt = 32768, ct = 65536, Jt = 1 << 17, wr = 1 << 18, Se = 1 << 19, br = 1 << 20, At = 1 << 21, Ht = 1 << 22, $e = 1 << 23, Ne = Symbol("$state"), hn = Symbol("legacy props"), yr = Symbol(""), Ae = new class extends Error {
|
|
33
|
+
name = "StaleReactionError";
|
|
34
|
+
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
35
|
+
}(), ht = 3, De = 8;
|
|
36
|
+
function Er(e) {
|
|
37
|
+
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
38
|
+
}
|
|
39
|
+
function Sr() {
|
|
40
|
+
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
41
|
+
}
|
|
42
|
+
function kr(e) {
|
|
43
|
+
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
44
|
+
}
|
|
45
|
+
function Tr() {
|
|
46
|
+
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
47
|
+
}
|
|
48
|
+
function Ar(e) {
|
|
49
|
+
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
50
|
+
}
|
|
51
|
+
function xr() {
|
|
52
|
+
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
53
|
+
}
|
|
54
|
+
function Nr() {
|
|
55
|
+
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
56
|
+
}
|
|
57
|
+
function Cr(e) {
|
|
58
|
+
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
59
|
+
}
|
|
60
|
+
function Or() {
|
|
61
|
+
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
62
|
+
}
|
|
63
|
+
function Rr() {
|
|
64
|
+
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
65
|
+
}
|
|
66
|
+
function Ir() {
|
|
67
|
+
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
68
|
+
}
|
|
69
|
+
function Pr() {
|
|
70
|
+
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
71
|
+
}
|
|
72
|
+
function dt(e) {
|
|
73
|
+
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
74
|
+
}
|
|
75
|
+
function Mr() {
|
|
76
|
+
console.warn("https://svelte.dev/e/select_multiple_invalid_value");
|
|
77
|
+
}
|
|
78
|
+
function Lr() {
|
|
79
|
+
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
80
|
+
}
|
|
81
|
+
let v = !1;
|
|
82
|
+
function B(e) {
|
|
83
|
+
v = e;
|
|
84
|
+
}
|
|
85
|
+
let w;
|
|
86
|
+
function O(e) {
|
|
87
|
+
if (e === null)
|
|
88
|
+
throw dt(), Re;
|
|
89
|
+
return w = e;
|
|
90
|
+
}
|
|
91
|
+
function _t() {
|
|
92
|
+
return O(
|
|
93
|
+
/** @type {TemplateNode} */
|
|
94
|
+
/* @__PURE__ */ se(w)
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
function Ms(e) {
|
|
98
|
+
if (v) {
|
|
99
|
+
if (/* @__PURE__ */ se(w) !== null)
|
|
100
|
+
throw dt(), Re;
|
|
101
|
+
w = e;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function Dr(e = 1) {
|
|
105
|
+
if (v) {
|
|
106
|
+
for (var t = e, n = w; t--; )
|
|
107
|
+
n = /** @type {TemplateNode} */
|
|
108
|
+
/* @__PURE__ */ se(n);
|
|
109
|
+
w = n;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function rt(e = !0) {
|
|
113
|
+
for (var t = 0, n = w; ; ) {
|
|
114
|
+
if (n.nodeType === De) {
|
|
115
|
+
var r = (
|
|
116
|
+
/** @type {Comment} */
|
|
117
|
+
n.data
|
|
118
|
+
);
|
|
119
|
+
if (r === Dt) {
|
|
120
|
+
if (t === 0) return n;
|
|
121
|
+
t -= 1;
|
|
122
|
+
} else (r === ln || r === lt) && (t += 1);
|
|
123
|
+
}
|
|
124
|
+
var s = (
|
|
125
|
+
/** @type {TemplateNode} */
|
|
126
|
+
/* @__PURE__ */ se(n)
|
|
127
|
+
);
|
|
128
|
+
e && n.remove(), n = s;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function dn(e) {
|
|
132
|
+
if (!e || e.nodeType !== De)
|
|
133
|
+
throw dt(), Re;
|
|
134
|
+
return (
|
|
135
|
+
/** @type {Comment} */
|
|
136
|
+
e.data
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
function _n(e) {
|
|
140
|
+
return e === this.v;
|
|
141
|
+
}
|
|
142
|
+
function Fr(e, t) {
|
|
143
|
+
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
144
|
+
}
|
|
145
|
+
function vn(e) {
|
|
146
|
+
return !Fr(e, this.v);
|
|
147
|
+
}
|
|
148
|
+
let Ge = !1, qr = !1;
|
|
149
|
+
function Ls() {
|
|
150
|
+
Ge = !0;
|
|
151
|
+
}
|
|
152
|
+
let A = null;
|
|
153
|
+
function Pe(e) {
|
|
154
|
+
A = e;
|
|
155
|
+
}
|
|
156
|
+
function Ds(e) {
|
|
157
|
+
return (
|
|
158
|
+
/** @type {T} */
|
|
159
|
+
pn().get(e)
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
function Fs(e, t) {
|
|
163
|
+
return pn().set(e, t), t;
|
|
164
|
+
}
|
|
165
|
+
function jr(e, t = !1, n) {
|
|
166
|
+
A = {
|
|
167
|
+
p: A,
|
|
168
|
+
c: null,
|
|
169
|
+
e: null,
|
|
170
|
+
s: e,
|
|
171
|
+
x: null,
|
|
172
|
+
l: Ge && !t ? { s: null, u: null, $: [] } : null
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function Br(e) {
|
|
176
|
+
var t = (
|
|
177
|
+
/** @type {ComponentContext} */
|
|
178
|
+
A
|
|
179
|
+
), n = t.e;
|
|
180
|
+
if (n !== null) {
|
|
181
|
+
t.e = null;
|
|
182
|
+
for (var r of n)
|
|
183
|
+
Pn(r);
|
|
184
|
+
}
|
|
185
|
+
return e !== void 0 && (t.x = e), A = t.p, e ?? /** @type {T} */
|
|
186
|
+
{};
|
|
187
|
+
}
|
|
188
|
+
function Ke() {
|
|
189
|
+
return !Ge || A !== null && A.l === null;
|
|
190
|
+
}
|
|
191
|
+
function pn(e) {
|
|
192
|
+
return A === null && Er(), A.c ??= new Map(Hr(A) || void 0);
|
|
193
|
+
}
|
|
194
|
+
function Hr(e) {
|
|
195
|
+
let t = e.p;
|
|
196
|
+
for (; t !== null; ) {
|
|
197
|
+
const n = t.c;
|
|
198
|
+
if (n !== null)
|
|
199
|
+
return n;
|
|
200
|
+
t = t.p;
|
|
201
|
+
}
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
let me = [];
|
|
205
|
+
function mn() {
|
|
206
|
+
var e = me;
|
|
207
|
+
me = [], $r(e);
|
|
208
|
+
}
|
|
209
|
+
function de(e) {
|
|
210
|
+
if (me.length === 0 && !Ue) {
|
|
211
|
+
var t = me;
|
|
212
|
+
queueMicrotask(() => {
|
|
213
|
+
t === me && mn();
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
me.push(e);
|
|
217
|
+
}
|
|
218
|
+
function Ur() {
|
|
219
|
+
for (; me.length > 0; )
|
|
220
|
+
mn();
|
|
221
|
+
}
|
|
222
|
+
const Vr = /* @__PURE__ */ new WeakMap();
|
|
223
|
+
function gn(e) {
|
|
224
|
+
var t = m;
|
|
225
|
+
if (t === null)
|
|
226
|
+
return $.f |= $e, e;
|
|
227
|
+
if ((t.f & Bt) === 0) {
|
|
228
|
+
if ((t.f & ot) === 0)
|
|
229
|
+
throw !t.parent && e instanceof Error && $n(e), e;
|
|
230
|
+
t.b.error(e);
|
|
231
|
+
} else
|
|
232
|
+
Me(e, t);
|
|
233
|
+
}
|
|
234
|
+
function Me(e, t) {
|
|
235
|
+
for (; t !== null; ) {
|
|
236
|
+
if ((t.f & ot) !== 0)
|
|
237
|
+
try {
|
|
238
|
+
t.b.error(e);
|
|
239
|
+
return;
|
|
240
|
+
} catch (n) {
|
|
241
|
+
e = n;
|
|
242
|
+
}
|
|
243
|
+
t = t.parent;
|
|
244
|
+
}
|
|
245
|
+
throw e instanceof Error && $n(e), e;
|
|
246
|
+
}
|
|
247
|
+
function $n(e) {
|
|
248
|
+
const t = Vr.get(e);
|
|
249
|
+
t && (Ie(e, "message", {
|
|
250
|
+
value: t.message
|
|
251
|
+
}), Ie(e, "stack", {
|
|
252
|
+
value: t.stack
|
|
253
|
+
}));
|
|
254
|
+
}
|
|
255
|
+
const Ze = /* @__PURE__ */ new Set();
|
|
256
|
+
let y = null, He = null, z = null, xt = /* @__PURE__ */ new Set(), ee = [], vt = null, Nt = !1, Ue = !1;
|
|
257
|
+
class te {
|
|
258
|
+
committed = !1;
|
|
259
|
+
/**
|
|
260
|
+
* The current values of any sources that are updated in this batch
|
|
261
|
+
* They keys of this map are identical to `this.#previous`
|
|
262
|
+
* @type {Map<Source, any>}
|
|
263
|
+
*/
|
|
264
|
+
current = /* @__PURE__ */ new Map();
|
|
265
|
+
/**
|
|
266
|
+
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
267
|
+
* They keys of this map are identical to `this.#current`
|
|
268
|
+
* @type {Map<Source, any>}
|
|
269
|
+
*/
|
|
270
|
+
#t = /* @__PURE__ */ new Map();
|
|
271
|
+
/**
|
|
272
|
+
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
273
|
+
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
274
|
+
* @type {Set<() => void>}
|
|
275
|
+
*/
|
|
276
|
+
#e = /* @__PURE__ */ new Set();
|
|
277
|
+
/**
|
|
278
|
+
* The number of async effects that are currently in flight
|
|
279
|
+
*/
|
|
280
|
+
#n = 0;
|
|
281
|
+
/**
|
|
282
|
+
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
283
|
+
*/
|
|
284
|
+
#r = 0;
|
|
285
|
+
/**
|
|
286
|
+
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
287
|
+
* TODO replace with Promise.withResolvers once supported widely enough
|
|
288
|
+
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
289
|
+
*/
|
|
290
|
+
#l = null;
|
|
291
|
+
/**
|
|
292
|
+
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
293
|
+
* @type {Effect[]}
|
|
294
|
+
*/
|
|
295
|
+
#f = [];
|
|
296
|
+
/**
|
|
297
|
+
* Deferred effects that are MAYBE_DIRTY
|
|
298
|
+
* @type {Effect[]}
|
|
299
|
+
*/
|
|
300
|
+
#a = [];
|
|
301
|
+
/**
|
|
302
|
+
* A set of branches that still exist, but will be destroyed when this batch
|
|
303
|
+
* is committed — we skip over these during `process`
|
|
304
|
+
* @type {Set<Effect>}
|
|
305
|
+
*/
|
|
306
|
+
skipped_effects = /* @__PURE__ */ new Set();
|
|
307
|
+
/**
|
|
308
|
+
*
|
|
309
|
+
* @param {Effect[]} root_effects
|
|
310
|
+
*/
|
|
311
|
+
process(t) {
|
|
312
|
+
ee = [], He = null, this.apply();
|
|
313
|
+
var n = {
|
|
314
|
+
parent: null,
|
|
315
|
+
effect: null,
|
|
316
|
+
effects: [],
|
|
317
|
+
render_effects: [],
|
|
318
|
+
block_effects: []
|
|
319
|
+
};
|
|
320
|
+
for (const r of t)
|
|
321
|
+
this.#s(r, n);
|
|
322
|
+
this.#u(), this.#r > 0 ? (this.#i(n.effects), this.#i(n.render_effects), this.#i(n.block_effects)) : (He = this, y = null, Xt(n.render_effects), Xt(n.effects), He = null), z = null;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Traverse the effect tree, executing effects or stashing
|
|
326
|
+
* them for later execution as appropriate
|
|
327
|
+
* @param {Effect} root
|
|
328
|
+
* @param {EffectTarget} target
|
|
329
|
+
*/
|
|
330
|
+
#s(t, n) {
|
|
331
|
+
t.f ^= P;
|
|
332
|
+
for (var r = t.first; r !== null; ) {
|
|
333
|
+
var s = r.f, i = (s & (ue | _e)) !== 0, a = i && (s & P) !== 0, f = a || (s & H) !== 0 || this.skipped_effects.has(r);
|
|
334
|
+
if ((r.f & ot) !== 0 && r.b?.is_pending() && (n = {
|
|
335
|
+
parent: n,
|
|
336
|
+
effect: r,
|
|
337
|
+
effects: [],
|
|
338
|
+
render_effects: [],
|
|
339
|
+
block_effects: []
|
|
340
|
+
}), !f && r.fn !== null) {
|
|
341
|
+
i ? r.f ^= P : (s & qt) !== 0 ? n.effects.push(r) : $t(r) && ((r.f & Ee) !== 0 && n.block_effects.push(r), it(r));
|
|
342
|
+
var l = r.first;
|
|
343
|
+
if (l !== null) {
|
|
344
|
+
r = l;
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
var u = r.parent;
|
|
349
|
+
for (r = r.next; r === null && u !== null; )
|
|
350
|
+
u === n.effect && (this.#i(n.effects), this.#i(n.render_effects), this.#i(n.block_effects), n = /** @type {EffectTarget} */
|
|
351
|
+
n.parent), r = u.next, u = u.parent;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* @param {Effect[]} effects
|
|
356
|
+
*/
|
|
357
|
+
#i(t) {
|
|
358
|
+
for (const n of t)
|
|
359
|
+
((n.f & U) !== 0 ? this.#f : this.#a).push(n), D(n, P);
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Associate a change to a given source with the current
|
|
363
|
+
* batch, noting its previous and current values
|
|
364
|
+
* @param {Source} source
|
|
365
|
+
* @param {any} value
|
|
366
|
+
*/
|
|
367
|
+
capture(t, n) {
|
|
368
|
+
this.#t.has(t) || this.#t.set(t, n), this.current.set(t, t.v), z?.set(t, t.v);
|
|
369
|
+
}
|
|
370
|
+
activate() {
|
|
371
|
+
y = this;
|
|
372
|
+
}
|
|
373
|
+
deactivate() {
|
|
374
|
+
y = null, z = null;
|
|
375
|
+
}
|
|
376
|
+
flush() {
|
|
377
|
+
if (ee.length > 0) {
|
|
378
|
+
if (this.activate(), bn(), y !== null && y !== this)
|
|
379
|
+
return;
|
|
380
|
+
} else
|
|
381
|
+
this.#u();
|
|
382
|
+
this.deactivate();
|
|
383
|
+
for (const t of xt)
|
|
384
|
+
if (xt.delete(t), t(), y !== null)
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
#u() {
|
|
388
|
+
if (this.#r === 0) {
|
|
389
|
+
for (const t of this.#e) t();
|
|
390
|
+
this.#e.clear();
|
|
391
|
+
}
|
|
392
|
+
this.#n === 0 && this.#o();
|
|
393
|
+
}
|
|
394
|
+
#o() {
|
|
395
|
+
if (Ze.size > 1) {
|
|
396
|
+
this.#t.clear();
|
|
397
|
+
var t = z, n = !0, r = {
|
|
398
|
+
parent: null,
|
|
399
|
+
effect: null,
|
|
400
|
+
effects: [],
|
|
401
|
+
render_effects: [],
|
|
402
|
+
block_effects: []
|
|
403
|
+
};
|
|
404
|
+
for (const s of Ze) {
|
|
405
|
+
if (s === this) {
|
|
406
|
+
n = !1;
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
const i = [];
|
|
410
|
+
for (const [f, l] of this.current) {
|
|
411
|
+
if (s.current.has(f))
|
|
412
|
+
if (n && l !== s.current.get(f))
|
|
413
|
+
s.current.set(f, l);
|
|
414
|
+
else
|
|
415
|
+
continue;
|
|
416
|
+
i.push(f);
|
|
417
|
+
}
|
|
418
|
+
if (i.length === 0)
|
|
419
|
+
continue;
|
|
420
|
+
const a = [...s.current.keys()].filter((f) => !this.current.has(f));
|
|
421
|
+
if (a.length > 0) {
|
|
422
|
+
for (const f of i)
|
|
423
|
+
yn(f, a);
|
|
424
|
+
if (ee.length > 0) {
|
|
425
|
+
y = s, s.apply();
|
|
426
|
+
for (const f of ee)
|
|
427
|
+
s.#s(f, r);
|
|
428
|
+
ee = [], s.deactivate();
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
y = null, z = t;
|
|
433
|
+
}
|
|
434
|
+
this.committed = !0, Ze.delete(this), this.#l?.resolve();
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
*
|
|
438
|
+
* @param {boolean} blocking
|
|
439
|
+
*/
|
|
440
|
+
increment(t) {
|
|
441
|
+
this.#n += 1, t && (this.#r += 1);
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
*
|
|
445
|
+
* @param {boolean} blocking
|
|
446
|
+
*/
|
|
447
|
+
decrement(t) {
|
|
448
|
+
this.#n -= 1, t && (this.#r -= 1);
|
|
449
|
+
for (const n of this.#f)
|
|
450
|
+
D(n, U), be(n);
|
|
451
|
+
for (const n of this.#a)
|
|
452
|
+
D(n, ve), be(n);
|
|
453
|
+
this.#f = [], this.#a = [], this.flush();
|
|
454
|
+
}
|
|
455
|
+
/** @param {() => void} fn */
|
|
456
|
+
add_callback(t) {
|
|
457
|
+
this.#e.add(t);
|
|
458
|
+
}
|
|
459
|
+
settled() {
|
|
460
|
+
return (this.#l ??= cn()).promise;
|
|
461
|
+
}
|
|
462
|
+
static ensure() {
|
|
463
|
+
if (y === null) {
|
|
464
|
+
const t = y = new te();
|
|
465
|
+
Ze.add(y), Ue || te.enqueue(() => {
|
|
466
|
+
y === t && t.flush();
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
return y;
|
|
470
|
+
}
|
|
471
|
+
/** @param {() => void} task */
|
|
472
|
+
static enqueue(t) {
|
|
473
|
+
de(t);
|
|
474
|
+
}
|
|
475
|
+
apply() {
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
function wn(e) {
|
|
479
|
+
var t = Ue;
|
|
480
|
+
Ue = !0;
|
|
481
|
+
try {
|
|
482
|
+
for (var n; ; ) {
|
|
483
|
+
if (Ur(), ee.length === 0 && (y?.flush(), ee.length === 0))
|
|
484
|
+
return vt = null, /** @type {T} */
|
|
485
|
+
n;
|
|
486
|
+
bn();
|
|
487
|
+
}
|
|
488
|
+
} finally {
|
|
489
|
+
Ue = t;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
function bn() {
|
|
493
|
+
var e = Oe;
|
|
494
|
+
Nt = !0;
|
|
495
|
+
try {
|
|
496
|
+
var t = 0;
|
|
497
|
+
for (tn(!0); ee.length > 0; ) {
|
|
498
|
+
var n = te.ensure();
|
|
499
|
+
if (t++ > 1e3) {
|
|
500
|
+
var r, s;
|
|
501
|
+
Yr();
|
|
502
|
+
}
|
|
503
|
+
n.process(ee), he.clear();
|
|
504
|
+
}
|
|
505
|
+
} finally {
|
|
506
|
+
Nt = !1, tn(e), vt = null;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
function Yr() {
|
|
510
|
+
try {
|
|
511
|
+
xr();
|
|
512
|
+
} catch (e) {
|
|
513
|
+
Me(e, vt);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
let ae = null;
|
|
517
|
+
function Xt(e) {
|
|
518
|
+
var t = e.length;
|
|
519
|
+
if (t !== 0) {
|
|
520
|
+
for (var n = 0; n < t; ) {
|
|
521
|
+
var r = e[n++];
|
|
522
|
+
if ((r.f & (fe | H)) === 0 && $t(r) && (ae = /* @__PURE__ */ new Set(), it(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null && r.ac === null ? Fn(r) : r.fn = null), ae?.size > 0)) {
|
|
523
|
+
he.clear();
|
|
524
|
+
for (const s of ae) {
|
|
525
|
+
if ((s.f & (fe | H)) !== 0) continue;
|
|
526
|
+
const i = [s];
|
|
527
|
+
let a = s.parent;
|
|
528
|
+
for (; a !== null; )
|
|
529
|
+
ae.has(a) && (ae.delete(a), i.push(a)), a = a.parent;
|
|
530
|
+
for (let f = i.length - 1; f >= 0; f--) {
|
|
531
|
+
const l = i[f];
|
|
532
|
+
(l.f & (fe | H)) === 0 && it(l);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
ae.clear();
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
ae = null;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
function yn(e, t) {
|
|
542
|
+
if (e.reactions !== null)
|
|
543
|
+
for (const n of e.reactions) {
|
|
544
|
+
const r = n.f;
|
|
545
|
+
(r & F) !== 0 ? yn(
|
|
546
|
+
/** @type {Derived} */
|
|
547
|
+
n,
|
|
548
|
+
t
|
|
549
|
+
) : (r & (Ht | Ee)) !== 0 && En(n, t) && (D(n, U), be(
|
|
550
|
+
/** @type {Effect} */
|
|
551
|
+
n
|
|
552
|
+
));
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
function En(e, t) {
|
|
556
|
+
if (e.deps !== null) {
|
|
557
|
+
for (const n of e.deps)
|
|
558
|
+
if (t.includes(n) || (n.f & F) !== 0 && En(
|
|
559
|
+
/** @type {Derived} */
|
|
560
|
+
n,
|
|
561
|
+
t
|
|
562
|
+
))
|
|
563
|
+
return !0;
|
|
564
|
+
}
|
|
565
|
+
return !1;
|
|
566
|
+
}
|
|
567
|
+
function be(e) {
|
|
568
|
+
for (var t = vt = e; t.parent !== null; ) {
|
|
569
|
+
t = t.parent;
|
|
570
|
+
var n = t.f;
|
|
571
|
+
if (Nt && t === m && (n & Ee) !== 0)
|
|
572
|
+
return;
|
|
573
|
+
if ((n & (_e | ue)) !== 0) {
|
|
574
|
+
if ((n & P) === 0) return;
|
|
575
|
+
t.f ^= P;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
ee.push(t);
|
|
579
|
+
}
|
|
580
|
+
function Wr(e) {
|
|
581
|
+
let t = 0, n = ye(0), r;
|
|
582
|
+
return () => {
|
|
583
|
+
ns() && (M(n), Fe(() => (t === 0 && (r = wt(() => e(() => Ve(n)))), t += 1, () => {
|
|
584
|
+
de(() => {
|
|
585
|
+
t -= 1, t === 0 && (r?.(), r = void 0, Ve(n));
|
|
586
|
+
});
|
|
587
|
+
})));
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
var Gr = ct | Se | ot;
|
|
591
|
+
function Kr(e, t, n) {
|
|
592
|
+
new zr(e, t, n);
|
|
593
|
+
}
|
|
594
|
+
class zr {
|
|
595
|
+
/** @type {Boundary | null} */
|
|
596
|
+
parent;
|
|
597
|
+
#t = !1;
|
|
598
|
+
/** @type {TemplateNode} */
|
|
599
|
+
#e;
|
|
600
|
+
/** @type {TemplateNode | null} */
|
|
601
|
+
#n = v ? w : null;
|
|
602
|
+
/** @type {BoundaryProps} */
|
|
603
|
+
#r;
|
|
604
|
+
/** @type {((anchor: Node) => void)} */
|
|
605
|
+
#l;
|
|
606
|
+
/** @type {Effect} */
|
|
607
|
+
#f;
|
|
608
|
+
/** @type {Effect | null} */
|
|
609
|
+
#a = null;
|
|
610
|
+
/** @type {Effect | null} */
|
|
611
|
+
#s = null;
|
|
612
|
+
/** @type {Effect | null} */
|
|
613
|
+
#i = null;
|
|
614
|
+
/** @type {DocumentFragment | null} */
|
|
615
|
+
#u = null;
|
|
616
|
+
#o = 0;
|
|
617
|
+
#c = 0;
|
|
618
|
+
#d = !1;
|
|
619
|
+
/**
|
|
620
|
+
* A source containing the number of pending async deriveds/expressions.
|
|
621
|
+
* Only created if `$effect.pending()` is used inside the boundary,
|
|
622
|
+
* otherwise updating the source results in needless `Batch.ensure()`
|
|
623
|
+
* calls followed by no-op flushes
|
|
624
|
+
* @type {Source<number> | null}
|
|
625
|
+
*/
|
|
626
|
+
#h = null;
|
|
627
|
+
#m = () => {
|
|
628
|
+
this.#h && Le(this.#h, this.#o);
|
|
629
|
+
};
|
|
630
|
+
#g = Wr(() => (this.#h = ye(this.#o), () => {
|
|
631
|
+
this.#h = null;
|
|
632
|
+
}));
|
|
633
|
+
/**
|
|
634
|
+
* @param {TemplateNode} node
|
|
635
|
+
* @param {BoundaryProps} props
|
|
636
|
+
* @param {((anchor: Node) => void)} children
|
|
637
|
+
*/
|
|
638
|
+
constructor(t, n, r) {
|
|
639
|
+
this.#e = t, this.#r = n, this.#l = r, this.parent = /** @type {Effect} */
|
|
640
|
+
m.b, this.#t = !!this.#r.pending, this.#f = Wt(() => {
|
|
641
|
+
if (m.b = this, v) {
|
|
642
|
+
const s = this.#n;
|
|
643
|
+
_t(), /** @type {Comment} */
|
|
644
|
+
s.nodeType === De && /** @type {Comment} */
|
|
645
|
+
s.data === lt ? this.#w() : this.#$();
|
|
646
|
+
} else {
|
|
647
|
+
try {
|
|
648
|
+
this.#a = Y(() => r(this.#e));
|
|
649
|
+
} catch (s) {
|
|
650
|
+
this.error(s);
|
|
651
|
+
}
|
|
652
|
+
this.#c > 0 ? this.#v() : this.#t = !1;
|
|
653
|
+
}
|
|
654
|
+
}, Gr), v && (this.#e = w);
|
|
655
|
+
}
|
|
656
|
+
#$() {
|
|
657
|
+
try {
|
|
658
|
+
this.#a = Y(() => this.#l(this.#e));
|
|
659
|
+
} catch (t) {
|
|
660
|
+
this.error(t);
|
|
661
|
+
}
|
|
662
|
+
this.#t = !1;
|
|
663
|
+
}
|
|
664
|
+
#w() {
|
|
665
|
+
const t = this.#r.pending;
|
|
666
|
+
t && (this.#s = Y(() => t(this.#e)), te.enqueue(() => {
|
|
667
|
+
this.#a = this.#_(() => (te.ensure(), Y(() => this.#l(this.#e)))), this.#c > 0 ? this.#v() : (Ce(
|
|
668
|
+
/** @type {Effect} */
|
|
669
|
+
this.#s,
|
|
670
|
+
() => {
|
|
671
|
+
this.#s = null;
|
|
672
|
+
}
|
|
673
|
+
), this.#t = !1);
|
|
674
|
+
}));
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Returns `true` if the effect exists inside a boundary whose pending snippet is shown
|
|
678
|
+
* @returns {boolean}
|
|
679
|
+
*/
|
|
680
|
+
is_pending() {
|
|
681
|
+
return this.#t || !!this.parent && this.parent.is_pending();
|
|
682
|
+
}
|
|
683
|
+
has_pending_snippet() {
|
|
684
|
+
return !!this.#r.pending;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* @param {() => Effect | null} fn
|
|
688
|
+
*/
|
|
689
|
+
#_(t) {
|
|
690
|
+
var n = m, r = $, s = A;
|
|
691
|
+
K(this.#f), C(this.#f), Pe(this.#f.ctx);
|
|
692
|
+
try {
|
|
693
|
+
return t();
|
|
694
|
+
} catch (i) {
|
|
695
|
+
return gn(i), null;
|
|
696
|
+
} finally {
|
|
697
|
+
K(n), C(r), Pe(s);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
#v() {
|
|
701
|
+
const t = (
|
|
702
|
+
/** @type {(anchor: Node) => void} */
|
|
703
|
+
this.#r.pending
|
|
704
|
+
);
|
|
705
|
+
this.#a !== null && (this.#u = document.createDocumentFragment(), Bn(this.#a, this.#u)), this.#s === null && (this.#s = Y(() => t(this.#e)));
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Updates the pending count associated with the currently visible pending snippet,
|
|
709
|
+
* if any, such that we can replace the snippet with content once work is done
|
|
710
|
+
* @param {1 | -1} d
|
|
711
|
+
*/
|
|
712
|
+
#p(t) {
|
|
713
|
+
if (!this.has_pending_snippet()) {
|
|
714
|
+
this.parent && this.parent.#p(t);
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
this.#c += t, this.#c === 0 && (this.#t = !1, this.#s && Ce(this.#s, () => {
|
|
718
|
+
this.#s = null;
|
|
719
|
+
}), this.#u && (this.#e.before(this.#u), this.#u = null));
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
723
|
+
* and controls when the current `pending` snippet (if any) is removed.
|
|
724
|
+
* Do not call from inside the class
|
|
725
|
+
* @param {1 | -1} d
|
|
726
|
+
*/
|
|
727
|
+
update_pending_count(t) {
|
|
728
|
+
this.#p(t), this.#o += t, xt.add(this.#m);
|
|
729
|
+
}
|
|
730
|
+
get_effect_pending() {
|
|
731
|
+
return this.#g(), M(
|
|
732
|
+
/** @type {Source<number>} */
|
|
733
|
+
this.#h
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
/** @param {unknown} error */
|
|
737
|
+
error(t) {
|
|
738
|
+
var n = this.#r.onerror;
|
|
739
|
+
let r = this.#r.failed;
|
|
740
|
+
if (this.#d || !n && !r)
|
|
741
|
+
throw t;
|
|
742
|
+
this.#a && (L(this.#a), this.#a = null), this.#s && (L(this.#s), this.#s = null), this.#i && (L(this.#i), this.#i = null), v && (O(
|
|
743
|
+
/** @type {TemplateNode} */
|
|
744
|
+
this.#n
|
|
745
|
+
), Dr(), O(rt()));
|
|
746
|
+
var s = !1, i = !1;
|
|
747
|
+
const a = () => {
|
|
748
|
+
if (s) {
|
|
749
|
+
Lr();
|
|
750
|
+
return;
|
|
751
|
+
}
|
|
752
|
+
s = !0, i && Pr(), te.ensure(), this.#o = 0, this.#i !== null && Ce(this.#i, () => {
|
|
753
|
+
this.#i = null;
|
|
754
|
+
}), this.#t = this.has_pending_snippet(), this.#a = this.#_(() => (this.#d = !1, Y(() => this.#l(this.#e)))), this.#c > 0 ? this.#v() : this.#t = !1;
|
|
755
|
+
};
|
|
756
|
+
var f = $;
|
|
757
|
+
try {
|
|
758
|
+
C(null), i = !0, n?.(t, a), i = !1;
|
|
759
|
+
} catch (l) {
|
|
760
|
+
Me(l, this.#f && this.#f.parent);
|
|
761
|
+
} finally {
|
|
762
|
+
C(f);
|
|
763
|
+
}
|
|
764
|
+
r && de(() => {
|
|
765
|
+
this.#i = this.#_(() => {
|
|
766
|
+
this.#d = !0;
|
|
767
|
+
try {
|
|
768
|
+
return Y(() => {
|
|
769
|
+
r(
|
|
770
|
+
this.#e,
|
|
771
|
+
() => t,
|
|
772
|
+
() => a
|
|
773
|
+
);
|
|
774
|
+
});
|
|
775
|
+
} catch (l) {
|
|
776
|
+
return Me(
|
|
777
|
+
l,
|
|
778
|
+
/** @type {Effect} */
|
|
779
|
+
this.#f.parent
|
|
780
|
+
), null;
|
|
781
|
+
} finally {
|
|
782
|
+
this.#d = !1;
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
function Jr(e, t, n) {
|
|
789
|
+
const r = Ke() ? pt : Ut;
|
|
790
|
+
if (t.length === 0) {
|
|
791
|
+
n(e.map(r));
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
794
|
+
var s = y, i = (
|
|
795
|
+
/** @type {Effect} */
|
|
796
|
+
m
|
|
797
|
+
), a = Xr(), f = v;
|
|
798
|
+
Promise.all(t.map((l) => /* @__PURE__ */ Zr(l))).then((l) => {
|
|
799
|
+
a();
|
|
800
|
+
try {
|
|
801
|
+
n([...e.map(r), ...l]);
|
|
802
|
+
} catch (u) {
|
|
803
|
+
(i.f & fe) === 0 && Me(u, i);
|
|
804
|
+
}
|
|
805
|
+
f && B(!1), s?.deactivate(), Ct();
|
|
806
|
+
}).catch((l) => {
|
|
807
|
+
Me(l, i);
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
function Xr() {
|
|
811
|
+
var e = m, t = $, n = A, r = y, s = v;
|
|
812
|
+
if (s)
|
|
813
|
+
var i = w;
|
|
814
|
+
return function() {
|
|
815
|
+
K(e), C(t), Pe(n), r?.activate(), s && (B(!0), O(i));
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
function Ct() {
|
|
819
|
+
K(null), C(null), Pe(null);
|
|
820
|
+
}
|
|
821
|
+
// @__NO_SIDE_EFFECTS__
|
|
822
|
+
function pt(e) {
|
|
823
|
+
var t = F | U, n = $ !== null && ($.f & F) !== 0 ? (
|
|
824
|
+
/** @type {Derived} */
|
|
825
|
+
$
|
|
826
|
+
) : null;
|
|
827
|
+
return m === null || n !== null && (n.f & W) !== 0 ? t |= W : m.f |= Se, {
|
|
828
|
+
ctx: A,
|
|
829
|
+
deps: null,
|
|
830
|
+
effects: null,
|
|
831
|
+
equals: _n,
|
|
832
|
+
f: t,
|
|
833
|
+
fn: e,
|
|
834
|
+
reactions: null,
|
|
835
|
+
rv: 0,
|
|
836
|
+
v: (
|
|
837
|
+
/** @type {V} */
|
|
838
|
+
N
|
|
839
|
+
),
|
|
840
|
+
wv: 0,
|
|
841
|
+
parent: n ?? m,
|
|
842
|
+
ac: null
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
// @__NO_SIDE_EFFECTS__
|
|
846
|
+
function Zr(e, t) {
|
|
847
|
+
let n = (
|
|
848
|
+
/** @type {Effect | null} */
|
|
849
|
+
m
|
|
850
|
+
);
|
|
851
|
+
n === null && Sr();
|
|
852
|
+
var r = (
|
|
853
|
+
/** @type {Boundary} */
|
|
854
|
+
n.b
|
|
855
|
+
), s = (
|
|
856
|
+
/** @type {Promise<V>} */
|
|
857
|
+
/** @type {unknown} */
|
|
858
|
+
void 0
|
|
859
|
+
), i = ye(
|
|
860
|
+
/** @type {V} */
|
|
861
|
+
N
|
|
862
|
+
), a = !$, f = /* @__PURE__ */ new Map();
|
|
863
|
+
return is(() => {
|
|
864
|
+
var l = cn();
|
|
865
|
+
s = l.promise;
|
|
866
|
+
try {
|
|
867
|
+
Promise.resolve(e()).then(l.resolve, l.reject).then(() => {
|
|
868
|
+
u === y && u.committed && u.deactivate(), Ct();
|
|
869
|
+
});
|
|
870
|
+
} catch (h) {
|
|
871
|
+
l.reject(h), Ct();
|
|
872
|
+
}
|
|
873
|
+
var u = (
|
|
874
|
+
/** @type {Batch} */
|
|
875
|
+
y
|
|
876
|
+
);
|
|
877
|
+
if (a) {
|
|
878
|
+
var c = !r.is_pending();
|
|
879
|
+
r.update_pending_count(1), u.increment(c), f.get(u)?.reject(Ae), f.delete(u), f.set(u, l);
|
|
880
|
+
}
|
|
881
|
+
const _ = (h, d = void 0) => {
|
|
882
|
+
if (u.activate(), d)
|
|
883
|
+
d !== Ae && (i.f |= $e, Le(i, d));
|
|
884
|
+
else {
|
|
885
|
+
(i.f & $e) !== 0 && (i.f ^= $e), Le(i, h);
|
|
886
|
+
for (const [o, g] of f) {
|
|
887
|
+
if (f.delete(o), o === u) break;
|
|
888
|
+
g.reject(Ae);
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
a && (r.update_pending_count(-1), u.decrement(c));
|
|
892
|
+
};
|
|
893
|
+
l.promise.then(_, (h) => _(null, h || "unknown"));
|
|
894
|
+
}), gt(() => {
|
|
895
|
+
for (const l of f.values())
|
|
896
|
+
l.reject(Ae);
|
|
897
|
+
}), new Promise((l) => {
|
|
898
|
+
function u(c) {
|
|
899
|
+
function _() {
|
|
900
|
+
c === s ? l(i) : u(s);
|
|
901
|
+
}
|
|
902
|
+
c.then(_, _);
|
|
903
|
+
}
|
|
904
|
+
u(s);
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
// @__NO_SIDE_EFFECTS__
|
|
908
|
+
function qs(e) {
|
|
909
|
+
const t = /* @__PURE__ */ pt(e);
|
|
910
|
+
return Hn(t), t;
|
|
911
|
+
}
|
|
912
|
+
// @__NO_SIDE_EFFECTS__
|
|
913
|
+
function Ut(e) {
|
|
914
|
+
const t = /* @__PURE__ */ pt(e);
|
|
915
|
+
return t.equals = vn, t;
|
|
916
|
+
}
|
|
917
|
+
function Sn(e) {
|
|
918
|
+
var t = e.effects;
|
|
919
|
+
if (t !== null) {
|
|
920
|
+
e.effects = null;
|
|
921
|
+
for (var n = 0; n < t.length; n += 1)
|
|
922
|
+
L(
|
|
923
|
+
/** @type {Effect} */
|
|
924
|
+
t[n]
|
|
925
|
+
);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
function Qr(e) {
|
|
929
|
+
for (var t = e.parent; t !== null; ) {
|
|
930
|
+
if ((t.f & F) === 0)
|
|
931
|
+
return (
|
|
932
|
+
/** @type {Effect} */
|
|
933
|
+
t
|
|
934
|
+
);
|
|
935
|
+
t = t.parent;
|
|
936
|
+
}
|
|
937
|
+
return null;
|
|
938
|
+
}
|
|
939
|
+
function Vt(e) {
|
|
940
|
+
var t, n = m;
|
|
941
|
+
K(Qr(e));
|
|
942
|
+
try {
|
|
943
|
+
Sn(e), t = Wn(e);
|
|
944
|
+
} finally {
|
|
945
|
+
K(n);
|
|
946
|
+
}
|
|
947
|
+
return t;
|
|
948
|
+
}
|
|
949
|
+
function kn(e) {
|
|
950
|
+
var t = Vt(e);
|
|
951
|
+
if (e.equals(t) || (e.v = t, e.wv = Vn()), !ke)
|
|
952
|
+
if (z !== null)
|
|
953
|
+
z.set(e, e.v);
|
|
954
|
+
else {
|
|
955
|
+
var n = (ce || (e.f & W) !== 0) && e.deps !== null ? ve : P;
|
|
956
|
+
D(e, n);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
const he = /* @__PURE__ */ new Map();
|
|
960
|
+
function ye(e, t) {
|
|
961
|
+
var n = {
|
|
962
|
+
f: 0,
|
|
963
|
+
// TODO ideally we could skip this altogether, but it causes type errors
|
|
964
|
+
v: e,
|
|
965
|
+
reactions: null,
|
|
966
|
+
equals: _n,
|
|
967
|
+
rv: 0,
|
|
968
|
+
wv: 0
|
|
969
|
+
};
|
|
970
|
+
return n;
|
|
971
|
+
}
|
|
972
|
+
// @__NO_SIDE_EFFECTS__
|
|
973
|
+
function oe(e, t) {
|
|
974
|
+
const n = ye(e);
|
|
975
|
+
return Hn(n), n;
|
|
976
|
+
}
|
|
977
|
+
// @__NO_SIDE_EFFECTS__
|
|
978
|
+
function Tn(e, t = !1, n = !0) {
|
|
979
|
+
const r = ye(e);
|
|
980
|
+
return t || (r.equals = vn), Ge && n && A !== null && A.l !== null && (A.l.s ??= []).push(r), r;
|
|
981
|
+
}
|
|
982
|
+
function Q(e, t, n = !1) {
|
|
983
|
+
$ !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
984
|
+
// to ensure we error if state is set inside an inspect effect
|
|
985
|
+
(!J || ($.f & Jt) !== 0) && Ke() && ($.f & (F | Ee | Ht | Jt)) !== 0 && !le?.includes(e) && Ir();
|
|
986
|
+
let r = n ? xe(t) : t;
|
|
987
|
+
return Le(e, r);
|
|
988
|
+
}
|
|
989
|
+
function Le(e, t) {
|
|
990
|
+
if (!e.equals(t)) {
|
|
991
|
+
var n = e.v;
|
|
992
|
+
ke ? he.set(e, t) : he.set(e, n), e.v = t;
|
|
993
|
+
var r = te.ensure();
|
|
994
|
+
r.capture(e, n), (e.f & F) !== 0 && ((e.f & U) !== 0 && Vt(
|
|
995
|
+
/** @type {Derived} */
|
|
996
|
+
e
|
|
997
|
+
), D(e, (e.f & W) === 0 ? P : ve)), e.wv = Vn(), An(e, U), Ke() && m !== null && (m.f & P) !== 0 && (m.f & (ue | _e)) === 0 && (V === null ? ls([e]) : V.push(e));
|
|
998
|
+
}
|
|
999
|
+
return t;
|
|
1000
|
+
}
|
|
1001
|
+
function js(e, t = 1) {
|
|
1002
|
+
var n = M(e), r = t === 1 ? n++ : n--;
|
|
1003
|
+
return Q(e, n), r;
|
|
1004
|
+
}
|
|
1005
|
+
function Ve(e) {
|
|
1006
|
+
Q(e, e.v + 1);
|
|
1007
|
+
}
|
|
1008
|
+
function An(e, t) {
|
|
1009
|
+
var n = e.reactions;
|
|
1010
|
+
if (n !== null)
|
|
1011
|
+
for (var r = Ke(), s = n.length, i = 0; i < s; i++) {
|
|
1012
|
+
var a = n[i], f = a.f;
|
|
1013
|
+
if (!(!r && a === m)) {
|
|
1014
|
+
var l = (f & U) === 0;
|
|
1015
|
+
l && D(a, t), (f & F) !== 0 ? An(
|
|
1016
|
+
/** @type {Derived} */
|
|
1017
|
+
a,
|
|
1018
|
+
ve
|
|
1019
|
+
) : l && ((f & Ee) !== 0 && ae !== null && ae.add(
|
|
1020
|
+
/** @type {Effect} */
|
|
1021
|
+
a
|
|
1022
|
+
), be(
|
|
1023
|
+
/** @type {Effect} */
|
|
1024
|
+
a
|
|
1025
|
+
));
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
function xe(e) {
|
|
1030
|
+
if (typeof e != "object" || e === null || Ne in e)
|
|
1031
|
+
return e;
|
|
1032
|
+
const t = on(e);
|
|
1033
|
+
if (t !== mr && t !== gr)
|
|
1034
|
+
return e;
|
|
1035
|
+
var n = /* @__PURE__ */ new Map(), r = ut(e), s = /* @__PURE__ */ oe(0), i = we, a = (f) => {
|
|
1036
|
+
if (we === i)
|
|
1037
|
+
return f();
|
|
1038
|
+
var l = $, u = we;
|
|
1039
|
+
C(null), rn(i);
|
|
1040
|
+
var c = f();
|
|
1041
|
+
return C(l), rn(u), c;
|
|
1042
|
+
};
|
|
1043
|
+
return r && n.set("length", /* @__PURE__ */ oe(
|
|
1044
|
+
/** @type {any[]} */
|
|
1045
|
+
e.length
|
|
1046
|
+
)), new Proxy(
|
|
1047
|
+
/** @type {any} */
|
|
1048
|
+
e,
|
|
1049
|
+
{
|
|
1050
|
+
defineProperty(f, l, u) {
|
|
1051
|
+
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && Or();
|
|
1052
|
+
var c = n.get(l);
|
|
1053
|
+
return c === void 0 ? c = a(() => {
|
|
1054
|
+
var _ = /* @__PURE__ */ oe(u.value);
|
|
1055
|
+
return n.set(l, _), _;
|
|
1056
|
+
}) : Q(c, u.value, !0), !0;
|
|
1057
|
+
},
|
|
1058
|
+
deleteProperty(f, l) {
|
|
1059
|
+
var u = n.get(l);
|
|
1060
|
+
if (u === void 0) {
|
|
1061
|
+
if (l in f) {
|
|
1062
|
+
const c = a(() => /* @__PURE__ */ oe(N));
|
|
1063
|
+
n.set(l, c), Ve(s);
|
|
1064
|
+
}
|
|
1065
|
+
} else
|
|
1066
|
+
Q(u, N), Ve(s);
|
|
1067
|
+
return !0;
|
|
1068
|
+
},
|
|
1069
|
+
get(f, l, u) {
|
|
1070
|
+
if (l === Ne)
|
|
1071
|
+
return e;
|
|
1072
|
+
var c = n.get(l), _ = l in f;
|
|
1073
|
+
if (c === void 0 && (!_ || ge(f, l)?.writable) && (c = a(() => {
|
|
1074
|
+
var d = xe(_ ? f[l] : N), o = /* @__PURE__ */ oe(d);
|
|
1075
|
+
return o;
|
|
1076
|
+
}), n.set(l, c)), c !== void 0) {
|
|
1077
|
+
var h = M(c);
|
|
1078
|
+
return h === N ? void 0 : h;
|
|
1079
|
+
}
|
|
1080
|
+
return Reflect.get(f, l, u);
|
|
1081
|
+
},
|
|
1082
|
+
getOwnPropertyDescriptor(f, l) {
|
|
1083
|
+
var u = Reflect.getOwnPropertyDescriptor(f, l);
|
|
1084
|
+
if (u && "value" in u) {
|
|
1085
|
+
var c = n.get(l);
|
|
1086
|
+
c && (u.value = M(c));
|
|
1087
|
+
} else if (u === void 0) {
|
|
1088
|
+
var _ = n.get(l), h = _?.v;
|
|
1089
|
+
if (_ !== void 0 && h !== N)
|
|
1090
|
+
return {
|
|
1091
|
+
enumerable: !0,
|
|
1092
|
+
configurable: !0,
|
|
1093
|
+
value: h,
|
|
1094
|
+
writable: !0
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
return u;
|
|
1098
|
+
},
|
|
1099
|
+
has(f, l) {
|
|
1100
|
+
if (l === Ne)
|
|
1101
|
+
return !0;
|
|
1102
|
+
var u = n.get(l), c = u !== void 0 && u.v !== N || Reflect.has(f, l);
|
|
1103
|
+
if (u !== void 0 || m !== null && (!c || ge(f, l)?.writable)) {
|
|
1104
|
+
u === void 0 && (u = a(() => {
|
|
1105
|
+
var h = c ? xe(f[l]) : N, d = /* @__PURE__ */ oe(h);
|
|
1106
|
+
return d;
|
|
1107
|
+
}), n.set(l, u));
|
|
1108
|
+
var _ = M(u);
|
|
1109
|
+
if (_ === N)
|
|
1110
|
+
return !1;
|
|
1111
|
+
}
|
|
1112
|
+
return c;
|
|
1113
|
+
},
|
|
1114
|
+
set(f, l, u, c) {
|
|
1115
|
+
var _ = n.get(l), h = l in f;
|
|
1116
|
+
if (r && l === "length")
|
|
1117
|
+
for (var d = u; d < /** @type {Source<number>} */
|
|
1118
|
+
_.v; d += 1) {
|
|
1119
|
+
var o = n.get(d + "");
|
|
1120
|
+
o !== void 0 ? Q(o, N) : d in f && (o = a(() => /* @__PURE__ */ oe(N)), n.set(d + "", o));
|
|
1121
|
+
}
|
|
1122
|
+
if (_ === void 0)
|
|
1123
|
+
(!h || ge(f, l)?.writable) && (_ = a(() => /* @__PURE__ */ oe(void 0)), Q(_, xe(u)), n.set(l, _));
|
|
1124
|
+
else {
|
|
1125
|
+
h = _.v !== N;
|
|
1126
|
+
var g = a(() => xe(u));
|
|
1127
|
+
Q(_, g);
|
|
1128
|
+
}
|
|
1129
|
+
var b = Reflect.getOwnPropertyDescriptor(f, l);
|
|
1130
|
+
if (b?.set && b.set.call(c, u), !h) {
|
|
1131
|
+
if (r && typeof l == "string") {
|
|
1132
|
+
var E = (
|
|
1133
|
+
/** @type {Source<number>} */
|
|
1134
|
+
n.get("length")
|
|
1135
|
+
), T = Number(l);
|
|
1136
|
+
Number.isInteger(T) && T >= E.v && Q(E, T + 1);
|
|
1137
|
+
}
|
|
1138
|
+
Ve(s);
|
|
1139
|
+
}
|
|
1140
|
+
return !0;
|
|
1141
|
+
},
|
|
1142
|
+
ownKeys(f) {
|
|
1143
|
+
M(s);
|
|
1144
|
+
var l = Reflect.ownKeys(f).filter((_) => {
|
|
1145
|
+
var h = n.get(_);
|
|
1146
|
+
return h === void 0 || h.v !== N;
|
|
1147
|
+
});
|
|
1148
|
+
for (var [u, c] of n)
|
|
1149
|
+
c.v !== N && !(u in f) && l.push(u);
|
|
1150
|
+
return l;
|
|
1151
|
+
},
|
|
1152
|
+
setPrototypeOf() {
|
|
1153
|
+
Rr();
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
);
|
|
1157
|
+
}
|
|
1158
|
+
function Zt(e) {
|
|
1159
|
+
try {
|
|
1160
|
+
if (e !== null && typeof e == "object" && Ne in e)
|
|
1161
|
+
return e[Ne];
|
|
1162
|
+
} catch {
|
|
1163
|
+
}
|
|
1164
|
+
return e;
|
|
1165
|
+
}
|
|
1166
|
+
function xn(e, t) {
|
|
1167
|
+
return Object.is(Zt(e), Zt(t));
|
|
1168
|
+
}
|
|
1169
|
+
var Qt, Nn, Cn, On;
|
|
1170
|
+
function Ot() {
|
|
1171
|
+
if (Qt === void 0) {
|
|
1172
|
+
Qt = window, Nn = /Firefox/.test(navigator.userAgent);
|
|
1173
|
+
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
1174
|
+
Cn = ge(t, "firstChild").get, On = ge(t, "nextSibling").get, zt(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), zt(n) && (n.__t = void 0);
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
function G(e = "") {
|
|
1178
|
+
return document.createTextNode(e);
|
|
1179
|
+
}
|
|
1180
|
+
// @__NO_SIDE_EFFECTS__
|
|
1181
|
+
function re(e) {
|
|
1182
|
+
return Cn.call(e);
|
|
1183
|
+
}
|
|
1184
|
+
// @__NO_SIDE_EFFECTS__
|
|
1185
|
+
function se(e) {
|
|
1186
|
+
return On.call(e);
|
|
1187
|
+
}
|
|
1188
|
+
function Bs(e, t) {
|
|
1189
|
+
if (!v)
|
|
1190
|
+
return /* @__PURE__ */ re(e);
|
|
1191
|
+
var n = (
|
|
1192
|
+
/** @type {TemplateNode} */
|
|
1193
|
+
/* @__PURE__ */ re(w)
|
|
1194
|
+
);
|
|
1195
|
+
if (n === null)
|
|
1196
|
+
n = w.appendChild(G());
|
|
1197
|
+
else if (t && n.nodeType !== ht) {
|
|
1198
|
+
var r = G();
|
|
1199
|
+
return n?.before(r), O(r), r;
|
|
1200
|
+
}
|
|
1201
|
+
return O(n), n;
|
|
1202
|
+
}
|
|
1203
|
+
function Hs(e, t = !1) {
|
|
1204
|
+
if (!v) {
|
|
1205
|
+
var n = (
|
|
1206
|
+
/** @type {DocumentFragment} */
|
|
1207
|
+
/* @__PURE__ */ re(
|
|
1208
|
+
/** @type {Node} */
|
|
1209
|
+
e
|
|
1210
|
+
)
|
|
1211
|
+
);
|
|
1212
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ se(n) : n;
|
|
1213
|
+
}
|
|
1214
|
+
if (t && w?.nodeType !== ht) {
|
|
1215
|
+
var r = G();
|
|
1216
|
+
return w?.before(r), O(r), r;
|
|
1217
|
+
}
|
|
1218
|
+
return w;
|
|
1219
|
+
}
|
|
1220
|
+
function Us(e, t = 1, n = !1) {
|
|
1221
|
+
let r = v ? w : e;
|
|
1222
|
+
for (var s; t--; )
|
|
1223
|
+
s = r, r = /** @type {TemplateNode} */
|
|
1224
|
+
/* @__PURE__ */ se(r);
|
|
1225
|
+
if (!v)
|
|
1226
|
+
return r;
|
|
1227
|
+
if (n && r?.nodeType !== ht) {
|
|
1228
|
+
var i = G();
|
|
1229
|
+
return r === null ? s?.after(i) : r.before(i), O(i), i;
|
|
1230
|
+
}
|
|
1231
|
+
return O(r), /** @type {TemplateNode} */
|
|
1232
|
+
r;
|
|
1233
|
+
}
|
|
1234
|
+
function Yt(e) {
|
|
1235
|
+
e.textContent = "";
|
|
1236
|
+
}
|
|
1237
|
+
function Rn() {
|
|
1238
|
+
return !1;
|
|
1239
|
+
}
|
|
1240
|
+
function Vs(e) {
|
|
1241
|
+
v && /* @__PURE__ */ re(e) !== null && Yt(e);
|
|
1242
|
+
}
|
|
1243
|
+
let en = !1;
|
|
1244
|
+
function In() {
|
|
1245
|
+
en || (en = !0, document.addEventListener(
|
|
1246
|
+
"reset",
|
|
1247
|
+
(e) => {
|
|
1248
|
+
Promise.resolve().then(() => {
|
|
1249
|
+
if (!e.defaultPrevented)
|
|
1250
|
+
for (
|
|
1251
|
+
const t of
|
|
1252
|
+
/**@type {HTMLFormElement} */
|
|
1253
|
+
e.target.elements
|
|
1254
|
+
)
|
|
1255
|
+
t.__on_r?.();
|
|
1256
|
+
});
|
|
1257
|
+
},
|
|
1258
|
+
// In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
|
|
1259
|
+
{ capture: !0 }
|
|
1260
|
+
));
|
|
1261
|
+
}
|
|
1262
|
+
function mt(e) {
|
|
1263
|
+
var t = $, n = m;
|
|
1264
|
+
C(null), K(null);
|
|
1265
|
+
try {
|
|
1266
|
+
return e();
|
|
1267
|
+
} finally {
|
|
1268
|
+
C(t), K(n);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
function ze(e, t, n, r = n) {
|
|
1272
|
+
e.addEventListener(t, () => mt(n));
|
|
1273
|
+
const s = e.__on_r;
|
|
1274
|
+
s ? e.__on_r = () => {
|
|
1275
|
+
s(), r(!0);
|
|
1276
|
+
} : e.__on_r = () => r(!0), In();
|
|
1277
|
+
}
|
|
1278
|
+
function es(e) {
|
|
1279
|
+
m === null && $ === null && Ar(), $ !== null && ($.f & W) !== 0 && m === null && Tr(), ke && kr();
|
|
1280
|
+
}
|
|
1281
|
+
function ts(e, t) {
|
|
1282
|
+
var n = t.last;
|
|
1283
|
+
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
1284
|
+
}
|
|
1285
|
+
function ie(e, t, n, r = !0) {
|
|
1286
|
+
var s = m;
|
|
1287
|
+
s !== null && (s.f & H) !== 0 && (e |= H);
|
|
1288
|
+
var i = {
|
|
1289
|
+
ctx: A,
|
|
1290
|
+
deps: null,
|
|
1291
|
+
nodes_start: null,
|
|
1292
|
+
nodes_end: null,
|
|
1293
|
+
f: e | U,
|
|
1294
|
+
first: null,
|
|
1295
|
+
fn: t,
|
|
1296
|
+
last: null,
|
|
1297
|
+
next: null,
|
|
1298
|
+
parent: s,
|
|
1299
|
+
b: s && s.b,
|
|
1300
|
+
prev: null,
|
|
1301
|
+
teardown: null,
|
|
1302
|
+
transitions: null,
|
|
1303
|
+
wv: 0,
|
|
1304
|
+
ac: null
|
|
1305
|
+
};
|
|
1306
|
+
if (n)
|
|
1307
|
+
try {
|
|
1308
|
+
it(i), i.f |= Bt;
|
|
1309
|
+
} catch (l) {
|
|
1310
|
+
throw L(i), l;
|
|
1311
|
+
}
|
|
1312
|
+
else t !== null && be(i);
|
|
1313
|
+
if (r) {
|
|
1314
|
+
var a = i;
|
|
1315
|
+
if (n && a.deps === null && a.teardown === null && a.nodes_start === null && a.first === a.last && // either `null`, or a singular child
|
|
1316
|
+
(a.f & Se) === 0 && (a = a.first), a !== null && (a.parent = s, s !== null && ts(a, s), $ !== null && ($.f & F) !== 0 && (e & _e) === 0)) {
|
|
1317
|
+
var f = (
|
|
1318
|
+
/** @type {Derived} */
|
|
1319
|
+
$
|
|
1320
|
+
);
|
|
1321
|
+
(f.effects ??= []).push(a);
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
return i;
|
|
1325
|
+
}
|
|
1326
|
+
function ns() {
|
|
1327
|
+
return $ !== null && !J;
|
|
1328
|
+
}
|
|
1329
|
+
function gt(e) {
|
|
1330
|
+
const t = ie(jt, null, !1);
|
|
1331
|
+
return D(t, P), t.teardown = e, t;
|
|
1332
|
+
}
|
|
1333
|
+
function Ys(e) {
|
|
1334
|
+
es();
|
|
1335
|
+
var t = (
|
|
1336
|
+
/** @type {Effect} */
|
|
1337
|
+
m.f
|
|
1338
|
+
), n = !$ && (t & ue) !== 0 && (t & Bt) === 0;
|
|
1339
|
+
if (n) {
|
|
1340
|
+
var r = (
|
|
1341
|
+
/** @type {ComponentContext} */
|
|
1342
|
+
A
|
|
1343
|
+
);
|
|
1344
|
+
(r.e ??= []).push(e);
|
|
1345
|
+
} else
|
|
1346
|
+
return Pn(e);
|
|
1347
|
+
}
|
|
1348
|
+
function Pn(e) {
|
|
1349
|
+
return ie(qt | br, e, !1);
|
|
1350
|
+
}
|
|
1351
|
+
function rs(e) {
|
|
1352
|
+
te.ensure();
|
|
1353
|
+
const t = ie(_e | Se, e, !0);
|
|
1354
|
+
return () => {
|
|
1355
|
+
L(t);
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
function ss(e) {
|
|
1359
|
+
te.ensure();
|
|
1360
|
+
const t = ie(_e | Se, e, !0);
|
|
1361
|
+
return (n = {}) => new Promise((r) => {
|
|
1362
|
+
n.outro ? Ce(t, () => {
|
|
1363
|
+
L(t), r(void 0);
|
|
1364
|
+
}) : (L(t), r(void 0));
|
|
1365
|
+
});
|
|
1366
|
+
}
|
|
1367
|
+
function Mn(e) {
|
|
1368
|
+
return ie(qt, e, !1);
|
|
1369
|
+
}
|
|
1370
|
+
function is(e) {
|
|
1371
|
+
return ie(Ht | Se, e, !0);
|
|
1372
|
+
}
|
|
1373
|
+
function Fe(e, t = 0) {
|
|
1374
|
+
return ie(jt | t, e, !0);
|
|
1375
|
+
}
|
|
1376
|
+
function Ws(e, t = [], n = []) {
|
|
1377
|
+
Jr(t, n, (r) => {
|
|
1378
|
+
ie(jt, () => e(...r.map(M)), !0);
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
function Wt(e, t = 0) {
|
|
1382
|
+
var n = ie(Ee | t, e, !0);
|
|
1383
|
+
return n;
|
|
1384
|
+
}
|
|
1385
|
+
function Y(e, t = !0) {
|
|
1386
|
+
return ie(ue | Se, e, !0, t);
|
|
1387
|
+
}
|
|
1388
|
+
function Ln(e) {
|
|
1389
|
+
var t = e.teardown;
|
|
1390
|
+
if (t !== null) {
|
|
1391
|
+
const n = ke, r = $;
|
|
1392
|
+
nn(!0), C(null);
|
|
1393
|
+
try {
|
|
1394
|
+
t.call(null);
|
|
1395
|
+
} finally {
|
|
1396
|
+
nn(n), C(r);
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
function Dn(e, t = !1) {
|
|
1401
|
+
var n = e.first;
|
|
1402
|
+
for (e.first = e.last = null; n !== null; ) {
|
|
1403
|
+
const s = n.ac;
|
|
1404
|
+
s !== null && mt(() => {
|
|
1405
|
+
s.abort(Ae);
|
|
1406
|
+
});
|
|
1407
|
+
var r = n.next;
|
|
1408
|
+
(n.f & _e) !== 0 ? n.parent = null : L(n, t), n = r;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
function as(e) {
|
|
1412
|
+
for (var t = e.first; t !== null; ) {
|
|
1413
|
+
var n = t.next;
|
|
1414
|
+
(t.f & ue) === 0 && L(t), t = n;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
function L(e, t = !0) {
|
|
1418
|
+
var n = !1;
|
|
1419
|
+
(t || (e.f & wr) !== 0) && e.nodes_start !== null && e.nodes_end !== null && (fs(
|
|
1420
|
+
e.nodes_start,
|
|
1421
|
+
/** @type {TemplateNode} */
|
|
1422
|
+
e.nodes_end
|
|
1423
|
+
), n = !0), Dn(e, t && !n), st(e, 0), D(e, fe);
|
|
1424
|
+
var r = e.transitions;
|
|
1425
|
+
if (r !== null)
|
|
1426
|
+
for (const i of r)
|
|
1427
|
+
i.stop();
|
|
1428
|
+
Ln(e);
|
|
1429
|
+
var s = e.parent;
|
|
1430
|
+
s !== null && s.first !== null && Fn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = e.ac = null;
|
|
1431
|
+
}
|
|
1432
|
+
function fs(e, t) {
|
|
1433
|
+
for (; e !== null; ) {
|
|
1434
|
+
var n = e === t ? null : (
|
|
1435
|
+
/** @type {TemplateNode} */
|
|
1436
|
+
/* @__PURE__ */ se(e)
|
|
1437
|
+
);
|
|
1438
|
+
e.remove(), e = n;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
function Fn(e) {
|
|
1442
|
+
var t = e.parent, n = e.prev, r = e.next;
|
|
1443
|
+
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1444
|
+
}
|
|
1445
|
+
function Ce(e, t, n = !0) {
|
|
1446
|
+
var r = [];
|
|
1447
|
+
Gt(e, r, !0), qn(r, () => {
|
|
1448
|
+
n && L(e), t && t();
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
function qn(e, t) {
|
|
1452
|
+
var n = e.length;
|
|
1453
|
+
if (n > 0) {
|
|
1454
|
+
var r = () => --n || t();
|
|
1455
|
+
for (var s of e)
|
|
1456
|
+
s.out(r);
|
|
1457
|
+
} else
|
|
1458
|
+
t();
|
|
1459
|
+
}
|
|
1460
|
+
function Gt(e, t, n) {
|
|
1461
|
+
if ((e.f & H) === 0) {
|
|
1462
|
+
if (e.f ^= H, e.transitions !== null)
|
|
1463
|
+
for (const a of e.transitions)
|
|
1464
|
+
(a.is_global || n) && t.push(a);
|
|
1465
|
+
for (var r = e.first; r !== null; ) {
|
|
1466
|
+
var s = r.next, i = (r.f & ct) !== 0 || (r.f & ue) !== 0;
|
|
1467
|
+
Gt(r, t, i ? n : !1), r = s;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
function Kt(e) {
|
|
1472
|
+
jn(e, !0);
|
|
1473
|
+
}
|
|
1474
|
+
function jn(e, t) {
|
|
1475
|
+
if ((e.f & H) !== 0) {
|
|
1476
|
+
e.f ^= H, (e.f & P) === 0 && (D(e, U), be(e));
|
|
1477
|
+
for (var n = e.first; n !== null; ) {
|
|
1478
|
+
var r = n.next, s = (n.f & ct) !== 0 || (n.f & ue) !== 0;
|
|
1479
|
+
jn(n, s ? t : !1), n = r;
|
|
1480
|
+
}
|
|
1481
|
+
if (e.transitions !== null)
|
|
1482
|
+
for (const i of e.transitions)
|
|
1483
|
+
(i.is_global || t) && i.in();
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
function Bn(e, t) {
|
|
1487
|
+
for (var n = e.nodes_start, r = e.nodes_end; n !== null; ) {
|
|
1488
|
+
var s = n === r ? null : (
|
|
1489
|
+
/** @type {TemplateNode} */
|
|
1490
|
+
/* @__PURE__ */ se(n)
|
|
1491
|
+
);
|
|
1492
|
+
t.append(n), n = s;
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
let Oe = !1;
|
|
1496
|
+
function tn(e) {
|
|
1497
|
+
Oe = e;
|
|
1498
|
+
}
|
|
1499
|
+
let ke = !1;
|
|
1500
|
+
function nn(e) {
|
|
1501
|
+
ke = e;
|
|
1502
|
+
}
|
|
1503
|
+
let $ = null, J = !1;
|
|
1504
|
+
function C(e) {
|
|
1505
|
+
$ = e;
|
|
1506
|
+
}
|
|
1507
|
+
let m = null;
|
|
1508
|
+
function K(e) {
|
|
1509
|
+
m = e;
|
|
1510
|
+
}
|
|
1511
|
+
let le = null;
|
|
1512
|
+
function Hn(e) {
|
|
1513
|
+
$ !== null && (le === null ? le = [e] : le.push(e));
|
|
1514
|
+
}
|
|
1515
|
+
let I = null, j = 0, V = null;
|
|
1516
|
+
function ls(e) {
|
|
1517
|
+
V = e;
|
|
1518
|
+
}
|
|
1519
|
+
let Un = 1, We = 0, we = We;
|
|
1520
|
+
function rn(e) {
|
|
1521
|
+
we = e;
|
|
1522
|
+
}
|
|
1523
|
+
let ce = !1;
|
|
1524
|
+
function Vn() {
|
|
1525
|
+
return ++Un;
|
|
1526
|
+
}
|
|
1527
|
+
function $t(e) {
|
|
1528
|
+
var t = e.f;
|
|
1529
|
+
if ((t & U) !== 0)
|
|
1530
|
+
return !0;
|
|
1531
|
+
if ((t & ve) !== 0) {
|
|
1532
|
+
var n = e.deps, r = (t & W) !== 0;
|
|
1533
|
+
if (n !== null) {
|
|
1534
|
+
var s, i, a = (t & nt) !== 0, f = r && m !== null && !ce, l = n.length;
|
|
1535
|
+
if ((a || f) && (m === null || (m.f & fe) === 0)) {
|
|
1536
|
+
var u = (
|
|
1537
|
+
/** @type {Derived} */
|
|
1538
|
+
e
|
|
1539
|
+
), c = u.parent;
|
|
1540
|
+
for (s = 0; s < l; s++)
|
|
1541
|
+
i = n[s], (a || !i?.reactions?.includes(u)) && (i.reactions ??= []).push(u);
|
|
1542
|
+
a && (u.f ^= nt), f && c !== null && (c.f & W) === 0 && (u.f ^= W);
|
|
1543
|
+
}
|
|
1544
|
+
for (s = 0; s < l; s++)
|
|
1545
|
+
if (i = n[s], $t(
|
|
1546
|
+
/** @type {Derived} */
|
|
1547
|
+
i
|
|
1548
|
+
) && kn(
|
|
1549
|
+
/** @type {Derived} */
|
|
1550
|
+
i
|
|
1551
|
+
), i.wv > e.wv)
|
|
1552
|
+
return !0;
|
|
1553
|
+
}
|
|
1554
|
+
(!r || m !== null && !ce) && D(e, P);
|
|
1555
|
+
}
|
|
1556
|
+
return !1;
|
|
1557
|
+
}
|
|
1558
|
+
function Yn(e, t, n = !0) {
|
|
1559
|
+
var r = e.reactions;
|
|
1560
|
+
if (r !== null && !le?.includes(e))
|
|
1561
|
+
for (var s = 0; s < r.length; s++) {
|
|
1562
|
+
var i = r[s];
|
|
1563
|
+
(i.f & F) !== 0 ? Yn(
|
|
1564
|
+
/** @type {Derived} */
|
|
1565
|
+
i,
|
|
1566
|
+
t,
|
|
1567
|
+
!1
|
|
1568
|
+
) : t === i && (n ? D(i, U) : (i.f & P) !== 0 && D(i, ve), be(
|
|
1569
|
+
/** @type {Effect} */
|
|
1570
|
+
i
|
|
1571
|
+
));
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
function Wn(e) {
|
|
1575
|
+
var t = I, n = j, r = V, s = $, i = ce, a = le, f = A, l = J, u = we, c = e.f;
|
|
1576
|
+
I = /** @type {null | Value[]} */
|
|
1577
|
+
null, j = 0, V = null, ce = (c & W) !== 0 && (J || !Oe || $ === null), $ = (c & (ue | _e)) === 0 ? e : null, le = null, Pe(e.ctx), J = !1, we = ++We, e.ac !== null && (mt(() => {
|
|
1578
|
+
e.ac.abort(Ae);
|
|
1579
|
+
}), e.ac = null);
|
|
1580
|
+
try {
|
|
1581
|
+
e.f |= At;
|
|
1582
|
+
var _ = (
|
|
1583
|
+
/** @type {Function} */
|
|
1584
|
+
e.fn
|
|
1585
|
+
), h = _(), d = e.deps;
|
|
1586
|
+
if (I !== null) {
|
|
1587
|
+
var o;
|
|
1588
|
+
if (st(e, j), d !== null && j > 0)
|
|
1589
|
+
for (d.length = j + I.length, o = 0; o < I.length; o++)
|
|
1590
|
+
d[j + o] = I[o];
|
|
1591
|
+
else
|
|
1592
|
+
e.deps = d = I;
|
|
1593
|
+
if (!ce || // Deriveds that already have reactions can cleanup, so we still add them as reactions
|
|
1594
|
+
(c & F) !== 0 && /** @type {import('#client').Derived} */
|
|
1595
|
+
e.reactions !== null)
|
|
1596
|
+
for (o = j; o < d.length; o++)
|
|
1597
|
+
(d[o].reactions ??= []).push(e);
|
|
1598
|
+
} else d !== null && j < d.length && (st(e, j), d.length = j);
|
|
1599
|
+
if (Ke() && V !== null && !J && d !== null && (e.f & (F | ve | U)) === 0)
|
|
1600
|
+
for (o = 0; o < /** @type {Source[]} */
|
|
1601
|
+
V.length; o++)
|
|
1602
|
+
Yn(
|
|
1603
|
+
V[o],
|
|
1604
|
+
/** @type {Effect} */
|
|
1605
|
+
e
|
|
1606
|
+
);
|
|
1607
|
+
return s !== null && s !== e && (We++, V !== null && (r === null ? r = V : r.push(.../** @type {Source[]} */
|
|
1608
|
+
V))), (e.f & $e) !== 0 && (e.f ^= $e), h;
|
|
1609
|
+
} catch (g) {
|
|
1610
|
+
return gn(g);
|
|
1611
|
+
} finally {
|
|
1612
|
+
e.f ^= At, I = t, j = n, V = r, $ = s, ce = i, le = a, Pe(f), J = l, we = u;
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
function us(e, t) {
|
|
1616
|
+
let n = t.reactions;
|
|
1617
|
+
if (n !== null) {
|
|
1618
|
+
var r = vr.call(n, e);
|
|
1619
|
+
if (r !== -1) {
|
|
1620
|
+
var s = n.length - 1;
|
|
1621
|
+
s === 0 ? n = t.reactions = null : (n[r] = n[s], n.pop());
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
n === null && (t.f & F) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1625
|
+
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1626
|
+
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1627
|
+
(I === null || !I.includes(t)) && (D(t, ve), (t.f & (W | nt)) === 0 && (t.f ^= nt), Sn(
|
|
1628
|
+
/** @type {Derived} **/
|
|
1629
|
+
t
|
|
1630
|
+
), st(
|
|
1631
|
+
/** @type {Derived} **/
|
|
1632
|
+
t,
|
|
1633
|
+
0
|
|
1634
|
+
));
|
|
1635
|
+
}
|
|
1636
|
+
function st(e, t) {
|
|
1637
|
+
var n = e.deps;
|
|
1638
|
+
if (n !== null)
|
|
1639
|
+
for (var r = t; r < n.length; r++)
|
|
1640
|
+
us(e, n[r]);
|
|
1641
|
+
}
|
|
1642
|
+
function it(e) {
|
|
1643
|
+
var t = e.f;
|
|
1644
|
+
if ((t & fe) === 0) {
|
|
1645
|
+
D(e, P);
|
|
1646
|
+
var n = m, r = Oe;
|
|
1647
|
+
m = e, Oe = !0;
|
|
1648
|
+
try {
|
|
1649
|
+
(t & Ee) !== 0 ? as(e) : Dn(e), Ln(e);
|
|
1650
|
+
var s = Wn(e);
|
|
1651
|
+
e.teardown = typeof s == "function" ? s : null, e.wv = Un;
|
|
1652
|
+
var i;
|
|
1653
|
+
un && qr && (e.f & U) !== 0 && e.deps;
|
|
1654
|
+
} finally {
|
|
1655
|
+
Oe = r, m = n;
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
async function os() {
|
|
1660
|
+
await Promise.resolve(), wn();
|
|
1661
|
+
}
|
|
1662
|
+
function M(e) {
|
|
1663
|
+
var t = e.f, n = (t & F) !== 0;
|
|
1664
|
+
if ($ !== null && !J) {
|
|
1665
|
+
var r = m !== null && (m.f & fe) !== 0;
|
|
1666
|
+
if (!r && !le?.includes(e)) {
|
|
1667
|
+
var s = $.deps;
|
|
1668
|
+
if (($.f & At) !== 0)
|
|
1669
|
+
e.rv < We && (e.rv = We, I === null && s !== null && s[j] === e ? j++ : I === null ? I = [e] : (!ce || !I.includes(e)) && I.push(e));
|
|
1670
|
+
else {
|
|
1671
|
+
($.deps ??= []).push(e);
|
|
1672
|
+
var i = e.reactions;
|
|
1673
|
+
i === null ? e.reactions = [$] : i.includes($) || i.push($);
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
} else if (n && /** @type {Derived} */
|
|
1677
|
+
e.deps === null && /** @type {Derived} */
|
|
1678
|
+
e.effects === null) {
|
|
1679
|
+
var a = (
|
|
1680
|
+
/** @type {Derived} */
|
|
1681
|
+
e
|
|
1682
|
+
), f = a.parent;
|
|
1683
|
+
f !== null && (f.f & W) === 0 && (a.f ^= W);
|
|
1684
|
+
}
|
|
1685
|
+
if (ke) {
|
|
1686
|
+
if (he.has(e))
|
|
1687
|
+
return he.get(e);
|
|
1688
|
+
if (n) {
|
|
1689
|
+
a = /** @type {Derived} */
|
|
1690
|
+
e;
|
|
1691
|
+
var l = a.v;
|
|
1692
|
+
return ((a.f & P) === 0 && a.reactions !== null || Gn(a)) && (l = Vt(a)), he.set(a, l), l;
|
|
1693
|
+
}
|
|
1694
|
+
} else if (n) {
|
|
1695
|
+
if (a = /** @type {Derived} */
|
|
1696
|
+
e, z?.has(a))
|
|
1697
|
+
return z.get(a);
|
|
1698
|
+
$t(a) && kn(a);
|
|
1699
|
+
}
|
|
1700
|
+
if (z?.has(e))
|
|
1701
|
+
return z.get(e);
|
|
1702
|
+
if ((e.f & $e) !== 0)
|
|
1703
|
+
throw e.v;
|
|
1704
|
+
return e.v;
|
|
1705
|
+
}
|
|
1706
|
+
function Gn(e) {
|
|
1707
|
+
if (e.v === N) return !0;
|
|
1708
|
+
if (e.deps === null) return !1;
|
|
1709
|
+
for (const t of e.deps)
|
|
1710
|
+
if (he.has(t) || (t.f & F) !== 0 && Gn(
|
|
1711
|
+
/** @type {Derived} */
|
|
1712
|
+
t
|
|
1713
|
+
))
|
|
1714
|
+
return !0;
|
|
1715
|
+
return !1;
|
|
1716
|
+
}
|
|
1717
|
+
function wt(e) {
|
|
1718
|
+
var t = J;
|
|
1719
|
+
try {
|
|
1720
|
+
return J = !0, e();
|
|
1721
|
+
} finally {
|
|
1722
|
+
J = t;
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
const cs = -7169;
|
|
1726
|
+
function D(e, t) {
|
|
1727
|
+
e.f = e.f & cs | t;
|
|
1728
|
+
}
|
|
1729
|
+
const Kn = /* @__PURE__ */ new Set(), Rt = /* @__PURE__ */ new Set();
|
|
1730
|
+
function Gs(e) {
|
|
1731
|
+
if (!v) return;
|
|
1732
|
+
e.removeAttribute("onload"), e.removeAttribute("onerror");
|
|
1733
|
+
const t = e.__e;
|
|
1734
|
+
t !== void 0 && (e.__e = void 0, queueMicrotask(() => {
|
|
1735
|
+
e.isConnected && e.dispatchEvent(t);
|
|
1736
|
+
}));
|
|
1737
|
+
}
|
|
1738
|
+
function hs(e, t, n, r = {}) {
|
|
1739
|
+
function s(i) {
|
|
1740
|
+
if (r.capture || Be.call(t, i), !i.cancelBubble)
|
|
1741
|
+
return mt(() => n?.call(this, i));
|
|
1742
|
+
}
|
|
1743
|
+
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? de(() => {
|
|
1744
|
+
t.addEventListener(e, s, r);
|
|
1745
|
+
}) : t.addEventListener(e, s, r), s;
|
|
1746
|
+
}
|
|
1747
|
+
function Ks(e, t, n, r, s) {
|
|
1748
|
+
var i = { capture: r, passive: s }, a = hs(e, t, n, i);
|
|
1749
|
+
(t === document.body || // @ts-ignore
|
|
1750
|
+
t === window || // @ts-ignore
|
|
1751
|
+
t === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed
|
|
1752
|
+
t instanceof HTMLMediaElement) && gt(() => {
|
|
1753
|
+
t.removeEventListener(e, a, i);
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
function zs(e) {
|
|
1757
|
+
for (var t = 0; t < e.length; t++)
|
|
1758
|
+
Kn.add(e[t]);
|
|
1759
|
+
for (var n of Rt)
|
|
1760
|
+
n(e);
|
|
1761
|
+
}
|
|
1762
|
+
let sn = null;
|
|
1763
|
+
function Be(e) {
|
|
1764
|
+
var t = this, n = (
|
|
1765
|
+
/** @type {Node} */
|
|
1766
|
+
t.ownerDocument
|
|
1767
|
+
), r = e.type, s = e.composedPath?.() || [], i = (
|
|
1768
|
+
/** @type {null | Element} */
|
|
1769
|
+
s[0] || e.target
|
|
1770
|
+
);
|
|
1771
|
+
sn = e;
|
|
1772
|
+
var a = 0, f = sn === e && e.__root;
|
|
1773
|
+
if (f) {
|
|
1774
|
+
var l = s.indexOf(f);
|
|
1775
|
+
if (l !== -1 && (t === document || t === /** @type {any} */
|
|
1776
|
+
window)) {
|
|
1777
|
+
e.__root = t;
|
|
1778
|
+
return;
|
|
1779
|
+
}
|
|
1780
|
+
var u = s.indexOf(t);
|
|
1781
|
+
if (u === -1)
|
|
1782
|
+
return;
|
|
1783
|
+
l <= u && (a = l);
|
|
1784
|
+
}
|
|
1785
|
+
if (i = /** @type {Element} */
|
|
1786
|
+
s[a] || e.target, i !== t) {
|
|
1787
|
+
Ie(e, "currentTarget", {
|
|
1788
|
+
configurable: !0,
|
|
1789
|
+
get() {
|
|
1790
|
+
return i || n;
|
|
1791
|
+
}
|
|
1792
|
+
});
|
|
1793
|
+
var c = $, _ = m;
|
|
1794
|
+
C(null), K(null);
|
|
1795
|
+
try {
|
|
1796
|
+
for (var h, d = []; i !== null; ) {
|
|
1797
|
+
var o = i.assignedSlot || i.parentNode || /** @type {any} */
|
|
1798
|
+
i.host || null;
|
|
1799
|
+
try {
|
|
1800
|
+
var g = i["__" + r];
|
|
1801
|
+
if (g != null && (!/** @type {any} */
|
|
1802
|
+
i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1803
|
+
// -> the target could not have been disabled because it emits the event in the first place
|
|
1804
|
+
e.target === i))
|
|
1805
|
+
if (ut(g)) {
|
|
1806
|
+
var [b, ...E] = g;
|
|
1807
|
+
b.apply(i, [e, ...E]);
|
|
1808
|
+
} else
|
|
1809
|
+
g.call(i, e);
|
|
1810
|
+
} catch (T) {
|
|
1811
|
+
h ? d.push(T) : h = T;
|
|
1812
|
+
}
|
|
1813
|
+
if (e.cancelBubble || o === t || o === null)
|
|
1814
|
+
break;
|
|
1815
|
+
i = o;
|
|
1816
|
+
}
|
|
1817
|
+
if (h) {
|
|
1818
|
+
for (let T of d)
|
|
1819
|
+
queueMicrotask(() => {
|
|
1820
|
+
throw T;
|
|
1821
|
+
});
|
|
1822
|
+
throw h;
|
|
1823
|
+
}
|
|
1824
|
+
} finally {
|
|
1825
|
+
e.__root = t, delete e.currentTarget, C(c), K(_);
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
function zn(e) {
|
|
1830
|
+
var t = document.createElement("template");
|
|
1831
|
+
return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
|
|
1832
|
+
}
|
|
1833
|
+
function ne(e, t) {
|
|
1834
|
+
var n = (
|
|
1835
|
+
/** @type {Effect} */
|
|
1836
|
+
m
|
|
1837
|
+
);
|
|
1838
|
+
n.nodes_start === null && (n.nodes_start = e, n.nodes_end = t);
|
|
1839
|
+
}
|
|
1840
|
+
// @__NO_SIDE_EFFECTS__
|
|
1841
|
+
function Js(e, t) {
|
|
1842
|
+
var n = (t & hr) !== 0, r = (t & dr) !== 0, s, i = !e.startsWith("<!>");
|
|
1843
|
+
return () => {
|
|
1844
|
+
if (v)
|
|
1845
|
+
return ne(w, null), w;
|
|
1846
|
+
s === void 0 && (s = zn(i ? e : "<!>" + e), n || (s = /** @type {Node} */
|
|
1847
|
+
/* @__PURE__ */ re(s)));
|
|
1848
|
+
var a = (
|
|
1849
|
+
/** @type {TemplateNode} */
|
|
1850
|
+
r || Nn ? document.importNode(s, !0) : s.cloneNode(!0)
|
|
1851
|
+
);
|
|
1852
|
+
if (n) {
|
|
1853
|
+
var f = (
|
|
1854
|
+
/** @type {TemplateNode} */
|
|
1855
|
+
/* @__PURE__ */ re(a)
|
|
1856
|
+
), l = (
|
|
1857
|
+
/** @type {TemplateNode} */
|
|
1858
|
+
a.lastChild
|
|
1859
|
+
);
|
|
1860
|
+
ne(f, l);
|
|
1861
|
+
} else
|
|
1862
|
+
ne(a, a);
|
|
1863
|
+
return a;
|
|
1864
|
+
};
|
|
1865
|
+
}
|
|
1866
|
+
// @__NO_SIDE_EFFECTS__
|
|
1867
|
+
function ds(e, t, n = "svg") {
|
|
1868
|
+
var r = !e.startsWith("<!>"), s = `<${n}>${r ? e : "<!>" + e}</${n}>`, i;
|
|
1869
|
+
return () => {
|
|
1870
|
+
if (v)
|
|
1871
|
+
return ne(w, null), w;
|
|
1872
|
+
if (!i) {
|
|
1873
|
+
var a = (
|
|
1874
|
+
/** @type {DocumentFragment} */
|
|
1875
|
+
zn(s)
|
|
1876
|
+
), f = (
|
|
1877
|
+
/** @type {Element} */
|
|
1878
|
+
/* @__PURE__ */ re(a)
|
|
1879
|
+
);
|
|
1880
|
+
i = /** @type {Element} */
|
|
1881
|
+
/* @__PURE__ */ re(f);
|
|
1882
|
+
}
|
|
1883
|
+
var l = (
|
|
1884
|
+
/** @type {TemplateNode} */
|
|
1885
|
+
i.cloneNode(!0)
|
|
1886
|
+
);
|
|
1887
|
+
return ne(l, l), l;
|
|
1888
|
+
};
|
|
1889
|
+
}
|
|
1890
|
+
// @__NO_SIDE_EFFECTS__
|
|
1891
|
+
function Xs(e, t) {
|
|
1892
|
+
return /* @__PURE__ */ ds(e, t, "svg");
|
|
1893
|
+
}
|
|
1894
|
+
function Zs(e = "") {
|
|
1895
|
+
if (!v) {
|
|
1896
|
+
var t = G(e + "");
|
|
1897
|
+
return ne(t, t), t;
|
|
1898
|
+
}
|
|
1899
|
+
var n = w;
|
|
1900
|
+
return n.nodeType !== ht && (n.before(n = G()), O(n)), ne(n, n), n;
|
|
1901
|
+
}
|
|
1902
|
+
function Qs() {
|
|
1903
|
+
if (v)
|
|
1904
|
+
return ne(w, null), w;
|
|
1905
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), n = G();
|
|
1906
|
+
return e.append(t, n), ne(t, n), e;
|
|
1907
|
+
}
|
|
1908
|
+
function _s(e, t) {
|
|
1909
|
+
if (v) {
|
|
1910
|
+
m.nodes_end = w, _t();
|
|
1911
|
+
return;
|
|
1912
|
+
}
|
|
1913
|
+
e !== null && e.before(
|
|
1914
|
+
/** @type {Node} */
|
|
1915
|
+
t
|
|
1916
|
+
);
|
|
1917
|
+
}
|
|
1918
|
+
const vs = ["touchstart", "touchmove"];
|
|
1919
|
+
function ps(e) {
|
|
1920
|
+
return vs.includes(e);
|
|
1921
|
+
}
|
|
1922
|
+
function ei(e, t) {
|
|
1923
|
+
var n = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1924
|
+
n !== (e.__t ??= e.nodeValue) && (e.__t = n, e.nodeValue = n + "");
|
|
1925
|
+
}
|
|
1926
|
+
function Jn(e, t) {
|
|
1927
|
+
return Xn(e, t);
|
|
1928
|
+
}
|
|
1929
|
+
function ms(e, t) {
|
|
1930
|
+
Ot(), t.intro = t.intro ?? !1;
|
|
1931
|
+
const n = t.target, r = v, s = w;
|
|
1932
|
+
try {
|
|
1933
|
+
for (var i = (
|
|
1934
|
+
/** @type {TemplateNode} */
|
|
1935
|
+
/* @__PURE__ */ re(n)
|
|
1936
|
+
); i && (i.nodeType !== De || /** @type {Comment} */
|
|
1937
|
+
i.data !== ln); )
|
|
1938
|
+
i = /** @type {TemplateNode} */
|
|
1939
|
+
/* @__PURE__ */ se(i);
|
|
1940
|
+
if (!i)
|
|
1941
|
+
throw Re;
|
|
1942
|
+
B(!0), O(
|
|
1943
|
+
/** @type {Comment} */
|
|
1944
|
+
i
|
|
1945
|
+
);
|
|
1946
|
+
const a = Xn(e, { ...t, anchor: i });
|
|
1947
|
+
return B(!1), /** @type {Exports} */
|
|
1948
|
+
a;
|
|
1949
|
+
} catch (a) {
|
|
1950
|
+
if (a instanceof Error && a.message.split(`
|
|
1951
|
+
`).some((f) => f.startsWith("https://svelte.dev/e/")))
|
|
1952
|
+
throw a;
|
|
1953
|
+
return a !== Re && console.warn("Failed to hydrate: ", a), t.recover === !1 && Nr(), Ot(), Yt(n), B(!1), Jn(e, t);
|
|
1954
|
+
} finally {
|
|
1955
|
+
B(r), O(s);
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
const Te = /* @__PURE__ */ new Map();
|
|
1959
|
+
function Xn(e, { target: t, anchor: n, props: r = {}, events: s, context: i, intro: a = !0 }) {
|
|
1960
|
+
Ot();
|
|
1961
|
+
var f = /* @__PURE__ */ new Set(), l = (_) => {
|
|
1962
|
+
for (var h = 0; h < _.length; h++) {
|
|
1963
|
+
var d = _[h];
|
|
1964
|
+
if (!f.has(d)) {
|
|
1965
|
+
f.add(d);
|
|
1966
|
+
var o = ps(d);
|
|
1967
|
+
t.addEventListener(d, Be, { passive: o });
|
|
1968
|
+
var g = Te.get(d);
|
|
1969
|
+
g === void 0 ? (document.addEventListener(d, Be, { passive: o }), Te.set(d, 1)) : Te.set(d, g + 1);
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
};
|
|
1973
|
+
l(Ft(Kn)), Rt.add(l);
|
|
1974
|
+
var u = void 0, c = ss(() => {
|
|
1975
|
+
var _ = n ?? t.appendChild(G());
|
|
1976
|
+
return Kr(
|
|
1977
|
+
/** @type {TemplateNode} */
|
|
1978
|
+
_,
|
|
1979
|
+
{
|
|
1980
|
+
pending: () => {
|
|
1981
|
+
}
|
|
1982
|
+
},
|
|
1983
|
+
(h) => {
|
|
1984
|
+
if (i) {
|
|
1985
|
+
jr({});
|
|
1986
|
+
var d = (
|
|
1987
|
+
/** @type {ComponentContext} */
|
|
1988
|
+
A
|
|
1989
|
+
);
|
|
1990
|
+
d.c = i;
|
|
1991
|
+
}
|
|
1992
|
+
if (s && (r.$$events = s), v && ne(
|
|
1993
|
+
/** @type {TemplateNode} */
|
|
1994
|
+
h,
|
|
1995
|
+
null
|
|
1996
|
+
), u = e(h, r) || {}, v && (m.nodes_end = w, w === null || w.nodeType !== De || /** @type {Comment} */
|
|
1997
|
+
w.data !== Dt))
|
|
1998
|
+
throw dt(), Re;
|
|
1999
|
+
i && Br();
|
|
2000
|
+
}
|
|
2001
|
+
), () => {
|
|
2002
|
+
for (var h of f) {
|
|
2003
|
+
t.removeEventListener(h, Be);
|
|
2004
|
+
var d = (
|
|
2005
|
+
/** @type {number} */
|
|
2006
|
+
Te.get(h)
|
|
2007
|
+
);
|
|
2008
|
+
--d === 0 ? (document.removeEventListener(h, Be), Te.delete(h)) : Te.set(h, d);
|
|
2009
|
+
}
|
|
2010
|
+
Rt.delete(l), _ !== n && _.parentNode?.removeChild(_);
|
|
2011
|
+
};
|
|
2012
|
+
});
|
|
2013
|
+
return It.set(u, c), u;
|
|
2014
|
+
}
|
|
2015
|
+
let It = /* @__PURE__ */ new WeakMap();
|
|
2016
|
+
function gs(e, t) {
|
|
2017
|
+
const n = It.get(e);
|
|
2018
|
+
return n ? (It.delete(e), n(t)) : Promise.resolve();
|
|
2019
|
+
}
|
|
2020
|
+
class $s {
|
|
2021
|
+
/** @type {TemplateNode} */
|
|
2022
|
+
anchor;
|
|
2023
|
+
/** @type {Map<Batch, Key>} */
|
|
2024
|
+
#t = /* @__PURE__ */ new Map();
|
|
2025
|
+
/** @type {Map<Key, Effect>} */
|
|
2026
|
+
#e = /* @__PURE__ */ new Map();
|
|
2027
|
+
/** @type {Map<Key, Branch>} */
|
|
2028
|
+
#n = /* @__PURE__ */ new Map();
|
|
2029
|
+
/**
|
|
2030
|
+
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2031
|
+
* This is necessary for `<svelte:element>`
|
|
2032
|
+
*/
|
|
2033
|
+
#r = !0;
|
|
2034
|
+
/**
|
|
2035
|
+
* @param {TemplateNode} anchor
|
|
2036
|
+
* @param {boolean} transition
|
|
2037
|
+
*/
|
|
2038
|
+
constructor(t, n = !0) {
|
|
2039
|
+
this.anchor = t, this.#r = n;
|
|
2040
|
+
}
|
|
2041
|
+
#l = () => {
|
|
2042
|
+
var t = (
|
|
2043
|
+
/** @type {Batch} */
|
|
2044
|
+
y
|
|
2045
|
+
);
|
|
2046
|
+
if (this.#t.has(t)) {
|
|
2047
|
+
var n = (
|
|
2048
|
+
/** @type {Key} */
|
|
2049
|
+
this.#t.get(t)
|
|
2050
|
+
), r = this.#e.get(n);
|
|
2051
|
+
if (r)
|
|
2052
|
+
Kt(r);
|
|
2053
|
+
else {
|
|
2054
|
+
var s = this.#n.get(n);
|
|
2055
|
+
s && (this.#e.set(n, s.effect), this.#n.delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), r = s.effect);
|
|
2056
|
+
}
|
|
2057
|
+
for (const [i, a] of this.#t) {
|
|
2058
|
+
if (this.#t.delete(i), i === t)
|
|
2059
|
+
break;
|
|
2060
|
+
const f = this.#n.get(a);
|
|
2061
|
+
f && (L(f.effect), this.#n.delete(a));
|
|
2062
|
+
}
|
|
2063
|
+
for (const [i, a] of this.#e) {
|
|
2064
|
+
if (i === n) continue;
|
|
2065
|
+
const f = () => {
|
|
2066
|
+
if (Array.from(this.#t.values()).includes(i)) {
|
|
2067
|
+
var u = document.createDocumentFragment();
|
|
2068
|
+
Bn(a, u), u.append(G()), this.#n.set(i, { effect: a, fragment: u });
|
|
2069
|
+
} else
|
|
2070
|
+
L(a);
|
|
2071
|
+
this.#e.delete(i);
|
|
2072
|
+
};
|
|
2073
|
+
this.#r || !r ? Ce(a, f, !1) : f();
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
};
|
|
2077
|
+
/**
|
|
2078
|
+
*
|
|
2079
|
+
* @param {any} key
|
|
2080
|
+
* @param {null | ((target: TemplateNode) => void)} fn
|
|
2081
|
+
*/
|
|
2082
|
+
ensure(t, n) {
|
|
2083
|
+
var r = (
|
|
2084
|
+
/** @type {Batch} */
|
|
2085
|
+
y
|
|
2086
|
+
), s = Rn();
|
|
2087
|
+
if (n && !this.#e.has(t) && !this.#n.has(t))
|
|
2088
|
+
if (s) {
|
|
2089
|
+
var i = document.createDocumentFragment(), a = G();
|
|
2090
|
+
i.append(a), this.#n.set(t, {
|
|
2091
|
+
effect: Y(() => n(a)),
|
|
2092
|
+
fragment: i
|
|
2093
|
+
});
|
|
2094
|
+
} else
|
|
2095
|
+
this.#e.set(
|
|
2096
|
+
t,
|
|
2097
|
+
Y(() => n(this.anchor))
|
|
2098
|
+
);
|
|
2099
|
+
if (this.#t.set(r, t), s) {
|
|
2100
|
+
for (const [f, l] of this.#e)
|
|
2101
|
+
f === t ? r.skipped_effects.delete(l) : r.skipped_effects.add(l);
|
|
2102
|
+
for (const [f, l] of this.#n)
|
|
2103
|
+
f === t ? r.skipped_effects.delete(l.effect) : r.skipped_effects.add(l.effect);
|
|
2104
|
+
r.add_callback(this.#l);
|
|
2105
|
+
} else
|
|
2106
|
+
v && (this.anchor = w), this.#l();
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
function ti(e, t, n = !1) {
|
|
2110
|
+
v && _t();
|
|
2111
|
+
var r = new $s(e), s = n ? ct : 0;
|
|
2112
|
+
function i(a, f) {
|
|
2113
|
+
if (v) {
|
|
2114
|
+
const u = dn(e) === lt;
|
|
2115
|
+
if (a === u) {
|
|
2116
|
+
var l = rt();
|
|
2117
|
+
O(l), r.anchor = l, B(!1), r.ensure(a, f), B(!0);
|
|
2118
|
+
return;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
r.ensure(a, f);
|
|
2122
|
+
}
|
|
2123
|
+
Wt(() => {
|
|
2124
|
+
var a = !1;
|
|
2125
|
+
t((f, l = !0) => {
|
|
2126
|
+
a = !0, i(l, f);
|
|
2127
|
+
}), a || i(!1, null);
|
|
2128
|
+
}, s);
|
|
2129
|
+
}
|
|
2130
|
+
function ni(e, t) {
|
|
2131
|
+
return t;
|
|
2132
|
+
}
|
|
2133
|
+
function ws(e, t, n) {
|
|
2134
|
+
for (var r = e.items, s = [], i = t.length, a = 0; a < i; a++)
|
|
2135
|
+
Gt(t[a].e, s, !0);
|
|
2136
|
+
var f = i > 0 && s.length === 0 && n !== null;
|
|
2137
|
+
if (f) {
|
|
2138
|
+
var l = (
|
|
2139
|
+
/** @type {Element} */
|
|
2140
|
+
/** @type {Element} */
|
|
2141
|
+
n.parentNode
|
|
2142
|
+
);
|
|
2143
|
+
Yt(l), l.append(
|
|
2144
|
+
/** @type {Element} */
|
|
2145
|
+
n
|
|
2146
|
+
), r.clear(), Z(e, t[0].prev, t[i - 1].next);
|
|
2147
|
+
}
|
|
2148
|
+
qn(s, () => {
|
|
2149
|
+
for (var u = 0; u < i; u++) {
|
|
2150
|
+
var c = t[u];
|
|
2151
|
+
f || (r.delete(c.k), Z(e, c.prev, c.next)), L(c.e, !f);
|
|
2152
|
+
}
|
|
2153
|
+
});
|
|
2154
|
+
}
|
|
2155
|
+
function ri(e, t, n, r, s, i = null) {
|
|
2156
|
+
var a = e, f = { flags: t, items: /* @__PURE__ */ new Map(), first: null }, l = (t & fn) !== 0;
|
|
2157
|
+
if (l) {
|
|
2158
|
+
var u = (
|
|
2159
|
+
/** @type {Element} */
|
|
2160
|
+
e
|
|
2161
|
+
);
|
|
2162
|
+
a = v ? O(
|
|
2163
|
+
/** @type {Comment | Text} */
|
|
2164
|
+
/* @__PURE__ */ re(u)
|
|
2165
|
+
) : u.appendChild(G());
|
|
2166
|
+
}
|
|
2167
|
+
v && _t();
|
|
2168
|
+
var c = null, _ = !1, h = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ Ut(() => {
|
|
2169
|
+
var E = n();
|
|
2170
|
+
return ut(E) ? E : E == null ? [] : Ft(E);
|
|
2171
|
+
}), o, g;
|
|
2172
|
+
function b() {
|
|
2173
|
+
bs(
|
|
2174
|
+
g,
|
|
2175
|
+
o,
|
|
2176
|
+
f,
|
|
2177
|
+
h,
|
|
2178
|
+
a,
|
|
2179
|
+
s,
|
|
2180
|
+
t,
|
|
2181
|
+
r,
|
|
2182
|
+
n
|
|
2183
|
+
), i !== null && (o.length === 0 ? c ? Kt(c) : c = Y(() => i(a)) : c !== null && Ce(c, () => {
|
|
2184
|
+
c = null;
|
|
2185
|
+
}));
|
|
2186
|
+
}
|
|
2187
|
+
Wt(() => {
|
|
2188
|
+
g ??= /** @type {Effect} */
|
|
2189
|
+
m, o = /** @type {V[]} */
|
|
2190
|
+
M(d);
|
|
2191
|
+
var E = o.length;
|
|
2192
|
+
if (_ && E === 0)
|
|
2193
|
+
return;
|
|
2194
|
+
_ = E === 0;
|
|
2195
|
+
let T = !1;
|
|
2196
|
+
if (v) {
|
|
2197
|
+
var k = dn(a) === lt;
|
|
2198
|
+
k !== (E === 0) && (a = rt(), O(a), B(!1), T = !0);
|
|
2199
|
+
}
|
|
2200
|
+
if (v) {
|
|
2201
|
+
for (var q = null, x, p = 0; p < E; p++) {
|
|
2202
|
+
if (w.nodeType === De && /** @type {Comment} */
|
|
2203
|
+
w.data === Dt) {
|
|
2204
|
+
a = /** @type {Comment} */
|
|
2205
|
+
w, T = !0, B(!1);
|
|
2206
|
+
break;
|
|
2207
|
+
}
|
|
2208
|
+
var S = o[p], R = r(S, p);
|
|
2209
|
+
x = Pt(
|
|
2210
|
+
w,
|
|
2211
|
+
f,
|
|
2212
|
+
q,
|
|
2213
|
+
null,
|
|
2214
|
+
S,
|
|
2215
|
+
R,
|
|
2216
|
+
p,
|
|
2217
|
+
s,
|
|
2218
|
+
t,
|
|
2219
|
+
n
|
|
2220
|
+
), f.items.set(R, x), q = x;
|
|
2221
|
+
}
|
|
2222
|
+
E > 0 && O(rt());
|
|
2223
|
+
}
|
|
2224
|
+
if (v)
|
|
2225
|
+
E === 0 && i && (c = Y(() => i(a)));
|
|
2226
|
+
else if (Rn()) {
|
|
2227
|
+
var qe = /* @__PURE__ */ new Set(), Je = (
|
|
2228
|
+
/** @type {Batch} */
|
|
2229
|
+
y
|
|
2230
|
+
);
|
|
2231
|
+
for (p = 0; p < E; p += 1) {
|
|
2232
|
+
S = o[p], R = r(S, p);
|
|
2233
|
+
var pe = f.items.get(R) ?? h.get(R);
|
|
2234
|
+
pe ? (t & (at | ft)) !== 0 && Zn(pe, S, p, t) : (x = Pt(
|
|
2235
|
+
null,
|
|
2236
|
+
f,
|
|
2237
|
+
null,
|
|
2238
|
+
null,
|
|
2239
|
+
S,
|
|
2240
|
+
R,
|
|
2241
|
+
p,
|
|
2242
|
+
s,
|
|
2243
|
+
t,
|
|
2244
|
+
n,
|
|
2245
|
+
!0
|
|
2246
|
+
), h.set(R, x)), qe.add(R);
|
|
2247
|
+
}
|
|
2248
|
+
for (const [X, Xe] of f.items)
|
|
2249
|
+
qe.has(X) || Je.skipped_effects.add(Xe.e);
|
|
2250
|
+
Je.add_callback(b);
|
|
2251
|
+
} else
|
|
2252
|
+
b();
|
|
2253
|
+
T && B(!0), M(d);
|
|
2254
|
+
}), v && (a = w);
|
|
2255
|
+
}
|
|
2256
|
+
function bs(e, t, n, r, s, i, a, f, l) {
|
|
2257
|
+
var u = (a & ir) !== 0, c = (a & (at | ft)) !== 0, _ = t.length, h = n.items, d = n.first, o = d, g, b = null, E, T = [], k = [], q, x, p, S;
|
|
2258
|
+
if (u)
|
|
2259
|
+
for (S = 0; S < _; S += 1)
|
|
2260
|
+
q = t[S], x = f(q, S), p = h.get(x), p !== void 0 && (p.a?.measure(), (E ??= /* @__PURE__ */ new Set()).add(p));
|
|
2261
|
+
for (S = 0; S < _; S += 1) {
|
|
2262
|
+
if (q = t[S], x = f(q, S), p = h.get(x), p === void 0) {
|
|
2263
|
+
var R = r.get(x);
|
|
2264
|
+
if (R !== void 0) {
|
|
2265
|
+
r.delete(x), h.set(x, R);
|
|
2266
|
+
var qe = b ? b.next : o;
|
|
2267
|
+
Z(n, b, R), Z(n, R, qe), Et(R, qe, s), b = R;
|
|
2268
|
+
} else {
|
|
2269
|
+
var Je = o ? (
|
|
2270
|
+
/** @type {TemplateNode} */
|
|
2271
|
+
o.e.nodes_start
|
|
2272
|
+
) : s;
|
|
2273
|
+
b = Pt(
|
|
2274
|
+
Je,
|
|
2275
|
+
n,
|
|
2276
|
+
b,
|
|
2277
|
+
b === null ? n.first : b.next,
|
|
2278
|
+
q,
|
|
2279
|
+
x,
|
|
2280
|
+
S,
|
|
2281
|
+
i,
|
|
2282
|
+
a,
|
|
2283
|
+
l
|
|
2284
|
+
);
|
|
2285
|
+
}
|
|
2286
|
+
h.set(x, b), T = [], k = [], o = b.next;
|
|
2287
|
+
continue;
|
|
2288
|
+
}
|
|
2289
|
+
if (c && Zn(p, q, S, a), (p.e.f & H) !== 0 && (Kt(p.e), u && (p.a?.unfix(), (E ??= /* @__PURE__ */ new Set()).delete(p))), p !== o) {
|
|
2290
|
+
if (g !== void 0 && g.has(p)) {
|
|
2291
|
+
if (T.length < k.length) {
|
|
2292
|
+
var pe = k[0], X;
|
|
2293
|
+
b = pe.prev;
|
|
2294
|
+
var Xe = T[0], bt = T[T.length - 1];
|
|
2295
|
+
for (X = 0; X < T.length; X += 1)
|
|
2296
|
+
Et(T[X], pe, s);
|
|
2297
|
+
for (X = 0; X < k.length; X += 1)
|
|
2298
|
+
g.delete(k[X]);
|
|
2299
|
+
Z(n, Xe.prev, bt.next), Z(n, b, Xe), Z(n, bt, pe), o = pe, b = bt, S -= 1, T = [], k = [];
|
|
2300
|
+
} else
|
|
2301
|
+
g.delete(p), Et(p, o, s), Z(n, p.prev, p.next), Z(n, p, b === null ? n.first : b.next), Z(n, b, p), b = p;
|
|
2302
|
+
continue;
|
|
2303
|
+
}
|
|
2304
|
+
for (T = [], k = []; o !== null && o.k !== x; )
|
|
2305
|
+
(o.e.f & H) === 0 && (g ??= /* @__PURE__ */ new Set()).add(o), k.push(o), o = o.next;
|
|
2306
|
+
if (o === null)
|
|
2307
|
+
continue;
|
|
2308
|
+
p = o;
|
|
2309
|
+
}
|
|
2310
|
+
T.push(p), b = p, o = p.next;
|
|
2311
|
+
}
|
|
2312
|
+
if (o !== null || g !== void 0) {
|
|
2313
|
+
for (var je = g === void 0 ? [] : Ft(g); o !== null; )
|
|
2314
|
+
(o.e.f & H) === 0 && je.push(o), o = o.next;
|
|
2315
|
+
var yt = je.length;
|
|
2316
|
+
if (yt > 0) {
|
|
2317
|
+
var rr = (a & fn) !== 0 && _ === 0 ? s : null;
|
|
2318
|
+
if (u) {
|
|
2319
|
+
for (S = 0; S < yt; S += 1)
|
|
2320
|
+
je[S].a?.measure();
|
|
2321
|
+
for (S = 0; S < yt; S += 1)
|
|
2322
|
+
je[S].a?.fix();
|
|
2323
|
+
}
|
|
2324
|
+
ws(n, je, rr);
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
u && de(() => {
|
|
2328
|
+
if (E !== void 0)
|
|
2329
|
+
for (p of E)
|
|
2330
|
+
p.a?.apply();
|
|
2331
|
+
}), e.first = n.first && n.first.e, e.last = b && b.e;
|
|
2332
|
+
for (var sr of r.values())
|
|
2333
|
+
L(sr.e);
|
|
2334
|
+
r.clear();
|
|
2335
|
+
}
|
|
2336
|
+
function Zn(e, t, n, r) {
|
|
2337
|
+
(r & at) !== 0 && Le(e.v, t), (r & ft) !== 0 ? Le(
|
|
2338
|
+
/** @type {Value<number>} */
|
|
2339
|
+
e.i,
|
|
2340
|
+
n
|
|
2341
|
+
) : e.i = n;
|
|
2342
|
+
}
|
|
2343
|
+
function Pt(e, t, n, r, s, i, a, f, l, u, c) {
|
|
2344
|
+
var _ = (l & at) !== 0, h = (l & ar) === 0, d = _ ? h ? /* @__PURE__ */ Tn(s, !1, !1) : ye(s) : s, o = (l & ft) === 0 ? a : ye(a), g = {
|
|
2345
|
+
i: o,
|
|
2346
|
+
v: d,
|
|
2347
|
+
k: i,
|
|
2348
|
+
a: null,
|
|
2349
|
+
// @ts-expect-error
|
|
2350
|
+
e: null,
|
|
2351
|
+
prev: n,
|
|
2352
|
+
next: r
|
|
2353
|
+
};
|
|
2354
|
+
try {
|
|
2355
|
+
if (e === null) {
|
|
2356
|
+
var b = document.createDocumentFragment();
|
|
2357
|
+
b.append(e = G());
|
|
2358
|
+
}
|
|
2359
|
+
return g.e = Y(() => f(
|
|
2360
|
+
/** @type {Node} */
|
|
2361
|
+
e,
|
|
2362
|
+
d,
|
|
2363
|
+
o,
|
|
2364
|
+
u
|
|
2365
|
+
), v), g.e.prev = n && n.e, g.e.next = r && r.e, n === null ? c || (t.first = g) : (n.next = g, n.e.next = g.e), r !== null && (r.prev = g, r.e.prev = g.e), g;
|
|
2366
|
+
} finally {
|
|
2367
|
+
}
|
|
2368
|
+
}
|
|
2369
|
+
function Et(e, t, n) {
|
|
2370
|
+
for (var r = e.next ? (
|
|
2371
|
+
/** @type {TemplateNode} */
|
|
2372
|
+
e.next.e.nodes_start
|
|
2373
|
+
) : n, s = t ? (
|
|
2374
|
+
/** @type {TemplateNode} */
|
|
2375
|
+
t.e.nodes_start
|
|
2376
|
+
) : n, i = (
|
|
2377
|
+
/** @type {TemplateNode} */
|
|
2378
|
+
e.e.nodes_start
|
|
2379
|
+
); i !== null && i !== r; ) {
|
|
2380
|
+
var a = (
|
|
2381
|
+
/** @type {TemplateNode} */
|
|
2382
|
+
/* @__PURE__ */ se(i)
|
|
2383
|
+
);
|
|
2384
|
+
s.before(i), i = a;
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
function Z(e, t, n) {
|
|
2388
|
+
t === null ? e.first = n : (t.next = n, t.e.next = n && n.e), n !== null && (n.prev = t, n.e.prev = t && t.e);
|
|
2389
|
+
}
|
|
2390
|
+
function si(e, t) {
|
|
2391
|
+
Mn(() => {
|
|
2392
|
+
var n = e.getRootNode(), r = (
|
|
2393
|
+
/** @type {ShadowRoot} */
|
|
2394
|
+
n.host ? (
|
|
2395
|
+
/** @type {ShadowRoot} */
|
|
2396
|
+
n
|
|
2397
|
+
) : (
|
|
2398
|
+
/** @type {Document} */
|
|
2399
|
+
n.head ?? /** @type {Document} */
|
|
2400
|
+
n.ownerDocument.head
|
|
2401
|
+
)
|
|
2402
|
+
);
|
|
2403
|
+
if (!r.querySelector("#" + t.hash)) {
|
|
2404
|
+
const s = document.createElement("style");
|
|
2405
|
+
s.id = t.hash, s.textContent = t.code, r.appendChild(s);
|
|
2406
|
+
}
|
|
2407
|
+
});
|
|
2408
|
+
}
|
|
2409
|
+
function Qn(e, t, n = !1) {
|
|
2410
|
+
if (e.multiple) {
|
|
2411
|
+
if (t == null)
|
|
2412
|
+
return;
|
|
2413
|
+
if (!ut(t))
|
|
2414
|
+
return Mr();
|
|
2415
|
+
for (var r of e.options)
|
|
2416
|
+
r.selected = t.includes(Ye(r));
|
|
2417
|
+
return;
|
|
2418
|
+
}
|
|
2419
|
+
for (r of e.options) {
|
|
2420
|
+
var s = Ye(r);
|
|
2421
|
+
if (xn(s, t)) {
|
|
2422
|
+
r.selected = !0;
|
|
2423
|
+
return;
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
(!n || t !== void 0) && (e.selectedIndex = -1);
|
|
2427
|
+
}
|
|
2428
|
+
function ys(e) {
|
|
2429
|
+
var t = new MutationObserver(() => {
|
|
2430
|
+
Qn(e, e.__value);
|
|
2431
|
+
});
|
|
2432
|
+
t.observe(e, {
|
|
2433
|
+
// Listen to option element changes
|
|
2434
|
+
childList: !0,
|
|
2435
|
+
subtree: !0,
|
|
2436
|
+
// because of <optgroup>
|
|
2437
|
+
// Listen to option element value attribute changes
|
|
2438
|
+
// (doesn't get notified of select value changes,
|
|
2439
|
+
// because that property is not reflected as an attribute)
|
|
2440
|
+
attributes: !0,
|
|
2441
|
+
attributeFilter: ["value"]
|
|
2442
|
+
}), gt(() => {
|
|
2443
|
+
t.disconnect();
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
function ii(e, t, n = t) {
|
|
2447
|
+
var r = /* @__PURE__ */ new WeakSet(), s = !0;
|
|
2448
|
+
ze(e, "change", (i) => {
|
|
2449
|
+
var a = i ? "[selected]" : ":checked", f;
|
|
2450
|
+
if (e.multiple)
|
|
2451
|
+
f = [].map.call(e.querySelectorAll(a), Ye);
|
|
2452
|
+
else {
|
|
2453
|
+
var l = e.querySelector(a) ?? // will fall back to first non-disabled option if no option is selected
|
|
2454
|
+
e.querySelector("option:not([disabled])");
|
|
2455
|
+
f = l && Ye(l);
|
|
2456
|
+
}
|
|
2457
|
+
n(f), y !== null && r.add(y);
|
|
2458
|
+
}), Mn(() => {
|
|
2459
|
+
var i = t();
|
|
2460
|
+
if (e === document.activeElement) {
|
|
2461
|
+
var a = (
|
|
2462
|
+
/** @type {Batch} */
|
|
2463
|
+
He ?? y
|
|
2464
|
+
);
|
|
2465
|
+
if (r.has(a))
|
|
2466
|
+
return;
|
|
2467
|
+
}
|
|
2468
|
+
if (Qn(e, i, s), s && i === void 0) {
|
|
2469
|
+
var f = e.querySelector(":checked");
|
|
2470
|
+
f !== null && (i = Ye(f), n(i));
|
|
2471
|
+
}
|
|
2472
|
+
e.__value = i, s = !1;
|
|
2473
|
+
}), ys(e);
|
|
2474
|
+
}
|
|
2475
|
+
function Ye(e) {
|
|
2476
|
+
return "__value" in e ? e.__value : e.value;
|
|
2477
|
+
}
|
|
2478
|
+
const Es = Symbol("is custom element"), Ss = Symbol("is html");
|
|
2479
|
+
function ai(e) {
|
|
2480
|
+
if (v) {
|
|
2481
|
+
var t = !1, n = () => {
|
|
2482
|
+
if (!t) {
|
|
2483
|
+
if (t = !0, e.hasAttribute("value")) {
|
|
2484
|
+
var r = e.value;
|
|
2485
|
+
Mt(e, "value", null), e.value = r;
|
|
2486
|
+
}
|
|
2487
|
+
if (e.hasAttribute("checked")) {
|
|
2488
|
+
var s = e.checked;
|
|
2489
|
+
Mt(e, "checked", null), e.checked = s;
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
};
|
|
2493
|
+
e.__on_r = n, de(n), In();
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
function fi(e, t) {
|
|
2497
|
+
var n = er(e);
|
|
2498
|
+
n.value === (n.value = // treat null and undefined the same for the initial value
|
|
2499
|
+
t ?? void 0) || // @ts-expect-error
|
|
2500
|
+
// `progress` elements always need their value set when it's `0`
|
|
2501
|
+
e.value === t && (t !== 0 || e.nodeName !== "PROGRESS") || (e.value = t ?? "");
|
|
2502
|
+
}
|
|
2503
|
+
function Mt(e, t, n, r) {
|
|
2504
|
+
var s = er(e);
|
|
2505
|
+
v && (s[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || s[t] !== (s[t] = n) && (t === "loading" && (e[yr] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && tr(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
2506
|
+
}
|
|
2507
|
+
function li(e, t, n) {
|
|
2508
|
+
var r = $, s = m;
|
|
2509
|
+
let i = v;
|
|
2510
|
+
v && B(!1), C(null), K(null);
|
|
2511
|
+
try {
|
|
2512
|
+
// `style` should use `set_attribute` rather than the setter
|
|
2513
|
+
t !== "style" && // Don't compute setters for custom elements while they aren't registered yet,
|
|
2514
|
+
// because during their upgrade/instantiation they might add more setters.
|
|
2515
|
+
// Instead, fall back to a simple "an object, then set as property" heuristic.
|
|
2516
|
+
(Lt.has(e.getAttribute("is") || e.nodeName) || // customElements may not be available in browser extension contexts
|
|
2517
|
+
!customElements || customElements.get(e.getAttribute("is") || e.tagName.toLowerCase()) ? tr(e).includes(t) : n && typeof n == "object") ? e[t] = n : Mt(e, t, n == null ? n : String(n));
|
|
2518
|
+
} finally {
|
|
2519
|
+
C(r), K(s), i && B(!0);
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
function er(e) {
|
|
2523
|
+
return (
|
|
2524
|
+
/** @type {Record<string | symbol, unknown>} **/
|
|
2525
|
+
// @ts-expect-error
|
|
2526
|
+
e.__attributes ??= {
|
|
2527
|
+
[Es]: e.nodeName.includes("-"),
|
|
2528
|
+
[Ss]: e.namespaceURI === _r
|
|
2529
|
+
}
|
|
2530
|
+
);
|
|
2531
|
+
}
|
|
2532
|
+
var Lt = /* @__PURE__ */ new Map();
|
|
2533
|
+
function tr(e) {
|
|
2534
|
+
var t = e.getAttribute("is") || e.nodeName, n = Lt.get(t);
|
|
2535
|
+
if (n) return n;
|
|
2536
|
+
Lt.set(t, n = []);
|
|
2537
|
+
for (var r, s = e, i = Element.prototype; i !== s; ) {
|
|
2538
|
+
r = pr(s);
|
|
2539
|
+
for (var a in r)
|
|
2540
|
+
r[a].set && n.push(a);
|
|
2541
|
+
s = on(s);
|
|
2542
|
+
}
|
|
2543
|
+
return n;
|
|
2544
|
+
}
|
|
2545
|
+
function ui(e, t, n = t) {
|
|
2546
|
+
var r = /* @__PURE__ */ new WeakSet();
|
|
2547
|
+
ze(e, "input", async (s) => {
|
|
2548
|
+
var i = s ? e.defaultValue : e.value;
|
|
2549
|
+
if (i = kt(e) ? Tt(i) : i, n(i), y !== null && r.add(y), await os(), i !== (i = t())) {
|
|
2550
|
+
var a = e.selectionStart, f = e.selectionEnd, l = e.value.length;
|
|
2551
|
+
if (e.value = i ?? "", f !== null) {
|
|
2552
|
+
var u = e.value.length;
|
|
2553
|
+
a === f && f === l && u > l ? (e.selectionStart = u, e.selectionEnd = u) : (e.selectionStart = a, e.selectionEnd = Math.min(f, u));
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
}), // If we are hydrating and the value has since changed,
|
|
2557
|
+
// then use the updated value from the input instead.
|
|
2558
|
+
(v && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
|
|
2559
|
+
// TODO Svelte 6: remove input.value check and set to empty string?
|
|
2560
|
+
wt(t) == null && e.value) && (n(kt(e) ? Tt(e.value) : e.value), y !== null && r.add(y)), Fe(() => {
|
|
2561
|
+
var s = t();
|
|
2562
|
+
if (e === document.activeElement) {
|
|
2563
|
+
var i = (
|
|
2564
|
+
/** @type {Batch} */
|
|
2565
|
+
He ?? y
|
|
2566
|
+
);
|
|
2567
|
+
if (r.has(i))
|
|
2568
|
+
return;
|
|
2569
|
+
}
|
|
2570
|
+
kt(e) && s === Tt(e.value) || e.type === "date" && !s && !e.value || s !== e.value && (e.value = s ?? "");
|
|
2571
|
+
});
|
|
2572
|
+
}
|
|
2573
|
+
const St = /* @__PURE__ */ new Set();
|
|
2574
|
+
function oi(e, t, n, r, s = r) {
|
|
2575
|
+
var i = n.getAttribute("type") === "checkbox", a = e;
|
|
2576
|
+
let f = !1;
|
|
2577
|
+
if (t !== null)
|
|
2578
|
+
for (var l of t)
|
|
2579
|
+
a = a[l] ??= [];
|
|
2580
|
+
a.push(n), ze(
|
|
2581
|
+
n,
|
|
2582
|
+
"change",
|
|
2583
|
+
() => {
|
|
2584
|
+
var u = n.__value;
|
|
2585
|
+
i && (u = an(a, u, n.checked)), s(u);
|
|
2586
|
+
},
|
|
2587
|
+
// TODO better default value handling
|
|
2588
|
+
() => s(i ? [] : null)
|
|
2589
|
+
), Fe(() => {
|
|
2590
|
+
var u = r();
|
|
2591
|
+
if (v && n.defaultChecked !== n.checked) {
|
|
2592
|
+
f = !0;
|
|
2593
|
+
return;
|
|
2594
|
+
}
|
|
2595
|
+
i ? (u = u || [], n.checked = u.includes(n.__value)) : n.checked = xn(n.__value, u);
|
|
2596
|
+
}), gt(() => {
|
|
2597
|
+
var u = a.indexOf(n);
|
|
2598
|
+
u !== -1 && a.splice(u, 1);
|
|
2599
|
+
}), St.has(a) || (St.add(a), de(() => {
|
|
2600
|
+
a.sort((u, c) => u.compareDocumentPosition(c) === 4 ? -1 : 1), St.delete(a);
|
|
2601
|
+
})), de(() => {
|
|
2602
|
+
if (f) {
|
|
2603
|
+
var u;
|
|
2604
|
+
if (i)
|
|
2605
|
+
u = an(a, u, n.checked);
|
|
2606
|
+
else {
|
|
2607
|
+
var c = a.find((_) => _.checked);
|
|
2608
|
+
u = c?.__value;
|
|
2609
|
+
}
|
|
2610
|
+
s(u);
|
|
2611
|
+
}
|
|
2612
|
+
});
|
|
2613
|
+
}
|
|
2614
|
+
function ci(e, t, n = t) {
|
|
2615
|
+
ze(e, "change", (r) => {
|
|
2616
|
+
var s = r ? e.defaultChecked : e.checked;
|
|
2617
|
+
n(s);
|
|
2618
|
+
}), // If we are hydrating and the value has since changed,
|
|
2619
|
+
// then use the update value from the input instead.
|
|
2620
|
+
(v && e.defaultChecked !== e.checked || // If defaultChecked is set, then checked == defaultChecked
|
|
2621
|
+
wt(t) == null) && n(e.checked), Fe(() => {
|
|
2622
|
+
var r = t();
|
|
2623
|
+
e.checked = !!r;
|
|
2624
|
+
});
|
|
2625
|
+
}
|
|
2626
|
+
function an(e, t, n) {
|
|
2627
|
+
for (var r = /* @__PURE__ */ new Set(), s = 0; s < e.length; s += 1)
|
|
2628
|
+
e[s].checked && r.add(e[s].__value);
|
|
2629
|
+
return n || r.delete(t), Array.from(r);
|
|
2630
|
+
}
|
|
2631
|
+
function kt(e) {
|
|
2632
|
+
var t = e.type;
|
|
2633
|
+
return t === "number" || t === "range";
|
|
2634
|
+
}
|
|
2635
|
+
function Tt(e) {
|
|
2636
|
+
return e === "" ? null : +e;
|
|
2637
|
+
}
|
|
2638
|
+
function hi(e, t, n = t) {
|
|
2639
|
+
ze(e, "change", () => {
|
|
2640
|
+
n(e.files);
|
|
2641
|
+
}), // If we are hydrating and the value has since changed,
|
|
2642
|
+
// then use the updated value from the input instead.
|
|
2643
|
+
v && e.files && n(e.files), Fe(() => {
|
|
2644
|
+
e.files = t();
|
|
2645
|
+
});
|
|
2646
|
+
}
|
|
2647
|
+
let Qe = !1;
|
|
2648
|
+
function ks(e) {
|
|
2649
|
+
var t = Qe;
|
|
2650
|
+
try {
|
|
2651
|
+
return Qe = !1, [e(), Qe];
|
|
2652
|
+
} finally {
|
|
2653
|
+
Qe = t;
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2656
|
+
function di(e, t, n, r) {
|
|
2657
|
+
var s = !Ge || (n & lr) !== 0, i = (n & or) !== 0, a = (n & cr) !== 0, f = (
|
|
2658
|
+
/** @type {V} */
|
|
2659
|
+
r
|
|
2660
|
+
), l = !0, u = () => (l && (l = !1, f = a ? wt(
|
|
2661
|
+
/** @type {() => V} */
|
|
2662
|
+
r
|
|
2663
|
+
) : (
|
|
2664
|
+
/** @type {V} */
|
|
2665
|
+
r
|
|
2666
|
+
)), f), c;
|
|
2667
|
+
if (i) {
|
|
2668
|
+
var _ = Ne in e || hn in e;
|
|
2669
|
+
c = ge(e, t)?.set ?? (_ && t in e ? (k) => e[t] = k : void 0);
|
|
2670
|
+
}
|
|
2671
|
+
var h, d = !1;
|
|
2672
|
+
i ? [h, d] = ks(() => (
|
|
2673
|
+
/** @type {V} */
|
|
2674
|
+
e[t]
|
|
2675
|
+
)) : h = /** @type {V} */
|
|
2676
|
+
e[t], h === void 0 && r !== void 0 && (h = u(), c && (s && Cr(), c(h)));
|
|
2677
|
+
var o;
|
|
2678
|
+
if (s ? o = () => {
|
|
2679
|
+
var k = (
|
|
2680
|
+
/** @type {V} */
|
|
2681
|
+
e[t]
|
|
2682
|
+
);
|
|
2683
|
+
return k === void 0 ? u() : (l = !0, k);
|
|
2684
|
+
} : o = () => {
|
|
2685
|
+
var k = (
|
|
2686
|
+
/** @type {V} */
|
|
2687
|
+
e[t]
|
|
2688
|
+
);
|
|
2689
|
+
return k !== void 0 && (f = /** @type {V} */
|
|
2690
|
+
void 0), k === void 0 ? f : k;
|
|
2691
|
+
}, s && (n & ur) === 0)
|
|
2692
|
+
return o;
|
|
2693
|
+
if (c) {
|
|
2694
|
+
var g = e.$$legacy;
|
|
2695
|
+
return (
|
|
2696
|
+
/** @type {() => V} */
|
|
2697
|
+
(function(k, q) {
|
|
2698
|
+
return arguments.length > 0 ? ((!s || !q || g || d) && c(q ? o() : k), k) : o();
|
|
2699
|
+
})
|
|
2700
|
+
);
|
|
2701
|
+
}
|
|
2702
|
+
var b = !1, E = ((n & fr) !== 0 ? pt : Ut)(() => (b = !1, o()));
|
|
2703
|
+
i && M(E);
|
|
2704
|
+
var T = (
|
|
2705
|
+
/** @type {Effect} */
|
|
2706
|
+
m
|
|
2707
|
+
);
|
|
2708
|
+
return (
|
|
2709
|
+
/** @type {() => V} */
|
|
2710
|
+
(function(k, q) {
|
|
2711
|
+
if (arguments.length > 0) {
|
|
2712
|
+
const x = q ? M(E) : s && i ? xe(k) : k;
|
|
2713
|
+
return Q(E, x), b = !0, f !== void 0 && (f = x), k;
|
|
2714
|
+
}
|
|
2715
|
+
return ke && b || (T.f & fe) !== 0 ? E.v : M(E);
|
|
2716
|
+
})
|
|
2717
|
+
);
|
|
2718
|
+
}
|
|
2719
|
+
function Ts(e) {
|
|
2720
|
+
return new As(e);
|
|
2721
|
+
}
|
|
2722
|
+
class As {
|
|
2723
|
+
/** @type {any} */
|
|
2724
|
+
#t;
|
|
2725
|
+
/** @type {Record<string, any>} */
|
|
2726
|
+
#e;
|
|
2727
|
+
/**
|
|
2728
|
+
* @param {ComponentConstructorOptions & {
|
|
2729
|
+
* component: any;
|
|
2730
|
+
* }} options
|
|
2731
|
+
*/
|
|
2732
|
+
constructor(t) {
|
|
2733
|
+
var n = /* @__PURE__ */ new Map(), r = (i, a) => {
|
|
2734
|
+
var f = /* @__PURE__ */ Tn(a, !1, !1);
|
|
2735
|
+
return n.set(i, f), f;
|
|
2736
|
+
};
|
|
2737
|
+
const s = new Proxy(
|
|
2738
|
+
{ ...t.props || {}, $$events: {} },
|
|
2739
|
+
{
|
|
2740
|
+
get(i, a) {
|
|
2741
|
+
return M(n.get(a) ?? r(a, Reflect.get(i, a)));
|
|
2742
|
+
},
|
|
2743
|
+
has(i, a) {
|
|
2744
|
+
return a === hn ? !0 : (M(n.get(a) ?? r(a, Reflect.get(i, a))), Reflect.has(i, a));
|
|
2745
|
+
},
|
|
2746
|
+
set(i, a, f) {
|
|
2747
|
+
return Q(n.get(a) ?? r(a, f), f), Reflect.set(i, a, f);
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
);
|
|
2751
|
+
this.#e = (t.hydrate ? ms : Jn)(t.component, {
|
|
2752
|
+
target: t.target,
|
|
2753
|
+
anchor: t.anchor,
|
|
2754
|
+
props: s,
|
|
2755
|
+
context: t.context,
|
|
2756
|
+
intro: t.intro ?? !1,
|
|
2757
|
+
recover: t.recover
|
|
2758
|
+
}), (!t?.props?.$$host || t.sync === !1) && wn(), this.#t = s.$$events;
|
|
2759
|
+
for (const i of Object.keys(this.#e))
|
|
2760
|
+
i === "$set" || i === "$destroy" || i === "$on" || Ie(this, i, {
|
|
2761
|
+
get() {
|
|
2762
|
+
return this.#e[i];
|
|
2763
|
+
},
|
|
2764
|
+
/** @param {any} value */
|
|
2765
|
+
set(a) {
|
|
2766
|
+
this.#e[i] = a;
|
|
2767
|
+
},
|
|
2768
|
+
enumerable: !0
|
|
2769
|
+
});
|
|
2770
|
+
this.#e.$set = /** @param {Record<string, any>} next */
|
|
2771
|
+
(i) => {
|
|
2772
|
+
Object.assign(s, i);
|
|
2773
|
+
}, this.#e.$destroy = () => {
|
|
2774
|
+
gs(this.#e);
|
|
2775
|
+
};
|
|
2776
|
+
}
|
|
2777
|
+
/** @param {Record<string, any>} props */
|
|
2778
|
+
$set(t) {
|
|
2779
|
+
this.#e.$set(t);
|
|
2780
|
+
}
|
|
2781
|
+
/**
|
|
2782
|
+
* @param {string} event
|
|
2783
|
+
* @param {(...args: any[]) => any} callback
|
|
2784
|
+
* @returns {any}
|
|
2785
|
+
*/
|
|
2786
|
+
$on(t, n) {
|
|
2787
|
+
this.#t[t] = this.#t[t] || [];
|
|
2788
|
+
const r = (...s) => n.call(this, ...s);
|
|
2789
|
+
return this.#t[t].push(r), () => {
|
|
2790
|
+
this.#t[t] = this.#t[t].filter(
|
|
2791
|
+
/** @param {any} fn */
|
|
2792
|
+
(s) => s !== r
|
|
2793
|
+
);
|
|
2794
|
+
};
|
|
2795
|
+
}
|
|
2796
|
+
$destroy() {
|
|
2797
|
+
this.#e.$destroy();
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
let nr;
|
|
2801
|
+
typeof HTMLElement == "function" && (nr = class extends HTMLElement {
|
|
2802
|
+
/** The Svelte component constructor */
|
|
2803
|
+
$$ctor;
|
|
2804
|
+
/** Slots */
|
|
2805
|
+
$$s;
|
|
2806
|
+
/** @type {any} The Svelte component instance */
|
|
2807
|
+
$$c;
|
|
2808
|
+
/** Whether or not the custom element is connected */
|
|
2809
|
+
$$cn = !1;
|
|
2810
|
+
/** @type {Record<string, any>} Component props data */
|
|
2811
|
+
$$d = {};
|
|
2812
|
+
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
2813
|
+
$$r = !1;
|
|
2814
|
+
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
2815
|
+
$$p_d = {};
|
|
2816
|
+
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
2817
|
+
$$l = {};
|
|
2818
|
+
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
2819
|
+
$$l_u = /* @__PURE__ */ new Map();
|
|
2820
|
+
/** @type {any} The managed render effect for reflecting attributes */
|
|
2821
|
+
$$me;
|
|
2822
|
+
/**
|
|
2823
|
+
* @param {*} $$componentCtor
|
|
2824
|
+
* @param {*} $$slots
|
|
2825
|
+
* @param {*} use_shadow_dom
|
|
2826
|
+
*/
|
|
2827
|
+
constructor(e, t, n) {
|
|
2828
|
+
super(), this.$$ctor = e, this.$$s = t, n && this.attachShadow({ mode: "open" });
|
|
2829
|
+
}
|
|
2830
|
+
/**
|
|
2831
|
+
* @param {string} type
|
|
2832
|
+
* @param {EventListenerOrEventListenerObject} listener
|
|
2833
|
+
* @param {boolean | AddEventListenerOptions} [options]
|
|
2834
|
+
*/
|
|
2835
|
+
addEventListener(e, t, n) {
|
|
2836
|
+
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
|
|
2837
|
+
const r = this.$$c.$on(e, t);
|
|
2838
|
+
this.$$l_u.set(t, r);
|
|
2839
|
+
}
|
|
2840
|
+
super.addEventListener(e, t, n);
|
|
2841
|
+
}
|
|
2842
|
+
/**
|
|
2843
|
+
* @param {string} type
|
|
2844
|
+
* @param {EventListenerOrEventListenerObject} listener
|
|
2845
|
+
* @param {boolean | AddEventListenerOptions} [options]
|
|
2846
|
+
*/
|
|
2847
|
+
removeEventListener(e, t, n) {
|
|
2848
|
+
if (super.removeEventListener(e, t, n), this.$$c) {
|
|
2849
|
+
const r = this.$$l_u.get(t);
|
|
2850
|
+
r && (r(), this.$$l_u.delete(t));
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
async connectedCallback() {
|
|
2854
|
+
if (this.$$cn = !0, !this.$$c) {
|
|
2855
|
+
let e = function(r) {
|
|
2856
|
+
return (s) => {
|
|
2857
|
+
const i = document.createElement("slot");
|
|
2858
|
+
r !== "default" && (i.name = r), _s(s, i);
|
|
2859
|
+
};
|
|
2860
|
+
};
|
|
2861
|
+
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2862
|
+
return;
|
|
2863
|
+
const t = {}, n = xs(this);
|
|
2864
|
+
for (const r of this.$$s)
|
|
2865
|
+
r in n && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), t.default = !0) : t[r] = e(r));
|
|
2866
|
+
for (const r of this.attributes) {
|
|
2867
|
+
const s = this.$$g_p(r.name);
|
|
2868
|
+
s in this.$$d || (this.$$d[s] = et(s, r.value, this.$$p_d, "toProp"));
|
|
2869
|
+
}
|
|
2870
|
+
for (const r in this.$$p_d)
|
|
2871
|
+
!(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
2872
|
+
this.$$c = Ts({
|
|
2873
|
+
component: this.$$ctor,
|
|
2874
|
+
target: this.shadowRoot || this,
|
|
2875
|
+
props: {
|
|
2876
|
+
...this.$$d,
|
|
2877
|
+
$$slots: t,
|
|
2878
|
+
$$host: this
|
|
2879
|
+
}
|
|
2880
|
+
}), this.$$me = rs(() => {
|
|
2881
|
+
Fe(() => {
|
|
2882
|
+
this.$$r = !0;
|
|
2883
|
+
for (const r of tt(this.$$c)) {
|
|
2884
|
+
if (!this.$$p_d[r]?.reflect) continue;
|
|
2885
|
+
this.$$d[r] = this.$$c[r];
|
|
2886
|
+
const s = et(
|
|
2887
|
+
r,
|
|
2888
|
+
this.$$d[r],
|
|
2889
|
+
this.$$p_d,
|
|
2890
|
+
"toAttribute"
|
|
2891
|
+
);
|
|
2892
|
+
s == null ? this.removeAttribute(this.$$p_d[r].attribute || r) : this.setAttribute(this.$$p_d[r].attribute || r, s);
|
|
2893
|
+
}
|
|
2894
|
+
this.$$r = !1;
|
|
2895
|
+
});
|
|
2896
|
+
});
|
|
2897
|
+
for (const r in this.$$l)
|
|
2898
|
+
for (const s of this.$$l[r]) {
|
|
2899
|
+
const i = this.$$c.$on(r, s);
|
|
2900
|
+
this.$$l_u.set(s, i);
|
|
2901
|
+
}
|
|
2902
|
+
this.$$l = {};
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2905
|
+
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
|
|
2906
|
+
// and setting attributes through setAttribute etc, this is helpful
|
|
2907
|
+
/**
|
|
2908
|
+
* @param {string} attr
|
|
2909
|
+
* @param {string} _oldValue
|
|
2910
|
+
* @param {string} newValue
|
|
2911
|
+
*/
|
|
2912
|
+
attributeChangedCallback(e, t, n) {
|
|
2913
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = et(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
2914
|
+
}
|
|
2915
|
+
disconnectedCallback() {
|
|
2916
|
+
this.$$cn = !1, Promise.resolve().then(() => {
|
|
2917
|
+
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
|
|
2918
|
+
});
|
|
2919
|
+
}
|
|
2920
|
+
/**
|
|
2921
|
+
* @param {string} attribute_name
|
|
2922
|
+
*/
|
|
2923
|
+
$$g_p(e) {
|
|
2924
|
+
return tt(this.$$p_d).find(
|
|
2925
|
+
(t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
|
|
2926
|
+
) || e;
|
|
2927
|
+
}
|
|
2928
|
+
});
|
|
2929
|
+
function et(e, t, n, r) {
|
|
2930
|
+
const s = n[e]?.type;
|
|
2931
|
+
if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
|
|
2932
|
+
return t;
|
|
2933
|
+
if (r === "toAttribute")
|
|
2934
|
+
switch (s) {
|
|
2935
|
+
case "Object":
|
|
2936
|
+
case "Array":
|
|
2937
|
+
return t == null ? null : JSON.stringify(t);
|
|
2938
|
+
case "Boolean":
|
|
2939
|
+
return t ? "" : null;
|
|
2940
|
+
case "Number":
|
|
2941
|
+
return t ?? null;
|
|
2942
|
+
default:
|
|
2943
|
+
return t;
|
|
2944
|
+
}
|
|
2945
|
+
else
|
|
2946
|
+
switch (s) {
|
|
2947
|
+
case "Object":
|
|
2948
|
+
case "Array":
|
|
2949
|
+
return t && JSON.parse(t);
|
|
2950
|
+
case "Boolean":
|
|
2951
|
+
return t;
|
|
2952
|
+
// conversion already handled above
|
|
2953
|
+
case "Number":
|
|
2954
|
+
return t != null ? +t : t;
|
|
2955
|
+
default:
|
|
2956
|
+
return t;
|
|
2957
|
+
}
|
|
2958
|
+
}
|
|
2959
|
+
function xs(e) {
|
|
2960
|
+
const t = {};
|
|
2961
|
+
return e.childNodes.forEach((n) => {
|
|
2962
|
+
t[
|
|
2963
|
+
/** @type {Element} node */
|
|
2964
|
+
n.slot || "default"
|
|
2965
|
+
] = !0;
|
|
2966
|
+
}), t;
|
|
2967
|
+
}
|
|
2968
|
+
function _i(e, t, n, r, s, i) {
|
|
2969
|
+
let a = class extends nr {
|
|
2970
|
+
constructor() {
|
|
2971
|
+
super(e, n, s), this.$$p_d = t;
|
|
2972
|
+
}
|
|
2973
|
+
static get observedAttributes() {
|
|
2974
|
+
return tt(t).map(
|
|
2975
|
+
(f) => (t[f].attribute || f).toLowerCase()
|
|
2976
|
+
);
|
|
2977
|
+
}
|
|
2978
|
+
};
|
|
2979
|
+
return tt(t).forEach((f) => {
|
|
2980
|
+
Ie(a.prototype, f, {
|
|
2981
|
+
get() {
|
|
2982
|
+
return this.$$c && f in this.$$c ? this.$$c[f] : this.$$d[f];
|
|
2983
|
+
},
|
|
2984
|
+
set(l) {
|
|
2985
|
+
l = et(f, l, t), this.$$d[f] = l;
|
|
2986
|
+
var u = this.$$c;
|
|
2987
|
+
if (u) {
|
|
2988
|
+
var c = ge(u, f)?.get;
|
|
2989
|
+
c ? u[f] = l : u.$set({ [f]: l });
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2992
|
+
});
|
|
2993
|
+
}), r.forEach((f) => {
|
|
2994
|
+
Ie(a.prototype, f, {
|
|
2995
|
+
get() {
|
|
2996
|
+
return this.$$c?.[f];
|
|
2997
|
+
}
|
|
2998
|
+
});
|
|
2999
|
+
}), e.element = /** @type {any} */
|
|
3000
|
+
a, a;
|
|
3001
|
+
}
|
|
3002
|
+
export {
|
|
3003
|
+
Xs as $,
|
|
3004
|
+
dt as A,
|
|
3005
|
+
$s as B,
|
|
3006
|
+
De as C,
|
|
3007
|
+
Re as D,
|
|
3008
|
+
ct as E,
|
|
3009
|
+
ne as F,
|
|
3010
|
+
zn as G,
|
|
3011
|
+
lt as H,
|
|
3012
|
+
re as I,
|
|
3013
|
+
mt as J,
|
|
3014
|
+
Cs as K,
|
|
3015
|
+
Os as L,
|
|
3016
|
+
Mn as M,
|
|
3017
|
+
Fe as N,
|
|
3018
|
+
_i as O,
|
|
3019
|
+
di as P,
|
|
3020
|
+
Qs as Q,
|
|
3021
|
+
Hs as R,
|
|
3022
|
+
Ne as S,
|
|
3023
|
+
Ns as T,
|
|
3024
|
+
N as U,
|
|
3025
|
+
ti as V,
|
|
3026
|
+
_s as W,
|
|
3027
|
+
Br as X,
|
|
3028
|
+
jr as Y,
|
|
3029
|
+
M as Z,
|
|
3030
|
+
qs as _,
|
|
3031
|
+
Ge as a,
|
|
3032
|
+
Bs as a0,
|
|
3033
|
+
Ms as a1,
|
|
3034
|
+
Mt as a2,
|
|
3035
|
+
zs as a3,
|
|
3036
|
+
si as a4,
|
|
3037
|
+
Js as a5,
|
|
3038
|
+
Ks as a6,
|
|
3039
|
+
oe as a7,
|
|
3040
|
+
Q as a8,
|
|
3041
|
+
Us as a9,
|
|
3042
|
+
ei as aa,
|
|
3043
|
+
ri as ab,
|
|
3044
|
+
ni as ac,
|
|
3045
|
+
xe as ad,
|
|
3046
|
+
Ds as ae,
|
|
3047
|
+
Fs as af,
|
|
3048
|
+
ai as ag,
|
|
3049
|
+
Dr as ah,
|
|
3050
|
+
oi as ai,
|
|
3051
|
+
li as aj,
|
|
3052
|
+
Is as ak,
|
|
3053
|
+
Zs as al,
|
|
3054
|
+
ui as am,
|
|
3055
|
+
Ls as an,
|
|
3056
|
+
Qt as ao,
|
|
3057
|
+
Gs as ap,
|
|
3058
|
+
hi as aq,
|
|
3059
|
+
ci as ar,
|
|
3060
|
+
js as as,
|
|
3061
|
+
Vs as at,
|
|
3062
|
+
fi as au,
|
|
3063
|
+
ii as av,
|
|
3064
|
+
Wt as b,
|
|
3065
|
+
A as c,
|
|
3066
|
+
wt as d,
|
|
3067
|
+
_t as e,
|
|
3068
|
+
Rs as f,
|
|
3069
|
+
rt as g,
|
|
3070
|
+
v as h,
|
|
3071
|
+
Ke as i,
|
|
3072
|
+
B as j,
|
|
3073
|
+
Le as k,
|
|
3074
|
+
Er as l,
|
|
3075
|
+
ye as m,
|
|
3076
|
+
Tn as n,
|
|
3077
|
+
Xr as o,
|
|
3078
|
+
Ct as p,
|
|
3079
|
+
de as q,
|
|
3080
|
+
Ue as r,
|
|
3081
|
+
O as s,
|
|
3082
|
+
wn as t,
|
|
3083
|
+
Ys as u,
|
|
3084
|
+
Ws as v,
|
|
3085
|
+
m as w,
|
|
3086
|
+
fs as x,
|
|
3087
|
+
w as y,
|
|
3088
|
+
se as z
|
|
3089
|
+
};
|