motionrail 0.1.0 → 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.
@@ -0,0 +1,1755 @@
1
+ typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
2
+ let legacy_mode_flag = !1;
3
+ function enable_legacy_mode_flag() {
4
+ legacy_mode_flag = !0;
5
+ }
6
+ const HYDRATION_ERROR = {}, UNINITIALIZED = Symbol();
7
+ var is_array = Array.isArray, index_of = Array.prototype.indexOf;
8
+ Array.from, Object.keys;
9
+ var define_property = Object.defineProperty, get_descriptor = Object.getOwnPropertyDescriptor, get_descriptors = Object.getOwnPropertyDescriptors, object_prototype = Object.prototype, array_prototype = Array.prototype, get_prototype_of = Object.getPrototypeOf;
10
+ Object.isExtensible;
11
+ const noop = () => {};
12
+ function run(o) {
13
+ return o();
14
+ }
15
+ function run_all(o) {
16
+ for (var P = 0; P < o.length; P++) o[P]();
17
+ }
18
+ function deferred() {
19
+ var o, P;
20
+ return {
21
+ promise: new Promise((F, I) => {
22
+ o = F, P = I;
23
+ }),
24
+ resolve: o,
25
+ reject: P
26
+ };
27
+ }
28
+ const CLEAN = 1024, DIRTY = 2048, MAYBE_DIRTY = 4096, INERT = 8192, EFFECT_TRANSPARENT = 65536, EFFECT_PRESERVED = 1 << 19, USER_EFFECT = 1 << 20, WAS_MARKED = 32768, REACTION_IS_UPDATING = 1 << 21, ERROR_VALUE = 1 << 23, STATE_SYMBOL = Symbol("$state"), LEGACY_PROPS = Symbol("legacy props"), LOADING_ATTR_SYMBOL = Symbol(""), STALE_REACTION = new class extends Error {
29
+ name = "StaleReactionError";
30
+ message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
31
+ }();
32
+ function async_derived_orphan() {
33
+ throw Error("https://svelte.dev/e/async_derived_orphan");
34
+ }
35
+ function effect_in_teardown(o) {
36
+ throw Error("https://svelte.dev/e/effect_in_teardown");
37
+ }
38
+ function effect_in_unowned_derived() {
39
+ throw Error("https://svelte.dev/e/effect_in_unowned_derived");
40
+ }
41
+ function effect_orphan(o) {
42
+ throw Error("https://svelte.dev/e/effect_orphan");
43
+ }
44
+ function effect_update_depth_exceeded() {
45
+ throw Error("https://svelte.dev/e/effect_update_depth_exceeded");
46
+ }
47
+ function props_invalid_value(o) {
48
+ throw Error("https://svelte.dev/e/props_invalid_value");
49
+ }
50
+ function state_descriptors_fixed() {
51
+ throw Error("https://svelte.dev/e/state_descriptors_fixed");
52
+ }
53
+ function state_prototype_fixed() {
54
+ throw Error("https://svelte.dev/e/state_prototype_fixed");
55
+ }
56
+ function state_unsafe_mutation() {
57
+ throw Error("https://svelte.dev/e/state_unsafe_mutation");
58
+ }
59
+ function hydration_mismatch(o) {
60
+ console.warn("https://svelte.dev/e/hydration_mismatch");
61
+ }
62
+ function select_multiple_invalid_value() {
63
+ console.warn("https://svelte.dev/e/select_multiple_invalid_value");
64
+ }
65
+ let hydrating = !1;
66
+ function set_hydrating(o) {
67
+ hydrating = o;
68
+ }
69
+ let hydrate_node;
70
+ function set_hydrate_node(o) {
71
+ if (o === null) throw hydration_mismatch(), HYDRATION_ERROR;
72
+ return hydrate_node = o;
73
+ }
74
+ function hydrate_next() {
75
+ return set_hydrate_node(/* @__PURE__ */ get_next_sibling(hydrate_node));
76
+ }
77
+ function reset(o) {
78
+ if (hydrating) {
79
+ if (/* @__PURE__ */ get_next_sibling(hydrate_node) !== null) throw hydration_mismatch(), HYDRATION_ERROR;
80
+ hydrate_node = o;
81
+ }
82
+ }
83
+ function equals(o) {
84
+ return o === this.v;
85
+ }
86
+ function safe_not_equal(o, P) {
87
+ return o == o ? o !== P || typeof o == "object" && !!o || typeof o == "function" : P == P;
88
+ }
89
+ function safe_equals(o) {
90
+ return !safe_not_equal(o, this.v);
91
+ }
92
+ let component_context = null;
93
+ function set_component_context(o) {
94
+ component_context = o;
95
+ }
96
+ function push(P, F = !1, I) {
97
+ component_context = {
98
+ p: component_context,
99
+ i: !1,
100
+ c: null,
101
+ e: null,
102
+ s: P,
103
+ x: null,
104
+ l: legacy_mode_flag && !F ? {
105
+ s: null,
106
+ u: null,
107
+ $: []
108
+ } : null
109
+ };
110
+ }
111
+ function pop(o) {
112
+ var P = component_context, F = P.e;
113
+ if (F !== null) {
114
+ P.e = null;
115
+ for (var I of F) create_user_effect(I);
116
+ }
117
+ return o !== void 0 && (P.x = o), P.i = !0, component_context = P.p, o ?? {};
118
+ }
119
+ function is_runes() {
120
+ return !legacy_mode_flag || component_context !== null && component_context.l === null;
121
+ }
122
+ var micro_tasks = [];
123
+ function run_micro_tasks() {
124
+ var o = micro_tasks;
125
+ micro_tasks = [], run_all(o);
126
+ }
127
+ function queue_micro_task(o) {
128
+ if (micro_tasks.length === 0 && !is_flushing_sync) {
129
+ var P = micro_tasks;
130
+ queueMicrotask(() => {
131
+ P === micro_tasks && run_micro_tasks();
132
+ });
133
+ }
134
+ micro_tasks.push(o);
135
+ }
136
+ function handle_error(o) {
137
+ var P = active_effect;
138
+ if (P === null) return active_reaction.f |= ERROR_VALUE, o;
139
+ if (P.f & 32768) invoke_error_boundary(o, P);
140
+ else {
141
+ if (!(P.f & 128)) throw o;
142
+ P.b.error(o);
143
+ }
144
+ }
145
+ function invoke_error_boundary(o, P) {
146
+ for (; P !== null;) {
147
+ if (P.f & 128) try {
148
+ P.b.error(o);
149
+ return;
150
+ } catch (P) {
151
+ o = P;
152
+ }
153
+ P = P.parent;
154
+ }
155
+ throw o;
156
+ }
157
+ var STATUS_MASK = ~(MAYBE_DIRTY | 3072);
158
+ function set_signal_status(o, P) {
159
+ o.f = o.f & STATUS_MASK | P;
160
+ }
161
+ function update_derived_status(o) {
162
+ o.f & 512 || o.deps === null ? set_signal_status(o, CLEAN) : set_signal_status(o, MAYBE_DIRTY);
163
+ }
164
+ function clear_marked(o) {
165
+ if (o !== null) for (let P of o) !(P.f & 2) || !(P.f & 32768) || (P.f ^= WAS_MARKED, clear_marked(P.deps));
166
+ }
167
+ function defer_effect(o, P, F) {
168
+ o.f & 2048 ? P.add(o) : o.f & 4096 && F.add(o), clear_marked(o.deps), set_signal_status(o, CLEAN);
169
+ }
170
+ var batches = /* @__PURE__ */ new Set();
171
+ let current_batch = null, batch_values = null;
172
+ var queued_root_effects = [], last_scheduled_effect = null, is_flushing = !1;
173
+ let is_flushing_sync = !1;
174
+ var Batch = class o {
175
+ committed = !1;
176
+ current = /* @__PURE__ */ new Map();
177
+ previous = /* @__PURE__ */ new Map();
178
+ #e = /* @__PURE__ */ new Set();
179
+ #t = /* @__PURE__ */ new Set();
180
+ #n = 0;
181
+ #r = 0;
182
+ #i = null;
183
+ #a = /* @__PURE__ */ new Set();
184
+ #o = /* @__PURE__ */ new Set();
185
+ skipped_effects = /* @__PURE__ */ new Set();
186
+ is_fork = !1;
187
+ is_deferred() {
188
+ return this.is_fork || this.#r > 0;
189
+ }
190
+ process(o) {
191
+ queued_root_effects = [], this.apply();
192
+ var P = [], F = [];
193
+ for (let I of o) this.#s(I, P, F);
194
+ this.is_fork || this.#l(), this.is_deferred() ? (this.#c(F), this.#c(P)) : (current_batch = null, flush_queued_effects(F), flush_queued_effects(P), this.#i?.resolve()), batch_values = null;
195
+ }
196
+ #s(o, P, F) {
197
+ o.f ^= CLEAN;
198
+ for (var I = o.first, L = null; I !== null;) {
199
+ var R = I.f, z = (R & 96) != 0;
200
+ if (!(z && R & 1024 || R & 8192 || this.skipped_effects.has(I)) && I.fn !== null) {
201
+ z ? I.f ^= CLEAN : L !== null && R & 16777228 ? L.b.defer_effect(I) : R & 4 ? P.push(I) : is_dirty(I) && (R & 16 && this.#a.add(I), update_effect(I));
202
+ var B = I.first;
203
+ if (B !== null) {
204
+ I = B;
205
+ continue;
206
+ }
207
+ }
208
+ var V = I.parent;
209
+ for (I = I.next; I === null && V !== null;) V === L && (L = null), I = V.next, V = V.parent;
210
+ }
211
+ }
212
+ #c(o) {
213
+ for (var P = 0; P < o.length; P += 1) defer_effect(o[P], this.#a, this.#o);
214
+ }
215
+ capture(o, P) {
216
+ P !== UNINITIALIZED && !this.previous.has(o) && this.previous.set(o, P), o.f & 8388608 || (this.current.set(o, o.v), batch_values?.set(o, o.v));
217
+ }
218
+ activate() {
219
+ current_batch = this, this.apply();
220
+ }
221
+ deactivate() {
222
+ current_batch === this && (current_batch = null, batch_values = null);
223
+ }
224
+ flush() {
225
+ if (this.activate(), queued_root_effects.length > 0) {
226
+ if (flush_effects(), current_batch !== null && current_batch !== this) return;
227
+ } else this.#n === 0 && this.process([]);
228
+ this.deactivate();
229
+ }
230
+ discard() {
231
+ for (let o of this.#t) o(this);
232
+ this.#t.clear();
233
+ }
234
+ #l() {
235
+ if (this.#r === 0) {
236
+ for (let o of this.#e) o();
237
+ this.#e.clear();
238
+ }
239
+ this.#n === 0 && this.#u();
240
+ }
241
+ #u() {
242
+ if (batches.size > 1) {
243
+ this.previous.clear();
244
+ var o = batch_values, P = !0;
245
+ for (let o of batches) {
246
+ if (o === this) {
247
+ P = !1;
248
+ continue;
249
+ }
250
+ let I = [];
251
+ for (let [F, L] of this.current) {
252
+ if (o.current.has(F)) if (P && L !== o.current.get(F)) o.current.set(F, L);
253
+ else continue;
254
+ I.push(F);
255
+ }
256
+ if (I.length === 0) continue;
257
+ let L = [...o.current.keys()].filter((o) => !this.current.has(o));
258
+ if (L.length > 0) {
259
+ var F = queued_root_effects;
260
+ queued_root_effects = [];
261
+ let P = /* @__PURE__ */ new Set(), R = /* @__PURE__ */ new Map();
262
+ for (let o of I) mark_effects(o, L, P, R);
263
+ if (queued_root_effects.length > 0) {
264
+ current_batch = o, o.apply();
265
+ for (let P of queued_root_effects) o.#s(P, [], []);
266
+ o.deactivate();
267
+ }
268
+ queued_root_effects = F;
269
+ }
270
+ }
271
+ current_batch = null, batch_values = o;
272
+ }
273
+ this.committed = !0, batches.delete(this);
274
+ }
275
+ increment(o) {
276
+ this.#n += 1, o && (this.#r += 1);
277
+ }
278
+ decrement(o) {
279
+ --this.#n, o && --this.#r, this.revive();
280
+ }
281
+ revive() {
282
+ for (let o of this.#a) this.#o.delete(o), set_signal_status(o, DIRTY), schedule_effect(o);
283
+ for (let o of this.#o) set_signal_status(o, MAYBE_DIRTY), schedule_effect(o);
284
+ this.flush();
285
+ }
286
+ oncommit(o) {
287
+ this.#e.add(o);
288
+ }
289
+ ondiscard(o) {
290
+ this.#t.add(o);
291
+ }
292
+ settled() {
293
+ return (this.#i ??= deferred()).promise;
294
+ }
295
+ static ensure() {
296
+ if (current_batch === null) {
297
+ let P = current_batch = new o();
298
+ batches.add(current_batch), o.enqueue(() => {
299
+ current_batch === P && P.flush();
300
+ });
301
+ }
302
+ return current_batch;
303
+ }
304
+ static enqueue(o) {
305
+ queue_micro_task(o);
306
+ }
307
+ apply() {}
308
+ };
309
+ function flush_effects() {
310
+ var o = is_updating_effect;
311
+ is_flushing = !0;
312
+ try {
313
+ var P = 0;
314
+ for (set_is_updating_effect(!0); queued_root_effects.length > 0;) {
315
+ var F = Batch.ensure();
316
+ P++ > 1e3 && infinite_loop_guard(), F.process(queued_root_effects), old_values.clear();
317
+ }
318
+ } finally {
319
+ is_flushing = !1, set_is_updating_effect(o), last_scheduled_effect = null;
320
+ }
321
+ }
322
+ function infinite_loop_guard() {
323
+ try {
324
+ effect_update_depth_exceeded();
325
+ } catch (o) {
326
+ invoke_error_boundary(o, last_scheduled_effect);
327
+ }
328
+ }
329
+ let eager_block_effects = null;
330
+ function flush_queued_effects(o) {
331
+ var P = o.length;
332
+ if (P !== 0) {
333
+ for (var F = 0; F < P;) {
334
+ var I = o[F++];
335
+ if (!(I.f & 24576) && is_dirty(I) && (eager_block_effects = /* @__PURE__ */ new Set(), update_effect(I), I.deps === null && I.first === null && I.nodes === null && (I.teardown === null && I.ac === null ? unlink_effect(I) : I.fn = null), eager_block_effects?.size > 0)) {
336
+ old_values.clear();
337
+ for (let o of eager_block_effects) {
338
+ if (o.f & 24576) continue;
339
+ let P = [o], F = o.parent;
340
+ for (; F !== null;) eager_block_effects.has(F) && (eager_block_effects.delete(F), P.push(F)), F = F.parent;
341
+ for (let o = P.length - 1; o >= 0; o--) {
342
+ let F = P[o];
343
+ F.f & 24576 || update_effect(F);
344
+ }
345
+ }
346
+ eager_block_effects.clear();
347
+ }
348
+ }
349
+ eager_block_effects = null;
350
+ }
351
+ }
352
+ function mark_effects(o, P, F, I) {
353
+ if (!F.has(o) && (F.add(o), o.reactions !== null)) for (let L of o.reactions) {
354
+ let o = L.f;
355
+ o & 2 ? mark_effects(L, P, F, I) : o & 4194320 && !(o & 2048) && depends_on(L, P, I) && (set_signal_status(L, DIRTY), schedule_effect(L));
356
+ }
357
+ }
358
+ function depends_on(o, P, F) {
359
+ let I = F.get(o);
360
+ if (I !== void 0) return I;
361
+ if (o.deps !== null) for (let I of o.deps) {
362
+ if (P.includes(I)) return !0;
363
+ if (I.f & 2 && depends_on(I, P, F)) return F.set(I, !0), !0;
364
+ }
365
+ return F.set(o, !1), !1;
366
+ }
367
+ function schedule_effect(o) {
368
+ for (var P = last_scheduled_effect = o; P.parent !== null;) {
369
+ P = P.parent;
370
+ var F = P.f;
371
+ if (is_flushing && P === active_effect && F & 16 && !(F & 262144)) return;
372
+ if (F & 96) {
373
+ if (!(F & 1024)) return;
374
+ P.f ^= CLEAN;
375
+ }
376
+ }
377
+ queued_root_effects.push(P);
378
+ }
379
+ EFFECT_PRESERVED | 65664;
380
+ function flatten(o, P, F, I) {
381
+ let L = is_runes() ? derived : derived_safe_equal;
382
+ if (F.length === 0 && o.length === 0) {
383
+ I(P.map(L));
384
+ return;
385
+ }
386
+ var R = current_batch, z = active_effect, B = capture();
387
+ function V() {
388
+ Promise.all(F.map((o) => /* @__PURE__ */ async_derived(o))).then((o) => {
389
+ B();
390
+ try {
391
+ I([...P.map(L), ...o]);
392
+ } catch (o) {
393
+ z.f & 16384 || invoke_error_boundary(o, z);
394
+ }
395
+ R?.deactivate(), unset_context();
396
+ }).catch((o) => {
397
+ invoke_error_boundary(o, z);
398
+ });
399
+ }
400
+ o.length > 0 ? Promise.all(o).then(() => {
401
+ B();
402
+ try {
403
+ return V();
404
+ } finally {
405
+ R?.deactivate(), unset_context();
406
+ }
407
+ }) : V();
408
+ }
409
+ function capture() {
410
+ var o = active_effect, P = active_reaction, F = component_context, I = current_batch;
411
+ return function(L = !0) {
412
+ set_active_effect(o), set_active_reaction(P), set_component_context(F), L && I?.activate();
413
+ };
414
+ }
415
+ function unset_context() {
416
+ set_active_effect(null), set_active_reaction(null), set_component_context(null);
417
+ }
418
+ /* @__NO_SIDE_EFFECTS__ */
419
+ function derived(o) {
420
+ var P = 2 | DIRTY, F = active_reaction !== null && active_reaction.f & 2 ? active_reaction : null;
421
+ return active_effect !== null && (active_effect.f |= EFFECT_PRESERVED), {
422
+ ctx: component_context,
423
+ deps: null,
424
+ effects: null,
425
+ equals,
426
+ f: P,
427
+ fn: o,
428
+ reactions: null,
429
+ rv: 0,
430
+ v: UNINITIALIZED,
431
+ wv: 0,
432
+ parent: F ?? active_effect,
433
+ ac: null
434
+ };
435
+ }
436
+ /* @__NO_SIDE_EFFECTS__ */
437
+ function async_derived(o, P, F) {
438
+ let L = active_effect;
439
+ L === null && async_derived_orphan();
440
+ var R = L.b, z = void 0, B = source(UNINITIALIZED), V = !active_reaction, H = /* @__PURE__ */ new Map();
441
+ return async_effect(() => {
442
+ var P = deferred();
443
+ z = P.promise;
444
+ try {
445
+ Promise.resolve(o()).then(P.resolve, P.reject).then(() => {
446
+ F === current_batch && F.committed && F.deactivate(), unset_context();
447
+ });
448
+ } catch (o) {
449
+ P.reject(o), unset_context();
450
+ }
451
+ var F = current_batch;
452
+ if (V) {
453
+ var I = R.is_rendered();
454
+ R.update_pending_count(1), F.increment(I), H.get(F)?.reject(STALE_REACTION), H.delete(F), H.set(F, P);
455
+ }
456
+ let L = (o, P = void 0) => {
457
+ if (F.activate(), P) P !== STALE_REACTION && (B.f |= ERROR_VALUE, internal_set(B, P));
458
+ else {
459
+ B.f & 8388608 && (B.f ^= ERROR_VALUE), internal_set(B, o);
460
+ for (let [o, P] of H) {
461
+ if (H.delete(o), o === F) break;
462
+ P.reject(STALE_REACTION);
463
+ }
464
+ }
465
+ V && (R.update_pending_count(-1), F.decrement(I));
466
+ };
467
+ P.promise.then(L, (o) => L(null, o || "unknown"));
468
+ }), teardown(() => {
469
+ for (let o of H.values()) o.reject(STALE_REACTION);
470
+ }), new Promise((o) => {
471
+ function P(F) {
472
+ function I() {
473
+ F === z ? o(B) : P(z);
474
+ }
475
+ F.then(I, I);
476
+ }
477
+ P(z);
478
+ });
479
+ }
480
+ /* @__NO_SIDE_EFFECTS__ */
481
+ function derived_safe_equal(o) {
482
+ let P = /* @__PURE__ */ derived(o);
483
+ return P.equals = safe_equals, P;
484
+ }
485
+ function destroy_derived_effects(o) {
486
+ var P = o.effects;
487
+ if (P !== null) {
488
+ o.effects = null;
489
+ for (var F = 0; F < P.length; F += 1) destroy_effect(P[F]);
490
+ }
491
+ }
492
+ function get_derived_parent_effect(o) {
493
+ for (var P = o.parent; P !== null;) {
494
+ if (!(P.f & 2)) return P.f & 16384 ? null : P;
495
+ P = P.parent;
496
+ }
497
+ return null;
498
+ }
499
+ function execute_derived(o) {
500
+ var P, F = active_effect;
501
+ set_active_effect(get_derived_parent_effect(o));
502
+ try {
503
+ o.f &= ~WAS_MARKED, destroy_derived_effects(o), P = update_reaction(o);
504
+ } finally {
505
+ set_active_effect(F);
506
+ }
507
+ return P;
508
+ }
509
+ function update_derived(o) {
510
+ var P = execute_derived(o);
511
+ if (!o.equals(P) && (o.wv = increment_write_version(), (!current_batch?.is_fork || o.deps === null) && (o.v = P, o.deps === null))) {
512
+ set_signal_status(o, CLEAN);
513
+ return;
514
+ }
515
+ is_destroying_effect || (batch_values === null ? update_derived_status(o) : (effect_tracking() || current_batch?.is_fork) && batch_values.set(o, P));
516
+ }
517
+ let eager_effects = /* @__PURE__ */ new Set();
518
+ const old_values = /* @__PURE__ */ new Map();
519
+ var eager_effects_deferred = !1;
520
+ function source(o, P) {
521
+ return {
522
+ f: 0,
523
+ v: o,
524
+ reactions: null,
525
+ equals,
526
+ rv: 0,
527
+ wv: 0
528
+ };
529
+ }
530
+ /* @__NO_SIDE_EFFECTS__ */
531
+ function state(o, P) {
532
+ let F = source(o, P);
533
+ return push_reaction_value(F), F;
534
+ }
535
+ /* @__NO_SIDE_EFFECTS__ */
536
+ function mutable_source(P, F = !1, I = !0) {
537
+ let L = source(P);
538
+ return F || (L.equals = safe_equals), legacy_mode_flag && I && component_context !== null && component_context.l !== null && (component_context.l.s ??= []).push(L), L;
539
+ }
540
+ function set(o, P, F = !1) {
541
+ return active_reaction !== null && (!untracking || active_reaction.f & 131072) && is_runes() && active_reaction.f & 4325394 && !current_sources?.includes(o) && state_unsafe_mutation(), internal_set(o, F ? proxy(P) : P);
542
+ }
543
+ function internal_set(o, P) {
544
+ if (!o.equals(P)) {
545
+ var F = o.v;
546
+ is_destroying_effect ? old_values.set(o, P) : old_values.set(o, F), o.v = P;
547
+ var I = Batch.ensure();
548
+ if (I.capture(o, F), o.f & 2) {
549
+ let P = o;
550
+ o.f & 2048 && execute_derived(P), update_derived_status(P);
551
+ }
552
+ o.wv = increment_write_version(), mark_reactions(o, DIRTY), is_runes() && active_effect !== null && active_effect.f & 1024 && !(active_effect.f & 96) && (untracked_writes === null ? set_untracked_writes([o]) : untracked_writes.push(o)), !I.is_fork && eager_effects.size > 0 && !eager_effects_deferred && flush_eager_effects();
553
+ }
554
+ return P;
555
+ }
556
+ function flush_eager_effects() {
557
+ eager_effects_deferred = !1;
558
+ var o = is_updating_effect;
559
+ set_is_updating_effect(!0);
560
+ let P = Array.from(eager_effects);
561
+ try {
562
+ for (let o of P) o.f & 1024 && set_signal_status(o, MAYBE_DIRTY), is_dirty(o) && update_effect(o);
563
+ } finally {
564
+ set_is_updating_effect(o);
565
+ }
566
+ eager_effects.clear();
567
+ }
568
+ function update(o, P = 1) {
569
+ var F = get(o), I = P === 1 ? F++ : F--;
570
+ return set(o, F), I;
571
+ }
572
+ function increment(o) {
573
+ set(o, o.v + 1);
574
+ }
575
+ function mark_reactions(o, P) {
576
+ var F = o.reactions;
577
+ if (F !== null) for (var I = is_runes(), L = F.length, R = 0; R < L; R++) {
578
+ var z = F[R], B = z.f;
579
+ if (!(!I && z === active_effect)) {
580
+ var V = (B & DIRTY) === 0;
581
+ if (V && set_signal_status(z, P), B & 2) {
582
+ var H = z;
583
+ batch_values?.delete(H), B & 32768 || (B & 512 && (z.f |= WAS_MARKED), mark_reactions(H, MAYBE_DIRTY));
584
+ } else V && (B & 16 && eager_block_effects !== null && eager_block_effects.add(z), schedule_effect(z));
585
+ }
586
+ }
587
+ }
588
+ function proxy(o) {
589
+ if (typeof o != "object" || !o || STATE_SYMBOL in o) return o;
590
+ let P = get_prototype_of(o);
591
+ if (P !== object_prototype && P !== array_prototype) return o;
592
+ var F = /* @__PURE__ */ new Map(), R = is_array(o), z = /* @__PURE__ */ state(0), V = null, G = update_version, K = (o) => {
593
+ if (update_version === G) return o();
594
+ var P = active_reaction, F = update_version;
595
+ set_active_reaction(null), set_update_version(G);
596
+ var I = o();
597
+ return set_active_reaction(P), set_update_version(F), I;
598
+ };
599
+ return R && F.set("length", /* @__PURE__ */ state(o.length, V)), new Proxy(o, {
600
+ defineProperty(o, P, I) {
601
+ (!("value" in I) || I.configurable === !1 || I.enumerable === !1 || I.writable === !1) && state_descriptors_fixed();
602
+ var L = F.get(P);
603
+ return L === void 0 ? L = K(() => {
604
+ var o = /* @__PURE__ */ state(I.value, V);
605
+ return F.set(P, o), o;
606
+ }) : set(L, I.value, !0), !0;
607
+ },
608
+ deleteProperty(o, P) {
609
+ var L = F.get(P);
610
+ if (L === void 0) {
611
+ if (P in o) {
612
+ let o = K(() => /* @__PURE__ */ state(UNINITIALIZED, V));
613
+ F.set(P, o), increment(z);
614
+ }
615
+ } else set(L, UNINITIALIZED), increment(z);
616
+ return !0;
617
+ },
618
+ get(P, L, R) {
619
+ if (L === STATE_SYMBOL) return o;
620
+ var z = F.get(L), H = L in P;
621
+ if (z === void 0 && (!H || get_descriptor(P, L)?.writable) && (z = K(() => /* @__PURE__ */ state(proxy(H ? P[L] : UNINITIALIZED), V)), F.set(L, z)), z !== void 0) {
622
+ var U = get(z);
623
+ return U === UNINITIALIZED ? void 0 : U;
624
+ }
625
+ return Reflect.get(P, L, R);
626
+ },
627
+ getOwnPropertyDescriptor(o, P) {
628
+ var L = Reflect.getOwnPropertyDescriptor(o, P);
629
+ if (L && "value" in L) {
630
+ var R = F.get(P);
631
+ R && (L.value = get(R));
632
+ } else if (L === void 0) {
633
+ var z = F.get(P), B = z?.v;
634
+ if (z !== void 0 && B !== UNINITIALIZED) return {
635
+ enumerable: !0,
636
+ configurable: !0,
637
+ value: B,
638
+ writable: !0
639
+ };
640
+ }
641
+ return L;
642
+ },
643
+ has(o, P) {
644
+ if (P === STATE_SYMBOL) return !0;
645
+ var L = F.get(P), R = L !== void 0 && L.v !== UNINITIALIZED || Reflect.has(o, P);
646
+ return (L !== void 0 || active_effect !== null && (!R || get_descriptor(o, P)?.writable)) && (L === void 0 && (L = K(() => /* @__PURE__ */ state(R ? proxy(o[P]) : UNINITIALIZED, V)), F.set(P, L)), get(L) === UNINITIALIZED) ? !1 : R;
647
+ },
648
+ set(o, P, L, H) {
649
+ var U = F.get(P), W = P in o;
650
+ if (R && P === "length") for (var G = L; G < U.v; G += 1) {
651
+ var q = F.get(G + "");
652
+ q === void 0 ? G in o && (q = K(() => /* @__PURE__ */ state(UNINITIALIZED, V)), F.set(G + "", q)) : set(q, UNINITIALIZED);
653
+ }
654
+ if (U === void 0) (!W || get_descriptor(o, P)?.writable) && (U = K(() => /* @__PURE__ */ state(void 0, V)), set(U, proxy(L)), F.set(P, U));
655
+ else {
656
+ W = U.v !== UNINITIALIZED;
657
+ var J = K(() => proxy(L));
658
+ set(U, J);
659
+ }
660
+ var Y = Reflect.getOwnPropertyDescriptor(o, P);
661
+ if (Y?.set && Y.set.call(H, L), !W) {
662
+ if (R && typeof P == "string") {
663
+ var X = F.get("length"), Z = Number(P);
664
+ Number.isInteger(Z) && Z >= X.v && set(X, Z + 1);
665
+ }
666
+ increment(z);
667
+ }
668
+ return !0;
669
+ },
670
+ ownKeys(o) {
671
+ get(z);
672
+ var P = Reflect.ownKeys(o).filter((o) => {
673
+ var P = F.get(o);
674
+ return P === void 0 || P.v !== UNINITIALIZED;
675
+ });
676
+ for (var [L, R] of F) R.v !== UNINITIALIZED && !(L in o) && P.push(L);
677
+ return P;
678
+ },
679
+ setPrototypeOf() {
680
+ state_prototype_fixed();
681
+ }
682
+ });
683
+ }
684
+ function get_proxied_value(o) {
685
+ try {
686
+ if (typeof o == "object" && o && STATE_SYMBOL in o) return o[STATE_SYMBOL];
687
+ } catch {}
688
+ return o;
689
+ }
690
+ function is(o, P) {
691
+ return Object.is(get_proxied_value(o), get_proxied_value(P));
692
+ }
693
+ var is_firefox, first_child_getter, next_sibling_getter;
694
+ function create_text(o = "") {
695
+ return document.createTextNode(o);
696
+ }
697
+ /* @__NO_SIDE_EFFECTS__ */
698
+ function get_first_child(o) {
699
+ return first_child_getter.call(o);
700
+ }
701
+ /* @__NO_SIDE_EFFECTS__ */
702
+ function get_next_sibling(o) {
703
+ return next_sibling_getter.call(o);
704
+ }
705
+ function child(o, P) {
706
+ if (!hydrating) return /* @__PURE__ */ get_first_child(o);
707
+ var F = /* @__PURE__ */ get_first_child(hydrate_node);
708
+ if (F === null) F = hydrate_node.appendChild(create_text());
709
+ else if (P && F.nodeType !== 3) {
710
+ var I = create_text();
711
+ return F?.before(I), set_hydrate_node(I), I;
712
+ }
713
+ return set_hydrate_node(F), F;
714
+ }
715
+ function should_defer_append() {
716
+ return !1;
717
+ }
718
+ function autofocus(o, P) {
719
+ if (P) {
720
+ let P = document.body;
721
+ o.autofocus = !0, queue_micro_task(() => {
722
+ document.activeElement === P && o.focus();
723
+ });
724
+ }
725
+ }
726
+ var listening_to_form_reset = !1;
727
+ function add_form_reset_listener() {
728
+ listening_to_form_reset || (listening_to_form_reset = !0, document.addEventListener("reset", (o) => {
729
+ Promise.resolve().then(() => {
730
+ if (!o.defaultPrevented) for (let P of o.target.elements) P.__on_r?.();
731
+ });
732
+ }, { capture: !0 }));
733
+ }
734
+ function without_reactive_context(o) {
735
+ var P = active_reaction, F = active_effect;
736
+ set_active_reaction(null), set_active_effect(null);
737
+ try {
738
+ return o();
739
+ } finally {
740
+ set_active_reaction(P), set_active_effect(F);
741
+ }
742
+ }
743
+ function validate_effect(o) {
744
+ active_effect === null && (active_reaction === null && effect_orphan(o), effect_in_unowned_derived()), is_destroying_effect && effect_in_teardown(o);
745
+ }
746
+ function push_effect(o, P) {
747
+ var F = P.last;
748
+ F === null ? P.last = P.first = o : (F.next = o, o.prev = F, P.last = o);
749
+ }
750
+ function create_effect(o, P, F) {
751
+ var I = active_effect;
752
+ I !== null && I.f & 8192 && (o |= INERT);
753
+ var L = {
754
+ ctx: component_context,
755
+ deps: null,
756
+ nodes: null,
757
+ f: o | 2560,
758
+ first: null,
759
+ fn: P,
760
+ last: null,
761
+ next: null,
762
+ parent: I,
763
+ b: I && I.b,
764
+ prev: null,
765
+ teardown: null,
766
+ wv: 0,
767
+ ac: null
768
+ };
769
+ if (F) try {
770
+ update_effect(L), L.f |= 32768;
771
+ } catch (o) {
772
+ throw destroy_effect(L), o;
773
+ }
774
+ else P !== null && schedule_effect(L);
775
+ var R = L;
776
+ if (F && R.deps === null && R.teardown === null && R.nodes === null && R.first === R.last && !(R.f & 524288) && (R = R.first, o & 16 && o & 65536 && R !== null && (R.f |= EFFECT_TRANSPARENT)), R !== null && (R.parent = I, I !== null && push_effect(R, I), active_reaction !== null && active_reaction.f & 2 && !(o & 64))) {
777
+ var z = active_reaction;
778
+ (z.effects ??= []).push(R);
779
+ }
780
+ return L;
781
+ }
782
+ function effect_tracking() {
783
+ return active_reaction !== null && !untracking;
784
+ }
785
+ function teardown(o) {
786
+ let P = create_effect(8, null, !1);
787
+ return set_signal_status(P, CLEAN), P.teardown = o, P;
788
+ }
789
+ function user_effect(o) {
790
+ validate_effect("$effect");
791
+ var P = active_effect.f;
792
+ if (!active_reaction && P & 32 && !(P & 32768)) {
793
+ var F = component_context;
794
+ (F.e ??= []).push(o);
795
+ } else return create_user_effect(o);
796
+ }
797
+ function create_user_effect(o) {
798
+ return create_effect(4 | USER_EFFECT, o, !1);
799
+ }
800
+ function user_pre_effect(o) {
801
+ return validate_effect("$effect.pre"), create_effect(8 | USER_EFFECT, o, !0);
802
+ }
803
+ function effect(o) {
804
+ return create_effect(4, o, !1);
805
+ }
806
+ function legacy_pre_effect(o, P) {
807
+ var F = component_context, I = {
808
+ effect: null,
809
+ ran: !1,
810
+ deps: o
811
+ };
812
+ F.l.$.push(I), I.effect = render_effect(() => {
813
+ o(), !I.ran && (I.ran = !0, untrack(P));
814
+ });
815
+ }
816
+ function legacy_pre_effect_reset() {
817
+ var o = component_context;
818
+ render_effect(() => {
819
+ for (var P of o.l.$) {
820
+ P.deps();
821
+ var F = P.effect;
822
+ F.f & 1024 && F.deps !== null && set_signal_status(F, MAYBE_DIRTY), is_dirty(F) && update_effect(F), P.ran = !1;
823
+ }
824
+ });
825
+ }
826
+ function async_effect(o) {
827
+ return create_effect(4194304 | EFFECT_PRESERVED, o, !0);
828
+ }
829
+ function render_effect(o, P = 0) {
830
+ return create_effect(8 | P, o, !0);
831
+ }
832
+ function block(o, P = 0) {
833
+ return create_effect(16 | P, o, !0);
834
+ }
835
+ function managed(o, P = 0) {
836
+ return create_effect(16777216 | P, o, !0);
837
+ }
838
+ function branch(o) {
839
+ return create_effect(32 | EFFECT_PRESERVED, o, !0);
840
+ }
841
+ function execute_effect_teardown(o) {
842
+ var P = o.teardown;
843
+ if (P !== null) {
844
+ let o = is_destroying_effect, F = active_reaction;
845
+ set_is_destroying_effect(!0), set_active_reaction(null);
846
+ try {
847
+ P.call(null);
848
+ } finally {
849
+ set_is_destroying_effect(o), set_active_reaction(F);
850
+ }
851
+ }
852
+ }
853
+ function destroy_effect_children(o, P = !1) {
854
+ var F = o.first;
855
+ for (o.first = o.last = null; F !== null;) {
856
+ let o = F.ac;
857
+ o !== null && without_reactive_context(() => {
858
+ o.abort(STALE_REACTION);
859
+ });
860
+ var I = F.next;
861
+ F.f & 64 ? F.parent = null : destroy_effect(F, P), F = I;
862
+ }
863
+ }
864
+ function destroy_block_effect_children(o) {
865
+ for (var P = o.first; P !== null;) {
866
+ var F = P.next;
867
+ P.f & 32 || destroy_effect(P), P = F;
868
+ }
869
+ }
870
+ function destroy_effect(o, P = !0) {
871
+ var F = !1;
872
+ (P || o.f & 262144) && o.nodes !== null && o.nodes.end !== null && (remove_effect_dom(o.nodes.start, o.nodes.end), F = !0), destroy_effect_children(o, P && !F), remove_reactions(o, 0), set_signal_status(o, 16384);
873
+ var I = o.nodes && o.nodes.t;
874
+ if (I !== null) for (let o of I) o.stop();
875
+ execute_effect_teardown(o);
876
+ var L = o.parent;
877
+ L !== null && L.first !== null && unlink_effect(o), o.next = o.prev = o.teardown = o.ctx = o.deps = o.fn = o.nodes = o.ac = null;
878
+ }
879
+ function remove_effect_dom(o, P) {
880
+ for (; o !== null;) {
881
+ var F = o === P ? null : /* @__PURE__ */ get_next_sibling(o);
882
+ o.remove(), o = F;
883
+ }
884
+ }
885
+ function unlink_effect(o) {
886
+ var P = o.parent, F = o.prev, I = o.next;
887
+ F !== null && (F.next = I), I !== null && (I.prev = F), P !== null && (P.first === o && (P.first = I), P.last === o && (P.last = F));
888
+ }
889
+ function pause_effect(o, P, F = !0) {
890
+ var I = [];
891
+ pause_children(o, I, !0);
892
+ var L = () => {
893
+ F && destroy_effect(o), P && P();
894
+ }, R = I.length;
895
+ if (R > 0) {
896
+ var z = () => --R || L();
897
+ for (var B of I) B.out(z);
898
+ } else L();
899
+ }
900
+ function pause_children(o, P, F) {
901
+ if (!(o.f & 8192)) {
902
+ o.f ^= INERT;
903
+ var I = o.nodes && o.nodes.t;
904
+ if (I !== null) for (let o of I) (o.is_global || F) && P.push(o);
905
+ for (var L = o.first; L !== null;) {
906
+ var R = L.next, z = (L.f & 65536) != 0 || (L.f & 32) != 0 && (o.f & 16) != 0;
907
+ pause_children(L, P, z ? F : !1), L = R;
908
+ }
909
+ }
910
+ }
911
+ function resume_effect(o) {
912
+ resume_children(o, !0);
913
+ }
914
+ function resume_children(o, P) {
915
+ if (o.f & 8192) {
916
+ o.f ^= INERT, o.f & 1024 || (set_signal_status(o, DIRTY), schedule_effect(o));
917
+ for (var F = o.first; F !== null;) {
918
+ var I = F.next, L = (F.f & 65536) != 0 || (F.f & 32) != 0;
919
+ resume_children(F, L ? P : !1), F = I;
920
+ }
921
+ var R = o.nodes && o.nodes.t;
922
+ if (R !== null) for (let o of R) (o.is_global || P) && o.in();
923
+ }
924
+ }
925
+ function move_effect(o, P) {
926
+ if (o.nodes) for (var F = o.nodes.start, I = o.nodes.end; F !== null;) {
927
+ var L = F === I ? null : /* @__PURE__ */ get_next_sibling(F);
928
+ P.append(F), F = L;
929
+ }
930
+ }
931
+ let is_updating_effect = !1;
932
+ function set_is_updating_effect(o) {
933
+ is_updating_effect = o;
934
+ }
935
+ let is_destroying_effect = !1;
936
+ function set_is_destroying_effect(o) {
937
+ is_destroying_effect = o;
938
+ }
939
+ let active_reaction = null, untracking = !1;
940
+ function set_active_reaction(o) {
941
+ active_reaction = o;
942
+ }
943
+ let active_effect = null;
944
+ function set_active_effect(o) {
945
+ active_effect = o;
946
+ }
947
+ let current_sources = null;
948
+ function push_reaction_value(o) {
949
+ active_reaction !== null && (current_sources === null ? current_sources = [o] : current_sources.push(o));
950
+ }
951
+ var new_deps = null, skipped_deps = 0;
952
+ let untracked_writes = null;
953
+ function set_untracked_writes(o) {
954
+ untracked_writes = o;
955
+ }
956
+ let write_version = 1;
957
+ var read_version = 0;
958
+ let update_version = read_version;
959
+ function set_update_version(o) {
960
+ update_version = o;
961
+ }
962
+ function increment_write_version() {
963
+ return ++write_version;
964
+ }
965
+ function is_dirty(o) {
966
+ var P = o.f;
967
+ if (P & 2048) return !0;
968
+ if (P & 2 && (o.f &= ~WAS_MARKED), P & 4096) {
969
+ for (var F = o.deps, I = F.length, L = 0; L < I; L++) {
970
+ var R = F[L];
971
+ if (is_dirty(R) && update_derived(R), R.wv > o.wv) return !0;
972
+ }
973
+ P & 512 && batch_values === null && set_signal_status(o, CLEAN);
974
+ }
975
+ return !1;
976
+ }
977
+ function schedule_possible_effect_self_invalidation(o, P, F = !0) {
978
+ var I = o.reactions;
979
+ if (I !== null && !current_sources?.includes(o)) for (var L = 0; L < I.length; L++) {
980
+ var R = I[L];
981
+ R.f & 2 ? schedule_possible_effect_self_invalidation(R, P, !1) : P === R && (F ? set_signal_status(R, DIRTY) : R.f & 1024 && set_signal_status(R, MAYBE_DIRTY), schedule_effect(R));
982
+ }
983
+ }
984
+ function update_reaction(o) {
985
+ var P = new_deps, F = skipped_deps, I = untracked_writes, L = active_reaction, R = current_sources, z = component_context, B = untracking, V = update_version, H = o.f;
986
+ new_deps = null, skipped_deps = 0, untracked_writes = null, active_reaction = H & 96 ? null : o, current_sources = null, set_component_context(o.ctx), untracking = !1, update_version = ++read_version, o.ac !== null && (without_reactive_context(() => {
987
+ o.ac.abort(STALE_REACTION);
988
+ }), o.ac = null);
989
+ try {
990
+ o.f |= REACTION_IS_UPDATING;
991
+ var U = o.fn, W = U(), G = o.deps;
992
+ if (new_deps !== null) {
993
+ var K;
994
+ if (remove_reactions(o, skipped_deps), G !== null && skipped_deps > 0) for (G.length = skipped_deps + new_deps.length, K = 0; K < new_deps.length; K++) G[skipped_deps + K] = new_deps[K];
995
+ else o.deps = G = new_deps;
996
+ if (effect_tracking() && o.f & 512) for (K = skipped_deps; K < G.length; K++) (G[K].reactions ??= []).push(o);
997
+ } else G !== null && skipped_deps < G.length && (remove_reactions(o, skipped_deps), G.length = skipped_deps);
998
+ if (is_runes() && untracked_writes !== null && !untracking && G !== null && !(o.f & 6146)) for (K = 0; K < untracked_writes.length; K++) schedule_possible_effect_self_invalidation(untracked_writes[K], o);
999
+ return L !== null && L !== o && (read_version++, untracked_writes !== null && (I === null ? I = untracked_writes : I.push(...untracked_writes))), o.f & 8388608 && (o.f ^= ERROR_VALUE), W;
1000
+ } catch (o) {
1001
+ return handle_error(o);
1002
+ } finally {
1003
+ o.f ^= REACTION_IS_UPDATING, new_deps = P, skipped_deps = F, untracked_writes = I, active_reaction = L, current_sources = R, set_component_context(z), untracking = B, update_version = V;
1004
+ }
1005
+ }
1006
+ function remove_reaction(o, P) {
1007
+ let F = P.reactions;
1008
+ if (F !== null) {
1009
+ var I = index_of.call(F, o);
1010
+ if (I !== -1) {
1011
+ var L = F.length - 1;
1012
+ L === 0 ? F = P.reactions = null : (F[I] = F[L], F.pop());
1013
+ }
1014
+ }
1015
+ if (F === null && P.f & 2 && (new_deps === null || !new_deps.includes(P))) {
1016
+ var z = P;
1017
+ z.f & 512 && (z.f ^= 512, z.f &= ~WAS_MARKED), update_derived_status(z), destroy_derived_effects(z), remove_reactions(z, 0);
1018
+ }
1019
+ }
1020
+ function remove_reactions(o, P) {
1021
+ var F = o.deps;
1022
+ if (F !== null) for (var I = P; I < F.length; I++) remove_reaction(o, F[I]);
1023
+ }
1024
+ function update_effect(o) {
1025
+ var P = o.f;
1026
+ if (!(P & 16384)) {
1027
+ set_signal_status(o, CLEAN);
1028
+ var F = active_effect, I = is_updating_effect;
1029
+ active_effect = o, is_updating_effect = !0;
1030
+ try {
1031
+ P & 16777232 ? destroy_block_effect_children(o) : destroy_effect_children(o), execute_effect_teardown(o);
1032
+ var L = update_reaction(o);
1033
+ o.teardown = typeof L == "function" ? L : null, o.wv = write_version;
1034
+ } finally {
1035
+ is_updating_effect = I, active_effect = F;
1036
+ }
1037
+ }
1038
+ }
1039
+ function get(o) {
1040
+ var P = (o.f & 2) != 0;
1041
+ if (null?.add(o), active_reaction !== null && !untracking && !(active_effect !== null && active_effect.f & 16384) && !current_sources?.includes(o)) {
1042
+ var F = active_reaction.deps;
1043
+ if (active_reaction.f & 2097152) o.rv < read_version && (o.rv = read_version, new_deps === null && F !== null && F[skipped_deps] === o ? skipped_deps++ : new_deps === null ? new_deps = [o] : new_deps.includes(o) || new_deps.push(o));
1044
+ else {
1045
+ (active_reaction.deps ??= []).push(o);
1046
+ var I = o.reactions;
1047
+ I === null ? o.reactions = [active_reaction] : I.includes(active_reaction) || I.push(active_reaction);
1048
+ }
1049
+ }
1050
+ if (is_destroying_effect && old_values.has(o)) return old_values.get(o);
1051
+ if (P) {
1052
+ var L = o;
1053
+ if (is_destroying_effect) {
1054
+ var R = L.v;
1055
+ return (!(L.f & 1024) && L.reactions !== null || depends_on_old_values(L)) && (R = execute_derived(L)), old_values.set(L, R), R;
1056
+ }
1057
+ var z = (L.f & 512) == 0 && !untracking && active_reaction !== null && (is_updating_effect || (active_reaction.f & 512) != 0), B = L.deps === null;
1058
+ is_dirty(L) && (z && (L.f |= 512), update_derived(L)), z && !B && reconnect(L);
1059
+ }
1060
+ if (batch_values?.has(o)) return batch_values.get(o);
1061
+ if (o.f & 8388608) throw o.v;
1062
+ return o.v;
1063
+ }
1064
+ function reconnect(o) {
1065
+ if (o.deps !== null) {
1066
+ o.f |= 512;
1067
+ for (let P of o.deps) (P.reactions ??= []).push(o), P.f & 2 && !(P.f & 512) && reconnect(P);
1068
+ }
1069
+ }
1070
+ function depends_on_old_values(o) {
1071
+ if (o.v === UNINITIALIZED) return !0;
1072
+ if (o.deps === null) return !1;
1073
+ for (let P of o.deps) if (old_values.has(P) || P.f & 2 && depends_on_old_values(P)) return !0;
1074
+ return !1;
1075
+ }
1076
+ function untrack(o) {
1077
+ var P = untracking;
1078
+ try {
1079
+ return untracking = !0, o();
1080
+ } finally {
1081
+ untracking = P;
1082
+ }
1083
+ }
1084
+ function deep_read_state(o) {
1085
+ if (!(typeof o != "object" || !o || o instanceof EventTarget)) {
1086
+ if (STATE_SYMBOL in o) deep_read(o);
1087
+ else if (!Array.isArray(o)) for (let P in o) {
1088
+ let F = o[P];
1089
+ typeof F == "object" && F && STATE_SYMBOL in F && deep_read(F);
1090
+ }
1091
+ }
1092
+ }
1093
+ function deep_read(o, P = /* @__PURE__ */ new Set()) {
1094
+ if (typeof o == "object" && o && !(o instanceof EventTarget) && !P.has(o)) {
1095
+ for (let F in P.add(o), o instanceof Date && o.getTime(), o) try {
1096
+ deep_read(o[F], P);
1097
+ } catch {}
1098
+ let F = get_prototype_of(o);
1099
+ if (F !== Object.prototype && F !== Array.prototype && F !== Map.prototype && F !== Set.prototype && F !== Date.prototype) {
1100
+ let P = get_descriptors(F);
1101
+ for (let F in P) {
1102
+ let I = P[F].get;
1103
+ if (I) try {
1104
+ I.call(o);
1105
+ } catch {}
1106
+ }
1107
+ }
1108
+ }
1109
+ }
1110
+ const all_registered_events = /* @__PURE__ */ new Set(), root_event_handles = /* @__PURE__ */ new Set();
1111
+ function create_event(o, P, F, I = {}) {
1112
+ function L(o) {
1113
+ if (I.capture || handle_event_propagation.call(P, o), !o.cancelBubble) return without_reactive_context(() => F?.call(this, o));
1114
+ }
1115
+ return o.startsWith("pointer") || o.startsWith("touch") || o === "wheel" ? queue_micro_task(() => {
1116
+ P.addEventListener(o, L, I);
1117
+ }) : P.addEventListener(o, L, I), L;
1118
+ }
1119
+ function delegate(o) {
1120
+ for (var P = 0; P < o.length; P++) all_registered_events.add(o[P]);
1121
+ for (var F of root_event_handles) F(o);
1122
+ }
1123
+ var last_propagated_event = null;
1124
+ function handle_event_propagation(o) {
1125
+ var P = this, F = P.ownerDocument, I = o.type, L = o.composedPath?.() || [], R = L[0] || o.target;
1126
+ last_propagated_event = o;
1127
+ var B = 0, V = last_propagated_event === o && o.__root;
1128
+ if (V) {
1129
+ var H = L.indexOf(V);
1130
+ if (H !== -1 && (P === document || P === window)) {
1131
+ o.__root = P;
1132
+ return;
1133
+ }
1134
+ var U = L.indexOf(P);
1135
+ if (U === -1) return;
1136
+ H <= U && (B = H);
1137
+ }
1138
+ if (R = L[B] || o.target, R !== P) {
1139
+ define_property(o, "currentTarget", {
1140
+ configurable: !0,
1141
+ get() {
1142
+ return R || F;
1143
+ }
1144
+ });
1145
+ var W = active_reaction, G = active_effect;
1146
+ set_active_reaction(null), set_active_effect(null);
1147
+ try {
1148
+ for (var K, q = []; R !== null;) {
1149
+ var J = R.assignedSlot || R.parentNode || R.host || null;
1150
+ try {
1151
+ var Y = R["__" + I];
1152
+ Y != null && (!R.disabled || o.target === R) && Y.call(R, o);
1153
+ } catch (o) {
1154
+ K ? q.push(o) : K = o;
1155
+ }
1156
+ if (o.cancelBubble || J === P || J === null) break;
1157
+ R = J;
1158
+ }
1159
+ if (K) {
1160
+ for (let o of q) queueMicrotask(() => {
1161
+ throw o;
1162
+ });
1163
+ throw K;
1164
+ }
1165
+ } finally {
1166
+ o.__root = P, delete o.currentTarget, set_active_reaction(W), set_active_effect(G);
1167
+ }
1168
+ }
1169
+ }
1170
+ function create_fragment_from_html(o) {
1171
+ var P = document.createElement("template");
1172
+ return P.innerHTML = o.replaceAll("<!>", "<!---->"), P.content;
1173
+ }
1174
+ function assign_nodes(o, P) {
1175
+ var F = active_effect;
1176
+ F.nodes === null && (F.nodes = {
1177
+ start: o,
1178
+ end: P,
1179
+ a: null,
1180
+ t: null
1181
+ });
1182
+ }
1183
+ /* @__NO_SIDE_EFFECTS__ */
1184
+ function from_html(o, P) {
1185
+ var F = (P & 1) != 0, I = (P & 2) != 0, L, R = !o.startsWith("<!>");
1186
+ return () => {
1187
+ if (hydrating) return assign_nodes(hydrate_node, null), hydrate_node;
1188
+ L === void 0 && (L = create_fragment_from_html(R ? o : "<!>" + o), F || (L = /* @__PURE__ */ get_first_child(L)));
1189
+ var P = I || is_firefox ? document.importNode(L, !0) : L.cloneNode(!0);
1190
+ if (F) {
1191
+ var z = /* @__PURE__ */ get_first_child(P), B = P.lastChild;
1192
+ assign_nodes(z, B);
1193
+ } else assign_nodes(P, P);
1194
+ return P;
1195
+ };
1196
+ }
1197
+ function append(o, P) {
1198
+ if (hydrating) {
1199
+ var F = active_effect;
1200
+ (!(F.f & 32768) || F.nodes.end === null) && (F.nodes.end = hydrate_node), hydrate_next();
1201
+ return;
1202
+ }
1203
+ o !== null && o.before(P);
1204
+ }
1205
+ function is_capture_event(o) {
1206
+ return o.endsWith("capture") && o !== "gotpointercapture" && o !== "lostpointercapture";
1207
+ }
1208
+ var DELEGATED_EVENTS = [
1209
+ "beforeinput",
1210
+ "click",
1211
+ "change",
1212
+ "dblclick",
1213
+ "contextmenu",
1214
+ "focusin",
1215
+ "focusout",
1216
+ "input",
1217
+ "keydown",
1218
+ "keyup",
1219
+ "mousedown",
1220
+ "mousemove",
1221
+ "mouseout",
1222
+ "mouseover",
1223
+ "mouseup",
1224
+ "pointerdown",
1225
+ "pointermove",
1226
+ "pointerout",
1227
+ "pointerover",
1228
+ "pointerup",
1229
+ "touchend",
1230
+ "touchmove",
1231
+ "touchstart"
1232
+ ];
1233
+ function can_delegate_event(o) {
1234
+ return DELEGATED_EVENTS.includes(o);
1235
+ }
1236
+ var DOM_BOOLEAN_ATTRIBUTES = /* @__PURE__ */ "allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback".split("."), ATTRIBUTE_ALIASES = {
1237
+ formnovalidate: "formNoValidate",
1238
+ ismap: "isMap",
1239
+ nomodule: "noModule",
1240
+ playsinline: "playsInline",
1241
+ readonly: "readOnly",
1242
+ defaultvalue: "defaultValue",
1243
+ defaultchecked: "defaultChecked",
1244
+ srcobject: "srcObject",
1245
+ novalidate: "noValidate",
1246
+ allowfullscreen: "allowFullscreen",
1247
+ disablepictureinpicture: "disablePictureInPicture",
1248
+ disableremoteplayback: "disableRemotePlayback"
1249
+ };
1250
+ function normalize_attribute(o) {
1251
+ return o = o.toLowerCase(), ATTRIBUTE_ALIASES[o] ?? o;
1252
+ }
1253
+ [...DOM_BOOLEAN_ATTRIBUTES];
1254
+ var BranchManager = class {
1255
+ anchor;
1256
+ #e = /* @__PURE__ */ new Map();
1257
+ #t = /* @__PURE__ */ new Map();
1258
+ #n = /* @__PURE__ */ new Map();
1259
+ #r = /* @__PURE__ */ new Set();
1260
+ #i = !0;
1261
+ constructor(o, P = !0) {
1262
+ this.anchor = o, this.#i = P;
1263
+ }
1264
+ #a = () => {
1265
+ var o = current_batch;
1266
+ if (this.#e.has(o)) {
1267
+ var P = this.#e.get(o), F = this.#t.get(P);
1268
+ if (F) resume_effect(F), this.#r.delete(P);
1269
+ else {
1270
+ var I = this.#n.get(P);
1271
+ I && (this.#t.set(P, I.effect), this.#n.delete(P), I.fragment.lastChild.remove(), this.anchor.before(I.fragment), F = I.effect);
1272
+ }
1273
+ for (let [P, F] of this.#e) {
1274
+ if (this.#e.delete(P), P === o) break;
1275
+ let I = this.#n.get(F);
1276
+ I && (destroy_effect(I.effect), this.#n.delete(F));
1277
+ }
1278
+ for (let [o, I] of this.#t) {
1279
+ if (o === P || this.#r.has(o)) continue;
1280
+ let L = () => {
1281
+ if (Array.from(this.#e.values()).includes(o)) {
1282
+ var P = document.createDocumentFragment();
1283
+ move_effect(I, P), P.append(create_text()), this.#n.set(o, {
1284
+ effect: I,
1285
+ fragment: P
1286
+ });
1287
+ } else destroy_effect(I);
1288
+ this.#r.delete(o), this.#t.delete(o);
1289
+ };
1290
+ this.#i || !F ? (this.#r.add(o), pause_effect(I, L, !1)) : L();
1291
+ }
1292
+ }
1293
+ };
1294
+ #o = (o) => {
1295
+ this.#e.delete(o);
1296
+ let P = Array.from(this.#e.values());
1297
+ for (let [o, F] of this.#n) P.includes(o) || (destroy_effect(F.effect), this.#n.delete(o));
1298
+ };
1299
+ ensure(o, P) {
1300
+ var F = current_batch, I = should_defer_append();
1301
+ if (P && !this.#t.has(o) && !this.#n.has(o)) if (I) {
1302
+ var L = document.createDocumentFragment(), R = create_text();
1303
+ L.append(R), this.#n.set(o, {
1304
+ effect: branch(() => P(R)),
1305
+ fragment: L
1306
+ });
1307
+ } else this.#t.set(o, branch(() => P(this.anchor)));
1308
+ if (this.#e.set(F, o), I) {
1309
+ for (let [P, I] of this.#t) P === o ? F.skipped_effects.delete(I) : F.skipped_effects.add(I);
1310
+ for (let [P, I] of this.#n) P === o ? F.skipped_effects.delete(I.effect) : F.skipped_effects.add(I.effect);
1311
+ F.oncommit(this.#a), F.ondiscard(this.#o);
1312
+ } else hydrating && (this.anchor = hydrate_node), this.#a();
1313
+ }
1314
+ };
1315
+ function snippet(o, P, ...F) {
1316
+ var I = new BranchManager(o);
1317
+ block(() => {
1318
+ let o = P() ?? null;
1319
+ I.ensure(o, o && ((P) => o(P, ...F)));
1320
+ }, EFFECT_TRANSPARENT);
1321
+ }
1322
+ function slot(o, P, F, I, L) {
1323
+ hydrating && hydrate_next();
1324
+ var R = P.$$slots?.[F], z = !1;
1325
+ R === !0 && (R = P[F === "default" ? "children" : F], z = !0), R === void 0 ? L !== null && L(o) : R(o, z ? () => I : I);
1326
+ }
1327
+ function attach(o, P) {
1328
+ var F = void 0, I;
1329
+ managed(() => {
1330
+ F !== (F = P()) && (I &&= (destroy_effect(I), null), F && (I = branch(() => {
1331
+ effect(() => F(o));
1332
+ })));
1333
+ });
1334
+ }
1335
+ function r(o) {
1336
+ var P, F, I = "";
1337
+ if (typeof o == "string" || typeof o == "number") I += o;
1338
+ else if (typeof o == "object") if (Array.isArray(o)) {
1339
+ var L = o.length;
1340
+ for (P = 0; P < L; P++) o[P] && (F = r(o[P])) && (I && (I += " "), I += F);
1341
+ } else for (F in o) o[F] && (I && (I += " "), I += F);
1342
+ return I;
1343
+ }
1344
+ function clsx$1() {
1345
+ for (var o, P, F = 0, I = "", L = arguments.length; F < L; F++) (o = arguments[F]) && (P = r(o)) && (I && (I += " "), I += P);
1346
+ return I;
1347
+ }
1348
+ function clsx(o) {
1349
+ return typeof o == "object" ? clsx$1(o) : o ?? "";
1350
+ }
1351
+ var whitespace = [..." \n\r\f\xA0\v"];
1352
+ function to_class(o, P, F) {
1353
+ var I = o == null ? "" : "" + o;
1354
+ if (P && (I = I ? I + " " + P : P), F) {
1355
+ for (var L in F) if (F[L]) I = I ? I + " " + L : L;
1356
+ else if (I.length) for (var R = L.length, z = 0; (z = I.indexOf(L, z)) >= 0;) {
1357
+ var B = z + R;
1358
+ (z === 0 || whitespace.includes(I[z - 1])) && (B === I.length || whitespace.includes(I[B])) ? I = (z === 0 ? "" : I.substring(0, z)) + I.substring(B + 1) : z = B;
1359
+ }
1360
+ }
1361
+ return I === "" ? null : I;
1362
+ }
1363
+ function append_styles(o, P = !1) {
1364
+ var F = P ? " !important;" : ";", I = "";
1365
+ for (var L in o) {
1366
+ var R = o[L];
1367
+ R != null && R !== "" && (I += " " + L + ": " + R + F);
1368
+ }
1369
+ return I;
1370
+ }
1371
+ function to_css_name(o) {
1372
+ return o[0] !== "-" || o[1] !== "-" ? o.toLowerCase() : o;
1373
+ }
1374
+ function to_style(o, P) {
1375
+ if (P) {
1376
+ var F = "", I, L;
1377
+ if (Array.isArray(P) ? (I = P[0], L = P[1]) : I = P, o) {
1378
+ o = String(o).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1379
+ var R = !1, z = 0, B = !1, V = [];
1380
+ I && V.push(...Object.keys(I).map(to_css_name)), L && V.push(...Object.keys(L).map(to_css_name));
1381
+ var H = 0, U = -1;
1382
+ let P = o.length;
1383
+ for (var W = 0; W < P; W++) {
1384
+ var G = o[W];
1385
+ if (B ? G === "/" && o[W - 1] === "*" && (B = !1) : R ? R === G && (R = !1) : G === "/" && o[W + 1] === "*" ? B = !0 : G === "\"" || G === "'" ? R = G : G === "(" ? z++ : G === ")" && z--, !B && R === !1 && z === 0) {
1386
+ if (G === ":" && U === -1) U = W;
1387
+ else if (G === ";" || W === P - 1) {
1388
+ if (U !== -1) {
1389
+ var K = to_css_name(o.substring(H, U).trim());
1390
+ if (!V.includes(K)) {
1391
+ G !== ";" && W++;
1392
+ var q = o.substring(H, W).trim();
1393
+ F += " " + q + ";";
1394
+ }
1395
+ }
1396
+ H = W + 1, U = -1;
1397
+ }
1398
+ }
1399
+ }
1400
+ }
1401
+ return I && (F += append_styles(I)), L && (F += append_styles(L, !0)), F = F.trim(), F === "" ? null : F;
1402
+ }
1403
+ return o == null ? null : String(o);
1404
+ }
1405
+ function set_class(o, P, F, I, L, R) {
1406
+ var z = o.__className;
1407
+ if (hydrating || z !== F || z === void 0) {
1408
+ var B = to_class(F, I, R);
1409
+ (!hydrating || B !== o.getAttribute("class")) && (B == null ? o.removeAttribute("class") : P ? o.className = B : o.setAttribute("class", B)), o.__className = F;
1410
+ } else if (R && L !== R) for (var V in R) {
1411
+ var H = !!R[V];
1412
+ (L == null || H !== !!L[V]) && o.classList.toggle(V, H);
1413
+ }
1414
+ return R;
1415
+ }
1416
+ function update_styles(o, P = {}, F, I) {
1417
+ for (var L in F) {
1418
+ var R = F[L];
1419
+ P[L] !== R && (F[L] == null ? o.style.removeProperty(L) : o.style.setProperty(L, R, I));
1420
+ }
1421
+ }
1422
+ function set_style(o, P, F, I) {
1423
+ var L = o.__style;
1424
+ if (hydrating || L !== P) {
1425
+ var R = to_style(P, I);
1426
+ (!hydrating || R !== o.getAttribute("style")) && (R == null ? o.removeAttribute("style") : o.style.cssText = R), o.__style = P;
1427
+ } else I && (Array.isArray(I) ? (update_styles(o, F?.[0], I[0]), update_styles(o, F?.[1], I[1], "important")) : update_styles(o, F, I));
1428
+ return I;
1429
+ }
1430
+ function select_option(o, P, F = !1) {
1431
+ if (o.multiple) {
1432
+ if (P == null) return;
1433
+ if (!is_array(P)) return select_multiple_invalid_value();
1434
+ for (var I of o.options) I.selected = P.includes(get_option_value(I));
1435
+ return;
1436
+ }
1437
+ for (I of o.options) if (is(get_option_value(I), P)) {
1438
+ I.selected = !0;
1439
+ return;
1440
+ }
1441
+ (!F || P !== void 0) && (o.selectedIndex = -1);
1442
+ }
1443
+ function init_select(o) {
1444
+ var P = new MutationObserver(() => {
1445
+ select_option(o, o.__value);
1446
+ });
1447
+ P.observe(o, {
1448
+ childList: !0,
1449
+ subtree: !0,
1450
+ attributes: !0,
1451
+ attributeFilter: ["value"]
1452
+ }), teardown(() => {
1453
+ P.disconnect();
1454
+ });
1455
+ }
1456
+ function get_option_value(o) {
1457
+ return "__value" in o ? o.__value : o.value;
1458
+ }
1459
+ const CLASS = Symbol("class"), STYLE = Symbol("style");
1460
+ var IS_CUSTOM_ELEMENT = Symbol("is custom element"), IS_HTML = Symbol("is html");
1461
+ function remove_input_defaults(o) {
1462
+ if (hydrating) {
1463
+ var P = !1, F = () => {
1464
+ if (!P) {
1465
+ if (P = !0, o.hasAttribute("value")) {
1466
+ var F = o.value;
1467
+ set_attribute(o, "value", null), o.value = F;
1468
+ }
1469
+ if (o.hasAttribute("checked")) {
1470
+ var I = o.checked;
1471
+ set_attribute(o, "checked", null), o.checked = I;
1472
+ }
1473
+ }
1474
+ };
1475
+ o.__on_r = F, queue_micro_task(F), add_form_reset_listener();
1476
+ }
1477
+ }
1478
+ function set_selected(o, P) {
1479
+ P ? o.hasAttribute("selected") || o.setAttribute("selected", "") : o.removeAttribute("selected");
1480
+ }
1481
+ function set_attribute(o, P, F, I) {
1482
+ var L = get_attributes(o);
1483
+ hydrating && (L[P] = o.getAttribute(P), P === "src" || P === "srcset" || P === "href" && o.nodeName === "LINK") || L[P] !== (L[P] = F) && (P === "loading" && (o[LOADING_ATTR_SYMBOL] = F), F == null ? o.removeAttribute(P) : typeof F != "string" && get_setters(o).includes(P) ? o[P] = F : o.setAttribute(P, F));
1484
+ }
1485
+ function set_attributes(o, P, F, L, R = !1, z = !1) {
1486
+ if (hydrating && R && o.tagName === "INPUT") {
1487
+ var B = o;
1488
+ (B.type === "checkbox" ? "defaultChecked" : "defaultValue") in F || remove_input_defaults(B);
1489
+ }
1490
+ var V = get_attributes(o), H = V[IS_CUSTOM_ELEMENT], U = !V[IS_HTML];
1491
+ let W = hydrating && H;
1492
+ W && set_hydrating(!1);
1493
+ var G = P || {}, K = o.tagName === "OPTION";
1494
+ for (var q in P) q in F || (F[q] = null);
1495
+ F.class ? F.class = clsx(F.class) : (L || F[CLASS]) && (F.class = null), F[STYLE] && (F.style ??= null);
1496
+ var J = get_setters(o);
1497
+ for (let R in F) {
1498
+ let B = F[R];
1499
+ if (K && R === "value" && B == null) {
1500
+ o.value = o.__value = "", G[R] = B;
1501
+ continue;
1502
+ }
1503
+ if (R === "class") {
1504
+ set_class(o, o.namespaceURI === "http://www.w3.org/1999/xhtml", B, L, P?.[CLASS], F[CLASS]), G[R] = B, G[CLASS] = F[CLASS];
1505
+ continue;
1506
+ }
1507
+ if (R === "style") {
1508
+ set_style(o, B, P?.[STYLE], F[STYLE]), G[R] = B, G[STYLE] = F[STYLE];
1509
+ continue;
1510
+ }
1511
+ var Y = G[R];
1512
+ if (!(B === Y && !(B === void 0 && o.hasAttribute(R)))) {
1513
+ G[R] = B;
1514
+ var X = R[0] + R[1];
1515
+ if (X !== "$$") if (X === "on") {
1516
+ let P = {}, F = "$$" + R, I = R.slice(2);
1517
+ var Z = can_delegate_event(I);
1518
+ if (is_capture_event(I) && (I = I.slice(0, -7), P.capture = !0), !Z && Y) {
1519
+ if (B != null) continue;
1520
+ o.removeEventListener(I, G[F], P), G[F] = null;
1521
+ }
1522
+ if (B != null) if (Z) o[`__${I}`] = B, delegate([I]);
1523
+ else {
1524
+ function L(o) {
1525
+ G[R].call(this, o);
1526
+ }
1527
+ G[F] = create_event(I, o, L, P);
1528
+ }
1529
+ else Z && (o[`__${I}`] = void 0);
1530
+ } else if (R === "style") set_attribute(o, R, B);
1531
+ else if (R === "autofocus") autofocus(o, !!B);
1532
+ else if (!H && (R === "__value" || R === "value" && B != null)) o.value = o.__value = B;
1533
+ else if (R === "selected" && K) set_selected(o, B);
1534
+ else {
1535
+ var Q = R;
1536
+ U || (Q = normalize_attribute(Q));
1537
+ var $ = Q === "defaultValue" || Q === "defaultChecked";
1538
+ if (B == null && !H && !$) if (V[R] = null, Q === "value" || Q === "checked") {
1539
+ let F = o, I = P === void 0;
1540
+ if (Q === "value") {
1541
+ let o = F.defaultValue;
1542
+ F.removeAttribute(Q), F.defaultValue = o, F.value = F.__value = I ? o : null;
1543
+ } else {
1544
+ let o = F.defaultChecked;
1545
+ F.removeAttribute(Q), F.defaultChecked = o, F.checked = I ? o : !1;
1546
+ }
1547
+ } else o.removeAttribute(R);
1548
+ else $ || J.includes(Q) && (H || typeof B != "string") ? (o[Q] = B, Q in V && (V[Q] = UNINITIALIZED)) : typeof B != "function" && set_attribute(o, Q, B, z);
1549
+ }
1550
+ }
1551
+ }
1552
+ return W && set_hydrating(!0), G;
1553
+ }
1554
+ function attribute_effect(o, P, F = [], I = [], L = [], R, z = !1, B = !1) {
1555
+ flatten(L, F, I, (F) => {
1556
+ var I = void 0, L = {}, V = o.nodeName === "SELECT", H = !1;
1557
+ if (managed(() => {
1558
+ var U = P(...F.map(get)), W = set_attributes(o, I, U, R, z, B);
1559
+ H && V && "value" in U && select_option(o, U.value);
1560
+ for (let o of Object.getOwnPropertySymbols(L)) U[o] || destroy_effect(L[o]);
1561
+ for (let P of Object.getOwnPropertySymbols(U)) {
1562
+ var G = U[P];
1563
+ P.description === "@attach" && (!I || G !== I[P]) && (L[P] && destroy_effect(L[P]), L[P] = branch(() => attach(o, () => G))), W[P] = G;
1564
+ }
1565
+ I = W;
1566
+ }), V) {
1567
+ var U = o;
1568
+ effect(() => {
1569
+ select_option(U, I.value, !0), init_select(U);
1570
+ });
1571
+ }
1572
+ H = !0;
1573
+ });
1574
+ }
1575
+ function get_attributes(o) {
1576
+ return o.__attributes ??= {
1577
+ [IS_CUSTOM_ELEMENT]: o.nodeName.includes("-"),
1578
+ [IS_HTML]: o.namespaceURI === "http://www.w3.org/1999/xhtml"
1579
+ };
1580
+ }
1581
+ var setters_cache = /* @__PURE__ */ new Map();
1582
+ function get_setters(o) {
1583
+ var P = o.getAttribute("is") || o.nodeName, F = setters_cache.get(P);
1584
+ if (F) return F;
1585
+ setters_cache.set(P, F = []);
1586
+ for (var I, L = o, R = Element.prototype; R !== L;) {
1587
+ for (var z in I = get_descriptors(L), I) I[z].set && F.push(z);
1588
+ L = get_prototype_of(L);
1589
+ }
1590
+ return F;
1591
+ }
1592
+ function bind_prop(o, P, F) {
1593
+ var I = get_descriptor(o, P);
1594
+ I && I.set && (o[P] = F, teardown(() => {
1595
+ o[P] = null;
1596
+ }));
1597
+ }
1598
+ function is_bound_this(o, P) {
1599
+ return o === P || o?.[STATE_SYMBOL] === P;
1600
+ }
1601
+ function bind_this(o = {}, P, F, I) {
1602
+ return effect(() => {
1603
+ var L, R;
1604
+ return render_effect(() => {
1605
+ L = R, R = I?.() || [], untrack(() => {
1606
+ o !== F(...R) && (P(o, ...R), L && is_bound_this(F(...L), o) && P(null, ...L));
1607
+ });
1608
+ }), () => {
1609
+ queue_micro_task(() => {
1610
+ R && is_bound_this(F(...R), o) && P(null, ...R);
1611
+ });
1612
+ };
1613
+ }), o;
1614
+ }
1615
+ function init(o = !1) {
1616
+ let P = component_context, F = P.l.u;
1617
+ if (!F) return;
1618
+ let I = () => deep_read_state(P.s);
1619
+ if (o) {
1620
+ let o = 0, F = {}, L = /* @__PURE__ */ derived(() => {
1621
+ let I = !1, L = P.s;
1622
+ for (let o in L) L[o] !== F[o] && (F[o] = L[o], I = !0);
1623
+ return I && o++, o;
1624
+ });
1625
+ I = () => get(L);
1626
+ }
1627
+ F.b.length && user_pre_effect(() => {
1628
+ observe_all(P, I), run_all(F.b);
1629
+ }), user_effect(() => {
1630
+ let o = untrack(() => F.m.map(run));
1631
+ return () => {
1632
+ for (let P of o) typeof P == "function" && P();
1633
+ };
1634
+ }), F.a.length && user_effect(() => {
1635
+ observe_all(P, I), run_all(F.a);
1636
+ });
1637
+ }
1638
+ function observe_all(o, P) {
1639
+ if (o.l.s) for (let P of o.l.s) get(P);
1640
+ P();
1641
+ }
1642
+ var is_store_binding = !1;
1643
+ function capture_store_binding(o) {
1644
+ var P = is_store_binding;
1645
+ try {
1646
+ return is_store_binding = !1, [o(), is_store_binding];
1647
+ } finally {
1648
+ is_store_binding = P;
1649
+ }
1650
+ }
1651
+ var rest_props_handler = {
1652
+ get(o, P) {
1653
+ if (!o.exclude.includes(P)) return o.props[P];
1654
+ },
1655
+ set(o, P) {
1656
+ return !1;
1657
+ },
1658
+ getOwnPropertyDescriptor(o, P) {
1659
+ if (!o.exclude.includes(P) && P in o.props) return {
1660
+ enumerable: !0,
1661
+ configurable: !0,
1662
+ value: o.props[P]
1663
+ };
1664
+ },
1665
+ has(o, P) {
1666
+ return o.exclude.includes(P) ? !1 : P in o.props;
1667
+ },
1668
+ ownKeys(o) {
1669
+ return Reflect.ownKeys(o.props).filter((P) => !o.exclude.includes(P));
1670
+ }
1671
+ };
1672
+ /* @__NO_SIDE_EFFECTS__ */
1673
+ function rest_props(o, P, F) {
1674
+ return new Proxy({
1675
+ props: o,
1676
+ exclude: P
1677
+ }, rest_props_handler);
1678
+ }
1679
+ var legacy_rest_props_handler = {
1680
+ get(o, P) {
1681
+ if (!o.exclude.includes(P)) return get(o.version), P in o.special ? o.special[P]() : o.props[P];
1682
+ },
1683
+ set(o, P, F) {
1684
+ if (!(P in o.special)) {
1685
+ var I = active_effect;
1686
+ try {
1687
+ set_active_effect(o.parent_effect), o.special[P] = prop({ get [P]() {
1688
+ return o.props[P];
1689
+ } }, P, 4);
1690
+ } finally {
1691
+ set_active_effect(I);
1692
+ }
1693
+ }
1694
+ return o.special[P](F), update(o.version), !0;
1695
+ },
1696
+ getOwnPropertyDescriptor(o, P) {
1697
+ if (!o.exclude.includes(P) && P in o.props) return {
1698
+ enumerable: !0,
1699
+ configurable: !0,
1700
+ value: o.props[P]
1701
+ };
1702
+ },
1703
+ deleteProperty(o, P) {
1704
+ return o.exclude.includes(P) ? !0 : (o.exclude.push(P), update(o.version), !0);
1705
+ },
1706
+ has(o, P) {
1707
+ return o.exclude.includes(P) ? !1 : P in o.props;
1708
+ },
1709
+ ownKeys(o) {
1710
+ return Reflect.ownKeys(o.props).filter((P) => !o.exclude.includes(P));
1711
+ }
1712
+ };
1713
+ function legacy_rest_props(o, P) {
1714
+ return new Proxy({
1715
+ props: o,
1716
+ exclude: P,
1717
+ special: {},
1718
+ version: source(0),
1719
+ parent_effect: active_effect
1720
+ }, legacy_rest_props_handler);
1721
+ }
1722
+ function prop(P, F, I, L) {
1723
+ var R = !legacy_mode_flag || (I & 2) != 0, z = (I & 8) != 0, V = (I & 16) != 0, H = L, U = !0, W = () => (U && (U = !1, H = V ? untrack(L) : L), H), G;
1724
+ if (z) {
1725
+ var K = STATE_SYMBOL in P || LEGACY_PROPS in P;
1726
+ G = get_descriptor(P, F)?.set ?? (K && F in P ? (o) => P[F] = o : void 0);
1727
+ }
1728
+ var q, J = !1;
1729
+ z ? [q, J] = capture_store_binding(() => P[F]) : q = P[F], q === void 0 && L !== void 0 && (q = W(), G && (R && props_invalid_value(F), G(q)));
1730
+ var Y = R ? () => {
1731
+ var o = P[F];
1732
+ return o === void 0 ? W() : (U = !0, o);
1733
+ } : () => {
1734
+ var o = P[F];
1735
+ return o !== void 0 && (H = void 0), o === void 0 ? H : o;
1736
+ };
1737
+ if (R && !(I & 4)) return Y;
1738
+ if (G) {
1739
+ var X = P.$$legacy;
1740
+ return (function(o, P) {
1741
+ return arguments.length > 0 ? ((!R || !P || X || J) && G(P ? Y() : o), o) : Y();
1742
+ });
1743
+ }
1744
+ var Z = !1, Q = (I & 1 ? derived : derived_safe_equal)(() => (Z = !1, Y()));
1745
+ z && get(Q);
1746
+ var $ = active_effect;
1747
+ return (function(o, P) {
1748
+ if (arguments.length > 0) {
1749
+ let F = P ? get(Q) : R && z ? proxy(o) : o;
1750
+ return set(Q, F), Z = !0, H !== void 0 && (H = F), o;
1751
+ }
1752
+ return is_destroying_effect && Z || $.f & 16384 ? Q.v : get(Q);
1753
+ });
1754
+ }
1755
+ export { reset as C, push as S, enable_legacy_mode_flag as T, child as _, bind_this as a, state as b, slot as c, from_html as d, deep_read_state as f, user_effect as g, legacy_pre_effect_reset as h, init as i, snippet as l, legacy_pre_effect as m, prop as n, bind_prop as o, get as p, rest_props as r, attribute_effect as s, legacy_rest_props as t, append as u, mutable_source as v, noop as w, pop as x, set as y };