@pie-players/pie-tool-line-reader 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- var _s = Object.defineProperty;
1
+ var ps = Object.defineProperty;
2
2
  var Mr = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var ms = (e, t, n) => t in e ? _s(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var N = (e, t, n) => ms(e, typeof t != "symbol" ? t + "" : t, n), Hn = (e, t, n) => t.has(e) || Mr("Cannot " + n);
7
- var u = (e, t, n) => (Hn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), y = (e, t, n) => t.has(e) ? Mr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), b = (e, t, n, r) => (Hn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), F = (e, t, n) => (Hn(e, t, "access private method"), n);
5
+ var _s = (e, t, n) => t in e ? ps(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var N = (e, t, n) => _s(e, typeof t != "symbol" ? t + "" : t, n), jn = (e, t, n) => t.has(e) || Mr("Cannot " + n);
7
+ var u = (e, t, n) => (jn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), y = (e, t, n) => t.has(e) ? Mr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), w = (e, t, n, r) => (jn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), U = (e, t, n) => (jn(e, t, "access private method"), n);
8
8
  var Kr;
9
9
  typeof window < "u" && ((Kr = window.__svelte ?? (window.__svelte = {})).v ?? (Kr.v = /* @__PURE__ */ new Set())).add("5");
10
- const bs = 1, ws = 2, ys = 16, $s = 1, Es = 2, ir = "[", Tn = "[!", sr = "]", Mt = {}, j = /* @__PURE__ */ Symbol(), Wr = "http://www.w3.org/1999/xhtml", Yn = !1;
11
- var Xr = Array.isArray, xs = Array.prototype.indexOf, Rt = Array.prototype.includes, Cn = Array.from, yn = Object.keys, $n = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, ks = Object.getOwnPropertyDescriptors, Ts = Object.prototype, Cs = Array.prototype, Jr = Object.getPrototypeOf, Rr = Object.isExtensible;
12
- const Ss = () => {
10
+ const ms = 1, bs = 2, ws = 16, ys = 1, $s = 2, ir = "[", kn = "[!", sr = "]", Mt = {}, z = /* @__PURE__ */ Symbol(), Wr = "http://www.w3.org/1999/xhtml", Gn = !1;
11
+ var Xr = Array.isArray, Es = Array.prototype.indexOf, Rt = Array.prototype.includes, Tn = Array.from, wn = Object.keys, yn = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, xs = Object.getOwnPropertyDescriptors, ks = Object.prototype, Ts = Array.prototype, Jr = Object.getPrototypeOf, Rr = Object.isExtensible;
12
+ const Cs = () => {
13
13
  };
14
- function As(e) {
14
+ function Ss(e) {
15
15
  for (var t = 0; t < e.length; t++)
16
16
  e[t]();
17
17
  }
@@ -21,86 +21,89 @@ function Qr() {
21
21
  });
22
22
  return { promise: n, resolve: e, reject: t };
23
23
  }
24
- const H = 2, Qt = 4, Sn = 8, Zr = 1 << 24, He = 16, we = 32, Qe = 64, ei = 128, fe = 512, B = 1024, G = 2048, me = 4096, te = 8192, Be = 16384, Ft = 32768, Ot = 65536, Or = 1 << 17, ti = 1 << 18, gt = 1 << 19, Ms = 1 << 20, Ue = 1 << 25, vt = 65536, Vn = 1 << 21, ar = 1 << 22, qe = 1 << 23, hn = /* @__PURE__ */ Symbol("$state"), Rs = /* @__PURE__ */ Symbol("legacy props"), Os = /* @__PURE__ */ Symbol(""), rt = new class extends Error {
24
+ const B = 2, Jt = 4, Cn = 8, Zr = 1 << 24, He = 16, be = 32, Qe = 64, Yn = 128, oe = 512, F = 1024, j = 2048, _e = 4096, ee = 8192, Be = 16384, Ft = 32768, Ot = 65536, Or = 1 << 17, ei = 1 << 18, pt = 1 << 19, As = 1 << 20, Ue = 1 << 25, vt = 65536, Vn = 1 << 21, ar = 1 << 22, qe = 1 << 23, hn = /* @__PURE__ */ Symbol("$state"), Ms = /* @__PURE__ */ Symbol("legacy props"), Rs = /* @__PURE__ */ Symbol(""), rt = new class extends Error {
25
25
  constructor() {
26
26
  super(...arguments);
27
27
  N(this, "name", "StaleReactionError");
28
28
  N(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
29
29
  }
30
- }(), ni = /* @__PURE__ */ globalThis.document?.contentType.includes("xml") ?? !1, An = 3, zt = 8;
31
- function Ns(e) {
30
+ }(), ti = (
31
+ // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
32
+ !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
33
+ ), Sn = 3, sn = 8;
34
+ function Os(e) {
32
35
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
33
36
  }
34
- function Ls() {
37
+ function Ns() {
35
38
  throw new Error("https://svelte.dev/e/async_derived_orphan");
36
39
  }
37
- function Ds(e, t, n) {
40
+ function Ls(e, t, n) {
38
41
  throw new Error("https://svelte.dev/e/each_key_duplicate");
39
42
  }
40
- function Is(e) {
43
+ function Ds(e) {
41
44
  throw new Error("https://svelte.dev/e/effect_in_teardown");
42
45
  }
43
- function Ps() {
46
+ function Is() {
44
47
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
45
48
  }
46
- function Fs(e) {
49
+ function Ps(e) {
47
50
  throw new Error("https://svelte.dev/e/effect_orphan");
48
51
  }
49
- function zs() {
52
+ function Fs() {
50
53
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
51
54
  }
52
- function Bs() {
55
+ function zs() {
53
56
  throw new Error("https://svelte.dev/e/hydration_failed");
54
57
  }
55
- function js() {
58
+ function Bs() {
56
59
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
57
60
  }
58
- function Hs() {
61
+ function js() {
59
62
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
60
63
  }
61
- function Gs() {
64
+ function Hs() {
62
65
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
63
66
  }
64
- function Ys() {
67
+ function Gs() {
65
68
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
66
69
  }
67
- function Mn(e) {
70
+ function An(e) {
68
71
  console.warn("https://svelte.dev/e/hydration_mismatch");
69
72
  }
70
- function Vs() {
73
+ function Ys() {
71
74
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
72
75
  }
73
76
  let x = !1;
74
77
  function Fe(e) {
75
78
  x = e;
76
79
  }
77
- let k;
78
- function ne(e) {
80
+ let T;
81
+ function te(e) {
79
82
  if (e === null)
80
- throw Mn(), Mt;
81
- return k = e;
83
+ throw An(), Mt;
84
+ return T = e;
82
85
  }
83
86
  function an() {
84
- return ne(/* @__PURE__ */ Ae(k));
87
+ return te(/* @__PURE__ */ Ae(T));
85
88
  }
86
- function V(e) {
89
+ function G(e) {
87
90
  if (x) {
88
- if (/* @__PURE__ */ Ae(k) !== null)
89
- throw Mn(), Mt;
90
- k = e;
91
+ if (/* @__PURE__ */ Ae(T) !== null)
92
+ throw An(), Mt;
93
+ T = e;
91
94
  }
92
95
  }
93
96
  function vn(e = 1) {
94
97
  if (x) {
95
- for (var t = e, n = k; t--; )
98
+ for (var t = e, n = T; t--; )
96
99
  n = /** @type {TemplateNode} */
97
100
  /* @__PURE__ */ Ae(n);
98
- k = n;
101
+ T = n;
99
102
  }
100
103
  }
101
- function En(e = !0) {
102
- for (var t = 0, n = k; ; ) {
103
- if (n.nodeType === zt) {
104
+ function $n(e = !0) {
105
+ for (var t = 0, n = T; ; ) {
106
+ if (n.nodeType === sn) {
104
107
  var r = (
105
108
  /** @type {Comment} */
106
109
  n.data
@@ -108,7 +111,7 @@ function En(e = !0) {
108
111
  if (r === sr) {
109
112
  if (t === 0) return n;
110
113
  t -= 1;
111
- } else (r === ir || r === Tn || // "[1", "[2", etc. for if blocks
114
+ } else (r === ir || r === kn || // "[1", "[2", etc. for if blocks
112
115
  r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
113
116
  }
114
117
  var i = (
@@ -118,30 +121,30 @@ function En(e = !0) {
118
121
  e && n.remove(), n = i;
119
122
  }
120
123
  }
121
- function ri(e) {
122
- if (!e || e.nodeType !== zt)
123
- throw Mn(), Mt;
124
+ function ni(e) {
125
+ if (!e || e.nodeType !== sn)
126
+ throw An(), Mt;
124
127
  return (
125
128
  /** @type {Comment} */
126
129
  e.data
127
130
  );
128
131
  }
129
- function ii(e) {
132
+ function ri(e) {
130
133
  return e === this.v;
131
134
  }
132
- function Us(e, t) {
135
+ function Vs(e, t) {
133
136
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
134
137
  }
135
- function si(e) {
136
- return !Us(e, this.v);
138
+ function ii(e) {
139
+ return !Vs(e, this.v);
137
140
  }
138
- let qs = !1, re = null;
141
+ let Us = !1, ne = null;
139
142
  function Nt(e) {
140
- re = e;
143
+ ne = e;
141
144
  }
142
- function Rn(e, t = !1, n) {
143
- re = {
144
- p: re,
145
+ function Mn(e, t = !1, n) {
146
+ ne = {
147
+ p: ne,
145
148
  i: !1,
146
149
  c: null,
147
150
  e: null,
@@ -150,51 +153,51 @@ function Rn(e, t = !1, n) {
150
153
  l: null
151
154
  };
152
155
  }
153
- function On(e) {
156
+ function Rn(e) {
154
157
  var t = (
155
158
  /** @type {ComponentContext} */
156
- re
159
+ ne
157
160
  ), n = t.e;
158
161
  if (n !== null) {
159
162
  t.e = null;
160
163
  for (var r of n)
161
- Ai(r);
164
+ Si(r);
162
165
  }
163
- return e !== void 0 && (t.x = e), t.i = !0, re = t.p, e ?? /** @type {T} */
166
+ return e !== void 0 && (t.x = e), t.i = !0, ne = t.p, e ?? /** @type {T} */
164
167
  {};
165
168
  }
166
- function ai() {
169
+ function si() {
167
170
  return !0;
168
171
  }
169
172
  let it = [];
170
- function li() {
173
+ function ai() {
171
174
  var e = it;
172
- it = [], As(e);
175
+ it = [], Ss(e);
173
176
  }
174
177
  function Ke(e) {
175
- if (it.length === 0 && !Xt) {
178
+ if (it.length === 0 && !Wt) {
176
179
  var t = it;
177
180
  queueMicrotask(() => {
178
- t === it && li();
181
+ t === it && ai();
179
182
  });
180
183
  }
181
184
  it.push(e);
182
185
  }
183
- function Ks() {
186
+ function qs() {
184
187
  for (; it.length > 0; )
185
- li();
188
+ ai();
186
189
  }
187
- function oi(e) {
188
- var t = T;
190
+ function li(e) {
191
+ var t = k;
189
192
  if (t === null)
190
193
  return $.f |= qe, e;
191
- if ((t.f & Ft) === 0 && (t.f & Qt) === 0)
194
+ if ((t.f & Ft) === 0 && (t.f & Jt) === 0)
192
195
  throw e;
193
196
  Lt(e, t);
194
197
  }
195
198
  function Lt(e, t) {
196
199
  for (; t !== null; ) {
197
- if ((t.f & ei) !== 0) {
200
+ if ((t.f & Yn) !== 0) {
198
201
  if ((t.f & Ft) === 0)
199
202
  throw e;
200
203
  try {
@@ -208,27 +211,27 @@ function Lt(e, t) {
208
211
  }
209
212
  throw e;
210
213
  }
211
- const Ws = -7169;
214
+ const Ks = -7169;
212
215
  function L(e, t) {
213
- e.f = e.f & Ws | t;
216
+ e.f = e.f & Ks | t;
214
217
  }
215
218
  function lr(e) {
216
- (e.f & fe) !== 0 || e.deps === null ? L(e, B) : L(e, me);
219
+ (e.f & oe) !== 0 || e.deps === null ? L(e, F) : L(e, _e);
217
220
  }
218
- function ui(e) {
221
+ function oi(e) {
219
222
  if (e !== null)
220
223
  for (const t of e)
221
- (t.f & H) === 0 || (t.f & vt) === 0 || (t.f ^= vt, ui(
224
+ (t.f & B) === 0 || (t.f & vt) === 0 || (t.f ^= vt, oi(
222
225
  /** @type {Derived} */
223
226
  t.deps
224
227
  ));
225
228
  }
226
- function fi(e, t, n) {
227
- (e.f & G) !== 0 ? t.add(e) : (e.f & me) !== 0 && n.add(e), ui(e.deps), L(e, B);
229
+ function ui(e, t, n) {
230
+ (e.f & j) !== 0 ? t.add(e) : (e.f & _e) !== 0 && n.add(e), oi(e.deps), L(e, F);
228
231
  }
229
232
  const fn = /* @__PURE__ */ new Set();
230
- let O = null, ve = null, W = [], Nn = null, Un = !1, Xt = !1;
231
- var Et, xt, at, kt, en, tn, lt, Ne, Tt, Se, qn, Kn, ci;
233
+ let O = null, he = null, K = [], On = null, Un = !1, Wt = !1;
234
+ var Et, xt, lt, kt, Zt, en, ot, Ne, Tt, Se, qn, Kn, fi;
232
235
  const yr = class yr {
233
236
  constructor() {
234
237
  y(this, Se);
@@ -259,7 +262,7 @@ const yr = class yr {
259
262
  /**
260
263
  * The number of async effects that are currently in flight
261
264
  */
262
- y(this, at, 0);
265
+ y(this, lt, 0);
263
266
  /**
264
267
  * The number of async effects that are currently in flight, _not_ inside a pending boundary
265
268
  */
@@ -269,17 +272,17 @@ const yr = class yr {
269
272
  * TODO replace with Promise.withResolvers once supported widely enough
270
273
  * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
271
274
  */
272
- y(this, en, null);
275
+ y(this, Zt, null);
273
276
  /**
274
277
  * Deferred effects (which run after async work has completed) that are DIRTY
275
278
  * @type {Set<Effect>}
276
279
  */
277
- y(this, tn, /* @__PURE__ */ new Set());
280
+ y(this, en, /* @__PURE__ */ new Set());
278
281
  /**
279
282
  * Deferred effects that are MAYBE_DIRTY
280
283
  * @type {Set<Effect>}
281
284
  */
282
- y(this, lt, /* @__PURE__ */ new Set());
285
+ y(this, ot, /* @__PURE__ */ new Set());
283
286
  /**
284
287
  * A map of branches that still exist, but will be destroyed when this batch
285
288
  * is committed — we skip over these during `process`.
@@ -311,9 +314,9 @@ const yr = class yr {
311
314
  if (n) {
312
315
  u(this, Ne).delete(t);
313
316
  for (var r of n.d)
314
- L(r, G), pe(r);
317
+ L(r, j), ve(r);
315
318
  for (r of n.m)
316
- L(r, me), pe(r);
319
+ L(r, _e), ve(r);
317
320
  }
318
321
  }
319
322
  /**
@@ -321,19 +324,19 @@ const yr = class yr {
321
324
  * @param {Effect[]} root_effects
322
325
  */
323
326
  process(t) {
324
- W = [], this.apply();
327
+ K = [], this.apply();
325
328
  var n = [], r = [];
326
329
  for (const i of t)
327
- F(this, Se, qn).call(this, i, n, r);
330
+ U(this, Se, qn).call(this, i, n, r);
328
331
  if (this.is_deferred()) {
329
- F(this, Se, Kn).call(this, r), F(this, Se, Kn).call(this, n);
332
+ U(this, Se, Kn).call(this, r), U(this, Se, Kn).call(this, n);
330
333
  for (const [i, s] of u(this, Ne))
331
- pi(i, s);
334
+ vi(i, s);
332
335
  } else {
333
336
  for (const i of u(this, Et)) i();
334
- u(this, Et).clear(), u(this, at) === 0 && F(this, Se, ci).call(this), O = null, Nr(r), Nr(n), u(this, en)?.resolve();
337
+ u(this, Et).clear(), u(this, lt) === 0 && U(this, Se, fi).call(this), O = null, Nr(r), Nr(n), u(this, Zt)?.resolve();
335
338
  }
336
- ve = null;
339
+ he = null;
337
340
  }
338
341
  /**
339
342
  * Associate a change to a given source with the current
@@ -342,19 +345,19 @@ const yr = class yr {
342
345
  * @param {any} value
343
346
  */
344
347
  capture(t, n) {
345
- n !== j && !this.previous.has(t) && this.previous.set(t, n), (t.f & qe) === 0 && (this.current.set(t, t.v), ve?.set(t, t.v));
348
+ n !== z && !this.previous.has(t) && this.previous.set(t, n), (t.f & qe) === 0 && (this.current.set(t, t.v), he?.set(t, t.v));
346
349
  }
347
350
  activate() {
348
351
  O = this, this.apply();
349
352
  }
350
353
  deactivate() {
351
- O === this && (O = null, ve = null);
354
+ O === this && (O = null, he = null);
352
355
  }
353
356
  flush() {
354
- if (this.activate(), W.length > 0) {
355
- if (di(), O !== null && O !== this)
357
+ if (this.activate(), K.length > 0) {
358
+ if (ci(), O !== null && O !== this)
356
359
  return;
357
- } else u(this, at) === 0 && this.process([]);
360
+ } else u(this, lt) === 0 && this.process([]);
358
361
  this.deactivate();
359
362
  }
360
363
  discard() {
@@ -366,22 +369,22 @@ const yr = class yr {
366
369
  * @param {boolean} blocking
367
370
  */
368
371
  increment(t) {
369
- b(this, at, u(this, at) + 1), t && b(this, kt, u(this, kt) + 1);
372
+ w(this, lt, u(this, lt) + 1), t && w(this, kt, u(this, kt) + 1);
370
373
  }
371
374
  /**
372
375
  *
373
376
  * @param {boolean} blocking
374
377
  */
375
378
  decrement(t) {
376
- b(this, at, u(this, at) - 1), t && b(this, kt, u(this, kt) - 1), !u(this, Tt) && (b(this, Tt, !0), Ke(() => {
377
- b(this, Tt, !1), this.is_deferred() ? W.length > 0 && this.flush() : this.revive();
379
+ w(this, lt, u(this, lt) - 1), t && w(this, kt, u(this, kt) - 1), !u(this, Tt) && (w(this, Tt, !0), Ke(() => {
380
+ w(this, Tt, !1), this.is_deferred() ? K.length > 0 && this.flush() : this.revive();
378
381
  }));
379
382
  }
380
383
  revive() {
381
- for (const t of u(this, tn))
382
- u(this, lt).delete(t), L(t, G), pe(t);
383
- for (const t of u(this, lt))
384
- L(t, me), pe(t);
384
+ for (const t of u(this, en))
385
+ u(this, ot).delete(t), L(t, j), ve(t);
386
+ for (const t of u(this, ot))
387
+ L(t, _e), ve(t);
385
388
  this.flush();
386
389
  }
387
390
  /** @param {() => void} fn */
@@ -393,12 +396,12 @@ const yr = class yr {
393
396
  u(this, xt).add(t);
394
397
  }
395
398
  settled() {
396
- return (u(this, en) ?? b(this, en, Qr())).promise;
399
+ return (u(this, Zt) ?? w(this, Zt, Qr())).promise;
397
400
  }
398
401
  static ensure() {
399
402
  if (O === null) {
400
403
  const t = O = new yr();
401
- fn.add(O), Xt || Ke(() => {
404
+ fn.add(O), Wt || Ke(() => {
402
405
  O === t && t.flush();
403
406
  });
404
407
  }
@@ -407,7 +410,7 @@ const yr = class yr {
407
410
  apply() {
408
411
  }
409
412
  };
410
- Et = new WeakMap(), xt = new WeakMap(), at = new WeakMap(), kt = new WeakMap(), en = new WeakMap(), tn = new WeakMap(), lt = new WeakMap(), Ne = new WeakMap(), Tt = new WeakMap(), Se = new WeakSet(), /**
413
+ Et = new WeakMap(), xt = new WeakMap(), lt = new WeakMap(), kt = new WeakMap(), Zt = new WeakMap(), en = new WeakMap(), ot = new WeakMap(), Ne = new WeakMap(), Tt = new WeakMap(), Se = new WeakSet(), /**
411
414
  * Traverse the effect tree, executing effects or stashing
412
415
  * them for later execution as appropriate
413
416
  * @param {Effect} root
@@ -415,42 +418,48 @@ Et = new WeakMap(), xt = new WeakMap(), at = new WeakMap(), kt = new WeakMap(),
415
418
  * @param {Effect[]} render_effects
416
419
  */
417
420
  qn = function(t, n, r) {
418
- t.f ^= B;
421
+ t.f ^= F;
419
422
  for (var i = t.first, s = null; i !== null; ) {
420
- var a = i.f, l = (a & (we | Qe)) !== 0, o = l && (a & B) !== 0, c = o || (a & te) !== 0 || u(this, Ne).has(i);
421
- if (!c && i.fn !== null) {
422
- l ? i.f ^= B : s !== null && (a & (Qt | Sn | Zr)) !== 0 ? s.b.defer_effect(i) : (a & Qt) !== 0 ? n.push(i) : ln(i) && ((a & He) !== 0 && u(this, lt).add(i), Pt(i));
423
+ var a = i.f, l = (a & (be | Qe)) !== 0, o = l && (a & F) !== 0, f = o || (a & ee) !== 0 || u(this, Ne).has(i);
424
+ if (!f && i.fn !== null) {
425
+ l ? i.f ^= F : s !== null && (a & (Jt | Cn | Zr)) !== 0 ? s.b.defer_effect(i) : (a & Jt) !== 0 ? n.push(i) : ln(i) && ((a & He) !== 0 && u(this, ot).add(i), Pt(i));
423
426
  var d = i.first;
424
427
  if (d !== null) {
425
428
  i = d;
426
429
  continue;
427
430
  }
428
431
  }
429
- var h = i.parent;
430
- for (i = i.next; i === null && h !== null; )
431
- h === s && (s = null), i = h.next, h = h.parent;
432
+ for (; i !== null; ) {
433
+ i === s && (s = null);
434
+ var v = i.next;
435
+ if (v !== null) {
436
+ i = v;
437
+ break;
438
+ }
439
+ i = i.parent;
440
+ }
432
441
  }
433
442
  }, /**
434
443
  * @param {Effect[]} effects
435
444
  */
436
445
  Kn = function(t) {
437
446
  for (var n = 0; n < t.length; n += 1)
438
- fi(t[n], u(this, tn), u(this, lt));
439
- }, ci = function() {
447
+ ui(t[n], u(this, en), u(this, ot));
448
+ }, fi = function() {
440
449
  var i;
441
450
  if (fn.size > 1) {
442
451
  this.previous.clear();
443
- var t = ve, n = !0;
452
+ var t = he, n = !0;
444
453
  for (const s of fn) {
445
454
  if (s === this) {
446
455
  n = !1;
447
456
  continue;
448
457
  }
449
458
  const a = [];
450
- for (const [o, c] of this.current) {
459
+ for (const [o, f] of this.current) {
451
460
  if (s.current.has(o))
452
- if (n && c !== s.current.get(o))
453
- s.current.set(o, c);
461
+ if (n && f !== s.current.get(o))
462
+ s.current.set(o, f);
454
463
  else
455
464
  continue;
456
465
  a.push(o);
@@ -459,60 +468,60 @@ Kn = function(t) {
459
468
  continue;
460
469
  const l = [...s.current.keys()].filter((o) => !this.current.has(o));
461
470
  if (l.length > 0) {
462
- var r = W;
463
- W = [];
464
- const o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
471
+ var r = K;
472
+ K = [];
473
+ const o = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
465
474
  for (const d of a)
466
- hi(d, l, o, c);
467
- if (W.length > 0) {
475
+ di(d, l, o, f);
476
+ if (K.length > 0) {
468
477
  O = s, s.apply();
469
- for (const d of W)
470
- F(i = s, Se, qn).call(i, d, [], []);
478
+ for (const d of K)
479
+ U(i = s, Se, qn).call(i, d, [], []);
471
480
  s.deactivate();
472
481
  }
473
- W = r;
482
+ K = r;
474
483
  }
475
484
  }
476
- O = null, ve = t;
485
+ O = null, he = t;
477
486
  }
478
487
  this.committed = !0, fn.delete(this);
479
488
  };
480
489
  let je = yr;
481
- function ue(e) {
482
- var t = Xt;
483
- Xt = !0;
490
+ function le(e) {
491
+ var t = Wt;
492
+ Wt = !0;
484
493
  try {
485
494
  for (var n; ; ) {
486
- if (Ks(), W.length === 0 && (O?.flush(), W.length === 0))
487
- return Nn = null, /** @type {T} */
495
+ if (qs(), K.length === 0 && (O?.flush(), K.length === 0))
496
+ return On = null, /** @type {T} */
488
497
  n;
489
- di();
498
+ ci();
490
499
  }
491
500
  } finally {
492
- Xt = t;
501
+ Wt = t;
493
502
  }
494
503
  }
495
- function di() {
504
+ function ci() {
496
505
  Un = !0;
497
506
  var e = null;
498
507
  try {
499
- for (var t = 0; W.length > 0; ) {
508
+ for (var t = 0; K.length > 0; ) {
500
509
  var n = je.ensure();
501
510
  if (t++ > 1e3) {
502
511
  var r, i;
503
- Xs();
512
+ Ws();
504
513
  }
505
- n.process(W), We.clear();
514
+ n.process(K), We.clear();
506
515
  }
507
516
  } finally {
508
- W = [], Un = !1, Nn = null;
517
+ K = [], Un = !1, On = null;
509
518
  }
510
519
  }
511
- function Xs() {
520
+ function Ws() {
512
521
  try {
513
- zs();
522
+ Fs();
514
523
  } catch (e) {
515
- Lt(e, Nn);
524
+ Lt(e, On);
516
525
  }
517
526
  }
518
527
  let Oe = null;
@@ -521,17 +530,17 @@ function Nr(e) {
521
530
  if (t !== 0) {
522
531
  for (var n = 0; n < t; ) {
523
532
  var r = e[n++];
524
- if ((r.f & (Be | te)) === 0 && ln(r) && (Oe = /* @__PURE__ */ new Set(), Pt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Oi(r), Oe?.size > 0)) {
533
+ if ((r.f & (Be | ee)) === 0 && ln(r) && (Oe = /* @__PURE__ */ new Set(), Pt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Ri(r), Oe?.size > 0)) {
525
534
  We.clear();
526
535
  for (const i of Oe) {
527
- if ((i.f & (Be | te)) !== 0) continue;
536
+ if ((i.f & (Be | ee)) !== 0) continue;
528
537
  const s = [i];
529
538
  let a = i.parent;
530
539
  for (; a !== null; )
531
540
  Oe.has(a) && (Oe.delete(a), s.push(a)), a = a.parent;
532
541
  for (let l = s.length - 1; l >= 0; l--) {
533
542
  const o = s[l];
534
- (o.f & (Be | te)) === 0 && Pt(o);
543
+ (o.f & (Be | ee)) === 0 && Pt(o);
535
544
  }
536
545
  }
537
546
  Oe.clear();
@@ -540,30 +549,30 @@ function Nr(e) {
540
549
  Oe = null;
541
550
  }
542
551
  }
543
- function hi(e, t, n, r) {
552
+ function di(e, t, n, r) {
544
553
  if (!n.has(e) && (n.add(e), e.reactions !== null))
545
554
  for (const i of e.reactions) {
546
555
  const s = i.f;
547
- (s & H) !== 0 ? hi(
556
+ (s & B) !== 0 ? di(
548
557
  /** @type {Derived} */
549
558
  i,
550
559
  t,
551
560
  n,
552
561
  r
553
- ) : (s & (ar | He)) !== 0 && (s & G) === 0 && vi(i, t, r) && (L(i, G), pe(
562
+ ) : (s & (ar | He)) !== 0 && (s & j) === 0 && hi(i, t, r) && (L(i, j), ve(
554
563
  /** @type {Effect} */
555
564
  i
556
565
  ));
557
566
  }
558
567
  }
559
- function vi(e, t, n) {
568
+ function hi(e, t, n) {
560
569
  const r = n.get(e);
561
570
  if (r !== void 0) return r;
562
571
  if (e.deps !== null)
563
572
  for (const i of e.deps) {
564
573
  if (Rt.call(t, i))
565
574
  return !0;
566
- if ((i.f & H) !== 0 && vi(
575
+ if ((i.f & B) !== 0 && hi(
567
576
  /** @type {Derived} */
568
577
  i,
569
578
  t,
@@ -577,76 +586,73 @@ function vi(e, t, n) {
577
586
  }
578
587
  return n.set(e, !1), !1;
579
588
  }
580
- function pe(e) {
581
- for (var t = Nn = e; t.parent !== null; ) {
589
+ function ve(e) {
590
+ for (var t = On = e; t.parent !== null; ) {
582
591
  t = t.parent;
583
592
  var n = t.f;
584
- if (Un && t === T && (n & He) !== 0 && (n & ti) === 0)
593
+ if (Un && t === k && (n & He) !== 0 && (n & ei) === 0)
585
594
  return;
586
- if ((n & (Qe | we)) !== 0) {
587
- if ((n & B) === 0) return;
588
- t.f ^= B;
595
+ if ((n & (Qe | be)) !== 0) {
596
+ if ((n & F) === 0) return;
597
+ t.f ^= F;
589
598
  }
590
599
  }
591
- W.push(t);
600
+ K.push(t);
592
601
  }
593
- function pi(e, t) {
594
- if (!((e.f & we) !== 0 && (e.f & B) !== 0)) {
595
- (e.f & G) !== 0 ? t.d.push(e) : (e.f & me) !== 0 && t.m.push(e), L(e, B);
602
+ function vi(e, t) {
603
+ if (!((e.f & be) !== 0 && (e.f & F) !== 0)) {
604
+ (e.f & j) !== 0 ? t.d.push(e) : (e.f & _e) !== 0 && t.m.push(e), L(e, F);
596
605
  for (var n = e.first; n !== null; )
597
- pi(n, t), n = n.next;
606
+ vi(n, t), n = n.next;
598
607
  }
599
608
  }
600
- function Js(e) {
601
- let t = 0, n = pt(0), r;
609
+ function Xs(e) {
610
+ let t = 0, n = gt(0), r;
602
611
  return () => {
603
- cr() && (f(n), dr(() => (t === 0 && (r = gr(() => e(() => Jt(n)))), t += 1, () => {
612
+ cr() && (c(n), dr(() => (t === 0 && (r = pr(() => e(() => Xt(n)))), t += 1, () => {
604
613
  Ke(() => {
605
- t -= 1, t === 0 && (r?.(), r = void 0, Jt(n));
614
+ t -= 1, t === 0 && (r?.(), r = void 0, Xt(n));
606
615
  });
607
616
  })));
608
617
  };
609
618
  }
610
- var Qs = Ot | gt | ei;
611
- function Zs(e, t, n) {
612
- new ea(e, t, n);
619
+ var Js = Ot | pt;
620
+ function Qs(e, t, n) {
621
+ new Zs(e, t, n);
613
622
  }
614
- var Z, nn, $e, ot, Ee, ae, K, xe, Le, Ve, ut, De, Ct, ft, St, At, Ie, xn, D, gi, _i, Wn, pn, gn, Xn;
615
- class ea {
623
+ var se, tn, Le, ut, ye, $e, Q, Ee, De, ft, Ve, Ct, St, At, Ie, En, V, gi, pi, Wn, gn, Xn;
624
+ class Zs {
616
625
  /**
617
626
  * @param {TemplateNode} node
618
627
  * @param {BoundaryProps} props
619
628
  * @param {((anchor: Node) => void)} children
620
629
  */
621
630
  constructor(t, n, r) {
622
- y(this, D);
631
+ y(this, V);
623
632
  /** @type {Boundary | null} */
624
633
  N(this, "parent");
625
634
  N(this, "is_pending", !1);
626
635
  /** @type {TemplateNode} */
627
- y(this, Z);
636
+ y(this, se);
628
637
  /** @type {TemplateNode | null} */
629
- y(this, nn, x ? k : null);
638
+ y(this, tn, x ? T : null);
630
639
  /** @type {BoundaryProps} */
631
- y(this, $e);
640
+ y(this, Le);
632
641
  /** @type {((anchor: Node) => void)} */
633
- y(this, ot);
642
+ y(this, ut);
634
643
  /** @type {Effect} */
635
- y(this, Ee);
644
+ y(this, ye);
636
645
  /** @type {Effect | null} */
637
- y(this, ae, null);
646
+ y(this, $e, null);
638
647
  /** @type {Effect | null} */
639
- y(this, K, null);
648
+ y(this, Q, null);
640
649
  /** @type {Effect | null} */
641
- y(this, xe, null);
650
+ y(this, Ee, null);
642
651
  /** @type {DocumentFragment | null} */
643
- y(this, Le, null);
644
- /** @type {TemplateNode | null} */
645
- y(this, Ve, null);
646
- y(this, ut, 0);
647
- y(this, De, 0);
652
+ y(this, De, null);
653
+ y(this, ft, 0);
654
+ y(this, Ve, 0);
648
655
  y(this, Ct, !1);
649
- y(this, ft, !1);
650
656
  /** @type {Set<Effect>} */
651
657
  y(this, St, /* @__PURE__ */ new Set());
652
658
  /** @type {Set<Effect>} */
@@ -659,36 +665,33 @@ class ea {
659
665
  * @type {Source<number> | null}
660
666
  */
661
667
  y(this, Ie, null);
662
- y(this, xn, Js(() => (b(this, Ie, pt(u(this, ut))), () => {
663
- b(this, Ie, null);
668
+ y(this, En, Xs(() => (w(this, Ie, gt(u(this, ft))), () => {
669
+ w(this, Ie, null);
664
670
  })));
665
- b(this, Z, t), b(this, $e, n), b(this, ot, r), this.parent = /** @type {Effect} */
666
- T.b, this.is_pending = !!u(this, $e).pending, b(this, Ee, hr(() => {
667
- if (T.b = this, x) {
668
- const s = u(this, nn);
669
- an(), /** @type {Comment} */
670
- s.nodeType === zt && /** @type {Comment} */
671
- s.data === Tn ? F(this, D, _i).call(this) : (F(this, D, gi).call(this), u(this, De) === 0 && (this.is_pending = !1));
672
- } else {
673
- var i = F(this, D, Wn).call(this);
674
- try {
675
- b(this, ae, oe(() => r(i)));
676
- } catch (s) {
677
- this.error(s);
678
- }
679
- u(this, De) > 0 ? F(this, D, gn).call(this) : this.is_pending = !1;
680
- }
681
- return () => {
682
- u(this, Ve)?.remove();
683
- };
684
- }, Qs)), x && b(this, Z, k);
671
+ w(this, se, t), w(this, Le, n), w(this, ut, (i) => {
672
+ var s = (
673
+ /** @type {Effect} */
674
+ k
675
+ );
676
+ s.b = this, s.f |= Yn, r(i);
677
+ }), this.parent = /** @type {Effect} */
678
+ k.b, w(this, ye, hr(() => {
679
+ if (x) {
680
+ const i = (
681
+ /** @type {Comment} */
682
+ u(this, tn)
683
+ );
684
+ an(), i.data === kn ? U(this, V, pi).call(this) : U(this, V, gi).call(this);
685
+ } else
686
+ U(this, V, Wn).call(this);
687
+ }, Js)), x && w(this, se, T);
685
688
  }
686
689
  /**
687
690
  * Defer an effect inside a pending boundary until the boundary resolves
688
691
  * @param {Effect} effect
689
692
  */
690
693
  defer_effect(t) {
691
- fi(t, u(this, St), u(this, At));
694
+ ui(t, u(this, St), u(this, At));
692
695
  }
693
696
  /**
694
697
  * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
@@ -698,7 +701,7 @@ class ea {
698
701
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
699
702
  }
700
703
  has_pending_snippet() {
701
- return !!u(this, $e).pending;
704
+ return !!u(this, Le).pending;
702
705
  }
703
706
  /**
704
707
  * Update the source that powers `$effect.pending()` inside this boundary,
@@ -707,48 +710,54 @@ class ea {
707
710
  * @param {1 | -1} d
708
711
  */
709
712
  update_pending_count(t) {
710
- F(this, D, Xn).call(this, t), b(this, ut, u(this, ut) + t), !(!u(this, Ie) || u(this, Ct)) && (b(this, Ct, !0), Ke(() => {
711
- b(this, Ct, !1), u(this, Ie) && Dt(u(this, Ie), u(this, ut));
713
+ U(this, V, Xn).call(this, t), w(this, ft, u(this, ft) + t), !(!u(this, Ie) || u(this, Ct)) && (w(this, Ct, !0), Ke(() => {
714
+ w(this, Ct, !1), u(this, Ie) && Dt(u(this, Ie), u(this, ft));
712
715
  }));
713
716
  }
714
717
  get_effect_pending() {
715
- return u(this, xn).call(this), f(
718
+ return u(this, En).call(this), c(
716
719
  /** @type {Source<number>} */
717
720
  u(this, Ie)
718
721
  );
719
722
  }
720
723
  /** @param {unknown} error */
721
724
  error(t) {
722
- var n = u(this, $e).onerror;
723
- let r = u(this, $e).failed;
724
- if (u(this, ft) || !n && !r)
725
+ var n = u(this, Le).onerror;
726
+ let r = u(this, Le).failed;
727
+ if (!n && !r)
725
728
  throw t;
726
- u(this, ae) && (q(u(this, ae)), b(this, ae, null)), u(this, K) && (q(u(this, K)), b(this, K, null)), u(this, xe) && (q(u(this, xe)), b(this, xe, null)), x && (ne(
729
+ u(this, $e) && (q(u(this, $e)), w(this, $e, null)), u(this, Q) && (q(u(this, Q)), w(this, Q, null)), u(this, Ee) && (q(u(this, Ee)), w(this, Ee, null)), x && (te(
727
730
  /** @type {TemplateNode} */
728
- u(this, nn)
729
- ), vn(), ne(En()));
731
+ u(this, tn)
732
+ ), vn(), te($n()));
730
733
  var i = !1, s = !1;
731
734
  const a = () => {
732
735
  if (i) {
733
- Vs();
736
+ Ys();
734
737
  return;
735
738
  }
736
- i = !0, s && Ys(), je.ensure(), b(this, ut, 0), u(this, xe) !== null && dt(u(this, xe), () => {
737
- b(this, xe, null);
738
- }), this.is_pending = this.has_pending_snippet(), b(this, ae, F(this, D, pn).call(this, () => (b(this, ft, !1), oe(() => u(this, ot).call(this, u(this, Z)))))), u(this, De) > 0 ? F(this, D, gn).call(this) : this.is_pending = !1;
739
+ i = !0, s && Gs(), u(this, Ee) !== null && dt(u(this, Ee), () => {
740
+ w(this, Ee, null);
741
+ }), U(this, V, gn).call(this, () => {
742
+ je.ensure(), U(this, V, Wn).call(this);
743
+ });
739
744
  };
740
745
  Ke(() => {
741
746
  try {
742
747
  s = !0, n?.(t, a), s = !1;
743
748
  } catch (l) {
744
- Lt(l, u(this, Ee) && u(this, Ee).parent);
749
+ Lt(l, u(this, ye) && u(this, ye).parent);
745
750
  }
746
- r && b(this, xe, F(this, D, pn).call(this, () => {
747
- je.ensure(), b(this, ft, !0);
751
+ r && w(this, Ee, U(this, V, gn).call(this, () => {
752
+ je.ensure();
748
753
  try {
749
- return oe(() => {
750
- r(
751
- u(this, Z),
754
+ return de(() => {
755
+ var l = (
756
+ /** @type {Effect} */
757
+ k
758
+ );
759
+ l.b = this, l.f |= Yn, r(
760
+ u(this, se),
752
761
  () => t,
753
762
  () => a
754
763
  );
@@ -757,58 +766,62 @@ class ea {
757
766
  return Lt(
758
767
  l,
759
768
  /** @type {Effect} */
760
- u(this, Ee).parent
769
+ u(this, ye).parent
761
770
  ), null;
762
- } finally {
763
- b(this, ft, !1);
764
771
  }
765
772
  }));
766
773
  });
767
774
  }
768
775
  }
769
- Z = new WeakMap(), nn = new WeakMap(), $e = new WeakMap(), ot = new WeakMap(), Ee = new WeakMap(), ae = new WeakMap(), K = new WeakMap(), xe = new WeakMap(), Le = new WeakMap(), Ve = new WeakMap(), ut = new WeakMap(), De = new WeakMap(), Ct = new WeakMap(), ft = new WeakMap(), St = new WeakMap(), At = new WeakMap(), Ie = new WeakMap(), xn = new WeakMap(), D = new WeakSet(), gi = function() {
776
+ se = new WeakMap(), tn = new WeakMap(), Le = new WeakMap(), ut = new WeakMap(), ye = new WeakMap(), $e = new WeakMap(), Q = new WeakMap(), Ee = new WeakMap(), De = new WeakMap(), ft = new WeakMap(), Ve = new WeakMap(), Ct = new WeakMap(), St = new WeakMap(), At = new WeakMap(), Ie = new WeakMap(), En = new WeakMap(), V = new WeakSet(), gi = function() {
770
777
  try {
771
- b(this, ae, oe(() => u(this, ot).call(this, u(this, Z))));
778
+ w(this, $e, de(() => u(this, ut).call(this, u(this, se))));
772
779
  } catch (t) {
773
780
  this.error(t);
774
781
  }
775
- }, _i = function() {
776
- const t = u(this, $e).pending;
777
- t && (b(this, K, oe(() => t(u(this, Z)))), Ke(() => {
778
- var n = F(this, D, Wn).call(this);
779
- b(this, ae, F(this, D, pn).call(this, () => (je.ensure(), oe(() => u(this, ot).call(this, n))))), u(this, De) > 0 ? F(this, D, gn).call(this) : (dt(
782
+ }, pi = function() {
783
+ const t = u(this, Le).pending;
784
+ t && (this.is_pending = !0, w(this, Q, de(() => t(u(this, se)))), Ke(() => {
785
+ var n = w(this, De, document.createDocumentFragment()), r = me();
786
+ n.append(r), w(this, $e, U(this, V, gn).call(this, () => (je.ensure(), de(() => u(this, ut).call(this, r))))), u(this, Ve) === 0 && (u(this, se).before(n), w(this, De, null), dt(
780
787
  /** @type {Effect} */
781
- u(this, K),
788
+ u(this, Q),
782
789
  () => {
783
- b(this, K, null);
790
+ w(this, Q, null);
784
791
  }
785
792
  ), this.is_pending = !1);
786
793
  }));
787
794
  }, Wn = function() {
788
- var t = u(this, Z);
789
- return this.is_pending && (b(this, Ve, be()), u(this, Z).before(u(this, Ve)), t = u(this, Ve)), t;
795
+ try {
796
+ if (this.is_pending = this.has_pending_snippet(), w(this, Ve, 0), w(this, ft, 0), w(this, $e, de(() => {
797
+ u(this, ut).call(this, u(this, se));
798
+ })), u(this, Ve) > 0) {
799
+ var t = w(this, De, document.createDocumentFragment());
800
+ Li(u(this, $e), t);
801
+ const n = (
802
+ /** @type {(anchor: Node) => void} */
803
+ u(this, Le).pending
804
+ );
805
+ w(this, Q, de(() => n(u(this, se))));
806
+ } else
807
+ this.is_pending = !1;
808
+ } catch (n) {
809
+ this.error(n);
810
+ }
790
811
  }, /**
791
- * @param {() => Effect | null} fn
812
+ * @template T
813
+ * @param {() => T} fn
792
814
  */
793
- pn = function(t) {
794
- var n = T, r = $, i = re;
795
- Ce(u(this, Ee)), de(u(this, Ee)), Nt(u(this, Ee).ctx);
815
+ gn = function(t) {
816
+ var n = k, r = $, i = ne;
817
+ Ce(u(this, ye)), fe(u(this, ye)), Nt(u(this, ye).ctx);
796
818
  try {
797
819
  return t();
798
820
  } catch (s) {
799
- return oi(s), null;
821
+ return li(s), null;
800
822
  } finally {
801
- Ce(n), de(r), Nt(i);
823
+ Ce(n), fe(r), Nt(i);
802
824
  }
803
- }, gn = function() {
804
- const t = (
805
- /** @type {(anchor: Node) => void} */
806
- u(this, $e).pending
807
- );
808
- u(this, ae) !== null && (b(this, Le, document.createDocumentFragment()), u(this, Le).append(
809
- /** @type {TemplateNode} */
810
- u(this, Ve)
811
- ), Di(u(this, ae), u(this, Le))), u(this, K) === null && b(this, K, oe(() => t(u(this, Z))));
812
825
  }, /**
813
826
  * Updates the pending count associated with the currently visible pending snippet,
814
827
  * if any, such that we can replace the snippet with content once work is done
@@ -817,89 +830,89 @@ pn = function(t) {
817
830
  Xn = function(t) {
818
831
  var n;
819
832
  if (!this.has_pending_snippet()) {
820
- this.parent && F(n = this.parent, D, Xn).call(n, t);
833
+ this.parent && U(n = this.parent, V, Xn).call(n, t);
821
834
  return;
822
835
  }
823
- if (b(this, De, u(this, De) + t), u(this, De) === 0) {
836
+ if (w(this, Ve, u(this, Ve) + t), u(this, Ve) === 0) {
824
837
  this.is_pending = !1;
825
838
  for (const r of u(this, St))
826
- L(r, G), pe(r);
839
+ L(r, j), ve(r);
827
840
  for (const r of u(this, At))
828
- L(r, me), pe(r);
829
- u(this, St).clear(), u(this, At).clear(), u(this, K) && dt(u(this, K), () => {
830
- b(this, K, null);
831
- }), u(this, Le) && (u(this, Z).before(u(this, Le)), b(this, Le, null));
841
+ L(r, _e), ve(r);
842
+ u(this, St).clear(), u(this, At).clear(), u(this, Q) && dt(u(this, Q), () => {
843
+ w(this, Q, null);
844
+ }), u(this, De) && (u(this, se).before(u(this, De)), w(this, De, null));
832
845
  }
833
846
  };
834
- function ta(e, t, n, r) {
835
- const i = Ln;
836
- var s = e.filter((p) => !p.settled);
847
+ function ea(e, t, n, r) {
848
+ const i = Nn;
849
+ var s = e.filter((g) => !g.settled);
837
850
  if (n.length === 0 && s.length === 0) {
838
851
  r(t.map(i));
839
852
  return;
840
853
  }
841
854
  var a = O, l = (
842
855
  /** @type {Effect} */
843
- T
844
- ), o = na(), c = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((p) => p.promise)) : null;
845
- function d(p) {
856
+ k
857
+ ), o = ta(), f = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((g) => g.promise)) : null;
858
+ function d(g) {
846
859
  o();
847
860
  try {
848
- r(p);
849
- } catch (g) {
850
- (l.f & Be) === 0 && Lt(g, l);
861
+ r(g);
862
+ } catch (p) {
863
+ (l.f & Be) === 0 && Lt(p, l);
851
864
  }
852
865
  a?.deactivate(), Jn();
853
866
  }
854
867
  if (n.length === 0) {
855
- c.then(() => d(t.map(i)));
868
+ f.then(() => d(t.map(i)));
856
869
  return;
857
870
  }
858
- function h() {
859
- o(), Promise.all(n.map((p) => /* @__PURE__ */ ra(p))).then((p) => d([...t.map(i), ...p])).catch((p) => Lt(p, l));
871
+ function v() {
872
+ o(), Promise.all(n.map((g) => /* @__PURE__ */ na(g))).then((g) => d([...t.map(i), ...g])).catch((g) => Lt(g, l));
860
873
  }
861
- c ? c.then(h) : h();
874
+ f ? f.then(v) : v();
862
875
  }
863
- function na() {
864
- var e = T, t = $, n = re, r = O;
876
+ function ta() {
877
+ var e = k, t = $, n = ne, r = O;
865
878
  return function(s = !0) {
866
- Ce(e), de(t), Nt(n), s && r?.activate();
879
+ Ce(e), fe(t), Nt(n), s && r?.activate();
867
880
  };
868
881
  }
869
882
  function Jn() {
870
- Ce(null), de(null), Nt(null);
883
+ Ce(null), fe(null), Nt(null);
871
884
  }
872
885
  // @__NO_SIDE_EFFECTS__
873
- function Ln(e) {
874
- var t = H | G, n = $ !== null && ($.f & H) !== 0 ? (
886
+ function Nn(e) {
887
+ var t = B | j, n = $ !== null && ($.f & B) !== 0 ? (
875
888
  /** @type {Derived} */
876
889
  $
877
890
  ) : null;
878
- return T !== null && (T.f |= gt), {
879
- ctx: re,
891
+ return k !== null && (k.f |= pt), {
892
+ ctx: ne,
880
893
  deps: null,
881
894
  effects: null,
882
- equals: ii,
895
+ equals: ri,
883
896
  f: t,
884
897
  fn: e,
885
898
  reactions: null,
886
899
  rv: 0,
887
900
  v: (
888
901
  /** @type {V} */
889
- j
902
+ z
890
903
  ),
891
904
  wv: 0,
892
- parent: n ?? T,
905
+ parent: n ?? k,
893
906
  ac: null
894
907
  };
895
908
  }
896
909
  // @__NO_SIDE_EFFECTS__
897
- function ra(e, t, n) {
910
+ function na(e, t, n) {
898
911
  let r = (
899
912
  /** @type {Effect | null} */
900
- T
913
+ k
901
914
  );
902
- r === null && Ls();
915
+ r === null && Ns();
903
916
  var i = (
904
917
  /** @type {Boundary} */
905
918
  r.b
@@ -907,65 +920,65 @@ function ra(e, t, n) {
907
920
  /** @type {Promise<V>} */
908
921
  /** @type {unknown} */
909
922
  void 0
910
- ), a = pt(
923
+ ), a = gt(
911
924
  /** @type {V} */
912
- j
925
+ z
913
926
  ), l = !$, o = /* @__PURE__ */ new Map();
914
927
  return ga(() => {
915
- var c = Qr();
916
- s = c.promise;
928
+ var f = Qr();
929
+ s = f.promise;
917
930
  try {
918
- Promise.resolve(e()).then(c.resolve, c.reject).then(() => {
931
+ Promise.resolve(e()).then(f.resolve, f.reject).then(() => {
919
932
  d === O && d.committed && d.deactivate(), Jn();
920
933
  });
921
- } catch (g) {
922
- c.reject(g), Jn();
934
+ } catch (p) {
935
+ f.reject(p), Jn();
923
936
  }
924
937
  var d = (
925
938
  /** @type {Batch} */
926
939
  O
927
940
  );
928
941
  if (l) {
929
- var h = i.is_rendered();
930
- i.update_pending_count(1), d.increment(h), o.get(d)?.reject(rt), o.delete(d), o.set(d, c);
942
+ var v = i.is_rendered();
943
+ i.update_pending_count(1), d.increment(v), o.get(d)?.reject(rt), o.delete(d), o.set(d, f);
931
944
  }
932
- const p = (g, v = void 0) => {
933
- if (d.activate(), v)
934
- v !== rt && (a.f |= qe, Dt(a, v));
945
+ const g = (p, h = void 0) => {
946
+ if (d.activate(), h)
947
+ h !== rt && (a.f |= qe, Dt(a, h));
935
948
  else {
936
- (a.f & qe) !== 0 && (a.f ^= qe), Dt(a, g);
937
- for (const [_, m] of o) {
938
- if (o.delete(_), _ === d) break;
939
- m.reject(rt);
949
+ (a.f & qe) !== 0 && (a.f ^= qe), Dt(a, p);
950
+ for (const [m, _] of o) {
951
+ if (o.delete(m), m === d) break;
952
+ _.reject(rt);
940
953
  }
941
954
  }
942
- l && (i.update_pending_count(-1), d.decrement(h));
955
+ l && (i.update_pending_count(-1), d.decrement(v));
943
956
  };
944
- c.promise.then(p, (g) => p(null, g || "unknown"));
945
- }), ha(() => {
946
- for (const c of o.values())
947
- c.reject(rt);
948
- }), new Promise((c) => {
949
- function d(h) {
950
- function p() {
951
- h === s ? c(a) : d(s);
957
+ f.promise.then(g, (p) => g(null, p || "unknown"));
958
+ }), da(() => {
959
+ for (const f of o.values())
960
+ f.reject(rt);
961
+ }), new Promise((f) => {
962
+ function d(v) {
963
+ function g() {
964
+ v === s ? f(a) : d(s);
952
965
  }
953
- h.then(p, p);
966
+ v.then(g, g);
954
967
  }
955
968
  d(s);
956
969
  });
957
970
  }
958
971
  // @__NO_SIDE_EFFECTS__
959
- function ia(e) {
960
- const t = /* @__PURE__ */ Ln(e);
961
- return Ii(t), t;
972
+ function ra(e) {
973
+ const t = /* @__PURE__ */ Nn(e);
974
+ return Di(t), t;
962
975
  }
963
976
  // @__NO_SIDE_EFFECTS__
964
- function sa(e) {
965
- const t = /* @__PURE__ */ Ln(e);
966
- return t.equals = si, t;
977
+ function ia(e) {
978
+ const t = /* @__PURE__ */ Nn(e);
979
+ return t.equals = ii, t;
967
980
  }
968
- function aa(e) {
981
+ function sa(e) {
969
982
  var t = e.effects;
970
983
  if (t !== null) {
971
984
  e.effects = null;
@@ -976,9 +989,9 @@ function aa(e) {
976
989
  );
977
990
  }
978
991
  }
979
- function la(e) {
992
+ function aa(e) {
980
993
  for (var t = e.parent; t !== null; ) {
981
- if ((t.f & H) === 0)
994
+ if ((t.f & B) === 0)
982
995
  return (t.f & Be) === 0 ? (
983
996
  /** @type {Effect} */
984
997
  t
@@ -988,43 +1001,43 @@ function la(e) {
988
1001
  return null;
989
1002
  }
990
1003
  function or(e) {
991
- var t, n = T;
992
- Ce(la(e));
1004
+ var t, n = k;
1005
+ Ce(aa(e));
993
1006
  try {
994
- e.f &= ~vt, aa(e), t = Bi(e);
1007
+ e.f &= ~vt, sa(e), t = zi(e);
995
1008
  } finally {
996
1009
  Ce(n);
997
1010
  }
998
1011
  return t;
999
1012
  }
1000
- function mi(e) {
1013
+ function _i(e) {
1001
1014
  var t = or(e);
1002
- if (!e.equals(t) && (e.wv = Fi(), (!O?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
1003
- L(e, B);
1015
+ if (!e.equals(t) && (e.wv = Pi(), (!O?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
1016
+ L(e, F);
1004
1017
  return;
1005
1018
  }
1006
- Je || (ve !== null ? (cr() || O?.is_fork) && ve.set(e, t) : lr(e));
1019
+ Je || (he !== null ? (cr() || O?.is_fork) && he.set(e, t) : lr(e));
1007
1020
  }
1008
- function oa(e) {
1021
+ function la(e) {
1009
1022
  if (e.effects !== null)
1010
1023
  for (const t of e.effects)
1011
- (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(rt), t.teardown = Ss, t.ac = null, Zt(t, 0), vr(t));
1024
+ (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(rt), t.teardown = Cs, t.ac = null, Qt(t, 0), vr(t));
1012
1025
  }
1013
- function bi(e) {
1026
+ function mi(e) {
1014
1027
  if (e.effects !== null)
1015
1028
  for (const t of e.effects)
1016
1029
  t.teardown && Pt(t);
1017
1030
  }
1018
1031
  let Qn = /* @__PURE__ */ new Set();
1019
1032
  const We = /* @__PURE__ */ new Map();
1020
- let wi = !1;
1021
- function pt(e, t) {
1033
+ let bi = !1;
1034
+ function gt(e, t) {
1022
1035
  var n = {
1023
1036
  f: 0,
1024
1037
  // TODO ideally we could skip this altogether, but it causes type errors
1025
1038
  v: e,
1026
1039
  reactions: null,
1027
- equals: ii,
1040
+ equals: ri,
1028
1041
  rv: 0,
1029
1042
  wv: 0
1030
1043
  };
@@ -1032,18 +1045,18 @@ function pt(e, t) {
1032
1045
  }
1033
1046
  // @__NO_SIDE_EFFECTS__
1034
1047
  function R(e, t) {
1035
- const n = pt(e);
1036
- return Ii(n), n;
1048
+ const n = gt(e);
1049
+ return Di(n), n;
1037
1050
  }
1038
1051
  // @__NO_SIDE_EFFECTS__
1039
- function yi(e, t = !1, n = !0) {
1040
- const r = pt(e);
1041
- return t || (r.equals = si), r;
1052
+ function wi(e, t = !1, n = !0) {
1053
+ const r = gt(e);
1054
+ return t || (r.equals = ii), r;
1042
1055
  }
1043
1056
  function E(e, t, n = !1) {
1044
1057
  $ !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1045
1058
  // to ensure we error if state is set inside an inspect effect
1046
- (!ge || ($.f & Or) !== 0) && ai() && ($.f & (H | He | ar | Or)) !== 0 && (ce === null || !Rt.call(ce, e)) && Gs();
1059
+ (!ge || ($.f & Or) !== 0) && si() && ($.f & (B | He | ar | Or)) !== 0 && (ue === null || !Rt.call(ue, e)) && Hs();
1047
1060
  let r = n ? ze(t) : t;
1048
1061
  return Dt(e, r);
1049
1062
  }
@@ -1052,41 +1065,41 @@ function Dt(e, t) {
1052
1065
  var n = e.v;
1053
1066
  Je ? We.set(e, t) : We.set(e, n), e.v = t;
1054
1067
  var r = je.ensure();
1055
- if (r.capture(e, n), (e.f & H) !== 0) {
1068
+ if (r.capture(e, n), (e.f & B) !== 0) {
1056
1069
  const i = (
1057
1070
  /** @type {Derived} */
1058
1071
  e
1059
1072
  );
1060
- (e.f & G) !== 0 && or(i), lr(i);
1073
+ (e.f & j) !== 0 && or(i), lr(i);
1061
1074
  }
1062
- e.wv = Fi(), $i(e, G), T !== null && (T.f & B) !== 0 && (T.f & (we | Qe)) === 0 && (se === null ? ba([e]) : se.push(e)), !r.is_fork && Qn.size > 0 && !wi && ua();
1075
+ e.wv = Pi(), yi(e, j), k !== null && (k.f & F) !== 0 && (k.f & (be | Qe)) === 0 && (ie === null ? ma([e]) : ie.push(e)), !r.is_fork && Qn.size > 0 && !bi && oa();
1063
1076
  }
1064
1077
  return t;
1065
1078
  }
1066
- function ua() {
1067
- wi = !1;
1079
+ function oa() {
1080
+ bi = !1;
1068
1081
  for (const e of Qn)
1069
- (e.f & B) !== 0 && L(e, me), ln(e) && Pt(e);
1082
+ (e.f & F) !== 0 && L(e, _e), ln(e) && Pt(e);
1070
1083
  Qn.clear();
1071
1084
  }
1072
- function Jt(e) {
1085
+ function Xt(e) {
1073
1086
  E(e, e.v + 1);
1074
1087
  }
1075
- function $i(e, t) {
1088
+ function yi(e, t) {
1076
1089
  var n = e.reactions;
1077
1090
  if (n !== null)
1078
1091
  for (var r = n.length, i = 0; i < r; i++) {
1079
- var s = n[i], a = s.f, l = (a & G) === 0;
1080
- if (l && L(s, t), (a & H) !== 0) {
1092
+ var s = n[i], a = s.f, l = (a & j) === 0;
1093
+ if (l && L(s, t), (a & B) !== 0) {
1081
1094
  var o = (
1082
1095
  /** @type {Derived} */
1083
1096
  s
1084
1097
  );
1085
- ve?.delete(o), (a & vt) === 0 && (a & fe && (s.f |= vt), $i(o, me));
1098
+ he?.delete(o), (a & vt) === 0 && (a & oe && (s.f |= vt), yi(o, _e));
1086
1099
  } else l && ((a & He) !== 0 && Oe !== null && Oe.add(
1087
1100
  /** @type {Effect} */
1088
1101
  s
1089
- ), pe(
1102
+ ), ve(
1090
1103
  /** @type {Effect} */
1091
1104
  s
1092
1105
  ));
@@ -1096,15 +1109,15 @@ function ze(e) {
1096
1109
  if (typeof e != "object" || e === null || hn in e)
1097
1110
  return e;
1098
1111
  const t = Jr(e);
1099
- if (t !== Ts && t !== Cs)
1112
+ if (t !== ks && t !== Ts)
1100
1113
  return e;
1101
1114
  var n = /* @__PURE__ */ new Map(), r = Xr(e), i = /* @__PURE__ */ R(0), s = ht, a = (l) => {
1102
1115
  if (ht === s)
1103
1116
  return l();
1104
- var o = $, c = ht;
1105
- de(null), Pr(s);
1117
+ var o = $, f = ht;
1118
+ fe(null), Pr(s);
1106
1119
  var d = l();
1107
- return de(o), Pr(c), d;
1120
+ return fe(o), Pr(f), d;
1108
1121
  };
1109
1122
  return r && n.set("length", /* @__PURE__ */ R(
1110
1123
  /** @type {any[]} */
@@ -1113,153 +1126,153 @@ function ze(e) {
1113
1126
  /** @type {any} */
1114
1127
  e,
1115
1128
  {
1116
- defineProperty(l, o, c) {
1117
- (!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && js();
1129
+ defineProperty(l, o, f) {
1130
+ (!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && Bs();
1118
1131
  var d = n.get(o);
1119
1132
  return d === void 0 ? a(() => {
1120
- var h = /* @__PURE__ */ R(c.value);
1121
- return n.set(o, h), h;
1122
- }) : E(d, c.value, !0), !0;
1133
+ var v = /* @__PURE__ */ R(f.value);
1134
+ return n.set(o, v), v;
1135
+ }) : E(d, f.value, !0), !0;
1123
1136
  },
1124
1137
  deleteProperty(l, o) {
1125
- var c = n.get(o);
1126
- if (c === void 0) {
1138
+ var f = n.get(o);
1139
+ if (f === void 0) {
1127
1140
  if (o in l) {
1128
- const d = a(() => /* @__PURE__ */ R(j));
1129
- n.set(o, d), Jt(i);
1141
+ const d = a(() => /* @__PURE__ */ R(z));
1142
+ n.set(o, d), Xt(i);
1130
1143
  }
1131
1144
  } else
1132
- E(c, j), Jt(i);
1145
+ E(f, z), Xt(i);
1133
1146
  return !0;
1134
1147
  },
1135
- get(l, o, c) {
1148
+ get(l, o, f) {
1136
1149
  if (o === hn)
1137
1150
  return e;
1138
- var d = n.get(o), h = o in l;
1139
- if (d === void 0 && (!h || wt(l, o)?.writable) && (d = a(() => {
1140
- var g = ze(h ? l[o] : j), v = /* @__PURE__ */ R(g);
1141
- return v;
1151
+ var d = n.get(o), v = o in l;
1152
+ if (d === void 0 && (!v || wt(l, o)?.writable) && (d = a(() => {
1153
+ var p = ze(v ? l[o] : z), h = /* @__PURE__ */ R(p);
1154
+ return h;
1142
1155
  }), n.set(o, d)), d !== void 0) {
1143
- var p = f(d);
1144
- return p === j ? void 0 : p;
1156
+ var g = c(d);
1157
+ return g === z ? void 0 : g;
1145
1158
  }
1146
- return Reflect.get(l, o, c);
1159
+ return Reflect.get(l, o, f);
1147
1160
  },
1148
1161
  getOwnPropertyDescriptor(l, o) {
1149
- var c = Reflect.getOwnPropertyDescriptor(l, o);
1150
- if (c && "value" in c) {
1162
+ var f = Reflect.getOwnPropertyDescriptor(l, o);
1163
+ if (f && "value" in f) {
1151
1164
  var d = n.get(o);
1152
- d && (c.value = f(d));
1153
- } else if (c === void 0) {
1154
- var h = n.get(o), p = h?.v;
1155
- if (h !== void 0 && p !== j)
1165
+ d && (f.value = c(d));
1166
+ } else if (f === void 0) {
1167
+ var v = n.get(o), g = v?.v;
1168
+ if (v !== void 0 && g !== z)
1156
1169
  return {
1157
1170
  enumerable: !0,
1158
1171
  configurable: !0,
1159
- value: p,
1172
+ value: g,
1160
1173
  writable: !0
1161
1174
  };
1162
1175
  }
1163
- return c;
1176
+ return f;
1164
1177
  },
1165
1178
  has(l, o) {
1166
1179
  if (o === hn)
1167
1180
  return !0;
1168
- var c = n.get(o), d = c !== void 0 && c.v !== j || Reflect.has(l, o);
1169
- if (c !== void 0 || T !== null && (!d || wt(l, o)?.writable)) {
1170
- c === void 0 && (c = a(() => {
1171
- var p = d ? ze(l[o]) : j, g = /* @__PURE__ */ R(p);
1172
- return g;
1173
- }), n.set(o, c));
1174
- var h = f(c);
1175
- if (h === j)
1181
+ var f = n.get(o), d = f !== void 0 && f.v !== z || Reflect.has(l, o);
1182
+ if (f !== void 0 || k !== null && (!d || wt(l, o)?.writable)) {
1183
+ f === void 0 && (f = a(() => {
1184
+ var g = d ? ze(l[o]) : z, p = /* @__PURE__ */ R(g);
1185
+ return p;
1186
+ }), n.set(o, f));
1187
+ var v = c(f);
1188
+ if (v === z)
1176
1189
  return !1;
1177
1190
  }
1178
1191
  return d;
1179
1192
  },
1180
- set(l, o, c, d) {
1181
- var h = n.get(o), p = o in l;
1193
+ set(l, o, f, d) {
1194
+ var v = n.get(o), g = o in l;
1182
1195
  if (r && o === "length")
1183
- for (var g = c; g < /** @type {Source<number>} */
1184
- h.v; g += 1) {
1185
- var v = n.get(g + "");
1186
- v !== void 0 ? E(v, j) : g in l && (v = a(() => /* @__PURE__ */ R(j)), n.set(g + "", v));
1196
+ for (var p = f; p < /** @type {Source<number>} */
1197
+ v.v; p += 1) {
1198
+ var h = n.get(p + "");
1199
+ h !== void 0 ? E(h, z) : p in l && (h = a(() => /* @__PURE__ */ R(z)), n.set(p + "", h));
1187
1200
  }
1188
- if (h === void 0)
1189
- (!p || wt(l, o)?.writable) && (h = a(() => /* @__PURE__ */ R(void 0)), E(h, ze(c)), n.set(o, h));
1201
+ if (v === void 0)
1202
+ (!g || wt(l, o)?.writable) && (v = a(() => /* @__PURE__ */ R(void 0)), E(v, ze(f)), n.set(o, v));
1190
1203
  else {
1191
- p = h.v !== j;
1192
- var _ = a(() => ze(c));
1193
- E(h, _);
1204
+ g = v.v !== z;
1205
+ var m = a(() => ze(f));
1206
+ E(v, m);
1194
1207
  }
1195
- var m = Reflect.getOwnPropertyDescriptor(l, o);
1196
- if (m?.set && m.set.call(d, c), !p) {
1208
+ var _ = Reflect.getOwnPropertyDescriptor(l, o);
1209
+ if (_?.set && _.set.call(d, f), !g) {
1197
1210
  if (r && typeof o == "string") {
1198
- var C = (
1211
+ var S = (
1199
1212
  /** @type {Source<number>} */
1200
1213
  n.get("length")
1201
- ), S = Number(o);
1202
- Number.isInteger(S) && S >= C.v && E(C, S + 1);
1214
+ ), C = Number(o);
1215
+ Number.isInteger(C) && C >= S.v && E(S, C + 1);
1203
1216
  }
1204
- Jt(i);
1217
+ Xt(i);
1205
1218
  }
1206
1219
  return !0;
1207
1220
  },
1208
1221
  ownKeys(l) {
1209
- f(i);
1210
- var o = Reflect.ownKeys(l).filter((h) => {
1211
- var p = n.get(h);
1212
- return p === void 0 || p.v !== j;
1222
+ c(i);
1223
+ var o = Reflect.ownKeys(l).filter((v) => {
1224
+ var g = n.get(v);
1225
+ return g === void 0 || g.v !== z;
1213
1226
  });
1214
- for (var [c, d] of n)
1215
- d.v !== j && !(c in l) && o.push(c);
1227
+ for (var [f, d] of n)
1228
+ d.v !== z && !(f in l) && o.push(f);
1216
1229
  return o;
1217
1230
  },
1218
1231
  setPrototypeOf() {
1219
- Hs();
1232
+ js();
1220
1233
  }
1221
1234
  }
1222
1235
  );
1223
1236
  }
1224
- var Lr, Ei, xi, ki;
1237
+ var Lr, $i, Ei, xi;
1225
1238
  function Zn() {
1226
1239
  if (Lr === void 0) {
1227
- Lr = window, Ei = /Firefox/.test(navigator.userAgent);
1240
+ Lr = window, $i = /Firefox/.test(navigator.userAgent);
1228
1241
  var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1229
- xi = wt(t, "firstChild").get, ki = wt(t, "nextSibling").get, Rr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Rr(n) && (n.__t = void 0);
1242
+ Ei = wt(t, "firstChild").get, xi = wt(t, "nextSibling").get, Rr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Rr(n) && (n.__t = void 0);
1230
1243
  }
1231
1244
  }
1232
- function be(e = "") {
1245
+ function me(e = "") {
1233
1246
  return document.createTextNode(e);
1234
1247
  }
1235
1248
  // @__NO_SIDE_EFFECTS__
1236
1249
  function It(e) {
1237
1250
  return (
1238
1251
  /** @type {TemplateNode | null} */
1239
- xi.call(e)
1252
+ Ei.call(e)
1240
1253
  );
1241
1254
  }
1242
1255
  // @__NO_SIDE_EFFECTS__
1243
1256
  function Ae(e) {
1244
1257
  return (
1245
1258
  /** @type {TemplateNode | null} */
1246
- ki.call(e)
1259
+ xi.call(e)
1247
1260
  );
1248
1261
  }
1249
- function U(e, t) {
1262
+ function Y(e, t) {
1250
1263
  if (!x)
1251
1264
  return /* @__PURE__ */ It(e);
1252
- var n = /* @__PURE__ */ It(k);
1265
+ var n = /* @__PURE__ */ It(T);
1253
1266
  if (n === null)
1254
- n = k.appendChild(be());
1255
- else if (t && n.nodeType !== An) {
1256
- var r = be();
1257
- return n?.before(r), ne(r), r;
1267
+ n = T.appendChild(me());
1268
+ else if (t && n.nodeType !== Sn) {
1269
+ var r = me();
1270
+ return n?.before(r), te(r), r;
1258
1271
  }
1259
1272
  return t && fr(
1260
1273
  /** @type {Text} */
1261
1274
  n
1262
- ), ne(n), n;
1275
+ ), te(n), n;
1263
1276
  }
1264
1277
  function tt(e, t = !1) {
1265
1278
  if (!x) {
@@ -1267,40 +1280,40 @@ function tt(e, t = !1) {
1267
1280
  return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Ae(n) : n;
1268
1281
  }
1269
1282
  if (t) {
1270
- if (k?.nodeType !== An) {
1271
- var r = be();
1272
- return k?.before(r), ne(r), r;
1283
+ if (T?.nodeType !== Sn) {
1284
+ var r = me();
1285
+ return T?.before(r), te(r), r;
1273
1286
  }
1274
1287
  fr(
1275
1288
  /** @type {Text} */
1276
- k
1289
+ T
1277
1290
  );
1278
1291
  }
1279
- return k;
1292
+ return T;
1280
1293
  }
1281
- function z(e, t = 1, n = !1) {
1282
- let r = x ? k : e;
1294
+ function P(e, t = 1, n = !1) {
1295
+ let r = x ? T : e;
1283
1296
  for (var i; t--; )
1284
1297
  i = r, r = /** @type {TemplateNode} */
1285
1298
  /* @__PURE__ */ Ae(r);
1286
1299
  if (!x)
1287
1300
  return r;
1288
1301
  if (n) {
1289
- if (r?.nodeType !== An) {
1290
- var s = be();
1291
- return r === null ? i?.after(s) : r.before(s), ne(s), s;
1302
+ if (r?.nodeType !== Sn) {
1303
+ var s = me();
1304
+ return r === null ? i?.after(s) : r.before(s), te(s), s;
1292
1305
  }
1293
1306
  fr(
1294
1307
  /** @type {Text} */
1295
1308
  r
1296
1309
  );
1297
1310
  }
1298
- return ne(r), r;
1311
+ return te(r), r;
1299
1312
  }
1300
- function Ti(e) {
1313
+ function ki(e) {
1301
1314
  e.textContent = "";
1302
1315
  }
1303
- function Ci() {
1316
+ function Ti() {
1304
1317
  return !1;
1305
1318
  }
1306
1319
  function ur(e, t, n) {
@@ -1316,12 +1329,12 @@ function fr(e) {
1316
1329
  )
1317
1330
  return;
1318
1331
  let t = e.nextSibling;
1319
- for (; t !== null && t.nodeType === An; )
1332
+ for (; t !== null && t.nodeType === Sn; )
1320
1333
  t.remove(), e.nodeValue += /** @type {string} */
1321
1334
  t.nodeValue, t = e.nextSibling;
1322
1335
  }
1323
1336
  let Dr = !1;
1324
- function fa() {
1337
+ function ua() {
1325
1338
  Dr || (Dr = !0, document.addEventListener(
1326
1339
  "reset",
1327
1340
  (e) => {
@@ -1339,30 +1352,30 @@ function fa() {
1339
1352
  { capture: !0 }
1340
1353
  ));
1341
1354
  }
1342
- function Si(e) {
1343
- var t = $, n = T;
1344
- de(null), Ce(null);
1355
+ function Ci(e) {
1356
+ var t = $, n = k;
1357
+ fe(null), Ce(null);
1345
1358
  try {
1346
1359
  return e();
1347
1360
  } finally {
1348
- de(t), Ce(n);
1361
+ fe(t), Ce(n);
1349
1362
  }
1350
1363
  }
1351
- function ca(e) {
1352
- T === null && ($ === null && Fs(), Ps()), Je && Is();
1364
+ function fa(e) {
1365
+ k === null && ($ === null && Ps(), Is()), Je && Ds();
1353
1366
  }
1354
- function da(e, t) {
1367
+ function ca(e, t) {
1355
1368
  var n = t.last;
1356
1369
  n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
1357
1370
  }
1358
1371
  function Me(e, t, n) {
1359
- var r = T;
1360
- r !== null && (r.f & te) !== 0 && (e |= te);
1372
+ var r = k;
1373
+ r !== null && (r.f & ee) !== 0 && (e |= ee);
1361
1374
  var i = {
1362
- ctx: re,
1375
+ ctx: ne,
1363
1376
  deps: null,
1364
1377
  nodes: null,
1365
- f: e | G | fe,
1378
+ f: e | j | oe,
1366
1379
  first: null,
1367
1380
  fn: t,
1368
1381
  last: null,
@@ -1380,10 +1393,10 @@ function Me(e, t, n) {
1380
1393
  } catch (l) {
1381
1394
  throw q(i), l;
1382
1395
  }
1383
- else t !== null && pe(i);
1396
+ else t !== null && ve(i);
1384
1397
  var s = i;
1385
1398
  if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
1386
- (s.f & gt) === 0 && (s = s.first, (e & He) !== 0 && (e & Ot) !== 0 && s !== null && (s.f |= Ot)), s !== null && (s.parent = r, r !== null && da(s, r), $ !== null && ($.f & H) !== 0 && (e & Qe) === 0)) {
1399
+ (s.f & pt) === 0 && (s = s.first, (e & He) !== 0 && (e & Ot) !== 0 && s !== null && (s.f |= Ot)), s !== null && (s.parent = r, r !== null && ca(s, r), $ !== null && ($.f & B) !== 0 && (e & Qe) === 0)) {
1387
1400
  var a = (
1388
1401
  /** @type {Derived} */
1389
1402
  $
@@ -1395,74 +1408,74 @@ function Me(e, t, n) {
1395
1408
  function cr() {
1396
1409
  return $ !== null && !ge;
1397
1410
  }
1398
- function ha(e) {
1399
- const t = Me(Sn, null, !1);
1400
- return L(t, B), t.teardown = e, t;
1411
+ function da(e) {
1412
+ const t = Me(Cn, null, !1);
1413
+ return L(t, F), t.teardown = e, t;
1401
1414
  }
1402
1415
  function yt(e) {
1403
- ca();
1416
+ fa();
1404
1417
  var t = (
1405
1418
  /** @type {Effect} */
1406
- T.f
1407
- ), n = !$ && (t & we) !== 0 && (t & Ft) === 0;
1419
+ k.f
1420
+ ), n = !$ && (t & be) !== 0 && (t & Ft) === 0;
1408
1421
  if (n) {
1409
1422
  var r = (
1410
1423
  /** @type {ComponentContext} */
1411
- re
1424
+ ne
1412
1425
  );
1413
1426
  (r.e ?? (r.e = [])).push(e);
1414
1427
  } else
1415
- return Ai(e);
1428
+ return Si(e);
1416
1429
  }
1417
- function Ai(e) {
1418
- return Me(Qt | Ms, e, !1);
1430
+ function Si(e) {
1431
+ return Me(Jt | As, e, !1);
1419
1432
  }
1420
- function va(e) {
1433
+ function ha(e) {
1421
1434
  je.ensure();
1422
- const t = Me(Qe | gt, e, !0);
1435
+ const t = Me(Qe | pt, e, !0);
1423
1436
  return () => {
1424
1437
  q(t);
1425
1438
  };
1426
1439
  }
1427
- function pa(e) {
1440
+ function va(e) {
1428
1441
  je.ensure();
1429
- const t = Me(Qe | gt, e, !0);
1442
+ const t = Me(Qe | pt, e, !0);
1430
1443
  return (n = {}) => new Promise((r) => {
1431
1444
  n.outro ? dt(t, () => {
1432
1445
  q(t), r(void 0);
1433
1446
  }) : (q(t), r(void 0));
1434
1447
  });
1435
1448
  }
1436
- function Mi(e) {
1437
- return Me(Qt, e, !1);
1449
+ function Ai(e) {
1450
+ return Me(Jt, e, !1);
1438
1451
  }
1439
1452
  function ga(e) {
1440
- return Me(ar | gt, e, !0);
1453
+ return Me(ar | pt, e, !0);
1441
1454
  }
1442
1455
  function dr(e, t = 0) {
1443
- return Me(Sn | t, e, !0);
1456
+ return Me(Cn | t, e, !0);
1444
1457
  }
1445
1458
  function nt(e, t = [], n = [], r = []) {
1446
- ta(r, t, n, (i) => {
1447
- Me(Sn, () => e(...i.map(f)), !0);
1459
+ ea(r, t, n, (i) => {
1460
+ Me(Cn, () => e(...i.map(c)), !0);
1448
1461
  });
1449
1462
  }
1450
1463
  function hr(e, t = 0) {
1451
1464
  var n = Me(He | t, e, !0);
1452
1465
  return n;
1453
1466
  }
1454
- function oe(e) {
1455
- return Me(we | gt, e, !0);
1467
+ function de(e) {
1468
+ return Me(be | pt, e, !0);
1456
1469
  }
1457
- function Ri(e) {
1470
+ function Mi(e) {
1458
1471
  var t = e.teardown;
1459
1472
  if (t !== null) {
1460
1473
  const n = Je, r = $;
1461
- Ir(!0), de(null);
1474
+ Ir(!0), fe(null);
1462
1475
  try {
1463
1476
  t.call(null);
1464
1477
  } finally {
1465
- Ir(n), de(r);
1478
+ Ir(n), fe(r);
1466
1479
  }
1467
1480
  }
1468
1481
  }
@@ -1470,47 +1483,47 @@ function vr(e, t = !1) {
1470
1483
  var n = e.first;
1471
1484
  for (e.first = e.last = null; n !== null; ) {
1472
1485
  const i = n.ac;
1473
- i !== null && Si(() => {
1486
+ i !== null && Ci(() => {
1474
1487
  i.abort(rt);
1475
1488
  });
1476
1489
  var r = n.next;
1477
1490
  (n.f & Qe) !== 0 ? n.parent = null : q(n, t), n = r;
1478
1491
  }
1479
1492
  }
1480
- function _a(e) {
1493
+ function pa(e) {
1481
1494
  for (var t = e.first; t !== null; ) {
1482
1495
  var n = t.next;
1483
- (t.f & we) === 0 && q(t), t = n;
1496
+ (t.f & be) === 0 && q(t), t = n;
1484
1497
  }
1485
1498
  }
1486
1499
  function q(e, t = !0) {
1487
1500
  var n = !1;
1488
- (t || (e.f & ti) !== 0) && e.nodes !== null && e.nodes.end !== null && (ma(
1501
+ (t || (e.f & ei) !== 0) && e.nodes !== null && e.nodes.end !== null && (_a(
1489
1502
  e.nodes.start,
1490
1503
  /** @type {TemplateNode} */
1491
1504
  e.nodes.end
1492
- ), n = !0), vr(e, t && !n), Zt(e, 0), L(e, Be);
1505
+ ), n = !0), vr(e, t && !n), Qt(e, 0), L(e, Be);
1493
1506
  var r = e.nodes && e.nodes.t;
1494
1507
  if (r !== null)
1495
1508
  for (const s of r)
1496
1509
  s.stop();
1497
- Ri(e);
1510
+ Mi(e);
1498
1511
  var i = e.parent;
1499
- i !== null && i.first !== null && Oi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1512
+ i !== null && i.first !== null && Ri(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1500
1513
  }
1501
- function ma(e, t) {
1514
+ function _a(e, t) {
1502
1515
  for (; e !== null; ) {
1503
1516
  var n = e === t ? null : /* @__PURE__ */ Ae(e);
1504
1517
  e.remove(), e = n;
1505
1518
  }
1506
1519
  }
1507
- function Oi(e) {
1520
+ function Ri(e) {
1508
1521
  var t = e.parent, n = e.prev, r = e.next;
1509
1522
  n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
1510
1523
  }
1511
1524
  function dt(e, t, n = !0) {
1512
1525
  var r = [];
1513
- Ni(e, r, !0);
1526
+ Oi(e, r, !0);
1514
1527
  var i = () => {
1515
1528
  n && q(e), t && t();
1516
1529
  }, s = r.length;
@@ -1521,9 +1534,9 @@ function dt(e, t, n = !0) {
1521
1534
  } else
1522
1535
  i();
1523
1536
  }
1524
- function Ni(e, t, n) {
1525
- if ((e.f & te) === 0) {
1526
- e.f ^= te;
1537
+ function Oi(e, t, n) {
1538
+ if ((e.f & ee) === 0) {
1539
+ e.f ^= ee;
1527
1540
  var r = e.nodes && e.nodes.t;
1528
1541
  if (r !== null)
1529
1542
  for (const l of r)
@@ -1532,20 +1545,20 @@ function Ni(e, t, n) {
1532
1545
  var s = i.next, a = (i.f & Ot) !== 0 || // If this is a branch effect without a block effect parent,
1533
1546
  // it means the parent block effect was pruned. In that case,
1534
1547
  // transparency information was transferred to the branch effect.
1535
- (i.f & we) !== 0 && (e.f & He) !== 0;
1536
- Ni(i, t, a ? n : !1), i = s;
1548
+ (i.f & be) !== 0 && (e.f & He) !== 0;
1549
+ Oi(i, t, a ? n : !1), i = s;
1537
1550
  }
1538
1551
  }
1539
1552
  }
1540
- function pr(e) {
1541
- Li(e, !0);
1553
+ function gr(e) {
1554
+ Ni(e, !0);
1542
1555
  }
1543
- function Li(e, t) {
1544
- if ((e.f & te) !== 0) {
1545
- e.f ^= te, (e.f & B) === 0 && (L(e, G), pe(e));
1556
+ function Ni(e, t) {
1557
+ if ((e.f & ee) !== 0) {
1558
+ e.f ^= ee, (e.f & F) === 0 && (L(e, j), ve(e));
1546
1559
  for (var n = e.first; n !== null; ) {
1547
- var r = n.next, i = (n.f & Ot) !== 0 || (n.f & we) !== 0;
1548
- Li(n, i ? t : !1), n = r;
1560
+ var r = n.next, i = (n.f & Ot) !== 0 || (n.f & be) !== 0;
1561
+ Ni(n, i ? t : !1), n = r;
1549
1562
  }
1550
1563
  var s = e.nodes && e.nodes.t;
1551
1564
  if (s !== null)
@@ -1553,45 +1566,45 @@ function Li(e, t) {
1553
1566
  (a.is_global || t) && a.in();
1554
1567
  }
1555
1568
  }
1556
- function Di(e, t) {
1569
+ function Li(e, t) {
1557
1570
  if (e.nodes)
1558
1571
  for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
1559
1572
  var i = n === r ? null : /* @__PURE__ */ Ae(n);
1560
1573
  t.append(n), n = i;
1561
1574
  }
1562
1575
  }
1563
- let _n = !1, Je = !1;
1576
+ let pn = !1, Je = !1;
1564
1577
  function Ir(e) {
1565
1578
  Je = e;
1566
1579
  }
1567
1580
  let $ = null, ge = !1;
1568
- function de(e) {
1581
+ function fe(e) {
1569
1582
  $ = e;
1570
1583
  }
1571
- let T = null;
1584
+ let k = null;
1572
1585
  function Ce(e) {
1573
- T = e;
1586
+ k = e;
1574
1587
  }
1575
- let ce = null;
1576
- function Ii(e) {
1577
- $ !== null && (ce === null ? ce = [e] : ce.push(e));
1588
+ let ue = null;
1589
+ function Di(e) {
1590
+ $ !== null && (ue === null ? ue = [e] : ue.push(e));
1578
1591
  }
1579
- let X = null, Q = 0, se = null;
1580
- function ba(e) {
1581
- se = e;
1592
+ let W = null, J = 0, ie = null;
1593
+ function ma(e) {
1594
+ ie = e;
1582
1595
  }
1583
- let Pi = 1, st = 0, ht = st;
1596
+ let Ii = 1, st = 0, ht = st;
1584
1597
  function Pr(e) {
1585
1598
  ht = e;
1586
1599
  }
1587
- function Fi() {
1588
- return ++Pi;
1600
+ function Pi() {
1601
+ return ++Ii;
1589
1602
  }
1590
1603
  function ln(e) {
1591
1604
  var t = e.f;
1592
- if ((t & G) !== 0)
1605
+ if ((t & j) !== 0)
1593
1606
  return !0;
1594
- if (t & H && (e.f &= ~vt), (t & me) !== 0) {
1607
+ if (t & B && (e.f &= ~vt), (t & _e) !== 0) {
1595
1608
  for (var n = (
1596
1609
  /** @type {Value[]} */
1597
1610
  e.deps
@@ -1600,39 +1613,39 @@ function ln(e) {
1600
1613
  if (ln(
1601
1614
  /** @type {Derived} */
1602
1615
  s
1603
- ) && mi(
1616
+ ) && _i(
1604
1617
  /** @type {Derived} */
1605
1618
  s
1606
1619
  ), s.wv > e.wv)
1607
1620
  return !0;
1608
1621
  }
1609
- (t & fe) !== 0 && // During time traveling we don't want to reset the status so that
1622
+ (t & oe) !== 0 && // During time traveling we don't want to reset the status so that
1610
1623
  // traversal of the graph in the other batches still happens
1611
- ve === null && L(e, B);
1624
+ he === null && L(e, F);
1612
1625
  }
1613
1626
  return !1;
1614
1627
  }
1615
- function zi(e, t, n = !0) {
1628
+ function Fi(e, t, n = !0) {
1616
1629
  var r = e.reactions;
1617
- if (r !== null && !(ce !== null && Rt.call(ce, e)))
1630
+ if (r !== null && !(ue !== null && Rt.call(ue, e)))
1618
1631
  for (var i = 0; i < r.length; i++) {
1619
1632
  var s = r[i];
1620
- (s.f & H) !== 0 ? zi(
1633
+ (s.f & B) !== 0 ? Fi(
1621
1634
  /** @type {Derived} */
1622
1635
  s,
1623
1636
  t,
1624
1637
  !1
1625
- ) : t === s && (n ? L(s, G) : (s.f & B) !== 0 && L(s, me), pe(
1638
+ ) : t === s && (n ? L(s, j) : (s.f & F) !== 0 && L(s, _e), ve(
1626
1639
  /** @type {Effect} */
1627
1640
  s
1628
1641
  ));
1629
1642
  }
1630
1643
  }
1631
- function Bi(e) {
1632
- var _;
1633
- var t = X, n = Q, r = se, i = $, s = ce, a = re, l = ge, o = ht, c = e.f;
1634
- X = /** @type {null | Value[]} */
1635
- null, Q = 0, se = null, $ = (c & (we | Qe)) === 0 ? e : null, ce = null, Nt(e.ctx), ge = !1, ht = ++st, e.ac !== null && (Si(() => {
1644
+ function zi(e) {
1645
+ var m;
1646
+ var t = W, n = J, r = ie, i = $, s = ue, a = ne, l = ge, o = ht, f = e.f;
1647
+ W = /** @type {null | Value[]} */
1648
+ null, J = 0, ie = null, $ = (f & (be | Qe)) === 0 ? e : null, ue = null, Nt(e.ctx), ge = !1, ht = ++st, e.ac !== null && (Ci(() => {
1636
1649
  e.ac.abort(rt);
1637
1650
  }), e.ac = null);
1638
1651
  try {
@@ -1640,96 +1653,96 @@ function Bi(e) {
1640
1653
  var d = (
1641
1654
  /** @type {Function} */
1642
1655
  e.fn
1643
- ), h = d();
1656
+ ), v = d();
1644
1657
  e.f |= Ft;
1645
- var p = e.deps, g = O?.is_fork;
1646
- if (X !== null) {
1647
- var v;
1648
- if (g || Zt(e, Q), p !== null && Q > 0)
1649
- for (p.length = Q + X.length, v = 0; v < X.length; v++)
1650
- p[Q + v] = X[v];
1658
+ var g = e.deps, p = O?.is_fork;
1659
+ if (W !== null) {
1660
+ var h;
1661
+ if (p || Qt(e, J), g !== null && J > 0)
1662
+ for (g.length = J + W.length, h = 0; h < W.length; h++)
1663
+ g[J + h] = W[h];
1651
1664
  else
1652
- e.deps = p = X;
1653
- if (cr() && (e.f & fe) !== 0)
1654
- for (v = Q; v < p.length; v++)
1655
- ((_ = p[v]).reactions ?? (_.reactions = [])).push(e);
1656
- } else !g && p !== null && Q < p.length && (Zt(e, Q), p.length = Q);
1657
- if (ai() && se !== null && !ge && p !== null && (e.f & (H | me | G)) === 0)
1658
- for (v = 0; v < /** @type {Source[]} */
1659
- se.length; v++)
1660
- zi(
1661
- se[v],
1665
+ e.deps = g = W;
1666
+ if (cr() && (e.f & oe) !== 0)
1667
+ for (h = J; h < g.length; h++)
1668
+ ((m = g[h]).reactions ?? (m.reactions = [])).push(e);
1669
+ } else !p && g !== null && J < g.length && (Qt(e, J), g.length = J);
1670
+ if (si() && ie !== null && !ge && g !== null && (e.f & (B | _e | j)) === 0)
1671
+ for (h = 0; h < /** @type {Source[]} */
1672
+ ie.length; h++)
1673
+ Fi(
1674
+ ie[h],
1662
1675
  /** @type {Effect} */
1663
1676
  e
1664
1677
  );
1665
1678
  if (i !== null && i !== e) {
1666
1679
  if (st++, i.deps !== null)
1667
- for (let m = 0; m < n; m += 1)
1668
- i.deps[m].rv = st;
1680
+ for (let _ = 0; _ < n; _ += 1)
1681
+ i.deps[_].rv = st;
1669
1682
  if (t !== null)
1670
- for (const m of t)
1671
- m.rv = st;
1672
- se !== null && (r === null ? r = se : r.push(.../** @type {Source[]} */
1673
- se));
1683
+ for (const _ of t)
1684
+ _.rv = st;
1685
+ ie !== null && (r === null ? r = ie : r.push(.../** @type {Source[]} */
1686
+ ie));
1674
1687
  }
1675
- return (e.f & qe) !== 0 && (e.f ^= qe), h;
1676
- } catch (m) {
1677
- return oi(m);
1688
+ return (e.f & qe) !== 0 && (e.f ^= qe), v;
1689
+ } catch (_) {
1690
+ return li(_);
1678
1691
  } finally {
1679
- e.f ^= Vn, X = t, Q = n, se = r, $ = i, ce = s, Nt(a), ge = l, ht = o;
1692
+ e.f ^= Vn, W = t, J = n, ie = r, $ = i, ue = s, Nt(a), ge = l, ht = o;
1680
1693
  }
1681
1694
  }
1682
- function wa(e, t) {
1695
+ function ba(e, t) {
1683
1696
  let n = t.reactions;
1684
1697
  if (n !== null) {
1685
- var r = xs.call(n, e);
1698
+ var r = Es.call(n, e);
1686
1699
  if (r !== -1) {
1687
1700
  var i = n.length - 1;
1688
1701
  i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
1689
1702
  }
1690
1703
  }
1691
- if (n === null && (t.f & H) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1704
+ if (n === null && (t.f & B) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1692
1705
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1693
1706
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1694
- (X === null || !Rt.call(X, t))) {
1707
+ (W === null || !Rt.call(W, t))) {
1695
1708
  var s = (
1696
1709
  /** @type {Derived} */
1697
1710
  t
1698
1711
  );
1699
- (s.f & fe) !== 0 && (s.f ^= fe, s.f &= ~vt), lr(s), oa(s), Zt(s, 0);
1712
+ (s.f & oe) !== 0 && (s.f ^= oe, s.f &= ~vt), lr(s), la(s), Qt(s, 0);
1700
1713
  }
1701
1714
  }
1702
- function Zt(e, t) {
1715
+ function Qt(e, t) {
1703
1716
  var n = e.deps;
1704
1717
  if (n !== null)
1705
1718
  for (var r = t; r < n.length; r++)
1706
- wa(e, n[r]);
1719
+ ba(e, n[r]);
1707
1720
  }
1708
1721
  function Pt(e) {
1709
1722
  var t = e.f;
1710
1723
  if ((t & Be) === 0) {
1711
- L(e, B);
1712
- var n = T, r = _n;
1713
- T = e, _n = !0;
1724
+ L(e, F);
1725
+ var n = k, r = pn;
1726
+ k = e, pn = !0;
1714
1727
  try {
1715
- (t & (He | Zr)) !== 0 ? _a(e) : vr(e), Ri(e);
1716
- var i = Bi(e);
1717
- e.teardown = typeof i == "function" ? i : null, e.wv = Pi;
1728
+ (t & (He | Zr)) !== 0 ? pa(e) : vr(e), Mi(e);
1729
+ var i = zi(e);
1730
+ e.teardown = typeof i == "function" ? i : null, e.wv = Ii;
1718
1731
  var s;
1719
- Yn && qs && (e.f & G) !== 0 && e.deps;
1732
+ Gn && Us && (e.f & j) !== 0 && e.deps;
1720
1733
  } finally {
1721
- _n = r, T = n;
1734
+ pn = r, k = n;
1722
1735
  }
1723
1736
  }
1724
1737
  }
1725
- function f(e) {
1726
- var t = e.f, n = (t & H) !== 0;
1738
+ function c(e) {
1739
+ var t = e.f, n = (t & B) !== 0;
1727
1740
  if ($ !== null && !ge) {
1728
- var r = T !== null && (T.f & Be) !== 0;
1729
- if (!r && (ce === null || !Rt.call(ce, e))) {
1741
+ var r = k !== null && (k.f & Be) !== 0;
1742
+ if (!r && (ue === null || !Rt.call(ue, e))) {
1730
1743
  var i = $.deps;
1731
1744
  if (($.f & Vn) !== 0)
1732
- e.rv < st && (e.rv = st, X === null && i !== null && i[Q] === e ? Q++ : X === null ? X = [e] : X.push(e));
1745
+ e.rv < st && (e.rv = st, W === null && i !== null && i[J] === e ? J++ : W === null ? W = [e] : W.push(e));
1733
1746
  else {
1734
1747
  ($.deps ?? ($.deps = [])).push(e);
1735
1748
  var s = e.reactions;
@@ -1746,40 +1759,40 @@ function f(e) {
1746
1759
  );
1747
1760
  if (Je) {
1748
1761
  var l = a.v;
1749
- return ((a.f & B) === 0 && a.reactions !== null || Hi(a)) && (l = or(a)), We.set(a, l), l;
1762
+ return ((a.f & F) === 0 && a.reactions !== null || ji(a)) && (l = or(a)), We.set(a, l), l;
1750
1763
  }
1751
- var o = (a.f & fe) === 0 && !ge && $ !== null && (_n || ($.f & fe) !== 0), c = (a.f & Ft) === 0;
1752
- ln(a) && (o && (a.f |= fe), mi(a)), o && !c && (bi(a), ji(a));
1764
+ var o = (a.f & oe) === 0 && !ge && $ !== null && (pn || ($.f & oe) !== 0), f = (a.f & Ft) === 0;
1765
+ ln(a) && (o && (a.f |= oe), _i(a)), o && !f && (mi(a), Bi(a));
1753
1766
  }
1754
- if (ve?.has(e))
1755
- return ve.get(e);
1767
+ if (he?.has(e))
1768
+ return he.get(e);
1756
1769
  if ((e.f & qe) !== 0)
1757
1770
  throw e.v;
1758
1771
  return e.v;
1759
1772
  }
1760
- function ji(e) {
1761
- if (e.f |= fe, e.deps !== null)
1773
+ function Bi(e) {
1774
+ if (e.f |= oe, e.deps !== null)
1762
1775
  for (const t of e.deps)
1763
- (t.reactions ?? (t.reactions = [])).push(e), (t.f & H) !== 0 && (t.f & fe) === 0 && (bi(
1776
+ (t.reactions ?? (t.reactions = [])).push(e), (t.f & B) !== 0 && (t.f & oe) === 0 && (mi(
1764
1777
  /** @type {Derived} */
1765
1778
  t
1766
- ), ji(
1779
+ ), Bi(
1767
1780
  /** @type {Derived} */
1768
1781
  t
1769
1782
  ));
1770
1783
  }
1771
- function Hi(e) {
1772
- if (e.v === j) return !0;
1784
+ function ji(e) {
1785
+ if (e.v === z) return !0;
1773
1786
  if (e.deps === null) return !1;
1774
1787
  for (const t of e.deps)
1775
- if (We.has(t) || (t.f & H) !== 0 && Hi(
1788
+ if (We.has(t) || (t.f & B) !== 0 && ji(
1776
1789
  /** @type {Derived} */
1777
1790
  t
1778
1791
  ))
1779
1792
  return !0;
1780
1793
  return !1;
1781
1794
  }
1782
- function gr(e) {
1795
+ function pr(e) {
1783
1796
  var t = ge;
1784
1797
  try {
1785
1798
  return ge = !0, e();
@@ -1787,10 +1800,13 @@ function gr(e) {
1787
1800
  ge = t;
1788
1801
  }
1789
1802
  }
1790
- const Gi = /* @__PURE__ */ new Set(), er = /* @__PURE__ */ new Set();
1803
+ const at = /* @__PURE__ */ Symbol("events"), Hi = /* @__PURE__ */ new Set(), er = /* @__PURE__ */ new Set();
1804
+ function ke(e, t, n) {
1805
+ (t[at] ?? (t[at] = {}))[e] = n;
1806
+ }
1791
1807
  function _r(e) {
1792
1808
  for (var t = 0; t < e.length; t++)
1793
- Gi.add(e[t]);
1809
+ Hi.add(e[t]);
1794
1810
  for (var n of er)
1795
1811
  n(e);
1796
1812
  }
@@ -1804,93 +1820,93 @@ function zr(e) {
1804
1820
  i[0] || e.target
1805
1821
  );
1806
1822
  Fr = e;
1807
- var a = 0, l = Fr === e && e.__root;
1823
+ var a = 0, l = Fr === e && e[at];
1808
1824
  if (l) {
1809
1825
  var o = i.indexOf(l);
1810
1826
  if (o !== -1 && (t === document || t === /** @type {any} */
1811
1827
  window)) {
1812
- e.__root = t;
1828
+ e[at] = t;
1813
1829
  return;
1814
1830
  }
1815
- var c = i.indexOf(t);
1816
- if (c === -1)
1831
+ var f = i.indexOf(t);
1832
+ if (f === -1)
1817
1833
  return;
1818
- o <= c && (a = o);
1834
+ o <= f && (a = o);
1819
1835
  }
1820
1836
  if (s = /** @type {Element} */
1821
1837
  i[a] || e.target, s !== t) {
1822
- $n(e, "currentTarget", {
1838
+ yn(e, "currentTarget", {
1823
1839
  configurable: !0,
1824
1840
  get() {
1825
1841
  return s || n;
1826
1842
  }
1827
1843
  });
1828
- var d = $, h = T;
1829
- de(null), Ce(null);
1844
+ var d = $, v = k;
1845
+ fe(null), Ce(null);
1830
1846
  try {
1831
- for (var p, g = []; s !== null; ) {
1832
- var v = s.assignedSlot || s.parentNode || /** @type {any} */
1847
+ for (var g, p = []; s !== null; ) {
1848
+ var h = s.assignedSlot || s.parentNode || /** @type {any} */
1833
1849
  s.host || null;
1834
1850
  try {
1835
- var _ = s["__" + r];
1836
- _ != null && (!/** @type {any} */
1851
+ var m = s[at]?.[r];
1852
+ m != null && (!/** @type {any} */
1837
1853
  s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1838
1854
  // -> the target could not have been disabled because it emits the event in the first place
1839
- e.target === s) && _.call(s, e);
1840
- } catch (m) {
1841
- p ? g.push(m) : p = m;
1855
+ e.target === s) && m.call(s, e);
1856
+ } catch (_) {
1857
+ g ? p.push(_) : g = _;
1842
1858
  }
1843
- if (e.cancelBubble || v === t || v === null)
1859
+ if (e.cancelBubble || h === t || h === null)
1844
1860
  break;
1845
- s = v;
1861
+ s = h;
1846
1862
  }
1847
- if (p) {
1848
- for (let m of g)
1863
+ if (g) {
1864
+ for (let _ of p)
1849
1865
  queueMicrotask(() => {
1850
- throw m;
1866
+ throw _;
1851
1867
  });
1852
- throw p;
1868
+ throw g;
1853
1869
  }
1854
1870
  } finally {
1855
- e.__root = t, delete e.currentTarget, de(d), Ce(h);
1871
+ e[at] = t, delete e.currentTarget, fe(d), Ce(v);
1856
1872
  }
1857
1873
  }
1858
1874
  }
1859
- const ya = /* @__PURE__ */ globalThis?.window?.trustedTypes?.createPolicy(
1860
- "svelte-trusted-html",
1861
- {
1875
+ const wa = (
1876
+ // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
1877
+ globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
1862
1878
  /** @param {string} html */
1863
1879
  createHTML: (e) => e
1864
- }
1880
+ })
1865
1881
  );
1866
- function $a(e) {
1882
+ function ya(e) {
1867
1883
  return (
1868
1884
  /** @type {string} */
1869
- ya?.createHTML(e) ?? e
1885
+ wa?.createHTML(e) ?? e
1870
1886
  );
1871
1887
  }
1872
- function Ea(e, t = !1) {
1888
+ function $a(e, t = !1) {
1873
1889
  var n = ur("template");
1874
- return e = e.replaceAll("<!>", "<!---->"), n.innerHTML = t ? $a(e) : e, n.content;
1890
+ return e = e.replaceAll("<!>", "<!---->"), n.innerHTML = t ? ya(e) : e, n.content;
1875
1891
  }
1876
1892
  function $t(e, t) {
1877
1893
  var n = (
1878
1894
  /** @type {Effect} */
1879
- T
1895
+ k
1880
1896
  );
1881
1897
  n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
1882
1898
  }
1883
1899
  // @__NO_SIDE_EFFECTS__
1884
1900
  function _t(e, t) {
1885
- var n = (t & $s) !== 0, r = (t & Es) !== 0, i, s = !e.startsWith("<!>");
1901
+ var n = (t & ys) !== 0, r = (t & $s) !== 0, i, s = !e.startsWith("<!>");
1886
1902
  return () => {
1887
1903
  if (x)
1888
- return $t(k, null), k;
1889
- i === void 0 && (i = Ea(s ? e : "<!>" + e, !0), n || (i = /** @type {TemplateNode} */
1904
+ return $t(T, null), T;
1905
+ i === void 0 && (i = $a(s ? e : "<!>" + e, !0), n || (i = /** @type {TemplateNode} */
1890
1906
  /* @__PURE__ */ It(i)));
1891
1907
  var a = (
1892
1908
  /** @type {TemplateNode} */
1893
- r || Ei ? document.importNode(i, !0) : i.cloneNode(!0)
1909
+ r || $i ? document.importNode(i, !0) : i.cloneNode(!0)
1894
1910
  );
1895
1911
  if (n) {
1896
1912
  var l = (
@@ -1906,19 +1922,19 @@ function _t(e, t) {
1906
1922
  return a;
1907
1923
  };
1908
1924
  }
1909
- function Yi() {
1925
+ function Gi() {
1910
1926
  if (x)
1911
- return $t(k, null), k;
1912
- var e = document.createDocumentFragment(), t = document.createComment(""), n = be();
1927
+ return $t(T, null), T;
1928
+ var e = document.createDocumentFragment(), t = document.createComment(""), n = me();
1913
1929
  return e.append(t, n), $t(t, n), e;
1914
1930
  }
1915
1931
  function Te(e, t) {
1916
1932
  if (x) {
1917
1933
  var n = (
1918
1934
  /** @type {Effect & { nodes: EffectNodes }} */
1919
- T
1935
+ k
1920
1936
  );
1921
- ((n.f & Ft) === 0 || n.nodes.end === null) && (n.nodes.end = k), an();
1937
+ ((n.f & Ft) === 0 || n.nodes.end === null) && (n.nodes.end = T), an();
1922
1938
  return;
1923
1939
  }
1924
1940
  e !== null && e.before(
@@ -1926,109 +1942,109 @@ function Te(e, t) {
1926
1942
  t
1927
1943
  );
1928
1944
  }
1929
- const xa = ["touchstart", "touchmove"];
1930
- function ka(e) {
1931
- return xa.includes(e);
1945
+ const Ea = ["touchstart", "touchmove"];
1946
+ function xa(e) {
1947
+ return Ea.includes(e);
1932
1948
  }
1933
- function mn(e, t) {
1949
+ function _n(e, t) {
1934
1950
  var n = t == null ? "" : typeof t == "object" ? t + "" : t;
1935
1951
  n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n + "");
1936
1952
  }
1937
- function Vi(e, t) {
1938
- return Ui(e, t);
1953
+ function Yi(e, t) {
1954
+ return Vi(e, t);
1939
1955
  }
1940
- function Ta(e, t) {
1956
+ function ka(e, t) {
1941
1957
  Zn(), t.intro = t.intro ?? !1;
1942
- const n = t.target, r = x, i = k;
1958
+ const n = t.target, r = x, i = T;
1943
1959
  try {
1944
- for (var s = /* @__PURE__ */ It(n); s && (s.nodeType !== zt || /** @type {Comment} */
1960
+ for (var s = /* @__PURE__ */ It(n); s && (s.nodeType !== sn || /** @type {Comment} */
1945
1961
  s.data !== ir); )
1946
1962
  s = /* @__PURE__ */ Ae(s);
1947
1963
  if (!s)
1948
1964
  throw Mt;
1949
- Fe(!0), ne(
1965
+ Fe(!0), te(
1950
1966
  /** @type {Comment} */
1951
1967
  s
1952
1968
  );
1953
- const a = Ui(e, { ...t, anchor: s });
1969
+ const a = Vi(e, { ...t, anchor: s });
1954
1970
  return Fe(!1), /** @type {Exports} */
1955
1971
  a;
1956
1972
  } catch (a) {
1957
1973
  if (a instanceof Error && a.message.split(`
1958
1974
  `).some((l) => l.startsWith("https://svelte.dev/e/")))
1959
1975
  throw a;
1960
- return a !== Mt && console.warn("Failed to hydrate: ", a), t.recover === !1 && Bs(), Zn(), Ti(n), Fe(!1), Vi(e, t);
1976
+ return a !== Mt && console.warn("Failed to hydrate: ", a), t.recover === !1 && zs(), Zn(), ki(n), Fe(!1), Yi(e, t);
1961
1977
  } finally {
1962
- Fe(r), ne(i);
1978
+ Fe(r), te(i);
1963
1979
  }
1964
1980
  }
1965
1981
  const cn = /* @__PURE__ */ new Map();
1966
- function Ui(e, { target: t, anchor: n, props: r = {}, events: i, context: s, intro: a = !0 }) {
1982
+ function Vi(e, { target: t, anchor: n, props: r = {}, events: i, context: s, intro: a = !0 }) {
1967
1983
  Zn();
1968
- var l = /* @__PURE__ */ new Set(), o = (h) => {
1969
- for (var p = 0; p < h.length; p++) {
1970
- var g = h[p];
1971
- if (!l.has(g)) {
1972
- l.add(g);
1973
- var v = ka(g);
1974
- for (const C of [t, document]) {
1975
- var _ = cn.get(C);
1976
- _ === void 0 && (_ = /* @__PURE__ */ new Map(), cn.set(C, _));
1977
- var m = _.get(g);
1978
- m === void 0 ? (C.addEventListener(g, zr, { passive: v }), _.set(g, 1)) : _.set(g, m + 1);
1979
- }
1980
- }
1981
- }
1982
- };
1983
- o(Cn(Gi)), er.add(o);
1984
- var c = void 0, d = pa(() => {
1985
- var h = n ?? t.appendChild(be());
1986
- return Zs(
1984
+ var l = void 0, o = va(() => {
1985
+ var f = n ?? t.appendChild(me());
1986
+ Qs(
1987
1987
  /** @type {TemplateNode} */
1988
- h,
1988
+ f,
1989
1989
  {
1990
1990
  pending: () => {
1991
1991
  }
1992
1992
  },
1993
- (p) => {
1994
- Rn({});
1995
- var g = (
1993
+ (g) => {
1994
+ Mn({});
1995
+ var p = (
1996
1996
  /** @type {ComponentContext} */
1997
- re
1997
+ ne
1998
1998
  );
1999
- if (s && (g.c = s), i && (r.$$events = i), x && $t(
1999
+ if (s && (p.c = s), i && (r.$$events = i), x && $t(
2000
2000
  /** @type {TemplateNode} */
2001
- p,
2001
+ g,
2002
2002
  null
2003
- ), c = e(p, r) || {}, x && (T.nodes.end = k, k === null || k.nodeType !== zt || /** @type {Comment} */
2004
- k.data !== sr))
2005
- throw Mn(), Mt;
2006
- On();
2003
+ ), l = e(g, r) || {}, x && (k.nodes.end = T, T === null || T.nodeType !== sn || /** @type {Comment} */
2004
+ T.data !== sr))
2005
+ throw An(), Mt;
2006
+ Rn();
2007
2007
  }
2008
- ), () => {
2009
- for (var p of l)
2010
- for (const _ of [t, document]) {
2011
- var g = (
2008
+ );
2009
+ var d = /* @__PURE__ */ new Set(), v = (g) => {
2010
+ for (var p = 0; p < g.length; p++) {
2011
+ var h = g[p];
2012
+ if (!d.has(h)) {
2013
+ d.add(h);
2014
+ var m = xa(h);
2015
+ for (const C of [t, document]) {
2016
+ var _ = cn.get(C);
2017
+ _ === void 0 && (_ = /* @__PURE__ */ new Map(), cn.set(C, _));
2018
+ var S = _.get(h);
2019
+ S === void 0 ? (C.addEventListener(h, zr, { passive: m }), _.set(h, 1)) : _.set(h, S + 1);
2020
+ }
2021
+ }
2022
+ }
2023
+ };
2024
+ return v(Tn(Hi)), er.add(v), () => {
2025
+ for (var g of d)
2026
+ for (const m of [t, document]) {
2027
+ var p = (
2012
2028
  /** @type {Map<string, number>} */
2013
- cn.get(_)
2014
- ), v = (
2029
+ cn.get(m)
2030
+ ), h = (
2015
2031
  /** @type {number} */
2016
- g.get(p)
2032
+ p.get(g)
2017
2033
  );
2018
- --v == 0 ? (_.removeEventListener(p, zr), g.delete(p), g.size === 0 && cn.delete(_)) : g.set(p, v);
2034
+ --h == 0 ? (m.removeEventListener(g, zr), p.delete(g), p.size === 0 && cn.delete(m)) : p.set(g, h);
2019
2035
  }
2020
- er.delete(o), h !== n && h.parentNode?.removeChild(h);
2036
+ er.delete(v), f !== n && f.parentNode?.removeChild(f);
2021
2037
  };
2022
2038
  });
2023
- return tr.set(c, d), c;
2039
+ return tr.set(l, o), l;
2024
2040
  }
2025
2041
  let tr = /* @__PURE__ */ new WeakMap();
2026
- function Ca(e, t) {
2042
+ function Ta(e, t) {
2027
2043
  const n = tr.get(e);
2028
2044
  return n ? (tr.delete(e), n(t)) : Promise.resolve();
2029
2045
  }
2030
- var he, ke, ee, ct, rn, sn, kn;
2031
- class Sa {
2046
+ var ce, xe, Z, ct, nn, rn, xn;
2047
+ class Ca {
2032
2048
  /**
2033
2049
  * @param {TemplateNode} anchor
2034
2050
  * @param {boolean} transition
@@ -2037,7 +2053,7 @@ class Sa {
2037
2053
  /** @type {TemplateNode} */
2038
2054
  N(this, "anchor");
2039
2055
  /** @type {Map<Batch, Key>} */
2040
- y(this, he, /* @__PURE__ */ new Map());
2056
+ y(this, ce, /* @__PURE__ */ new Map());
2041
2057
  /**
2042
2058
  * Map of keys to effects that are currently rendered in the DOM.
2043
2059
  * These effects are visible and actively part of the document tree.
@@ -2052,13 +2068,13 @@ class Sa {
2052
2068
  * Can result in the entries `true->Effect` and `false->Effect`
2053
2069
  * @type {Map<Key, Effect>}
2054
2070
  */
2055
- y(this, ke, /* @__PURE__ */ new Map());
2071
+ y(this, xe, /* @__PURE__ */ new Map());
2056
2072
  /**
2057
2073
  * Similar to #onscreen with respect to the keys, but contains branches that are not yet
2058
2074
  * in the DOM, because their insertion is deferred.
2059
2075
  * @type {Map<Key, Branch>}
2060
2076
  */
2061
- y(this, ee, /* @__PURE__ */ new Map());
2077
+ y(this, Z, /* @__PURE__ */ new Map());
2062
2078
  /**
2063
2079
  * Keys of effects that are currently outroing
2064
2080
  * @type {Set<Key>}
@@ -2068,53 +2084,53 @@ class Sa {
2068
2084
  * Whether to pause (i.e. outro) on change, or destroy immediately.
2069
2085
  * This is necessary for `<svelte:element>`
2070
2086
  */
2071
- y(this, rn, !0);
2072
- y(this, sn, () => {
2087
+ y(this, nn, !0);
2088
+ y(this, rn, () => {
2073
2089
  var t = (
2074
2090
  /** @type {Batch} */
2075
2091
  O
2076
2092
  );
2077
- if (u(this, he).has(t)) {
2093
+ if (u(this, ce).has(t)) {
2078
2094
  var n = (
2079
2095
  /** @type {Key} */
2080
- u(this, he).get(t)
2081
- ), r = u(this, ke).get(n);
2096
+ u(this, ce).get(t)
2097
+ ), r = u(this, xe).get(n);
2082
2098
  if (r)
2083
- pr(r), u(this, ct).delete(n);
2099
+ gr(r), u(this, ct).delete(n);
2084
2100
  else {
2085
- var i = u(this, ee).get(n);
2086
- i && (u(this, ke).set(n, i.effect), u(this, ee).delete(n), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), r = i.effect);
2101
+ var i = u(this, Z).get(n);
2102
+ i && (u(this, xe).set(n, i.effect), u(this, Z).delete(n), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), r = i.effect);
2087
2103
  }
2088
- for (const [s, a] of u(this, he)) {
2089
- if (u(this, he).delete(s), s === t)
2104
+ for (const [s, a] of u(this, ce)) {
2105
+ if (u(this, ce).delete(s), s === t)
2090
2106
  break;
2091
- const l = u(this, ee).get(a);
2092
- l && (q(l.effect), u(this, ee).delete(a));
2107
+ const l = u(this, Z).get(a);
2108
+ l && (q(l.effect), u(this, Z).delete(a));
2093
2109
  }
2094
- for (const [s, a] of u(this, ke)) {
2110
+ for (const [s, a] of u(this, xe)) {
2095
2111
  if (s === n || u(this, ct).has(s)) continue;
2096
2112
  const l = () => {
2097
- if (Array.from(u(this, he).values()).includes(s)) {
2098
- var c = document.createDocumentFragment();
2099
- Di(a, c), c.append(be()), u(this, ee).set(s, { effect: a, fragment: c });
2113
+ if (Array.from(u(this, ce).values()).includes(s)) {
2114
+ var f = document.createDocumentFragment();
2115
+ Li(a, f), f.append(me()), u(this, Z).set(s, { effect: a, fragment: f });
2100
2116
  } else
2101
2117
  q(a);
2102
- u(this, ct).delete(s), u(this, ke).delete(s);
2118
+ u(this, ct).delete(s), u(this, xe).delete(s);
2103
2119
  };
2104
- u(this, rn) || !r ? (u(this, ct).add(s), dt(a, l, !1)) : l();
2120
+ u(this, nn) || !r ? (u(this, ct).add(s), dt(a, l, !1)) : l();
2105
2121
  }
2106
2122
  }
2107
2123
  });
2108
2124
  /**
2109
2125
  * @param {Batch} batch
2110
2126
  */
2111
- y(this, kn, (t) => {
2112
- u(this, he).delete(t);
2113
- const n = Array.from(u(this, he).values());
2114
- for (const [r, i] of u(this, ee))
2115
- n.includes(r) || (q(i.effect), u(this, ee).delete(r));
2127
+ y(this, xn, (t) => {
2128
+ u(this, ce).delete(t);
2129
+ const n = Array.from(u(this, ce).values());
2130
+ for (const [r, i] of u(this, Z))
2131
+ n.includes(r) || (q(i.effect), u(this, Z).delete(r));
2116
2132
  });
2117
- this.anchor = t, b(this, rn, n);
2133
+ this.anchor = t, w(this, nn, n);
2118
2134
  }
2119
2135
  /**
2120
2136
  *
@@ -2125,49 +2141,49 @@ class Sa {
2125
2141
  var r = (
2126
2142
  /** @type {Batch} */
2127
2143
  O
2128
- ), i = Ci();
2129
- if (n && !u(this, ke).has(t) && !u(this, ee).has(t))
2144
+ ), i = Ti();
2145
+ if (n && !u(this, xe).has(t) && !u(this, Z).has(t))
2130
2146
  if (i) {
2131
- var s = document.createDocumentFragment(), a = be();
2132
- s.append(a), u(this, ee).set(t, {
2133
- effect: oe(() => n(a)),
2147
+ var s = document.createDocumentFragment(), a = me();
2148
+ s.append(a), u(this, Z).set(t, {
2149
+ effect: de(() => n(a)),
2134
2150
  fragment: s
2135
2151
  });
2136
2152
  } else
2137
- u(this, ke).set(
2153
+ u(this, xe).set(
2138
2154
  t,
2139
- oe(() => n(this.anchor))
2155
+ de(() => n(this.anchor))
2140
2156
  );
2141
- if (u(this, he).set(r, t), i) {
2142
- for (const [l, o] of u(this, ke))
2157
+ if (u(this, ce).set(r, t), i) {
2158
+ for (const [l, o] of u(this, xe))
2143
2159
  l === t ? r.unskip_effect(o) : r.skip_effect(o);
2144
- for (const [l, o] of u(this, ee))
2160
+ for (const [l, o] of u(this, Z))
2145
2161
  l === t ? r.unskip_effect(o.effect) : r.skip_effect(o.effect);
2146
- r.oncommit(u(this, sn)), r.ondiscard(u(this, kn));
2162
+ r.oncommit(u(this, rn)), r.ondiscard(u(this, xn));
2147
2163
  } else
2148
- x && (this.anchor = k), u(this, sn).call(this);
2164
+ x && (this.anchor = T), u(this, rn).call(this);
2149
2165
  }
2150
2166
  }
2151
- he = new WeakMap(), ke = new WeakMap(), ee = new WeakMap(), ct = new WeakMap(), rn = new WeakMap(), sn = new WeakMap(), kn = new WeakMap();
2152
- function qi(e) {
2153
- re === null && Ns(), yt(() => {
2154
- const t = gr(e);
2167
+ ce = new WeakMap(), xe = new WeakMap(), Z = new WeakMap(), ct = new WeakMap(), nn = new WeakMap(), rn = new WeakMap(), xn = new WeakMap();
2168
+ function Ui(e) {
2169
+ ne === null && Os(), yt(() => {
2170
+ const t = pr(e);
2155
2171
  if (typeof t == "function") return (
2156
2172
  /** @type {() => void} */
2157
2173
  t
2158
2174
  );
2159
2175
  });
2160
2176
  }
2161
- function bn(e, t, n = !1) {
2177
+ function mn(e, t, n = !1) {
2162
2178
  x && an();
2163
- var r = new Sa(e), i = n ? Ot : 0;
2179
+ var r = new Ca(e), i = n ? Ot : 0;
2164
2180
  function s(a, l) {
2165
2181
  if (x) {
2166
- const d = ri(e);
2182
+ const d = ni(e);
2167
2183
  var o;
2168
- if (d === ir ? o = 0 : d === Tn ? o = !1 : o = parseInt(d.substring(1)), a !== o) {
2169
- var c = En();
2170
- ne(c), r.anchor = c, Fe(!1), r.ensure(a, l), Fe(!0);
2184
+ if (d === ir ? o = 0 : d === kn ? o = !1 : o = parseInt(d.substring(1)), a !== o) {
2185
+ var f = $n();
2186
+ te(f), r.anchor = f, Fe(!1), r.ensure(a, l), Fe(!0);
2171
2187
  return;
2172
2188
  }
2173
2189
  }
@@ -2180,22 +2196,22 @@ function bn(e, t, n = !1) {
2180
2196
  }), a || s(!1, null);
2181
2197
  }, i);
2182
2198
  }
2183
- function Aa(e, t) {
2199
+ function Sa(e, t) {
2184
2200
  return t;
2185
2201
  }
2186
- function Ma(e, t, n) {
2202
+ function Aa(e, t, n) {
2187
2203
  for (var r = [], i = t.length, s, a = t.length, l = 0; l < i; l++) {
2188
- let h = t[l];
2204
+ let v = t[l];
2189
2205
  dt(
2190
- h,
2206
+ v,
2191
2207
  () => {
2192
2208
  if (s) {
2193
- if (s.pending.delete(h), s.done.add(h), s.pending.size === 0) {
2194
- var p = (
2209
+ if (s.pending.delete(v), s.done.add(v), s.pending.size === 0) {
2210
+ var g = (
2195
2211
  /** @type {Set<EachOutroGroup>} */
2196
2212
  e.outrogroups
2197
2213
  );
2198
- nr(Cn(s.done)), p.delete(s), p.size === 0 && (e.outrogroups = null);
2214
+ nr(Tn(s.done)), g.delete(s), g.size === 0 && (e.outrogroups = null);
2199
2215
  }
2200
2216
  } else
2201
2217
  a -= 1;
@@ -2206,14 +2222,14 @@ function Ma(e, t, n) {
2206
2222
  if (a === 0) {
2207
2223
  var o = r.length === 0 && n !== null;
2208
2224
  if (o) {
2209
- var c = (
2225
+ var f = (
2210
2226
  /** @type {Element} */
2211
2227
  n
2212
2228
  ), d = (
2213
2229
  /** @type {Element} */
2214
- c.parentNode
2230
+ f.parentNode
2215
2231
  );
2216
- Ti(d), d.append(c), e.items.clear();
2232
+ ki(d), d.append(f), e.items.clear();
2217
2233
  }
2218
2234
  nr(t, !o);
2219
2235
  } else
@@ -2227,130 +2243,130 @@ function nr(e, t = !0) {
2227
2243
  q(e[n], t);
2228
2244
  }
2229
2245
  var Br;
2230
- function Ra(e, t, n, r, i, s = null) {
2246
+ function Ma(e, t, n, r, i, s = null) {
2231
2247
  var a = e, l = /* @__PURE__ */ new Map();
2232
2248
  x && an();
2233
- var o = null, c = /* @__PURE__ */ sa(() => {
2234
- var _ = n();
2235
- return Xr(_) ? _ : _ == null ? [] : Cn(_);
2236
- }), d, h = !0;
2237
- function p() {
2238
- v.fallback = o, Oa(v, d, a, t, r), o !== null && (d.length === 0 ? (o.f & Ue) === 0 ? pr(o) : (o.f ^= Ue, Wt(o, null, a)) : dt(o, () => {
2249
+ var o = null, f = /* @__PURE__ */ ia(() => {
2250
+ var m = n();
2251
+ return Xr(m) ? m : m == null ? [] : Tn(m);
2252
+ }), d, v = !0;
2253
+ function g() {
2254
+ h.fallback = o, Ra(h, d, a, t, r), o !== null && (d.length === 0 ? (o.f & Ue) === 0 ? gr(o) : (o.f ^= Ue, Kt(o, null, a)) : dt(o, () => {
2239
2255
  o = null;
2240
2256
  }));
2241
2257
  }
2242
- var g = hr(() => {
2258
+ var p = hr(() => {
2243
2259
  d = /** @type {V[]} */
2244
- f(c);
2245
- var _ = d.length;
2246
- let m = !1;
2260
+ c(f);
2261
+ var m = d.length;
2262
+ let _ = !1;
2247
2263
  if (x) {
2248
- var C = ri(a) === Tn;
2249
- C !== (_ === 0) && (a = En(), ne(a), Fe(!1), m = !0);
2264
+ var S = ni(a) === kn;
2265
+ S !== (m === 0) && (a = $n(), te(a), Fe(!1), _ = !0);
2250
2266
  }
2251
- for (var S = /* @__PURE__ */ new Set(), ie = (
2267
+ for (var C = /* @__PURE__ */ new Set(), re = (
2252
2268
  /** @type {Batch} */
2253
2269
  O
2254
- ), Y = Ci(), I = 0; I < _; I += 1) {
2255
- x && k.nodeType === zt && /** @type {Comment} */
2256
- k.data === sr && (a = /** @type {Comment} */
2257
- k, m = !0, Fe(!1));
2258
- var ye = d[I], A = r(ye, I), P = h ? null : l.get(A);
2259
- P ? (P.v && Dt(P.v, ye), P.i && Dt(P.i, I), Y && ie.unskip_effect(P.e)) : (P = Na(
2270
+ ), H = Ti(), D = 0; D < m; D += 1) {
2271
+ x && T.nodeType === sn && /** @type {Comment} */
2272
+ T.data === sr && (a = /** @type {Comment} */
2273
+ T, _ = !0, Fe(!1));
2274
+ var we = d[D], A = r(we, D), I = v ? null : l.get(A);
2275
+ I ? (I.v && Dt(I.v, we), I.i && Dt(I.i, D), H && re.unskip_effect(I.e)) : (I = Oa(
2260
2276
  l,
2261
- h ? a : Br ?? (Br = be()),
2262
- ye,
2277
+ v ? a : Br ?? (Br = me()),
2278
+ we,
2263
2279
  A,
2264
- I,
2280
+ D,
2265
2281
  i,
2266
2282
  t,
2267
2283
  n
2268
- ), h || (P.e.f |= Ue), l.set(A, P)), S.add(A);
2284
+ ), v || (I.e.f |= Ue), l.set(A, I)), C.add(A);
2269
2285
  }
2270
- if (_ === 0 && s && !o && (h ? o = oe(() => s(a)) : (o = oe(() => s(Br ?? (Br = be()))), o.f |= Ue)), _ > S.size && Ds(), x && _ > 0 && ne(En()), !h)
2271
- if (Y) {
2272
- for (const [on, Dn] of l)
2273
- S.has(on) || ie.skip_effect(Dn.e);
2274
- ie.oncommit(p), ie.ondiscard(() => {
2286
+ if (m === 0 && s && !o && (v ? o = de(() => s(a)) : (o = de(() => s(Br ?? (Br = me()))), o.f |= Ue)), m > C.size && Ls(), x && m > 0 && te($n()), !v)
2287
+ if (H) {
2288
+ for (const [on, Ln] of l)
2289
+ C.has(on) || re.skip_effect(Ln.e);
2290
+ re.oncommit(g), re.ondiscard(() => {
2275
2291
  });
2276
2292
  } else
2277
- p();
2278
- m && Fe(!0), f(c);
2279
- }), v = { effect: g, items: l, outrogroups: null, fallback: o };
2280
- h = !1, x && (a = k);
2293
+ g();
2294
+ _ && Fe(!0), c(f);
2295
+ }), h = { effect: p, items: l, outrogroups: null, fallback: o };
2296
+ v = !1, x && (a = T);
2281
2297
  }
2282
- function Kt(e) {
2283
- for (; e !== null && (e.f & we) === 0; )
2298
+ function qt(e) {
2299
+ for (; e !== null && (e.f & be) === 0; )
2284
2300
  e = e.next;
2285
2301
  return e;
2286
2302
  }
2287
- function Oa(e, t, n, r, i) {
2288
- var s = t.length, a = e.items, l = Kt(e.effect.first), o, c = null, d = [], h = [], p, g, v, _;
2289
- for (_ = 0; _ < s; _ += 1) {
2290
- if (p = t[_], g = i(p, _), v = /** @type {EachItem} */
2291
- a.get(g).e, e.outrogroups !== null)
2292
- for (const P of e.outrogroups)
2293
- P.pending.delete(v), P.done.delete(v);
2294
- if ((v.f & Ue) !== 0)
2295
- if (v.f ^= Ue, v === l)
2296
- Wt(v, null, n);
2303
+ function Ra(e, t, n, r, i) {
2304
+ var s = t.length, a = e.items, l = qt(e.effect.first), o, f = null, d = [], v = [], g, p, h, m;
2305
+ for (m = 0; m < s; m += 1) {
2306
+ if (g = t[m], p = i(g, m), h = /** @type {EachItem} */
2307
+ a.get(p).e, e.outrogroups !== null)
2308
+ for (const I of e.outrogroups)
2309
+ I.pending.delete(h), I.done.delete(h);
2310
+ if ((h.f & Ue) !== 0)
2311
+ if (h.f ^= Ue, h === l)
2312
+ Kt(h, null, n);
2297
2313
  else {
2298
- var m = c ? c.next : l;
2299
- v === e.effect.last && (e.effect.last = v.prev), v.prev && (v.prev.next = v.next), v.next && (v.next.prev = v.prev), Ge(e, c, v), Ge(e, v, m), Wt(v, m, n), c = v, d = [], h = [], l = Kt(c.next);
2314
+ var _ = f ? f.next : l;
2315
+ h === e.effect.last && (e.effect.last = h.prev), h.prev && (h.prev.next = h.next), h.next && (h.next.prev = h.prev), Ge(e, f, h), Ge(e, h, _), Kt(h, _, n), f = h, d = [], v = [], l = qt(f.next);
2300
2316
  continue;
2301
2317
  }
2302
- if ((v.f & te) !== 0 && pr(v), v !== l) {
2303
- if (o !== void 0 && o.has(v)) {
2304
- if (d.length < h.length) {
2305
- var C = h[0], S;
2306
- c = C.prev;
2307
- var ie = d[0], Y = d[d.length - 1];
2308
- for (S = 0; S < d.length; S += 1)
2309
- Wt(d[S], C, n);
2310
- for (S = 0; S < h.length; S += 1)
2311
- o.delete(h[S]);
2312
- Ge(e, ie.prev, Y.next), Ge(e, c, ie), Ge(e, Y, C), l = C, c = Y, _ -= 1, d = [], h = [];
2318
+ if ((h.f & ee) !== 0 && gr(h), h !== l) {
2319
+ if (o !== void 0 && o.has(h)) {
2320
+ if (d.length < v.length) {
2321
+ var S = v[0], C;
2322
+ f = S.prev;
2323
+ var re = d[0], H = d[d.length - 1];
2324
+ for (C = 0; C < d.length; C += 1)
2325
+ Kt(d[C], S, n);
2326
+ for (C = 0; C < v.length; C += 1)
2327
+ o.delete(v[C]);
2328
+ Ge(e, re.prev, H.next), Ge(e, f, re), Ge(e, H, S), l = S, f = H, m -= 1, d = [], v = [];
2313
2329
  } else
2314
- o.delete(v), Wt(v, l, n), Ge(e, v.prev, v.next), Ge(e, v, c === null ? e.effect.first : c.next), Ge(e, c, v), c = v;
2330
+ o.delete(h), Kt(h, l, n), Ge(e, h.prev, h.next), Ge(e, h, f === null ? e.effect.first : f.next), Ge(e, f, h), f = h;
2315
2331
  continue;
2316
2332
  }
2317
- for (d = [], h = []; l !== null && l !== v; )
2318
- (o ?? (o = /* @__PURE__ */ new Set())).add(l), h.push(l), l = Kt(l.next);
2333
+ for (d = [], v = []; l !== null && l !== h; )
2334
+ (o ?? (o = /* @__PURE__ */ new Set())).add(l), v.push(l), l = qt(l.next);
2319
2335
  if (l === null)
2320
2336
  continue;
2321
2337
  }
2322
- (v.f & Ue) === 0 && d.push(v), c = v, l = Kt(v.next);
2338
+ (h.f & Ue) === 0 && d.push(h), f = h, l = qt(h.next);
2323
2339
  }
2324
2340
  if (e.outrogroups !== null) {
2325
- for (const P of e.outrogroups)
2326
- P.pending.size === 0 && (nr(Cn(P.done)), e.outrogroups?.delete(P));
2341
+ for (const I of e.outrogroups)
2342
+ I.pending.size === 0 && (nr(Tn(I.done)), e.outrogroups?.delete(I));
2327
2343
  e.outrogroups.size === 0 && (e.outrogroups = null);
2328
2344
  }
2329
2345
  if (l !== null || o !== void 0) {
2330
- var I = [];
2346
+ var D = [];
2331
2347
  if (o !== void 0)
2332
- for (v of o)
2333
- (v.f & te) === 0 && I.push(v);
2348
+ for (h of o)
2349
+ (h.f & ee) === 0 && D.push(h);
2334
2350
  for (; l !== null; )
2335
- (l.f & te) === 0 && l !== e.fallback && I.push(l), l = Kt(l.next);
2336
- var ye = I.length;
2337
- if (ye > 0) {
2351
+ (l.f & ee) === 0 && l !== e.fallback && D.push(l), l = qt(l.next);
2352
+ var we = D.length;
2353
+ if (we > 0) {
2338
2354
  var A = null;
2339
- Ma(e, I, A);
2355
+ Aa(e, D, A);
2340
2356
  }
2341
2357
  }
2342
2358
  }
2343
- function Na(e, t, n, r, i, s, a, l) {
2344
- var o = (a & bs) !== 0 ? (a & ys) === 0 ? /* @__PURE__ */ yi(n, !1, !1) : pt(n) : null, c = (a & ws) !== 0 ? pt(i) : null;
2359
+ function Oa(e, t, n, r, i, s, a, l) {
2360
+ var o = (a & ms) !== 0 ? (a & ws) === 0 ? /* @__PURE__ */ wi(n, !1, !1) : gt(n) : null, f = (a & bs) !== 0 ? gt(i) : null;
2345
2361
  return {
2346
2362
  v: o,
2347
- i: c,
2348
- e: oe(() => (s(t, o ?? n, c ?? i, l), () => {
2363
+ i: f,
2364
+ e: de(() => (s(t, o ?? n, f ?? i, l), () => {
2349
2365
  e.delete(r);
2350
2366
  }))
2351
2367
  };
2352
2368
  }
2353
- function Wt(e, t, n) {
2369
+ function Kt(e, t, n) {
2354
2370
  if (e.nodes)
2355
2371
  for (var r = e.nodes.start, i = e.nodes.end, s = t && (t.f & Ue) === 0 ? (
2356
2372
  /** @type {EffectNodes} */
@@ -2368,13 +2384,13 @@ function Wt(e, t, n) {
2368
2384
  function Ge(e, t, n) {
2369
2385
  t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
2370
2386
  }
2371
- function La(e, t, n, r, i) {
2387
+ function Na(e, t, n, r, i) {
2372
2388
  x && an();
2373
2389
  var s = t.$$slots?.[n], a = !1;
2374
2390
  s === !0 && (s = t.children, a = !0), s === void 0 || s(e, a ? () => r : r);
2375
2391
  }
2376
- function Da(e, t) {
2377
- Mi(() => {
2392
+ function La(e, t) {
2393
+ Ai(() => {
2378
2394
  var n = e.getRootNode(), r = (
2379
2395
  /** @type {ShadowRoot} */
2380
2396
  n.host ? (
@@ -2394,7 +2410,7 @@ function Da(e, t) {
2394
2410
  }
2395
2411
  const jr = [...`
2396
2412
  \r\f \v\uFEFF`];
2397
- function Ia(e, t, n) {
2413
+ function Da(e, t, n) {
2398
2414
  var r = "" + e;
2399
2415
  if (n) {
2400
2416
  for (var i in n)
@@ -2408,30 +2424,30 @@ function Ia(e, t, n) {
2408
2424
  }
2409
2425
  return r === "" ? null : r;
2410
2426
  }
2411
- function Pa(e, t) {
2427
+ function Ia(e, t) {
2412
2428
  return e == null ? null : String(e);
2413
2429
  }
2414
- function Fa(e, t, n, r, i, s) {
2430
+ function Pa(e, t, n, r, i, s) {
2415
2431
  var a = e.__className;
2416
2432
  if (x || a !== n || a === void 0) {
2417
- var l = Ia(n, r, s);
2433
+ var l = Da(n, r, s);
2418
2434
  (!x || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = n;
2419
2435
  } else if (s && i !== s)
2420
2436
  for (var o in s) {
2421
- var c = !!s[o];
2422
- (i == null || c !== !!i[o]) && e.classList.toggle(o, c);
2437
+ var f = !!s[o];
2438
+ (i == null || f !== !!i[o]) && e.classList.toggle(o, f);
2423
2439
  }
2424
2440
  return s;
2425
2441
  }
2426
2442
  function Ye(e, t, n, r) {
2427
2443
  var i = e.__style;
2428
2444
  if (x || i !== t) {
2429
- var s = Pa(t);
2445
+ var s = Ia(t);
2430
2446
  (!x || s !== e.getAttribute("style")) && (s == null ? e.removeAttribute("style") : e.style.cssText = s), e.__style = t;
2431
2447
  }
2432
2448
  return r;
2433
2449
  }
2434
- const za = /* @__PURE__ */ Symbol("is custom element"), Ba = /* @__PURE__ */ Symbol("is html"), ja = ni ? "link" : "LINK", Ha = ni ? "progress" : "PROGRESS";
2450
+ const Fa = /* @__PURE__ */ Symbol("is custom element"), za = /* @__PURE__ */ Symbol("is html"), Ba = ti ? "link" : "LINK", ja = ti ? "progress" : "PROGRESS";
2435
2451
  function dn(e) {
2436
2452
  if (x) {
2437
2453
  var t = !1, n = () => {
@@ -2446,7 +2462,7 @@ function dn(e) {
2446
2462
  }
2447
2463
  }
2448
2464
  };
2449
- e.__on_r = n, Ke(n), fa();
2465
+ e.__on_r = n, Ke(n), ua();
2450
2466
  }
2451
2467
  }
2452
2468
  function Hr(e, t) {
@@ -2454,34 +2470,34 @@ function Hr(e, t) {
2454
2470
  n.value === (n.value = // treat null and undefined the same for the initial value
2455
2471
  t ?? void 0) || // @ts-expect-error
2456
2472
  // `progress` elements always need their value set when it's `0`
2457
- e.value === t && (t !== 0 || e.nodeName !== Ha) || (e.value = t ?? "");
2473
+ e.value === t && (t !== 0 || e.nodeName !== ja) || (e.value = t ?? "");
2458
2474
  }
2459
- function Gn(e, t) {
2475
+ function Hn(e, t) {
2460
2476
  var n = mr(e);
2461
2477
  n.checked !== (n.checked = // treat null and undefined the same for the initial value
2462
2478
  t ?? void 0) && (e.checked = t);
2463
2479
  }
2464
2480
  function Xe(e, t, n, r) {
2465
2481
  var i = mr(e);
2466
- x && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === ja) || i[t] !== (i[t] = n) && (t === "loading" && (e[Os] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && Ga(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2482
+ x && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Ba) || i[t] !== (i[t] = n) && (t === "loading" && (e[Rs] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && Ha(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2467
2483
  }
2468
2484
  function mr(e) {
2469
2485
  return (
2470
2486
  /** @type {Record<string | symbol, unknown>} **/
2471
2487
  // @ts-expect-error
2472
2488
  e.__attributes ?? (e.__attributes = {
2473
- [za]: e.nodeName.includes("-"),
2474
- [Ba]: e.namespaceURI === Wr
2489
+ [Fa]: e.nodeName.includes("-"),
2490
+ [za]: e.namespaceURI === Wr
2475
2491
  })
2476
2492
  );
2477
2493
  }
2478
2494
  var Gr = /* @__PURE__ */ new Map();
2479
- function Ga(e) {
2495
+ function Ha(e) {
2480
2496
  var t = e.getAttribute("is") || e.nodeName, n = Gr.get(t);
2481
2497
  if (n) return n;
2482
2498
  Gr.set(t, n = []);
2483
2499
  for (var r, i = e, s = Element.prototype; s !== i; ) {
2484
- r = ks(i);
2500
+ r = xs(i);
2485
2501
  for (var a in r)
2486
2502
  r[a].set && n.push(a);
2487
2503
  i = Jr(i);
@@ -2492,10 +2508,10 @@ function Yr(e, t) {
2492
2508
  return e === t || e?.[hn] === t;
2493
2509
  }
2494
2510
  function br(e = {}, t, n, r) {
2495
- return Mi(() => {
2511
+ return Ai(() => {
2496
2512
  var i, s;
2497
2513
  return dr(() => {
2498
- i = s, s = [], gr(() => {
2514
+ i = s, s = [], pr(() => {
2499
2515
  e !== n(...s) && (t(e, ...s), i && Yr(n(...i), e) && t(null, ...i));
2500
2516
  });
2501
2517
  }), () => {
@@ -2505,7 +2521,7 @@ function br(e = {}, t, n, r) {
2505
2521
  };
2506
2522
  }), e;
2507
2523
  }
2508
- function _e(e, t, n, r) {
2524
+ function pe(e, t, n, r) {
2509
2525
  var i = (
2510
2526
  /** @type {V} */
2511
2527
  r
@@ -2515,32 +2531,32 @@ function _e(e, t, n, r) {
2515
2531
  e[t], l === void 0 && r !== void 0 && (l = a());
2516
2532
  var o;
2517
2533
  o = () => {
2518
- var p = (
2534
+ var g = (
2519
2535
  /** @type {V} */
2520
2536
  e[t]
2521
2537
  );
2522
- return p === void 0 ? a() : (s = !0, p);
2538
+ return g === void 0 ? a() : (s = !0, g);
2523
2539
  };
2524
- var c = !1, d = /* @__PURE__ */ Ln(() => (c = !1, o())), h = (
2540
+ var f = !1, d = /* @__PURE__ */ Nn(() => (f = !1, o())), v = (
2525
2541
  /** @type {Effect} */
2526
- T
2542
+ k
2527
2543
  );
2528
2544
  return (
2529
2545
  /** @type {() => V} */
2530
- (function(p, g) {
2546
+ (function(g, p) {
2531
2547
  if (arguments.length > 0) {
2532
- const v = g ? f(d) : p;
2533
- return E(d, v), c = !0, i !== void 0 && (i = v), p;
2548
+ const h = p ? c(d) : g;
2549
+ return E(d, h), f = !0, i !== void 0 && (i = h), g;
2534
2550
  }
2535
- return Je && c || (h.f & Be) !== 0 ? d.v : f(d);
2551
+ return Je && f || (v.f & Be) !== 0 ? d.v : c(d);
2536
2552
  })
2537
2553
  );
2538
2554
  }
2539
- function Ya(e) {
2540
- return new Va(e);
2555
+ function Ga(e) {
2556
+ return new Ya(e);
2541
2557
  }
2542
- var Pe, le;
2543
- class Va {
2558
+ var Pe, ae;
2559
+ class Ya {
2544
2560
  /**
2545
2561
  * @param {ComponentConstructorOptions & {
2546
2562
  * component: any;
@@ -2550,54 +2566,54 @@ class Va {
2550
2566
  /** @type {any} */
2551
2567
  y(this, Pe);
2552
2568
  /** @type {Record<string, any>} */
2553
- y(this, le);
2569
+ y(this, ae);
2554
2570
  var n = /* @__PURE__ */ new Map(), r = (s, a) => {
2555
- var l = /* @__PURE__ */ yi(a, !1, !1);
2571
+ var l = /* @__PURE__ */ wi(a, !1, !1);
2556
2572
  return n.set(s, l), l;
2557
2573
  };
2558
2574
  const i = new Proxy(
2559
2575
  { ...t.props || {}, $$events: {} },
2560
2576
  {
2561
2577
  get(s, a) {
2562
- return f(n.get(a) ?? r(a, Reflect.get(s, a)));
2578
+ return c(n.get(a) ?? r(a, Reflect.get(s, a)));
2563
2579
  },
2564
2580
  has(s, a) {
2565
- return a === Rs ? !0 : (f(n.get(a) ?? r(a, Reflect.get(s, a))), Reflect.has(s, a));
2581
+ return a === Ms ? !0 : (c(n.get(a) ?? r(a, Reflect.get(s, a))), Reflect.has(s, a));
2566
2582
  },
2567
2583
  set(s, a, l) {
2568
2584
  return E(n.get(a) ?? r(a, l), l), Reflect.set(s, a, l);
2569
2585
  }
2570
2586
  }
2571
2587
  );
2572
- b(this, le, (t.hydrate ? Ta : Vi)(t.component, {
2588
+ w(this, ae, (t.hydrate ? ka : Yi)(t.component, {
2573
2589
  target: t.target,
2574
2590
  anchor: t.anchor,
2575
2591
  props: i,
2576
2592
  context: t.context,
2577
2593
  intro: t.intro ?? !1,
2578
2594
  recover: t.recover
2579
- })), (!t?.props?.$$host || t.sync === !1) && ue(), b(this, Pe, i.$$events);
2580
- for (const s of Object.keys(u(this, le)))
2581
- s === "$set" || s === "$destroy" || s === "$on" || $n(this, s, {
2595
+ })), (!t?.props?.$$host || t.sync === !1) && le(), w(this, Pe, i.$$events);
2596
+ for (const s of Object.keys(u(this, ae)))
2597
+ s === "$set" || s === "$destroy" || s === "$on" || yn(this, s, {
2582
2598
  get() {
2583
- return u(this, le)[s];
2599
+ return u(this, ae)[s];
2584
2600
  },
2585
2601
  /** @param {any} value */
2586
2602
  set(a) {
2587
- u(this, le)[s] = a;
2603
+ u(this, ae)[s] = a;
2588
2604
  },
2589
2605
  enumerable: !0
2590
2606
  });
2591
- u(this, le).$set = /** @param {Record<string, any>} next */
2607
+ u(this, ae).$set = /** @param {Record<string, any>} next */
2592
2608
  (s) => {
2593
2609
  Object.assign(i, s);
2594
- }, u(this, le).$destroy = () => {
2595
- Ca(u(this, le));
2610
+ }, u(this, ae).$destroy = () => {
2611
+ Ta(u(this, ae));
2596
2612
  };
2597
2613
  }
2598
2614
  /** @param {Record<string, any>} props */
2599
2615
  $set(t) {
2600
- u(this, le).$set(t);
2616
+ u(this, ae).$set(t);
2601
2617
  }
2602
2618
  /**
2603
2619
  * @param {string} event
@@ -2615,12 +2631,12 @@ class Va {
2615
2631
  };
2616
2632
  }
2617
2633
  $destroy() {
2618
- u(this, le).$destroy();
2634
+ u(this, ae).$destroy();
2619
2635
  }
2620
2636
  }
2621
- Pe = new WeakMap(), le = new WeakMap();
2622
- let Ki;
2623
- typeof HTMLElement == "function" && (Ki = class extends HTMLElement {
2637
+ Pe = new WeakMap(), ae = new WeakMap();
2638
+ let qi;
2639
+ typeof HTMLElement == "function" && (qi = class extends HTMLElement {
2624
2640
  /**
2625
2641
  * @param {*} $$componentCtor
2626
2642
  * @param {*} $$slots
@@ -2685,16 +2701,16 @@ typeof HTMLElement == "function" && (Ki = class extends HTMLElement {
2685
2701
  };
2686
2702
  if (await Promise.resolve(), !this.$$cn || this.$$c)
2687
2703
  return;
2688
- const n = {}, r = Ua(this);
2704
+ const n = {}, r = Va(this);
2689
2705
  for (const i of this.$$s)
2690
2706
  i in r && (i === "default" && !this.$$d.children ? (this.$$d.children = t(i), n.default = !0) : n[i] = t(i));
2691
2707
  for (const i of this.attributes) {
2692
2708
  const s = this.$$g_p(i.name);
2693
- s in this.$$d || (this.$$d[s] = wn(s, i.value, this.$$p_d, "toProp"));
2709
+ s in this.$$d || (this.$$d[s] = bn(s, i.value, this.$$p_d, "toProp"));
2694
2710
  }
2695
2711
  for (const i in this.$$p_d)
2696
2712
  !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
2697
- this.$$c = Ya({
2713
+ this.$$c = Ga({
2698
2714
  component: this.$$ctor,
2699
2715
  target: this.$$shadowRoot || this,
2700
2716
  props: {
@@ -2702,13 +2718,13 @@ typeof HTMLElement == "function" && (Ki = class extends HTMLElement {
2702
2718
  $$slots: n,
2703
2719
  $$host: this
2704
2720
  }
2705
- }), this.$$me = va(() => {
2721
+ }), this.$$me = ha(() => {
2706
2722
  dr(() => {
2707
2723
  this.$$r = !0;
2708
- for (const i of yn(this.$$c)) {
2724
+ for (const i of wn(this.$$c)) {
2709
2725
  if (!this.$$p_d[i]?.reflect) continue;
2710
2726
  this.$$d[i] = this.$$c[i];
2711
- const s = wn(
2727
+ const s = bn(
2712
2728
  i,
2713
2729
  this.$$d[i],
2714
2730
  this.$$p_d,
@@ -2735,7 +2751,7 @@ typeof HTMLElement == "function" && (Ki = class extends HTMLElement {
2735
2751
  * @param {string} newValue
2736
2752
  */
2737
2753
  attributeChangedCallback(t, n, r) {
2738
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = wn(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
2754
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = bn(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
2739
2755
  }
2740
2756
  disconnectedCallback() {
2741
2757
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -2746,12 +2762,12 @@ typeof HTMLElement == "function" && (Ki = class extends HTMLElement {
2746
2762
  * @param {string} attribute_name
2747
2763
  */
2748
2764
  $$g_p(t) {
2749
- return yn(this.$$p_d).find(
2765
+ return wn(this.$$p_d).find(
2750
2766
  (n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
2751
2767
  ) || t;
2752
2768
  }
2753
2769
  });
2754
- function wn(e, t, n, r) {
2770
+ function bn(e, t, n, r) {
2755
2771
  const i = n[e]?.type;
2756
2772
  if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
2757
2773
  return t;
@@ -2781,7 +2797,7 @@ function wn(e, t, n, r) {
2781
2797
  return t;
2782
2798
  }
2783
2799
  }
2784
- function Ua(e) {
2800
+ function Va(e) {
2785
2801
  const t = {};
2786
2802
  return e.childNodes.forEach((n) => {
2787
2803
  t[
@@ -2791,32 +2807,32 @@ function Ua(e) {
2791
2807
  }), t;
2792
2808
  }
2793
2809
  function wr(e, t, n, r, i, s) {
2794
- let a = class extends Ki {
2810
+ let a = class extends qi {
2795
2811
  constructor() {
2796
2812
  super(e, n, i), this.$$p_d = t;
2797
2813
  }
2798
2814
  static get observedAttributes() {
2799
- return yn(t).map(
2815
+ return wn(t).map(
2800
2816
  (l) => (t[l].attribute || l).toLowerCase()
2801
2817
  );
2802
2818
  }
2803
2819
  };
2804
- return yn(t).forEach((l) => {
2805
- $n(a.prototype, l, {
2820
+ return wn(t).forEach((l) => {
2821
+ yn(a.prototype, l, {
2806
2822
  get() {
2807
2823
  return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
2808
2824
  },
2809
2825
  set(o) {
2810
- o = wn(l, o, t), this.$$d[l] = o;
2811
- var c = this.$$c;
2812
- if (c) {
2813
- var d = wt(c, l)?.get;
2814
- d ? c[l] = o : c.$set({ [l]: o });
2826
+ o = bn(l, o, t), this.$$d[l] = o;
2827
+ var f = this.$$c;
2828
+ if (f) {
2829
+ var d = wt(f, l)?.get;
2830
+ d ? f[l] = o : f.$set({ [l]: o });
2815
2831
  }
2816
2832
  }
2817
2833
  });
2818
2834
  }), r.forEach((l) => {
2819
- $n(a.prototype, l, {
2835
+ yn(a.prototype, l, {
2820
2836
  get() {
2821
2837
  return this.$$c?.[l];
2822
2838
  }
@@ -2832,7 +2848,7 @@ var Ur;
2832
2848
  (function(e) {
2833
2849
  e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
2834
2850
  })(Ur || (Ur = {}));
2835
- const qa = {
2851
+ const Ua = {
2836
2852
  /**
2837
2853
  * Visual accessibility features
2838
2854
  * For students with low vision, color blindness, or visual processing needs
@@ -3004,7 +3020,7 @@ const qa = {
3004
3020
  tutorialAvailable: "tutorialAvailable"
3005
3021
  }
3006
3022
  };
3007
- Object.values(qa).flatMap((e) => Object.values(e));
3023
+ Object.values(Ua).flatMap((e) => Object.values(e));
3008
3024
  var rr;
3009
3025
  (function(e) {
3010
3026
  e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
@@ -3013,129 +3029,125 @@ var qr;
3013
3029
  (function(e) {
3014
3030
  e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
3015
3031
  })(qr || (qr = {}));
3016
- var Ka = /* @__PURE__ */ _t('<button type="button" class="btn btn-ghost btn-sm btn-circle"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></button>');
3017
- function Wi(e, t) {
3018
- Rn(t, !0);
3019
- let n = _e(t, "buttonEl", 7, null), r = _e(t, "onClick"), i = _e(t, "ariaLabel", 7, "Settings"), s = _e(t, "active", 7, !1);
3032
+ var qa = /* @__PURE__ */ _t('<button type="button" class="btn btn-ghost btn-sm btn-circle"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></button>');
3033
+ function Ki(e, t) {
3034
+ Mn(t, !0);
3035
+ let n = pe(t, "buttonEl", 7, null), r = pe(t, "onClick"), i = pe(t, "ariaLabel", 7, "Settings"), s = pe(t, "active", 7, !1);
3020
3036
  var a = {
3021
3037
  get buttonEl() {
3022
3038
  return n();
3023
3039
  },
3024
3040
  set buttonEl(o = null) {
3025
- n(o), ue();
3041
+ n(o), le();
3026
3042
  },
3027
3043
  get onClick() {
3028
3044
  return r();
3029
3045
  },
3030
3046
  set onClick(o) {
3031
- r(o), ue();
3047
+ r(o), le();
3032
3048
  },
3033
3049
  get ariaLabel() {
3034
3050
  return i();
3035
3051
  },
3036
3052
  set ariaLabel(o = "Settings") {
3037
- i(o), ue();
3053
+ i(o), le();
3038
3054
  },
3039
3055
  get active() {
3040
3056
  return s();
3041
3057
  },
3042
3058
  set active(o = !1) {
3043
- s(o), ue();
3059
+ s(o), le();
3044
3060
  }
3045
- }, l = Ka();
3046
- return l.__click = function(...o) {
3047
- r()?.apply(this, o);
3048
- }, br(l, (o) => n(o), () => n()), nt(() => {
3061
+ }, l = qa();
3062
+ return br(l, (o) => n(o), () => n()), nt(() => {
3049
3063
  Xe(l, "aria-label", i()), Xe(l, "aria-pressed", s());
3050
- }), Te(e, l), On(a);
3064
+ }), ke("click", l, function(...o) {
3065
+ r()?.apply(this, o);
3066
+ }), Te(e, l), Rn(a);
3051
3067
  }
3052
3068
  _r(["click"]);
3053
- wr(Wi, { buttonEl: {}, onClick: {}, ariaLabel: {}, active: {} }, [], [], { mode: "open" });
3054
- var Wa = /* @__PURE__ */ _t('<div class="fixed inset-0" aria-hidden="true" style="z-index: 4000;"></div> <div class="tool-settings-panel fixed w-80 rounded-box bg-base-100 shadow p-3 text-base-content" role="dialog" tabindex="-1"><div class="flex items-center justify-between gap-2 mb-2"><h2 class="font-semibold text-sm"> </h2> <button type="button" class="btn btn-ghost btn-xs" aria-label="Close settings">Close</button></div> <div class="text-sm"><!></div></div>', 1);
3055
- function Xi(e, t) {
3056
- Rn(t, !0);
3057
- let n = _e(t, "open"), r = _e(t, "title", 7, "Settings"), i = _e(t, "onClose"), s = _e(t, "anchorEl", 7, null), a = /* @__PURE__ */ R(null), l = /* @__PURE__ */ R(null);
3058
- function o(g) {
3059
- g.key === "Escape" && i()();
3069
+ wr(Ki, { buttonEl: {}, onClick: {}, ariaLabel: {}, active: {} }, [], [], { mode: "open" });
3070
+ var Ka = /* @__PURE__ */ _t('<div class="fixed inset-0" aria-hidden="true" style="z-index: 4000;"></div> <div class="tool-settings-panel fixed w-80 rounded-box bg-base-100 shadow p-3 text-base-content" role="dialog" tabindex="-1"><div class="flex items-center justify-between gap-2 mb-2"><h2 class="font-semibold text-sm"> </h2> <button type="button" class="btn btn-ghost btn-xs" aria-label="Close settings">Close</button></div> <div class="text-sm"><!></div></div>', 1);
3071
+ function Wi(e, t) {
3072
+ Mn(t, !0);
3073
+ let n = pe(t, "open"), r = pe(t, "title", 7, "Settings"), i = pe(t, "onClose"), s = pe(t, "anchorEl", 7, null), a = /* @__PURE__ */ R(null), l = /* @__PURE__ */ R(null);
3074
+ function o(p) {
3075
+ p.key === "Escape" && i()();
3060
3076
  }
3061
3077
  yt(() => {
3062
- n() && queueMicrotask(() => f(a)?.focus?.());
3078
+ n() && queueMicrotask(() => c(a)?.focus?.());
3063
3079
  }), yt(() => {
3064
3080
  if (n() && s()) {
3065
- const g = s().getBoundingClientRect(), v = 320, _ = 8, m = g.right + _;
3066
- m + v <= window.innerWidth ? E(l, { top: g.top, left: m }, !0) : E(
3081
+ const p = s().getBoundingClientRect(), h = 320, m = 8, _ = p.right + m;
3082
+ _ + h <= window.innerWidth ? E(l, { top: p.top, left: _ }, !0) : E(
3067
3083
  l,
3068
3084
  {
3069
- top: g.top,
3070
- right: window.innerWidth - g.left + _
3085
+ top: p.top,
3086
+ right: window.innerWidth - p.left + m
3071
3087
  },
3072
3088
  !0
3073
3089
  );
3074
3090
  } else
3075
3091
  E(l, null);
3076
- }), qi(() => {
3077
- const g = (v) => {
3092
+ }), Ui(() => {
3093
+ const p = (h) => {
3078
3094
  if (!n()) return;
3079
- const _ = v.target;
3080
- _ && (f(a)?.contains(_) || s()?.contains(_) || i()());
3095
+ const m = h.target;
3096
+ m && (c(a)?.contains(m) || s()?.contains(m) || i()());
3081
3097
  };
3082
- return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
3098
+ return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
3083
3099
  });
3084
- var c = {
3100
+ var f = {
3085
3101
  get open() {
3086
3102
  return n();
3087
3103
  },
3088
- set open(g) {
3089
- n(g), ue();
3104
+ set open(p) {
3105
+ n(p), le();
3090
3106
  },
3091
3107
  get title() {
3092
3108
  return r();
3093
3109
  },
3094
- set title(g = "Settings") {
3095
- r(g), ue();
3110
+ set title(p = "Settings") {
3111
+ r(p), le();
3096
3112
  },
3097
3113
  get onClose() {
3098
3114
  return i();
3099
3115
  },
3100
- set onClose(g) {
3101
- i(g), ue();
3116
+ set onClose(p) {
3117
+ i(p), le();
3102
3118
  },
3103
3119
  get anchorEl() {
3104
3120
  return s();
3105
3121
  },
3106
- set anchorEl(g = null) {
3107
- s(g), ue();
3122
+ set anchorEl(p = null) {
3123
+ s(p), le();
3108
3124
  }
3109
- }, d = Yi(), h = tt(d);
3125
+ }, d = Gi(), v = tt(d);
3110
3126
  {
3111
- var p = (g) => {
3112
- var v = Wa(), _ = tt(v);
3113
- _.__mousedown = function(...A) {
3127
+ var g = (p) => {
3128
+ var h = Ka(), m = tt(h), _ = P(m, 2), S = Y(_), C = Y(S), re = Y(C, !0);
3129
+ G(C);
3130
+ var H = P(C, 2);
3131
+ G(S);
3132
+ var D = P(S, 2), we = Y(D);
3133
+ Na(we, t, "default", {}), G(D), G(_), br(_, (A) => E(a, A), () => c(a)), nt(() => {
3134
+ Xe(_, "aria-label", r()), Ye(_, `z-index: 4100; ${c(l) ? `top: ${c(l).top}px; ${c(l).left !== void 0 ? `left: ${c(l).left}px;` : `right: ${c(l).right}px;`}` : "top: 4rem; right: 1rem;"}`), _n(re, r());
3135
+ }), ke("mousedown", m, function(...A) {
3114
3136
  i()?.apply(this, A);
3115
- };
3116
- var m = z(_, 2);
3117
- m.__keydown = o;
3118
- var C = U(m), S = U(C), ie = U(S, !0);
3119
- V(S);
3120
- var Y = z(S, 2);
3121
- Y.__click = function(...A) {
3137
+ }), ke("keydown", _, o), ke("click", H, function(...A) {
3122
3138
  i()?.apply(this, A);
3123
- }, V(C);
3124
- var I = z(C, 2), ye = U(I);
3125
- La(ye, t, "default", {}), V(I), V(m), br(m, (A) => E(a, A), () => f(a)), nt(() => {
3126
- Xe(m, "aria-label", r()), Ye(m, `z-index: 4100; ${f(l) ? `top: ${f(l).top}px; ${f(l).left !== void 0 ? `left: ${f(l).left}px;` : `right: ${f(l).right}px;`}` : "top: 4rem; right: 1rem;"}`), mn(ie, r());
3127
- }), Te(g, v);
3139
+ }), Te(p, h);
3128
3140
  };
3129
- bn(h, (g) => {
3130
- n() && g(p);
3141
+ mn(v, (p) => {
3142
+ n() && p(g);
3131
3143
  });
3132
3144
  }
3133
- return Te(e, d), On(c);
3145
+ return Te(e, d), Rn(f);
3134
3146
  }
3135
3147
  _r(["mousedown", "keydown", "click"]);
3136
- wr(Xi, { open: {}, title: {}, onClose: {}, anchorEl: {} }, ["default"], [], { mode: "open" });
3137
- var Xa = /* @__PURE__ */ _t('<div class="line-reader-mask line-reader-mask-top svelte-1a3d6dx" aria-hidden="true"></div> <div class="line-reader-mask line-reader-mask-bottom svelte-1a3d6dx" aria-hidden="true"></div> <div class="line-reader-mask line-reader-mask-left svelte-1a3d6dx" aria-hidden="true"></div> <div class="line-reader-mask line-reader-mask-right svelte-1a3d6dx" aria-hidden="true"></div>', 1), Ja = /* @__PURE__ */ _t('<label><input type="radio" name="color"/> <div class="color-swatch"></div> <span> </span></label>'), Qa = /* @__PURE__ */ _t('<fieldset class="setting-group"><legend>Color</legend> <!></fieldset> <div class="setting-group"><div class="setting-label"><span>Opacity</span> <span class="setting-value" aria-live="polite"> </span></div> <input type="range" min="10" max="90" step="5" aria-label="Opacity" aria-valuemin="10" aria-valuemax="90"/></div>', 1), Za = /* @__PURE__ */ _t('<fieldset class="setting-group"><legend>Mode</legend> <label><input type="radio" name="mode" value="highlight"/> <span>Highlight</span></label> <label><input type="radio" name="mode" value="obscure"/> <span>Masking</span></label></fieldset> <!>', 1), el = /* @__PURE__ */ _t('<div class="sr-only svelte-1a3d6dx" role="status" aria-live="polite" aria-atomic="true"> </div> <!> <div role="application" tabindex="0" aria-roledescription="Draggable and resizable reading guide overlay"><div class="line-reader-container svelte-1a3d6dx"><!></div> <div class="resize-handle resize-handle-bottom svelte-1a3d6dx" title="Drag to resize height" role="button" tabindex="-1" aria-label="Resize handle - drag to adjust height"><svg width="20" height="8" viewBox="0 0 20 8" aria-hidden="true"><rect x="8" y="3" width="4" height="2" fill="#4CAF50" rx="1"></rect></svg></div></div> <!>', 1);
3138
- const tl = {
3148
+ wr(Wi, { open: {}, title: {}, onClose: {}, anchorEl: {} }, ["default"], [], { mode: "open" });
3149
+ var Wa = /* @__PURE__ */ _t('<div class="line-reader-mask line-reader-mask-top svelte-1a3d6dx" aria-hidden="true"></div> <div class="line-reader-mask line-reader-mask-bottom svelte-1a3d6dx" aria-hidden="true"></div> <div class="line-reader-mask line-reader-mask-left svelte-1a3d6dx" aria-hidden="true"></div> <div class="line-reader-mask line-reader-mask-right svelte-1a3d6dx" aria-hidden="true"></div>', 1), Xa = /* @__PURE__ */ _t('<label><input type="radio" name="color"/> <div class="color-swatch"></div> <span> </span></label>'), Ja = /* @__PURE__ */ _t('<fieldset class="setting-group"><legend>Color</legend> <!></fieldset> <div class="setting-group"><div class="setting-label"><span>Opacity</span> <span class="setting-value" aria-live="polite"> </span></div> <input type="range" min="10" max="90" step="5" aria-label="Opacity" aria-valuemin="10" aria-valuemax="90"/></div>', 1), Qa = /* @__PURE__ */ _t('<fieldset class="setting-group"><legend>Mode</legend> <label><input type="radio" name="mode" value="highlight"/> <span>Highlight</span></label> <label><input type="radio" name="mode" value="obscure"/> <span>Masking</span></label></fieldset> <!>', 1), Za = /* @__PURE__ */ _t('<div class="sr-only svelte-1a3d6dx" role="status" aria-live="polite" aria-atomic="true"> </div> <!> <div role="application" tabindex="0" aria-roledescription="Draggable and resizable reading guide overlay"><div class="line-reader-container svelte-1a3d6dx"><!></div> <div class="resize-handle resize-handle-bottom svelte-1a3d6dx" title="Drag to resize height" role="button" tabindex="-1" aria-label="Resize handle - drag to adjust height"><svg width="20" height="8" viewBox="0 0 20 8" aria-hidden="true"><rect x="8" y="3" width="4" height="2" fill="#4CAF50" rx="1"></rect></svg></div></div> <!>', 1);
3150
+ const el = {
3139
3151
  hash: "svelte-1a3d6dx",
3140
3152
  code: `.sr-only.svelte-1a3d6dx {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;}.line-reader-frame.svelte-1a3d6dx {border:2px solid rgba(76, 175, 80, 0.8);cursor:move;overflow:visible;position:absolute;transform:translate(-50%, -50%);user-select:none;pointer-events:auto;touch-action:none;}.line-reader-frame.svelte-1a3d6dx:focus {outline:3px solid #4A90E2;outline-offset:2px;}.line-reader-frame.svelte-1a3d6dx:focus-visible {outline:3px solid #4A90E2;outline-offset:2px;}.line-reader-container.svelte-1a3d6dx {width:100%;height:100%;position:relative;transition:background-color 0.2s ease;}.resize-handle.svelte-1a3d6dx {position:absolute;cursor:ns-resize;z-index:10;display:flex;align-items:center;justify-content:center;}.resize-handle-bottom.svelte-1a3d6dx {bottom:-10px;left:50%;transform:translateX(-50%);width:40px;height:16px;background-color:rgba(255, 255, 255, 0.9);border-radius:8px;border:2px solid #4CAF50;}.resize-handle.svelte-1a3d6dx:hover {background-color:rgba(76, 175, 80, 0.2);}.resize-handle.svelte-1a3d6dx:active {cursor:ns-resize;}.line-reader-frame.svelte-1a3d6dx:active {cursor:grabbing;}
3141
3153
 
@@ -3149,123 +3161,123 @@ const tl = {
3149
3161
 
3150
3162
  /* In masking mode, the window should be transparent to show content underneath */.line-reader-frame.masking-mode.svelte-1a3d6dx .line-reader-container:where(.svelte-1a3d6dx) {background-color:transparent !important;}`
3151
3163
  };
3152
- function nl(e, t) {
3153
- Rn(t, !0), Da(e, tl);
3154
- let n = _e(t, "visible", 7, !1), r = _e(t, "toolId", 7, "lineReader"), i = _e(t, "coordinator");
3164
+ function tl(e, t) {
3165
+ Mn(t, !0), La(e, el);
3166
+ let n = pe(t, "visible", 7, !1), r = pe(t, "toolId", 7, "lineReader"), i = pe(t, "coordinator");
3155
3167
  const s = typeof window < "u";
3156
- let a = /* @__PURE__ */ R(void 0), l = /* @__PURE__ */ R(void 0), o = /* @__PURE__ */ R(!1), c = /* @__PURE__ */ R(!1), d = /* @__PURE__ */ R(ze({
3168
+ let a = /* @__PURE__ */ R(void 0), l = /* @__PURE__ */ R(void 0), o = /* @__PURE__ */ R(!1), f = /* @__PURE__ */ R(!1), d = /* @__PURE__ */ R(ze({
3157
3169
  x: s ? window.innerWidth / 2 : 400,
3158
3170
  y: s ? window.innerHeight / 2 : 300
3159
- })), h = /* @__PURE__ */ R(ze({ width: 600, height: 60 })), p = /* @__PURE__ */ R(ze({ x: 0, y: 0 })), g = /* @__PURE__ */ R(ze({ width: 0, height: 0, mouseY: 0 })), v = /* @__PURE__ */ R(""), _ = /* @__PURE__ */ R(
3171
+ })), v = /* @__PURE__ */ R(ze({ width: 600, height: 60 })), g = /* @__PURE__ */ R(ze({ x: 0, y: 0 })), p = /* @__PURE__ */ R(ze({ width: 0, height: 0, mouseY: 0 })), h = /* @__PURE__ */ R(""), m = /* @__PURE__ */ R(
3160
3172
  "#ffff00"
3161
3173
  // Yellow
3162
- ), m = /* @__PURE__ */ R(0.3), C = /* @__PURE__ */ R("highlight"), S = /* @__PURE__ */ R(!1), ie = /* @__PURE__ */ R(!1);
3163
- const Y = [
3174
+ ), _ = /* @__PURE__ */ R(0.3), S = /* @__PURE__ */ R("highlight"), C = /* @__PURE__ */ R(!1), re = /* @__PURE__ */ R(!1);
3175
+ const H = [
3164
3176
  { name: "Yellow", value: "#ffff00" },
3165
3177
  { name: "Blue", value: "#00bfff" },
3166
3178
  { name: "Pink", value: "#ff69b4" },
3167
3179
  { name: "Green", value: "#00ff7f" },
3168
3180
  { name: "Orange", value: "#ffa500" }
3169
- ], I = 10, ye = 10;
3170
- function A(w) {
3171
- E(v, w, !0), setTimeout(() => E(v, ""), 1e3);
3181
+ ], D = 10, we = 10;
3182
+ function A(b) {
3183
+ E(h, b, !0), setTimeout(() => E(h, ""), 1e3);
3172
3184
  }
3173
- function P() {
3174
- const M = (Y.findIndex((Ze) => Ze.value === f(_)) + 1) % Y.length;
3175
- E(_, Y[M].value, !0), A(`Color changed to ${Y[M].name}`);
3185
+ function I() {
3186
+ const M = (H.findIndex((Ze) => Ze.value === c(m)) + 1) % H.length;
3187
+ E(m, H[M].value, !0), A(`Color changed to ${H[M].name}`);
3176
3188
  }
3177
- function on(w) {
3178
- E(m, Math.max(0.1, Math.min(0.9, f(m) + w)), !0), A(`Opacity ${Math.round(f(m) * 100)}%`);
3189
+ function on(b) {
3190
+ E(_, Math.max(0.1, Math.min(0.9, c(_) + b)), !0), A(`Opacity ${Math.round(c(_) * 100)}%`);
3179
3191
  }
3180
- function Dn() {
3181
- E(C, f(C) === "highlight" ? "obscure" : "highlight", !0), A(`Mode changed to ${f(C) === "highlight" ? "highlight" : "masking"}`);
3192
+ function Ln() {
3193
+ E(S, c(S) === "highlight" ? "obscure" : "highlight", !0), A(`Mode changed to ${c(S) === "highlight" ? "highlight" : "masking"}`);
3182
3194
  }
3183
- function Ji() {
3184
- E(S, !f(S));
3195
+ function Xi() {
3196
+ E(C, !c(C));
3185
3197
  }
3186
- function Qi() {
3187
- E(S, !1);
3198
+ function Ji() {
3199
+ E(C, !1);
3188
3200
  }
3189
- function Zi(w) {
3190
- E(_, w, !0);
3191
- const M = Y.find((Ze) => Ze.value === w)?.name || "Unknown";
3201
+ function Qi(b) {
3202
+ E(m, b, !0);
3203
+ const M = H.find((Ze) => Ze.value === b)?.name || "Unknown";
3192
3204
  A(`Color changed to ${M}`);
3193
3205
  }
3194
- function es(w) {
3195
- const M = w.target;
3206
+ function Zi(b) {
3207
+ const M = b.target;
3196
3208
  if (M.closest(".resize-handle"))
3197
- ns(w);
3209
+ ts(b);
3198
3210
  else {
3199
3211
  if (M.closest(".tool-settings-button") || M.closest(".tool-settings-panel"))
3200
3212
  return;
3201
- ts(w);
3213
+ es(b);
3202
3214
  }
3203
3215
  }
3204
- function ts(w) {
3205
- f(a) && (f(a).setPointerCapture(w.pointerId), E(o, !0), E(
3206
- p,
3216
+ function es(b) {
3217
+ c(a) && (c(a).setPointerCapture(b.pointerId), E(o, !0), E(
3218
+ g,
3207
3219
  {
3208
- x: w.clientX - f(d).x,
3209
- y: w.clientY - f(d).y
3220
+ x: b.clientX - c(d).x,
3221
+ y: b.clientY - c(d).y
3210
3222
  },
3211
3223
  !0
3212
- ), i()?.bringToFront(f(a)), f(a).addEventListener("pointermove", In), f(a).addEventListener("pointerup", Pn), w.preventDefault());
3224
+ ), i()?.bringToFront(c(a)), c(a).addEventListener("pointermove", Dn), c(a).addEventListener("pointerup", In), b.preventDefault());
3213
3225
  }
3214
- function ns(w) {
3215
- f(a) && (f(a).setPointerCapture(w.pointerId), E(c, !0), E(
3216
- g,
3226
+ function ts(b) {
3227
+ c(a) && (c(a).setPointerCapture(b.pointerId), E(f, !0), E(
3228
+ p,
3217
3229
  {
3218
- width: f(h).width,
3219
- height: f(h).height,
3220
- mouseY: w.clientY
3230
+ width: c(v).width,
3231
+ height: c(v).height,
3232
+ mouseY: b.clientY
3221
3233
  },
3222
3234
  !0
3223
- ), i()?.bringToFront(f(a)), f(a).addEventListener("pointermove", In), f(a).addEventListener("pointerup", Pn), w.preventDefault(), w.stopPropagation());
3235
+ ), i()?.bringToFront(c(a)), c(a).addEventListener("pointermove", Dn), c(a).addEventListener("pointerup", In), b.preventDefault(), b.stopPropagation());
3224
3236
  }
3225
- function In(w) {
3226
- if (f(o))
3237
+ function Dn(b) {
3238
+ if (c(o))
3227
3239
  E(
3228
3240
  d,
3229
3241
  {
3230
- x: w.clientX - f(p).x,
3231
- y: w.clientY - f(p).y
3242
+ x: b.clientX - c(g).x,
3243
+ y: b.clientY - c(g).y
3232
3244
  },
3233
3245
  !0
3234
3246
  );
3235
- else if (f(c)) {
3236
- const M = w.clientY - f(g).mouseY;
3237
- f(h).height = Math.max(20, Math.min(400, f(g).height + M));
3247
+ else if (c(f)) {
3248
+ const M = b.clientY - c(p).mouseY;
3249
+ c(v).height = Math.max(20, Math.min(400, c(p).height + M));
3238
3250
  }
3239
3251
  }
3240
- function Pn(w) {
3241
- f(a) && (f(a).releasePointerCapture(w.pointerId), f(a).removeEventListener("pointermove", In), f(a).removeEventListener("pointerup", Pn), E(o, !1), E(c, !1));
3252
+ function In(b) {
3253
+ c(a) && (c(a).releasePointerCapture(b.pointerId), c(a).removeEventListener("pointermove", Dn), c(a).removeEventListener("pointerup", In), E(o, !1), E(f, !1));
3242
3254
  }
3243
- function rs(w) {
3255
+ function ns(b) {
3244
3256
  let M = !1;
3245
- switch (w.key) {
3257
+ switch (b.key) {
3246
3258
  case "ArrowUp":
3247
- f(d).y -= I, A(`Moved up to ${Math.round(f(d).y)}`), M = !0;
3259
+ c(d).y -= D, A(`Moved up to ${Math.round(c(d).y)}`), M = !0;
3248
3260
  break;
3249
3261
  case "ArrowDown":
3250
- f(d).y += I, A(`Moved down to ${Math.round(f(d).y)}`), M = !0;
3262
+ c(d).y += D, A(`Moved down to ${Math.round(c(d).y)}`), M = !0;
3251
3263
  break;
3252
3264
  case "ArrowLeft":
3253
- f(d).x -= I, A(`Moved left to ${Math.round(f(d).x)}`), M = !0;
3265
+ c(d).x -= D, A(`Moved left to ${Math.round(c(d).x)}`), M = !0;
3254
3266
  break;
3255
3267
  case "ArrowRight":
3256
- f(d).x += I, A(`Moved right to ${Math.round(f(d).x)}`), M = !0;
3268
+ c(d).x += D, A(`Moved right to ${Math.round(c(d).x)}`), M = !0;
3257
3269
  break;
3258
3270
  case "+":
3259
3271
  case "=":
3260
- f(h).height = Math.min(400, f(h).height + ye), A(`Height ${f(h).height} pixels`), M = !0;
3272
+ c(v).height = Math.min(400, c(v).height + we), A(`Height ${c(v).height} pixels`), M = !0;
3261
3273
  break;
3262
3274
  case "-":
3263
3275
  case "_":
3264
- f(h).height = Math.max(20, f(h).height - ye), A(`Height ${f(h).height} pixels`), M = !0;
3276
+ c(v).height = Math.max(20, c(v).height - we), A(`Height ${c(v).height} pixels`), M = !0;
3265
3277
  break;
3266
3278
  case "c":
3267
3279
  case "C":
3268
- P(), M = !0;
3280
+ I(), M = !0;
3269
3281
  break;
3270
3282
  case "]":
3271
3283
  on(0.1), M = !0;
@@ -3275,155 +3287,154 @@ function nl(e, t) {
3275
3287
  break;
3276
3288
  case "m":
3277
3289
  case "M":
3278
- Dn(), M = !0;
3290
+ Ln(), M = !0;
3279
3291
  break;
3280
3292
  }
3281
- M && w.preventDefault();
3293
+ M && b.preventDefault();
3282
3294
  }
3283
3295
  yt(() => {
3284
- i() && r() && !f(ie) && (i().registerTool(r(), "Line Reader", void 0, rr.TOOL), E(ie, !0));
3285
- }), qi(() => () => {
3296
+ i() && r() && !c(re) && (i().registerTool(r(), "Line Reader", void 0, rr.TOOL), E(re, !0));
3297
+ }), Ui(() => () => {
3286
3298
  i() && r() && i().unregisterTool(r());
3287
3299
  }), yt(() => {
3288
- i() && f(a) && r() && i().updateToolElement(r(), f(a));
3300
+ i() && c(a) && r() && i().updateToolElement(r(), c(a));
3289
3301
  }), yt(() => {
3290
- n() && f(a) && setTimeout(() => f(a)?.focus(), 100);
3302
+ n() && c(a) && setTimeout(() => c(a)?.focus(), 100);
3291
3303
  });
3292
- let is = /* @__PURE__ */ ia(() => f(_) + Math.round(f(m) * 255).toString(16).padStart(2, "0"));
3293
- var ss = {
3304
+ let rs = /* @__PURE__ */ ra(() => c(m) + Math.round(c(_) * 255).toString(16).padStart(2, "0"));
3305
+ var is = {
3294
3306
  get visible() {
3295
3307
  return n();
3296
3308
  },
3297
- set visible(w = !1) {
3298
- n(w), ue();
3309
+ set visible(b = !1) {
3310
+ n(b), le();
3299
3311
  },
3300
3312
  get toolId() {
3301
3313
  return r();
3302
3314
  },
3303
- set toolId(w = "lineReader") {
3304
- r(w), ue();
3315
+ set toolId(b = "lineReader") {
3316
+ r(b), le();
3305
3317
  },
3306
3318
  get coordinator() {
3307
3319
  return i();
3308
3320
  },
3309
- set coordinator(w) {
3310
- i(w), ue();
3321
+ set coordinator(b) {
3322
+ i(b), le();
3311
3323
  }
3312
- }, $r = Yi(), as = tt($r);
3324
+ }, $r = Gi(), ss = tt($r);
3313
3325
  {
3314
- var ls = (w) => {
3315
- var M = el(), Ze = tt(M), os = U(Ze, !0);
3316
- V(Ze);
3317
- var Er = z(Ze, 2);
3326
+ var as = (b) => {
3327
+ var M = Za(), Ze = tt(M), ls = Y(Ze, !0);
3328
+ G(Ze);
3329
+ var Er = P(Ze, 2);
3318
3330
  {
3319
- var us = (J) => {
3320
- var Bt = Xa(), jt = tt(Bt), mt = z(jt, 2), bt = z(mt, 2), Ht = z(bt, 2);
3331
+ var os = (X) => {
3332
+ var zt = Wa(), Bt = tt(zt), mt = P(Bt, 2), bt = P(mt, 2), jt = P(bt, 2);
3321
3333
  nt(
3322
- (un, Gt) => {
3323
- Ye(jt, `height: ${un ?? ""}px;`), Ye(mt, `top: ${f(d).y + f(h).height / 2}px;`), Ye(bt, `top: ${f(d).y - f(h).height / 2}px; height: ${f(h).height ?? ""}px; width: ${Gt ?? ""}px;`), Ye(Ht, `top: ${f(d).y - f(h).height / 2}px; height: ${f(h).height ?? ""}px; left: ${f(d).x + f(h).width / 2}px;`);
3334
+ (un, Ht) => {
3335
+ Ye(Bt, `height: ${un ?? ""}px;`), Ye(mt, `top: ${c(d).y + c(v).height / 2}px;`), Ye(bt, `top: ${c(d).y - c(v).height / 2}px; height: ${c(v).height ?? ""}px; width: ${Ht ?? ""}px;`), Ye(jt, `top: ${c(d).y - c(v).height / 2}px; height: ${c(v).height ?? ""}px; left: ${c(d).x + c(v).width / 2}px;`);
3324
3336
  },
3325
3337
  [
3326
- () => Math.max(0, f(d).y - f(h).height / 2),
3327
- () => Math.max(0, f(d).x - f(h).width / 2)
3338
+ () => Math.max(0, c(d).y - c(v).height / 2),
3339
+ () => Math.max(0, c(d).x - c(v).width / 2)
3328
3340
  ]
3329
- ), Te(J, Bt);
3341
+ ), Te(X, zt);
3330
3342
  };
3331
- bn(Er, (J) => {
3332
- f(C) === "obscure" && J(us);
3343
+ mn(Er, (X) => {
3344
+ c(S) === "obscure" && X(os);
3333
3345
  });
3334
3346
  }
3335
- var Re = z(Er, 2);
3347
+ var Re = P(Er, 2);
3336
3348
  let xr;
3337
- Re.__pointerdown = es, Re.__keydown = rs;
3338
- var Fn = U(Re), fs = U(Fn);
3339
- Wi(fs, {
3340
- onClick: Ji,
3349
+ var Pn = Y(Re), us = Y(Pn);
3350
+ Ki(us, {
3351
+ onClick: Xi,
3341
3352
  ariaLabel: "Line reader settings",
3342
3353
  get active() {
3343
- return f(S);
3354
+ return c(C);
3344
3355
  },
3345
3356
  get buttonEl() {
3346
- return f(l);
3357
+ return c(l);
3347
3358
  },
3348
- set buttonEl(J) {
3349
- E(l, J, !0);
3359
+ set buttonEl(X) {
3360
+ E(l, X, !0);
3350
3361
  }
3351
- }), V(Fn), vn(2), V(Re), br(Re, (J) => E(a, J), () => f(a));
3352
- var cs = z(Re, 2);
3353
- Xi(cs, {
3362
+ }), G(Pn), vn(2), G(Re), br(Re, (X) => E(a, X), () => c(a));
3363
+ var fs = P(Re, 2);
3364
+ Wi(fs, {
3354
3365
  get open() {
3355
- return f(S);
3366
+ return c(C);
3356
3367
  },
3357
3368
  title: "Line Reader Settings",
3358
- onClose: Qi,
3369
+ onClose: Ji,
3359
3370
  get anchorEl() {
3360
- return f(l);
3371
+ return c(l);
3361
3372
  },
3362
- children: (J, Bt) => {
3363
- var jt = Za(), mt = tt(jt), bt = z(U(mt), 2), Ht = U(bt);
3364
- dn(Ht), Ht.__change = () => {
3365
- E(C, "highlight"), A("Mode changed to highlight");
3366
- }, vn(2), V(bt);
3367
- var un = z(bt, 2), Gt = U(un);
3368
- dn(Gt), Gt.__change = () => {
3369
- E(C, "obscure"), A("Mode changed to masking");
3370
- }, vn(2), V(un), V(mt);
3371
- var ds = z(mt, 2);
3373
+ children: (X, zt) => {
3374
+ var Bt = Qa(), mt = tt(Bt), bt = P(Y(mt), 2), jt = Y(bt);
3375
+ dn(jt), vn(2), G(bt);
3376
+ var un = P(bt, 2), Ht = Y(un);
3377
+ dn(Ht), vn(2), G(un), G(mt);
3378
+ var cs = P(mt, 2);
3372
3379
  {
3373
- var hs = (zn) => {
3374
- var kr = Qa(), Bn = tt(kr), vs = z(U(Bn), 2);
3375
- Ra(vs, 17, () => Y, Aa, (Vt, et) => {
3376
- var Ut = Ja(), qt = U(Ut);
3377
- dn(qt), qt.__change = () => Zi(f(et).value);
3378
- var Sr = z(qt, 2), Ar = z(Sr, 2), gs = U(Ar, !0);
3379
- V(Ar), V(Ut), nt(() => {
3380
- Hr(qt, f(et).value), Gn(qt, f(_) === f(et).value), Ye(Sr, `background-color: ${f(et).value ?? ""};`), mn(gs, f(et).name);
3381
- }), Te(Vt, Ut);
3382
- }), V(Bn);
3383
- var Tr = z(Bn, 2), jn = U(Tr), Cr = z(U(jn), 2), ps = U(Cr);
3384
- V(Cr), V(jn);
3385
- var Yt = z(jn, 2);
3386
- dn(Yt), Yt.__input = (Vt) => {
3387
- E(m, Number(Vt.currentTarget.value) / 100), A(`Opacity ${Math.round(f(m) * 100)}%`);
3388
- }, V(Tr), nt(
3389
- (Vt, et, Ut) => {
3390
- mn(ps, `${Vt ?? ""}%`), Hr(Yt, f(m) * 100), Xe(Yt, "aria-valuenow", et), Xe(Yt, "aria-valuetext", `${Ut ?? ""} percent`);
3380
+ var ds = (Fn) => {
3381
+ var kr = Ja(), zn = tt(kr), hs = P(Y(zn), 2);
3382
+ Ma(hs, 17, () => H, Sa, (Yt, et) => {
3383
+ var Vt = Xa(), Ut = Y(Vt);
3384
+ dn(Ut);
3385
+ var Sr = P(Ut, 2), Ar = P(Sr, 2), gs = Y(Ar, !0);
3386
+ G(Ar), G(Vt), nt(() => {
3387
+ Hr(Ut, c(et).value), Hn(Ut, c(m) === c(et).value), Ye(Sr, `background-color: ${c(et).value ?? ""};`), _n(gs, c(et).name);
3388
+ }), ke("change", Ut, () => Qi(c(et).value)), Te(Yt, Vt);
3389
+ }), G(zn);
3390
+ var Tr = P(zn, 2), Bn = Y(Tr), Cr = P(Y(Bn), 2), vs = Y(Cr);
3391
+ G(Cr), G(Bn);
3392
+ var Gt = P(Bn, 2);
3393
+ dn(Gt), G(Tr), nt(
3394
+ (Yt, et, Vt) => {
3395
+ _n(vs, `${Yt ?? ""}%`), Hr(Gt, c(_) * 100), Xe(Gt, "aria-valuenow", et), Xe(Gt, "aria-valuetext", `${Vt ?? ""} percent`);
3391
3396
  },
3392
3397
  [
3393
- () => Math.round(f(m) * 100),
3394
- () => Math.round(f(m) * 100),
3395
- () => Math.round(f(m) * 100)
3398
+ () => Math.round(c(_) * 100),
3399
+ () => Math.round(c(_) * 100),
3400
+ () => Math.round(c(_) * 100)
3396
3401
  ]
3397
- ), Te(zn, kr);
3402
+ ), ke("input", Gt, (Yt) => {
3403
+ E(_, Number(Yt.currentTarget.value) / 100), A(`Opacity ${Math.round(c(_) * 100)}%`);
3404
+ }), Te(Fn, kr);
3398
3405
  };
3399
- bn(ds, (zn) => {
3400
- f(C) === "highlight" && zn(hs);
3406
+ mn(cs, (Fn) => {
3407
+ c(S) === "highlight" && Fn(ds);
3401
3408
  });
3402
3409
  }
3403
3410
  nt(() => {
3404
- Gn(Ht, f(C) === "highlight"), Gn(Gt, f(C) === "obscure");
3405
- }), Te(J, jt);
3411
+ Hn(jt, c(S) === "highlight"), Hn(Ht, c(S) === "obscure");
3412
+ }), ke("change", jt, () => {
3413
+ E(S, "highlight"), A("Mode changed to highlight");
3414
+ }), ke("change", Ht, () => {
3415
+ E(S, "obscure"), A("Mode changed to masking");
3416
+ }), Te(X, Bt);
3406
3417
  },
3407
3418
  $$slots: { default: !0 }
3408
3419
  }), nt(
3409
- (J, Bt) => {
3410
- mn(os, f(v)), xr = Fa(Re, 1, "line-reader-frame svelte-1a3d6dx", null, xr, { "masking-mode": f(C) === "obscure" }), Ye(Re, `left: ${f(d).x ?? ""}px; top: ${f(d).y ?? ""}px; width: ${f(h).width ?? ""}px; height: ${f(h).height ?? ""}px;`), Xe(Re, "aria-label", `Line Reader tool. Mode: ${f(C) === "highlight" ? "Highlight" : "Masking"}. Use arrow keys to move, +/- to resize height, C to change color, [ and ] to adjust opacity, M to toggle mode. Current color: ${J ?? ""}, Opacity: ${Bt ?? ""}%`), Ye(Fn, `background-color: ${f(is) ?? ""};`);
3420
+ (X, zt) => {
3421
+ _n(ls, c(h)), xr = Pa(Re, 1, "line-reader-frame svelte-1a3d6dx", null, xr, { "masking-mode": c(S) === "obscure" }), Ye(Re, `left: ${c(d).x ?? ""}px; top: ${c(d).y ?? ""}px; width: ${c(v).width ?? ""}px; height: ${c(v).height ?? ""}px;`), Xe(Re, "aria-label", `Line Reader tool. Mode: ${c(S) === "highlight" ? "Highlight" : "Masking"}. Use arrow keys to move, +/- to resize height, C to change color, [ and ] to adjust opacity, M to toggle mode. Current color: ${X ?? ""}, Opacity: ${zt ?? ""}%`), Ye(Pn, `background-color: ${c(rs) ?? ""};`);
3411
3422
  },
3412
3423
  [
3413
- () => Y.find((J) => J.value === f(_))?.name,
3414
- () => Math.round(f(m) * 100)
3424
+ () => H.find((X) => X.value === c(m))?.name,
3425
+ () => Math.round(c(_) * 100)
3415
3426
  ]
3416
- ), Te(w, M);
3427
+ ), ke("pointerdown", Re, Zi), ke("keydown", Re, ns), Te(b, M);
3417
3428
  };
3418
- bn(as, (w) => {
3419
- n() && w(ls);
3429
+ mn(ss, (b) => {
3430
+ n() && b(as);
3420
3431
  });
3421
3432
  }
3422
- return Te(e, $r), On(ss);
3433
+ return Te(e, $r), Rn(is);
3423
3434
  }
3424
3435
  _r(["pointerdown", "keydown", "change", "input"]);
3425
3436
  customElements.define("pie-tool-line-reader", wr(
3426
- nl,
3437
+ tl,
3427
3438
  {
3428
3439
  visible: { attribute: "visible", type: "Boolean" },
3429
3440
  toolId: { attribute: "tool-id", type: "String" },
@@ -3433,6 +3444,6 @@ customElements.define("pie-tool-line-reader", wr(
3433
3444
  []
3434
3445
  ));
3435
3446
  export {
3436
- nl as default
3447
+ tl as default
3437
3448
  };
3438
3449
  //# sourceMappingURL=tool-line-reader.js.map