@pie-players/pie-section-player 0.3.9 → 0.3.11

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,140 +1,140 @@
1
- var li = Object.defineProperty, Un = (e) => {
1
+ var ui = Object.defineProperty, Kn = (e) => {
2
2
  throw TypeError(e);
3
- }, ai = (e, t, o) => t in e ? li(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, m = (e, t, o) => ai(e, typeof t != "symbol" ? t + "" : t, o), en = (e, t, o) => t.has(e) || Un("Cannot " + o), u = (e, t, o) => (en(e, t, "read from private field"), o ? o.call(e) : t.get(e)), x = (e, t, o) => t.has(e) ? Un("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, o), I = (e, t, o, n) => (en(e, t, "write to private field"), t.set(e, o), o), M = (e, t, o) => (en(e, t, "access private method"), o), xn;
4
- typeof window < "u" && ((xn = window.__svelte ?? (window.__svelte = {})).v ?? (xn.v = /* @__PURE__ */ new Set())).add("5");
5
- const ci = 1, ui = 2, di = 16, fi = 1, hi = 2, Kn = "[", on = "[!", Sn = "[?", nn = "]", Ae = {}, N = /* @__PURE__ */ Symbol(), Jn = "http://www.w3.org/1999/xhtml", pi = !1;
6
- var Xn = Array.isArray, vi = Array.prototype.indexOf, ke = Array.prototype.includes, xo = Array.from, wo = Object.keys, To = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, gi = Object.getOwnPropertyDescriptors, mi = Object.prototype, bi = Array.prototype, Zn = Object.getPrototypeOf, An = Object.isExtensible;
7
- const yi = () => {
3
+ }, di = (e, t, o) => t in e ? ui(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, m = (e, t, o) => di(e, typeof t != "symbol" ? t + "" : t, o), on = (e, t, o) => t.has(e) || Kn("Cannot " + o), u = (e, t, o) => (on(e, t, "read from private field"), o ? o.call(e) : t.get(e)), x = (e, t, o) => t.has(e) ? Kn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, o), I = (e, t, o, n) => (on(e, t, "write to private field"), t.set(e, o), o), M = (e, t, o) => (on(e, t, "access private method"), o), Sn;
4
+ typeof window < "u" && ((Sn = window.__svelte ?? (window.__svelte = {})).v ?? (Sn.v = /* @__PURE__ */ new Set())).add("5");
5
+ const fi = 1, hi = 2, pi = 16, vi = 1, gi = 2, Jn = "[", nn = "[!", kn = "[?", rn = "]", kt = {}, N = /* @__PURE__ */ Symbol(), Xn = "http://www.w3.org/1999/xhtml", mi = !1;
6
+ var Zn = Array.isArray, bi = Array.prototype.indexOf, At = Array.prototype.includes, xo = Array.from, wo = Object.keys, To = Object.defineProperty, St = Object.getOwnPropertyDescriptor, yi = Object.getOwnPropertyDescriptors, wi = Object.prototype, Ti = Array.prototype, Yn = Object.getPrototypeOf, An = Object.isExtensible;
7
+ const Ii = () => {
8
8
  };
9
- function wi(e) {
9
+ function $i(e) {
10
10
  for (var t = 0; t < e.length; t++)
11
11
  e[t]();
12
12
  }
13
- function Yn() {
13
+ function Qn() {
14
14
  var e, t, o = new Promise((n, r) => {
15
15
  e = n, t = r;
16
16
  });
17
17
  return { promise: o, resolve: e, reject: t };
18
18
  }
19
- const j = 2, Oe = 4, _e = 8, rn = 1 << 24, Yt = 16, bt = 32, Qt = 64, zo = 128, ot = 512, V = 1024, z = 2048, mt = 4096, D = 8192, xt = 16384, be = 32768, Ce = 65536, kn = 1 << 17, Qn = 1 << 18, te = 1 << 19, Ti = 1 << 20, Rt = 1 << 25, fe = 65536, Wo = 1 << 21, sn = 1 << 22, Jt = 1 << 23, uo = /* @__PURE__ */ Symbol("$state"), Ii = /* @__PURE__ */ Symbol("legacy props"), $i = /* @__PURE__ */ Symbol(""), le = new class extends Error {
19
+ const j = 2, Ot = 4, _t = 8, sn = 1 << 24, Ye = 16, be = 32, Qe = 64, zo = 128, oe = 512, V = 1024, z = 2048, me = 4096, D = 8192, xe = 16384, bt = 32768, Ct = 65536, _n = 1 << 17, er = 1 << 18, et = 1 << 19, xi = 1 << 20, Re = 1 << 25, ft = 65536, Wo = 1 << 21, ln = 1 << 22, Je = 1 << 23, uo = /* @__PURE__ */ Symbol("$state"), Si = /* @__PURE__ */ Symbol("legacy props"), ki = /* @__PURE__ */ Symbol(""), lt = new class extends Error {
20
20
  constructor() {
21
21
  super(...arguments), m(this, "name", "StaleReactionError"), m(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
22
22
  }
23
- }(), xi = (
23
+ }(), Ai = (
24
24
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
25
25
  !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
26
- ), So = 3, Re = 8;
27
- function Si() {
26
+ ), So = 3, Rt = 8;
27
+ function _i() {
28
28
  throw new Error("https://svelte.dev/e/async_derived_orphan");
29
29
  }
30
- function Ai(e, t, o) {
30
+ function Ci(e, t, o) {
31
31
  throw new Error("https://svelte.dev/e/each_key_duplicate");
32
32
  }
33
- function ki(e) {
33
+ function Ei(e) {
34
34
  throw new Error("https://svelte.dev/e/effect_in_teardown");
35
35
  }
36
- function _i() {
36
+ function Pi() {
37
37
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
38
38
  }
39
- function Ci(e) {
39
+ function Li(e) {
40
40
  throw new Error("https://svelte.dev/e/effect_orphan");
41
41
  }
42
- function Ei() {
42
+ function Mi() {
43
43
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
44
44
  }
45
- function Pi() {
45
+ function Oi() {
46
46
  throw new Error("https://svelte.dev/e/hydration_failed");
47
47
  }
48
- function Li() {
48
+ function Ri() {
49
49
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
50
50
  }
51
- function Mi() {
51
+ function Ni() {
52
52
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
53
53
  }
54
- function Oi() {
54
+ function Vi() {
55
55
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
56
56
  }
57
- function Ri() {
57
+ function ji() {
58
58
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
59
59
  }
60
- function Ao(e) {
60
+ function ko(e) {
61
61
  console.warn("https://svelte.dev/e/hydration_mismatch");
62
62
  }
63
- function Ni() {
63
+ function zi() {
64
64
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
65
65
  }
66
66
  let E = !1;
67
- function pt(e) {
67
+ function pe(e) {
68
68
  E = e;
69
69
  }
70
70
  let _;
71
71
  function F(e) {
72
72
  if (e === null)
73
- throw Ao(), Ae;
73
+ throw ko(), kt;
74
74
  return _ = e;
75
75
  }
76
- function ko() {
77
- return F(/* @__PURE__ */ it(_));
76
+ function Ao() {
77
+ return F(/* @__PURE__ */ ie(_));
78
78
  }
79
79
  function ro(e) {
80
80
  if (E) {
81
- if (/* @__PURE__ */ it(_) !== null)
82
- throw Ao(), Ae;
81
+ if (/* @__PURE__ */ ie(_) !== null)
82
+ throw ko(), kt;
83
83
  _ = e;
84
84
  }
85
85
  }
86
- function Vi(e = 1) {
86
+ function Wi(e = 1) {
87
87
  if (E) {
88
88
  for (var t = e, o = _; t--; )
89
89
  o = /** @type {TemplateNode} */
90
- /* @__PURE__ */ it(o);
90
+ /* @__PURE__ */ ie(o);
91
91
  _ = o;
92
92
  }
93
93
  }
94
94
  function Io(e = !0) {
95
95
  for (var t = 0, o = _; ; ) {
96
- if (o.nodeType === Re) {
96
+ if (o.nodeType === Rt) {
97
97
  var n = (
98
98
  /** @type {Comment} */
99
99
  o.data
100
100
  );
101
- if (n === nn) {
101
+ if (n === rn) {
102
102
  if (t === 0) return o;
103
103
  t -= 1;
104
- } else (n === Kn || n === on || // "[1", "[2", etc. for if blocks
104
+ } else (n === Jn || n === nn || // "[1", "[2", etc. for if blocks
105
105
  n[0] === "[" && !isNaN(Number(n.slice(1)))) && (t += 1);
106
106
  }
107
107
  var r = (
108
108
  /** @type {TemplateNode} */
109
- /* @__PURE__ */ it(o)
109
+ /* @__PURE__ */ ie(o)
110
110
  );
111
111
  e && o.remove(), o = r;
112
112
  }
113
113
  }
114
114
  function tr(e) {
115
- if (!e || e.nodeType !== Re)
116
- throw Ao(), Ae;
115
+ if (!e || e.nodeType !== Rt)
116
+ throw ko(), kt;
117
117
  return (
118
118
  /** @type {Comment} */
119
119
  e.data
120
120
  );
121
121
  }
122
- function er(e) {
122
+ function or(e) {
123
123
  return e === this.v;
124
124
  }
125
- function ji(e, t) {
125
+ function qi(e, t) {
126
126
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
127
127
  }
128
- function or(e) {
129
- return !ji(e, this.v);
128
+ function nr(e) {
129
+ return !qi(e, this.v);
130
130
  }
131
- let zi = !1, rt = null;
132
- function Ee(e) {
133
- rt = e;
131
+ let Bi = !1, re = null;
132
+ function Et(e) {
133
+ re = e;
134
134
  }
135
- function nr(e, t = !1, o) {
136
- rt = {
137
- p: rt,
135
+ function rr(e, t = !1, o) {
136
+ re = {
137
+ p: re,
138
138
  i: !1,
139
139
  c: null,
140
140
  e: null,
@@ -143,52 +143,52 @@ function nr(e, t = !1, o) {
143
143
  l: null
144
144
  };
145
145
  }
146
- function rr(e) {
146
+ function ir(e) {
147
147
  var t = (
148
148
  /** @type {ComponentContext} */
149
- rt
149
+ re
150
150
  ), o = t.e;
151
151
  if (o !== null) {
152
152
  t.e = null;
153
153
  for (var n of o)
154
- Cr(n);
154
+ Er(n);
155
155
  }
156
- return e !== void 0 && (t.x = e), t.i = !0, rt = t.p, e ?? /** @type {T} */
156
+ return e !== void 0 && (t.x = e), t.i = !0, re = t.p, e ?? /** @type {T} */
157
157
  {};
158
158
  }
159
- function ir() {
159
+ function sr() {
160
160
  return !0;
161
161
  }
162
- let ae = [];
163
- function sr() {
164
- var e = ae;
165
- ae = [], wi(e);
162
+ let at = [];
163
+ function lr() {
164
+ var e = at;
165
+ at = [], $i(e);
166
166
  }
167
- function he(e) {
168
- if (ae.length === 0 && !Ue) {
169
- var t = ae;
167
+ function ht(e) {
168
+ if (at.length === 0 && !Ut) {
169
+ var t = at;
170
170
  queueMicrotask(() => {
171
- t === ae && sr();
171
+ t === at && lr();
172
172
  });
173
173
  }
174
- ae.push(e);
174
+ at.push(e);
175
175
  }
176
- function Wi() {
177
- for (; ae.length > 0; )
178
- sr();
176
+ function Di() {
177
+ for (; at.length > 0; )
178
+ lr();
179
179
  }
180
- function lr(e) {
181
- var t = A;
180
+ function ar(e) {
181
+ var t = k;
182
182
  if (t === null)
183
- return S.f |= Jt, e;
184
- if ((t.f & be) === 0 && (t.f & Oe) === 0)
183
+ return S.f |= Je, e;
184
+ if ((t.f & bt) === 0 && (t.f & Ot) === 0)
185
185
  throw e;
186
- Kt(e, t);
186
+ Ke(e, t);
187
187
  }
188
- function Kt(e, t) {
188
+ function Ke(e, t) {
189
189
  for (; t !== null; ) {
190
190
  if ((t.f & zo) !== 0) {
191
- if ((t.f & be) === 0)
191
+ if ((t.f & bt) === 0)
192
192
  throw e;
193
193
  try {
194
194
  t.b.error(e);
@@ -201,37 +201,37 @@ function Kt(e, t) {
201
201
  }
202
202
  throw e;
203
203
  }
204
- const qi = -7169;
204
+ const Hi = -7169;
205
205
  function O(e, t) {
206
- e.f = e.f & qi | t;
206
+ e.f = e.f & Hi | t;
207
207
  }
208
- function ln(e) {
209
- (e.f & ot) !== 0 || e.deps === null ? O(e, V) : O(e, mt);
208
+ function an(e) {
209
+ (e.f & oe) !== 0 || e.deps === null ? O(e, V) : O(e, me);
210
210
  }
211
- function ar(e) {
211
+ function cr(e) {
212
212
  if (e !== null)
213
213
  for (const t of e)
214
- (t.f & j) === 0 || (t.f & fe) === 0 || (t.f ^= fe, ar(
214
+ (t.f & j) === 0 || (t.f & ft) === 0 || (t.f ^= ft, cr(
215
215
  /** @type {Derived} */
216
216
  t.deps
217
217
  ));
218
218
  }
219
- function cr(e, t, o) {
220
- (e.f & z) !== 0 ? t.add(e) : (e.f & mt) !== 0 && o.add(e), ar(e.deps), O(e, V);
219
+ function ur(e, t, o) {
220
+ (e.f & z) !== 0 ? t.add(e) : (e.f & me) !== 0 && o.add(e), cr(e.deps), O(e, V);
221
221
  }
222
222
  const fo = /* @__PURE__ */ new Set();
223
- let L = null, gt = null, U = [], _o = null, Ue = !1, Pe = null, Bi = 1;
224
- var re, De, qt, ie, we, Ke, ce, Lt, He, Tt, qo, Bo, Do, Ho;
225
- const Di = class ur {
223
+ let L = null, ge = null, U = [], _o = null, Ut = !1, Pt = null, Fi = 1;
224
+ var rt, Dt, qe, it, wt, Kt, ct, Le, Ht, Te, qo, Bo, Do, Ho;
225
+ const Gi = class dr {
226
226
  constructor() {
227
- x(this, Tt), m(this, "id", Bi++), m(this, "current", /* @__PURE__ */ new Map()), m(this, "previous", /* @__PURE__ */ new Map()), x(this, re, /* @__PURE__ */ new Set()), x(this, De, /* @__PURE__ */ new Set()), x(this, qt, 0), x(this, ie, 0), x(this, we, null), x(this, Ke, /* @__PURE__ */ new Set()), x(this, ce, /* @__PURE__ */ new Set()), x(this, Lt, /* @__PURE__ */ new Map()), m(this, "is_fork", !1), x(this, He, !1);
227
+ x(this, Te), m(this, "id", Fi++), m(this, "current", /* @__PURE__ */ new Map()), m(this, "previous", /* @__PURE__ */ new Map()), x(this, rt, /* @__PURE__ */ new Set()), x(this, Dt, /* @__PURE__ */ new Set()), x(this, qe, 0), x(this, it, 0), x(this, wt, null), x(this, Kt, /* @__PURE__ */ new Set()), x(this, ct, /* @__PURE__ */ new Set()), x(this, Le, /* @__PURE__ */ new Map()), m(this, "is_fork", !1), x(this, Ht, !1);
228
228
  }
229
229
  /**
230
230
  * Add an effect to the #skipped_branches map and reset its children
231
231
  * @param {Effect} effect
232
232
  */
233
233
  skip_effect(t) {
234
- u(this, Lt).has(t) || u(this, Lt).set(t, { d: [], m: [] });
234
+ u(this, Le).has(t) || u(this, Le).set(t, { d: [], m: [] });
235
235
  }
236
236
  /**
237
237
  * Remove an effect from the #skipped_branches map and reschedule
@@ -239,13 +239,13 @@ const Di = class ur {
239
239
  * @param {Effect} effect
240
240
  */
241
241
  unskip_effect(t) {
242
- var o = u(this, Lt).get(t);
242
+ var o = u(this, Le).get(t);
243
243
  if (o) {
244
- u(this, Lt).delete(t);
244
+ u(this, Le).delete(t);
245
245
  for (var n of o.d)
246
- O(n, z), $t(n);
246
+ O(n, z), $e(n);
247
247
  for (n of o.m)
248
- O(n, mt), $t(n);
248
+ O(n, me), $e(n);
249
249
  }
250
250
  }
251
251
  /**
@@ -254,19 +254,19 @@ const Di = class ur {
254
254
  */
255
255
  process(t) {
256
256
  U = [], this.apply();
257
- var o = Pe = [], n = [];
257
+ var o = Pt = [], n = [];
258
258
  for (const r of t)
259
- M(this, Tt, Bo).call(this, r, o, n);
260
- if (Pe = null, M(this, Tt, qo).call(this)) {
261
- M(this, Tt, Do).call(this, n), M(this, Tt, Do).call(this, o);
262
- for (const [r, i] of u(this, Lt))
263
- pr(r, i);
259
+ M(this, Te, Bo).call(this, r, o, n);
260
+ if (Pt = null, M(this, Te, qo).call(this)) {
261
+ M(this, Te, Do).call(this, n), M(this, Te, Do).call(this, o);
262
+ for (const [r, i] of u(this, Le))
263
+ vr(r, i);
264
264
  } else {
265
265
  L = null;
266
- for (const r of u(this, re)) r(this);
267
- u(this, re).clear(), u(this, qt) === 0 && M(this, Tt, Ho).call(this), _n(n), _n(o), u(this, Ke).clear(), u(this, ce).clear(), u(this, we)?.resolve();
266
+ for (const r of u(this, rt)) r(this);
267
+ u(this, rt).clear(), u(this, qe) === 0 && M(this, Te, Ho).call(this), Cn(n), Cn(o), u(this, Kt).clear(), u(this, ct).clear(), u(this, wt)?.resolve();
268
268
  }
269
- gt = null;
269
+ ge = null;
270
270
  }
271
271
  /**
272
272
  * Associate a change to a given source with the current
@@ -275,65 +275,65 @@ const Di = class ur {
275
275
  * @param {any} value
276
276
  */
277
277
  capture(t, o) {
278
- o !== N && !this.previous.has(t) && this.previous.set(t, o), (t.f & Jt) === 0 && (this.current.set(t, t.v), gt?.set(t, t.v));
278
+ o !== N && !this.previous.has(t) && this.previous.set(t, o), (t.f & Je) === 0 && (this.current.set(t, t.v), ge?.set(t, t.v));
279
279
  }
280
280
  activate() {
281
281
  L = this, this.apply();
282
282
  }
283
283
  deactivate() {
284
- L === this && (L = null, gt = null);
284
+ L === this && (L = null, ge = null);
285
285
  }
286
286
  flush() {
287
287
  if (U.length > 0)
288
- L = this, dr();
289
- else if (u(this, qt) === 0 && !this.is_fork) {
290
- for (const t of u(this, re)) t(this);
291
- u(this, re).clear(), M(this, Tt, Ho).call(this), u(this, we)?.resolve();
288
+ L = this, fr();
289
+ else if (u(this, qe) === 0 && !this.is_fork) {
290
+ for (const t of u(this, rt)) t(this);
291
+ u(this, rt).clear(), M(this, Te, Ho).call(this), u(this, wt)?.resolve();
292
292
  }
293
293
  this.deactivate();
294
294
  }
295
295
  discard() {
296
- for (const t of u(this, De)) t(this);
297
- u(this, De).clear();
296
+ for (const t of u(this, Dt)) t(this);
297
+ u(this, Dt).clear();
298
298
  }
299
299
  /**
300
300
  *
301
301
  * @param {boolean} blocking
302
302
  */
303
303
  increment(t) {
304
- I(this, qt, u(this, qt) + 1), t && I(this, ie, u(this, ie) + 1);
304
+ I(this, qe, u(this, qe) + 1), t && I(this, it, u(this, it) + 1);
305
305
  }
306
306
  /**
307
307
  *
308
308
  * @param {boolean} blocking
309
309
  */
310
310
  decrement(t) {
311
- I(this, qt, u(this, qt) - 1), t && I(this, ie, u(this, ie) - 1), !u(this, He) && (I(this, He, !0), he(() => {
312
- I(this, He, !1), M(this, Tt, qo).call(this) ? U.length > 0 && this.flush() : this.revive();
311
+ I(this, qe, u(this, qe) - 1), t && I(this, it, u(this, it) - 1), !u(this, Ht) && (I(this, Ht, !0), ht(() => {
312
+ I(this, Ht, !1), M(this, Te, qo).call(this) ? U.length > 0 && this.flush() : this.revive();
313
313
  }));
314
314
  }
315
315
  revive() {
316
- for (const t of u(this, Ke))
317
- u(this, ce).delete(t), O(t, z), $t(t);
318
- for (const t of u(this, ce))
319
- O(t, mt), $t(t);
316
+ for (const t of u(this, Kt))
317
+ u(this, ct).delete(t), O(t, z), $e(t);
318
+ for (const t of u(this, ct))
319
+ O(t, me), $e(t);
320
320
  this.flush();
321
321
  }
322
322
  /** @param {(batch: Batch) => void} fn */
323
323
  oncommit(t) {
324
- u(this, re).add(t);
324
+ u(this, rt).add(t);
325
325
  }
326
326
  /** @param {(batch: Batch) => void} fn */
327
327
  ondiscard(t) {
328
- u(this, De).add(t);
328
+ u(this, Dt).add(t);
329
329
  }
330
330
  settled() {
331
- return (u(this, we) ?? I(this, we, Yn())).promise;
331
+ return (u(this, wt) ?? I(this, wt, Qn())).promise;
332
332
  }
333
333
  static ensure() {
334
334
  if (L === null) {
335
- const t = L = new ur();
336
- fo.add(L), Ue || he(() => {
335
+ const t = L = new dr();
336
+ fo.add(L), Ut || ht(() => {
337
337
  L === t && t.flush();
338
338
  });
339
339
  }
@@ -342,8 +342,8 @@ const Di = class ur {
342
342
  apply() {
343
343
  }
344
344
  };
345
- re = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakSet(), qo = function() {
346
- return this.is_fork || u(this, ie) > 0;
345
+ rt = /* @__PURE__ */ new WeakMap(), Dt = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakSet(), qo = function() {
346
+ return this.is_fork || u(this, it) > 0;
347
347
  }, /**
348
348
  * Traverse the effect tree, executing effects or stashing
349
349
  * them for later execution as appropriate
@@ -354,9 +354,9 @@ re = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), qt = /*
354
354
  Bo = function(e, t, o) {
355
355
  e.f ^= V;
356
356
  for (var n = e.first; n !== null; ) {
357
- var r = n.f, i = (r & (bt | Qt)) !== 0, s = i && (r & V) !== 0, l = (r & D) !== 0, a = s || u(this, Lt).has(n);
357
+ var r = n.f, i = (r & (be | Qe)) !== 0, s = i && (r & V) !== 0, l = (r & D) !== 0, a = s || u(this, Le).has(n);
358
358
  if (!a && n.fn !== null) {
359
- i ? l || (n.f ^= V) : (r & Oe) !== 0 ? t.push(n) : (r & (_e | rn)) !== 0 && l ? o.push(n) : Qe(n) && (Me(n), (r & Yt) !== 0 && (u(this, ce).add(n), l && O(n, z)));
359
+ i ? l || (n.f ^= V) : (r & Ot) !== 0 ? t.push(n) : (r & (_t | sn)) !== 0 && l ? o.push(n) : Qt(n) && (Mt(n), (r & Ye) !== 0 && (u(this, ct).add(n), l && O(n, z)));
360
360
  var c = n.first;
361
361
  if (c !== null) {
362
362
  n = c;
@@ -377,12 +377,12 @@ Bo = function(e, t, o) {
377
377
  */
378
378
  Do = function(e) {
379
379
  for (var t = 0; t < e.length; t += 1)
380
- cr(e[t], u(this, Ke), u(this, ce));
380
+ ur(e[t], u(this, Kt), u(this, ct));
381
381
  }, Ho = function() {
382
382
  var e;
383
383
  if (fo.size > 1) {
384
384
  this.previous.clear();
385
- var t = L, o = gt, n = !0;
385
+ var t = L, o = ge, n = !0;
386
386
  for (const i of fo) {
387
387
  if (i === this) {
388
388
  n = !1;
@@ -405,105 +405,105 @@ Do = function(e) {
405
405
  U = [];
406
406
  const a = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
407
407
  for (const d of s)
408
- fr(d, l, a, c);
408
+ hr(d, l, a, c);
409
409
  if (U.length > 0) {
410
410
  L = i, i.apply();
411
411
  for (const d of U)
412
- M(e = i, Tt, Bo).call(e, d, [], []);
412
+ M(e = i, Te, Bo).call(e, d, [], []);
413
413
  i.deactivate();
414
414
  }
415
415
  U = r;
416
416
  }
417
417
  }
418
- L = t, gt = o;
418
+ L = t, ge = o;
419
419
  }
420
- u(this, Lt).clear(), fo.delete(this);
420
+ u(this, Le).clear(), fo.delete(this);
421
421
  };
422
- let pe = Di;
422
+ let pt = Gi;
423
423
  function ho(e) {
424
- var t = Ue;
425
- Ue = !0;
424
+ var t = Ut;
425
+ Ut = !0;
426
426
  try {
427
427
  for (var o; ; ) {
428
- if (Wi(), U.length === 0 && (L?.flush(), U.length === 0))
428
+ if (Di(), U.length === 0 && (L?.flush(), U.length === 0))
429
429
  return _o = null, /** @type {T} */
430
430
  o;
431
- dr();
431
+ fr();
432
432
  }
433
433
  } finally {
434
- Ue = t;
434
+ Ut = t;
435
435
  }
436
436
  }
437
- function dr() {
437
+ function fr() {
438
438
  try {
439
439
  for (var e = 0; U.length > 0; ) {
440
- var t = pe.ensure();
440
+ var t = pt.ensure();
441
441
  if (e++ > 1e3) {
442
442
  var o, n;
443
- Hi();
443
+ Ui();
444
444
  }
445
- t.process(U), Xt.clear();
445
+ t.process(U), Xe.clear();
446
446
  }
447
447
  } finally {
448
- U = [], _o = null, Pe = null;
448
+ U = [], _o = null, Pt = null;
449
449
  }
450
450
  }
451
- function Hi() {
451
+ function Ui() {
452
452
  try {
453
- Ei();
453
+ Mi();
454
454
  } catch (e) {
455
- Kt(e, _o);
455
+ Ke(e, _o);
456
456
  }
457
457
  }
458
- let Pt = null;
459
- function _n(e) {
458
+ let Pe = null;
459
+ function Cn(e) {
460
460
  var t = e.length;
461
461
  if (t !== 0) {
462
462
  for (var o = 0; o < t; ) {
463
463
  var n = e[o++];
464
- if ((n.f & (xt | D)) === 0 && Qe(n) && (Pt = /* @__PURE__ */ new Set(), Me(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Lr(n), Pt?.size > 0)) {
465
- Xt.clear();
466
- for (const r of Pt) {
467
- if ((r.f & (xt | D)) !== 0) continue;
464
+ if ((n.f & (xe | D)) === 0 && Qt(n) && (Pe = /* @__PURE__ */ new Set(), Mt(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Mr(n), Pe?.size > 0)) {
465
+ Xe.clear();
466
+ for (const r of Pe) {
467
+ if ((r.f & (xe | D)) !== 0) continue;
468
468
  const i = [r];
469
469
  let s = r.parent;
470
470
  for (; s !== null; )
471
- Pt.has(s) && (Pt.delete(s), i.push(s)), s = s.parent;
471
+ Pe.has(s) && (Pe.delete(s), i.push(s)), s = s.parent;
472
472
  for (let l = i.length - 1; l >= 0; l--) {
473
473
  const a = i[l];
474
- (a.f & (xt | D)) === 0 && Me(a);
474
+ (a.f & (xe | D)) === 0 && Mt(a);
475
475
  }
476
476
  }
477
- Pt.clear();
477
+ Pe.clear();
478
478
  }
479
479
  }
480
- Pt = null;
480
+ Pe = null;
481
481
  }
482
482
  }
483
- function fr(e, t, o, n) {
483
+ function hr(e, t, o, n) {
484
484
  if (!o.has(e) && (o.add(e), e.reactions !== null))
485
485
  for (const r of e.reactions) {
486
486
  const i = r.f;
487
- (i & j) !== 0 ? fr(
487
+ (i & j) !== 0 ? hr(
488
488
  /** @type {Derived} */
489
489
  r,
490
490
  t,
491
491
  o,
492
492
  n
493
- ) : (i & (sn | Yt)) !== 0 && (i & z) === 0 && hr(r, t, n) && (O(r, z), $t(
493
+ ) : (i & (ln | Ye)) !== 0 && (i & z) === 0 && pr(r, t, n) && (O(r, z), $e(
494
494
  /** @type {Effect} */
495
495
  r
496
496
  ));
497
497
  }
498
498
  }
499
- function hr(e, t, o) {
499
+ function pr(e, t, o) {
500
500
  const n = o.get(e);
501
501
  if (n !== void 0) return n;
502
502
  if (e.deps !== null)
503
503
  for (const r of e.deps) {
504
- if (ke.call(t, r))
504
+ if (At.call(t, r))
505
505
  return !0;
506
- if ((r.f & j) !== 0 && hr(
506
+ if ((r.f & j) !== 0 && pr(
507
507
  /** @type {Derived} */
508
508
  r,
509
509
  t,
@@ -517,18 +517,18 @@ function hr(e, t, o) {
517
517
  }
518
518
  return o.set(e, !1), !1;
519
519
  }
520
- function $t(e) {
520
+ function $e(e) {
521
521
  var t = _o = e, o = t.b;
522
- if (o?.is_pending && (e.f & (Oe | _e | rn)) !== 0 && (e.f & be) === 0) {
522
+ if (o?.is_pending && (e.f & (Ot | _t | sn)) !== 0 && (e.f & bt) === 0) {
523
523
  o.defer_effect(e);
524
524
  return;
525
525
  }
526
526
  for (; t.parent !== null; ) {
527
527
  t = t.parent;
528
528
  var n = t.f;
529
- if (Pe !== null && t === A && (e.f & _e) === 0)
529
+ if (Pt !== null && t === k && (e.f & _t) === 0)
530
530
  return;
531
- if ((n & (Qt | bt)) !== 0) {
531
+ if ((n & (Qe | be)) !== 0) {
532
532
  if ((n & V) === 0)
533
533
  return;
534
534
  t.f ^= V;
@@ -536,29 +536,29 @@ function $t(e) {
536
536
  }
537
537
  U.push(t);
538
538
  }
539
- function pr(e, t) {
540
- if (!((e.f & bt) !== 0 && (e.f & V) !== 0)) {
541
- (e.f & z) !== 0 ? t.d.push(e) : (e.f & mt) !== 0 && t.m.push(e), O(e, V);
539
+ function vr(e, t) {
540
+ if (!((e.f & be) !== 0 && (e.f & V) !== 0)) {
541
+ (e.f & z) !== 0 ? t.d.push(e) : (e.f & me) !== 0 && t.m.push(e), O(e, V);
542
542
  for (var o = e.first; o !== null; )
543
- pr(o, t), o = o.next;
543
+ vr(o, t), o = o.next;
544
544
  }
545
545
  }
546
- function Fi(e) {
547
- let t = 0, o = ve(0), n;
546
+ function Ki(e) {
547
+ let t = 0, o = vt(0), n;
548
548
  return () => {
549
- dn() && (v(o), fn(() => (t === 0 && (n = Br(() => e(() => Ze(o)))), t += 1, () => {
550
- he(() => {
551
- t -= 1, t === 0 && (n?.(), n = void 0, Ze(o));
549
+ fn() && (v(o), hn(() => (t === 0 && (n = Dr(() => e(() => Zt(o)))), t += 1, () => {
550
+ ht(() => {
551
+ t -= 1, t === 0 && (n?.(), n = void 0, Zt(o));
552
552
  });
553
553
  })));
554
554
  };
555
555
  }
556
- var Gi = Ce | te;
557
- function Ui(e, t, o, n) {
558
- new Ki(e, t, o, n);
556
+ var Ji = Ct | et;
557
+ function Xi(e, t, o, n) {
558
+ new Zi(e, t, o, n);
559
559
  }
560
- var tt, po, Mt, Ie, X, Ot, et, It, Bt, se, Dt, Fe, Je, Xe, Ht, Fo, B, vr, gr, mr, Go, io, $o, Uo;
561
- class Ki {
560
+ var ee, po, Me, It, X, Oe, te, Ie, Be, st, De, Ft, Jt, Xt, He, Fo, B, gr, mr, br, Go, io, $o, Uo;
561
+ class Zi {
562
562
  /**
563
563
  * @param {TemplateNode} node
564
564
  * @param {BoundaryProps} props
@@ -566,37 +566,37 @@ class Ki {
566
566
  * @param {((error: unknown) => unknown) | undefined} [transform_error]
567
567
  */
568
568
  constructor(t, o, n, r) {
569
- x(this, B), m(this, "parent"), m(this, "is_pending", !1), m(this, "transform_error"), x(this, tt), x(this, po, E ? _ : null), x(this, Mt), x(this, Ie), x(this, X), x(this, Ot, null), x(this, et, null), x(this, It, null), x(this, Bt, null), x(this, se, 0), x(this, Dt, 0), x(this, Fe, !1), x(this, Je, /* @__PURE__ */ new Set()), x(this, Xe, /* @__PURE__ */ new Set()), x(this, Ht, null), x(this, Fo, Fi(() => (I(this, Ht, ve(u(this, se))), () => {
570
- I(this, Ht, null);
571
- }))), I(this, tt, t), I(this, Mt, o), I(this, Ie, (i) => {
569
+ x(this, B), m(this, "parent"), m(this, "is_pending", !1), m(this, "transform_error"), x(this, ee), x(this, po, E ? _ : null), x(this, Me), x(this, It), x(this, X), x(this, Oe, null), x(this, te, null), x(this, Ie, null), x(this, Be, null), x(this, st, 0), x(this, De, 0), x(this, Ft, !1), x(this, Jt, /* @__PURE__ */ new Set()), x(this, Xt, /* @__PURE__ */ new Set()), x(this, He, null), x(this, Fo, Ki(() => (I(this, He, vt(u(this, st))), () => {
570
+ I(this, He, null);
571
+ }))), I(this, ee, t), I(this, Me, o), I(this, It, (i) => {
572
572
  var s = (
573
573
  /** @type {Effect} */
574
- A
574
+ k
575
575
  );
576
576
  s.b = this, s.f |= zo, n(i);
577
577
  }), this.parent = /** @type {Effect} */
578
- A.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), I(this, X, Eo(() => {
578
+ k.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), I(this, X, Eo(() => {
579
579
  if (E) {
580
580
  const i = (
581
581
  /** @type {Comment} */
582
582
  u(this, po)
583
583
  );
584
- ko();
585
- const s = i.data === on;
586
- if (i.data.startsWith(Sn)) {
587
- const l = JSON.parse(i.data.slice(Sn.length));
588
- M(this, B, gr).call(this, l);
589
- } else s ? M(this, B, mr).call(this) : M(this, B, vr).call(this);
584
+ Ao();
585
+ const s = i.data === nn;
586
+ if (i.data.startsWith(kn)) {
587
+ const l = JSON.parse(i.data.slice(kn.length));
588
+ M(this, B, mr).call(this, l);
589
+ } else s ? M(this, B, br).call(this) : M(this, B, gr).call(this);
590
590
  } else
591
591
  M(this, B, Go).call(this);
592
- }, Gi)), E && I(this, tt, _);
592
+ }, Ji)), E && I(this, ee, _);
593
593
  }
594
594
  /**
595
595
  * Defer an effect inside a pending boundary until the boundary resolves
596
596
  * @param {Effect} effect
597
597
  */
598
598
  defer_effect(t) {
599
- cr(t, u(this, Je), u(this, Xe));
599
+ ur(t, u(this, Jt), u(this, Xt));
600
600
  }
601
601
  /**
602
602
  * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
@@ -606,7 +606,7 @@ class Ki {
606
606
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
607
607
  }
608
608
  has_pending_snippet() {
609
- return !!u(this, Mt).pending;
609
+ return !!u(this, Me).pending;
610
610
  }
611
611
  /**
612
612
  * Update the source that powers `$effect.pending()` inside this boundary,
@@ -615,59 +615,59 @@ class Ki {
615
615
  * @param {1 | -1} d
616
616
  */
617
617
  update_pending_count(t) {
618
- M(this, B, Uo).call(this, t), I(this, se, u(this, se) + t), !(!u(this, Ht) || u(this, Fe)) && (I(this, Fe, !0), he(() => {
619
- I(this, Fe, !1), u(this, Ht) && Le(u(this, Ht), u(this, se));
618
+ M(this, B, Uo).call(this, t), I(this, st, u(this, st) + t), !(!u(this, He) || u(this, Ft)) && (I(this, Ft, !0), ht(() => {
619
+ I(this, Ft, !1), u(this, He) && Lt(u(this, He), u(this, st));
620
620
  }));
621
621
  }
622
622
  get_effect_pending() {
623
623
  return u(this, Fo).call(this), v(
624
624
  /** @type {Source<number>} */
625
- u(this, Ht)
625
+ u(this, He)
626
626
  );
627
627
  }
628
628
  /** @param {unknown} error */
629
629
  error(t) {
630
- var o = u(this, Mt).onerror;
631
- let n = u(this, Mt).failed;
630
+ var o = u(this, Me).onerror;
631
+ let n = u(this, Me).failed;
632
632
  if (!o && !n)
633
633
  throw t;
634
- u(this, Ot) && (H(u(this, Ot)), I(this, Ot, null)), u(this, et) && (H(u(this, et)), I(this, et, null)), u(this, It) && (H(u(this, It)), I(this, It, null)), E && (F(
634
+ u(this, Oe) && (H(u(this, Oe)), I(this, Oe, null)), u(this, te) && (H(u(this, te)), I(this, te, null)), u(this, Ie) && (H(u(this, Ie)), I(this, Ie, null)), E && (F(
635
635
  /** @type {TemplateNode} */
636
636
  u(this, po)
637
- ), Vi(), F(Io()));
637
+ ), Wi(), F(Io()));
638
638
  var r = !1, i = !1;
639
639
  const s = () => {
640
640
  if (r) {
641
- Ni();
641
+ zi();
642
642
  return;
643
643
  }
644
- r = !0, i && Ri(), u(this, It) !== null && me(u(this, It), () => {
645
- I(this, It, null);
644
+ r = !0, i && ji(), u(this, Ie) !== null && mt(u(this, Ie), () => {
645
+ I(this, Ie, null);
646
646
  }), M(this, B, $o).call(this, () => {
647
- pe.ensure(), M(this, B, Go).call(this);
647
+ pt.ensure(), M(this, B, Go).call(this);
648
648
  });
649
649
  }, l = (a) => {
650
650
  try {
651
651
  i = !0, o?.(a, s), i = !1;
652
652
  } catch (c) {
653
- Kt(c, u(this, X) && u(this, X).parent);
653
+ Ke(c, u(this, X) && u(this, X).parent);
654
654
  }
655
- n && I(this, It, M(this, B, $o).call(this, () => {
656
- pe.ensure();
655
+ n && I(this, Ie, M(this, B, $o).call(this, () => {
656
+ pt.ensure();
657
657
  try {
658
- return ht(() => {
658
+ return he(() => {
659
659
  var c = (
660
660
  /** @type {Effect} */
661
- A
661
+ k
662
662
  );
663
663
  c.b = this, c.f |= zo, n(
664
- u(this, tt),
664
+ u(this, ee),
665
665
  () => a,
666
666
  () => s
667
667
  );
668
668
  });
669
669
  } catch (c) {
670
- return Kt(
670
+ return Ke(
671
671
  c,
672
672
  /** @type {Effect} */
673
673
  u(this, X).parent
@@ -675,66 +675,66 @@ class Ki {
675
675
  }
676
676
  }));
677
677
  };
678
- he(() => {
678
+ ht(() => {
679
679
  var a;
680
680
  try {
681
681
  a = this.transform_error(t);
682
682
  } catch (c) {
683
- Kt(c, u(this, X) && u(this, X).parent);
683
+ Ke(c, u(this, X) && u(this, X).parent);
684
684
  return;
685
685
  }
686
686
  a !== null && typeof a == "object" && typeof /** @type {any} */
687
687
  a.then == "function" ? a.then(
688
688
  l,
689
689
  /** @param {unknown} e */
690
- (c) => Kt(c, u(this, X) && u(this, X).parent)
690
+ (c) => Ke(c, u(this, X) && u(this, X).parent)
691
691
  ) : l(a);
692
692
  });
693
693
  }
694
694
  }
695
- tt = /* @__PURE__ */ new WeakMap(), po = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), Dt = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), Fo = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakSet(), vr = function() {
695
+ ee = /* @__PURE__ */ new WeakMap(), po = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Fo = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakSet(), gr = function() {
696
696
  try {
697
- I(this, Ot, ht(() => u(this, Ie).call(this, u(this, tt))));
697
+ I(this, Oe, he(() => u(this, It).call(this, u(this, ee))));
698
698
  } catch (e) {
699
699
  this.error(e);
700
700
  }
701
701
  }, /**
702
702
  * @param {unknown} error The deserialized error from the server's hydration comment
703
703
  */
704
- gr = function(e) {
705
- const t = u(this, Mt).failed;
706
- t && I(this, It, ht(() => {
704
+ mr = function(e) {
705
+ const t = u(this, Me).failed;
706
+ t && I(this, Ie, he(() => {
707
707
  t(
708
- u(this, tt),
708
+ u(this, ee),
709
709
  () => e,
710
710
  () => () => {
711
711
  }
712
712
  );
713
713
  }));
714
- }, mr = function() {
715
- const e = u(this, Mt).pending;
716
- e && (this.is_pending = !0, I(this, et, ht(() => e(u(this, tt)))), he(() => {
717
- var t = I(this, Bt, document.createDocumentFragment()), o = St();
718
- t.append(o), I(this, Ot, M(this, B, $o).call(this, () => (pe.ensure(), ht(() => u(this, Ie).call(this, o))))), u(this, Dt) === 0 && (u(this, tt).before(t), I(this, Bt, null), me(
714
+ }, br = function() {
715
+ const e = u(this, Me).pending;
716
+ e && (this.is_pending = !0, I(this, te, he(() => e(u(this, ee)))), ht(() => {
717
+ var t = I(this, Be, document.createDocumentFragment()), o = Se();
718
+ t.append(o), I(this, Oe, M(this, B, $o).call(this, () => (pt.ensure(), he(() => u(this, It).call(this, o))))), u(this, De) === 0 && (u(this, ee).before(t), I(this, Be, null), mt(
719
719
  /** @type {Effect} */
720
- u(this, et),
720
+ u(this, te),
721
721
  () => {
722
- I(this, et, null);
722
+ I(this, te, null);
723
723
  }
724
724
  ), M(this, B, io).call(this));
725
725
  }));
726
726
  }, Go = function() {
727
727
  try {
728
- if (this.is_pending = this.has_pending_snippet(), I(this, Dt, 0), I(this, se, 0), I(this, Ot, ht(() => {
729
- u(this, Ie).call(this, u(this, tt));
730
- })), u(this, Dt) > 0) {
731
- var e = I(this, Bt, document.createDocumentFragment());
732
- vn(u(this, Ot), e);
728
+ if (this.is_pending = this.has_pending_snippet(), I(this, De, 0), I(this, st, 0), I(this, Oe, he(() => {
729
+ u(this, It).call(this, u(this, ee));
730
+ })), u(this, De) > 0) {
731
+ var e = I(this, Be, document.createDocumentFragment());
732
+ gn(u(this, Oe), e);
733
733
  const t = (
734
734
  /** @type {(anchor: Node) => void} */
735
- u(this, Mt).pending
735
+ u(this, Me).pending
736
736
  );
737
- I(this, et, ht(() => t(u(this, tt))));
737
+ I(this, te, he(() => t(u(this, ee))));
738
738
  } else
739
739
  M(this, B, io).call(this);
740
740
  } catch (t) {
@@ -742,24 +742,24 @@ gr = function(e) {
742
742
  }
743
743
  }, io = function() {
744
744
  this.is_pending = !1;
745
- for (const e of u(this, Je))
746
- O(e, z), $t(e);
747
- for (const e of u(this, Xe))
748
- O(e, mt), $t(e);
749
- u(this, Je).clear(), u(this, Xe).clear();
745
+ for (const e of u(this, Jt))
746
+ O(e, z), $e(e);
747
+ for (const e of u(this, Xt))
748
+ O(e, me), $e(e);
749
+ u(this, Jt).clear(), u(this, Xt).clear();
750
750
  }, /**
751
751
  * @template T
752
752
  * @param {() => T} fn
753
753
  */
754
754
  $o = function(e) {
755
- var t = A, o = S, n = rt;
756
- At(u(this, X)), st(u(this, X)), Ee(u(this, X).ctx);
755
+ var t = k, o = S, n = re;
756
+ ke(u(this, X)), se(u(this, X)), Et(u(this, X).ctx);
757
757
  try {
758
758
  return e();
759
759
  } catch (r) {
760
- return lr(r), null;
760
+ return ar(r), null;
761
761
  } finally {
762
- At(t), st(o), Ee(n);
762
+ ke(t), se(o), Et(n);
763
763
  }
764
764
  }, /**
765
765
  * Updates the pending count associated with the currently visible pending snippet,
@@ -772,11 +772,11 @@ Uo = function(e) {
772
772
  this.parent && M(t = this.parent, B, Uo).call(t, e);
773
773
  return;
774
774
  }
775
- I(this, Dt, u(this, Dt) + e), u(this, Dt) === 0 && (M(this, B, io).call(this), u(this, et) && me(u(this, et), () => {
776
- I(this, et, null);
777
- }), u(this, Bt) && (u(this, tt).before(u(this, Bt)), I(this, Bt, null)));
775
+ I(this, De, u(this, De) + e), u(this, De) === 0 && (M(this, B, io).call(this), u(this, te) && mt(u(this, te), () => {
776
+ I(this, te, null);
777
+ }), u(this, Be) && (u(this, ee).before(u(this, Be)), I(this, Be, null)));
778
778
  };
779
- function Ji(e, t, o, n) {
779
+ function Yi(e, t, o, n) {
780
780
  const r = Co;
781
781
  var i = e.filter((f) => !f.settled);
782
782
  if (o.length === 0 && i.length === 0) {
@@ -785,14 +785,14 @@ function Ji(e, t, o, n) {
785
785
  }
786
786
  var s = (
787
787
  /** @type {Effect} */
788
- A
789
- ), l = Xi(), a = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((f) => f.promise)) : null;
788
+ k
789
+ ), l = Qi(), a = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((f) => f.promise)) : null;
790
790
  function c(f) {
791
791
  l();
792
792
  try {
793
793
  n(f);
794
794
  } catch (b) {
795
- (s.f & xt) === 0 && Kt(b, s);
795
+ (s.f & xe) === 0 && Ke(b, s);
796
796
  }
797
797
  Ko();
798
798
  }
@@ -801,24 +801,24 @@ function Ji(e, t, o, n) {
801
801
  return;
802
802
  }
803
803
  function d() {
804
- l(), Promise.all(o.map((f) => /* @__PURE__ */ Yi(f))).then((f) => c([...t.map(r), ...f])).catch((f) => Kt(f, s));
804
+ l(), Promise.all(o.map((f) => /* @__PURE__ */ ts(f))).then((f) => c([...t.map(r), ...f])).catch((f) => Ke(f, s));
805
805
  }
806
806
  a ? a.then(d) : d();
807
807
  }
808
- function Xi() {
809
- var e = A, t = S, o = rt, n = L;
808
+ function Qi() {
809
+ var e = k, t = S, o = re, n = L;
810
810
  return function(r = !0) {
811
- At(e), st(t), Ee(o), r && n?.activate();
811
+ ke(e), se(t), Et(o), r && n?.activate();
812
812
  };
813
813
  }
814
814
  function Ko(e = !0) {
815
- At(null), st(null), Ee(null), e && L?.deactivate();
815
+ ke(null), se(null), Et(null), e && L?.deactivate();
816
816
  }
817
- function Zi() {
817
+ function es() {
818
818
  var e = (
819
819
  /** @type {Boundary} */
820
820
  /** @type {Effect} */
821
- A.b
821
+ k.b
822
822
  ), t = (
823
823
  /** @type {Batch} */
824
824
  L
@@ -833,11 +833,11 @@ function Co(e) {
833
833
  /** @type {Derived} */
834
834
  S
835
835
  ) : null;
836
- return A !== null && (A.f |= te), {
837
- ctx: rt,
836
+ return k !== null && (k.f |= et), {
837
+ ctx: re,
838
838
  deps: null,
839
839
  effects: null,
840
- equals: er,
840
+ equals: or,
841
841
  f: t,
842
842
  fn: e,
843
843
  reactions: null,
@@ -847,23 +847,23 @@ function Co(e) {
847
847
  N
848
848
  ),
849
849
  wv: 0,
850
- parent: o ?? A,
850
+ parent: o ?? k,
851
851
  ac: null
852
852
  };
853
853
  }
854
854
  // @__NO_SIDE_EFFECTS__
855
- function Yi(e, t, o) {
856
- A === null && Si();
855
+ function ts(e, t, o) {
856
+ k === null && _i();
857
857
  var n = (
858
858
  /** @type {Promise<V>} */
859
859
  /** @type {unknown} */
860
860
  void 0
861
- ), r = ve(
861
+ ), r = vt(
862
862
  /** @type {V} */
863
863
  N
864
864
  ), i = !S, s = /* @__PURE__ */ new Map();
865
- return cs(() => {
866
- var l = Yn();
865
+ return fs(() => {
866
+ var l = Qn();
867
867
  n = l.promise;
868
868
  try {
869
869
  Promise.resolve(e()).then(l.resolve, l.reject).finally(Ko);
@@ -875,25 +875,25 @@ function Yi(e, t, o) {
875
875
  L
876
876
  );
877
877
  if (i) {
878
- var c = Zi();
879
- s.get(a)?.reject(le), s.delete(a), s.set(a, l);
878
+ var c = es();
879
+ s.get(a)?.reject(lt), s.delete(a), s.set(a, l);
880
880
  }
881
881
  const d = (f, b = void 0) => {
882
882
  if (a.activate(), b)
883
- b !== le && (r.f |= Jt, Le(r, b));
883
+ b !== lt && (r.f |= Je, Lt(r, b));
884
884
  else {
885
- (r.f & Jt) !== 0 && (r.f ^= Jt), Le(r, f);
885
+ (r.f & Je) !== 0 && (r.f ^= Je), Lt(r, f);
886
886
  for (const [g, h] of s) {
887
887
  if (s.delete(g), g === a) break;
888
- h.reject(le);
888
+ h.reject(lt);
889
889
  }
890
890
  }
891
891
  c && c();
892
892
  };
893
893
  l.promise.then(d, (f) => d(null, f || "unknown"));
894
- }), ss(() => {
894
+ }), cs(() => {
895
895
  for (const l of s.values())
896
- l.reject(le);
896
+ l.reject(lt);
897
897
  }), new Promise((l) => {
898
898
  function a(c) {
899
899
  function d() {
@@ -907,14 +907,14 @@ function Yi(e, t, o) {
907
907
  // @__NO_SIDE_EFFECTS__
908
908
  function Ro(e) {
909
909
  const t = /* @__PURE__ */ Co(e);
910
- return Rr(t), t;
910
+ return Nr(t), t;
911
911
  }
912
912
  // @__NO_SIDE_EFFECTS__
913
- function Qi(e) {
913
+ function os(e) {
914
914
  const t = /* @__PURE__ */ Co(e);
915
- return t.equals = or, t;
915
+ return t.equals = nr, t;
916
916
  }
917
- function ts(e) {
917
+ function ns(e) {
918
918
  var t = e.effects;
919
919
  if (t !== null) {
920
920
  e.effects = null;
@@ -925,10 +925,10 @@ function ts(e) {
925
925
  );
926
926
  }
927
927
  }
928
- function es(e) {
928
+ function rs(e) {
929
929
  for (var t = e.parent; t !== null; ) {
930
930
  if ((t.f & j) === 0)
931
- return (t.f & xt) === 0 ? (
931
+ return (t.f & xe) === 0 ? (
932
932
  /** @type {Effect} */
933
933
  t
934
934
  ) : null;
@@ -936,44 +936,44 @@ function es(e) {
936
936
  }
937
937
  return null;
938
938
  }
939
- function an(e) {
940
- var t, o = A;
941
- At(es(e));
939
+ function cn(e) {
940
+ var t, o = k;
941
+ ke(rs(e));
942
942
  try {
943
- e.f &= ~fe, ts(e), t = zr(e);
943
+ e.f &= ~ft, ns(e), t = Wr(e);
944
944
  } finally {
945
- At(o);
945
+ ke(o);
946
946
  }
947
947
  return t;
948
948
  }
949
- function br(e) {
950
- var t = an(e);
951
- if (!e.equals(t) && (e.wv = Vr(), (!L?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
949
+ function yr(e) {
950
+ var t = cn(e);
951
+ if (!e.equals(t) && (e.wv = jr(), (!L?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
952
952
  O(e, V);
953
953
  return;
954
954
  }
955
- Zt || (gt !== null ? (dn() || L?.is_fork) && gt.set(e, t) : ln(e));
955
+ Ze || (ge !== null ? (fn() || L?.is_fork) && ge.set(e, t) : an(e));
956
956
  }
957
- function os(e) {
957
+ function is(e) {
958
958
  if (e.effects !== null)
959
959
  for (const t of e.effects)
960
- (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(le), t.teardown = yi, t.ac = null, Ye(t, 0), hn(t));
960
+ (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(lt), t.teardown = Ii, t.ac = null, Yt(t, 0), pn(t));
961
961
  }
962
- function yr(e) {
962
+ function wr(e) {
963
963
  if (e.effects !== null)
964
964
  for (const t of e.effects)
965
- t.teardown && Me(t);
965
+ t.teardown && Mt(t);
966
966
  }
967
967
  let Jo = /* @__PURE__ */ new Set();
968
- const Xt = /* @__PURE__ */ new Map();
969
- let wr = !1;
970
- function ve(e, t) {
968
+ const Xe = /* @__PURE__ */ new Map();
969
+ let Tr = !1;
970
+ function vt(e, t) {
971
971
  var o = {
972
972
  f: 0,
973
973
  // TODO ideally we could skip this altogether, but it causes type errors
974
974
  v: e,
975
975
  reactions: null,
976
- equals: er,
976
+ equals: or,
977
977
  rv: 0,
978
978
  wv: 0
979
979
  };
@@ -981,47 +981,47 @@ function ve(e, t) {
981
981
  }
982
982
  // @__NO_SIDE_EFFECTS__
983
983
  function R(e, t) {
984
- const o = ve(e);
985
- return Rr(o), o;
984
+ const o = vt(e);
985
+ return Nr(o), o;
986
986
  }
987
987
  // @__NO_SIDE_EFFECTS__
988
- function Tr(e, t = !1, o = !0) {
989
- const n = ve(e);
990
- return t || (n.equals = or), n;
988
+ function Ir(e, t = !1, o = !0) {
989
+ const n = vt(e);
990
+ return t || (n.equals = nr), n;
991
991
  }
992
- function k(e, t, o = !1) {
992
+ function A(e, t, o = !1) {
993
993
  S !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
994
994
  // to ensure we error if state is set inside an inspect effect
995
- (!vt || (S.f & kn) !== 0) && ir() && (S.f & (j | Yt | sn | kn)) !== 0 && (nt === null || !ke.call(nt, e)) && Oi();
996
- let n = o ? $e(t) : t;
997
- return Le(e, n);
995
+ (!ve || (S.f & _n) !== 0) && sr() && (S.f & (j | Ye | ln | _n)) !== 0 && (ne === null || !At.call(ne, e)) && Vi();
996
+ let n = o ? $t(t) : t;
997
+ return Lt(e, n);
998
998
  }
999
- function Le(e, t) {
999
+ function Lt(e, t) {
1000
1000
  if (!e.equals(t)) {
1001
1001
  var o = e.v;
1002
- Zt ? Xt.set(e, t) : Xt.set(e, o), e.v = t;
1003
- var n = pe.ensure();
1002
+ Ze ? Xe.set(e, t) : Xe.set(e, o), e.v = t;
1003
+ var n = pt.ensure();
1004
1004
  if (n.capture(e, o), (e.f & j) !== 0) {
1005
1005
  const r = (
1006
1006
  /** @type {Derived} */
1007
1007
  e
1008
1008
  );
1009
- (e.f & z) !== 0 && an(r), ln(r);
1009
+ (e.f & z) !== 0 && cn(r), an(r);
1010
1010
  }
1011
- e.wv = Vr(), Ir(e, z), A !== null && (A.f & V) !== 0 && (A.f & (bt | Qt)) === 0 && (Q === null ? fs([e]) : Q.push(e)), !n.is_fork && Jo.size > 0 && !wr && ns();
1011
+ e.wv = jr(), $r(e, z), k !== null && (k.f & V) !== 0 && (k.f & (be | Qe)) === 0 && (Q === null ? vs([e]) : Q.push(e)), !n.is_fork && Jo.size > 0 && !Tr && ss();
1012
1012
  }
1013
1013
  return t;
1014
1014
  }
1015
- function ns() {
1016
- wr = !1;
1015
+ function ss() {
1016
+ Tr = !1;
1017
1017
  for (const e of Jo)
1018
- (e.f & V) !== 0 && O(e, mt), Qe(e) && Me(e);
1018
+ (e.f & V) !== 0 && O(e, me), Qt(e) && Mt(e);
1019
1019
  Jo.clear();
1020
1020
  }
1021
- function Ze(e) {
1022
- k(e, e.v + 1);
1021
+ function Zt(e) {
1022
+ A(e, e.v + 1);
1023
1023
  }
1024
- function Ir(e, t) {
1024
+ function $r(e, t) {
1025
1025
  var o = e.reactions;
1026
1026
  if (o !== null)
1027
1027
  for (var n = o.length, r = 0; r < n; r++) {
@@ -1031,29 +1031,29 @@ function Ir(e, t) {
1031
1031
  /** @type {Derived} */
1032
1032
  i
1033
1033
  );
1034
- gt?.delete(a), (s & fe) === 0 && (s & ot && (i.f |= fe), Ir(a, mt));
1035
- } else l && ((s & Yt) !== 0 && Pt !== null && Pt.add(
1034
+ ge?.delete(a), (s & ft) === 0 && (s & oe && (i.f |= ft), $r(a, me));
1035
+ } else l && ((s & Ye) !== 0 && Pe !== null && Pe.add(
1036
1036
  /** @type {Effect} */
1037
1037
  i
1038
- ), $t(
1038
+ ), $e(
1039
1039
  /** @type {Effect} */
1040
1040
  i
1041
1041
  ));
1042
1042
  }
1043
1043
  }
1044
- function $e(e) {
1044
+ function $t(e) {
1045
1045
  if (typeof e != "object" || e === null || uo in e)
1046
1046
  return e;
1047
- const t = Zn(e);
1048
- if (t !== mi && t !== bi)
1047
+ const t = Yn(e);
1048
+ if (t !== wi && t !== Ti)
1049
1049
  return e;
1050
- var o = /* @__PURE__ */ new Map(), n = Xn(e), r = /* @__PURE__ */ R(0), i = de, s = (l) => {
1051
- if (de === i)
1050
+ var o = /* @__PURE__ */ new Map(), n = Zn(e), r = /* @__PURE__ */ R(0), i = dt, s = (l) => {
1051
+ if (dt === i)
1052
1052
  return l();
1053
- var a = S, c = de;
1054
- st(null), Ln(i);
1053
+ var a = S, c = dt;
1054
+ se(null), Mn(i);
1055
1055
  var d = l();
1056
- return st(a), Ln(c), d;
1056
+ return se(a), Mn(c), d;
1057
1057
  };
1058
1058
  return n && o.set("length", /* @__PURE__ */ R(
1059
1059
  /** @type {any[]} */
@@ -1063,30 +1063,30 @@ function $e(e) {
1063
1063
  e,
1064
1064
  {
1065
1065
  defineProperty(l, a, c) {
1066
- (!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && Li();
1066
+ (!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && Ri();
1067
1067
  var d = o.get(a);
1068
1068
  return d === void 0 ? s(() => {
1069
1069
  var f = /* @__PURE__ */ R(c.value);
1070
1070
  return o.set(a, f), f;
1071
- }) : k(d, c.value, !0), !0;
1071
+ }) : A(d, c.value, !0), !0;
1072
1072
  },
1073
1073
  deleteProperty(l, a) {
1074
1074
  var c = o.get(a);
1075
1075
  if (c === void 0) {
1076
1076
  if (a in l) {
1077
1077
  const d = s(() => /* @__PURE__ */ R(N));
1078
- o.set(a, d), Ze(r);
1078
+ o.set(a, d), Zt(r);
1079
1079
  }
1080
1080
  } else
1081
- k(c, N), Ze(r);
1081
+ A(c, N), Zt(r);
1082
1082
  return !0;
1083
1083
  },
1084
1084
  get(l, a, c) {
1085
1085
  if (a === uo)
1086
1086
  return e;
1087
1087
  var d = o.get(a), f = a in l;
1088
- if (d === void 0 && (!f || Se(l, a)?.writable) && (d = s(() => {
1089
- var g = $e(f ? l[a] : N), h = /* @__PURE__ */ R(g);
1088
+ if (d === void 0 && (!f || St(l, a)?.writable) && (d = s(() => {
1089
+ var g = $t(f ? l[a] : N), h = /* @__PURE__ */ R(g);
1090
1090
  return h;
1091
1091
  }), o.set(a, d)), d !== void 0) {
1092
1092
  var b = v(d);
@@ -1115,9 +1115,9 @@ function $e(e) {
1115
1115
  if (a === uo)
1116
1116
  return !0;
1117
1117
  var c = o.get(a), d = c !== void 0 && c.v !== N || Reflect.has(l, a);
1118
- if (c !== void 0 || A !== null && (!d || Se(l, a)?.writable)) {
1118
+ if (c !== void 0 || k !== null && (!d || St(l, a)?.writable)) {
1119
1119
  c === void 0 && (c = s(() => {
1120
- var b = d ? $e(l[a]) : N, g = /* @__PURE__ */ R(b);
1120
+ var b = d ? $t(l[a]) : N, g = /* @__PURE__ */ R(b);
1121
1121
  return g;
1122
1122
  }), o.set(a, c));
1123
1123
  var f = v(c);
@@ -1132,14 +1132,14 @@ function $e(e) {
1132
1132
  for (var g = c; g < /** @type {Source<number>} */
1133
1133
  f.v; g += 1) {
1134
1134
  var h = o.get(g + "");
1135
- h !== void 0 ? k(h, N) : g in l && (h = s(() => /* @__PURE__ */ R(N)), o.set(g + "", h));
1135
+ h !== void 0 ? A(h, N) : g in l && (h = s(() => /* @__PURE__ */ R(N)), o.set(g + "", h));
1136
1136
  }
1137
1137
  if (f === void 0)
1138
- (!b || Se(l, a)?.writable) && (f = s(() => /* @__PURE__ */ R(void 0)), k(f, $e(c)), o.set(a, f));
1138
+ (!b || St(l, a)?.writable) && (f = s(() => /* @__PURE__ */ R(void 0)), A(f, $t(c)), o.set(a, f));
1139
1139
  else {
1140
1140
  b = f.v !== N;
1141
- var w = s(() => $e(c));
1142
- k(f, w);
1141
+ var w = s(() => $t(c));
1142
+ A(f, w);
1143
1143
  }
1144
1144
  var T = Reflect.getOwnPropertyDescriptor(l, a);
1145
1145
  if (T?.set && T.set.call(d, c), !b) {
@@ -1148,9 +1148,9 @@ function $e(e) {
1148
1148
  /** @type {Source<number>} */
1149
1149
  o.get("length")
1150
1150
  ), P = Number(a);
1151
- Number.isInteger(P) && P >= $.v && k($, P + 1);
1151
+ Number.isInteger(P) && P >= $.v && A($, P + 1);
1152
1152
  }
1153
- Ze(r);
1153
+ Zt(r);
1154
1154
  }
1155
1155
  return !0;
1156
1156
  },
@@ -1165,81 +1165,81 @@ function $e(e) {
1165
1165
  return a;
1166
1166
  },
1167
1167
  setPrototypeOf() {
1168
- Mi();
1168
+ Ni();
1169
1169
  }
1170
1170
  }
1171
1171
  );
1172
1172
  }
1173
- var Cn, $r, xr, Sr;
1173
+ var En, xr, Sr, kr;
1174
1174
  function Xo() {
1175
- if (Cn === void 0) {
1176
- Cn = window, $r = /Firefox/.test(navigator.userAgent);
1175
+ if (En === void 0) {
1176
+ En = window, xr = /Firefox/.test(navigator.userAgent);
1177
1177
  var e = Element.prototype, t = Node.prototype, o = Text.prototype;
1178
- xr = Se(t, "firstChild").get, Sr = Se(t, "nextSibling").get, An(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), An(o) && (o.__t = void 0);
1178
+ Sr = St(t, "firstChild").get, kr = St(t, "nextSibling").get, An(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), An(o) && (o.__t = void 0);
1179
1179
  }
1180
1180
  }
1181
- function St(e = "") {
1181
+ function Se(e = "") {
1182
1182
  return document.createTextNode(e);
1183
1183
  }
1184
1184
  // @__NO_SIDE_EFFECTS__
1185
- function ge(e) {
1185
+ function gt(e) {
1186
1186
  return (
1187
1187
  /** @type {TemplateNode | null} */
1188
- xr.call(e)
1188
+ Sr.call(e)
1189
1189
  );
1190
1190
  }
1191
1191
  // @__NO_SIDE_EFFECTS__
1192
- function it(e) {
1192
+ function ie(e) {
1193
1193
  return (
1194
1194
  /** @type {TemplateNode | null} */
1195
- Sr.call(e)
1195
+ kr.call(e)
1196
1196
  );
1197
1197
  }
1198
1198
  function so(e, t) {
1199
1199
  if (!E)
1200
- return /* @__PURE__ */ ge(e);
1201
- var o = /* @__PURE__ */ ge(_);
1200
+ return /* @__PURE__ */ gt(e);
1201
+ var o = /* @__PURE__ */ gt(_);
1202
1202
  if (o === null)
1203
- o = _.appendChild(St());
1203
+ o = _.appendChild(Se());
1204
1204
  else if (t && o.nodeType !== So) {
1205
- var n = St();
1205
+ var n = Se();
1206
1206
  return o?.before(n), F(n), n;
1207
1207
  }
1208
- return t && un(
1208
+ return t && dn(
1209
1209
  /** @type {Text} */
1210
1210
  o
1211
1211
  ), F(o), o;
1212
1212
  }
1213
1213
  function No(e, t = !1) {
1214
1214
  if (!E) {
1215
- var o = /* @__PURE__ */ ge(e);
1216
- return o instanceof Comment && o.data === "" ? /* @__PURE__ */ it(o) : o;
1215
+ var o = /* @__PURE__ */ gt(e);
1216
+ return o instanceof Comment && o.data === "" ? /* @__PURE__ */ ie(o) : o;
1217
1217
  }
1218
1218
  if (t) {
1219
1219
  if (_?.nodeType !== So) {
1220
- var n = St();
1220
+ var n = Se();
1221
1221
  return _?.before(n), F(n), n;
1222
1222
  }
1223
- un(
1223
+ dn(
1224
1224
  /** @type {Text} */
1225
1225
  _
1226
1226
  );
1227
1227
  }
1228
1228
  return _;
1229
1229
  }
1230
- function zt(e, t = 1, o = !1) {
1230
+ function ze(e, t = 1, o = !1) {
1231
1231
  let n = E ? _ : e;
1232
1232
  for (var r; t--; )
1233
1233
  r = n, n = /** @type {TemplateNode} */
1234
- /* @__PURE__ */ it(n);
1234
+ /* @__PURE__ */ ie(n);
1235
1235
  if (!E)
1236
1236
  return n;
1237
1237
  if (o) {
1238
1238
  if (n?.nodeType !== So) {
1239
- var i = St();
1239
+ var i = Se();
1240
1240
  return n === null ? r?.after(i) : n.before(i), F(i), i;
1241
1241
  }
1242
- un(
1242
+ dn(
1243
1243
  /** @type {Text} */
1244
1244
  n
1245
1245
  );
@@ -1249,16 +1249,16 @@ function zt(e, t = 1, o = !1) {
1249
1249
  function Ar(e) {
1250
1250
  e.textContent = "";
1251
1251
  }
1252
- function kr() {
1252
+ function _r() {
1253
1253
  return !1;
1254
1254
  }
1255
- function cn(e, t, o) {
1255
+ function un(e, t, o) {
1256
1256
  return (
1257
1257
  /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
1258
- document.createElementNS(Jn, e, void 0)
1258
+ document.createElementNS(Xn, e, void 0)
1259
1259
  );
1260
1260
  }
1261
- function un(e) {
1261
+ function dn(e) {
1262
1262
  if (
1263
1263
  /** @type {string} */
1264
1264
  e.nodeValue.length < 65536
@@ -1269,30 +1269,30 @@ function un(e) {
1269
1269
  t.remove(), e.nodeValue += /** @type {string} */
1270
1270
  t.nodeValue, t = e.nextSibling;
1271
1271
  }
1272
- function _r(e) {
1273
- var t = S, o = A;
1274
- st(null), At(null);
1272
+ function Cr(e) {
1273
+ var t = S, o = k;
1274
+ se(null), ke(null);
1275
1275
  try {
1276
1276
  return e();
1277
1277
  } finally {
1278
- st(t), At(o);
1278
+ se(t), ke(o);
1279
1279
  }
1280
1280
  }
1281
- function rs(e) {
1282
- A === null && (S === null && Ci(), _i()), Zt && ki();
1281
+ function ls(e) {
1282
+ k === null && (S === null && Li(), Pi()), Ze && Ei();
1283
1283
  }
1284
- function is(e, t) {
1284
+ function as(e, t) {
1285
1285
  var o = t.last;
1286
1286
  o === null ? t.last = t.first = e : (o.next = e, e.prev = o, t.last = e);
1287
1287
  }
1288
- function kt(e, t) {
1289
- var o = A;
1288
+ function Ae(e, t) {
1289
+ var o = k;
1290
1290
  o !== null && (o.f & D) !== 0 && (e |= D);
1291
1291
  var n = {
1292
- ctx: rt,
1292
+ ctx: re,
1293
1293
  deps: null,
1294
1294
  nodes: null,
1295
- f: e | z | ot,
1295
+ f: e | z | oe,
1296
1296
  first: null,
1297
1297
  fn: t,
1298
1298
  last: null,
@@ -1304,18 +1304,18 @@ function kt(e, t) {
1304
1304
  wv: 0,
1305
1305
  ac: null
1306
1306
  }, r = n;
1307
- if ((e & Oe) !== 0)
1308
- Pe !== null ? Pe.push(n) : $t(n);
1307
+ if ((e & Ot) !== 0)
1308
+ Pt !== null ? Pt.push(n) : $e(n);
1309
1309
  else if (t !== null) {
1310
1310
  try {
1311
- Me(n);
1311
+ Mt(n);
1312
1312
  } catch (s) {
1313
1313
  throw H(n), s;
1314
1314
  }
1315
1315
  r.deps === null && r.teardown === null && r.nodes === null && r.first === r.last && // either `null`, or a singular child
1316
- (r.f & te) === 0 && (r = r.first, (e & Yt) !== 0 && (e & Ce) !== 0 && r !== null && (r.f |= Ce));
1316
+ (r.f & et) === 0 && (r = r.first, (e & Ye) !== 0 && (e & Ct) !== 0 && r !== null && (r.f |= Ct));
1317
1317
  }
1318
- if (r !== null && (r.parent = o, o !== null && is(r, o), S !== null && (S.f & j) !== 0 && (e & Qt) === 0)) {
1318
+ if (r !== null && (r.parent = o, o !== null && as(r, o), S !== null && (S.f & j) !== 0 && (e & Qe) === 0)) {
1319
1319
  var i = (
1320
1320
  /** @type {Derived} */
1321
1321
  S
@@ -1324,125 +1324,125 @@ function kt(e, t) {
1324
1324
  }
1325
1325
  return n;
1326
1326
  }
1327
- function dn() {
1328
- return S !== null && !vt;
1327
+ function fn() {
1328
+ return S !== null && !ve;
1329
1329
  }
1330
- function ss(e) {
1331
- const t = kt(_e, null);
1330
+ function cs(e) {
1331
+ const t = Ae(_t, null);
1332
1332
  return O(t, V), t.teardown = e, t;
1333
1333
  }
1334
- function En(e) {
1335
- rs();
1334
+ function Pn(e) {
1335
+ ls();
1336
1336
  var t = (
1337
1337
  /** @type {Effect} */
1338
- A.f
1339
- ), o = !S && (t & bt) !== 0 && (t & be) === 0;
1338
+ k.f
1339
+ ), o = !S && (t & be) !== 0 && (t & bt) === 0;
1340
1340
  if (o) {
1341
1341
  var n = (
1342
1342
  /** @type {ComponentContext} */
1343
- rt
1343
+ re
1344
1344
  );
1345
1345
  (n.e ?? (n.e = [])).push(e);
1346
1346
  } else
1347
- return Cr(e);
1347
+ return Er(e);
1348
1348
  }
1349
- function Cr(e) {
1350
- return kt(Oe | Ti, e);
1349
+ function Er(e) {
1350
+ return Ae(Ot | xi, e);
1351
1351
  }
1352
- function ls(e) {
1353
- pe.ensure();
1354
- const t = kt(Qt | te, e);
1352
+ function us(e) {
1353
+ pt.ensure();
1354
+ const t = Ae(Qe | et, e);
1355
1355
  return () => {
1356
1356
  H(t);
1357
1357
  };
1358
1358
  }
1359
- function as(e) {
1360
- pe.ensure();
1361
- const t = kt(Qt | te, e);
1359
+ function ds(e) {
1360
+ pt.ensure();
1361
+ const t = Ae(Qe | et, e);
1362
1362
  return (o = {}) => new Promise((n) => {
1363
- o.outro ? me(t, () => {
1363
+ o.outro ? mt(t, () => {
1364
1364
  H(t), n(void 0);
1365
1365
  }) : (H(t), n(void 0));
1366
1366
  });
1367
1367
  }
1368
- function Er(e) {
1369
- return kt(Oe, e);
1368
+ function Pr(e) {
1369
+ return Ae(Ot, e);
1370
1370
  }
1371
- function cs(e) {
1372
- return kt(sn | te, e);
1371
+ function fs(e) {
1372
+ return Ae(ln | et, e);
1373
1373
  }
1374
- function fn(e, t = 0) {
1375
- return kt(_e | t, e);
1374
+ function hn(e, t = 0) {
1375
+ return Ae(_t | t, e);
1376
1376
  }
1377
1377
  function lo(e, t = [], o = [], n = []) {
1378
- Ji(n, t, o, (r) => {
1379
- kt(_e, () => e(...r.map(v)));
1378
+ Yi(n, t, o, (r) => {
1379
+ Ae(_t, () => e(...r.map(v)));
1380
1380
  });
1381
1381
  }
1382
1382
  function Eo(e, t = 0) {
1383
- var o = kt(Yt | t, e);
1383
+ var o = Ae(Ye | t, e);
1384
1384
  return o;
1385
1385
  }
1386
- function ht(e) {
1387
- return kt(bt | te, e);
1386
+ function he(e) {
1387
+ return Ae(be | et, e);
1388
1388
  }
1389
- function Pr(e) {
1389
+ function Lr(e) {
1390
1390
  var t = e.teardown;
1391
1391
  if (t !== null) {
1392
- const o = Zt, n = S;
1393
- Pn(!0), st(null);
1392
+ const o = Ze, n = S;
1393
+ Ln(!0), se(null);
1394
1394
  try {
1395
1395
  t.call(null);
1396
1396
  } finally {
1397
- Pn(o), st(n);
1397
+ Ln(o), se(n);
1398
1398
  }
1399
1399
  }
1400
1400
  }
1401
- function hn(e, t = !1) {
1401
+ function pn(e, t = !1) {
1402
1402
  var o = e.first;
1403
1403
  for (e.first = e.last = null; o !== null; ) {
1404
1404
  const r = o.ac;
1405
- r !== null && _r(() => {
1406
- r.abort(le);
1405
+ r !== null && Cr(() => {
1406
+ r.abort(lt);
1407
1407
  });
1408
1408
  var n = o.next;
1409
- (o.f & Qt) !== 0 ? o.parent = null : H(o, t), o = n;
1409
+ (o.f & Qe) !== 0 ? o.parent = null : H(o, t), o = n;
1410
1410
  }
1411
1411
  }
1412
- function us(e) {
1412
+ function hs(e) {
1413
1413
  for (var t = e.first; t !== null; ) {
1414
1414
  var o = t.next;
1415
- (t.f & bt) === 0 && H(t), t = o;
1415
+ (t.f & be) === 0 && H(t), t = o;
1416
1416
  }
1417
1417
  }
1418
1418
  function H(e, t = !0) {
1419
1419
  var o = !1;
1420
- (t || (e.f & Qn) !== 0) && e.nodes !== null && e.nodes.end !== null && (ds(
1420
+ (t || (e.f & er) !== 0) && e.nodes !== null && e.nodes.end !== null && (ps(
1421
1421
  e.nodes.start,
1422
1422
  /** @type {TemplateNode} */
1423
1423
  e.nodes.end
1424
- ), o = !0), hn(e, t && !o), Ye(e, 0), O(e, xt);
1424
+ ), o = !0), pn(e, t && !o), Yt(e, 0), O(e, xe);
1425
1425
  var n = e.nodes && e.nodes.t;
1426
1426
  if (n !== null)
1427
1427
  for (const i of n)
1428
1428
  i.stop();
1429
- Pr(e);
1429
+ Lr(e);
1430
1430
  var r = e.parent;
1431
- r !== null && r.first !== null && Lr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1431
+ r !== null && r.first !== null && Mr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1432
1432
  }
1433
- function ds(e, t) {
1433
+ function ps(e, t) {
1434
1434
  for (; e !== null; ) {
1435
- var o = e === t ? null : /* @__PURE__ */ it(e);
1435
+ var o = e === t ? null : /* @__PURE__ */ ie(e);
1436
1436
  e.remove(), e = o;
1437
1437
  }
1438
1438
  }
1439
- function Lr(e) {
1439
+ function Mr(e) {
1440
1440
  var t = e.parent, o = e.prev, n = e.next;
1441
1441
  o !== null && (o.next = n), n !== null && (n.prev = o), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = o));
1442
1442
  }
1443
- function me(e, t, o = !0) {
1443
+ function mt(e, t, o = !0) {
1444
1444
  var n = [];
1445
- Mr(e, n, !0);
1445
+ Or(e, n, !0);
1446
1446
  var r = () => {
1447
1447
  o && H(e), t && t();
1448
1448
  }, i = n.length;
@@ -1453,7 +1453,7 @@ function me(e, t, o = !0) {
1453
1453
  } else
1454
1454
  r();
1455
1455
  }
1456
- function Mr(e, t, o) {
1456
+ function Or(e, t, o) {
1457
1457
  if ((e.f & D) === 0) {
1458
1458
  e.f ^= D;
1459
1459
  var n = e.nodes && e.nodes.t;
@@ -1461,23 +1461,23 @@ function Mr(e, t, o) {
1461
1461
  for (const l of n)
1462
1462
  (l.is_global || o) && t.push(l);
1463
1463
  for (var r = e.first; r !== null; ) {
1464
- var i = r.next, s = (r.f & Ce) !== 0 || // If this is a branch effect without a block effect parent,
1464
+ var i = r.next, s = (r.f & Ct) !== 0 || // If this is a branch effect without a block effect parent,
1465
1465
  // it means the parent block effect was pruned. In that case,
1466
1466
  // transparency information was transferred to the branch effect.
1467
- (r.f & bt) !== 0 && (e.f & Yt) !== 0;
1468
- Mr(r, t, s ? o : !1), r = i;
1467
+ (r.f & be) !== 0 && (e.f & Ye) !== 0;
1468
+ Or(r, t, s ? o : !1), r = i;
1469
1469
  }
1470
1470
  }
1471
1471
  }
1472
- function pn(e) {
1473
- Or(e, !0);
1472
+ function vn(e) {
1473
+ Rr(e, !0);
1474
1474
  }
1475
- function Or(e, t) {
1475
+ function Rr(e, t) {
1476
1476
  if ((e.f & D) !== 0) {
1477
1477
  e.f ^= D;
1478
1478
  for (var o = e.first; o !== null; ) {
1479
- var n = o.next, r = (o.f & Ce) !== 0 || (o.f & bt) !== 0;
1480
- Or(o, r ? t : !1), o = n;
1479
+ var n = o.next, r = (o.f & Ct) !== 0 || (o.f & be) !== 0;
1480
+ Rr(o, r ? t : !1), o = n;
1481
1481
  }
1482
1482
  var i = e.nodes && e.nodes.t;
1483
1483
  if (i !== null)
@@ -1485,86 +1485,86 @@ function Or(e, t) {
1485
1485
  (s.is_global || t) && s.in();
1486
1486
  }
1487
1487
  }
1488
- function vn(e, t) {
1488
+ function gn(e, t) {
1489
1489
  if (e.nodes)
1490
1490
  for (var o = e.nodes.start, n = e.nodes.end; o !== null; ) {
1491
- var r = o === n ? null : /* @__PURE__ */ it(o);
1491
+ var r = o === n ? null : /* @__PURE__ */ ie(o);
1492
1492
  t.append(o), o = r;
1493
1493
  }
1494
1494
  }
1495
- let vo = !1, Zt = !1;
1496
- function Pn(e) {
1497
- Zt = e;
1495
+ let vo = !1, Ze = !1;
1496
+ function Ln(e) {
1497
+ Ze = e;
1498
1498
  }
1499
- let S = null, vt = !1;
1500
- function st(e) {
1499
+ let S = null, ve = !1;
1500
+ function se(e) {
1501
1501
  S = e;
1502
1502
  }
1503
- let A = null;
1504
- function At(e) {
1505
- A = e;
1503
+ let k = null;
1504
+ function ke(e) {
1505
+ k = e;
1506
1506
  }
1507
- let nt = null;
1508
- function Rr(e) {
1509
- S !== null && (nt === null ? nt = [e] : nt.push(e));
1507
+ let ne = null;
1508
+ function Nr(e) {
1509
+ S !== null && (ne === null ? ne = [e] : ne.push(e));
1510
1510
  }
1511
1511
  let G = null, J = 0, Q = null;
1512
- function fs(e) {
1512
+ function vs(e) {
1513
1513
  Q = e;
1514
1514
  }
1515
- let Nr = 1, ue = 0, de = ue;
1516
- function Ln(e) {
1517
- de = e;
1515
+ let Vr = 1, ut = 0, dt = ut;
1516
+ function Mn(e) {
1517
+ dt = e;
1518
1518
  }
1519
- function Vr() {
1520
- return ++Nr;
1519
+ function jr() {
1520
+ return ++Vr;
1521
1521
  }
1522
- function Qe(e) {
1522
+ function Qt(e) {
1523
1523
  var t = e.f;
1524
1524
  if ((t & z) !== 0)
1525
1525
  return !0;
1526
- if (t & j && (e.f &= ~fe), (t & mt) !== 0) {
1526
+ if (t & j && (e.f &= ~ft), (t & me) !== 0) {
1527
1527
  for (var o = (
1528
1528
  /** @type {Value[]} */
1529
1529
  e.deps
1530
1530
  ), n = o.length, r = 0; r < n; r++) {
1531
1531
  var i = o[r];
1532
- if (Qe(
1532
+ if (Qt(
1533
1533
  /** @type {Derived} */
1534
1534
  i
1535
- ) && br(
1535
+ ) && yr(
1536
1536
  /** @type {Derived} */
1537
1537
  i
1538
1538
  ), i.wv > e.wv)
1539
1539
  return !0;
1540
1540
  }
1541
- (t & ot) !== 0 && // During time traveling we don't want to reset the status so that
1541
+ (t & oe) !== 0 && // During time traveling we don't want to reset the status so that
1542
1542
  // traversal of the graph in the other batches still happens
1543
- gt === null && O(e, V);
1543
+ ge === null && O(e, V);
1544
1544
  }
1545
1545
  return !1;
1546
1546
  }
1547
- function jr(e, t, o = !0) {
1547
+ function zr(e, t, o = !0) {
1548
1548
  var n = e.reactions;
1549
- if (n !== null && !(nt !== null && ke.call(nt, e)))
1549
+ if (n !== null && !(ne !== null && At.call(ne, e)))
1550
1550
  for (var r = 0; r < n.length; r++) {
1551
1551
  var i = n[r];
1552
- (i.f & j) !== 0 ? jr(
1552
+ (i.f & j) !== 0 ? zr(
1553
1553
  /** @type {Derived} */
1554
1554
  i,
1555
1555
  t,
1556
1556
  !1
1557
- ) : t === i && (o ? O(i, z) : (i.f & V) !== 0 && O(i, mt), $t(
1557
+ ) : t === i && (o ? O(i, z) : (i.f & V) !== 0 && O(i, me), $e(
1558
1558
  /** @type {Effect} */
1559
1559
  i
1560
1560
  ));
1561
1561
  }
1562
1562
  }
1563
- function zr(e) {
1564
- var t, o = G, n = J, r = Q, i = S, s = nt, l = rt, a = vt, c = de, d = e.f;
1563
+ function Wr(e) {
1564
+ var t, o = G, n = J, r = Q, i = S, s = ne, l = re, a = ve, c = dt, d = e.f;
1565
1565
  G = /** @type {null | Value[]} */
1566
- null, J = 0, Q = null, S = (d & (bt | Qt)) === 0 ? e : null, nt = null, Ee(e.ctx), vt = !1, de = ++ue, e.ac !== null && (_r(() => {
1567
- e.ac.abort(le);
1566
+ null, J = 0, Q = null, S = (d & (be | Qe)) === 0 ? e : null, ne = null, Et(e.ctx), ve = !1, dt = ++ut, e.ac !== null && (Cr(() => {
1567
+ e.ac.abort(lt);
1568
1568
  }), e.ac = null);
1569
1569
  try {
1570
1570
  e.f |= Wo;
@@ -1572,48 +1572,48 @@ function zr(e) {
1572
1572
  /** @type {Function} */
1573
1573
  e.fn
1574
1574
  ), b = f();
1575
- e.f |= be;
1575
+ e.f |= bt;
1576
1576
  var g = e.deps, h = L?.is_fork;
1577
1577
  if (G !== null) {
1578
1578
  var w;
1579
- if (h || Ye(e, J), g !== null && J > 0)
1579
+ if (h || Yt(e, J), g !== null && J > 0)
1580
1580
  for (g.length = J + G.length, w = 0; w < G.length; w++)
1581
1581
  g[J + w] = G[w];
1582
1582
  else
1583
1583
  e.deps = g = G;
1584
- if (dn() && (e.f & ot) !== 0)
1584
+ if (fn() && (e.f & oe) !== 0)
1585
1585
  for (w = J; w < g.length; w++)
1586
1586
  ((t = g[w]).reactions ?? (t.reactions = [])).push(e);
1587
- } else !h && g !== null && J < g.length && (Ye(e, J), g.length = J);
1588
- if (ir() && Q !== null && !vt && g !== null && (e.f & (j | mt | z)) === 0)
1587
+ } else !h && g !== null && J < g.length && (Yt(e, J), g.length = J);
1588
+ if (sr() && Q !== null && !ve && g !== null && (e.f & (j | me | z)) === 0)
1589
1589
  for (w = 0; w < /** @type {Source[]} */
1590
1590
  Q.length; w++)
1591
- jr(
1591
+ zr(
1592
1592
  Q[w],
1593
1593
  /** @type {Effect} */
1594
1594
  e
1595
1595
  );
1596
1596
  if (i !== null && i !== e) {
1597
- if (ue++, i.deps !== null)
1597
+ if (ut++, i.deps !== null)
1598
1598
  for (let T = 0; T < n; T += 1)
1599
- i.deps[T].rv = ue;
1599
+ i.deps[T].rv = ut;
1600
1600
  if (o !== null)
1601
1601
  for (const T of o)
1602
- T.rv = ue;
1602
+ T.rv = ut;
1603
1603
  Q !== null && (r === null ? r = Q : r.push(.../** @type {Source[]} */
1604
1604
  Q));
1605
1605
  }
1606
- return (e.f & Jt) !== 0 && (e.f ^= Jt), b;
1606
+ return (e.f & Je) !== 0 && (e.f ^= Je), b;
1607
1607
  } catch (T) {
1608
- return lr(T);
1608
+ return ar(T);
1609
1609
  } finally {
1610
- e.f ^= Wo, G = o, J = n, Q = r, S = i, nt = s, Ee(l), vt = a, de = c;
1610
+ e.f ^= Wo, G = o, J = n, Q = r, S = i, ne = s, Et(l), ve = a, dt = c;
1611
1611
  }
1612
1612
  }
1613
- function hs(e, t) {
1613
+ function gs(e, t) {
1614
1614
  let o = t.reactions;
1615
1615
  if (o !== null) {
1616
- var n = vi.call(o, e);
1616
+ var n = bi.call(o, e);
1617
1617
  if (n !== -1) {
1618
1618
  var r = o.length - 1;
1619
1619
  r === 0 ? o = t.reactions = null : (o[n] = o[r], o.pop());
@@ -1622,114 +1622,114 @@ function hs(e, t) {
1622
1622
  if (o === null && (t.f & j) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1623
1623
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1624
1624
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1625
- (G === null || !ke.call(G, t))) {
1625
+ (G === null || !At.call(G, t))) {
1626
1626
  var i = (
1627
1627
  /** @type {Derived} */
1628
1628
  t
1629
1629
  );
1630
- (i.f & ot) !== 0 && (i.f ^= ot, i.f &= ~fe), ln(i), os(i), Ye(i, 0);
1630
+ (i.f & oe) !== 0 && (i.f ^= oe, i.f &= ~ft), an(i), is(i), Yt(i, 0);
1631
1631
  }
1632
1632
  }
1633
- function Ye(e, t) {
1633
+ function Yt(e, t) {
1634
1634
  var o = e.deps;
1635
1635
  if (o !== null)
1636
1636
  for (var n = t; n < o.length; n++)
1637
- hs(e, o[n]);
1637
+ gs(e, o[n]);
1638
1638
  }
1639
- function Me(e) {
1639
+ function Mt(e) {
1640
1640
  var t = e.f;
1641
- if ((t & xt) === 0) {
1641
+ if ((t & xe) === 0) {
1642
1642
  O(e, V);
1643
- var o = A, n = vo;
1644
- A = e, vo = !0;
1643
+ var o = k, n = vo;
1644
+ k = e, vo = !0;
1645
1645
  try {
1646
- (t & (Yt | rn)) !== 0 ? us(e) : hn(e), Pr(e);
1647
- var r = zr(e);
1648
- e.teardown = typeof r == "function" ? r : null, e.wv = Nr;
1646
+ (t & (Ye | sn)) !== 0 ? hs(e) : pn(e), Lr(e);
1647
+ var r = Wr(e);
1648
+ e.teardown = typeof r == "function" ? r : null, e.wv = Vr;
1649
1649
  var i;
1650
- pi && zi && (e.f & z) !== 0 && e.deps;
1650
+ mi && Bi && (e.f & z) !== 0 && e.deps;
1651
1651
  } finally {
1652
- vo = n, A = o;
1652
+ vo = n, k = o;
1653
1653
  }
1654
1654
  }
1655
1655
  }
1656
1656
  function v(e) {
1657
1657
  var t = e.f, o = (t & j) !== 0;
1658
- if (S !== null && !vt) {
1659
- var n = A !== null && (A.f & xt) !== 0;
1660
- if (!n && (nt === null || !ke.call(nt, e))) {
1658
+ if (S !== null && !ve) {
1659
+ var n = k !== null && (k.f & xe) !== 0;
1660
+ if (!n && (ne === null || !At.call(ne, e))) {
1661
1661
  var r = S.deps;
1662
1662
  if ((S.f & Wo) !== 0)
1663
- e.rv < ue && (e.rv = ue, G === null && r !== null && r[J] === e ? J++ : G === null ? G = [e] : G.push(e));
1663
+ e.rv < ut && (e.rv = ut, G === null && r !== null && r[J] === e ? J++ : G === null ? G = [e] : G.push(e));
1664
1664
  else {
1665
1665
  (S.deps ?? (S.deps = [])).push(e);
1666
1666
  var i = e.reactions;
1667
- i === null ? e.reactions = [S] : ke.call(i, S) || i.push(S);
1667
+ i === null ? e.reactions = [S] : At.call(i, S) || i.push(S);
1668
1668
  }
1669
1669
  }
1670
1670
  }
1671
- if (Zt && Xt.has(e))
1672
- return Xt.get(e);
1671
+ if (Ze && Xe.has(e))
1672
+ return Xe.get(e);
1673
1673
  if (o) {
1674
1674
  var s = (
1675
1675
  /** @type {Derived} */
1676
1676
  e
1677
1677
  );
1678
- if (Zt) {
1678
+ if (Ze) {
1679
1679
  var l = s.v;
1680
- return ((s.f & V) === 0 && s.reactions !== null || qr(s)) && (l = an(s)), Xt.set(s, l), l;
1680
+ return ((s.f & V) === 0 && s.reactions !== null || Br(s)) && (l = cn(s)), Xe.set(s, l), l;
1681
1681
  }
1682
- var a = (s.f & ot) === 0 && !vt && S !== null && (vo || (S.f & ot) !== 0), c = (s.f & be) === 0;
1683
- Qe(s) && (a && (s.f |= ot), br(s)), a && !c && (yr(s), Wr(s));
1682
+ var a = (s.f & oe) === 0 && !ve && S !== null && (vo || (S.f & oe) !== 0), c = (s.f & bt) === 0;
1683
+ Qt(s) && (a && (s.f |= oe), yr(s)), a && !c && (wr(s), qr(s));
1684
1684
  }
1685
- if (gt?.has(e))
1686
- return gt.get(e);
1687
- if ((e.f & Jt) !== 0)
1685
+ if (ge?.has(e))
1686
+ return ge.get(e);
1687
+ if ((e.f & Je) !== 0)
1688
1688
  throw e.v;
1689
1689
  return e.v;
1690
1690
  }
1691
- function Wr(e) {
1692
- if (e.f |= ot, e.deps !== null)
1691
+ function qr(e) {
1692
+ if (e.f |= oe, e.deps !== null)
1693
1693
  for (const t of e.deps)
1694
- (t.reactions ?? (t.reactions = [])).push(e), (t.f & j) !== 0 && (t.f & ot) === 0 && (yr(
1694
+ (t.reactions ?? (t.reactions = [])).push(e), (t.f & j) !== 0 && (t.f & oe) === 0 && (wr(
1695
1695
  /** @type {Derived} */
1696
1696
  t
1697
- ), Wr(
1697
+ ), qr(
1698
1698
  /** @type {Derived} */
1699
1699
  t
1700
1700
  ));
1701
1701
  }
1702
- function qr(e) {
1702
+ function Br(e) {
1703
1703
  if (e.v === N) return !0;
1704
1704
  if (e.deps === null) return !1;
1705
1705
  for (const t of e.deps)
1706
- if (Xt.has(t) || (t.f & j) !== 0 && qr(
1706
+ if (Xe.has(t) || (t.f & j) !== 0 && Br(
1707
1707
  /** @type {Derived} */
1708
1708
  t
1709
1709
  ))
1710
1710
  return !0;
1711
1711
  return !1;
1712
1712
  }
1713
- function Br(e) {
1714
- var t = vt;
1713
+ function Dr(e) {
1714
+ var t = ve;
1715
1715
  try {
1716
- return vt = !0, e();
1716
+ return ve = !0, e();
1717
1717
  } finally {
1718
- vt = t;
1718
+ ve = t;
1719
1719
  }
1720
1720
  }
1721
- const xe = /* @__PURE__ */ Symbol("events"), Dr = /* @__PURE__ */ new Set(), Zo = /* @__PURE__ */ new Set();
1722
- function ze(e, t, o) {
1723
- (t[xe] ?? (t[xe] = {}))[e] = o;
1721
+ const xt = /* @__PURE__ */ Symbol("events"), Hr = /* @__PURE__ */ new Set(), Zo = /* @__PURE__ */ new Set();
1722
+ function zt(e, t, o) {
1723
+ (t[xt] ?? (t[xt] = {}))[e] = o;
1724
1724
  }
1725
- function ps(e) {
1725
+ function ms(e) {
1726
1726
  for (var t = 0; t < e.length; t++)
1727
- Dr.add(e[t]);
1727
+ Hr.add(e[t]);
1728
1728
  for (var o of Zo)
1729
1729
  o(e);
1730
1730
  }
1731
- let Mn = null;
1732
- function On(e) {
1731
+ let On = null;
1732
+ function Rn(e) {
1733
1733
  var t = this, o = (
1734
1734
  /** @type {Node} */
1735
1735
  t.ownerDocument
@@ -1737,13 +1737,13 @@ function On(e) {
1737
1737
  /** @type {null | Element} */
1738
1738
  r[0] || e.target
1739
1739
  );
1740
- Mn = e;
1741
- var s = 0, l = Mn === e && e[xe];
1740
+ On = e;
1741
+ var s = 0, l = On === e && e[xt];
1742
1742
  if (l) {
1743
1743
  var a = r.indexOf(l);
1744
1744
  if (a !== -1 && (t === document || t === /** @type {any} */
1745
1745
  window)) {
1746
- e[xe] = t;
1746
+ e[xt] = t;
1747
1747
  return;
1748
1748
  }
1749
1749
  var c = r.indexOf(t);
@@ -1759,14 +1759,14 @@ function On(e) {
1759
1759
  return i || o;
1760
1760
  }
1761
1761
  });
1762
- var d = S, f = A;
1763
- st(null), At(null);
1762
+ var d = S, f = k;
1763
+ se(null), ke(null);
1764
1764
  try {
1765
1765
  for (var b, g = []; i !== null; ) {
1766
1766
  var h = i.assignedSlot || i.parentNode || /** @type {any} */
1767
1767
  i.host || null;
1768
1768
  try {
1769
- var w = i[xe]?.[n];
1769
+ var w = i[xt]?.[n];
1770
1770
  w != null && (!/** @type {any} */
1771
1771
  i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1772
1772
  // -> the target could not have been disabled because it emits the event in the first place
@@ -1786,50 +1786,50 @@ function On(e) {
1786
1786
  throw b;
1787
1787
  }
1788
1788
  } finally {
1789
- e[xe] = t, delete e.currentTarget, st(d), At(f);
1789
+ e[xt] = t, delete e.currentTarget, se(d), ke(f);
1790
1790
  }
1791
1791
  }
1792
1792
  }
1793
- const vs = (
1793
+ const bs = (
1794
1794
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
1795
1795
  globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
1796
1796
  /** @param {string} html */
1797
1797
  createHTML: (e) => e
1798
1798
  })
1799
1799
  );
1800
- function gs(e) {
1800
+ function ys(e) {
1801
1801
  return (
1802
1802
  /** @type {string} */
1803
- vs?.createHTML(e) ?? e
1803
+ bs?.createHTML(e) ?? e
1804
1804
  );
1805
1805
  }
1806
- function ms(e) {
1807
- var t = cn("template");
1808
- return t.innerHTML = gs(e.replaceAll("<!>", "<!---->")), t.content;
1806
+ function ws(e) {
1807
+ var t = un("template");
1808
+ return t.innerHTML = ys(e.replaceAll("<!>", "<!---->")), t.content;
1809
1809
  }
1810
1810
  function go(e, t) {
1811
1811
  var o = (
1812
1812
  /** @type {Effect} */
1813
- A
1813
+ k
1814
1814
  );
1815
1815
  o.nodes === null && (o.nodes = { start: e, end: t, a: null, t: null });
1816
1816
  }
1817
1817
  // @__NO_SIDE_EFFECTS__
1818
- function ee(e, t) {
1819
- var o = (t & fi) !== 0, n = (t & hi) !== 0, r, i = !e.startsWith("<!>");
1818
+ function tt(e, t) {
1819
+ var o = (t & vi) !== 0, n = (t & gi) !== 0, r, i = !e.startsWith("<!>");
1820
1820
  return () => {
1821
1821
  if (E)
1822
1822
  return go(_, null), _;
1823
- r === void 0 && (r = ms(i ? e : "<!>" + e), o || (r = /** @type {TemplateNode} */
1824
- /* @__PURE__ */ ge(r)));
1823
+ r === void 0 && (r = ws(i ? e : "<!>" + e), o || (r = /** @type {TemplateNode} */
1824
+ /* @__PURE__ */ gt(r)));
1825
1825
  var s = (
1826
1826
  /** @type {TemplateNode} */
1827
- n || $r ? document.importNode(r, !0) : r.cloneNode(!0)
1827
+ n || xr ? document.importNode(r, !0) : r.cloneNode(!0)
1828
1828
  );
1829
1829
  if (o) {
1830
1830
  var l = (
1831
1831
  /** @type {TemplateNode} */
1832
- /* @__PURE__ */ ge(s)
1832
+ /* @__PURE__ */ gt(s)
1833
1833
  ), a = (
1834
1834
  /** @type {TemplateNode} */
1835
1835
  s.lastChild
@@ -1840,13 +1840,13 @@ function ee(e, t) {
1840
1840
  return s;
1841
1841
  };
1842
1842
  }
1843
- function Et(e, t) {
1843
+ function Ee(e, t) {
1844
1844
  if (E) {
1845
1845
  var o = (
1846
1846
  /** @type {Effect & { nodes: EffectNodes }} */
1847
- A
1847
+ k
1848
1848
  );
1849
- ((o.f & be) === 0 || o.nodes.end === null) && (o.nodes.end = _), ko();
1849
+ ((o.f & bt) === 0 || o.nodes.end === null) && (o.nodes.end = _), Ao();
1850
1850
  return;
1851
1851
  }
1852
1852
  e !== null && e.before(
@@ -1854,48 +1854,48 @@ function Et(e, t) {
1854
1854
  t
1855
1855
  );
1856
1856
  }
1857
- const bs = ["touchstart", "touchmove"];
1858
- function ys(e) {
1859
- return bs.includes(e);
1857
+ const Ts = ["touchstart", "touchmove"];
1858
+ function Is(e) {
1859
+ return Ts.includes(e);
1860
1860
  }
1861
- function Rn(e, t) {
1861
+ function Nn(e, t) {
1862
1862
  var o = t == null ? "" : typeof t == "object" ? `${t}` : t;
1863
1863
  o !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = o, e.nodeValue = `${o}`);
1864
1864
  }
1865
- function Hr(e, t) {
1866
- return Fr(e, t);
1865
+ function Fr(e, t) {
1866
+ return Gr(e, t);
1867
1867
  }
1868
- function ws(e, t) {
1868
+ function $s(e, t) {
1869
1869
  Xo(), t.intro = t.intro ?? !1;
1870
1870
  const o = t.target, n = E, r = _;
1871
1871
  try {
1872
- for (var i = /* @__PURE__ */ ge(o); i && (i.nodeType !== Re || /** @type {Comment} */
1873
- i.data !== Kn); )
1874
- i = /* @__PURE__ */ it(i);
1872
+ for (var i = /* @__PURE__ */ gt(o); i && (i.nodeType !== Rt || /** @type {Comment} */
1873
+ i.data !== Jn); )
1874
+ i = /* @__PURE__ */ ie(i);
1875
1875
  if (!i)
1876
- throw Ae;
1877
- pt(!0), F(
1876
+ throw kt;
1877
+ pe(!0), F(
1878
1878
  /** @type {Comment} */
1879
1879
  i
1880
1880
  );
1881
- const s = Fr(e, { ...t, anchor: i });
1882
- return pt(!1), /** @type {Exports} */
1881
+ const s = Gr(e, { ...t, anchor: i });
1882
+ return pe(!1), /** @type {Exports} */
1883
1883
  s;
1884
1884
  } catch (s) {
1885
1885
  if (s instanceof Error && s.message.split(`
1886
1886
  `).some((l) => l.startsWith("https://svelte.dev/e/")))
1887
1887
  throw s;
1888
- return s !== Ae && console.warn("Failed to hydrate: ", s), t.recover === !1 && Pi(), Xo(), Ar(o), pt(!1), Hr(e, t);
1888
+ return s !== kt && console.warn("Failed to hydrate: ", s), t.recover === !1 && Oi(), Xo(), Ar(o), pe(!1), Fr(e, t);
1889
1889
  } finally {
1890
- pt(n), F(r);
1890
+ pe(n), F(r);
1891
1891
  }
1892
1892
  }
1893
1893
  const ao = /* @__PURE__ */ new Map();
1894
- function Fr(e, { target: t, anchor: o, props: n = {}, events: r, context: i, intro: s = !0, transformError: l }) {
1894
+ function Gr(e, { target: t, anchor: o, props: n = {}, events: r, context: i, intro: s = !0, transformError: l }) {
1895
1895
  Xo();
1896
- var a = void 0, c = as(() => {
1897
- var d = o ?? t.appendChild(St());
1898
- Ui(
1896
+ var a = void 0, c = ds(() => {
1897
+ var d = o ?? t.appendChild(Se());
1898
+ Xi(
1899
1899
  /** @type {TemplateNode} */
1900
1900
  d,
1901
1901
  {
@@ -1903,19 +1903,19 @@ function Fr(e, { target: t, anchor: o, props: n = {}, events: r, context: i, int
1903
1903
  }
1904
1904
  },
1905
1905
  (g) => {
1906
- nr({});
1906
+ rr({});
1907
1907
  var h = (
1908
1908
  /** @type {ComponentContext} */
1909
- rt
1909
+ re
1910
1910
  );
1911
1911
  if (i && (h.c = i), r && (n.$$events = r), E && go(
1912
1912
  /** @type {TemplateNode} */
1913
1913
  g,
1914
1914
  null
1915
- ), a = e(g, n) || {}, E && (A.nodes.end = _, _ === null || _.nodeType !== Re || /** @type {Comment} */
1916
- _.data !== nn))
1917
- throw Ao(), Ae;
1918
- rr();
1915
+ ), a = e(g, n) || {}, E && (k.nodes.end = _, _ === null || _.nodeType !== Rt || /** @type {Comment} */
1916
+ _.data !== rn))
1917
+ throw ko(), kt;
1918
+ ir();
1919
1919
  },
1920
1920
  l
1921
1921
  );
@@ -1924,17 +1924,17 @@ function Fr(e, { target: t, anchor: o, props: n = {}, events: r, context: i, int
1924
1924
  var w = g[h];
1925
1925
  if (!f.has(w)) {
1926
1926
  f.add(w);
1927
- var T = ys(w);
1928
- for (const lt of [t, document]) {
1929
- var $ = ao.get(lt);
1930
- $ === void 0 && ($ = /* @__PURE__ */ new Map(), ao.set(lt, $));
1927
+ var T = Is(w);
1928
+ for (const le of [t, document]) {
1929
+ var $ = ao.get(le);
1930
+ $ === void 0 && ($ = /* @__PURE__ */ new Map(), ao.set(le, $));
1931
1931
  var P = $.get(w);
1932
- P === void 0 ? (lt.addEventListener(w, On, { passive: T }), $.set(w, 1)) : $.set(w, P + 1);
1932
+ P === void 0 ? (le.addEventListener(w, Rn, { passive: T }), $.set(w, 1)) : $.set(w, P + 1);
1933
1933
  }
1934
1934
  }
1935
1935
  }
1936
1936
  };
1937
- return b(xo(Dr)), Zo.add(b), () => {
1937
+ return b(xo(Hr)), Zo.add(b), () => {
1938
1938
  for (var g of f)
1939
1939
  for (const T of [t, document]) {
1940
1940
  var h = (
@@ -1944,7 +1944,7 @@ function Fr(e, { target: t, anchor: o, props: n = {}, events: r, context: i, int
1944
1944
  /** @type {number} */
1945
1945
  h.get(g)
1946
1946
  );
1947
- --w == 0 ? (T.removeEventListener(g, On), h.delete(g), h.size === 0 && ao.delete(T)) : h.set(g, w);
1947
+ --w == 0 ? (T.removeEventListener(g, Rn), h.delete(g), h.size === 0 && ao.delete(T)) : h.set(g, w);
1948
1948
  }
1949
1949
  Zo.delete(b), d !== o && d.parentNode?.removeChild(d);
1950
1950
  };
@@ -1952,53 +1952,53 @@ function Fr(e, { target: t, anchor: o, props: n = {}, events: r, context: i, int
1952
1952
  return Yo.set(a, c), a;
1953
1953
  }
1954
1954
  let Yo = /* @__PURE__ */ new WeakMap();
1955
- function Ts(e, t) {
1955
+ function xs(e, t) {
1956
1956
  const o = Yo.get(e);
1957
1957
  return o ? (Yo.delete(e), o(t)) : Promise.resolve();
1958
1958
  }
1959
- var yt, Ft, wt, Te, mo, Qo, Gr;
1960
- class Is {
1959
+ var ye, Fe, we, Tt, mo, Qo, Ur;
1960
+ class Ss {
1961
1961
  /**
1962
1962
  * @param {TemplateNode} anchor
1963
1963
  * @param {boolean} transition
1964
1964
  */
1965
1965
  constructor(t, o = !0) {
1966
- m(this, "anchor"), x(this, yt, /* @__PURE__ */ new Map()), x(this, Ft, /* @__PURE__ */ new Map()), x(this, wt, /* @__PURE__ */ new Map()), x(this, Te, /* @__PURE__ */ new Set()), x(this, mo, !0), x(this, Qo, (n) => {
1967
- if (u(this, yt).has(n)) {
1966
+ m(this, "anchor"), x(this, ye, /* @__PURE__ */ new Map()), x(this, Fe, /* @__PURE__ */ new Map()), x(this, we, /* @__PURE__ */ new Map()), x(this, Tt, /* @__PURE__ */ new Set()), x(this, mo, !0), x(this, Qo, (n) => {
1967
+ if (u(this, ye).has(n)) {
1968
1968
  var r = (
1969
1969
  /** @type {Key} */
1970
- u(this, yt).get(n)
1971
- ), i = u(this, Ft).get(r);
1970
+ u(this, ye).get(n)
1971
+ ), i = u(this, Fe).get(r);
1972
1972
  if (i)
1973
- pn(i), u(this, Te).delete(r);
1973
+ vn(i), u(this, Tt).delete(r);
1974
1974
  else {
1975
- var s = u(this, wt).get(r);
1976
- s && (s.effect.f & D) === 0 && (u(this, Ft).set(r, s.effect), u(this, wt).delete(r), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), i = s.effect);
1975
+ var s = u(this, we).get(r);
1976
+ s && (s.effect.f & D) === 0 && (u(this, Fe).set(r, s.effect), u(this, we).delete(r), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), i = s.effect);
1977
1977
  }
1978
- for (const [l, a] of u(this, yt)) {
1979
- if (u(this, yt).delete(l), l === n)
1978
+ for (const [l, a] of u(this, ye)) {
1979
+ if (u(this, ye).delete(l), l === n)
1980
1980
  break;
1981
- const c = u(this, wt).get(a);
1982
- c && (H(c.effect), u(this, wt).delete(a));
1981
+ const c = u(this, we).get(a);
1982
+ c && (H(c.effect), u(this, we).delete(a));
1983
1983
  }
1984
- for (const [l, a] of u(this, Ft)) {
1985
- if (l === r || u(this, Te).has(l) || (a.f & D) !== 0) continue;
1984
+ for (const [l, a] of u(this, Fe)) {
1985
+ if (l === r || u(this, Tt).has(l) || (a.f & D) !== 0) continue;
1986
1986
  const c = () => {
1987
- if (Array.from(u(this, yt).values()).includes(l)) {
1987
+ if (Array.from(u(this, ye).values()).includes(l)) {
1988
1988
  var d = document.createDocumentFragment();
1989
- vn(a, d), d.append(St()), u(this, wt).set(l, { effect: a, fragment: d });
1989
+ gn(a, d), d.append(Se()), u(this, we).set(l, { effect: a, fragment: d });
1990
1990
  } else
1991
1991
  H(a);
1992
- u(this, Te).delete(l), u(this, Ft).delete(l);
1992
+ u(this, Tt).delete(l), u(this, Fe).delete(l);
1993
1993
  };
1994
- u(this, mo) || !i ? (u(this, Te).add(l), me(a, c, !1)) : c();
1994
+ u(this, mo) || !i ? (u(this, Tt).add(l), mt(a, c, !1)) : c();
1995
1995
  }
1996
1996
  }
1997
- }), x(this, Gr, (n) => {
1998
- u(this, yt).delete(n);
1999
- const r = Array.from(u(this, yt).values());
2000
- for (const [i, s] of u(this, wt))
2001
- r.includes(i) || (H(s.effect), u(this, wt).delete(i));
1997
+ }), x(this, Ur, (n) => {
1998
+ u(this, ye).delete(n);
1999
+ const r = Array.from(u(this, ye).values());
2000
+ for (const [i, s] of u(this, we))
2001
+ r.includes(i) || (H(s.effect), u(this, we).delete(i));
2002
2002
  }), this.anchor = t, I(this, mo, o);
2003
2003
  }
2004
2004
  /**
@@ -2010,18 +2010,18 @@ class Is {
2010
2010
  var n = (
2011
2011
  /** @type {Batch} */
2012
2012
  L
2013
- ), r = kr();
2014
- o && !u(this, Ft).has(t) && !u(this, wt).has(t) && u(this, Ft).set(
2013
+ ), r = _r();
2014
+ o && !u(this, Fe).has(t) && !u(this, we).has(t) && u(this, Fe).set(
2015
2015
  t,
2016
- ht(() => o(this.anchor))
2017
- ), u(this, yt).set(n, t), r || (E && (this.anchor = _), u(this, Qo).call(this, n));
2016
+ he(() => o(this.anchor))
2017
+ ), u(this, ye).set(n, t), r || (E && (this.anchor = _), u(this, Qo).call(this, n));
2018
2018
  }
2019
2019
  }
2020
- yt = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), mo = /* @__PURE__ */ new WeakMap(), Qo = /* @__PURE__ */ new WeakMap(), Gr = /* @__PURE__ */ new WeakMap();
2021
- function We(e, t, o = !1) {
2020
+ ye = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), mo = /* @__PURE__ */ new WeakMap(), Qo = /* @__PURE__ */ new WeakMap(), Ur = /* @__PURE__ */ new WeakMap();
2021
+ function Wt(e, t, o = !1) {
2022
2022
  var n;
2023
- E && (n = _, ko());
2024
- var r = new Is(e), i = o ? Ce : 0;
2023
+ E && (n = _, Ao());
2024
+ var r = new Ss(e), i = o ? Ct : 0;
2025
2025
  function s(l, a) {
2026
2026
  if (E) {
2027
2027
  var c = tr(
@@ -2030,7 +2030,7 @@ function We(e, t, o = !1) {
2030
2030
  );
2031
2031
  if (l !== parseInt(c.substring(1))) {
2032
2032
  var d = Io();
2033
- F(d), r.anchor = d, pt(!1), r.ensure(l, a), pt(!0);
2033
+ F(d), r.anchor = d, pe(!1), r.ensure(l, a), pe(!0);
2034
2034
  return;
2035
2035
  }
2036
2036
  }
@@ -2043,13 +2043,13 @@ function We(e, t, o = !1) {
2043
2043
  }), l || s(-1, null);
2044
2044
  }, i);
2045
2045
  }
2046
- function $s(e, t) {
2046
+ function ks(e, t) {
2047
2047
  return t;
2048
2048
  }
2049
- function xs(e, t, o) {
2049
+ function As(e, t, o) {
2050
2050
  for (var n = [], r = t.length, i, s = t.length, l = 0; l < r; l++) {
2051
2051
  let f = t[l];
2052
- me(
2052
+ mt(
2053
2053
  f,
2054
2054
  () => {
2055
2055
  if (i) {
@@ -2058,7 +2058,7 @@ function xs(e, t, o) {
2058
2058
  /** @type {Set<EachOutroGroup>} */
2059
2059
  e.outrogroups
2060
2060
  );
2061
- tn(e, xo(i.done)), b.delete(i), b.size === 0 && (e.outrogroups = null);
2061
+ en(e, xo(i.done)), b.delete(i), b.size === 0 && (e.outrogroups = null);
2062
2062
  }
2063
2063
  } else
2064
2064
  s -= 1;
@@ -2078,14 +2078,14 @@ function xs(e, t, o) {
2078
2078
  );
2079
2079
  Ar(d), d.append(c), e.items.clear();
2080
2080
  }
2081
- tn(e, t, !a);
2081
+ en(e, t, !a);
2082
2082
  } else
2083
2083
  i = {
2084
2084
  pending: new Set(t),
2085
2085
  done: /* @__PURE__ */ new Set()
2086
2086
  }, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(i);
2087
2087
  }
2088
- function tn(e, t, o = !0) {
2088
+ function en(e, t, o = !0) {
2089
2089
  var n;
2090
2090
  if (e.pending.size > 0) {
2091
2091
  n = /* @__PURE__ */ new Set();
@@ -2099,23 +2099,23 @@ function tn(e, t, o = !0) {
2099
2099
  for (var r = 0; r < t.length; r++) {
2100
2100
  var i = t[r];
2101
2101
  if (n?.has(i)) {
2102
- i.f |= Rt;
2102
+ i.f |= Re;
2103
2103
  const s = document.createDocumentFragment();
2104
- vn(i, s);
2104
+ gn(i, s);
2105
2105
  } else
2106
2106
  H(t[r], o);
2107
2107
  }
2108
2108
  }
2109
2109
  var co;
2110
- function Ss(e, t, o, n, r, i = null) {
2110
+ function _s(e, t, o, n, r, i = null) {
2111
2111
  var s = e, l = /* @__PURE__ */ new Map();
2112
- E && ko();
2113
- var a = null, c = /* @__PURE__ */ Qi(() => {
2112
+ E && Ao();
2113
+ var a = null, c = /* @__PURE__ */ os(() => {
2114
2114
  var $ = o();
2115
- return Xn($) ? $ : $ == null ? [] : xo($);
2115
+ return Zn($) ? $ : $ == null ? [] : xo($);
2116
2116
  }), d, f = /* @__PURE__ */ new Map(), b = !0;
2117
2117
  function g($) {
2118
- (T.effect.f & xt) === 0 && (T.pending.delete($), T.fallback = a, As(T, d, s, t, n), a !== null && (d.length === 0 ? (a.f & Rt) === 0 ? pn(a) : (a.f ^= Rt, Ge(a, null, s)) : me(a, () => {
2118
+ (T.effect.f & xe) === 0 && (T.pending.delete($), T.fallback = a, Cs(T, d, s, t, n), a !== null && (d.length === 0 ? (a.f & Re) === 0 ? vn(a) : (a.f ^= Re, Gt(a, null, s)) : mt(a, () => {
2119
2119
  a = null;
2120
2120
  })));
2121
2121
  }
@@ -2128,84 +2128,84 @@ function Ss(e, t, o, n, r, i = null) {
2128
2128
  var $ = d.length;
2129
2129
  let P = !1;
2130
2130
  if (E) {
2131
- var lt = tr(s) === on;
2132
- lt !== ($ === 0) && (s = Io(), F(s), pt(!1), P = !0);
2131
+ var le = tr(s) === nn;
2132
+ le !== ($ === 0) && (s = Io(), F(s), pe(!1), P = !0);
2133
2133
  }
2134
- for (var at = /* @__PURE__ */ new Set(), W = (
2134
+ for (var ae = /* @__PURE__ */ new Set(), W = (
2135
2135
  /** @type {Batch} */
2136
2136
  L
2137
- ), jt = kr(), Z = 0; Z < $; Z += 1) {
2138
- E && _.nodeType === Re && /** @type {Comment} */
2139
- _.data === nn && (s = /** @type {Comment} */
2140
- _, P = !0, pt(!1));
2141
- var Y = d[Z], ye = n(Y, Z), ct = b ? null : l.get(ye);
2142
- ct ? (ct.v && Le(ct.v, Y), ct.i && Le(ct.i, Z), jt && W.unskip_effect(ct.e)) : (ct = ks(
2137
+ ), je = _r(), Z = 0; Z < $; Z += 1) {
2138
+ E && _.nodeType === Rt && /** @type {Comment} */
2139
+ _.data === rn && (s = /** @type {Comment} */
2140
+ _, P = !0, pe(!1));
2141
+ var Y = d[Z], yt = n(Y, Z), ce = b ? null : l.get(yt);
2142
+ ce ? (ce.v && Lt(ce.v, Y), ce.i && Lt(ce.i, Z), je && W.unskip_effect(ce.e)) : (ce = Es(
2143
2143
  l,
2144
- b ? s : co ?? (co = St()),
2144
+ b ? s : co ?? (co = Se()),
2145
2145
  Y,
2146
- ye,
2146
+ yt,
2147
2147
  Z,
2148
2148
  r,
2149
2149
  t,
2150
2150
  o
2151
- ), b || (ct.e.f |= Rt), l.set(ye, ct)), at.add(ye);
2151
+ ), b || (ce.e.f |= Re), l.set(yt, ce)), ae.add(yt);
2152
2152
  }
2153
- if ($ === 0 && i && !a && (b ? a = ht(() => i(s)) : (a = ht(() => i(co ?? (co = St()))), a.f |= Rt)), $ > at.size && Ai(), E && $ > 0 && F(Io()), !b)
2154
- if (f.set(W, at), jt) {
2155
- for (const [to, Mo] of l)
2156
- at.has(to) || W.skip_effect(Mo.e);
2153
+ if ($ === 0 && i && !a && (b ? a = he(() => i(s)) : (a = he(() => i(co ?? (co = Se()))), a.f |= Re)), $ > ae.size && Ci(), E && $ > 0 && F(Io()), !b)
2154
+ if (f.set(W, ae), je) {
2155
+ for (const [eo, Mo] of l)
2156
+ ae.has(eo) || W.skip_effect(Mo.e);
2157
2157
  W.oncommit(g), W.ondiscard(h);
2158
2158
  } else
2159
2159
  g(W);
2160
- P && pt(!0), v(c);
2160
+ P && pe(!0), v(c);
2161
2161
  }), T = { effect: w, items: l, pending: f, outrogroups: null, fallback: a };
2162
2162
  b = !1, E && (s = _);
2163
2163
  }
2164
- function qe(e) {
2165
- for (; e !== null && (e.f & bt) === 0; )
2164
+ function qt(e) {
2165
+ for (; e !== null && (e.f & be) === 0; )
2166
2166
  e = e.next;
2167
2167
  return e;
2168
2168
  }
2169
- function As(e, t, o, n, r) {
2170
- var i = t.length, s = e.items, l = qe(e.effect.first), a, c = null, d = [], f = [], b, g, h, w;
2169
+ function Cs(e, t, o, n, r) {
2170
+ var i = t.length, s = e.items, l = qt(e.effect.first), a, c = null, d = [], f = [], b, g, h, w;
2171
2171
  for (w = 0; w < i; w += 1) {
2172
2172
  if (b = t[w], g = r(b, w), h = /** @type {EachItem} */
2173
2173
  s.get(g).e, e.outrogroups !== null)
2174
2174
  for (const Y of e.outrogroups)
2175
2175
  Y.pending.delete(h), Y.done.delete(h);
2176
- if ((h.f & Rt) !== 0)
2177
- if (h.f ^= Rt, h === l)
2178
- Ge(h, null, o);
2176
+ if ((h.f & Re) !== 0)
2177
+ if (h.f ^= Re, h === l)
2178
+ Gt(h, null, o);
2179
2179
  else {
2180
2180
  var T = c ? c.next : l;
2181
- h === e.effect.last && (e.effect.last = h.prev), h.prev && (h.prev.next = h.next), h.next && (h.next.prev = h.prev), Wt(e, c, h), Wt(e, h, T), Ge(h, T, o), c = h, d = [], f = [], l = qe(c.next);
2181
+ h === e.effect.last && (e.effect.last = h.prev), h.prev && (h.prev.next = h.next), h.next && (h.next.prev = h.prev), We(e, c, h), We(e, h, T), Gt(h, T, o), c = h, d = [], f = [], l = qt(c.next);
2182
2182
  continue;
2183
2183
  }
2184
- if ((h.f & D) !== 0 && pn(h), h !== l) {
2184
+ if ((h.f & D) !== 0 && vn(h), h !== l) {
2185
2185
  if (a !== void 0 && a.has(h)) {
2186
2186
  if (d.length < f.length) {
2187
2187
  var $ = f[0], P;
2188
2188
  c = $.prev;
2189
- var lt = d[0], at = d[d.length - 1];
2189
+ var le = d[0], ae = d[d.length - 1];
2190
2190
  for (P = 0; P < d.length; P += 1)
2191
- Ge(d[P], $, o);
2191
+ Gt(d[P], $, o);
2192
2192
  for (P = 0; P < f.length; P += 1)
2193
2193
  a.delete(f[P]);
2194
- Wt(e, lt.prev, at.next), Wt(e, c, lt), Wt(e, at, $), l = $, c = at, w -= 1, d = [], f = [];
2194
+ We(e, le.prev, ae.next), We(e, c, le), We(e, ae, $), l = $, c = ae, w -= 1, d = [], f = [];
2195
2195
  } else
2196
- a.delete(h), Ge(h, l, o), Wt(e, h.prev, h.next), Wt(e, h, c === null ? e.effect.first : c.next), Wt(e, c, h), c = h;
2196
+ a.delete(h), Gt(h, l, o), We(e, h.prev, h.next), We(e, h, c === null ? e.effect.first : c.next), We(e, c, h), c = h;
2197
2197
  continue;
2198
2198
  }
2199
2199
  for (d = [], f = []; l !== null && l !== h; )
2200
- (a ?? (a = /* @__PURE__ */ new Set())).add(l), f.push(l), l = qe(l.next);
2200
+ (a ?? (a = /* @__PURE__ */ new Set())).add(l), f.push(l), l = qt(l.next);
2201
2201
  if (l === null)
2202
2202
  continue;
2203
2203
  }
2204
- (h.f & Rt) === 0 && d.push(h), c = h, l = qe(h.next);
2204
+ (h.f & Re) === 0 && d.push(h), c = h, l = qt(h.next);
2205
2205
  }
2206
2206
  if (e.outrogroups !== null) {
2207
2207
  for (const Y of e.outrogroups)
2208
- Y.pending.size === 0 && (tn(e, xo(Y.done)), e.outrogroups?.delete(Y));
2208
+ Y.pending.size === 0 && (en(e, xo(Y.done)), e.outrogroups?.delete(Y));
2209
2209
  e.outrogroups.size === 0 && (e.outrogroups = null);
2210
2210
  }
2211
2211
  if (l !== null || a !== void 0) {
@@ -2214,72 +2214,72 @@ function As(e, t, o, n, r) {
2214
2214
  for (h of a)
2215
2215
  (h.f & D) === 0 && W.push(h);
2216
2216
  for (; l !== null; )
2217
- (l.f & D) === 0 && l !== e.fallback && W.push(l), l = qe(l.next);
2218
- var jt = W.length;
2219
- if (jt > 0) {
2217
+ (l.f & D) === 0 && l !== e.fallback && W.push(l), l = qt(l.next);
2218
+ var je = W.length;
2219
+ if (je > 0) {
2220
2220
  var Z = null;
2221
- xs(e, W, Z);
2221
+ As(e, W, Z);
2222
2222
  }
2223
2223
  }
2224
2224
  }
2225
- function ks(e, t, o, n, r, i, s, l) {
2226
- var a = (s & ci) !== 0 ? (s & di) === 0 ? /* @__PURE__ */ Tr(o, !1, !1) : ve(o) : null, c = (s & ui) !== 0 ? ve(r) : null;
2225
+ function Es(e, t, o, n, r, i, s, l) {
2226
+ var a = (s & fi) !== 0 ? (s & pi) === 0 ? /* @__PURE__ */ Ir(o, !1, !1) : vt(o) : null, c = (s & hi) !== 0 ? vt(r) : null;
2227
2227
  return {
2228
2228
  v: a,
2229
2229
  i: c,
2230
- e: ht(() => (i(t, a ?? o, c ?? r, l), () => {
2230
+ e: he(() => (i(t, a ?? o, c ?? r, l), () => {
2231
2231
  e.delete(n);
2232
2232
  }))
2233
2233
  };
2234
2234
  }
2235
- function Ge(e, t, o) {
2235
+ function Gt(e, t, o) {
2236
2236
  if (e.nodes)
2237
- for (var n = e.nodes.start, r = e.nodes.end, i = t && (t.f & Rt) === 0 ? (
2237
+ for (var n = e.nodes.start, r = e.nodes.end, i = t && (t.f & Re) === 0 ? (
2238
2238
  /** @type {EffectNodes} */
2239
2239
  t.nodes.start
2240
2240
  ) : o; n !== null; ) {
2241
2241
  var s = (
2242
2242
  /** @type {TemplateNode} */
2243
- /* @__PURE__ */ it(n)
2243
+ /* @__PURE__ */ ie(n)
2244
2244
  );
2245
2245
  if (i.before(n), n === r)
2246
2246
  return;
2247
2247
  n = s;
2248
2248
  }
2249
2249
  }
2250
- function Wt(e, t, o) {
2250
+ function We(e, t, o) {
2251
2251
  t === null ? e.effect.first = o : t.next = o, o === null ? e.effect.last = t : o.prev = t;
2252
2252
  }
2253
- function _s(e, t) {
2253
+ function Ps(e, t) {
2254
2254
  let o = null, n = E;
2255
2255
  var r;
2256
2256
  if (E) {
2257
2257
  o = _;
2258
- for (var i = /* @__PURE__ */ ge(document.head); i !== null && (i.nodeType !== Re || /** @type {Comment} */
2258
+ for (var i = /* @__PURE__ */ gt(document.head); i !== null && (i.nodeType !== Rt || /** @type {Comment} */
2259
2259
  i.data !== e); )
2260
- i = /* @__PURE__ */ it(i);
2260
+ i = /* @__PURE__ */ ie(i);
2261
2261
  if (i === null)
2262
- pt(!1);
2262
+ pe(!1);
2263
2263
  else {
2264
2264
  var s = (
2265
2265
  /** @type {TemplateNode} */
2266
- /* @__PURE__ */ it(i)
2266
+ /* @__PURE__ */ ie(i)
2267
2267
  );
2268
2268
  i.remove(), F(s);
2269
2269
  }
2270
2270
  }
2271
- E || (r = document.head.appendChild(St()));
2271
+ E || (r = document.head.appendChild(Se()));
2272
2272
  try {
2273
- Eo(() => t(r), Qn | te);
2273
+ Eo(() => t(r), er | et);
2274
2274
  } finally {
2275
- n && (pt(!0), F(
2275
+ n && (pe(!0), F(
2276
2276
  /** @type {TemplateNode} */
2277
2277
  o
2278
2278
  ));
2279
2279
  }
2280
2280
  }
2281
- function Cs(e, t) {
2282
- Er(() => {
2281
+ function Ls(e, t) {
2282
+ Pr(() => {
2283
2283
  var o = e.getRootNode(), n = (
2284
2284
  /** @type {ShadowRoot} */
2285
2285
  o.host ? (
@@ -2292,63 +2292,63 @@ function Cs(e, t) {
2292
2292
  )
2293
2293
  );
2294
2294
  if (!n.querySelector("#" + t.hash)) {
2295
- const r = cn("style");
2295
+ const r = un("style");
2296
2296
  r.id = t.hash, r.textContent = t.code, n.appendChild(r);
2297
2297
  }
2298
2298
  });
2299
2299
  }
2300
- function Es(e, t) {
2300
+ function Ms(e, t) {
2301
2301
  return e == null ? null : String(e);
2302
2302
  }
2303
- function Nn(e, t, o, n) {
2303
+ function Vn(e, t, o, n) {
2304
2304
  var r = e.__style;
2305
2305
  if (E || r !== t) {
2306
- var i = Es(t);
2306
+ var i = Ms(t);
2307
2307
  (!E || i !== e.getAttribute("style")) && (i == null ? e.removeAttribute("style") : e.style.cssText = i), e.__style = t;
2308
2308
  }
2309
2309
  return n;
2310
2310
  }
2311
- const Ps = /* @__PURE__ */ Symbol("is custom element"), Ls = /* @__PURE__ */ Symbol("is html"), Ms = xi ? "link" : "LINK";
2312
- function Vn(e, t, o, n) {
2313
- var r = Os(e);
2314
- E && (r[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Ms) || r[t] !== (r[t] = o) && (t === "loading" && (e[$i] = o), o == null ? e.removeAttribute(t) : typeof o != "string" && Rs(e).includes(t) ? e[t] = o : e.setAttribute(t, o));
2311
+ const Os = /* @__PURE__ */ Symbol("is custom element"), Rs = /* @__PURE__ */ Symbol("is html"), Ns = Ai ? "link" : "LINK";
2312
+ function jn(e, t, o, n) {
2313
+ var r = Vs(e);
2314
+ E && (r[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Ns) || r[t] !== (r[t] = o) && (t === "loading" && (e[ki] = o), o == null ? e.removeAttribute(t) : typeof o != "string" && js(e).includes(t) ? e[t] = o : e.setAttribute(t, o));
2315
2315
  }
2316
- function Os(e) {
2316
+ function Vs(e) {
2317
2317
  return (
2318
2318
  /** @type {Record<string | symbol, unknown>} **/
2319
2319
  // @ts-expect-error
2320
2320
  e.__attributes ?? (e.__attributes = {
2321
- [Ps]: e.nodeName.includes("-"),
2322
- [Ls]: e.namespaceURI === Jn
2321
+ [Os]: e.nodeName.includes("-"),
2322
+ [Rs]: e.namespaceURI === Xn
2323
2323
  })
2324
2324
  );
2325
2325
  }
2326
- var jn = /* @__PURE__ */ new Map();
2327
- function Rs(e) {
2328
- var t = e.getAttribute("is") || e.nodeName, o = jn.get(t);
2326
+ var zn = /* @__PURE__ */ new Map();
2327
+ function js(e) {
2328
+ var t = e.getAttribute("is") || e.nodeName, o = zn.get(t);
2329
2329
  if (o) return o;
2330
- jn.set(t, o = []);
2330
+ zn.set(t, o = []);
2331
2331
  for (var n, r = e, i = Element.prototype; i !== r; ) {
2332
- n = gi(r);
2332
+ n = yi(r);
2333
2333
  for (var s in n)
2334
2334
  n[s].set && o.push(s);
2335
- r = Zn(r);
2335
+ r = Yn(r);
2336
2336
  }
2337
2337
  return o;
2338
2338
  }
2339
- function zn(e, t) {
2339
+ function Wn(e, t) {
2340
2340
  return e === t || e?.[uo] === t;
2341
2341
  }
2342
- function Wn(e = {}, t, o, n) {
2343
- return Er(() => {
2342
+ function qn(e = {}, t, o, n) {
2343
+ return Pr(() => {
2344
2344
  var r, i;
2345
- return fn(() => {
2346
- r = i, i = [], Br(() => {
2347
- e !== o(...i) && (t(e, ...i), r && zn(o(...r), e) && t(null, ...r));
2345
+ return hn(() => {
2346
+ r = i, i = [], Dr(() => {
2347
+ e !== o(...i) && (t(e, ...i), r && Wn(o(...r), e) && t(null, ...r));
2348
2348
  });
2349
2349
  }), () => {
2350
- he(() => {
2351
- i && zn(o(...i), e) && t(null, ...i);
2350
+ ht(() => {
2351
+ i && Wn(o(...i), e) && t(null, ...i);
2352
2352
  });
2353
2353
  };
2354
2354
  }), e;
@@ -2371,33 +2371,33 @@ function Vo(e, t, o, n) {
2371
2371
  };
2372
2372
  var c = !1, d = /* @__PURE__ */ Co(() => (c = !1, a())), f = (
2373
2373
  /** @type {Effect} */
2374
- A
2374
+ k
2375
2375
  );
2376
2376
  return (
2377
2377
  /** @type {() => V} */
2378
2378
  (function(b, g) {
2379
2379
  if (arguments.length > 0) {
2380
2380
  const h = g ? v(d) : b;
2381
- return k(d, h), c = !0, r !== void 0 && (r = h), b;
2381
+ return A(d, h), c = !0, r !== void 0 && (r = h), b;
2382
2382
  }
2383
- return Zt && c || (f.f & xt) !== 0 ? d.v : v(d);
2383
+ return Ze && c || (f.f & xe) !== 0 ? d.v : v(d);
2384
2384
  })
2385
2385
  );
2386
2386
  }
2387
- function Ns(e) {
2388
- return new Vs(e);
2387
+ function zs(e) {
2388
+ return new Ws(e);
2389
2389
  }
2390
- var Gt, ft;
2391
- class Vs {
2390
+ var Ge, fe;
2391
+ class Ws {
2392
2392
  /**
2393
2393
  * @param {ComponentConstructorOptions & {
2394
2394
  * component: any;
2395
2395
  * }} options
2396
2396
  */
2397
2397
  constructor(t) {
2398
- x(this, Gt), x(this, ft);
2398
+ x(this, Ge), x(this, fe);
2399
2399
  var o = /* @__PURE__ */ new Map(), n = (i, s) => {
2400
- var l = /* @__PURE__ */ Tr(s, !1, !1);
2400
+ var l = /* @__PURE__ */ Ir(s, !1, !1);
2401
2401
  return o.set(i, l), l;
2402
2402
  };
2403
2403
  const r = new Proxy(
@@ -2407,14 +2407,14 @@ class Vs {
2407
2407
  return v(o.get(s) ?? n(s, Reflect.get(i, s)));
2408
2408
  },
2409
2409
  has(i, s) {
2410
- return s === Ii ? !0 : (v(o.get(s) ?? n(s, Reflect.get(i, s))), Reflect.has(i, s));
2410
+ return s === Si ? !0 : (v(o.get(s) ?? n(s, Reflect.get(i, s))), Reflect.has(i, s));
2411
2411
  },
2412
2412
  set(i, s, l) {
2413
- return k(o.get(s) ?? n(s, l), l), Reflect.set(i, s, l);
2413
+ return A(o.get(s) ?? n(s, l), l), Reflect.set(i, s, l);
2414
2414
  }
2415
2415
  }
2416
2416
  );
2417
- I(this, ft, (t.hydrate ? ws : Hr)(t.component, {
2417
+ I(this, fe, (t.hydrate ? $s : Fr)(t.component, {
2418
2418
  target: t.target,
2419
2419
  anchor: t.anchor,
2420
2420
  props: r,
@@ -2422,28 +2422,28 @@ class Vs {
2422
2422
  intro: t.intro ?? !1,
2423
2423
  recover: t.recover,
2424
2424
  transformError: t.transformError
2425
- })), (!t?.props?.$$host || t.sync === !1) && ho(), I(this, Gt, r.$$events);
2426
- for (const i of Object.keys(u(this, ft)))
2425
+ })), (!t?.props?.$$host || t.sync === !1) && ho(), I(this, Ge, r.$$events);
2426
+ for (const i of Object.keys(u(this, fe)))
2427
2427
  i === "$set" || i === "$destroy" || i === "$on" || To(this, i, {
2428
2428
  get() {
2429
- return u(this, ft)[i];
2429
+ return u(this, fe)[i];
2430
2430
  },
2431
2431
  /** @param {any} value */
2432
2432
  set(s) {
2433
- u(this, ft)[i] = s;
2433
+ u(this, fe)[i] = s;
2434
2434
  },
2435
2435
  enumerable: !0
2436
2436
  });
2437
- u(this, ft).$set = /** @param {Record<string, any>} next */
2437
+ u(this, fe).$set = /** @param {Record<string, any>} next */
2438
2438
  (i) => {
2439
2439
  Object.assign(r, i);
2440
- }, u(this, ft).$destroy = () => {
2441
- Ts(u(this, ft));
2440
+ }, u(this, fe).$destroy = () => {
2441
+ xs(u(this, fe));
2442
2442
  };
2443
2443
  }
2444
2444
  /** @param {Record<string, any>} props */
2445
2445
  $set(t) {
2446
- u(this, ft).$set(t);
2446
+ u(this, fe).$set(t);
2447
2447
  }
2448
2448
  /**
2449
2449
  * @param {string} event
@@ -2451,22 +2451,22 @@ class Vs {
2451
2451
  * @returns {any}
2452
2452
  */
2453
2453
  $on(t, o) {
2454
- u(this, Gt)[t] = u(this, Gt)[t] || [];
2454
+ u(this, Ge)[t] = u(this, Ge)[t] || [];
2455
2455
  const n = (...r) => o.call(this, ...r);
2456
- return u(this, Gt)[t].push(n), () => {
2457
- u(this, Gt)[t] = u(this, Gt)[t].filter(
2456
+ return u(this, Ge)[t].push(n), () => {
2457
+ u(this, Ge)[t] = u(this, Ge)[t].filter(
2458
2458
  /** @param {any} fn */
2459
2459
  (r) => r !== n
2460
2460
  );
2461
2461
  };
2462
2462
  }
2463
2463
  $destroy() {
2464
- u(this, ft).$destroy();
2464
+ u(this, fe).$destroy();
2465
2465
  }
2466
2466
  }
2467
- Gt = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap();
2468
- let Ur;
2469
- typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
2467
+ Ge = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap();
2468
+ let Kr;
2469
+ typeof HTMLElement == "function" && (Kr = class extends HTMLElement {
2470
2470
  /**
2471
2471
  * @param {*} $$componentCtor
2472
2472
  * @param {*} $$slots
@@ -2502,13 +2502,13 @@ typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
2502
2502
  if (this.$$cn = !0, !this.$$c) {
2503
2503
  let e = function(n) {
2504
2504
  return (r) => {
2505
- const i = cn("slot");
2506
- n !== "default" && (i.name = n), Et(r, i);
2505
+ const i = un("slot");
2506
+ n !== "default" && (i.name = n), Ee(r, i);
2507
2507
  };
2508
2508
  };
2509
2509
  if (await Promise.resolve(), !this.$$cn || this.$$c)
2510
2510
  return;
2511
- const t = {}, o = js(this);
2511
+ const t = {}, o = qs(this);
2512
2512
  for (const n of this.$$s)
2513
2513
  n in o && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
2514
2514
  for (const n of this.attributes) {
@@ -2517,7 +2517,7 @@ typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
2517
2517
  }
2518
2518
  for (const n in this.$$p_d)
2519
2519
  !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
2520
- this.$$c = Ns({
2520
+ this.$$c = zs({
2521
2521
  component: this.$$ctor,
2522
2522
  target: this.$$shadowRoot || this,
2523
2523
  props: {
@@ -2525,8 +2525,8 @@ typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
2525
2525
  $$slots: t,
2526
2526
  $$host: this
2527
2527
  }
2528
- }), this.$$me = ls(() => {
2529
- fn(() => {
2528
+ }), this.$$me = us(() => {
2529
+ hn(() => {
2530
2530
  this.$$r = !0;
2531
2531
  for (const n of wo(this.$$c)) {
2532
2532
  if (!this.$$p_d[n]?.reflect) continue;
@@ -2604,7 +2604,7 @@ function bo(e, t, o, n) {
2604
2604
  return t;
2605
2605
  }
2606
2606
  }
2607
- function js(e) {
2607
+ function qs(e) {
2608
2608
  const t = {};
2609
2609
  return e.childNodes.forEach((o) => {
2610
2610
  t[
@@ -2613,8 +2613,8 @@ function js(e) {
2613
2613
  ] = !0;
2614
2614
  }), t;
2615
2615
  }
2616
- function zs(e, t, o, n, r, i) {
2617
- let s = class extends Ur {
2616
+ function Bs(e, t, o, n, r, i) {
2617
+ let s = class extends Kr {
2618
2618
  constructor() {
2619
2619
  super(e, o, r), this.$$p_d = t;
2620
2620
  }
@@ -2633,7 +2633,7 @@ function zs(e, t, o, n, r, i) {
2633
2633
  a = bo(l, a, t), this.$$d[l] = a;
2634
2634
  var c = this.$$c;
2635
2635
  if (c) {
2636
- var d = Se(c, l)?.get;
2636
+ var d = St(c, l)?.get;
2637
2637
  d ? c[l] = a : c.$set({ [l]: a });
2638
2638
  }
2639
2639
  }
@@ -2647,12 +2647,12 @@ function zs(e, t, o, n, r, i) {
2647
2647
  }), e.element = /** @type {any} */
2648
2648
  s, s;
2649
2649
  }
2650
- class Ws extends Event {
2650
+ class Ds extends Event {
2651
2651
  constructor(t, o, n, r) {
2652
2652
  super("context-request", { bubbles: !0, composed: !0 }), m(this, "context"), m(this, "contextTarget"), m(this, "callback"), m(this, "subscribe"), this.context = t, this.contextTarget = o, this.callback = n, this.subscribe = r ?? !1;
2653
2653
  }
2654
2654
  }
2655
- class qs {
2655
+ class Hs {
2656
2656
  constructor(t, o) {
2657
2657
  m(this, "host"), m(this, "context"), m(this, "subscribe"), m(this, "onValue"), m(this, "isConnected", !1), m(this, "unsubscribe"), m(this, "currentValue"), m(this, "handleValue", (n, r) => {
2658
2658
  r !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = r), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = n, this.onValue?.(n);
@@ -2668,13 +2668,13 @@ class qs {
2668
2668
  return this.currentValue;
2669
2669
  }
2670
2670
  requestValue() {
2671
- this.host.dispatchEvent(new Ws(this.context, this.host, this.handleValue, this.subscribe));
2671
+ this.host.dispatchEvent(new Ds(this.context, this.host, this.handleValue, this.subscribe));
2672
2672
  }
2673
2673
  }
2674
- const Kr = (e) => e, Bs = Kr(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), Ds = Kr(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2675
- function Jr(e, t, o) {
2674
+ const Jr = (e) => e, Fs = Jr(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), Gs = Jr(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2675
+ function Xr(e, t, o) {
2676
2676
  let n = !1;
2677
- const r = new qs(e, {
2677
+ const r = new Hs(e, {
2678
2678
  context: t,
2679
2679
  subscribe: !0,
2680
2680
  onValue: (c) => {
@@ -2698,29 +2698,29 @@ function Jr(e, t, o) {
2698
2698
  globalThis.clearInterval(a), e.removeEventListener("context-provider", i), r.disconnect();
2699
2699
  };
2700
2700
  }
2701
- function Hs(e, t) {
2702
- return Jr(e, Bs, t);
2701
+ function Us(e, t) {
2702
+ return Xr(e, Fs, t);
2703
2703
  }
2704
- function Fs(e, t) {
2705
- return Jr(e, Ds, t);
2704
+ function Ks(e, t) {
2705
+ return Xr(e, Gs, t);
2706
2706
  }
2707
- var qn;
2707
+ var Bn;
2708
2708
  (function(e) {
2709
2709
  e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
2710
- })(qn || (qn = {}));
2711
- var Ut;
2710
+ })(Bn || (Bn = {}));
2711
+ var Ue;
2712
2712
  (function(e) {
2713
2713
  e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
2714
- })(Ut || (Ut = {}));
2715
- const Gs = {
2714
+ })(Ue || (Ue = {}));
2715
+ const Js = {
2716
2716
  tts: "textToSpeech",
2717
2717
  colorScheme: "theme"
2718
2718
  };
2719
- function Us(e) {
2719
+ function Xs(e) {
2720
2720
  const t = e.trim();
2721
- return t ? Gs[t] || t : "";
2721
+ return t ? Js[t] || t : "";
2722
2722
  }
2723
- const Ks = [
2723
+ const Zs = [
2724
2724
  "assessment",
2725
2725
  "section",
2726
2726
  "item",
@@ -2732,12 +2732,12 @@ function yo(e, t) {
2732
2732
  if (typeof e != "string" || e.trim().length === 0)
2733
2733
  throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
2734
2734
  }
2735
- function Bn(e) {
2735
+ function Dn(e) {
2736
2736
  if (yo(e.toolId, "toolId"), yo(e.name, "name"), yo(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function")
2737
2737
  throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
2738
2738
  if (!Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0)
2739
2739
  throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
2740
- const t = e.supportedLevels.find((o) => !Ks.includes(o));
2740
+ const t = e.supportedLevels.find((o) => !Zs.includes(o));
2741
2741
  if (t)
2742
2742
  throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
2743
2743
  if (e.activation !== void 0 && e.activation !== "toolbar-toggle" && e.activation !== "selection-gateway")
@@ -2753,7 +2753,7 @@ function Bn(e) {
2753
2753
  if (typeof e.renderToolbar != "function")
2754
2754
  throw new Error(`Invalid tool registration "${e.toolId}": "renderToolbar" must be a function.`);
2755
2755
  }
2756
- class Js {
2756
+ class Ys {
2757
2757
  constructor() {
2758
2758
  m(this, "tools", /* @__PURE__ */ new Map()), m(this, "pnpIndex", /* @__PURE__ */ new Map()), m(this, "componentOverrides", {}), m(this, "moduleLoaders", /* @__PURE__ */ new Map()), m(this, "loadedToolModules", /* @__PURE__ */ new Set()), m(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
2759
2759
  }
@@ -2761,7 +2761,7 @@ class Js {
2761
2761
  * Normalize a single tool alias to canonical toolId.
2762
2762
  */
2763
2763
  normalizeToolId(t) {
2764
- return Us(t);
2764
+ return Xs(t);
2765
2765
  }
2766
2766
  /**
2767
2767
  * Normalize a list of tool aliases to canonical toolIds.
@@ -2776,7 +2776,7 @@ class Js {
2776
2776
  * @throws Error if toolId is already registered
2777
2777
  */
2778
2778
  register(t) {
2779
- if (Bn(t), this.tools.has(t.toolId))
2779
+ if (Dn(t), this.tools.has(t.toolId))
2780
2780
  throw new Error(`Tool '${t.toolId}' is already registered`);
2781
2781
  if (this.tools.set(t.toolId, t), t.pnpSupportIds)
2782
2782
  for (const o of t.pnpSupportIds)
@@ -2788,7 +2788,7 @@ class Js {
2788
2788
  * @param registration - New tool registration (must have existing toolId)
2789
2789
  */
2790
2790
  override(t) {
2791
- if (Bn(t), !this.tools.has(t.toolId))
2791
+ if (Dn(t), !this.tools.has(t.toolId))
2792
2792
  throw new Error(`Cannot override non-existent tool '${t.toolId}'`);
2793
2793
  const o = this.tools.get(t.toolId);
2794
2794
  if (o.pnpSupportIds)
@@ -3021,20 +3021,20 @@ class Js {
3021
3021
  return r.renderToolbar(o, i);
3022
3022
  }
3023
3023
  }
3024
- function Xr(e) {
3024
+ function Zr(e) {
3025
3025
  return e.level === "item";
3026
3026
  }
3027
- function Xs(e) {
3027
+ function Qs(e) {
3028
3028
  return e.level === "passage";
3029
3029
  }
3030
- function Zs(e) {
3030
+ function el(e) {
3031
3031
  return e.level === "rubric";
3032
3032
  }
3033
- function Zr(e) {
3033
+ function Yr(e) {
3034
3034
  return e.level === "element";
3035
3035
  }
3036
- function gn(e) {
3037
- if (Zr(e)) {
3036
+ function mn(e) {
3037
+ if (Yr(e)) {
3038
3038
  const t = e.item.config;
3039
3039
  if (!t)
3040
3040
  return "";
@@ -3052,7 +3052,7 @@ function gn(e) {
3052
3052
  }
3053
3053
  return o.filter(Boolean).join(" ").trim();
3054
3054
  }
3055
- if (Xr(e)) {
3055
+ if (Zr(e)) {
3056
3056
  const t = e.item;
3057
3057
  if (!t?.config)
3058
3058
  return "";
@@ -3075,7 +3075,7 @@ function gn(e) {
3075
3075
  }
3076
3076
  return n.filter(Boolean).join(" ").trim();
3077
3077
  }
3078
- if (Xs(e)) {
3078
+ if (Qs(e)) {
3079
3079
  const t = e.passage;
3080
3080
  if (!t?.config)
3081
3081
  return "";
@@ -3098,14 +3098,14 @@ function gn(e) {
3098
3098
  }
3099
3099
  return n.filter(Boolean).join(" ").trim();
3100
3100
  }
3101
- if (Zs(e)) {
3101
+ if (el(e)) {
3102
3102
  const t = e.rubricBlock;
3103
3103
  return t.passage?.config ? (t.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (t.content || "").replace(/<[^>]*>/g, " ").trim();
3104
3104
  }
3105
3105
  return "";
3106
3106
  }
3107
3107
  function Po(e) {
3108
- const t = gn(e);
3108
+ const t = mn(e);
3109
3109
  return [
3110
3110
  /<math[>\s]/i,
3111
3111
  // MathML
@@ -3121,7 +3121,7 @@ function Po(e) {
3121
3121
  // Simple arithmetic
3122
3122
  ].some((o) => o.test(t));
3123
3123
  }
3124
- function Ys(e) {
3124
+ function tl(e) {
3125
3125
  const t = [
3126
3126
  "pie-multiple-choice",
3127
3127
  "pie-inline-choice",
@@ -3130,7 +3130,7 @@ function Ys(e) {
3130
3130
  "inline-choice",
3131
3131
  "select-text"
3132
3132
  ];
3133
- if (Zr(e)) {
3133
+ if (Yr(e)) {
3134
3134
  const o = e.item.config;
3135
3135
  if (!o?.models)
3136
3136
  return !1;
@@ -3140,7 +3140,7 @@ function Ys(e) {
3140
3140
  const r = n.element || "";
3141
3141
  return t.includes(r);
3142
3142
  }
3143
- if (Xr(e)) {
3143
+ if (Zr(e)) {
3144
3144
  const o = e.item.config?.models;
3145
3145
  return (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).some((n) => {
3146
3146
  if (!n || typeof n != "object")
@@ -3152,10 +3152,10 @@ function Ys(e) {
3152
3152
  return !1;
3153
3153
  }
3154
3154
  function Lo(e) {
3155
- return gn(e).trim().length >= 10;
3155
+ return mn(e).trim().length >= 10;
3156
3156
  }
3157
- function Qs(e) {
3158
- const t = gn(e);
3157
+ function ol(e) {
3158
+ const t = mn(e);
3159
3159
  return [
3160
3160
  /chemistry|chemical|element|atom|molecule|compound/i,
3161
3161
  /periodic\s+table/i,
@@ -3167,25 +3167,25 @@ function Qs(e) {
3167
3167
  /physics|force|energy|velocity|acceleration/i
3168
3168
  ].some((o) => o.test(t));
3169
3169
  }
3170
- const tl = [
3170
+ const nl = [
3171
3171
  "assessment",
3172
3172
  "section",
3173
3173
  "item",
3174
3174
  "passage",
3175
3175
  "rubric"
3176
- ], el = new Set(tl);
3177
- function ol(e) {
3178
- return el.has(e);
3176
+ ], rl = new Set(nl);
3177
+ function il(e) {
3178
+ return rl.has(e);
3179
3179
  }
3180
- function mn(e, t, o) {
3180
+ function bn(e, t, o) {
3181
3181
  const n = e.trim(), r = o.trim();
3182
3182
  if (!n || !r)
3183
3183
  throw new Error("Tool instance ids require non-empty tool and scope ids");
3184
- if (!ol(t))
3184
+ if (!il(t))
3185
3185
  throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
3186
3186
  return `${n}:${t}:${r}`;
3187
3187
  }
3188
- class nl {
3188
+ class sl {
3189
3189
  constructor() {
3190
3190
  m(this, "providerId", "desmos-calculator"), m(this, "providerName", "Desmos Calculator"), m(this, "category", "calculator"), m(this, "version", "1.10"), m(this, "requiresAuth", !0), m(this, "desmosProvider", null), m(this, "config", null);
3191
3191
  }
@@ -3265,7 +3265,33 @@ class nl {
3265
3265
  this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
3266
3266
  }
3267
3267
  }
3268
- class rl {
3268
+ const ll = (e, t) => {
3269
+ const o = t?.useSentenceSegmenter !== !1;
3270
+ try {
3271
+ if (!o)
3272
+ throw new Error("Segmenter disabled by policy");
3273
+ const l = globalThis.Intl?.Segmenter;
3274
+ if (typeof l == "function") {
3275
+ const a = new l(t?.locale, {
3276
+ granularity: "sentence"
3277
+ }), c = Array.from(a.segment(e)).map((d) => ({
3278
+ text: d.segment,
3279
+ offset: d.index
3280
+ })).filter((d) => d.text.trim().length > 0);
3281
+ if (c.length > 0)
3282
+ return c;
3283
+ }
3284
+ } catch {
3285
+ }
3286
+ const n = /[^.!?]+(?:[.!?]+|$)/g, r = e.match(n) || [e], i = [];
3287
+ let s = 0;
3288
+ for (const l of r) {
3289
+ const a = e.indexOf(l, s);
3290
+ a !== -1 && (i.push({ text: l, offset: a }), s = a + l.length);
3291
+ }
3292
+ return i.length > 0 ? i : [{ text: e, offset: 0 }];
3293
+ };
3294
+ class al {
3269
3295
  constructor() {
3270
3296
  m(this, "providerId", "browser"), m(this, "providerName", "Browser Speech Synthesis"), m(this, "version", "1.0.0");
3271
3297
  }
@@ -3274,7 +3300,7 @@ class rl {
3274
3300
  throw new Error("BrowserTTSProvider requires browser environment");
3275
3301
  if (!("speechSynthesis" in window))
3276
3302
  throw new Error("Browser does not support Speech Synthesis API");
3277
- return new il(t);
3303
+ return new cl(t);
3278
3304
  }
3279
3305
  supportsFeature(t) {
3280
3306
  return !0;
@@ -3292,7 +3318,7 @@ class rl {
3292
3318
  destroy() {
3293
3319
  }
3294
3320
  }
3295
- class il {
3321
+ class cl {
3296
3322
  constructor(t) {
3297
3323
  m(this, "utterance", null), m(this, "config", null), m(this, "_isPlaying", !1), m(this, "_isPaused", !1), m(this, "speakRunId", 0), m(this, "onWordBoundary"), this.config = t;
3298
3324
  }
@@ -3356,30 +3382,11 @@ class il {
3356
3382
  };
3357
3383
  }
3358
3384
  segmentSentences(t) {
3359
- try {
3360
- const s = this.getSegmentationPolicy();
3361
- if (!s.useSentenceSegmenter)
3362
- throw new Error("Segmenter disabled by policy");
3363
- const l = globalThis.Intl?.Segmenter;
3364
- if (typeof l == "function") {
3365
- const a = new l(s.locale, {
3366
- granularity: "sentence"
3367
- }), c = Array.from(a.segment(t)).map((d) => ({
3368
- text: d.segment,
3369
- offset: d.index
3370
- })).filter((d) => d.text.trim().length > 0);
3371
- if (c.length > 0)
3372
- return c;
3373
- }
3374
- } catch {
3375
- }
3376
- const o = /[^.!?]+(?:[.!?]+|$)/g, n = t.match(o) || [t], r = [];
3377
- let i = 0;
3378
- for (const s of n) {
3379
- const l = t.indexOf(s, i);
3380
- l !== -1 && (r.push({ text: s, offset: l }), i = l + s.length);
3381
- }
3382
- return r.length > 0 ? r : [{ text: t, offset: 0 }];
3385
+ const o = this.getSegmentationPolicy();
3386
+ return ll(t, {
3387
+ locale: o.locale,
3388
+ useSentenceSegmenter: o.useSentenceSegmenter
3389
+ });
3383
3390
  }
3384
3391
  inferWordLength(t, o) {
3385
3392
  const n = Math.max(0, Math.min(o, Math.max(0, t.length - 1)));
@@ -3451,7 +3458,7 @@ class il {
3451
3458
  });
3452
3459
  }
3453
3460
  }
3454
- class sl {
3461
+ class ul {
3455
3462
  /**
3456
3463
  * Create TTS tool provider
3457
3464
  *
@@ -3493,7 +3500,7 @@ class sl {
3493
3500
  async _initializeBrowserTTS(t) {
3494
3501
  if (typeof window > "u" || !("speechSynthesis" in window))
3495
3502
  throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
3496
- this.ttsProvider = new rl(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
3503
+ this.ttsProvider = new al(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
3497
3504
  }
3498
3505
  /**
3499
3506
  * Initialize server-based TTS (Polly, Google)
@@ -3559,7 +3566,7 @@ class sl {
3559
3566
  this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
3560
3567
  }
3561
3568
  }
3562
- const ll = /* @__PURE__ */ new Set([
3569
+ const dl = /* @__PURE__ */ new Set([
3563
3570
  "annotation-xml",
3564
3571
  "color-profile",
3565
3572
  "font-face",
@@ -3568,7 +3575,7 @@ const ll = /* @__PURE__ */ new Set([
3568
3575
  "font-face-format",
3569
3576
  "font-face-name",
3570
3577
  "missing-glyph"
3571
- ]), al = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, cl = (e, t = "custom element tag") => {
3578
+ ]), fl = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, hl = (e, t = "custom element tag") => {
3572
3579
  if (!e || typeof e != "string")
3573
3580
  throw new Error(`Invalid ${t}: expected a non-empty string`);
3574
3581
  const o = e.trim();
@@ -3578,12 +3585,12 @@ const ll = /* @__PURE__ */ new Set([
3578
3585
  throw new Error(`Invalid ${t} "${o}": custom element names must be lowercase`);
3579
3586
  if (!o.includes("-"))
3580
3587
  throw new Error(`Invalid ${t} "${o}": custom element names must include a hyphen`);
3581
- if (ll.has(o))
3588
+ if (dl.has(o))
3582
3589
  throw new Error(`Invalid ${t} "${o}": this name is reserved by the HTML spec`);
3583
- if (!al.test(o))
3590
+ if (!fl.test(o))
3584
3591
  throw new Error(`Invalid ${t} "${o}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
3585
3592
  return o;
3586
- }, Yr = {
3593
+ }, Qr = {
3587
3594
  calculator: "pie-tool-calculator",
3588
3595
  textToSpeech: "pie-tool-text-to-speech",
3589
3596
  ruler: "pie-tool-ruler",
@@ -3596,20 +3603,20 @@ const ll = /* @__PURE__ */ new Set([
3596
3603
  annotationToolbar: "pie-tool-annotation-toolbar",
3597
3604
  graph: "pie-tool-graph",
3598
3605
  periodicTable: "pie-tool-periodic-table"
3599
- }, ul = (e, t) => {
3600
- const o = t?.toolTagMap?.[e] ?? Yr[e] ?? e;
3601
- return cl(o, `tool component tag for "${e}"`);
3602
- }, dl = (e) => document.createElement(e), _t = (e, t, o, n) => {
3603
- const r = ul(e, n), i = n?.toolComponentFactories?.[e] ?? n?.toolComponentFactory;
3604
- return i ? i({ toolId: e, tagName: r, context: t, toolbarContext: o }) : dl(r);
3605
- }, fl = {
3606
+ }, pl = (e, t) => {
3607
+ const o = t?.toolTagMap?.[e] ?? Qr[e] ?? e;
3608
+ return hl(o, `tool component tag for "${e}"`);
3609
+ }, vl = (e) => document.createElement(e), _e = (e, t, o, n) => {
3610
+ const r = pl(e, n), i = n?.toolComponentFactories?.[e] ?? n?.toolComponentFactory;
3611
+ return i ? i({ toolId: e, tagName: r, context: t, toolbarContext: o }) : vl(r);
3612
+ }, gl = {
3606
3613
  toolId: "calculator",
3607
3614
  name: "Calculator",
3608
3615
  description: "Multi-type calculator (basic, scientific, graphing)",
3609
3616
  icon: "calculator",
3610
3617
  provider: {
3611
3618
  getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
3612
- createProvider: () => new nl(),
3619
+ createProvider: () => new sl(),
3613
3620
  getInitConfig: (e) => e?.provider?.init ?? {},
3614
3621
  getAuthFetcher: (e) => {
3615
3622
  const t = e?.provider?.runtime?.authFetcher;
@@ -3649,7 +3656,7 @@ const ll = /* @__PURE__ */ new Set([
3649
3656
  return Po(e);
3650
3657
  },
3651
3658
  renderToolbar(e, t) {
3652
- const o = mn(this.toolId, t.scope.level, t.scope.scopeId), n = t.componentOverrides, r = _t(this.toolId, e, t, n);
3659
+ const o = bn(this.toolId, t.scope.level, t.scope.scopeId), n = t.componentOverrides, r = _e(this.toolId, e, t, n);
3653
3660
  r.setAttribute("tool-id", o), r.toolkitCoordinator = t.toolkitCoordinator;
3654
3661
  const i = {
3655
3662
  toolId: this.toolId,
@@ -3691,12 +3698,39 @@ const ll = /* @__PURE__ */ new Set([
3691
3698
  }
3692
3699
  };
3693
3700
  }
3694
- }, Be = /* @__PURE__ */ new Map(), hl = "__pieToolElementUnmount", Dn = (e) => e && typeof e == "object" ? e : {}, jo = (e) => {
3695
- const t = Dn(e), o = Dn(e?.settings);
3701
+ }, Hn = (e) => e && typeof e == "object" ? e : {}, jo = (e) => {
3702
+ const t = Hn(e), o = Hn(e?.settings);
3696
3703
  return { ...t, ...o };
3697
- }, Hn = Object.freeze([1.5, 2]), pl = (e) => {
3704
+ }, tn = (e) => e.backend || "browser", ei = (e, t) => e.serverProvider || e.provider || (t === "polly" || t === "google" ? t : void 0), ti = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), ml = (e) => {
3705
+ const t = tn(e), o = ei(e, t), n = ti(e, o);
3706
+ return {
3707
+ voice: e.defaultVoice,
3708
+ rate: e.rate,
3709
+ pitch: e.pitch,
3710
+ providerOptions: {
3711
+ ...e.language ? { locale: e.language } : {},
3712
+ ...t === "polly" && e.engine ? { engine: e.engine } : {},
3713
+ ...t === "polly" && typeof e.sampleRate == "number" ? { sampleRate: e.sampleRate } : {},
3714
+ ...t === "polly" && e.format ? { format: e.format } : {},
3715
+ ...t === "polly" ? {
3716
+ speechMarkTypes: e.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
3717
+ } : {},
3718
+ ...n === "custom" && typeof e.cache == "boolean" ? { cache: e.cache } : {},
3719
+ ...n === "custom" && e.speedRate ? { speedRate: e.speedRate } : {},
3720
+ ...n === "custom" && e.lang_id ? { lang_id: e.lang_id } : {}
3721
+ },
3722
+ apiEndpoint: e.apiEndpoint,
3723
+ provider: o,
3724
+ language: e.language,
3725
+ transportMode: n,
3726
+ endpointMode: e.endpointMode,
3727
+ endpointValidationMode: e.endpointValidationMode,
3728
+ includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
3729
+ validateEndpoint: e.validateEndpoint
3730
+ };
3731
+ }, Bt = /* @__PURE__ */ new Map(), bl = "__pieToolElementUnmount", Fn = Object.freeze([1.5, 2]), yl = (e) => {
3698
3732
  if (!Array.isArray(e))
3699
- return [...Hn];
3733
+ return [...Fn];
3700
3734
  const t = /* @__PURE__ */ new Set();
3701
3735
  for (const o of e) {
3702
3736
  if (typeof o != "number" || !Number.isFinite(o) || o <= 0)
@@ -3704,8 +3738,8 @@ const ll = /* @__PURE__ */ new Set([
3704
3738
  const n = Math.round(o * 100) / 100;
3705
3739
  n !== 1 && t.add(n);
3706
3740
  }
3707
- return t.size ? Array.from(t) : [...Hn];
3708
- }, vl = {
3741
+ return t.size ? Array.from(t) : [...Fn];
3742
+ }, wl = {
3709
3743
  toolId: "textToSpeech",
3710
3744
  name: "Text to Speech",
3711
3745
  description: "Read content aloud",
@@ -3714,33 +3748,15 @@ const ll = /* @__PURE__ */ new Set([
3714
3748
  getProviderId: () => "tts",
3715
3749
  createProvider: (e) => {
3716
3750
  const t = jo(e);
3717
- return new sl(t.backend || "browser");
3751
+ return new ul(tn(t));
3718
3752
  },
3719
3753
  getInitConfig: (e) => {
3720
- const t = jo(e), o = t.backend || "browser", n = t.serverProvider || t.provider || (o === "polly" || o === "google" ? o : void 0), r = t.transportMode || (n === "custom" ? "custom" : "pie");
3754
+ const t = jo(e), o = tn(t), n = ei(t, o), r = ti(t, n);
3721
3755
  return {
3722
3756
  backend: o,
3723
- apiEndpoint: t.apiEndpoint,
3724
3757
  serverProvider: n,
3725
- providerOptions: o === "polly" || r === "custom" ? {
3726
- ...o === "polly" && t.engine ? { engine: t.engine } : {},
3727
- ...o === "polly" && typeof t.sampleRate == "number" ? { sampleRate: t.sampleRate } : {},
3728
- ...o === "polly" && t.format ? { format: t.format } : {},
3729
- ...o === "polly" ? {
3730
- speechMarkTypes: t.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
3731
- } : {},
3732
- ...r === "custom" && typeof t.cache == "boolean" ? { cache: t.cache } : {},
3733
- ...r === "custom" && t.speedRate ? { speedRate: t.speedRate } : {},
3734
- ...r === "custom" && t.lang_id ? { lang_id: t.lang_id } : {}
3735
- } : void 0,
3736
- voice: t.defaultVoice,
3737
- rate: t.rate,
3738
- pitch: t.pitch,
3739
3758
  transportMode: r,
3740
- endpointMode: t.endpointMode,
3741
- endpointValidationMode: t.endpointValidationMode,
3742
- includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
3743
- validateEndpoint: t.validateEndpoint
3759
+ ...ml(t)
3744
3760
  };
3745
3761
  },
3746
3762
  getAuthFetcher: (e) => {
@@ -3775,15 +3791,15 @@ const ll = /* @__PURE__ */ new Set([
3775
3791
  renderToolbar(e, t) {
3776
3792
  const o = () => {
3777
3793
  const s = jo(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0);
3778
- return pl(s.speedOptions);
3779
- }, n = mn(this.toolId, t.scope.level, t.scope.scopeId), r = () => {
3794
+ return yl(s.speedOptions);
3795
+ }, n = bn(this.toolId, t.scope.level, t.scope.scopeId), r = () => {
3780
3796
  const s = t.ui?.size;
3781
3797
  return s === "sm" || s === "lg" ? s : "md";
3782
3798
  }, i = () => {
3783
- let s = Be.get(n);
3784
- return s && typeof s.isConnected == "boolean" && !s.isConnected && (Be.delete(n), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[hl] = () => {
3785
- Be.get(n) === s && Be.delete(n);
3786
- }, Be.set(n, s)), s.setAttribute("tool-id", n), s.setAttribute("catalog-id", t.catalogId || t.itemId), s.setAttribute("language", t.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = o(), s;
3799
+ let s = Bt.get(n);
3800
+ return s && typeof s.isConnected == "boolean" && !s.isConnected && (Bt.delete(n), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[bl] = () => {
3801
+ Bt.get(n) === s && Bt.delete(n);
3802
+ }, Bt.set(n, s)), s.setAttribute("tool-id", n), s.setAttribute("catalog-id", t.catalogId || t.itemId), s.setAttribute("language", t.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = o(), s;
3787
3803
  };
3788
3804
  return {
3789
3805
  toolId: this.toolId,
@@ -3803,8 +3819,8 @@ const ll = /* @__PURE__ */ new Set([
3803
3819
  };
3804
3820
  }
3805
3821
  };
3806
- function Nt(e, t) {
3807
- const o = mn(e, t.scope.level, t.scope.scopeId);
3822
+ function Ne(e, t) {
3823
+ const o = bn(e, t.scope.level, t.scope.scopeId);
3808
3824
  return {
3809
3825
  fullToolId: o,
3810
3826
  isActive: () => t.isToolVisible(o),
@@ -3814,11 +3830,11 @@ function Nt(e, t) {
3814
3830
  }
3815
3831
  };
3816
3832
  }
3817
- function Vt(e) {
3833
+ function Ve(e) {
3818
3834
  const t = e.isActive();
3819
3835
  e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
3820
3836
  }
3821
- const gl = {
3837
+ const Tl = {
3822
3838
  toolId: "ruler",
3823
3839
  name: "Ruler",
3824
3840
  description: "On-screen ruler for measurements",
@@ -3840,7 +3856,7 @@ const gl = {
3840
3856
  return Po(e);
3841
3857
  },
3842
3858
  renderToolbar(e, t) {
3843
- const o = Nt(this.toolId, t), n = {
3859
+ const o = Ne(this.toolId, t), n = {
3844
3860
  toolId: this.toolId,
3845
3861
  label: this.name,
3846
3862
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3849,13 +3865,13 @@ const gl = {
3849
3865
  tooltip: "Ruler",
3850
3866
  onClick: () => t.toggleTool(this.toolId),
3851
3867
  active: o.isActive()
3852
- }, r = t.componentOverrides ?? {}, i = _t(this.toolId, e, t, r);
3868
+ }, r = t.componentOverrides ?? {}, i = _e(this.toolId, e, t, r);
3853
3869
  return i.setAttribute("tool-id", o.fullToolId), {
3854
3870
  toolId: this.toolId,
3855
3871
  button: n,
3856
3872
  elements: [{ element: i, mount: "after-buttons" }],
3857
3873
  sync: () => {
3858
- Vt({
3874
+ Ve({
3859
3875
  button: n,
3860
3876
  overlay: i,
3861
3877
  isActive: o.isActive
@@ -3864,7 +3880,7 @@ const gl = {
3864
3880
  subscribeActive: o.subscribeActive
3865
3881
  };
3866
3882
  }
3867
- }, ml = {
3883
+ }, Il = {
3868
3884
  toolId: "protractor",
3869
3885
  name: "Protractor",
3870
3886
  description: "On-screen protractor for angle measurements",
@@ -3886,7 +3902,7 @@ const gl = {
3886
3902
  return Po(e);
3887
3903
  },
3888
3904
  renderToolbar(e, t) {
3889
- const o = Nt(this.toolId, t), n = {
3905
+ const o = Ne(this.toolId, t), n = {
3890
3906
  toolId: this.toolId,
3891
3907
  label: this.name,
3892
3908
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3895,13 +3911,13 @@ const gl = {
3895
3911
  tooltip: "Protractor",
3896
3912
  onClick: () => t.toggleTool(this.toolId),
3897
3913
  active: o.isActive()
3898
- }, r = t.componentOverrides ?? {}, i = _t(this.toolId, e, t, r);
3914
+ }, r = t.componentOverrides ?? {}, i = _e(this.toolId, e, t, r);
3899
3915
  return i.setAttribute("tool-id", o.fullToolId), {
3900
3916
  toolId: this.toolId,
3901
3917
  button: n,
3902
3918
  elements: [{ element: i, mount: "after-buttons" }],
3903
3919
  sync: () => {
3904
- Vt({
3920
+ Ve({
3905
3921
  button: n,
3906
3922
  overlay: i,
3907
3923
  isActive: o.isActive
@@ -3910,7 +3926,7 @@ const gl = {
3910
3926
  subscribeActive: o.subscribeActive
3911
3927
  };
3912
3928
  }
3913
- }, bl = {
3929
+ }, $l = {
3914
3930
  toolId: "answerEliminator",
3915
3931
  name: "Answer Eliminator",
3916
3932
  description: "Strike through answer choices",
@@ -3933,10 +3949,10 @@ const gl = {
3933
3949
  * Pass 2: Answer eliminator is relevant only for choice-based questions
3934
3950
  */
3935
3951
  isVisibleInContext(e) {
3936
- return Ys(e);
3952
+ return tl(e);
3937
3953
  },
3938
3954
  renderToolbar(e, t) {
3939
- const o = Nt(this.toolId, t), n = t.componentOverrides ?? {}, r = _t(this.toolId, e, t, n);
3955
+ const o = Ne(this.toolId, t), n = t.componentOverrides ?? {}, r = _e(this.toolId, e, t, n);
3940
3956
  r.setAttribute("tool-id", o.fullToolId), r.setAttribute("strategy", "strikethrough"), r.setAttribute("button-alignment", "inline");
3941
3957
  const i = {
3942
3958
  toolId: this.toolId,
@@ -3953,7 +3969,7 @@ const gl = {
3953
3969
  button: i,
3954
3970
  elements: [{ element: r, mount: "after-buttons" }],
3955
3971
  sync: () => {
3956
- Vt({
3972
+ Ve({
3957
3973
  button: i,
3958
3974
  overlay: r,
3959
3975
  isActive: o.isActive
@@ -3964,7 +3980,7 @@ const gl = {
3964
3980
  subscribeActive: o.subscribeActive
3965
3981
  };
3966
3982
  }
3967
- }, yl = {
3983
+ }, xl = {
3968
3984
  toolId: "highlighter",
3969
3985
  name: "Highlighter",
3970
3986
  description: "Highlight text",
@@ -3981,7 +3997,7 @@ const gl = {
3981
3997
  return Lo(e);
3982
3998
  },
3983
3999
  renderToolbar(e, t) {
3984
- const o = Nt(this.toolId, t), n = {
4000
+ const o = Ne(this.toolId, t), n = {
3985
4001
  toolId: this.toolId,
3986
4002
  label: this.name,
3987
4003
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3990,13 +4006,13 @@ const gl = {
3990
4006
  tooltip: "Highlight",
3991
4007
  onClick: () => t.toggleTool(this.toolId),
3992
4008
  active: o.isActive()
3993
- }, r = t.componentOverrides ?? {}, i = _t(this.toolId, e, t, r);
4009
+ }, r = t.componentOverrides ?? {}, i = _e(this.toolId, e, t, r);
3994
4010
  return i.setAttribute("tool-id", o.fullToolId), {
3995
4011
  toolId: this.toolId,
3996
4012
  button: n,
3997
4013
  elements: [{ element: i, mount: "after-buttons" }],
3998
4014
  sync: () => {
3999
- Vt({
4015
+ Ve({
4000
4016
  button: n,
4001
4017
  overlay: i,
4002
4018
  isActive: o.isActive,
@@ -4008,7 +4024,7 @@ const gl = {
4008
4024
  subscribeActive: o.subscribeActive
4009
4025
  };
4010
4026
  }
4011
- }, wl = {
4027
+ }, Sl = {
4012
4028
  toolId: "lineReader",
4013
4029
  name: "Line Reader",
4014
4030
  description: "Reading guide overlay",
@@ -4036,7 +4052,7 @@ const gl = {
4036
4052
  return Lo(e);
4037
4053
  },
4038
4054
  renderToolbar(e, t) {
4039
- const o = Nt(this.toolId, t), n = {
4055
+ const o = Ne(this.toolId, t), n = {
4040
4056
  toolId: this.toolId,
4041
4057
  label: this.name,
4042
4058
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4045,13 +4061,13 @@ const gl = {
4045
4061
  tooltip: "Line Reader",
4046
4062
  onClick: () => t.toggleTool(this.toolId),
4047
4063
  active: o.isActive()
4048
- }, r = t.componentOverrides ?? {}, i = _t(this.toolId, e, t, r);
4064
+ }, r = t.componentOverrides ?? {}, i = _e(this.toolId, e, t, r);
4049
4065
  return i.setAttribute("tool-id", o.fullToolId), {
4050
4066
  toolId: this.toolId,
4051
4067
  button: n,
4052
4068
  elements: [{ element: i, mount: "after-buttons" }],
4053
4069
  sync: () => {
4054
- Vt({
4070
+ Ve({
4055
4071
  button: n,
4056
4072
  overlay: i,
4057
4073
  isActive: o.isActive
@@ -4060,7 +4076,7 @@ const gl = {
4060
4076
  subscribeActive: o.subscribeActive
4061
4077
  };
4062
4078
  }
4063
- }, Tl = {
4079
+ }, kl = {
4064
4080
  toolId: "theme",
4065
4081
  name: "Theme",
4066
4082
  description: "Accessible themes and contrast",
@@ -4092,7 +4108,7 @@ const gl = {
4092
4108
  return !0;
4093
4109
  },
4094
4110
  renderToolbar(e, t) {
4095
- const o = Nt(this.toolId, t), n = {
4111
+ const o = Ne(this.toolId, t), n = {
4096
4112
  toolId: this.toolId,
4097
4113
  label: this.name,
4098
4114
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4101,7 +4117,7 @@ const gl = {
4101
4117
  tooltip: "Theme",
4102
4118
  onClick: () => t.toggleTool(this.toolId),
4103
4119
  active: o.isActive()
4104
- }, r = t.componentOverrides ?? {}, i = _t(this.toolId, e, t, r);
4120
+ }, r = t.componentOverrides ?? {}, i = _e(this.toolId, e, t, r);
4105
4121
  return i.setAttribute("tool-id", o.fullToolId), {
4106
4122
  toolId: this.toolId,
4107
4123
  button: n,
@@ -4122,7 +4138,7 @@ const gl = {
4122
4138
  }
4123
4139
  ],
4124
4140
  sync: () => {
4125
- Vt({
4141
+ Ve({
4126
4142
  button: n,
4127
4143
  overlay: i,
4128
4144
  isActive: o.isActive
@@ -4131,7 +4147,7 @@ const gl = {
4131
4147
  subscribeActive: o.subscribeActive
4132
4148
  };
4133
4149
  }
4134
- }, Il = Tl, $l = {
4150
+ }, Al = kl, _l = {
4135
4151
  toolId: "annotationToolbar",
4136
4152
  name: "Highlighter",
4137
4153
  description: "Highlight and annotate text",
@@ -4161,7 +4177,7 @@ const gl = {
4161
4177
  return Lo(e);
4162
4178
  },
4163
4179
  renderToolbar(e, t) {
4164
- const o = Nt(this.toolId, t), n = {
4180
+ const o = Ne(this.toolId, t), n = {
4165
4181
  toolId: this.toolId,
4166
4182
  label: this.name,
4167
4183
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4170,13 +4186,13 @@ const gl = {
4170
4186
  tooltip: "Highlight",
4171
4187
  onClick: () => t.toggleTool(this.toolId),
4172
4188
  active: o.isActive()
4173
- }, r = t.componentOverrides ?? {}, i = _t(this.toolId, e, t, r);
4189
+ }, r = t.componentOverrides ?? {}, i = _e(this.toolId, e, t, r);
4174
4190
  return i.setAttribute("tool-id", o.fullToolId), {
4175
4191
  toolId: this.toolId,
4176
4192
  button: n,
4177
4193
  elements: [{ element: i, mount: "after-buttons" }],
4178
4194
  sync: () => {
4179
- Vt({
4195
+ Ve({
4180
4196
  button: n,
4181
4197
  overlay: i,
4182
4198
  isActive: o.isActive
@@ -4185,7 +4201,7 @@ const gl = {
4185
4201
  subscribeActive: o.subscribeActive
4186
4202
  };
4187
4203
  }
4188
- }, xl = {
4204
+ }, Cl = {
4189
4205
  toolId: "graph",
4190
4206
  name: "Graph",
4191
4207
  description: "Graphing calculator and coordinate plane",
@@ -4211,7 +4227,7 @@ const gl = {
4211
4227
  return Po(e);
4212
4228
  },
4213
4229
  renderToolbar(e, t) {
4214
- const o = Nt(this.toolId, t), n = {
4230
+ const o = Ne(this.toolId, t), n = {
4215
4231
  toolId: this.toolId,
4216
4232
  label: this.name,
4217
4233
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4220,7 +4236,7 @@ const gl = {
4220
4236
  tooltip: "Graph",
4221
4237
  onClick: () => t.toggleTool(this.toolId),
4222
4238
  active: o.isActive()
4223
- }, r = t.componentOverrides ?? {}, i = _t(this.toolId, e, t, r);
4239
+ }, r = t.componentOverrides ?? {}, i = _e(this.toolId, e, t, r);
4224
4240
  return i.setAttribute("tool-id", o.fullToolId), {
4225
4241
  toolId: this.toolId,
4226
4242
  button: n,
@@ -4241,7 +4257,7 @@ const gl = {
4241
4257
  }
4242
4258
  ],
4243
4259
  sync: () => {
4244
- Vt({
4260
+ Ve({
4245
4261
  button: n,
4246
4262
  overlay: i,
4247
4263
  isActive: o.isActive
@@ -4250,7 +4266,7 @@ const gl = {
4250
4266
  subscribeActive: o.subscribeActive
4251
4267
  };
4252
4268
  }
4253
- }, Sl = {
4269
+ }, El = {
4254
4270
  toolId: "periodicTable",
4255
4271
  name: "Periodic Table",
4256
4272
  description: "Chemistry periodic table reference",
@@ -4271,10 +4287,10 @@ const gl = {
4271
4287
  * Pass 2: Periodic table is relevant when science content is present
4272
4288
  */
4273
4289
  isVisibleInContext(e) {
4274
- return Qs(e);
4290
+ return ol(e);
4275
4291
  },
4276
4292
  renderToolbar(e, t) {
4277
- const o = Nt(this.toolId, t), n = {
4293
+ const o = Ne(this.toolId, t), n = {
4278
4294
  toolId: this.toolId,
4279
4295
  label: this.name,
4280
4296
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4283,7 +4299,7 @@ const gl = {
4283
4299
  tooltip: "Periodic Table",
4284
4300
  onClick: () => t.toggleTool(this.toolId),
4285
4301
  active: o.isActive()
4286
- }, r = t.componentOverrides ?? {}, i = _t(this.toolId, e, t, r);
4302
+ }, r = t.componentOverrides ?? {}, i = _e(this.toolId, e, t, r);
4287
4303
  return i.setAttribute("tool-id", o.fullToolId), {
4288
4304
  toolId: this.toolId,
4289
4305
  button: n,
@@ -4304,7 +4320,7 @@ const gl = {
4304
4320
  }
4305
4321
  ],
4306
4322
  sync: () => {
4307
- Vt({
4323
+ Ve({
4308
4324
  button: n,
4309
4325
  overlay: i,
4310
4326
  isActive: o.isActive
@@ -4313,53 +4329,53 @@ const gl = {
4313
4329
  subscribeActive: o.subscribeActive
4314
4330
  };
4315
4331
  }
4316
- }, Al = [
4317
- fl,
4318
- vl,
4332
+ }, Pl = [
4319
4333
  gl,
4320
- ml,
4321
- bl,
4322
- yl,
4323
4334
  wl,
4335
+ Tl,
4324
4336
  Il,
4325
4337
  $l,
4326
4338
  xl,
4327
- Sl
4339
+ Sl,
4340
+ Al,
4341
+ _l,
4342
+ Cl,
4343
+ El
4328
4344
  ];
4329
- function kl(e = {}) {
4330
- const t = new Js(), o = {
4345
+ function Ll(e = {}) {
4346
+ const t = new Ys(), o = {
4331
4347
  toolTagMap: {
4332
- ...Yr,
4348
+ ...Qr,
4333
4349
  ...e.toolTagMap || {}
4334
4350
  },
4335
4351
  toolComponentFactory: e.toolComponentFactory,
4336
4352
  toolComponentFactories: e.toolComponentFactories
4337
4353
  }, n = (r) => e.overrides?.[r.toolId] || r;
4338
- return e.includePackagedTools && _l(t, {
4354
+ return e.includePackagedTools && Ml(t, {
4339
4355
  toolIds: e.toolIds,
4340
4356
  applyOverrides: n
4341
4357
  }), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(o), t;
4342
4358
  }
4343
- function _l(e, t = {}) {
4359
+ function Ml(e, t = {}) {
4344
4360
  const o = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, n = t.applyOverrides || ((r) => r);
4345
- for (const r of Al)
4361
+ for (const r of Pl)
4346
4362
  o && !o.has(r.toolId) || e.register(n(r));
4347
4363
  }
4348
- function Cl(e = {}) {
4349
- return kl({
4364
+ function Ol(e = {}) {
4365
+ return Ll({
4350
4366
  ...e,
4351
4367
  includePackagedTools: !0
4352
4368
  });
4353
4369
  }
4354
- function El() {
4355
- const e = Cl(), t = /* @__PURE__ */ new Set();
4370
+ function Rl() {
4371
+ const e = Ol(), t = /* @__PURE__ */ new Set();
4356
4372
  for (const o of e.getAllTools())
4357
4373
  for (const n of o.pnpSupportIds || [])
4358
4374
  t.add(n);
4359
4375
  return [...t].sort();
4360
4376
  }
4361
- El();
4362
- const Pl = {
4377
+ Rl();
4378
+ const Nl = {
4363
4379
  /**
4364
4380
  * Visual accessibility features
4365
4381
  * For students with low vision, color blindness, or visual processing needs
@@ -4530,17 +4546,17 @@ const Pl = {
4530
4546
  tutorialAvailable: "tutorialAvailable"
4531
4547
  }
4532
4548
  };
4533
- Object.values(Pl).flatMap((e) => Object.values(e));
4534
- var Fn;
4549
+ Object.values(Nl).flatMap((e) => Object.values(e));
4550
+ var Gn;
4535
4551
  (function(e) {
4536
4552
  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";
4537
- })(Fn || (Fn = {}));
4538
- var Gn;
4553
+ })(Gn || (Gn = {}));
4554
+ var Un;
4539
4555
  (function(e) {
4540
4556
  e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
4541
- })(Gn || (Gn = {}));
4542
- var Ll = /* @__PURE__ */ ee('<link rel="stylesheet" href="./highlights.css"/>'), Ml = /* @__PURE__ */ ee('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), Ol = /* @__PURE__ */ ee('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), Rl = /* @__PURE__ */ ee('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), Nl = /* @__PURE__ */ ee('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), Vl = /* @__PURE__ */ ee('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), jl = /* @__PURE__ */ ee('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), zl = /* @__PURE__ */ ee('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1);
4543
- const Wl = {
4557
+ })(Un || (Un = {}));
4558
+ var Vl = /* @__PURE__ */ tt('<link rel="stylesheet" href="./highlights.css"/>'), jl = /* @__PURE__ */ tt('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), zl = /* @__PURE__ */ tt('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), Wl = /* @__PURE__ */ tt('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), ql = /* @__PURE__ */ tt('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), Bl = /* @__PURE__ */ tt('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Dl = /* @__PURE__ */ tt('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), Hl = /* @__PURE__ */ tt('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1);
4559
+ const Fl = {
4544
4560
  hash: "svelte-g8qu62",
4545
4561
  code: `.pie-tool-annotation-toolbar.svelte-g8qu62 {position:fixed;z-index:4200;display:flex;gap:0.25rem;padding:0.5rem;border-radius:0.5rem;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border, #d1d5db);box-shadow:0 10px 25px -8px rgb(0 0 0 / 0.3);user-select:none;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62 {width:2.5rem;height:2rem;border:2px solid color-mix(in srgb, var(--pie-border-dark, #111827) 20%, transparent);border-radius:0.375rem;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;padding:0;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:hover {transform:scale(1.1);border-color:color-mix(in srgb, var(--pie-border-dark, #111827) 45%, transparent);box-shadow:0 2px 8px rgb(0 0 0 / 0.15);}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar.svelte-g8qu62 .divider-horizontal:where(.svelte-g8qu62) {height:auto;width:1px;background-color:color-mix(in srgb, var(--pie-border, #d1d5db) 70%, transparent);}
4546
4562
 
@@ -4548,27 +4564,27 @@ const Wl = {
4548
4564
 
4549
4565
  /* Button styling */.pie-tool-annotation-toolbar__button.svelte-g8qu62 {display:inline-flex;align-items:center;justify-content:center;gap:0.35rem;padding:0.4rem 0.55rem;border:1px solid var(--pie-button-border, #d1d5db);border-radius:0.4rem;background:var(--pie-button-bg, #fff);color:var(--pie-button-color, var(--pie-text, #111827));cursor:pointer;}.pie-tool-annotation-toolbar__button--icon.svelte-g8qu62 {min-width:2rem;min-height:2rem;padding:0.45rem;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:hover {background:var(--pie-button-hover-bg, #f9fafb);color:var(--pie-button-hover-color, var(--pie-text, #111827));border-color:var(--pie-button-hover-border, #9ca3af);}.pie-tool-annotation-toolbar__button.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:disabled {opacity:0.6;cursor:not-allowed;}.pie-tool-annotation-toolbar__button--warning.svelte-g8qu62 {color:var(--pie-missing-icon, #92400e);}.pie-tool-annotation-toolbar__button--danger.svelte-g8qu62 {color:var(--pie-incorrect-icon, #b91c1c);}.pie-tool-annotation-toolbar__button.svelte-g8qu62 svg:where(.svelte-g8qu62) {width:18px;height:18px;}`
4550
4566
  };
4551
- function ql(e, t) {
4552
- nr(t, !0), Cs(e, Wl);
4567
+ function Gl(e, t) {
4568
+ rr(t, !0), Ls(e, Fl);
4553
4569
  let o = Vo(t, "enabled", 7, !0), n = Vo(t, "highlightCoordinator", 7, null), r = Vo(t, "ttsService", 7, null);
4554
4570
  const i = typeof window < "u", s = "pie-annotations", l = [
4555
4571
  {
4556
- name: Ut.YELLOW,
4572
+ name: Ue.YELLOW,
4557
4573
  hex: "#fde995",
4558
4574
  label: "Yellow highlight"
4559
4575
  },
4560
4576
  {
4561
- name: Ut.PINK,
4577
+ name: Ue.PINK,
4562
4578
  hex: "#ff9fae",
4563
4579
  label: "Pink highlight"
4564
4580
  },
4565
4581
  {
4566
- name: Ut.BLUE,
4582
+ name: Ue.BLUE,
4567
4583
  hex: "#a7e0f6",
4568
4584
  label: "Blue highlight"
4569
4585
  },
4570
4586
  {
4571
- name: Ut.GREEN,
4587
+ name: Ue.GREEN,
4572
4588
  hex: "#a6e1c5",
4573
4589
  label: "Green highlight"
4574
4590
  }
@@ -4583,7 +4599,7 @@ function ql(e, t) {
4583
4599
  '[role="button"]',
4584
4600
  '[role="textbox"]'
4585
4601
  ];
4586
- let c = /* @__PURE__ */ R(null), d = /* @__PURE__ */ R(null), f = /* @__PURE__ */ R(null), b = /* @__PURE__ */ R(null), g = /* @__PURE__ */ R($e({
4602
+ let c = /* @__PURE__ */ R(null), d = /* @__PURE__ */ R(null), f = /* @__PURE__ */ R(null), b = /* @__PURE__ */ R(null), g = /* @__PURE__ */ R($t({
4587
4603
  isVisible: !1,
4588
4604
  selectedText: "",
4589
4605
  selectedRange: null,
@@ -4594,8 +4610,8 @@ function ql(e, t) {
4594
4610
  ), T = /* @__PURE__ */ R(
4595
4611
  ""
4596
4612
  // For screen readers when toolbar is repositioned
4597
- ), $ = /* @__PURE__ */ R(0), P = /* @__PURE__ */ R(null), lt = /* @__PURE__ */ Ro(() => v($) > 0), at = /* @__PURE__ */ Ro(() => v(P) !== null), W = /* @__PURE__ */ Ro(() => v(b)?.scopeElement || v(f)?.scopeElement || null);
4598
- function jt() {
4613
+ ), $ = /* @__PURE__ */ R(0), P = /* @__PURE__ */ R(null), le = /* @__PURE__ */ Ro(() => v($) > 0), ae = /* @__PURE__ */ Ro(() => v(P) !== null), W = /* @__PURE__ */ Ro(() => v(b)?.scopeElement || v(f)?.scopeElement || null);
4614
+ function je() {
4599
4615
  const p = v(c)?.ownerDocument;
4600
4616
  return v(W) || p?.documentElement || document.documentElement;
4601
4617
  }
@@ -4607,15 +4623,15 @@ function ql(e, t) {
4607
4623
  if (!n()) return null;
4608
4624
  const y = n().getAnnotations();
4609
4625
  for (const C of y) {
4610
- const q = p.compareBoundaryPoints(Range.START_TO_START, C.range), oe = p.compareBoundaryPoints(Range.END_TO_END, C.range), Ne = p.compareBoundaryPoints(Range.START_TO_END, C.range), Ve = p.compareBoundaryPoints(Range.END_TO_START, C.range);
4611
- if (q >= 0 && oe <= 0 || // selection inside annotation
4612
- q <= 0 && oe >= 0 || // annotation inside selection
4613
- Ne > 0 && Ve < 0)
4626
+ const q = p.compareBoundaryPoints(Range.START_TO_START, C.range), ot = p.compareBoundaryPoints(Range.END_TO_END, C.range), Nt = p.compareBoundaryPoints(Range.START_TO_END, C.range), Vt = p.compareBoundaryPoints(Range.END_TO_START, C.range);
4627
+ if (q >= 0 && ot <= 0 || // selection inside annotation
4628
+ q <= 0 && ot >= 0 || // annotation inside selection
4629
+ Nt > 0 && Vt < 0)
4614
4630
  return C.id;
4615
4631
  }
4616
4632
  return null;
4617
4633
  }
4618
- function ye(p) {
4634
+ function yt(p) {
4619
4635
  if (p.nodeType !== Node.ELEMENT_NODE && p.nodeType !== Node.TEXT_NODE)
4620
4636
  return !1;
4621
4637
  const y = p.nodeType === Node.TEXT_NODE ? p.parentElement : p;
@@ -4627,15 +4643,15 @@ function ql(e, t) {
4627
4643
  }
4628
4644
  }) : !1;
4629
4645
  }
4630
- function ct(p) {
4646
+ function ce(p) {
4631
4647
  if (!v(W)) return !0;
4632
4648
  const y = p.commonAncestorContainer, C = y.nodeType === Node.TEXT_NODE ? y.parentElement : y;
4633
4649
  return !!C && v(W).contains(C);
4634
4650
  }
4635
- function to() {
4651
+ function eo() {
4636
4652
  if (!(!i || !n()))
4637
4653
  try {
4638
- const p = jt(), y = n().exportAnnotations(p);
4654
+ const p = je(), y = n().exportAnnotations(p);
4639
4655
  sessionStorage.setItem(Z(), JSON.stringify(y));
4640
4656
  } catch (p) {
4641
4657
  console.error("[AnnotationToolbar] Failed to save annotations:", p);
@@ -4646,50 +4662,50 @@ function ql(e, t) {
4646
4662
  try {
4647
4663
  const p = sessionStorage.getItem(Z());
4648
4664
  if (!p) return;
4649
- const y = JSON.parse(p), C = jt(), q = n().importAnnotations(y, C);
4650
- console.log(`[AnnotationToolbar] Restored ${q} annotations`), k($, n().getAnnotations().length, !0);
4665
+ const y = JSON.parse(p), C = je(), q = n().importAnnotations(y, C);
4666
+ console.log(`[AnnotationToolbar] Restored ${q} annotations`), A($, n().getAnnotations().length, !0);
4651
4667
  } catch (p) {
4652
4668
  console.error("[AnnotationToolbar] Failed to load annotations:", p);
4653
4669
  }
4654
4670
  }
4655
- function eo() {
4671
+ function to() {
4656
4672
  if (!o() || !i) return;
4657
4673
  const p = window.getSelection();
4658
- if (!p || p.rangeCount === 0) return Ct();
4674
+ if (!p || p.rangeCount === 0) return Ce();
4659
4675
  const y = p.getRangeAt(0), C = p.toString().trim();
4660
- if (!C || !ct(y) || !ye(y.commonAncestorContainer))
4661
- return Ct();
4662
- const q = y.getBoundingClientRect(), oe = q.left + q.width / 2, Ne = q.top - 8;
4663
- k(P, Y(y), !0), v(g).isVisible = !0, v(g).selectedText = C, v(g).selectedRange = y.cloneRange(), v(g).toolbarPosition = { x: oe, y: Ne };
4664
- const Ve = C.length > 30 ? C.substring(0, 30) + "..." : C;
4665
- k(T, `Annotation toolbar opened for "${Ve}"`), setTimeout(
4676
+ if (!C || !ce(y) || !yt(y.commonAncestorContainer))
4677
+ return Ce();
4678
+ const q = y.getBoundingClientRect(), ot = q.left + q.width / 2, Nt = q.top - 8;
4679
+ A(P, Y(y), !0), v(g).isVisible = !0, v(g).selectedText = C, v(g).selectedRange = y.cloneRange(), v(g).toolbarPosition = { x: ot, y: Nt };
4680
+ const Vt = C.length > 30 ? C.substring(0, 30) + "..." : C;
4681
+ A(T, `Annotation toolbar opened for "${Vt}"`), setTimeout(
4666
4682
  () => {
4667
- k(T, "");
4683
+ A(T, "");
4668
4684
  },
4669
4685
  2e3
4670
- ), k(w, !0), setTimeout(
4686
+ ), A(w, !0), setTimeout(
4671
4687
  () => {
4672
- k(w, !1);
4688
+ A(w, !1);
4673
4689
  },
4674
4690
  100
4675
4691
  );
4676
4692
  }
4677
- function Ct() {
4678
- v(h) && r() && (r().stop(), k(h, !1)), v(g).isVisible = !1, v(g).selectedText = "", v(g).selectedRange = null;
4693
+ function Ce() {
4694
+ v(h) && r() && (r().stop(), A(h, !1)), v(g).isVisible = !1, v(g).selectedText = "", v(g).selectedRange = null;
4679
4695
  }
4680
- function bn(p) {
4696
+ function yn(p) {
4681
4697
  if (!v(g).selectedRange || !n()) return;
4682
4698
  const y = v(g).selectedText;
4683
- n().addAnnotation(v(g).selectedRange, p), k($, n().getAnnotations().length, !0), to();
4684
- const C = p === Ut.UNDERLINE ? "underlined" : `highlighted in ${p}`, q = y.length > 30 ? y.substring(0, 30) + "..." : y;
4685
- k(T, `"${q}" ${C}`), setTimeout(
4699
+ n().addAnnotation(v(g).selectedRange, p), A($, n().getAnnotations().length, !0), eo();
4700
+ const C = p === Ue.UNDERLINE ? "underlined" : `highlighted in ${p}`, q = y.length > 30 ? y.substring(0, 30) + "..." : y;
4701
+ A(T, `"${q}" ${C}`), setTimeout(
4686
4702
  () => {
4687
- k(T, "");
4703
+ A(T, "");
4688
4704
  },
4689
4705
  3e3
4690
- ), Ct();
4706
+ ), Ce();
4691
4707
  }
4692
- function Qr() {
4708
+ function oi() {
4693
4709
  if (!v(P) || !n()) {
4694
4710
  console.warn("[AnnotationToolbar] No overlapping annotation to remove");
4695
4711
  return;
@@ -4703,43 +4719,43 @@ function ql(e, t) {
4703
4719
  const y = p.range.toString();
4704
4720
  n().removeAnnotation(v(P));
4705
4721
  const C = n().getAnnotations().length;
4706
- k($, C, !0), console.log("[AnnotationToolbar] Annotations remaining:", C), to();
4722
+ A($, C, !0), console.log("[AnnotationToolbar] Annotations remaining:", C), eo();
4707
4723
  const q = y.length > 30 ? y.substring(0, 30) + "..." : y;
4708
- k(T, `Removed annotation from "${q}"`), setTimeout(
4724
+ A(T, `Removed annotation from "${q}"`), setTimeout(
4709
4725
  () => {
4710
- k(T, "");
4726
+ A(T, "");
4711
4727
  },
4712
4728
  3e3
4713
- ), Ct();
4729
+ ), Ce();
4714
4730
  }
4715
- function ti() {
4731
+ function ni() {
4716
4732
  const p = v($);
4717
- n()?.clearAnnotations(), k($, 0), sessionStorage.removeItem(Z()), k(T, `${p} annotation${p === 1 ? "" : "s"} cleared`), setTimeout(
4733
+ n()?.clearAnnotations(), A($, 0), sessionStorage.removeItem(Z()), A(T, `${p} annotation${p === 1 ? "" : "s"} cleared`), setTimeout(
4718
4734
  () => {
4719
- k(T, "");
4735
+ A(T, "");
4720
4736
  },
4721
4737
  3e3
4722
- ), Ct();
4738
+ ), Ce();
4723
4739
  }
4724
- async function ei() {
4740
+ async function ri() {
4725
4741
  if (!(!v(g).selectedRange || !r())) {
4726
- k(h, !0);
4742
+ A(h, !0);
4727
4743
  try {
4728
- console.log("[AnnotationToolbar] Speaking range:", v(g).selectedRange.toString().substring(0, 50)), await r().speakRange(v(g).selectedRange, { contentRoot: jt() }), console.log("[AnnotationToolbar] TTS completed successfully");
4744
+ console.log("[AnnotationToolbar] Speaking range:", v(g).selectedRange.toString().substring(0, 50)), await r().speakRange(v(g).selectedRange, { contentRoot: je() }), console.log("[AnnotationToolbar] TTS completed successfully");
4729
4745
  } catch (p) {
4730
4746
  console.error("[AnnotationToolbar] TTS error:", p), alert(`TTS failed: ${p instanceof Error ? p.message : String(p)}`);
4731
4747
  } finally {
4732
- k(h, !1);
4748
+ A(h, !1);
4733
4749
  }
4734
4750
  }
4735
4751
  }
4736
- function yn(p) {
4737
- p.key === "Escape" && v(g).isVisible && (p.preventDefault(), Ct());
4752
+ function wn(p) {
4753
+ p.key === "Escape" && v(g).isVisible && (p.preventDefault(), Ce());
4738
4754
  }
4739
4755
  function oo(p) {
4740
- !v(g).isVisible || v(w) || v(d) && !v(d).contains(p.target) && Ct();
4756
+ !v(g).isVisible || v(w) || v(d) && !v(d).contains(p.target) && Ce();
4741
4757
  }
4742
- En(() => {
4758
+ Pn(() => {
4743
4759
  if (!i) return;
4744
4760
  const p = setTimeout(
4745
4761
  () => {
@@ -4747,21 +4763,21 @@ function ql(e, t) {
4747
4763
  },
4748
4764
  2e3
4749
4765
  ), y = v(W) || document;
4750
- return y.addEventListener("mouseup", eo), y.addEventListener("click", oo), y.addEventListener("touchend", eo), y.addEventListener("touchstart", oo), document.addEventListener("keydown", yn), window.addEventListener("scroll", Ct, !0), () => {
4751
- clearTimeout(p), y.removeEventListener("mouseup", eo), y.removeEventListener("click", oo), y.removeEventListener("touchend", eo), y.removeEventListener("touchstart", oo), document.removeEventListener("keydown", yn), window.removeEventListener("scroll", Ct, !0);
4766
+ return y.addEventListener("mouseup", to), y.addEventListener("click", oo), y.addEventListener("touchend", to), y.addEventListener("touchstart", oo), document.addEventListener("keydown", wn), window.addEventListener("scroll", Ce, !0), () => {
4767
+ clearTimeout(p), y.removeEventListener("mouseup", to), y.removeEventListener("click", oo), y.removeEventListener("touchend", to), y.removeEventListener("touchstart", oo), document.removeEventListener("keydown", wn), window.removeEventListener("scroll", Ce, !0);
4752
4768
  };
4753
- }), En(() => {
4769
+ }), Pn(() => {
4754
4770
  if (!v(c)) return;
4755
- const p = Hs(v(c), (C) => {
4756
- k(f, C, !0);
4757
- }), y = Fs(v(c), (C) => {
4758
- k(b, C, !0);
4771
+ const p = Us(v(c), (C) => {
4772
+ A(f, C, !0);
4773
+ }), y = Ks(v(c), (C) => {
4774
+ A(b, C, !0);
4759
4775
  });
4760
4776
  return () => {
4761
4777
  y(), p();
4762
4778
  };
4763
4779
  });
4764
- var oi = {
4780
+ var ii = {
4765
4781
  get enabled() {
4766
4782
  return o();
4767
4783
  },
@@ -4780,74 +4796,74 @@ function ql(e, t) {
4780
4796
  set ttsService(p = null) {
4781
4797
  r(p), ho();
4782
4798
  }
4783
- }, wn = zl();
4784
- _s("g8qu62", (p) => {
4785
- var y = Ll();
4786
- Et(p, y);
4799
+ }, Tn = Hl();
4800
+ Ps("g8qu62", (p) => {
4801
+ var y = Vl();
4802
+ Ee(p, y);
4787
4803
  });
4788
- var Tn = No(wn);
4789
- Wn(Tn, (p) => k(c, p), () => v(c));
4790
- var In = zt(Tn, 2);
4804
+ var In = No(Tn);
4805
+ qn(In, (p) => A(c, p), () => v(c));
4806
+ var $n = ze(In, 2);
4791
4807
  {
4792
- var ni = (p) => {
4793
- var y = jl(), C = so(y);
4794
- Ss(C, 17, () => l, $s, (ut, dt) => {
4795
- var K = Ml(), no = so(K), Oo = so(no, !0);
4808
+ var si = (p) => {
4809
+ var y = Dl(), C = so(y);
4810
+ _s(C, 17, () => l, ks, (ue, de) => {
4811
+ var K = jl(), no = so(K), Oo = so(no, !0);
4796
4812
  ro(no), ro(K), lo(() => {
4797
- Nn(K, `background-color: ${v(dt).hex ?? ""};`), Vn(K, "aria-label", v(dt).label), Vn(K, "title", v(dt).label), Rn(Oo, v(dt).label);
4798
- }), ze("click", K, () => bn(v(dt).name)), Et(ut, K);
4813
+ Vn(K, `background-color: ${v(de).hex ?? ""};`), jn(K, "aria-label", v(de).label), jn(K, "title", v(de).label), Nn(Oo, v(de).label);
4814
+ }), zt("click", K, () => yn(v(de).name)), Ee(ue, K);
4799
4815
  });
4800
- var q = zt(C, 2), oe = zt(q, 2);
4816
+ var q = ze(C, 2), ot = ze(q, 2);
4801
4817
  {
4802
- var Ne = (ut) => {
4803
- var dt = Ol(), K = zt(No(dt), 2);
4804
- lo(() => K.disabled = v(h)), ze("click", K, ei), Et(ut, dt);
4818
+ var Nt = (ue) => {
4819
+ var de = zl(), K = ze(No(de), 2);
4820
+ lo(() => K.disabled = v(h)), zt("click", K, ri), Ee(ue, de);
4805
4821
  };
4806
- We(oe, (ut) => {
4807
- r() && ut(Ne);
4822
+ Wt(ot, (ue) => {
4823
+ r() && ue(Nt);
4808
4824
  });
4809
4825
  }
4810
- var Ve = zt(oe, 2);
4826
+ var Vt = ze(ot, 2);
4811
4827
  {
4812
- var ii = (ut) => {
4813
- var dt = Vl(), K = zt(No(dt), 2);
4828
+ var ai = (ue) => {
4829
+ var de = Bl(), K = ze(No(de), 2);
4814
4830
  {
4815
- var no = (ne) => {
4816
- var je = Rl();
4817
- ze("click", je, Qr), Et(ne, je);
4831
+ var no = (nt) => {
4832
+ var jt = Wl();
4833
+ zt("click", jt, oi), Ee(nt, jt);
4818
4834
  };
4819
- We(K, (ne) => {
4820
- v(at) && ne(no);
4835
+ Wt(K, (nt) => {
4836
+ v(ae) && nt(no);
4821
4837
  });
4822
4838
  }
4823
- var Oo = zt(K, 2);
4839
+ var Oo = ze(K, 2);
4824
4840
  {
4825
- var si = (ne) => {
4826
- var je = Nl();
4827
- ze("click", je, ti), Et(ne, je);
4841
+ var ci = (nt) => {
4842
+ var jt = ql();
4843
+ zt("click", jt, ni), Ee(nt, jt);
4828
4844
  };
4829
- We(Oo, (ne) => {
4830
- v(lt) && ne(si);
4845
+ Wt(Oo, (nt) => {
4846
+ v(le) && nt(ci);
4831
4847
  });
4832
4848
  }
4833
- Et(ut, dt);
4849
+ Ee(ue, de);
4834
4850
  };
4835
- We(Ve, (ut) => {
4836
- (v(at) || v(lt)) && ut(ii);
4851
+ Wt(Vt, (ue) => {
4852
+ (v(ae) || v(le)) && ue(ai);
4837
4853
  });
4838
4854
  }
4839
- ro(y), Wn(y, (ut) => k(d, ut), () => v(d)), lo(() => Nn(y, `left:${v(g).toolbarPosition.x}px; top:${v(g).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), ze("click", q, () => bn(Ut.UNDERLINE)), Et(p, y);
4855
+ ro(y), qn(y, (ue) => A(d, ue), () => v(d)), lo(() => Vn(y, `left:${v(g).toolbarPosition.x}px; top:${v(g).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), zt("click", q, () => yn(Ue.UNDERLINE)), Ee(p, y);
4840
4856
  };
4841
- We(In, (p) => {
4842
- v(g).isVisible && p(ni);
4857
+ Wt($n, (p) => {
4858
+ v(g).isVisible && p(si);
4843
4859
  });
4844
4860
  }
4845
- var $n = zt(In, 2), ri = so($n, !0);
4846
- return ro($n), lo(() => Rn(ri, v(T))), Et(e, wn), rr(oi);
4861
+ var xn = ze($n, 2), li = so(xn, !0);
4862
+ return ro(xn), lo(() => Nn(li, v(T))), Ee(e, Tn), ir(ii);
4847
4863
  }
4848
- ps(["click"]);
4849
- customElements.define("pie-tool-annotation-toolbar", zs(
4850
- ql,
4864
+ ms(["click"]);
4865
+ customElements.define("pie-tool-annotation-toolbar", Bs(
4866
+ Gl,
4851
4867
  {
4852
4868
  enabled: { attribute: "enabled", type: "Boolean" },
4853
4869
  highlightCoordinator: { type: "Object" },
@@ -4858,5 +4874,5 @@ customElements.define("pie-tool-annotation-toolbar", zs(
4858
4874
  { mode: "open" }
4859
4875
  ));
4860
4876
  export {
4861
- ql as default
4877
+ Gl as default
4862
4878
  };