@pie-players/pie-tool-line-reader 0.3.29 → 0.3.31

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,15 +1,15 @@
1
1
  import { t as g } from "./defineProperty-CyepwRr5.js";
2
2
  if (typeof window < "u") {
3
- var Wr, Fr;
4
- ((Wr = (Fr = window).__svelte ?? (Fr.__svelte = {})).v ?? (Wr.v = /* @__PURE__ */ new Set())).add("5");
3
+ var Zr, ei;
4
+ ((Zr = (ei = window).__svelte ?? (ei.__svelte = {})).v ?? (Zr.v = /* @__PURE__ */ new Set())).add("5");
5
5
  }
6
- var Xe = {}, N = Symbol(), Ua = Symbol("filename");
7
- var Jn = Array.isArray, Qn = Array.prototype.indexOf, Je = Array.prototype.includes, Zn = Array.from, Pt = Object.keys, xt = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, eo = Object.getOwnPropertyDescriptors, to = Object.prototype, ro = Array.prototype, $i = Object.getPrototypeOf, Hr = Object.isExtensible, io = () => {
6
+ var et = {}, N = Symbol(), cl = Symbol("filename");
7
+ var ao = Array.isArray, lo = Array.prototype.indexOf, tt = Array.prototype.includes, co = Array.from, jt = Object.keys, Dt = Object.defineProperty, De = Object.getOwnPropertyDescriptor, uo = Object.getOwnPropertyDescriptors, fo = Object.prototype, ho = Array.prototype, Ci = Object.getPrototypeOf, ti = Object.isExtensible, po = () => {
8
8
  };
9
- function no(e) {
9
+ function vo(e) {
10
10
  for (var t = 0; t < e.length; t++) e[t]();
11
11
  }
12
- function Ii() {
12
+ function Ni() {
13
13
  var e, t;
14
14
  return {
15
15
  promise: new Promise((r, i) => {
@@ -19,81 +19,84 @@ function Ii() {
19
19
  reject: t
20
20
  };
21
21
  }
22
- var Ga = 1 << 24, K = 1024, le = 2048, Ve = 4096, gr = 8192, oo = 16384, mr = 32768, Br = 1 << 25, yr = 65536, qa = 1 << 17, Ya = 1 << 18, it = 1 << 19, so = 1 << 20, Ka = 1 << 25, pt = 65536, Ur = 1 << 21, ao = 1 << 22, Lt = 1 << 23, lt = Symbol("$state"), Ai = Symbol("legacy props"), lo = Symbol(""), co = Symbol("proxy path"), pe = new class extends Error {
22
+ var ul = 1 << 24, J = 1024, oe = 2048, Ue = 4096, Ar = 8192, _o = 16384, Er = 32768, ri = 1 << 25, Mr = 65536, fl = 1 << 17, dl = 1 << 18, lt = 1 << 19, go = 1 << 20, bt = 65536, ii = 1 << 21, mo = 1 << 22, zt = 1 << 23, pt = Symbol("$state"), ji = Symbol("legacy props"), bo = Symbol(""), yo = Symbol("proxy path"), hl = Symbol("hmr anchor"), ge = new class extends Error {
23
23
  constructor(...t) {
24
24
  super(...t), g(this, "name", "StaleReactionError"), g(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
25
25
  }
26
- }(), uo = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
27
- function fo(e) {
26
+ }(), wo = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
27
+ function To(e) {
28
28
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
29
29
  }
30
- function ho() {
30
+ function ko() {
31
31
  throw new Error("https://svelte.dev/e/async_derived_orphan");
32
32
  }
33
- function po(e) {
33
+ function So(e) {
34
34
  throw new Error("https://svelte.dev/e/effect_in_teardown");
35
35
  }
36
- function vo() {
36
+ function Io() {
37
37
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
38
38
  }
39
- function _o(e) {
39
+ function $o(e) {
40
40
  throw new Error("https://svelte.dev/e/effect_orphan");
41
41
  }
42
- function go() {
42
+ function Ao() {
43
43
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
44
44
  }
45
- function mo() {
45
+ function Eo() {
46
46
  throw new Error("https://svelte.dev/e/hydration_failed");
47
47
  }
48
- function yo(e) {
48
+ function Mo(e) {
49
49
  throw new Error("https://svelte.dev/e/props_invalid_value");
50
50
  }
51
- function bo() {
51
+ function Oo() {
52
52
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
53
53
  }
54
- function wo() {
54
+ function xo() {
55
55
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
56
56
  }
57
- function To() {
57
+ function Po() {
58
58
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
59
59
  }
60
- function ko() {
60
+ function Lo() {
61
61
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
62
62
  }
63
- function Vt(e) {
63
+ function Ro() {
64
+ console.warn("https://svelte.dev/e/derived_inert");
65
+ }
66
+ function Gt(e) {
64
67
  console.warn("https://svelte.dev/e/hydration_mismatch");
65
68
  }
66
- function So() {
69
+ function Co() {
67
70
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
68
71
  }
69
72
  var O = !1;
70
- function qe(e) {
73
+ function Xe(e) {
71
74
  O = e;
72
75
  }
73
- var I;
74
- function re(e) {
76
+ var A;
77
+ function ne(e) {
75
78
  if (e === null)
76
- throw Vt(), Xe;
77
- return I = e;
79
+ throw Gt(), et;
80
+ return A = e;
78
81
  }
79
- function br() {
80
- return re(/* @__PURE__ */ me(I));
82
+ function Or() {
83
+ return ne(/* @__PURE__ */ Te(A));
81
84
  }
82
- function Gr(e) {
85
+ function ni(e) {
83
86
  if (O) {
84
- if (/* @__PURE__ */ me(I) !== null)
85
- throw Vt(), Xe;
86
- I = e;
87
+ if (/* @__PURE__ */ Te(A) !== null)
88
+ throw Gt(), et;
89
+ A = e;
87
90
  }
88
91
  }
89
- function Ei(e = 1) {
92
+ function Di(e = 1) {
90
93
  if (O) {
91
- for (var t = e, r = I; t--; ) r = /* @__PURE__ */ me(r);
92
- I = r;
94
+ for (var t = e, r = A; t--; ) r = /* @__PURE__ */ Te(r);
95
+ A = r;
93
96
  }
94
97
  }
95
- function Mi(e = !0) {
96
- for (var t = 0, r = I; ; ) {
98
+ function zi(e = !0) {
99
+ for (var t = 0, r = A; ; ) {
97
100
  if (r.nodeType === 8) {
98
101
  var i = r.data;
99
102
  if (i === "]") {
@@ -101,36 +104,36 @@ function Mi(e = !0) {
101
104
  t -= 1;
102
105
  } else (i === "[" || i === "[!" || i[0] === "[" && !isNaN(Number(i.slice(1)))) && (t += 1);
103
106
  }
104
- var n = /* @__PURE__ */ me(r);
107
+ var n = /* @__PURE__ */ Te(r);
105
108
  e && r.remove(), r = n;
106
109
  }
107
110
  }
108
- function $o(e) {
111
+ function No(e) {
109
112
  if (!e || e.nodeType !== 8)
110
- throw Vt(), Xe;
113
+ throw Gt(), et;
111
114
  return e.data;
112
115
  }
113
- function Oi(e) {
116
+ function Vi(e) {
114
117
  return e === this.v;
115
118
  }
116
- function Io(e, t) {
119
+ function jo(e, t) {
117
120
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
118
121
  }
119
- function Pi(e) {
120
- return !Io(e, this.v);
122
+ function Wi(e) {
123
+ return !jo(e, this.v);
121
124
  }
122
- var Ee = !1, vt = !1;
123
- function qr(e, t) {
124
- return e.label = t, Ao(e.v, t), e;
125
+ var me = !1, yt = !1;
126
+ function oi(e, t) {
127
+ return e.label = t, Do(e.v, t), e;
125
128
  }
126
- function Ao(e, t) {
127
- return e?.[co]?.(t), e;
129
+ function Do(e, t) {
130
+ return e?.[yo]?.(t), e;
128
131
  }
129
132
  var L = null;
130
- function Qe(e) {
133
+ function rt(e) {
131
134
  L = e;
132
135
  }
133
- function xi(e, t = !1, r) {
136
+ function Hi(e, t = !1, r) {
134
137
  L = {
135
138
  p: L,
136
139
  i: !1,
@@ -139,50 +142,50 @@ function xi(e, t = !1, r) {
139
142
  s: e,
140
143
  x: null,
141
144
  r: k,
142
- l: vt && !t ? {
145
+ l: yt && !t ? {
143
146
  s: null,
144
147
  u: null,
145
148
  $: []
146
149
  } : null
147
150
  };
148
151
  }
149
- function Li(e) {
152
+ function Fi(e) {
150
153
  var t = L, r = t.e;
151
154
  if (r !== null) {
152
155
  t.e = null;
153
- for (var i of r) sn(i);
156
+ for (var i of r) vn(i);
154
157
  }
155
158
  return e !== void 0 && (t.x = e), t.i = !0, L = t.p, e ?? {};
156
159
  }
157
- function _t() {
158
- return !vt || L !== null && L.l === null;
160
+ function wt() {
161
+ return !yt || L !== null && L.l === null;
159
162
  }
160
- var Le = [];
161
- function Ri() {
162
- var e = Le;
163
- Le = [], no(e);
163
+ var Ne = [];
164
+ function Bi() {
165
+ var e = Ne;
166
+ Ne = [], vo(e);
164
167
  }
165
- function Ze(e) {
166
- if (Le.length === 0 && !ct) {
167
- var t = Le;
168
+ function it(e) {
169
+ if (Ne.length === 0 && !vt) {
170
+ var t = Ne;
168
171
  queueMicrotask(() => {
169
- t === Le && Ri();
172
+ t === Ne && Bi();
170
173
  });
171
174
  }
172
- Le.push(e);
175
+ Ne.push(e);
173
176
  }
174
- function Eo() {
175
- for (; Le.length > 0; ) Ri();
177
+ function zo() {
178
+ for (; Ne.length > 0; ) Bi();
176
179
  }
177
- function Ci(e) {
180
+ function Ui(e) {
178
181
  var t = k;
179
182
  if (t === null)
180
- return S.f |= Lt, e;
183
+ return I.f |= zt, e;
181
184
  if (!(t.f & 32768) && !(t.f & 4))
182
185
  throw e;
183
- $e(e, t);
186
+ Pe(e, t);
184
187
  }
185
- function $e(e, t) {
188
+ function Pe(e, t) {
186
189
  for (; t !== null; ) {
187
190
  if (t.f & 128) {
188
191
  if (!(t.f & 32768)) throw e;
@@ -197,776 +200,824 @@ function $e(e, t) {
197
200
  }
198
201
  throw e;
199
202
  }
200
- var Mo = ~(le | Ve | K);
203
+ var Vo = ~(oe | Ue | J);
201
204
  function R(e, t) {
202
- e.f = e.f & Mo | t;
205
+ e.f = e.f & Vo | t;
203
206
  }
204
- function wr(e) {
205
- e.f & 512 || e.deps === null ? R(e, K) : R(e, Ve);
207
+ function xr(e) {
208
+ e.f & 512 || e.deps === null ? R(e, J) : R(e, Ue);
206
209
  }
207
- function Ni(e) {
210
+ function Gi(e) {
208
211
  if (e !== null)
209
212
  for (const t of e)
210
- !(t.f & 2) || !(t.f & 65536) || (t.f ^= pt, Ni(t.deps));
213
+ !(t.f & 2) || !(t.f & 65536) || (t.f ^= bt, Gi(t.deps));
211
214
  }
212
- function Di(e, t, r) {
213
- e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e), Ni(e.deps), R(e, K);
215
+ function qi(e, t, r) {
216
+ e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e), Gi(e.deps), R(e, J);
214
217
  }
215
- var Oo = !1, wt = !1;
216
- function Po(e) {
217
- var t = wt;
218
+ var Wo = !1, $t = !1;
219
+ function Ho(e) {
220
+ var t = $t;
218
221
  try {
219
- return wt = !1, [e(), wt];
222
+ return $t = !1, [e(), $t];
220
223
  } finally {
221
- wt = t;
224
+ $t = t;
222
225
  }
223
226
  }
224
- function ji(e, t) {
227
+ function Yi(e, t) {
225
228
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
226
229
  }
227
- function Tr(e, t) {
228
- ji(e, t), t.add(e);
230
+ function Pr(e, t) {
231
+ Yi(e, t), t.add(e);
229
232
  }
230
- function T(e, t, r) {
231
- ji(e, t), t.set(e, r);
233
+ function y(e, t, r) {
234
+ Yi(e, t), t.set(e, r);
232
235
  }
233
- function M(e, t, r) {
236
+ function $(e, t, r) {
234
237
  if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r;
235
238
  throw new TypeError("Private element is not present on this object");
236
239
  }
237
240
  function l(e, t) {
238
- return e.get(M(e, t));
241
+ return e.get($(e, t));
239
242
  }
240
- function y(e, t, r) {
241
- return e.set(M(e, t), r), r;
243
+ function w(e, t, r) {
244
+ return e.set($(e, t), r), r;
242
245
  }
243
- var zi, ve = /* @__PURE__ */ new Set(), $ = null, Yr = null, z = null, sr = null, ct = !1, Kt = !1, et = null, Rt = null, Vi = 0;
244
- var xo = 1, Ct = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakSet(), We = class Wi {
246
+ var Ki, ce = /* @__PURE__ */ new Set(), S = null, si = null, D = null, dr = null, vt = !1, tr = !1, nt = null, Vt = null, Xi = 0;
247
+ var Fo = 1, Wt = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakSet(), Ge = class Ji {
245
248
  constructor() {
246
- Tr(this, ne), g(this, "id", xo++), g(this, "current", /* @__PURE__ */ new Map()), g(this, "previous", /* @__PURE__ */ new Map()), T(this, Ct, /* @__PURE__ */ new Set()), T(this, Tt, /* @__PURE__ */ new Set()), T(this, He, 0), T(this, Be, 0), T(this, It, null), T(this, Q, []), T(this, ft, /* @__PURE__ */ new Set()), T(this, Ne, /* @__PURE__ */ new Set()), T(this, xe, /* @__PURE__ */ new Map()), g(this, "is_fork", !1), T(this, kt, !1);
249
+ Pr(this, z), g(this, "id", Fo++), g(this, "current", /* @__PURE__ */ new Map()), g(this, "previous", /* @__PURE__ */ new Map()), y(this, Wt, /* @__PURE__ */ new Set()), y(this, At, /* @__PURE__ */ new Set()), y(this, ct, /* @__PURE__ */ new Set()), y(this, Ce, /* @__PURE__ */ new Map()), y(this, Oe, /* @__PURE__ */ new Map()), y(this, xt, null), y(this, te, []), y(this, hr, []), y(this, ot, /* @__PURE__ */ new Set()), y(this, ze, /* @__PURE__ */ new Set()), y(this, xe, /* @__PURE__ */ new Map()), y(this, Pt, /* @__PURE__ */ new Set()), g(this, "is_fork", !1), y(this, Et, !1), y(this, Qe, /* @__PURE__ */ new Set());
247
250
  }
248
251
  skip_effect(t) {
249
252
  l(xe, this).has(t) || l(xe, this).set(t, {
250
253
  d: [],
251
254
  m: []
252
- });
255
+ }), l(Pt, this).delete(t);
253
256
  }
254
- unskip_effect(t) {
255
- var r = l(xe, this).get(t);
256
- if (r) {
257
+ unskip_effect(t, r = (i) => this.schedule(i)) {
258
+ var i = l(xe, this).get(t);
259
+ if (i) {
257
260
  l(xe, this).delete(t);
258
- for (var i of r.d)
259
- R(i, le), this.schedule(i);
260
- for (i of r.m)
261
- R(i, Ve), this.schedule(i);
261
+ for (var n of i.d)
262
+ R(n, oe), r(n);
263
+ for (n of i.m)
264
+ R(n, Ue), r(n);
262
265
  }
266
+ l(Pt, this).add(t);
263
267
  }
264
- capture(t, r) {
265
- r !== N && !this.previous.has(t) && this.previous.set(t, r), t.f & 8388608 || (this.current.set(t, t.v), z?.set(t, t.v));
268
+ capture(t, r, i = !1) {
269
+ t.v !== N && !this.previous.has(t) && this.previous.set(t, t.v), t.f & 8388608 || (this.current.set(t, [r, i]), D?.set(t, r)), this.is_fork || (t.v = r);
266
270
  }
267
271
  activate() {
268
- $ = this;
272
+ S = this;
269
273
  }
270
274
  deactivate() {
271
- $ = null, z = null;
275
+ S = null, D = null;
272
276
  }
273
277
  flush() {
274
278
  var t = null;
275
279
  try {
276
- Kt = !0, $ = this, M(ne, this, Fi).call(this);
280
+ tr = !0, S = this, $(z, this, Lr).call(this);
277
281
  } finally {
278
- Vi = 0, sr = null, et = null, Rt = null, Kt = !1, $ = null, z = null, Ae.clear();
282
+ Xi = 0, dr = null, nt = null, Vt = null, tr = !1, S = null, D = null, He.clear();
279
283
  }
280
284
  }
281
285
  discard() {
282
- for (const t of l(Tt, this)) t(this);
283
- l(Tt, this).clear(), ve.delete(this);
286
+ for (const t of l(At, this)) t(this);
287
+ l(At, this).clear(), l(ct, this).clear(), ce.delete(this);
284
288
  }
285
- increment(t) {
286
- y(He, this, l(He, this) + 1), t && y(Be, this, l(Be, this) + 1);
289
+ register_created_effect(t) {
290
+ l(hr, this).push(t);
287
291
  }
288
- decrement(t, r) {
289
- y(He, this, l(He, this) - 1), t && y(Be, this, l(Be, this) - 1), !(l(kt, this) || r) && (y(kt, this, !0), Ze(() => {
290
- y(kt, this, !1), this.flush();
292
+ increment(t, r) {
293
+ let i = l(Ce, this).get(r) ?? 0;
294
+ if (l(Ce, this).set(r, i + 1), t) {
295
+ let n = l(Oe, this).get(r) ?? 0;
296
+ l(Oe, this).set(r, n + 1);
297
+ }
298
+ }
299
+ decrement(t, r, i) {
300
+ let n = l(Ce, this).get(r) ?? 0;
301
+ if (n === 1 ? l(Ce, this).delete(r) : l(Ce, this).set(r, n - 1), t) {
302
+ let o = l(Oe, this).get(r) ?? 0;
303
+ o === 1 ? l(Oe, this).delete(r) : l(Oe, this).set(r, o - 1);
304
+ }
305
+ l(Et, this) || i || (w(Et, this, !0), it(() => {
306
+ w(Et, this, !1), this.flush();
291
307
  }));
292
308
  }
293
309
  transfer_effects(t, r) {
294
- for (const i of t) l(ft, this).add(i);
295
- for (const i of r) l(Ne, this).add(i);
310
+ for (const i of t) l(ot, this).add(i);
311
+ for (const i of r) l(ze, this).add(i);
296
312
  t.clear(), r.clear();
297
313
  }
298
314
  oncommit(t) {
299
- l(Ct, this).add(t);
315
+ l(Wt, this).add(t);
300
316
  }
301
317
  ondiscard(t) {
302
- l(Tt, this).add(t);
318
+ l(At, this).add(t);
319
+ }
320
+ on_fork_commit(t) {
321
+ l(ct, this).add(t);
322
+ }
323
+ run_fork_commit_callbacks() {
324
+ for (const t of l(ct, this)) t(this);
325
+ l(ct, this).clear();
303
326
  }
304
327
  settled() {
305
- return (l(It, this) ?? y(It, this, Ii())).promise;
328
+ return (l(xt, this) ?? w(xt, this, Ni())).promise;
306
329
  }
307
330
  static ensure() {
308
- if ($ === null) {
309
- const t = $ = new Wi();
310
- Kt || (ve.add($), ct || Ze(() => {
311
- $ === t && t.flush();
331
+ if (S === null) {
332
+ const t = S = new Ji();
333
+ tr || (ce.add(S), vt || it(() => {
334
+ S === t && t.flush();
312
335
  }));
313
336
  }
314
- return $;
337
+ return S;
315
338
  }
316
339
  apply() {
317
- if (!Ee || !this.is_fork && ve.size === 1) {
318
- z = null;
340
+ if (!me || !this.is_fork && ce.size === 1) {
341
+ D = null;
319
342
  return;
320
343
  }
321
- z = new Map(this.current);
322
- for (const t of ve)
323
- if (!(t === this || t.is_fork))
324
- for (const [r, i] of t.previous) z.has(r) || z.set(r, i);
344
+ D = /* @__PURE__ */ new Map();
345
+ for (const [i, [n]] of this.current) D.set(i, n);
346
+ for (const i of ce)
347
+ if (!(i === this || i.is_fork)) {
348
+ var t = !1, r = !1;
349
+ if (i.id < this.id) for (const [n, [, o]] of i.current)
350
+ o || (t || (t = this.current.has(n)), r || (r = !this.current.has(n)));
351
+ if (t && r) l(Qe, this).add(i);
352
+ else for (const [n, o] of i.previous) D.has(n) || D.set(n, o);
353
+ }
325
354
  }
326
355
  schedule(t) {
327
- if (sr = t, t.b?.is_pending && t.f & 16777228 && !(t.f & 32768)) {
356
+ if (dr = t, t.b?.is_pending && t.f & 16777228 && !(t.f & 32768)) {
328
357
  t.b.defer_effect(t);
329
358
  return;
330
359
  }
331
360
  for (var r = t; r.parent !== null; ) {
332
361
  r = r.parent;
333
362
  var i = r.f;
334
- if (et !== null && r === k && (Ee || (S === null || !(S.f & 2)) && !Oo))
363
+ if (nt !== null && r === k && (me || (I === null || !(I.f & 2)) && !Wo))
335
364
  return;
336
365
  if (i & 96) {
337
366
  if (!(i & 1024)) return;
338
- r.f ^= K;
367
+ r.f ^= J;
339
368
  }
340
369
  }
341
- l(Q, this).push(r);
370
+ l(te, this).push(r);
342
371
  }
343
372
  };
344
- zi = We;
345
- function Kr() {
346
- return this.is_fork || l(Be, this) > 0;
347
- }
348
- function Fi() {
349
- if (Vi++ > 1e3 && (ve.delete(this), Ro()), !M(ne, this, Kr).call(this)) {
350
- for (const a of l(ft, this))
351
- l(Ne, this).delete(a), R(a, le), this.schedule(a);
352
- for (const a of l(Ne, this))
353
- R(a, Ve), this.schedule(a);
354
- }
355
- const e = l(Q, this);
356
- y(Q, this, []), this.apply();
357
- var t = et = [], r = [], i = Rt = [];
358
- for (const a of e) try {
359
- M(ne, this, Hi).call(this, a, t, r);
360
- } catch (s) {
361
- throw qi(a), s;
373
+ Ki = Ge;
374
+ function pr() {
375
+ return this.is_fork || l(Oe, this).size > 0;
376
+ }
377
+ function Bo() {
378
+ for (const r of l(Qe, this)) for (const i of l(Oe, r).keys()) {
379
+ for (var e = !1, t = i; t.parent !== null; ) {
380
+ if (l(xe, this).has(t)) {
381
+ e = !0;
382
+ break;
383
+ }
384
+ t = t.parent;
385
+ }
386
+ if (!e) return !0;
387
+ }
388
+ return !1;
389
+ }
390
+ function Lr() {
391
+ if (Xi++ > 1e3 && (ce.delete(this), Go()), !$(z, this, pr).call(this)) {
392
+ for (const s of l(ot, this))
393
+ l(ze, this).delete(s), R(s, oe), this.schedule(s);
394
+ for (const s of l(ze, this))
395
+ R(s, Ue), this.schedule(s);
396
+ }
397
+ const e = l(te, this);
398
+ w(te, this, []), this.apply();
399
+ var t = nt = [], r = [], i = Vt = [];
400
+ for (const s of e) try {
401
+ $(z, this, Qi).call(this, s, t, r);
402
+ } catch (a) {
403
+ throw tn(s), a;
362
404
  }
363
- if ($ = null, i.length > 0) {
364
- var n = zi.ensure();
365
- for (const a of i) n.schedule(a);
405
+ if (S = null, i.length > 0) {
406
+ var n = Ki.ensure();
407
+ for (const s of i) n.schedule(s);
366
408
  }
367
- if (et = null, Rt = null, M(ne, this, Kr).call(this)) {
368
- M(ne, this, Xr).call(this, r), M(ne, this, Xr).call(this, t);
369
- for (const [a, s] of l(xe, this)) Gi(a, s);
409
+ if (nt = null, Vt = null, $(z, this, pr).call(this) || $(z, this, Bo).call(this)) {
410
+ $(z, this, vr).call(this, r), $(z, this, vr).call(this, t);
411
+ for (const [s, a] of l(xe, this)) en(s, a);
370
412
  } else {
371
- l(He, this) === 0 && ve.delete(this), l(ft, this).clear(), l(Ne, this).clear();
372
- for (const a of l(Ct, this)) a(this);
373
- l(Ct, this).clear(), Yr = this, Jr(r), Jr(t), Yr = null, l(It, this)?.resolve();
413
+ l(Ce, this).size === 0 && ce.delete(this), l(ot, this).clear(), l(ze, this).clear();
414
+ for (const s of l(Wt, this)) s(this);
415
+ l(Wt, this).clear(), si = this, ai(r), ai(t), si = null, l(xt, this)?.resolve();
374
416
  }
375
- var o = $;
376
- if (l(Q, this).length > 0) {
377
- const a = o ?? (o = this);
378
- l(Q, a).push(...l(Q, this).filter((s) => !l(Q, a).includes(s)));
417
+ var o = S;
418
+ if (l(te, this).length > 0) {
419
+ const s = o ?? (o = this);
420
+ l(te, s).push(...l(te, this).filter((a) => !l(te, s).includes(a)));
379
421
  }
380
- o !== null && (ve.add(o), M(ne, o, Fi).call(o)), ve.has(this) || M(ne, this, Lo).call(this);
422
+ o !== null && (ce.add(o), $(z, o, Lr).call(o)), me && !ce.has(this) && $(z, this, Uo).call(this);
381
423
  }
382
- function Hi(e, t, r) {
383
- e.f ^= K;
424
+ function Qi(e, t, r) {
425
+ e.f ^= J;
384
426
  for (var i = e.first; i !== null; ) {
385
427
  var n = i.f, o = (n & 96) !== 0;
386
428
  if (!(o && n & 1024 || n & 8192 || l(xe, this).has(i)) && i.fn !== null) {
387
- o ? i.f ^= K : n & 4 ? t.push(i) : Ee && n & 16777224 ? r.push(i) : yt(i) && (n & 16 && l(Ne, this).add(i), rt(i));
388
- var a = i.first;
389
- if (a !== null) {
390
- i = a;
429
+ o ? i.f ^= J : n & 4 ? t.push(i) : me && n & 16777224 ? r.push(i) : St(i) && (n & 16 && l(ze, this).add(i), at(i));
430
+ var s = i.first;
431
+ if (s !== null) {
432
+ i = s;
391
433
  continue;
392
434
  }
393
435
  }
394
436
  for (; i !== null; ) {
395
- var s = i.next;
396
- if (s !== null) {
397
- i = s;
437
+ var a = i.next;
438
+ if (a !== null) {
439
+ i = a;
398
440
  break;
399
441
  }
400
442
  i = i.parent;
401
443
  }
402
444
  }
403
445
  }
404
- function Xr(e) {
405
- for (var t = 0; t < e.length; t += 1) Di(e[t], l(ft, this), l(Ne, this));
446
+ function vr(e) {
447
+ for (var t = 0; t < e.length; t += 1) qi(e[t], l(ot, this), l(ze, this));
406
448
  }
407
- function Lo() {
408
- for (const s of ve) {
409
- var e = s.id < this.id, t = [];
410
- for (const [c, h] of this.current) {
411
- if (s.current.has(c)) if (e && h !== s.current.get(c)) s.current.set(c, h);
412
- else continue;
413
- t.push(c);
414
- }
415
- var r = [...s.current.keys()].filter((c) => !this.current.has(c));
416
- if (r.length === 0)
417
- e && s.discard();
449
+ function Uo() {
450
+ for (const f of ce) {
451
+ var e = f.id < this.id, t = [];
452
+ for (const [u, [h, d]] of this.current) {
453
+ if (f.current.has(u)) {
454
+ var r = f.current.get(u)[0];
455
+ if (e && h !== r) f.current.set(u, [h, d]);
456
+ else continue;
457
+ }
458
+ t.push(u);
459
+ }
460
+ var i = [...f.current.keys()].filter((u) => !this.current.has(u));
461
+ if (i.length === 0)
462
+ e && f.discard();
418
463
  else if (t.length > 0) {
419
- s.activate();
420
- var i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
421
- for (var o of t) Bi(o, r, i, n);
422
- if (l(Q, s).length > 0) {
423
- s.apply();
424
- for (var a of l(Q, s)) M(ne, s, Hi).call(s, a, [], []);
425
- y(Q, s, []);
464
+ if (e) for (const u of l(Pt, this)) f.unskip_effect(u, (h) => {
465
+ h.f & 4194320 ? f.schedule(h) : $(z, f, vr).call(f, [h]);
466
+ });
467
+ f.activate();
468
+ var n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
469
+ for (var s of t) Zi(s, i, n, o);
470
+ o = /* @__PURE__ */ new Map();
471
+ var a = [...f.current.keys()].filter((u) => this.current.has(u) ? this.current.get(u)[0] !== u : !0);
472
+ for (const u of l(hr, this)) !(u.f & 155648) && Rr(u, a, o) && (u.f & 4194320 ? (R(u, oe), f.schedule(u)) : l(ot, f).add(u));
473
+ if (l(te, f).length > 0) {
474
+ f.apply();
475
+ for (var c of l(te, f)) $(z, f, Qi).call(f, c, [], []);
476
+ w(te, f, []);
426
477
  }
427
- s.deactivate();
478
+ f.deactivate();
428
479
  }
429
480
  }
481
+ for (const f of ce) l(Qe, f).has(this) && (l(Qe, f).delete(this), l(Qe, f).size === 0 && !$(z, f, pr).call(f) && (f.activate(), $(z, f, Lr).call(f)));
430
482
  }
431
- function ar(e) {
432
- var t = ct;
433
- ct = !0;
483
+ function _r(e) {
484
+ var t = vt;
485
+ vt = !0;
434
486
  try {
435
487
  var r;
436
- for (e && ($ !== null && !$.is_fork && $.flush(), r = e()); ; ) {
437
- if (Eo(), $ === null) return r;
438
- $.flush();
488
+ for (e && (S !== null && !S.is_fork && S.flush(), r = e()); ; ) {
489
+ if (zo(), S === null) return r;
490
+ S.flush();
439
491
  }
440
492
  } finally {
441
- ct = t;
493
+ vt = t;
442
494
  }
443
495
  }
444
- function Ro() {
496
+ function Go() {
445
497
  if (0) {
446
498
  var e;
447
- for (const r of $.current.keys()) for (const [i, n] of r.updated ?? [])
499
+ for (const r of S.current.keys()) for (const [i, n] of r.updated ?? [])
448
500
  var t;
449
501
  }
450
502
  try {
451
- go();
503
+ Ao();
452
504
  } catch (r) {
453
- $e(r, sr);
505
+ Pe(r, dr);
454
506
  }
455
507
  }
456
- var oe = null;
457
- function Jr(e) {
508
+ var ae = null;
509
+ function ai(e) {
458
510
  var t = e.length;
459
511
  if (t !== 0) {
460
512
  for (var r = 0; r < t; ) {
461
513
  var i = e[r++];
462
- if (!(i.f & 24576) && yt(i) && (oe = /* @__PURE__ */ new Set(), rt(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && un(i), oe?.size > 0)) {
463
- Ae.clear();
464
- for (const n of oe) {
514
+ if (!(i.f & 24576) && St(i) && (ae = /* @__PURE__ */ new Set(), at(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && bn(i), ae?.size > 0)) {
515
+ He.clear();
516
+ for (const n of ae) {
465
517
  if (n.f & 24576) continue;
466
518
  const o = [n];
467
- let a = n.parent;
468
- for (; a !== null; )
469
- oe.has(a) && (oe.delete(a), o.push(a)), a = a.parent;
470
- for (let s = o.length - 1; s >= 0; s--) {
471
- const c = o[s];
472
- c.f & 24576 || rt(c);
519
+ let s = n.parent;
520
+ for (; s !== null; )
521
+ ae.has(s) && (ae.delete(s), o.push(s)), s = s.parent;
522
+ for (let a = o.length - 1; a >= 0; a--) {
523
+ const c = o[a];
524
+ c.f & 24576 || at(c);
473
525
  }
474
526
  }
475
- oe.clear();
527
+ ae.clear();
476
528
  }
477
529
  }
478
- oe = null;
530
+ ae = null;
479
531
  }
480
532
  }
481
- function Bi(e, t, r, i) {
533
+ function Zi(e, t, r, i) {
482
534
  if (!r.has(e) && (r.add(e), e.reactions !== null))
483
535
  for (const n of e.reactions) {
484
536
  const o = n.f;
485
- o & 2 ? Bi(n, t, r, i) : o & 4194320 && !(o & 2048) && Ui(n, t, i) && (R(n, le), kr(n));
537
+ o & 2 ? Zi(n, t, r, i) : o & 4194320 && !(o & 2048) && Rr(n, t, i) && (R(n, oe), Cr(n));
486
538
  }
487
539
  }
488
- function Ui(e, t, r) {
540
+ function Rr(e, t, r) {
489
541
  const i = r.get(e);
490
542
  if (i !== void 0) return i;
491
543
  if (e.deps !== null) for (const n of e.deps) {
492
- if (Je.call(t, n)) return !0;
493
- if (n.f & 2 && Ui(n, t, r))
544
+ if (tt.call(t, n)) return !0;
545
+ if (n.f & 2 && Rr(n, t, r))
494
546
  return r.set(n, !0), !0;
495
547
  }
496
548
  return r.set(e, !1), !1;
497
549
  }
498
- function kr(e) {
499
- $.schedule(e);
550
+ function Cr(e) {
551
+ S.schedule(e);
500
552
  }
501
- function Gi(e, t) {
553
+ function en(e, t) {
502
554
  if (!(e.f & 32 && e.f & 1024)) {
503
- e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), R(e, K);
555
+ e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), R(e, J);
504
556
  for (var r = e.first; r !== null; )
505
- Gi(r, t), r = r.next;
557
+ en(r, t), r = r.next;
506
558
  }
507
559
  }
508
- function qi(e) {
509
- R(e, K);
560
+ function tn(e) {
561
+ R(e, J);
510
562
  for (var t = e.first; t !== null; )
511
- qi(t), t = t.next;
563
+ tn(t), t = t.next;
512
564
  }
513
- function Co(e) {
514
- let t = 0, r = gt(0), i;
565
+ function qo(e) {
566
+ let t = 0, r = Tt(0), i;
515
567
  return () => {
516
- Er() && (d(r), Mr(() => (t === 0 && (i = Ft(() => e(() => ut(r)))), t += 1, () => {
517
- Ze(() => {
518
- t -= 1, t === 0 && (i?.(), i = void 0, ut(r));
568
+ Vr() && (p(r), Wr(() => (t === 0 && (i = Yt(() => e(() => _t(r)))), t += 1, () => {
569
+ it(() => {
570
+ t -= 1, t === 0 && (i?.(), i = void 0, _t(r));
519
571
  });
520
572
  })));
521
573
  };
522
574
  }
523
- var No = yr | it;
524
- function Do(e, t, r, i) {
525
- new jo(e, t, r, i);
575
+ var Yo = Mr | lt;
576
+ function Ko(e, t, r, i) {
577
+ new Xo(e, t, r, i);
526
578
  }
527
- var Z = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), cr = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakSet(), jo = class {
579
+ var ie = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), mr = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), li = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakSet(), Xo = class {
528
580
  constructor(e, t, r, i) {
529
- Tr(this, D), g(this, "parent", void 0), g(this, "is_pending", !1), g(this, "transform_error", void 0), T(this, Z, void 0), T(this, Xt, O ? I : null), T(this, Se, void 0), T(this, dt, void 0), T(this, G, void 0), T(this, Ie, null), T(this, ee, null), T(this, he, null), T(this, De, null), T(this, Ue, 0), T(this, je, 0), T(this, St, !1), T(this, lr, /* @__PURE__ */ new Set()), T(this, cr, /* @__PURE__ */ new Set()), T(this, Oe, null), T(this, Qr, Co(() => (y(Oe, this, gt(l(Ue, this))), () => {
530
- y(Oe, this, null);
531
- }))), y(Z, this, e), y(Se, this, t), y(dt, this, (n) => {
581
+ Pr(this, j), g(this, "parent", void 0), g(this, "is_pending", !1), g(this, "transform_error", void 0), y(this, ie, void 0), y(this, gr, O ? A : null), y(this, le, void 0), y(this, gt, void 0), y(this, K, void 0), y(this, fe, null), y(this, B, null), y(this, ee, null), y(this, Ve, null), y(this, Ye, 0), y(this, We, 0), y(this, Mt, !1), y(this, mr, /* @__PURE__ */ new Set()), y(this, br, /* @__PURE__ */ new Set()), y(this, Le, null), y(this, li, qo(() => (w(Le, this, Tt(l(Ye, this))), () => {
582
+ w(Le, this, null);
583
+ }))), w(ie, this, e), w(le, this, t), w(gt, this, (n) => {
532
584
  var o = k;
533
585
  o.b = this, o.f |= 128, r(n);
534
- }), this.parent = k.b, this.transform_error = i ?? this.parent?.transform_error ?? ((n) => n), y(G, this, ln(() => {
586
+ }), this.parent = k.b, this.transform_error = i ?? this.parent?.transform_error ?? ((n) => n), w(K, this, gn(() => {
535
587
  if (O) {
536
- const n = l(Xt, this);
537
- br();
588
+ const n = l(gr, this);
589
+ Or();
538
590
  const o = n.data === "[!";
539
591
  if (n.data.startsWith("[?")) {
540
- const a = JSON.parse(n.data.slice(2));
541
- M(D, this, Vo).call(this, a);
542
- } else o ? M(D, this, Wo).call(this) : M(D, this, zo).call(this);
543
- } else M(D, this, Zr).call(this);
544
- }, No)), O && y(Z, this, I);
592
+ const s = JSON.parse(n.data.slice(2));
593
+ $(j, this, Qo).call(this, s);
594
+ } else o ? $(j, this, Zo).call(this) : $(j, this, Jo).call(this);
595
+ } else $(j, this, rn).call(this);
596
+ }, Yo)), O && w(ie, this, A);
545
597
  }
546
598
  defer_effect(e) {
547
- Di(e, l(lr, this), l(cr, this));
599
+ qi(e, l(mr, this), l(br, this));
548
600
  }
549
601
  is_rendered() {
550
602
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
551
603
  }
552
604
  has_pending_snippet() {
553
- return !!l(Se, this).pending;
605
+ return !!l(le, this).pending;
554
606
  }
555
607
  update_pending_count(e, t) {
556
- M(D, this, Yi).call(this, e, t), y(Ue, this, l(Ue, this) + e), !(!l(Oe, this) || l(St, this)) && (y(St, this, !0), Ze(() => {
557
- y(St, this, !1), l(Oe, this) && Dt(l(Oe, this), l(Ue, this));
608
+ $(j, this, nn).call(this, e, t), w(Ye, this, l(Ye, this) + e), !(!l(Le, this) || l(Mt, this)) && (w(Mt, this, !0), it(() => {
609
+ w(Mt, this, !1), l(Le, this) && Ft(l(Le, this), l(Ye, this));
558
610
  }));
559
611
  }
560
612
  get_effect_pending() {
561
- return l(Qr, this).call(this), d(l(Oe, this));
613
+ return l(li, this).call(this), p(l(Le, this));
562
614
  }
563
615
  error(e) {
564
- var t = l(Se, this).onerror;
565
- let r = l(Se, this).failed;
566
- if (!t && !r) throw e;
567
- l(Ie, this) && (V(l(Ie, this)), y(Ie, this, null)), l(ee, this) && (V(l(ee, this)), y(ee, this, null)), l(he, this) && (V(l(he, this)), y(he, this, null)), O && (re(l(Xt, this)), Ei(), re(Mi()));
568
- var i = !1, n = !1;
569
- const o = () => {
570
- if (i) {
571
- So();
572
- return;
573
- }
574
- i = !0, n && ko(), l(he, this) !== null && mt(l(he, this), () => {
575
- y(he, this, null);
576
- }), M(D, this, ur).call(this, () => {
577
- M(D, this, Zr).call(this);
578
- });
579
- }, a = (s) => {
580
- try {
581
- n = !0, t?.(s, o), n = !1;
582
- } catch (c) {
583
- $e(c, l(G, this) && l(G, this).parent);
584
- }
585
- r && y(he, this, M(D, this, ur).call(this, () => {
586
- try {
587
- return ge(() => {
588
- var c = k;
589
- c.b = this, c.f |= 128, r(l(Z, this), () => s, () => o);
590
- });
591
- } catch (c) {
592
- return $e(c, l(G, this).parent), null;
593
- }
594
- }));
595
- };
596
- Ze(() => {
597
- var s;
598
- try {
599
- s = this.transform_error(e);
600
- } catch (c) {
601
- $e(c, l(G, this) && l(G, this).parent);
602
- return;
603
- }
604
- s !== null && typeof s == "object" && typeof s.then == "function" ? s.then(a, (c) => $e(c, l(G, this) && l(G, this).parent)) : a(s);
605
- });
616
+ if (!l(le, this).onerror && !l(le, this).failed) throw e;
617
+ S?.is_fork ? (l(fe, this) && S.skip_effect(l(fe, this)), l(B, this) && S.skip_effect(l(B, this)), l(ee, this) && S.skip_effect(l(ee, this)), S.on_fork_commit(() => {
618
+ $(j, this, ci).call(this, e);
619
+ })) : $(j, this, ci).call(this, e);
606
620
  }
607
621
  };
608
- function zo() {
622
+ function Jo() {
609
623
  try {
610
- y(Ie, this, ge(() => l(dt, this).call(this, l(Z, this))));
624
+ w(fe, this, ye(() => l(gt, this).call(this, l(ie, this))));
611
625
  } catch (e) {
612
626
  this.error(e);
613
627
  }
614
628
  }
615
- function Vo(e) {
616
- const t = l(Se, this).failed;
617
- t && y(he, this, ge(() => {
618
- t(l(Z, this), () => e, () => () => {
629
+ function Qo(e) {
630
+ const t = l(le, this).failed;
631
+ t && w(ee, this, ye(() => {
632
+ t(l(ie, this), () => e, () => () => {
619
633
  });
620
634
  }));
621
635
  }
622
- function Wo() {
623
- const e = l(Se, this).pending;
624
- e && (this.is_pending = !0, y(ee, this, ge(() => e(l(Z, this)))), Ze(() => {
625
- var t = y(De, this, document.createDocumentFragment()), r = _e();
626
- t.append(r), y(Ie, this, M(D, this, ur).call(this, () => ge(() => l(dt, this).call(this, r)))), l(je, this) === 0 && (l(Z, this).before(t), y(De, this, null), mt(l(ee, this), () => {
627
- y(ee, this, null);
628
- }), M(D, this, Sr).call(this, $));
636
+ function Zo() {
637
+ const e = l(le, this).pending;
638
+ e && (this.is_pending = !0, w(B, this, ye(() => e(l(ie, this)))), it(() => {
639
+ var t = w(Ve, this, document.createDocumentFragment()), r = be();
640
+ t.append(r), w(fe, this, $(j, this, yr).call(this, () => ye(() => l(gt, this).call(this, r)))), l(We, this) === 0 && (l(ie, this).before(t), w(Ve, this, null), kt(l(B, this), () => {
641
+ w(B, this, null);
642
+ }), $(j, this, Nr).call(this, S));
629
643
  }));
630
644
  }
631
- function Zr() {
645
+ function rn() {
632
646
  try {
633
- if (this.is_pending = this.has_pending_snippet(), y(je, this, 0), y(Ue, this, 0), y(Ie, this, ge(() => {
634
- l(dt, this).call(this, l(Z, this));
635
- })), l(je, this) > 0) {
636
- var e = y(De, this, document.createDocumentFragment());
637
- hn(l(Ie, this), e);
638
- const t = l(Se, this).pending;
639
- y(ee, this, ge(() => t(l(Z, this))));
640
- } else M(D, this, Sr).call(this, $);
647
+ if (this.is_pending = this.has_pending_snippet(), w(We, this, 0), w(Ye, this, 0), w(fe, this, ye(() => {
648
+ l(gt, this).call(this, l(ie, this));
649
+ })), l(We, this) > 0) {
650
+ var e = w(Ve, this, document.createDocumentFragment());
651
+ Tn(l(fe, this), e);
652
+ const t = l(le, this).pending;
653
+ w(B, this, ye(() => t(l(ie, this))));
654
+ } else $(j, this, Nr).call(this, S);
641
655
  } catch (t) {
642
656
  this.error(t);
643
657
  }
644
658
  }
645
- function Sr(e) {
646
- this.is_pending = !1, e.transfer_effects(l(lr, this), l(cr, this));
659
+ function Nr(e) {
660
+ this.is_pending = !1, e.transfer_effects(l(mr, this), l(br, this));
647
661
  }
648
- function ur(e) {
649
- var t = k, r = S, i = L;
650
- ae(l(G, this)), X(l(G, this)), Qe(l(G, this).ctx);
662
+ function yr(e) {
663
+ var t = k, r = I, i = L;
664
+ de(l(K, this)), Q(l(K, this)), rt(l(K, this).ctx);
651
665
  try {
652
- return We.ensure(), e();
666
+ return Ge.ensure(), e();
653
667
  } catch (n) {
654
- return Ci(n), null;
668
+ return Ui(n), null;
655
669
  } finally {
656
- ae(t), X(r), Qe(i);
670
+ de(t), Q(r), rt(i);
657
671
  }
658
672
  }
659
- function Yi(e, t) {
673
+ function nn(e, t) {
660
674
  if (!this.has_pending_snippet()) {
661
675
  if (this.parent) {
662
676
  var r;
663
- M(D, r = this.parent, Yi).call(r, e, t);
677
+ $(j, r = this.parent, nn).call(r, e, t);
664
678
  }
665
679
  return;
666
680
  }
667
- y(je, this, l(je, this) + e), l(je, this) === 0 && (M(D, this, Sr).call(this, t), l(ee, this) && mt(l(ee, this), () => {
668
- y(ee, this, null);
669
- }), l(De, this) && (l(Z, this).before(l(De, this)), y(De, this, null)));
681
+ w(We, this, l(We, this) + e), l(We, this) === 0 && ($(j, this, Nr).call(this, t), l(B, this) && kt(l(B, this), () => {
682
+ w(B, this, null);
683
+ }), l(Ve, this) && (l(ie, this).before(l(Ve, this)), w(Ve, this, null)));
684
+ }
685
+ function ci(e) {
686
+ l(fe, this) && (W(l(fe, this)), w(fe, this, null)), l(B, this) && (W(l(B, this)), w(B, this, null)), l(ee, this) && (W(l(ee, this)), w(ee, this, null)), O && (ne(l(gr, this)), Di(), ne(zi()));
687
+ var t = l(le, this).onerror;
688
+ let r = l(le, this).failed;
689
+ var i = !1, n = !1;
690
+ const o = () => {
691
+ if (i) {
692
+ Co();
693
+ return;
694
+ }
695
+ i = !0, n && Lo(), l(ee, this) !== null && kt(l(ee, this), () => {
696
+ w(ee, this, null);
697
+ }), $(j, this, yr).call(this, () => {
698
+ $(j, this, rn).call(this);
699
+ });
700
+ }, s = (a) => {
701
+ try {
702
+ n = !0, t?.(a, o), n = !1;
703
+ } catch (c) {
704
+ Pe(c, l(K, this) && l(K, this).parent);
705
+ }
706
+ r && w(ee, this, $(j, this, yr).call(this, () => {
707
+ try {
708
+ return ye(() => {
709
+ var c = k;
710
+ c.b = this, c.f |= 128, r(l(ie, this), () => a, () => o);
711
+ });
712
+ } catch (c) {
713
+ return Pe(c, l(K, this).parent), null;
714
+ }
715
+ }));
716
+ };
717
+ it(() => {
718
+ var a;
719
+ try {
720
+ a = this.transform_error(e);
721
+ } catch (c) {
722
+ Pe(c, l(K, this) && l(K, this).parent);
723
+ return;
724
+ }
725
+ a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (c) => Pe(c, l(K, this) && l(K, this).parent)) : s(a);
726
+ });
670
727
  }
671
- function Fo(e, t, r, i) {
672
- const n = _t() ? Wt : Xi;
673
- var o = e.filter((f) => !f.settled);
728
+ function es(e, t, r, i) {
729
+ const n = wt() ? qt : sn;
730
+ var o = e.filter((d) => !d.settled);
674
731
  if (r.length === 0 && o.length === 0) {
675
732
  i(t.map(n));
676
733
  return;
677
734
  }
678
- var a = k, s = Ho(), c = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((f) => f.promise)) : null;
679
- function h(f) {
680
- s();
735
+ var s = k, a = ts(), c = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((d) => d.promise)) : null;
736
+ function f(d) {
737
+ a();
681
738
  try {
682
- i(f);
739
+ i(d);
683
740
  } catch (v) {
684
- a.f & 16384 || $e(v, a);
741
+ s.f & 16384 || Pe(v, s);
685
742
  }
686
- Nt();
743
+ Ht();
687
744
  }
688
745
  if (r.length === 0) {
689
- c.then(() => h(t.map(n)));
746
+ c.then(() => f(t.map(n)));
690
747
  return;
691
748
  }
692
- var u = Ki();
693
- function p() {
694
- Promise.all(r.map((f) => /* @__PURE__ */ Bo(f))).then((f) => h([...t.map(n), ...f])).catch((f) => $e(f, a)).finally(() => u());
749
+ var u = on();
750
+ function h() {
751
+ Promise.all(r.map((d) => /* @__PURE__ */ rs(d))).then((d) => f([...t.map(n), ...d])).catch((d) => Pe(d, s)).finally(() => u());
695
752
  }
696
753
  c ? c.then(() => {
697
- s(), p(), Nt();
698
- }) : p();
754
+ a(), h(), Ht();
755
+ }) : h();
699
756
  }
700
- function Ho() {
701
- var e = k, t = S, r = L, i = $;
757
+ function ts() {
758
+ var e = k, t = I, r = L, i = S;
702
759
  if (0) var n;
703
- return function(a = !0) {
704
- ae(e), X(t), Qe(r), a && !(e.f & 16384) && (i?.activate(), i?.apply());
760
+ return function(s = !0) {
761
+ de(e), Q(t), rt(r), s && !(e.f & 16384) && (i?.activate(), i?.apply());
705
762
  };
706
763
  }
707
- function Nt(e = !0) {
708
- ae(null), X(null), Qe(null), e && $?.deactivate();
764
+ function Ht(e = !0) {
765
+ de(null), Q(null), rt(null), e && S?.deactivate();
709
766
  }
710
- function Ki() {
711
- var e = k.b, t = $, r = e.is_rendered();
712
- return e.update_pending_count(1, t), t.increment(r), (i = !1) => {
713
- e.update_pending_count(-1, t), t.decrement(r, i);
767
+ function on() {
768
+ var e = k, t = e.b, r = S, i = t.is_rendered();
769
+ return t.update_pending_count(1, r), r.increment(i, e), (n = !1) => {
770
+ t.update_pending_count(-1, r), r.decrement(i, e, n);
714
771
  };
715
772
  }
716
773
  // @__NO_SIDE_EFFECTS__
717
- function Wt(e) {
718
- var t = 2 | le, r = S !== null && S.f & 2 ? S : null;
719
- return k !== null && (k.f |= it), {
774
+ function qt(e) {
775
+ var t = 2 | oe;
776
+ return k !== null && (k.f |= lt), {
720
777
  ctx: L,
721
778
  deps: null,
722
779
  effects: null,
723
- equals: Oi,
780
+ equals: Vi,
724
781
  f: t,
725
782
  fn: e,
726
783
  reactions: null,
727
784
  rv: 0,
728
785
  v: N,
729
786
  wv: 0,
730
- parent: r ?? k,
787
+ parent: k,
731
788
  ac: null
732
789
  };
733
790
  }
734
791
  // @__NO_SIDE_EFFECTS__
735
- function Bo(e, t, r) {
792
+ function rs(e, t, r) {
736
793
  let i = k;
737
- i === null && ho();
738
- var n = void 0, o = gt(N), a = !S, s = /* @__PURE__ */ new Map();
739
- return ss(() => {
740
- var c = k, h = Ii();
741
- n = h.promise;
794
+ i === null && ko();
795
+ var n = void 0, o = Tt(N), s = !I, a = /* @__PURE__ */ new Map();
796
+ return gs(() => {
797
+ var c = k, f = Ni();
798
+ n = f.promise;
742
799
  try {
743
- Promise.resolve(e()).then(h.resolve, h.reject).finally(Nt);
800
+ Promise.resolve(e()).then(f.resolve, f.reject).finally(Ht);
744
801
  } catch (v) {
745
- h.reject(v), Nt();
802
+ f.reject(v), Ht();
746
803
  }
747
- var u = $;
748
- if (a) {
749
- if (c.f & 32768) var p = Ki();
804
+ var u = S;
805
+ if (s) {
806
+ if (c.f & 32768) var h = on();
750
807
  if (i.b.is_rendered())
751
- s.get(u)?.reject(pe), s.delete(u);
808
+ a.get(u)?.reject(ge), a.delete(u);
752
809
  else {
753
- for (const v of s.values()) v.reject(pe);
754
- s.clear();
810
+ for (const v of a.values()) v.reject(ge);
811
+ a.clear();
755
812
  }
756
- s.set(u, h);
813
+ a.set(u, f);
757
814
  }
758
- const f = (v, _ = void 0) => {
759
- if (p && p(_ === pe), !(_ === pe || c.f & 16384)) {
815
+ const d = (v, _ = void 0) => {
816
+ if (h && h(_ === ge), !(_ === ge || c.f & 16384)) {
760
817
  if (u.activate(), _)
761
- o.f |= Lt, Dt(o, _);
818
+ o.f |= zt, Ft(o, _);
762
819
  else {
763
- o.f & 8388608 && (o.f ^= Lt), Dt(o, v);
764
- for (const [m, b] of s) {
765
- if (s.delete(m), m === u) break;
766
- b.reject(pe);
820
+ o.f & 8388608 && (o.f ^= zt), Ft(o, v);
821
+ for (const [m, b] of a) {
822
+ if (a.delete(m), m === u) break;
823
+ b.reject(ge);
767
824
  }
768
825
  }
769
826
  u.deactivate();
770
827
  }
771
828
  };
772
- h.promise.then(f, (v) => f(null, v || "unknown"));
773
- }), is(() => {
774
- for (const c of s.values()) c.reject(pe);
829
+ f.promise.then(d, (v) => d(null, v || "unknown"));
830
+ }), ps(() => {
831
+ for (const c of a.values()) c.reject(ge);
775
832
  }), new Promise((c) => {
776
- function h(u) {
777
- function p() {
778
- u === n ? c(o) : h(n);
833
+ function f(u) {
834
+ function h() {
835
+ u === n ? c(o) : f(n);
779
836
  }
780
- u.then(p, p);
837
+ u.then(h, h);
781
838
  }
782
- h(n);
839
+ f(n);
783
840
  });
784
841
  }
785
842
  // @__NO_SIDE_EFFECTS__
786
- function ei(e) {
787
- const t = /* @__PURE__ */ Wt(e);
788
- return Ee || pn(t), t;
843
+ function ui(e) {
844
+ const t = /* @__PURE__ */ qt(e);
845
+ return me || kn(t), t;
789
846
  }
790
847
  // @__NO_SIDE_EFFECTS__
791
- function Xi(e) {
792
- const t = /* @__PURE__ */ Wt(e);
793
- return t.equals = Pi, t;
848
+ function sn(e) {
849
+ const t = /* @__PURE__ */ qt(e);
850
+ return t.equals = Wi, t;
794
851
  }
795
- function Uo(e) {
852
+ function is(e) {
796
853
  var t = e.effects;
797
854
  if (t !== null) {
798
855
  e.effects = null;
799
- for (var r = 0; r < t.length; r += 1) V(t[r]);
800
- }
801
- }
802
- function Go(e) {
803
- for (var t = e.parent; t !== null; ) {
804
- if (!(t.f & 2)) return t.f & 16384 ? null : t;
805
- t = t.parent;
856
+ for (var r = 0; r < t.length; r += 1) W(t[r]);
806
857
  }
807
- return null;
808
858
  }
809
- function $r(e) {
810
- var t, r = k;
811
- if (ae(Go(e)), 0)
859
+ function jr(e) {
860
+ var t, r = k, i = e.parent;
861
+ if (!we && i !== null && i.f & 24576)
862
+ return Ro(), e.v;
863
+ if (de(i), 0)
812
864
  try {
813
865
  } finally {
814
866
  }
815
867
  else try {
816
- e.f &= ~pt, Uo(e), t = mn(e);
868
+ e.f &= ~bt, is(e), t = An(e);
817
869
  } finally {
818
- ae(r);
870
+ de(r);
819
871
  }
820
872
  return t;
821
873
  }
822
- function Ji(e) {
823
- var t = e.v, r = $r(e);
824
- if (!e.equals(r) && (e.wv = _n(), (!$?.is_fork || e.deps === null) && (e.v = r, $?.capture(e, t), e.deps === null))) {
825
- R(e, K);
874
+ function an(e) {
875
+ var t = jr(e);
876
+ if (!e.equals(t) && (e.wv = In(), (!S?.is_fork || e.deps === null) && (S !== null ? S.capture(e, t, !0) : e.v = t, e.deps === null))) {
877
+ R(e, J);
826
878
  return;
827
879
  }
828
- Me || (z !== null ? (Er() || $?.is_fork) && z.set(e, r) : wr(e));
880
+ we || (D !== null ? (Vr() || S?.is_fork) && D.set(e, t) : xr(e));
829
881
  }
830
- function qo(e) {
882
+ function ns(e) {
831
883
  if (e.effects !== null)
832
- for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(pe), t.teardown = io, t.ac = null, ht(t, 0), Or(t));
884
+ for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(ge), t.teardown = po, t.ac = null, mt(t, 0), Hr(t));
833
885
  }
834
- function Qi(e) {
886
+ function ln(e) {
835
887
  if (e.effects !== null)
836
- for (const t of e.effects) t.teardown && rt(t);
888
+ for (const t of e.effects) t.teardown && at(t);
837
889
  }
838
- var fr = /* @__PURE__ */ new Set(), Ae = /* @__PURE__ */ new Map();
839
- var Zi = !1;
840
- function gt(e, t) {
890
+ var wr = /* @__PURE__ */ new Set(), He = /* @__PURE__ */ new Map();
891
+ var cn = !1;
892
+ function Tt(e, t) {
841
893
  var r = {
842
894
  f: 0,
843
895
  v: e,
844
896
  reactions: null,
845
- equals: Oi,
897
+ equals: Vi,
846
898
  rv: 0,
847
899
  wv: 0
848
900
  };
849
901
  return r;
850
902
  }
851
903
  // @__NO_SIDE_EFFECTS__
852
- function x(e, t) {
853
- const r = gt(e, t);
854
- return pn(r), r;
904
+ function P(e, t) {
905
+ const r = Tt(e, t);
906
+ return kn(r), r;
855
907
  }
856
908
  // @__NO_SIDE_EFFECTS__
857
- function Yo(e, t = !1, r = !0) {
858
- const i = gt(e);
859
- if (t || (i.equals = Pi), vt && r && L !== null && L.l !== null) {
909
+ function os(e, t = !1, r = !0) {
910
+ const i = Tt(e);
911
+ if (t || (i.equals = Wi), yt && r && L !== null && L.l !== null) {
860
912
  var n;
861
913
  ((n = L.l).s ?? (n.s = [])).push(i);
862
914
  }
863
915
  return i;
864
916
  }
865
- function P(e, t, r = !1) {
866
- S !== null && (!te || S.f & 131072) && _t() && S.f & 4325394 && (Y === null || !Je.call(Y, e)) && To();
867
- let i = r ? se(t) : t;
868
- return Dt(e, i, Rt);
917
+ function x(e, t, r = !1) {
918
+ I !== null && (!re || I.f & 131072) && wt() && I.f & 4325394 && (X === null || !tt.call(X, e)) && Po();
919
+ let i = r ? ue(t) : t;
920
+ return Ft(e, i, Vt);
869
921
  }
870
- function Dt(e, t, r = null) {
922
+ function Ft(e, t, r = null) {
871
923
  if (!e.equals(t)) {
872
- var i = e.v;
873
- Me ? Ae.set(e, t) : Ae.set(e, i), e.v = t;
874
- var n = We.ensure();
875
- if (n.capture(e, i), e.f & 2) {
876
- const o = e;
877
- e.f & 2048 && $r(o), z === null && wr(o);
924
+ He.set(e, we ? t : e.v);
925
+ var i = Ge.ensure();
926
+ if (i.capture(e, t), e.f & 2) {
927
+ const n = e;
928
+ e.f & 2048 && jr(n), D === null && xr(n);
878
929
  }
879
- e.wv = _n(), en(e, le, r), _t() && k !== null && k.f & 1024 && !(k.f & 96) && (q === null ? fs([e]) : q.push(e)), !n.is_fork && fr.size > 0 && !Zi && Ko();
930
+ e.wv = In(), un(e, oe, r), wt() && k !== null && k.f & 1024 && !(k.f & 96) && (Y === null ? Ts([e]) : Y.push(e)), !i.is_fork && wr.size > 0 && !cn && ss();
880
931
  }
881
932
  return t;
882
933
  }
883
- function Ko() {
884
- Zi = !1;
885
- for (const e of fr)
886
- e.f & 1024 && R(e, Ve), yt(e) && rt(e);
887
- fr.clear();
934
+ function ss() {
935
+ cn = !1;
936
+ for (const e of wr)
937
+ e.f & 1024 && R(e, Ue), St(e) && at(e);
938
+ wr.clear();
888
939
  }
889
- function ut(e) {
890
- P(e, e.v + 1);
940
+ function _t(e) {
941
+ x(e, e.v + 1);
891
942
  }
892
- function en(e, t, r) {
943
+ function un(e, t, r) {
893
944
  var i = e.reactions;
894
945
  if (i !== null)
895
- for (var n = _t(), o = i.length, a = 0; a < o; a++) {
896
- var s = i[a], c = s.f;
897
- if (!(!n && s === k)) {
898
- var h = (c & le) === 0;
899
- if (h && R(s, t), c & 2) {
900
- var u = s;
901
- z?.delete(u), c & 65536 || (c & 512 && (s.f |= pt), en(u, Ve, r));
902
- } else if (h) {
903
- var p = s;
904
- c & 16 && oe !== null && oe.add(p), r !== null ? r.push(p) : kr(p);
946
+ for (var n = wt(), o = i.length, s = 0; s < o; s++) {
947
+ var a = i[s], c = a.f;
948
+ if (!(!n && a === k)) {
949
+ var f = (c & oe) === 0;
950
+ if (f && R(a, t), c & 2) {
951
+ var u = a;
952
+ D?.delete(u), c & 65536 || (c & 512 && (a.f |= bt), un(u, Ue, r));
953
+ } else if (f) {
954
+ var h = a;
955
+ c & 16 && ae !== null && ae.add(h), r !== null ? r.push(h) : Cr(h);
905
956
  }
906
957
  }
907
958
  }
908
959
  }
909
- var Xo = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
910
- function se(e) {
911
- if (typeof e != "object" || e === null || lt in e) return e;
912
- const t = $i(e);
913
- if (t !== to && t !== ro) return e;
914
- var r = /* @__PURE__ */ new Map(), i = Jn(e), n = /* @__PURE__ */ x(0), o = null, a = ze, s = (p) => {
915
- if (ze === a) return p();
916
- var f = S, v = ze;
917
- X(null), oi(a);
918
- var _ = p();
919
- return X(f), oi(v), _;
960
+ var as = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
961
+ function ue(e) {
962
+ if (typeof e != "object" || e === null || pt in e) return e;
963
+ const t = Ci(e);
964
+ if (t !== fo && t !== ho) return e;
965
+ var r = /* @__PURE__ */ new Map(), i = ao(e), n = /* @__PURE__ */ P(0), o = null, s = Fe, a = (h) => {
966
+ if (Fe === s) return h();
967
+ var d = I, v = Fe;
968
+ Q(null), vi(s);
969
+ var _ = h();
970
+ return Q(d), vi(v), _;
920
971
  };
921
- i && r.set("length", /* @__PURE__ */ x(e.length, o));
972
+ i && r.set("length", /* @__PURE__ */ P(e.length, o));
922
973
  var c = "";
923
- let h = !1;
924
- function u(p) {
925
- if (!h) {
926
- h = !0, c = p, qr(n, `${c} version`);
927
- for (const [f, v] of r) qr(v, Jo(c, f));
928
- h = !1;
974
+ let f = !1;
975
+ function u(h) {
976
+ if (!f) {
977
+ f = !0, c = h, oi(n, `${c} version`);
978
+ for (const [d, v] of r) oi(v, ls(c, d));
979
+ f = !1;
929
980
  }
930
981
  }
931
982
  return new Proxy(e, {
932
- defineProperty(p, f, v) {
933
- (!("value" in v) || v.configurable === !1 || v.enumerable === !1 || v.writable === !1) && bo();
934
- var _ = r.get(f);
935
- return _ === void 0 ? s(() => {
936
- var m = /* @__PURE__ */ x(v.value, o);
937
- return r.set(f, m), m;
938
- }) : P(_, v.value, !0), !0;
983
+ defineProperty(h, d, v) {
984
+ (!("value" in v) || v.configurable === !1 || v.enumerable === !1 || v.writable === !1) && Oo();
985
+ var _ = r.get(d);
986
+ return _ === void 0 ? a(() => {
987
+ var m = /* @__PURE__ */ P(v.value, o);
988
+ return r.set(d, m), m;
989
+ }) : x(_, v.value, !0), !0;
939
990
  },
940
- deleteProperty(p, f) {
941
- var v = r.get(f);
991
+ deleteProperty(h, d) {
992
+ var v = r.get(d);
942
993
  if (v === void 0) {
943
- if (f in p) {
944
- const _ = s(() => /* @__PURE__ */ x(N, o));
945
- r.set(f, _), ut(n);
994
+ if (d in h) {
995
+ const _ = a(() => /* @__PURE__ */ P(N, o));
996
+ r.set(d, _), _t(n);
946
997
  }
947
998
  } else
948
- P(v, N), ut(n);
999
+ x(v, N), _t(n);
949
1000
  return !0;
950
1001
  },
951
- get(p, f, v) {
952
- if (f === lt) return e;
953
- var _ = r.get(f), m = f in p;
954
- if (_ === void 0 && (!m || Ce(p, f)?.writable) && (_ = s(() => {
955
- var A = /* @__PURE__ */ x(se(m ? p[f] : N), o);
956
- return A;
957
- }), r.set(f, _)), _ !== void 0) {
958
- var b = d(_);
1002
+ get(h, d, v) {
1003
+ if (d === pt) return e;
1004
+ var _ = r.get(d), m = d in h;
1005
+ if (_ === void 0 && (!m || De(h, d)?.writable) && (_ = a(() => {
1006
+ var E = /* @__PURE__ */ P(ue(m ? h[d] : N), o);
1007
+ return E;
1008
+ }), r.set(d, _)), _ !== void 0) {
1009
+ var b = p(_);
959
1010
  return b === N ? void 0 : b;
960
1011
  }
961
- return Reflect.get(p, f, v);
1012
+ return Reflect.get(h, d, v);
962
1013
  },
963
- getOwnPropertyDescriptor(p, f) {
964
- var v = Reflect.getOwnPropertyDescriptor(p, f);
1014
+ getOwnPropertyDescriptor(h, d) {
1015
+ var v = Reflect.getOwnPropertyDescriptor(h, d);
965
1016
  if (v && "value" in v) {
966
- var _ = r.get(f);
967
- _ && (v.value = d(_));
1017
+ var _ = r.get(d);
1018
+ _ && (v.value = p(_));
968
1019
  } else if (v === void 0) {
969
- var m = r.get(f), b = m?.v;
1020
+ var m = r.get(d), b = m?.v;
970
1021
  if (m !== void 0 && b !== N) return {
971
1022
  enumerable: !0,
972
1023
  configurable: !0,
@@ -976,151 +1027,151 @@ function se(e) {
976
1027
  }
977
1028
  return v;
978
1029
  },
979
- has(p, f) {
980
- if (f === lt) return !0;
981
- var v = r.get(f), _ = v !== void 0 && v.v !== N || Reflect.has(p, f);
982
- return (v !== void 0 || k !== null && (!_ || Ce(p, f)?.writable)) && (v === void 0 && (v = s(() => {
983
- var m = /* @__PURE__ */ x(_ ? se(p[f]) : N, o);
1030
+ has(h, d) {
1031
+ if (d === pt) return !0;
1032
+ var v = r.get(d), _ = v !== void 0 && v.v !== N || Reflect.has(h, d);
1033
+ return (v !== void 0 || k !== null && (!_ || De(h, d)?.writable)) && (v === void 0 && (v = a(() => {
1034
+ var m = /* @__PURE__ */ P(_ ? ue(h[d]) : N, o);
984
1035
  return m;
985
- }), r.set(f, v)), d(v) === N) ? !1 : _;
1036
+ }), r.set(d, v)), p(v) === N) ? !1 : _;
986
1037
  },
987
- set(p, f, v, _) {
988
- var m = r.get(f), b = f in p;
989
- if (i && f === "length") for (var A = v; A < m.v; A += 1) {
990
- var H = r.get(A + "");
991
- H !== void 0 ? P(H, N) : A in p && (H = s(() => /* @__PURE__ */ x(N, o)), r.set(A + "", H));
1038
+ set(h, d, v, _) {
1039
+ var m = r.get(d), b = d in h;
1040
+ if (i && d === "length") for (var E = v; E < m.v; E += 1) {
1041
+ var U = r.get(E + "");
1042
+ U !== void 0 ? x(U, N) : E in h && (U = a(() => /* @__PURE__ */ P(N, o)), r.set(E + "", U));
992
1043
  }
993
1044
  if (m === void 0)
994
- (!b || Ce(p, f)?.writable) && (m = s(() => /* @__PURE__ */ x(void 0, o)), P(m, se(v)), r.set(f, m));
1045
+ (!b || De(h, d)?.writable) && (m = a(() => /* @__PURE__ */ P(void 0, o)), x(m, ue(v)), r.set(d, m));
995
1046
  else {
996
1047
  b = m.v !== N;
997
- var E = s(() => se(v));
998
- P(m, E);
1048
+ var M = a(() => ue(v));
1049
+ x(m, M);
999
1050
  }
1000
- var B = Reflect.getOwnPropertyDescriptor(p, f);
1001
- if (B?.set && B.set.call(_, v), !b) {
1002
- if (i && typeof f == "string") {
1003
- var we = r.get("length"), W = Number(f);
1004
- Number.isInteger(W) && W >= we.v && P(we, W + 1);
1051
+ var G = Reflect.getOwnPropertyDescriptor(h, d);
1052
+ if (G?.set && G.set.call(_, v), !b) {
1053
+ if (i && typeof d == "string") {
1054
+ var Ie = r.get("length"), H = Number(d);
1055
+ Number.isInteger(H) && H >= Ie.v && x(Ie, H + 1);
1005
1056
  }
1006
- ut(n);
1057
+ _t(n);
1007
1058
  }
1008
1059
  return !0;
1009
1060
  },
1010
- ownKeys(p) {
1011
- d(n);
1012
- var f = Reflect.ownKeys(p).filter((m) => {
1061
+ ownKeys(h) {
1062
+ p(n);
1063
+ var d = Reflect.ownKeys(h).filter((m) => {
1013
1064
  var b = r.get(m);
1014
1065
  return b === void 0 || b.v !== N;
1015
1066
  });
1016
- for (var [v, _] of r) _.v !== N && !(v in p) && f.push(v);
1017
- return f;
1067
+ for (var [v, _] of r) _.v !== N && !(v in h) && d.push(v);
1068
+ return d;
1018
1069
  },
1019
1070
  setPrototypeOf() {
1020
- wo();
1071
+ xo();
1021
1072
  }
1022
1073
  });
1023
1074
  }
1024
- function Jo(e, t) {
1025
- return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Xo.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1075
+ function ls(e, t) {
1076
+ return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : as.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1026
1077
  }
1027
- var ti, Qo, tn, rn, nn;
1028
- function dr() {
1029
- if (ti === void 0) {
1030
- ti = window, Qo = document, tn = /Firefox/.test(navigator.userAgent);
1078
+ var fi, cs, fn, dn, hn;
1079
+ function Tr() {
1080
+ if (fi === void 0) {
1081
+ fi = window, cs = document, fn = /Firefox/.test(navigator.userAgent);
1031
1082
  var e = Element.prototype, t = Node.prototype, r = Text.prototype;
1032
- rn = Ce(t, "firstChild").get, nn = Ce(t, "nextSibling").get, Hr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Hr(r) && (r.__t = void 0);
1083
+ dn = De(t, "firstChild").get, hn = De(t, "nextSibling").get, ti(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), ti(r) && (r.__t = void 0);
1033
1084
  }
1034
1085
  }
1035
- function _e(e = "") {
1086
+ function be(e = "") {
1036
1087
  return document.createTextNode(e);
1037
1088
  }
1038
1089
  // @__NO_SIDE_EFFECTS__
1039
- function tt(e) {
1040
- return rn.call(e);
1090
+ function st(e) {
1091
+ return dn.call(e);
1041
1092
  }
1042
1093
  // @__NO_SIDE_EFFECTS__
1043
- function me(e) {
1044
- return nn.call(e);
1094
+ function Te(e) {
1095
+ return hn.call(e);
1045
1096
  }
1046
- function ri(e, t) {
1047
- if (!O) return /* @__PURE__ */ tt(e);
1048
- var r = /* @__PURE__ */ tt(I);
1049
- if (r === null) r = I.appendChild(_e());
1097
+ function di(e, t) {
1098
+ if (!O) return /* @__PURE__ */ st(e);
1099
+ var r = /* @__PURE__ */ st(A);
1100
+ if (r === null) r = A.appendChild(be());
1050
1101
  else if (t && r.nodeType !== 3) {
1051
- var i = _e();
1052
- return r?.before(i), re(i), i;
1102
+ var i = be();
1103
+ return r?.before(i), ne(i), i;
1053
1104
  }
1054
- return t && Ar(r), re(r), r;
1105
+ return t && zr(r), ne(r), r;
1055
1106
  }
1056
- function Jt(e, t = !1) {
1107
+ function rr(e, t = !1) {
1057
1108
  if (!O) {
1058
- var r = /* @__PURE__ */ tt(e);
1059
- return r instanceof Comment && r.data === "" ? /* @__PURE__ */ me(r) : r;
1109
+ var r = /* @__PURE__ */ st(e);
1110
+ return r instanceof Comment && r.data === "" ? /* @__PURE__ */ Te(r) : r;
1060
1111
  }
1061
1112
  if (t) {
1062
- if (I?.nodeType !== 3) {
1063
- var i = _e();
1064
- return I?.before(i), re(i), i;
1113
+ if (A?.nodeType !== 3) {
1114
+ var i = be();
1115
+ return A?.before(i), ne(i), i;
1065
1116
  }
1066
- Ar(I);
1117
+ zr(A);
1067
1118
  }
1068
- return I;
1119
+ return A;
1069
1120
  }
1070
- function nt(e, t = 1, r = !1) {
1071
- let i = O ? I : e;
1121
+ function ut(e, t = 1, r = !1) {
1122
+ let i = O ? A : e;
1072
1123
  for (var n; t--; )
1073
- n = i, i = /* @__PURE__ */ me(i);
1124
+ n = i, i = /* @__PURE__ */ Te(i);
1074
1125
  if (!O) return i;
1075
1126
  if (r) {
1076
1127
  if (i?.nodeType !== 3) {
1077
- var o = _e();
1078
- return i === null ? n?.after(o) : i.before(o), re(o), o;
1128
+ var o = be();
1129
+ return i === null ? n?.after(o) : i.before(o), ne(o), o;
1079
1130
  }
1080
- Ar(i);
1131
+ zr(i);
1081
1132
  }
1082
- return re(i), i;
1133
+ return ne(i), i;
1083
1134
  }
1084
- function Zo(e) {
1135
+ function us(e) {
1085
1136
  e.textContent = "";
1086
1137
  }
1087
- function es() {
1088
- return !Ee || oe !== null ? !1 : (k.f & mr) !== 0;
1138
+ function fs() {
1139
+ return !me || ae !== null ? !1 : (k.f & Er) !== 0;
1089
1140
  }
1090
- function Ir(e, t, r) {
1141
+ function Dr(e, t, r) {
1091
1142
  let i = r ? { is: r } : void 0;
1092
1143
  return document.createElementNS(t ?? "http://www.w3.org/1999/xhtml", e, i);
1093
1144
  }
1094
- function Ar(e) {
1145
+ function zr(e) {
1095
1146
  if (e.nodeValue.length < 65536) return;
1096
1147
  let t = e.nextSibling;
1097
1148
  for (; t !== null && t.nodeType === 3; )
1098
1149
  t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1099
1150
  }
1100
- function on(e) {
1101
- var t = S, r = k;
1102
- X(null), ae(null);
1151
+ function pn(e) {
1152
+ var t = I, r = k;
1153
+ Q(null), de(null);
1103
1154
  try {
1104
1155
  return e();
1105
1156
  } finally {
1106
- X(t), ae(r);
1157
+ Q(t), de(r);
1107
1158
  }
1108
1159
  }
1109
- function ts(e) {
1110
- k === null && (S === null && _o(e), vo()), Me && po(e);
1160
+ function ds(e) {
1161
+ k === null && (I === null && $o(e), Io()), we && So(e);
1111
1162
  }
1112
- function rs(e, t) {
1163
+ function hs(e, t) {
1113
1164
  var r = t.last;
1114
1165
  r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
1115
1166
  }
1116
- function ce(e, t) {
1167
+ function he(e, t) {
1117
1168
  var r = k;
1118
- r !== null && r.f & 8192 && (e |= gr);
1169
+ r !== null && r.f & 8192 && (e |= Ar);
1119
1170
  var i = {
1120
1171
  ctx: L,
1121
1172
  deps: null,
1122
1173
  nodes: null,
1123
- f: e | le | 512,
1174
+ f: e | oe | 512,
1124
1175
  first: null,
1125
1176
  fn: t,
1126
1177
  last: null,
@@ -1131,405 +1182,411 @@ function ce(e, t) {
1131
1182
  teardown: null,
1132
1183
  wv: 0,
1133
1184
  ac: null
1134
- }, n = i;
1135
- if (e & 4) et !== null ? et.push(i) : We.ensure().schedule(i);
1185
+ };
1186
+ S?.register_created_effect(i);
1187
+ var n = i;
1188
+ if (e & 4) nt !== null ? nt.push(i) : Ge.ensure().schedule(i);
1136
1189
  else if (t !== null) {
1137
1190
  try {
1138
- rt(i);
1139
- } catch (a) {
1140
- throw V(i), a;
1191
+ at(i);
1192
+ } catch (s) {
1193
+ throw W(i), s;
1141
1194
  }
1142
- n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && !(n.f & 524288) && (n = n.first, e & 16 && e & 65536 && n !== null && (n.f |= yr));
1195
+ n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && !(n.f & 524288) && (n = n.first, e & 16 && e & 65536 && n !== null && (n.f |= Mr));
1143
1196
  }
1144
- if (n !== null && (n.parent = r, r !== null && rs(n, r), S !== null && S.f & 2 && !(e & 64))) {
1145
- var o = S;
1197
+ if (n !== null && (n.parent = r, r !== null && hs(n, r), I !== null && I.f & 2 && !(e & 64))) {
1198
+ var o = I;
1146
1199
  (o.effects ?? (o.effects = [])).push(n);
1147
1200
  }
1148
1201
  return i;
1149
1202
  }
1150
- function Er() {
1151
- return S !== null && !te;
1203
+ function Vr() {
1204
+ return I !== null && !re;
1152
1205
  }
1153
- function is(e) {
1154
- const t = ce(8, null);
1155
- return R(t, K), t.teardown = e, t;
1206
+ function ps(e) {
1207
+ const t = he(8, null);
1208
+ return R(t, J), t.teardown = e, t;
1156
1209
  }
1157
- function at(e) {
1158
- ts("$effect");
1210
+ function ht(e) {
1211
+ ds("$effect");
1159
1212
  var t = k.f;
1160
- if (!S && t & 32 && !(t & 32768)) {
1213
+ if (!I && t & 32 && !(t & 32768)) {
1161
1214
  var r = L;
1162
1215
  (r.e ?? (r.e = [])).push(e);
1163
- } else return sn(e);
1216
+ } else return vn(e);
1164
1217
  }
1165
- function sn(e) {
1166
- return ce(4 | so, e);
1218
+ function vn(e) {
1219
+ return he(4 | go, e);
1167
1220
  }
1168
- function ns(e) {
1169
- We.ensure();
1170
- const t = ce(64 | it, e);
1221
+ function vs(e) {
1222
+ Ge.ensure();
1223
+ const t = he(64 | lt, e);
1171
1224
  return () => {
1172
- V(t);
1225
+ W(t);
1173
1226
  };
1174
1227
  }
1175
- function os(e) {
1176
- We.ensure();
1177
- const t = ce(64 | it, e);
1228
+ function _s(e) {
1229
+ Ge.ensure();
1230
+ const t = he(64 | lt, e);
1178
1231
  return (r = {}) => new Promise((i) => {
1179
- r.outro ? mt(t, () => {
1180
- V(t), i(void 0);
1181
- }) : (V(t), i(void 0));
1232
+ r.outro ? kt(t, () => {
1233
+ W(t), i(void 0);
1234
+ }) : (W(t), i(void 0));
1182
1235
  });
1183
1236
  }
1184
- function an(e) {
1185
- return ce(4, e);
1237
+ function _n(e) {
1238
+ return he(4, e);
1186
1239
  }
1187
- function ss(e) {
1188
- return ce(ao | it, e);
1240
+ function gs(e) {
1241
+ return he(mo | lt, e);
1189
1242
  }
1190
- function Mr(e, t = 0) {
1191
- return ce(8 | t, e);
1243
+ function Wr(e, t = 0) {
1244
+ return he(8 | t, e);
1192
1245
  }
1193
- function ii(e, t = [], r = [], i = []) {
1194
- Fo(i, t, r, (n) => {
1195
- ce(8, () => e(...n.map(d)));
1246
+ function hi(e, t = [], r = [], i = []) {
1247
+ es(i, t, r, (n) => {
1248
+ he(8, () => e(...n.map(p)));
1196
1249
  });
1197
1250
  }
1198
- function ln(e, t = 0) {
1199
- var r = ce(16 | t, e);
1251
+ function gn(e, t = 0) {
1252
+ var r = he(16 | t, e);
1200
1253
  return r;
1201
1254
  }
1202
- function ge(e) {
1203
- return ce(32 | it, e);
1255
+ function ye(e) {
1256
+ return he(32 | lt, e);
1204
1257
  }
1205
- function cn(e) {
1258
+ function mn(e) {
1206
1259
  var t = e.teardown;
1207
1260
  if (t !== null) {
1208
- const r = Me, i = S;
1209
- ni(!0), X(null);
1261
+ const r = we, i = I;
1262
+ pi(!0), Q(null);
1210
1263
  try {
1211
1264
  t.call(null);
1212
1265
  } finally {
1213
- ni(r), X(i);
1266
+ pi(r), Q(i);
1214
1267
  }
1215
1268
  }
1216
1269
  }
1217
- function Or(e, t = !1) {
1270
+ function Hr(e, t = !1) {
1218
1271
  var r = e.first;
1219
1272
  for (e.first = e.last = null; r !== null; ) {
1220
1273
  const n = r.ac;
1221
- n !== null && on(() => {
1222
- n.abort(pe);
1274
+ n !== null && pn(() => {
1275
+ n.abort(ge);
1223
1276
  });
1224
1277
  var i = r.next;
1225
- r.f & 64 ? r.parent = null : V(r, t), r = i;
1278
+ r.f & 64 ? r.parent = null : W(r, t), r = i;
1226
1279
  }
1227
1280
  }
1228
- function as(e) {
1281
+ function ms(e) {
1229
1282
  for (var t = e.first; t !== null; ) {
1230
1283
  var r = t.next;
1231
- t.f & 32 || V(t), t = r;
1284
+ t.f & 32 || W(t), t = r;
1232
1285
  }
1233
1286
  }
1234
- function V(e, t = !0) {
1287
+ function W(e, t = !0) {
1235
1288
  var r = !1;
1236
- (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (ls(e.nodes.start, e.nodes.end), r = !0), R(e, Br), Or(e, t && !r), ht(e, 0);
1289
+ (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (bs(e.nodes.start, e.nodes.end), r = !0), R(e, ri), Hr(e, t && !r), mt(e, 0);
1237
1290
  var i = e.nodes && e.nodes.t;
1238
1291
  if (i !== null) for (const o of i) o.stop();
1239
- cn(e), e.f ^= Br, e.f |= oo;
1292
+ mn(e), e.f ^= ri, e.f |= _o;
1240
1293
  var n = e.parent;
1241
- n !== null && n.first !== null && un(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1294
+ n !== null && n.first !== null && bn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1242
1295
  }
1243
- function ls(e, t) {
1296
+ function bs(e, t) {
1244
1297
  for (; e !== null; ) {
1245
- var r = e === t ? null : /* @__PURE__ */ me(e);
1298
+ var r = e === t ? null : /* @__PURE__ */ Te(e);
1246
1299
  e.remove(), e = r;
1247
1300
  }
1248
1301
  }
1249
- function un(e) {
1302
+ function bn(e) {
1250
1303
  var t = e.parent, r = e.prev, i = e.next;
1251
1304
  r !== null && (r.next = i), i !== null && (i.prev = r), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = r));
1252
1305
  }
1253
- function mt(e, t, r = !0) {
1306
+ function kt(e, t, r = !0) {
1254
1307
  var i = [];
1255
- fn(e, i, !0);
1308
+ yn(e, i, !0);
1256
1309
  var n = () => {
1257
- r && V(e), t && t();
1310
+ r && W(e), t && t();
1258
1311
  }, o = i.length;
1259
1312
  if (o > 0) {
1260
- var a = () => --o || n();
1261
- for (var s of i) s.out(a);
1313
+ var s = () => --o || n();
1314
+ for (var a of i) a.out(s);
1262
1315
  } else n();
1263
1316
  }
1264
- function fn(e, t, r) {
1317
+ function yn(e, t, r) {
1265
1318
  if (!(e.f & 8192)) {
1266
- e.f ^= gr;
1319
+ e.f ^= Ar;
1267
1320
  var i = e.nodes && e.nodes.t;
1268
1321
  if (i !== null)
1269
- for (const s of i) (s.is_global || r) && t.push(s);
1322
+ for (const a of i) (a.is_global || r) && t.push(a);
1270
1323
  for (var n = e.first; n !== null; ) {
1271
- var o = n.next, a = (n.f & 65536) !== 0 || (n.f & 32) !== 0 && (e.f & 16) !== 0;
1272
- fn(n, t, a ? r : !1), n = o;
1324
+ var o = n.next;
1325
+ if (!(n.f & 64)) {
1326
+ var s = (n.f & 65536) !== 0 || (n.f & 32) !== 0 && (e.f & 16) !== 0;
1327
+ yn(n, t, s ? r : !1);
1328
+ }
1329
+ n = o;
1273
1330
  }
1274
1331
  }
1275
1332
  }
1276
- function cs(e) {
1277
- dn(e, !0);
1333
+ function ys(e) {
1334
+ wn(e, !0);
1278
1335
  }
1279
- function dn(e, t) {
1336
+ function wn(e, t) {
1280
1337
  if (e.f & 8192) {
1281
- e.f ^= gr, e.f & 1024 || (R(e, le), We.ensure().schedule(e));
1338
+ e.f ^= Ar, e.f & 1024 || (R(e, oe), Ge.ensure().schedule(e));
1282
1339
  for (var r = e.first; r !== null; ) {
1283
1340
  var i = r.next, n = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
1284
- dn(r, n ? t : !1), r = i;
1341
+ wn(r, n ? t : !1), r = i;
1285
1342
  }
1286
1343
  var o = e.nodes && e.nodes.t;
1287
1344
  if (o !== null)
1288
- for (const a of o) (a.is_global || t) && a.in();
1345
+ for (const s of o) (s.is_global || t) && s.in();
1289
1346
  }
1290
1347
  }
1291
- function hn(e, t) {
1348
+ function Tn(e, t) {
1292
1349
  if (e.nodes)
1293
1350
  for (var r = e.nodes.start, i = e.nodes.end; r !== null; ) {
1294
- var n = r === i ? null : /* @__PURE__ */ me(r);
1351
+ var n = r === i ? null : /* @__PURE__ */ Te(r);
1295
1352
  t.append(r), r = n;
1296
1353
  }
1297
1354
  }
1298
- var us = null, At = !1, Me = !1;
1299
- function ni(e) {
1300
- Me = e;
1355
+ var ws = null, Lt = !1, we = !1;
1356
+ function pi(e) {
1357
+ we = e;
1301
1358
  }
1302
- var S = null, te = !1;
1303
- function X(e) {
1304
- S = e;
1359
+ var I = null, re = !1;
1360
+ function Q(e) {
1361
+ I = e;
1305
1362
  }
1306
1363
  var k = null;
1307
- function ae(e) {
1364
+ function de(e) {
1308
1365
  k = e;
1309
1366
  }
1310
- var Y = null;
1311
- function pn(e) {
1312
- S !== null && (!Ee || S.f & 2) && (Y === null ? Y = [e] : Y.push(e));
1367
+ var X = null;
1368
+ function kn(e) {
1369
+ I !== null && (!me || I.f & 2) && (X === null ? X = [e] : X.push(e));
1313
1370
  }
1314
- var j = null, F = 0, q = null;
1315
- function fs(e) {
1316
- q = e;
1371
+ var V = null, F = 0, Y = null;
1372
+ function Ts(e) {
1373
+ Y = e;
1317
1374
  }
1318
- var vn = 1, Re = 0, ze = Re;
1319
- function oi(e) {
1320
- ze = e;
1375
+ var Sn = 1, je = 0, Fe = je;
1376
+ function vi(e) {
1377
+ Fe = e;
1321
1378
  }
1322
- function _n() {
1323
- return ++vn;
1379
+ function In() {
1380
+ return ++Sn;
1324
1381
  }
1325
- function yt(e) {
1382
+ function St(e) {
1326
1383
  var t = e.f;
1327
1384
  if (t & 2048) return !0;
1328
- if (t & 2 && (e.f &= ~pt), t & 4096) {
1385
+ if (t & 2 && (e.f &= ~bt), t & 4096) {
1329
1386
  for (var r = e.deps, i = r.length, n = 0; n < i; n++) {
1330
1387
  var o = r[n];
1331
- if (yt(o) && Ji(o), o.wv > e.wv) return !0;
1388
+ if (St(o) && an(o), o.wv > e.wv) return !0;
1332
1389
  }
1333
- t & 512 && z === null && R(e, K);
1390
+ t & 512 && D === null && R(e, J);
1334
1391
  }
1335
1392
  return !1;
1336
1393
  }
1337
- function gn(e, t, r = !0) {
1394
+ function $n(e, t, r = !0) {
1338
1395
  var i = e.reactions;
1339
- if (i !== null && !(!Ee && Y !== null && Je.call(Y, e)))
1396
+ if (i !== null && !(!me && X !== null && tt.call(X, e)))
1340
1397
  for (var n = 0; n < i.length; n++) {
1341
1398
  var o = i[n];
1342
- o.f & 2 ? gn(o, t, !1) : t === o && (r ? R(o, le) : o.f & 1024 && R(o, Ve), kr(o));
1399
+ o.f & 2 ? $n(o, t, !1) : t === o && (r ? R(o, oe) : o.f & 1024 && R(o, Ue), Cr(o));
1343
1400
  }
1344
1401
  }
1345
- function mn(e) {
1346
- var t = j, r = F, i = q, n = S, o = Y, a = L, s = te, c = ze, h = e.f;
1347
- j = null, F = 0, q = null, S = h & 96 ? null : e, Y = null, Qe(e.ctx), te = !1, ze = ++Re, e.ac !== null && (on(() => {
1348
- e.ac.abort(pe);
1402
+ function An(e) {
1403
+ var t = V, r = F, i = Y, n = I, o = X, s = L, a = re, c = Fe, f = e.f;
1404
+ V = null, F = 0, Y = null, I = f & 96 ? null : e, X = null, rt(e.ctx), re = !1, Fe = ++je, e.ac !== null && (pn(() => {
1405
+ e.ac.abort(ge);
1349
1406
  }), e.ac = null);
1350
1407
  try {
1351
- e.f |= Ur;
1352
- var u = e.fn, p = u();
1353
- e.f |= mr;
1354
- var f = e.deps, v = $?.is_fork;
1355
- if (j !== null) {
1408
+ e.f |= ii;
1409
+ var u = e.fn, h = u();
1410
+ e.f |= Er;
1411
+ var d = e.deps, v = S?.is_fork;
1412
+ if (V !== null) {
1356
1413
  var _;
1357
- if (v || ht(e, F), f !== null && F > 0)
1358
- for (f.length = F + j.length, _ = 0; _ < j.length; _++) f[F + _] = j[_];
1359
- else e.deps = f = j;
1360
- if (Er() && e.f & 512) for (_ = F; _ < f.length; _++) {
1414
+ if (v || mt(e, F), d !== null && F > 0)
1415
+ for (d.length = F + V.length, _ = 0; _ < V.length; _++) d[F + _] = V[_];
1416
+ else e.deps = d = V;
1417
+ if (Vr() && e.f & 512) for (_ = F; _ < d.length; _++) {
1361
1418
  var m;
1362
- ((m = f[_]).reactions ?? (m.reactions = [])).push(e);
1419
+ ((m = d[_]).reactions ?? (m.reactions = [])).push(e);
1363
1420
  }
1364
- } else !v && f !== null && F < f.length && (ht(e, F), f.length = F);
1365
- if (_t() && q !== null && !te && f !== null && !(e.f & 6146)) for (_ = 0; _ < q.length; _++) gn(q[_], e);
1421
+ } else !v && d !== null && F < d.length && (mt(e, F), d.length = F);
1422
+ if (wt() && Y !== null && !re && d !== null && !(e.f & 6146)) for (_ = 0; _ < Y.length; _++) $n(Y[_], e);
1366
1423
  if (n !== null && n !== e) {
1367
- if (Re++, n.deps !== null) for (let b = 0; b < r; b += 1) n.deps[b].rv = Re;
1368
- if (t !== null) for (const b of t) b.rv = Re;
1369
- q !== null && (i === null ? i = q : i.push(...q));
1424
+ if (je++, n.deps !== null) for (let b = 0; b < r; b += 1) n.deps[b].rv = je;
1425
+ if (t !== null) for (const b of t) b.rv = je;
1426
+ Y !== null && (i === null ? i = Y : i.push(...Y));
1370
1427
  }
1371
- return e.f & 8388608 && (e.f ^= Lt), p;
1428
+ return e.f & 8388608 && (e.f ^= zt), h;
1372
1429
  } catch (b) {
1373
- return Ci(b);
1430
+ return Ui(b);
1374
1431
  } finally {
1375
- e.f ^= Ur, j = t, F = r, q = i, S = n, Y = o, Qe(a), te = s, ze = c;
1432
+ e.f ^= ii, V = t, F = r, Y = i, I = n, X = o, rt(s), re = a, Fe = c;
1376
1433
  }
1377
1434
  }
1378
- function ds(e, t) {
1435
+ function ks(e, t) {
1379
1436
  let r = t.reactions;
1380
1437
  if (r !== null) {
1381
- var i = Qn.call(r, e);
1438
+ var i = lo.call(r, e);
1382
1439
  if (i !== -1) {
1383
1440
  var n = r.length - 1;
1384
1441
  n === 0 ? r = t.reactions = null : (r[i] = r[n], r.pop());
1385
1442
  }
1386
1443
  }
1387
- if (r === null && t.f & 2 && (j === null || !Je.call(j, t))) {
1444
+ if (r === null && t.f & 2 && (V === null || !tt.call(V, t))) {
1388
1445
  var o = t;
1389
- o.f & 512 && (o.f ^= 512, o.f &= ~pt), wr(o), qo(o), ht(o, 0);
1446
+ o.f & 512 && (o.f ^= 512, o.f &= ~bt), o.v !== N && xr(o), ns(o), mt(o, 0);
1390
1447
  }
1391
1448
  }
1392
- function ht(e, t) {
1449
+ function mt(e, t) {
1393
1450
  var r = e.deps;
1394
1451
  if (r !== null)
1395
- for (var i = t; i < r.length; i++) ds(e, r[i]);
1452
+ for (var i = t; i < r.length; i++) ks(e, r[i]);
1396
1453
  }
1397
- function rt(e) {
1454
+ function at(e) {
1398
1455
  var t = e.f;
1399
1456
  if (!(t & 16384)) {
1400
- R(e, K);
1401
- var r = k, i = At;
1402
- if (k = e, At = !0, 0)
1457
+ R(e, J);
1458
+ var r = k, i = Lt;
1459
+ if (k = e, Lt = !0, 0)
1403
1460
  var n, o;
1404
1461
  try {
1405
- t & 16777232 ? as(e) : Or(e), cn(e);
1406
- var a = mn(e);
1407
- if (e.teardown = typeof a == "function" ? a : null, e.wv = vn, 0)
1408
- for (var s of e.deps) ;
1462
+ t & 16777232 ? ms(e) : Hr(e), mn(e);
1463
+ var s = An(e);
1464
+ if (e.teardown = typeof s == "function" ? s : null, e.wv = Sn, 0)
1465
+ for (var a of e.deps) ;
1409
1466
  } finally {
1410
- At = i, k = r;
1467
+ Lt = i, k = r;
1411
1468
  }
1412
1469
  }
1413
1470
  }
1414
- function d(e) {
1471
+ function p(e) {
1415
1472
  var t = (e.f & 2) !== 0;
1416
- if (us?.add(e), S !== null && !te && !(k !== null && k.f & 16384) && (Y === null || !Je.call(Y, e))) {
1417
- var r = S.deps;
1418
- if (S.f & 2097152)
1419
- e.rv < Re && (e.rv = Re, j === null && r !== null && r[F] === e ? F++ : j === null ? j = [e] : j.push(e));
1473
+ if (ws?.add(e), I !== null && !re && !(k !== null && k.f & 16384) && (X === null || !tt.call(X, e))) {
1474
+ var r = I.deps;
1475
+ if (I.f & 2097152)
1476
+ e.rv < je && (e.rv = je, V === null && r !== null && r[F] === e ? F++ : V === null ? V = [e] : V.push(e));
1420
1477
  else {
1421
1478
  var i;
1422
- ((i = S).deps ?? (i.deps = [])).push(e);
1479
+ ((i = I).deps ?? (i.deps = [])).push(e);
1423
1480
  var n = e.reactions;
1424
- n === null ? e.reactions = [S] : Je.call(n, S) || n.push(S);
1481
+ n === null ? e.reactions = [I] : tt.call(n, I) || n.push(I);
1425
1482
  }
1426
1483
  }
1427
1484
  if (0) {
1428
- if (!te && reactivity_loss_tracker && !reactivity_loss_tracker.warned && !(reactivity_loss_tracker.effect.f & 2097152))
1485
+ if (!re && reactivity_loss_tracker && !reactivity_loss_tracker.warned && !(reactivity_loss_tracker.effect.f & 2097152) && !reactivity_loss_tracker.effect_deps.has(e))
1429
1486
  var o;
1430
- if (tracing_mode_flag && !te && tracing_expressions !== null && S !== null && tracing_expressions.reaction === S && !e.trace) {
1487
+ if (tracing_mode_flag && !re && tracing_expressions !== null && I !== null && tracing_expressions.reaction === I && !e.trace) {
1431
1488
  if (o)
1432
- var a, s;
1489
+ var s, a;
1433
1490
  }
1434
1491
  }
1435
- if (Me && Ae.has(e)) return Ae.get(e);
1492
+ if (we && He.has(e)) return He.get(e);
1436
1493
  if (t) {
1437
1494
  var c = e;
1438
- if (Me) {
1439
- var h = c.v;
1440
- return (!(c.f & 1024) && c.reactions !== null || bn(c)) && (h = $r(c)), Ae.set(c, h), h;
1495
+ if (we) {
1496
+ var f = c.v;
1497
+ return (!(c.f & 1024) && c.reactions !== null || Mn(c)) && (f = jr(c)), He.set(c, f), f;
1441
1498
  }
1442
- var u = (c.f & 512) === 0 && !te && S !== null && (At || (S.f & 512) !== 0), p = (c.f & mr) === 0;
1443
- yt(c) && (u && (c.f |= 512), Ji(c)), u && !p && (Qi(c), yn(c));
1499
+ var u = (c.f & 512) === 0 && !re && I !== null && (Lt || (I.f & 512) !== 0), h = (c.f & Er) === 0;
1500
+ St(c) && (u && (c.f |= 512), an(c)), u && !h && (ln(c), En(c));
1444
1501
  }
1445
- if (z?.has(e)) return z.get(e);
1502
+ if (D?.has(e)) return D.get(e);
1446
1503
  if (e.f & 8388608) throw e.v;
1447
1504
  return e.v;
1448
1505
  }
1449
- function yn(e) {
1506
+ function En(e) {
1450
1507
  if (e.f |= 512, e.deps !== null)
1451
1508
  for (const t of e.deps)
1452
- (t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (Qi(t), yn(t));
1509
+ (t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (ln(t), En(t));
1453
1510
  }
1454
- function bn(e) {
1511
+ function Mn(e) {
1455
1512
  if (e.v === N) return !0;
1456
1513
  if (e.deps === null) return !1;
1457
1514
  for (const t of e.deps)
1458
- if (Ae.has(t) || t.f & 2 && bn(t)) return !0;
1515
+ if (He.has(t) || t.f & 2 && Mn(t)) return !0;
1459
1516
  return !1;
1460
1517
  }
1461
- function Ft(e) {
1462
- var t = te;
1518
+ function Yt(e) {
1519
+ var t = re;
1463
1520
  try {
1464
- return te = !0, e();
1521
+ return re = !0, e();
1465
1522
  } finally {
1466
- te = t;
1523
+ re = t;
1467
1524
  }
1468
1525
  }
1469
- var Ye = Symbol("events"), wn = /* @__PURE__ */ new Set(), hr = /* @__PURE__ */ new Set();
1470
- function si(e, t, r) {
1471
- (t[Ye] ?? (t[Ye] = {}))[e] = r;
1526
+ var Je = Symbol("events"), On = /* @__PURE__ */ new Set(), kr = /* @__PURE__ */ new Set();
1527
+ function _i(e, t, r) {
1528
+ (t[Je] ?? (t[Je] = {}))[e] = r;
1472
1529
  }
1473
- function hs(e) {
1474
- for (var t = 0; t < e.length; t++) wn.add(e[t]);
1475
- for (var r of hr) r(e);
1530
+ function Ss(e) {
1531
+ for (var t = 0; t < e.length; t++) On.add(e[t]);
1532
+ for (var r of kr) r(e);
1476
1533
  }
1477
- var ai = null;
1478
- function li(e) {
1534
+ var gi = null;
1535
+ function mi(e) {
1479
1536
  var t = this, r = t.ownerDocument, i = e.type, n = e.composedPath?.() || [], o = n[0] || e.target;
1480
- ai = e;
1481
- var a = 0, s = ai === e && e[Ye];
1482
- if (s) {
1483
- var c = n.indexOf(s);
1537
+ gi = e;
1538
+ var s = 0, a = gi === e && e[Je];
1539
+ if (a) {
1540
+ var c = n.indexOf(a);
1484
1541
  if (c !== -1 && (t === document || t === window)) {
1485
- e[Ye] = t;
1542
+ e[Je] = t;
1486
1543
  return;
1487
1544
  }
1488
- var h = n.indexOf(t);
1489
- if (h === -1) return;
1490
- c <= h && (a = c);
1545
+ var f = n.indexOf(t);
1546
+ if (f === -1) return;
1547
+ c <= f && (s = c);
1491
1548
  }
1492
- if (o = n[a] || e.target, o !== t) {
1493
- xt(e, "currentTarget", {
1549
+ if (o = n[s] || e.target, o !== t) {
1550
+ Dt(e, "currentTarget", {
1494
1551
  configurable: !0,
1495
1552
  get() {
1496
1553
  return o || r;
1497
1554
  }
1498
1555
  });
1499
- var u = S, p = k;
1500
- X(null), ae(null);
1556
+ var u = I, h = k;
1557
+ Q(null), de(null);
1501
1558
  try {
1502
- for (var f, v = []; o !== null; ) {
1559
+ for (var d, v = []; o !== null; ) {
1503
1560
  var _ = o.assignedSlot || o.parentNode || o.host || null;
1504
1561
  try {
1505
- var m = o[Ye]?.[i];
1562
+ var m = o[Je]?.[i];
1506
1563
  m != null && (!o.disabled || e.target === o) && m.call(o, e);
1507
1564
  } catch (b) {
1508
- f ? v.push(b) : f = b;
1565
+ d ? v.push(b) : d = b;
1509
1566
  }
1510
1567
  if (e.cancelBubble || _ === t || _ === null) break;
1511
1568
  o = _;
1512
1569
  }
1513
- if (f) {
1570
+ if (d) {
1514
1571
  for (let b of v) queueMicrotask(() => {
1515
1572
  throw b;
1516
1573
  });
1517
- throw f;
1574
+ throw d;
1518
1575
  }
1519
1576
  } finally {
1520
- e[Ye] = t, delete e.currentTarget, X(u), ae(p);
1577
+ e[Je] = t, delete e.currentTarget, Q(u), de(h);
1521
1578
  }
1522
1579
  }
1523
1580
  }
1524
- var ps = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1525
- function vs(e) {
1526
- return ps?.createHTML(e) ?? e;
1581
+ var Is = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1582
+ function $s(e) {
1583
+ return Is?.createHTML(e) ?? e;
1527
1584
  }
1528
- function _s(e) {
1529
- var t = Ir("template");
1530
- return t.innerHTML = vs(e.replaceAll("<!>", "<!---->")), t.content;
1585
+ function As(e) {
1586
+ var t = Dr("template");
1587
+ return t.innerHTML = $s(e.replaceAll("<!>", "<!---->")), t.content;
1531
1588
  }
1532
- function Ke(e, t) {
1589
+ function Ze(e, t) {
1533
1590
  var r = k;
1534
1591
  r.nodes === null && (r.nodes = {
1535
1592
  start: e,
@@ -1539,35 +1596,35 @@ function Ke(e, t) {
1539
1596
  });
1540
1597
  }
1541
1598
  // @__NO_SIDE_EFFECTS__
1542
- function Tn(e, t) {
1599
+ function xn(e, t) {
1543
1600
  var r = (t & 1) !== 0, i = (t & 2) !== 0, n, o = !e.startsWith("<!>");
1544
1601
  return () => {
1545
1602
  if (O)
1546
- return Ke(I, null), I;
1547
- n === void 0 && (n = _s(o ? e : "<!>" + e), r || (n = /* @__PURE__ */ tt(n)));
1548
- var a = i || tn ? document.importNode(n, !0) : n.cloneNode(!0);
1603
+ return Ze(A, null), A;
1604
+ n === void 0 && (n = As(o ? e : "<!>" + e), r || (n = /* @__PURE__ */ st(n)));
1605
+ var s = i || fn ? document.importNode(n, !0) : n.cloneNode(!0);
1549
1606
  if (r) {
1550
- var s = /* @__PURE__ */ tt(a), c = a.lastChild;
1551
- Ke(s, c);
1552
- } else Ke(a, a);
1553
- return a;
1607
+ var a = /* @__PURE__ */ st(s), c = s.lastChild;
1608
+ Ze(a, c);
1609
+ } else Ze(s, s);
1610
+ return s;
1554
1611
  };
1555
1612
  }
1556
- function gs() {
1613
+ function Es() {
1557
1614
  if (O)
1558
- return Ke(I, null), I;
1559
- var e = document.createDocumentFragment(), t = document.createComment(""), r = _e();
1560
- return e.append(t, r), Ke(t, r), e;
1615
+ return Ze(A, null), A;
1616
+ var e = document.createDocumentFragment(), t = document.createComment(""), r = be();
1617
+ return e.append(t, r), Ze(t, r), e;
1561
1618
  }
1562
- function Et(e, t) {
1619
+ function Rt(e, t) {
1563
1620
  if (O) {
1564
1621
  var r = k;
1565
- (!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = I), br();
1622
+ (!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = A), Or();
1566
1623
  return;
1567
1624
  }
1568
1625
  e !== null && e.before(t);
1569
1626
  }
1570
- var ms = [
1627
+ var Ms = [
1571
1628
  "allowfullscreen",
1572
1629
  "async",
1573
1630
  "autofocus",
@@ -1596,8 +1653,8 @@ var ms = [
1596
1653
  "defer",
1597
1654
  "disablepictureinpicture",
1598
1655
  "disableremoteplayback"
1599
- ], Ja = [
1600
- ...ms,
1656
+ ], vl = [
1657
+ ...Ms,
1601
1658
  "formNoValidate",
1602
1659
  "isMap",
1603
1660
  "noModule",
@@ -1612,17 +1669,17 @@ var ms = [
1612
1669
  "allowFullscreen",
1613
1670
  "disablePictureInPicture",
1614
1671
  "disableRemotePlayback"
1615
- ], ys = ["touchstart", "touchmove"];
1616
- function bs(e) {
1617
- return ys.includes(e);
1672
+ ], Os = ["touchstart", "touchmove"];
1673
+ function xs(e) {
1674
+ return Os.includes(e);
1618
1675
  }
1619
- var ws = [
1676
+ var Ps = [
1620
1677
  "$state",
1621
1678
  "$state.raw",
1622
1679
  "$derived",
1623
1680
  "$derived.by"
1624
- ], Qa = [
1625
- ...ws,
1681
+ ], _l = [
1682
+ ...Ps,
1626
1683
  "$state.eager",
1627
1684
  "$state.snapshot",
1628
1685
  "$props",
@@ -1637,138 +1694,138 @@ var ws = [
1637
1694
  "$inspect().with",
1638
1695
  "$inspect.trace",
1639
1696
  "$host"
1640
- ], ci = !0;
1641
- function Ts(e, t) {
1697
+ ], bi = !0;
1698
+ function Ls(e, t) {
1642
1699
  var r = t == null ? "" : typeof t == "object" ? `${t}` : t;
1643
1700
  r !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = r, e.nodeValue = `${r}`);
1644
1701
  }
1645
- function kn(e, t) {
1646
- return Sn(e, t);
1702
+ function Pn(e, t) {
1703
+ return Ln(e, t);
1647
1704
  }
1648
- function ks(e, t) {
1649
- dr(), t.intro = t.intro ?? !1;
1650
- const r = t.target, i = O, n = I;
1705
+ function Rs(e, t) {
1706
+ Tr(), t.intro = t.intro ?? !1;
1707
+ const r = t.target, i = O, n = A;
1651
1708
  try {
1652
- for (var o = /* @__PURE__ */ tt(r); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ me(o);
1653
- if (!o) throw Xe;
1654
- qe(!0), re(o);
1655
- const a = Sn(e, {
1709
+ for (var o = /* @__PURE__ */ st(r); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ Te(o);
1710
+ if (!o) throw et;
1711
+ Xe(!0), ne(o);
1712
+ const s = Ln(e, {
1656
1713
  ...t,
1657
1714
  anchor: o
1658
1715
  });
1659
- return qe(!1), a;
1660
- } catch (a) {
1661
- if (a instanceof Error && a.message.split(`
1662
- `).some((s) => s.startsWith("https://svelte.dev/e/"))) throw a;
1663
- return a !== Xe && console.warn("Failed to hydrate: ", a), t.recover === !1 && mo(), dr(), Zo(r), qe(!1), kn(e, t);
1716
+ return Xe(!1), s;
1717
+ } catch (s) {
1718
+ if (s instanceof Error && s.message.split(`
1719
+ `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
1720
+ return s !== et && console.warn("Failed to hydrate: ", s), t.recover === !1 && Eo(), Tr(), us(r), Xe(!1), Pn(e, t);
1664
1721
  } finally {
1665
- qe(i), re(n);
1722
+ Xe(i), ne(n);
1666
1723
  }
1667
1724
  }
1668
- var $t = /* @__PURE__ */ new Map();
1669
- function Sn(e, { target: t, anchor: r, props: i = {}, events: n, context: o, intro: a = !0, transformError: s }) {
1670
- dr();
1671
- var c = void 0, h = os(() => {
1672
- var u = r ?? t.appendChild(_e());
1673
- Do(u, { pending: () => {
1725
+ var Ot = /* @__PURE__ */ new Map();
1726
+ function Ln(e, { target: t, anchor: r, props: i = {}, events: n, context: o, intro: s = !0, transformError: a }) {
1727
+ Tr();
1728
+ var c = void 0, f = _s(() => {
1729
+ var u = r ?? t.appendChild(be());
1730
+ Ko(u, { pending: () => {
1674
1731
  } }, (v) => {
1675
- xi({});
1732
+ Hi({});
1676
1733
  var _ = L;
1677
- if (o && (_.c = o), n && (i.$$events = n), O && Ke(v, null), ci = a, c = e(v, i) || {}, ci = !0, O && (k.nodes.end = I, I === null || I.nodeType !== 8 || I.data !== "]"))
1678
- throw Vt(), Xe;
1679
- Li();
1680
- }, s);
1681
- var p = /* @__PURE__ */ new Set(), f = (v) => {
1734
+ if (o && (_.c = o), n && (i.$$events = n), O && Ze(v, null), bi = s, c = e(v, i) || {}, bi = !0, O && (k.nodes.end = A, A === null || A.nodeType !== 8 || A.data !== "]"))
1735
+ throw Gt(), et;
1736
+ Fi();
1737
+ }, a);
1738
+ var h = /* @__PURE__ */ new Set(), d = (v) => {
1682
1739
  for (var _ = 0; _ < v.length; _++) {
1683
1740
  var m = v[_];
1684
- if (!p.has(m)) {
1685
- p.add(m);
1686
- var b = bs(m);
1687
- for (const E of [t, document]) {
1688
- var A = $t.get(E);
1689
- A === void 0 && (A = /* @__PURE__ */ new Map(), $t.set(E, A));
1690
- var H = A.get(m);
1691
- H === void 0 ? (E.addEventListener(m, li, { passive: b }), A.set(m, 1)) : A.set(m, H + 1);
1741
+ if (!h.has(m)) {
1742
+ h.add(m);
1743
+ var b = xs(m);
1744
+ for (const M of [t, document]) {
1745
+ var E = Ot.get(M);
1746
+ E === void 0 && (E = /* @__PURE__ */ new Map(), Ot.set(M, E));
1747
+ var U = E.get(m);
1748
+ U === void 0 ? (M.addEventListener(m, mi, { passive: b }), E.set(m, 1)) : E.set(m, U + 1);
1692
1749
  }
1693
1750
  }
1694
1751
  }
1695
1752
  };
1696
- return f(Zn(wn)), hr.add(f), () => {
1697
- for (var v of p) for (const b of [t, document]) {
1698
- var _ = $t.get(b), m = _.get(v);
1699
- --m == 0 ? (b.removeEventListener(v, li), _.delete(v), _.size === 0 && $t.delete(b)) : _.set(v, m);
1753
+ return d(co(On)), kr.add(d), () => {
1754
+ for (var v of h) for (const b of [t, document]) {
1755
+ var _ = Ot.get(b), m = _.get(v);
1756
+ --m == 0 ? (b.removeEventListener(v, mi), _.delete(v), _.size === 0 && Ot.delete(b)) : _.set(v, m);
1700
1757
  }
1701
- hr.delete(f), u !== r && u.parentNode?.removeChild(u);
1758
+ kr.delete(d), u !== r && u.parentNode?.removeChild(u);
1702
1759
  };
1703
1760
  });
1704
- return pr.set(c, h), c;
1761
+ return Sr.set(c, f), c;
1705
1762
  }
1706
- var pr = /* @__PURE__ */ new WeakMap();
1707
- function Ss(e, t) {
1708
- const r = pr.get(e);
1709
- return r ? (pr.delete(e), r(t)) : Promise.resolve();
1763
+ var Sr = /* @__PURE__ */ new WeakMap();
1764
+ function Cs(e, t) {
1765
+ const r = Sr.get(e);
1766
+ return r ? (Sr.delete(e), r(t)) : Promise.resolve();
1710
1767
  }
1711
- var de = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), ui = /* @__PURE__ */ new WeakMap(), $s = class {
1768
+ var _e = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap(), Ns = class {
1712
1769
  constructor(e, t = !0) {
1713
- g(this, "anchor", void 0), T(this, de, /* @__PURE__ */ new Map()), T(this, ke, /* @__PURE__ */ new Map()), T(this, J, /* @__PURE__ */ new Map()), T(this, ot, /* @__PURE__ */ new Set()), T(this, Qt, !0), T(this, Zt, (r) => {
1714
- if (l(de, this).has(r)) {
1715
- var i = l(de, this).get(r), n = l(ke, this).get(i);
1770
+ g(this, "anchor", void 0), y(this, _e, /* @__PURE__ */ new Map()), y(this, Ae, /* @__PURE__ */ new Map()), y(this, Z, /* @__PURE__ */ new Map()), y(this, ft, /* @__PURE__ */ new Set()), y(this, ir, !0), y(this, nr, (r) => {
1771
+ if (l(_e, this).has(r)) {
1772
+ var i = l(_e, this).get(r), n = l(Ae, this).get(i);
1716
1773
  if (n)
1717
- cs(n), l(ot, this).delete(i);
1774
+ ys(n), l(ft, this).delete(i);
1718
1775
  else {
1719
- var o = l(J, this).get(i);
1720
- o && (l(ke, this).set(i, o.effect), l(J, this).delete(i), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), n = o.effect);
1776
+ var o = l(Z, this).get(i);
1777
+ o && (l(Ae, this).set(i, o.effect), l(Z, this).delete(i), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), n = o.effect);
1721
1778
  }
1722
- for (const [a, s] of l(de, this)) {
1723
- if (l(de, this).delete(a), a === r) break;
1724
- const c = l(J, this).get(s);
1725
- c && (V(c.effect), l(J, this).delete(s));
1779
+ for (const [s, a] of l(_e, this)) {
1780
+ if (l(_e, this).delete(s), s === r) break;
1781
+ const c = l(Z, this).get(a);
1782
+ c && (W(c.effect), l(Z, this).delete(a));
1726
1783
  }
1727
- for (const [a, s] of l(ke, this)) {
1728
- if (a === i || l(ot, this).has(a)) continue;
1784
+ for (const [s, a] of l(Ae, this)) {
1785
+ if (s === i || l(ft, this).has(s)) continue;
1729
1786
  const c = () => {
1730
- if (Array.from(l(de, this).values()).includes(a)) {
1731
- var h = document.createDocumentFragment();
1732
- hn(s, h), h.append(_e()), l(J, this).set(a, {
1733
- effect: s,
1734
- fragment: h
1787
+ if (Array.from(l(_e, this).values()).includes(s)) {
1788
+ var f = document.createDocumentFragment();
1789
+ Tn(a, f), f.append(be()), l(Z, this).set(s, {
1790
+ effect: a,
1791
+ fragment: f
1735
1792
  });
1736
- } else V(s);
1737
- l(ot, this).delete(a), l(ke, this).delete(a);
1793
+ } else W(a);
1794
+ l(ft, this).delete(s), l(Ae, this).delete(s);
1738
1795
  };
1739
- l(Qt, this) || !n ? (l(ot, this).add(a), mt(s, c, !1)) : c();
1796
+ l(ir, this) || !n ? (l(ft, this).add(s), kt(a, c, !1)) : c();
1740
1797
  }
1741
1798
  }
1742
- }), T(this, ui, (r) => {
1743
- l(de, this).delete(r);
1744
- const i = Array.from(l(de, this).values());
1745
- for (const [n, o] of l(J, this)) i.includes(n) || (V(o.effect), l(J, this).delete(n));
1746
- }), this.anchor = e, y(Qt, this, t);
1799
+ }), y(this, yi, (r) => {
1800
+ l(_e, this).delete(r);
1801
+ const i = Array.from(l(_e, this).values());
1802
+ for (const [n, o] of l(Z, this)) i.includes(n) || (W(o.effect), l(Z, this).delete(n));
1803
+ }), this.anchor = e, w(ir, this, t);
1747
1804
  }
1748
1805
  ensure(e, t) {
1749
- var r = $, i = es();
1750
- if (t && !l(ke, this).has(e) && !l(J, this).has(e)) if (i) {
1751
- var n = document.createDocumentFragment(), o = _e();
1752
- n.append(o), l(J, this).set(e, {
1753
- effect: ge(() => t(o)),
1806
+ var r = S, i = fs();
1807
+ if (t && !l(Ae, this).has(e) && !l(Z, this).has(e)) if (i) {
1808
+ var n = document.createDocumentFragment(), o = be();
1809
+ n.append(o), l(Z, this).set(e, {
1810
+ effect: ye(() => t(o)),
1754
1811
  fragment: n
1755
1812
  });
1756
- } else l(ke, this).set(e, ge(() => t(this.anchor)));
1757
- if (l(de, this).set(r, e), i) {
1758
- for (const [a, s] of l(ke, this)) a === e ? r.unskip_effect(s) : r.skip_effect(s);
1759
- for (const [a, s] of l(J, this)) a === e ? r.unskip_effect(s.effect) : r.skip_effect(s.effect);
1760
- r.oncommit(l(Zt, this)), r.ondiscard(l(ui, this));
1813
+ } else l(Ae, this).set(e, ye(() => t(this.anchor)));
1814
+ if (l(_e, this).set(r, e), i) {
1815
+ for (const [s, a] of l(Ae, this)) s === e ? r.unskip_effect(a) : r.skip_effect(a);
1816
+ for (const [s, a] of l(Z, this)) s === e ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
1817
+ r.oncommit(l(nr, this)), r.ondiscard(l(yi, this));
1761
1818
  } else
1762
- O && (this.anchor = I), l(Zt, this).call(this, r);
1819
+ O && (this.anchor = A), l(nr, this).call(this, r);
1763
1820
  }
1764
1821
  };
1765
- function Is(e) {
1766
- L === null && fo("onMount"), vt && L.l !== null ? As(L).m.push(e) : at(() => {
1767
- const t = Ft(e);
1822
+ function js(e) {
1823
+ L === null && To("onMount"), yt && L.l !== null ? Ds(L).m.push(e) : ht(() => {
1824
+ const t = Yt(e);
1768
1825
  if (typeof t == "function") return t;
1769
1826
  });
1770
1827
  }
1771
- function As(e) {
1828
+ function Ds(e) {
1772
1829
  var t = e.l;
1773
1830
  return t.u ?? (t.u = {
1774
1831
  a: [],
@@ -1776,52 +1833,52 @@ function As(e) {
1776
1833
  m: []
1777
1834
  });
1778
1835
  }
1779
- function fi(e, t, r = !1) {
1836
+ function wi(e, t, r = !1) {
1780
1837
  var i;
1781
- O && (i = I, br());
1782
- var n = new $s(e), o = r ? yr : 0;
1783
- function a(s, c) {
1838
+ O && (i = A, Or());
1839
+ var n = new Ns(e), o = r ? Mr : 0;
1840
+ function s(a, c) {
1784
1841
  if (O) {
1785
- var h = $o(i);
1786
- if (s !== parseInt(h.substring(1))) {
1787
- var u = Mi();
1788
- re(u), n.anchor = u, qe(!1), n.ensure(s, c), qe(!0);
1842
+ var f = No(i);
1843
+ if (a !== parseInt(f.substring(1))) {
1844
+ var u = zi();
1845
+ ne(u), n.anchor = u, Xe(!1), n.ensure(a, c), Xe(!0);
1789
1846
  return;
1790
1847
  }
1791
1848
  }
1792
- n.ensure(s, c);
1849
+ n.ensure(a, c);
1793
1850
  }
1794
- ln(() => {
1795
- var s = !1;
1796
- t((c, h = 0) => {
1797
- s = !0, a(h, c);
1798
- }), s || a(-1, null);
1851
+ gn(() => {
1852
+ var a = !1;
1853
+ t((c, f = 0) => {
1854
+ a = !0, s(f, c);
1855
+ }), a || s(-1, null);
1799
1856
  }, o);
1800
1857
  }
1801
- function Es(e, t) {
1802
- an(() => {
1858
+ function zs(e, t) {
1859
+ _n(() => {
1803
1860
  var r = e.getRootNode(), i = r.host ? r : r.head ?? r.ownerDocument.head;
1804
1861
  if (!i.querySelector("#" + t.hash)) {
1805
- const n = Ir("style");
1862
+ const n = Dr("style");
1806
1863
  n.id = t.hash, n.textContent = t.code, i.appendChild(n);
1807
1864
  }
1808
1865
  });
1809
1866
  }
1810
- var di = [...`
1867
+ var Ti = [...`
1811
1868
  \r\f \v\uFEFF`];
1812
- function Ms(e, t, r) {
1869
+ function Vs(e, t, r) {
1813
1870
  var i = e == null ? "" : "" + e;
1814
1871
  if (t && (i = i ? i + " " + t : t), r) {
1815
1872
  for (var n of Object.keys(r)) if (r[n]) i = i ? i + " " + n : n;
1816
1873
  else if (i.length)
1817
- for (var o = n.length, a = 0; (a = i.indexOf(n, a)) >= 0; ) {
1818
- var s = a + o;
1819
- (a === 0 || di.includes(i[a - 1])) && (s === i.length || di.includes(i[s])) ? i = (a === 0 ? "" : i.substring(0, a)) + i.substring(s + 1) : a = s;
1874
+ for (var o = n.length, s = 0; (s = i.indexOf(n, s)) >= 0; ) {
1875
+ var a = s + o;
1876
+ (s === 0 || Ti.includes(i[s - 1])) && (a === i.length || Ti.includes(i[a])) ? i = (s === 0 ? "" : i.substring(0, s)) + i.substring(a + 1) : s = a;
1820
1877
  }
1821
1878
  }
1822
1879
  return i === "" ? null : i;
1823
1880
  }
1824
- function hi(e, t = !1) {
1881
+ function ki(e, t = !1) {
1825
1882
  var r = t ? " !important;" : ";", i = "";
1826
1883
  for (var n of Object.keys(e)) {
1827
1884
  var o = e[n];
@@ -1829,196 +1886,196 @@ function hi(e, t = !1) {
1829
1886
  }
1830
1887
  return i;
1831
1888
  }
1832
- function er(e) {
1889
+ function or(e) {
1833
1890
  return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
1834
1891
  }
1835
- function Os(e, t) {
1892
+ function Ws(e, t) {
1836
1893
  if (t) {
1837
1894
  var r = "", i, n;
1838
1895
  if (Array.isArray(t) ? (i = t[0], n = t[1]) : i = t, e) {
1839
1896
  e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1840
- var o = !1, a = 0, s = !1, c = [];
1841
- i && c.push(...Object.keys(i).map(er)), n && c.push(...Object.keys(n).map(er));
1842
- var h = 0, u = -1;
1897
+ var o = !1, s = 0, a = !1, c = [];
1898
+ i && c.push(...Object.keys(i).map(or)), n && c.push(...Object.keys(n).map(or));
1899
+ var f = 0, u = -1;
1843
1900
  const m = e.length;
1844
- for (var p = 0; p < m; p++) {
1845
- var f = e[p];
1846
- if (s ? f === "/" && e[p - 1] === "*" && (s = !1) : o ? o === f && (o = !1) : f === "/" && e[p + 1] === "*" ? s = !0 : f === '"' || f === "'" ? o = f : f === "(" ? a++ : f === ")" && a--, !s && o === !1 && a === 0) {
1847
- if (f === ":" && u === -1) u = p;
1848
- else if (f === ";" || p === m - 1) {
1901
+ for (var h = 0; h < m; h++) {
1902
+ var d = e[h];
1903
+ if (a ? d === "/" && e[h - 1] === "*" && (a = !1) : o ? o === d && (o = !1) : d === "/" && e[h + 1] === "*" ? a = !0 : d === '"' || d === "'" ? o = d : d === "(" ? s++ : d === ")" && s--, !a && o === !1 && s === 0) {
1904
+ if (d === ":" && u === -1) u = h;
1905
+ else if (d === ";" || h === m - 1) {
1849
1906
  if (u !== -1) {
1850
- var v = er(e.substring(h, u).trim());
1907
+ var v = or(e.substring(f, u).trim());
1851
1908
  if (!c.includes(v)) {
1852
- f !== ";" && p++;
1853
- var _ = e.substring(h, p).trim();
1909
+ d !== ";" && h++;
1910
+ var _ = e.substring(f, h).trim();
1854
1911
  r += " " + _ + ";";
1855
1912
  }
1856
1913
  }
1857
- h = p + 1, u = -1;
1914
+ f = h + 1, u = -1;
1858
1915
  }
1859
1916
  }
1860
1917
  }
1861
1918
  }
1862
- return i && (r += hi(i)), n && (r += hi(n, !0)), r = r.trim(), r === "" ? null : r;
1919
+ return i && (r += ki(i)), n && (r += ki(n, !0)), r = r.trim(), r === "" ? null : r;
1863
1920
  }
1864
1921
  return e == null ? null : String(e);
1865
1922
  }
1866
- function Ps(e, t, r, i, n, o) {
1867
- var a = e.__className;
1868
- if (O || a !== r || a === void 0) {
1869
- var s = Ms(r, i, o);
1870
- (!O || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : t ? e.className = s : e.setAttribute("class", s)), e.__className = r;
1923
+ function Hs(e, t, r, i, n, o) {
1924
+ var s = e.__className;
1925
+ if (O || s !== r || s === void 0) {
1926
+ var a = Vs(r, i, o);
1927
+ (!O || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e.__className = r;
1871
1928
  } else if (o && n !== o) for (var c in o) {
1872
- var h = !!o[c];
1873
- (n == null || h !== !!n[c]) && e.classList.toggle(c, h);
1929
+ var f = !!o[c];
1930
+ (n == null || f !== !!n[c]) && e.classList.toggle(c, f);
1874
1931
  }
1875
1932
  return o;
1876
1933
  }
1877
- function tr(e, t = {}, r, i) {
1934
+ function sr(e, t = {}, r, i) {
1878
1935
  for (var n in r) {
1879
1936
  var o = r[n];
1880
1937
  t[n] !== o && (r[n] == null ? e.style.removeProperty(n) : e.style.setProperty(n, o, i));
1881
1938
  }
1882
1939
  }
1883
- function Fe(e, t, r, i) {
1940
+ function qe(e, t, r, i) {
1884
1941
  var n = e.__style;
1885
1942
  if (O || n !== t) {
1886
- var o = Os(t, i);
1943
+ var o = Ws(t, i);
1887
1944
  (!O || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e.__style = t;
1888
- } else i && (Array.isArray(i) ? (tr(e, r?.[0], i[0]), tr(e, r?.[1], i[1], "important")) : tr(e, r, i));
1945
+ } else i && (Array.isArray(i) ? (sr(e, r?.[0], i[0]), sr(e, r?.[1], i[1], "important")) : sr(e, r, i));
1889
1946
  return i;
1890
1947
  }
1891
- var xs = Symbol("is custom element"), Ls = Symbol("is html"), Rs = uo ? "link" : "LINK";
1892
- function Cs(e, t, r, i) {
1893
- var n = Ns(e);
1894
- if (O && (n[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Rs)) {
1948
+ var Fs = Symbol("is custom element"), Bs = Symbol("is html"), Us = wo ? "link" : "LINK";
1949
+ function Gs(e, t, r, i) {
1950
+ var n = qs(e);
1951
+ if (O && (n[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Us)) {
1895
1952
  i || void 0;
1896
1953
  return;
1897
1954
  }
1898
- n[t] !== (n[t] = r) && (t === "loading" && (e[lo] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ds(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
1955
+ n[t] !== (n[t] = r) && (t === "loading" && (e[bo] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ys(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
1899
1956
  }
1900
- function Ns(e) {
1957
+ function qs(e) {
1901
1958
  return e.__attributes ?? (e.__attributes = {
1902
- [xs]: e.nodeName.includes("-"),
1903
- [Ls]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
1959
+ [Fs]: e.nodeName.includes("-"),
1960
+ [Bs]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
1904
1961
  });
1905
1962
  }
1906
- var pi = /* @__PURE__ */ new Map();
1907
- function Ds(e) {
1908
- var t = e.getAttribute("is") || e.nodeName, r = pi.get(t);
1963
+ var Si = /* @__PURE__ */ new Map();
1964
+ function Ys(e) {
1965
+ var t = e.getAttribute("is") || e.nodeName, r = Si.get(t);
1909
1966
  if (r) return r;
1910
- pi.set(t, r = []);
1967
+ Si.set(t, r = []);
1911
1968
  for (var i, n = e, o = Element.prototype; o !== n; ) {
1912
- i = eo(n);
1913
- for (var a in i) i[a].set && r.push(a);
1914
- n = $i(n);
1969
+ i = uo(n);
1970
+ for (var s in i) i[s].set && r.push(s);
1971
+ n = Ci(n);
1915
1972
  }
1916
1973
  return r;
1917
1974
  }
1918
- var $n, Ge = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), vi = /* @__PURE__ */ new WeakSet(), In = class {
1975
+ var Rn, Ke = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakSet(), Cn = class {
1919
1976
  constructor(e) {
1920
- Tr(this, vi), T(this, Ge, /* @__PURE__ */ new WeakMap()), T(this, jt, void 0), T(this, rr, void 0), y(rr, this, e);
1977
+ Pr(this, Ii), y(this, Ke, /* @__PURE__ */ new WeakMap()), y(this, Bt, void 0), y(this, ar, void 0), w(ar, this, e);
1921
1978
  }
1922
1979
  observe(e, t) {
1923
- var r = l(Ge, this).get(e) || /* @__PURE__ */ new Set();
1924
- return r.add(t), l(Ge, this).set(e, r), M(vi, this, js).call(this).observe(e, l(rr, this)), () => {
1925
- var i = l(Ge, this).get(e);
1926
- i.delete(t), i.size === 0 && (l(Ge, this).delete(e), l(jt, this).unobserve(e));
1980
+ var r = l(Ke, this).get(e) || /* @__PURE__ */ new Set();
1981
+ return r.add(t), l(Ke, this).set(e, r), $(Ii, this, Ks).call(this).observe(e, l(ar, this)), () => {
1982
+ var i = l(Ke, this).get(e);
1983
+ i.delete(t), i.size === 0 && (l(Ke, this).delete(e), l(Bt, this).unobserve(e));
1927
1984
  };
1928
1985
  }
1929
1986
  };
1930
- $n = In;
1931
- function js() {
1932
- return l(jt, this) ?? y(jt, this, new ResizeObserver((e) => {
1987
+ Rn = Cn;
1988
+ function Ks() {
1989
+ return l(Bt, this) ?? w(Bt, this, new ResizeObserver((e) => {
1933
1990
  for (var t of e) {
1934
- $n.entries.set(t.target, t);
1935
- for (var r of l(Ge, this).get(t.target) || []) r(t);
1991
+ Rn.entries.set(t.target, t);
1992
+ for (var r of l(Ke, this).get(t.target) || []) r(t);
1936
1993
  }
1937
1994
  }));
1938
1995
  }
1939
- g(In, "entries", /* @__PURE__ */ new WeakMap());
1940
- function _i(e, t) {
1941
- return e === t || e?.[lt] === t;
1996
+ g(Cn, "entries", /* @__PURE__ */ new WeakMap());
1997
+ function $i(e, t) {
1998
+ return e === t || e?.[pt] === t;
1942
1999
  }
1943
- function zs(e = {}, t, r, i) {
2000
+ function Xs(e = {}, t, r, i) {
1944
2001
  var n = L.r, o = k;
1945
- return an(() => {
1946
- var a, s;
1947
- return Mr(() => {
1948
- a = s, s = i?.() || [], Ft(() => {
1949
- e !== r(...s) && (t(e, ...s), a && _i(r(...a), e) && t(null, ...a));
2002
+ return _n(() => {
2003
+ var s, a;
2004
+ return Wr(() => {
2005
+ s = a, a = i?.() || [], Yt(() => {
2006
+ e !== r(...a) && (t(e, ...a), s && $i(r(...s), e) && t(null, ...s));
1950
2007
  });
1951
2008
  }), () => {
1952
2009
  let c = o;
1953
2010
  for (; c !== n && c.parent !== null && c.parent.f & 33554432; ) c = c.parent;
1954
- const h = () => {
1955
- s && _i(r(...s), e) && t(null, ...s);
2011
+ const f = () => {
2012
+ a && $i(r(...a), e) && t(null, ...a);
1956
2013
  }, u = c.teardown;
1957
2014
  c.teardown = () => {
1958
- h(), u?.();
2015
+ f(), u?.();
1959
2016
  };
1960
2017
  };
1961
2018
  }), e;
1962
2019
  }
1963
- function gi(e, t, r, i) {
1964
- var n = !vt || (r & 2) !== 0, o = (r & 8) !== 0, a = (r & 16) !== 0, s = i, c = !0, h = () => (c && (c = !1, s = a ? Ft(i) : i), s);
2020
+ function Ai(e, t, r, i) {
2021
+ var n = !yt || (r & 2) !== 0, o = (r & 8) !== 0, s = (r & 16) !== 0, a = i, c = !0, f = () => (c && (c = !1, a = s ? Yt(i) : i), a);
1965
2022
  let u;
1966
2023
  if (o) {
1967
- var p = lt in e || Ai in e;
1968
- u = Ce(e, t)?.set ?? (p && t in e ? (E) => e[t] = E : void 0);
2024
+ var h = pt in e || ji in e;
2025
+ u = De(e, t)?.set ?? (h && t in e ? (M) => e[t] = M : void 0);
1969
2026
  }
1970
- var f, v = !1;
1971
- o ? [f, v] = Po(() => e[t]) : f = e[t], f === void 0 && i !== void 0 && (f = h(), u && (n && yo(t), u(f)));
2027
+ var d, v = !1;
2028
+ o ? [d, v] = Ho(() => e[t]) : d = e[t], d === void 0 && i !== void 0 && (d = f(), u && (n && Mo(t), u(d)));
1972
2029
  var _;
1973
2030
  if (n ? _ = () => {
1974
- var E = e[t];
1975
- return E === void 0 ? h() : (c = !0, E);
2031
+ var M = e[t];
2032
+ return M === void 0 ? f() : (c = !0, M);
1976
2033
  } : _ = () => {
1977
- var E = e[t];
1978
- return E !== void 0 && (s = void 0), E === void 0 ? s : E;
2034
+ var M = e[t];
2035
+ return M !== void 0 && (a = void 0), M === void 0 ? a : M;
1979
2036
  }, n && !(r & 4)) return _;
1980
2037
  if (u) {
1981
2038
  var m = e.$$legacy;
1982
- return function(E, B) {
1983
- return arguments.length > 0 ? ((!n || !B || m || v) && u(B ? _() : E), E) : _();
2039
+ return function(M, G) {
2040
+ return arguments.length > 0 ? ((!n || !G || m || v) && u(G ? _() : M), M) : _();
1984
2041
  };
1985
2042
  }
1986
- var b = !1, A = (r & 1 ? Wt : Xi)(() => (b = !1, _()));
1987
- o && d(A);
1988
- var H = k;
1989
- return function(E, B) {
2043
+ var b = !1, E = (r & 1 ? qt : sn)(() => (b = !1, _()));
2044
+ o && p(E);
2045
+ var U = k;
2046
+ return function(M, G) {
1990
2047
  if (arguments.length > 0) {
1991
- const we = B ? d(A) : n && o ? se(E) : E;
1992
- return P(A, we), b = !0, s !== void 0 && (s = we), E;
2048
+ const Ie = G ? p(E) : n && o ? ue(M) : M;
2049
+ return x(E, Ie), b = !0, a !== void 0 && (a = Ie), M;
1993
2050
  }
1994
- return Me && b || H.f & 16384 ? A.v : d(A);
2051
+ return we && b || U.f & 16384 ? E.v : p(E);
1995
2052
  };
1996
2053
  }
1997
- function Vs(e) {
1998
- return new Ws(e);
2054
+ function Js(e) {
2055
+ return new Qs(e);
1999
2056
  }
2000
- var Pe = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ws = class {
2057
+ var Re = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), Qs = class {
2001
2058
  constructor(e) {
2002
- T(this, Pe, void 0), T(this, ie, void 0);
2059
+ y(this, Re, void 0), y(this, se, void 0);
2003
2060
  var t = /* @__PURE__ */ new Map(), r = (n, o) => {
2004
- var a = /* @__PURE__ */ Yo(o, !1, !1);
2005
- return t.set(n, a), a;
2061
+ var s = /* @__PURE__ */ os(o, !1, !1);
2062
+ return t.set(n, s), s;
2006
2063
  };
2007
2064
  const i = new Proxy({
2008
2065
  ...e.props || {},
2009
2066
  $$events: {}
2010
2067
  }, {
2011
2068
  get(n, o) {
2012
- return d(t.get(o) ?? r(o, Reflect.get(n, o)));
2069
+ return p(t.get(o) ?? r(o, Reflect.get(n, o)));
2013
2070
  },
2014
2071
  has(n, o) {
2015
- return o === Ai ? !0 : (d(t.get(o) ?? r(o, Reflect.get(n, o))), Reflect.has(n, o));
2072
+ return o === ji ? !0 : (p(t.get(o) ?? r(o, Reflect.get(n, o))), Reflect.has(n, o));
2016
2073
  },
2017
- set(n, o, a) {
2018
- return P(t.get(o) ?? r(o, a), a), Reflect.set(n, o, a);
2074
+ set(n, o, s) {
2075
+ return x(t.get(o) ?? r(o, s), s), Reflect.set(n, o, s);
2019
2076
  }
2020
2077
  });
2021
- y(ie, this, (e.hydrate ? ks : kn)(e.component, {
2078
+ w(se, this, (e.hydrate ? Rs : Pn)(e.component, {
2022
2079
  target: e.target,
2023
2080
  anchor: e.anchor,
2024
2081
  props: i,
@@ -2026,38 +2083,38 @@ var Pe = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ws =
2026
2083
  intro: e.intro ?? !1,
2027
2084
  recover: e.recover,
2028
2085
  transformError: e.transformError
2029
- })), !Ee && (!e?.props?.$$host || e.sync === !1) && ar(), y(Pe, this, i.$$events);
2030
- for (const n of Object.keys(l(ie, this)))
2031
- n === "$set" || n === "$destroy" || n === "$on" || xt(this, n, {
2086
+ })), !me && (!e?.props?.$$host || e.sync === !1) && _r(), w(Re, this, i.$$events);
2087
+ for (const n of Object.keys(l(se, this)))
2088
+ n === "$set" || n === "$destroy" || n === "$on" || Dt(this, n, {
2032
2089
  get() {
2033
- return l(ie, this)[n];
2090
+ return l(se, this)[n];
2034
2091
  },
2035
2092
  set(o) {
2036
- l(ie, this)[n] = o;
2093
+ l(se, this)[n] = o;
2037
2094
  },
2038
2095
  enumerable: !0
2039
2096
  });
2040
- l(ie, this).$set = (n) => {
2097
+ l(se, this).$set = (n) => {
2041
2098
  Object.assign(i, n);
2042
- }, l(ie, this).$destroy = () => {
2043
- Ss(l(ie, this));
2099
+ }, l(se, this).$destroy = () => {
2100
+ Cs(l(se, this));
2044
2101
  };
2045
2102
  }
2046
2103
  $set(e) {
2047
- l(ie, this).$set(e);
2104
+ l(se, this).$set(e);
2048
2105
  }
2049
2106
  $on(e, t) {
2050
- l(Pe, this)[e] = l(Pe, this)[e] || [];
2107
+ l(Re, this)[e] = l(Re, this)[e] || [];
2051
2108
  const r = (...i) => t.call(this, ...i);
2052
- return l(Pe, this)[e].push(r), () => {
2053
- l(Pe, this)[e] = l(Pe, this)[e].filter((i) => i !== r);
2109
+ return l(Re, this)[e].push(r), () => {
2110
+ l(Re, this)[e] = l(Re, this)[e].filter((i) => i !== r);
2054
2111
  };
2055
2112
  }
2056
2113
  $destroy() {
2057
- l(ie, this).$destroy();
2114
+ l(se, this).$destroy();
2058
2115
  }
2059
- }, An;
2060
- typeof HTMLElement == "function" && (An = class extends HTMLElement {
2116
+ }, Nn;
2117
+ typeof HTMLElement == "function" && (Nn = class extends HTMLElement {
2061
2118
  constructor(e, t, r) {
2062
2119
  super(), g(this, "$$ctor", void 0), g(this, "$$s", void 0), g(this, "$$c", void 0), g(this, "$$cn", !1), g(this, "$$d", {}), g(this, "$$r", !1), g(this, "$$p_d", {}), g(this, "$$l", {}), g(this, "$$l_u", /* @__PURE__ */ new Map()), g(this, "$$me", void 0), g(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
2063
2120
  }
@@ -2078,19 +2135,19 @@ typeof HTMLElement == "function" && (An = class extends HTMLElement {
2078
2135
  if (this.$$cn = !0, !this.$$c) {
2079
2136
  let e = function(i) {
2080
2137
  return (n) => {
2081
- const o = Ir("slot");
2082
- i !== "default" && (o.name = i), Et(n, o);
2138
+ const o = Dr("slot");
2139
+ i !== "default" && (o.name = i), Rt(n, o);
2083
2140
  };
2084
2141
  };
2085
2142
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2086
- const t = {}, r = Fs(this);
2143
+ const t = {}, r = Zs(this);
2087
2144
  for (const i of this.$$s) i in r && (i === "default" && !this.$$d.children ? (this.$$d.children = e(i), t.default = !0) : t[i] = e(i));
2088
2145
  for (const i of this.attributes) {
2089
2146
  const n = this.$$g_p(i.name);
2090
- n in this.$$d || (this.$$d[n] = Mt(n, i.value, this.$$p_d, "toProp"));
2147
+ n in this.$$d || (this.$$d[n] = Ct(n, i.value, this.$$p_d, "toProp"));
2091
2148
  }
2092
2149
  for (const i in this.$$p_d) !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
2093
- this.$$c = Vs({
2150
+ this.$$c = Js({
2094
2151
  component: this.$$ctor,
2095
2152
  target: this.$$shadowRoot || this,
2096
2153
  props: {
@@ -2098,13 +2155,13 @@ typeof HTMLElement == "function" && (An = class extends HTMLElement {
2098
2155
  $$slots: t,
2099
2156
  $$host: this
2100
2157
  }
2101
- }), this.$$me = ns(() => {
2102
- Mr(() => {
2158
+ }), this.$$me = vs(() => {
2159
+ Wr(() => {
2103
2160
  this.$$r = !0;
2104
- for (const i of Pt(this.$$c)) {
2161
+ for (const i of jt(this.$$c)) {
2105
2162
  if (!this.$$p_d[i]?.reflect) continue;
2106
2163
  this.$$d[i] = this.$$c[i];
2107
- const n = Mt(i, this.$$d[i], this.$$p_d, "toAttribute");
2164
+ const n = Ct(i, this.$$d[i], this.$$p_d, "toAttribute");
2108
2165
  n == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, n);
2109
2166
  }
2110
2167
  this.$$r = !1;
@@ -2118,7 +2175,7 @@ typeof HTMLElement == "function" && (An = class extends HTMLElement {
2118
2175
  }
2119
2176
  }
2120
2177
  attributeChangedCallback(e, t, r) {
2121
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = Mt(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2178
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = Ct(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2122
2179
  }
2123
2180
  disconnectedCallback() {
2124
2181
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -2126,10 +2183,10 @@ typeof HTMLElement == "function" && (An = class extends HTMLElement {
2126
2183
  });
2127
2184
  }
2128
2185
  $$g_p(e) {
2129
- return Pt(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2186
+ return jt(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2130
2187
  }
2131
2188
  });
2132
- function Mt(e, t, r, i) {
2189
+ function Ct(e, t, r, i) {
2133
2190
  const n = r[e]?.type;
2134
2191
  if (t = n === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !r[e]) return t;
2135
2192
  if (i === "toAttribute") switch (n) {
@@ -2155,46 +2212,46 @@ function Mt(e, t, r, i) {
2155
2212
  return t;
2156
2213
  }
2157
2214
  }
2158
- function Fs(e) {
2215
+ function Zs(e) {
2159
2216
  const t = {};
2160
2217
  return e.childNodes.forEach((r) => {
2161
2218
  t[r.slot || "default"] = !0;
2162
2219
  }), t;
2163
2220
  }
2164
- function Hs(e, t, r, i, n, o) {
2165
- let a = class extends An {
2221
+ function ea(e, t, r, i, n, o) {
2222
+ let s = class extends Nn {
2166
2223
  constructor() {
2167
2224
  super(e, r, n), this.$$p_d = t;
2168
2225
  }
2169
2226
  static get observedAttributes() {
2170
- return Pt(t).map((s) => (t[s].attribute || s).toLowerCase());
2227
+ return jt(t).map((a) => (t[a].attribute || a).toLowerCase());
2171
2228
  }
2172
2229
  };
2173
- return Pt(t).forEach((s) => {
2174
- xt(a.prototype, s, {
2230
+ return jt(t).forEach((a) => {
2231
+ Dt(s.prototype, a, {
2175
2232
  get() {
2176
- return this.$$c && s in this.$$c ? this.$$c[s] : this.$$d[s];
2233
+ return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
2177
2234
  },
2178
2235
  set(c) {
2179
- c = Mt(s, c, t), this.$$d[s] = c;
2180
- var h = this.$$c;
2181
- h && (Ce(h, s)?.get ? h[s] = c : h.$set({ [s]: c }));
2236
+ c = Ct(a, c, t), this.$$d[a] = c;
2237
+ var f = this.$$c;
2238
+ f && (De(f, a)?.get ? f[a] = c : f.$set({ [a]: c }));
2182
2239
  }
2183
2240
  });
2184
- }), i.forEach((s) => {
2185
- xt(a.prototype, s, { get() {
2186
- return this.$$c?.[s];
2241
+ }), i.forEach((a) => {
2242
+ Dt(s.prototype, a, { get() {
2243
+ return this.$$c?.[a];
2187
2244
  } });
2188
- }), o && (a = o(a)), e.element = a, a;
2245
+ }), o && (s = o(s)), e.element = s, s;
2189
2246
  }
2190
- var Bs = class extends Event {
2247
+ var ta = class extends Event {
2191
2248
  constructor(e, t, r, i) {
2192
2249
  super("context-request", {
2193
2250
  bubbles: !0,
2194
2251
  composed: !0
2195
2252
  }), g(this, "context", void 0), g(this, "contextTarget", void 0), g(this, "callback", void 0), g(this, "subscribe", void 0), this.context = e, this.contextTarget = t, this.callback = r, this.subscribe = i ?? !1;
2196
2253
  }
2197
- }, Us = class {
2254
+ }, ra = class {
2198
2255
  constructor(e, t) {
2199
2256
  g(this, "host", void 0), g(this, "context", void 0), g(this, "subscribe", void 0), g(this, "onValue", void 0), g(this, "isConnected", !1), g(this, "unsubscribe", void 0), g(this, "currentValue", void 0), g(this, "handleValue", (r, i) => {
2200
2257
  i !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = i), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = r, this.onValue?.(r);
@@ -2210,71 +2267,140 @@ var Bs = class extends Event {
2210
2267
  return this.currentValue;
2211
2268
  }
2212
2269
  requestValue() {
2213
- this.host.dispatchEvent(new Bs(this.context, this.host, this.handleValue, this.subscribe));
2270
+ this.host.dispatchEvent(new ta(this.context, this.host, this.handleValue, this.subscribe));
2214
2271
  }
2215
- }, Ht = (e) => e, Gs = Ht(Symbol.for("pie.assessmentToolkit.runtimeContext")), Za = Ht(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), el = Ht(Symbol.for("pie.assessmentToolkit.shellContext")), tl = Ht(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2216
- function qs(e, t, r) {
2272
+ }, Kt = (e) => e, ia = Kt(Symbol.for("pie.assessmentToolkit.runtimeContext")), gl = Kt(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), ml = Kt(Symbol.for("pie.assessmentToolkit.shellContext")), bl = Kt(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2273
+ function na(e, t, r) {
2217
2274
  let i = !1;
2218
- const n = new Us(e, {
2275
+ const n = new ra(e, {
2219
2276
  context: t,
2220
2277
  subscribe: !0,
2221
- onValue: (h) => {
2222
- i = !0, r(h);
2278
+ onValue: (f) => {
2279
+ i = !0, r(f);
2223
2280
  }
2224
2281
  });
2225
2282
  n.connect();
2226
- const o = (h) => {
2227
- h.context === t && n.requestValue();
2283
+ const o = (f) => {
2284
+ f.context === t && n.requestValue();
2228
2285
  };
2229
2286
  e.addEventListener("context-provider", o);
2230
- let a = 0;
2231
- const s = 200, c = globalThis.setInterval(() => {
2232
- if (i || a >= s) {
2287
+ let s = 0;
2288
+ const a = 200, c = globalThis.setInterval(() => {
2289
+ if (i || s >= a) {
2233
2290
  globalThis.clearInterval(c);
2234
2291
  return;
2235
2292
  }
2236
- a += 1, n.requestValue();
2293
+ s += 1, n.requestValue();
2237
2294
  }, 50);
2238
2295
  return () => {
2239
2296
  globalThis.clearInterval(c), e.removeEventListener("context-provider", o), n.disconnect();
2240
2297
  };
2241
2298
  }
2242
- function Ys(e, t) {
2243
- return qs(e, Gs, t);
2299
+ function oa(e, t) {
2300
+ return na(e, ia, t);
2244
2301
  }
2245
- function Ks(e, t) {
2246
- return Ys(e, t);
2302
+ function sa(e, t) {
2303
+ return oa(e, t);
2247
2304
  }
2248
- var mi;
2305
+ var Ei;
2249
2306
  (function(e) {
2250
2307
  e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
2251
- })(mi || (mi = {}));
2252
- var yi;
2308
+ })(Ei || (Ei = {}));
2309
+ var Mi;
2253
2310
  (function(e) {
2254
2311
  e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
2255
- })(yi || (yi = {}));
2256
- function En(e) {
2312
+ })(Mi || (Mi = {}));
2313
+ function jn(e) {
2257
2314
  return (...t) => {
2258
2315
  console.debug(`[${e}]`, ...t);
2259
2316
  };
2260
2317
  }
2261
- var rl = En("I18nService"), ir = {
2318
+ var yl = jn("I18nService"), lr = {
2262
2319
  assessment: [],
2263
2320
  section: [],
2264
2321
  item: [],
2265
2322
  passage: [],
2266
2323
  rubric: [],
2267
2324
  element: []
2268
- }, il = {
2269
- section: [...ir.section],
2270
- item: [...ir.item],
2271
- passage: [...ir.passage]
2325
+ }, cr = {
2326
+ section: [...lr.section],
2327
+ item: [...lr.item],
2328
+ passage: [...lr.passage]
2272
2329
  };
2273
- function Xs(e) {
2330
+ function Be(e) {
2331
+ return typeof e == "object" && e !== null && !Array.isArray(e);
2332
+ }
2333
+ function Ee(e, t) {
2334
+ if (e == null) return [];
2335
+ if (!Array.isArray(e)) throw new Error(`Invalid tools config at "${t}": expected an array of tool ids.`);
2336
+ if (e.find((r) => typeof r != "string") !== void 0) throw new Error(`Invalid tools config at "${t}": all entries must be strings.`);
2337
+ return e;
2338
+ }
2339
+ function aa(e) {
2340
+ if (e != null) {
2341
+ if (!Be(e)) throw new Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');
2342
+ return e;
2343
+ }
2344
+ }
2345
+ function la(e) {
2346
+ if (e != null) {
2347
+ if (!Be(e)) throw new Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');
2348
+ return e;
2349
+ }
2350
+ }
2351
+ function ca(e, t) {
2352
+ if (t == null) return;
2353
+ if (!Be(t)) throw new Error(`Invalid tools config at "providers.${e}": expected an object.`);
2354
+ const r = t;
2355
+ if ("enabled" in r && r.enabled !== void 0 && typeof r.enabled != "boolean") throw new Error(`Invalid tools config at "providers.${e}.enabled": expected a boolean.`);
2356
+ if ("settings" in r && r.settings !== void 0 && !Be(r.settings)) throw new Error(`Invalid tools config at "providers.${e}.settings": expected an object.`);
2357
+ if ("provider" in r && r.provider !== void 0 && !Be(r.provider)) throw new Error(`Invalid tools config at "providers.${e}.provider": expected an object.`);
2358
+ return r;
2359
+ }
2360
+ function ua(e) {
2361
+ if (e == null) return {};
2362
+ if (!Be(e)) throw new Error('Invalid tools config at "providers": expected an object keyed by tool id.');
2363
+ const t = {};
2364
+ for (const [r, i] of Object.entries(e)) t[r] = ca(r, i);
2365
+ return t;
2366
+ }
2367
+ function Dn(e) {
2274
2368
  const t = e.trim();
2275
2369
  return t || "";
2276
2370
  }
2277
- var Js = [
2371
+ function Me(e) {
2372
+ if (!e || e.length === 0) return [];
2373
+ const t = /* @__PURE__ */ new Set();
2374
+ for (const r of e) {
2375
+ if (typeof r != "string") throw new Error("Invalid tools config: tool list entries must be strings.");
2376
+ const i = Dn(r);
2377
+ i && t.add(i);
2378
+ }
2379
+ return Array.from(t);
2380
+ }
2381
+ function fa(e) {
2382
+ if (e != null) {
2383
+ if (e === "on" || e === "off") return e;
2384
+ throw new Error(`Invalid tools config at "qtiEnforcement": expected "on" or "off", got ${JSON.stringify(e)}.`);
2385
+ }
2386
+ }
2387
+ function da(e) {
2388
+ if (e != null && !Be(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
2389
+ const t = la(e?.policy), r = aa(e?.placement), i = ua(e?.providers), n = fa(e?.qtiEnforcement), o = {
2390
+ policy: {
2391
+ allowed: Me(Ee(t?.allowed, "policy.allowed")),
2392
+ blocked: Me(Ee(t?.blocked, "policy.blocked"))
2393
+ },
2394
+ placement: {
2395
+ section: Me(Ee(r?.section, "placement.section")).length ? Me(Ee(r?.section, "placement.section")) : [...cr.section],
2396
+ item: Me(Ee(r?.item, "placement.item")).length ? Me(Ee(r?.item, "placement.item")) : [...cr.item],
2397
+ passage: Me(Ee(r?.passage, "placement.passage")).length ? Me(Ee(r?.passage, "placement.passage")) : [...cr.passage]
2398
+ },
2399
+ providers: i
2400
+ };
2401
+ return n && (o.qtiEnforcement = n), o;
2402
+ }
2403
+ var ha = [
2278
2404
  "assessment",
2279
2405
  "section",
2280
2406
  "item",
@@ -2282,13 +2408,38 @@ var Js = [
2282
2408
  "rubric",
2283
2409
  "element"
2284
2410
  ];
2285
- function Ot(e, t) {
2411
+ function Nt(e, t) {
2286
2412
  if (typeof e != "string" || e.trim().length === 0) throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
2287
2413
  }
2288
- function bi(e) {
2289
- if (Ot(e.toolId, "toolId"), Ot(e.name, "name"), Ot(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
2290
- if (!Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
2291
- const t = e.supportedLevels.find((r) => !Js.includes(r));
2414
+ var pa = [
2415
+ {
2416
+ pattern: /<script\b/i,
2417
+ reason: "contains a <script> tag"
2418
+ },
2419
+ {
2420
+ pattern: /\son[a-z]+\s*=/i,
2421
+ reason: "contains an inline event handler (on*=) attribute"
2422
+ },
2423
+ {
2424
+ pattern: /javascript:/i,
2425
+ reason: "contains a javascript: URL"
2426
+ },
2427
+ {
2428
+ pattern: /<foreignObject\b/i,
2429
+ reason: "contains a <foreignObject> element"
2430
+ }
2431
+ ];
2432
+ function va(e, t, r) {
2433
+ const i = t.trimStart(), n = i.toLowerCase().startsWith("<svg"), o = /^https?:/i.test(i);
2434
+ if (/^data:/i.test(i)) throw new Error(`Invalid tool registration "${e}": "${r}" may not be a data: URL.`);
2435
+ if (!(!n && !o)) {
2436
+ for (const { pattern: s, reason: a } of pa) if (s.test(t)) throw new Error(`Invalid tool registration "${e}": "${r}" ${a}. Inline SVG icons must not include scriptable content.`);
2437
+ }
2438
+ }
2439
+ function Oi(e) {
2440
+ if (Nt(e.toolId, "toolId"), Nt(e.name, "name"), Nt(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
2441
+ if (typeof e.icon == "string" && va(e.toolId, e.icon, "icon"), !Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
2442
+ const t = e.supportedLevels.find((r) => !ha.includes(r));
2292
2443
  if (t) throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
2293
2444
  if (e.activation !== void 0 && e.activation !== "toolbar-toggle" && e.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${e.toolId}": unsupported activation "${String(e.activation)}".`);
2294
2445
  if (e.singletonScope !== void 0 && e.singletonScope !== "section") throw new Error(`Invalid tool registration "${e.toolId}": unsupported singletonScope "${String(e.singletonScope)}".`);
@@ -2297,23 +2448,23 @@ function bi(e) {
2297
2448
  if (typeof e.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${e.toolId}": "isVisibleInContext" must be a function.`);
2298
2449
  if (typeof e.renderToolbar != "function") throw new Error(`Invalid tool registration "${e.toolId}": "renderToolbar" must be a function.`);
2299
2450
  }
2300
- var Qs = class {
2451
+ var _a = class {
2301
2452
  constructor() {
2302
2453
  g(this, "tools", /* @__PURE__ */ new Map()), g(this, "pnpIndex", /* @__PURE__ */ new Map()), g(this, "componentOverrides", {}), g(this, "moduleLoaders", /* @__PURE__ */ new Map()), g(this, "loadedToolModules", /* @__PURE__ */ new Set()), g(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
2303
2454
  }
2304
2455
  normalizeToolId(e) {
2305
- return Xs(e);
2456
+ return Dn(e);
2306
2457
  }
2307
2458
  normalizeToolIds(e) {
2308
2459
  return e.map((t) => this.normalizeToolId(t));
2309
2460
  }
2310
2461
  register(e) {
2311
- if (bi(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
2462
+ if (Oi(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
2312
2463
  if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const t of e.pnpSupportIds)
2313
2464
  this.pnpIndex.has(t) || this.pnpIndex.set(t, /* @__PURE__ */ new Set()), this.pnpIndex.get(t).add(e.toolId);
2314
2465
  }
2315
2466
  override(e) {
2316
- if (bi(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
2467
+ if (Oi(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
2317
2468
  const t = this.tools.get(e.toolId);
2318
2469
  if (t.pnpSupportIds) for (const r of t.pnpSupportIds) this.pnpIndex.get(r)?.delete(e.toolId);
2319
2470
  if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const r of e.pnpSupportIds)
@@ -2398,7 +2549,7 @@ var Qs = class {
2398
2549
  setToolModuleLoaders(e) {
2399
2550
  for (const [t, r] of Object.entries(e))
2400
2551
  if (r) {
2401
- if (Ot(t, "tool module loader id"), typeof r != "function") throw new Error(`Invalid tool module loader for "${t}": expected a function.`);
2552
+ if (Nt(t, "tool module loader id"), typeof r != "function") throw new Error(`Invalid tool module loader for "${t}": expected a function.`);
2402
2553
  this.moduleLoaders.set(t, r);
2403
2554
  }
2404
2555
  }
@@ -2440,35 +2591,35 @@ var Qs = class {
2440
2591
  return i.renderToolbar(t, n);
2441
2592
  }
2442
2593
  };
2443
- function Mn(e) {
2594
+ function zn(e) {
2444
2595
  return e.level === "item";
2445
2596
  }
2446
- function Zs(e) {
2597
+ function ga(e) {
2447
2598
  return e.level === "passage";
2448
2599
  }
2449
- function ea(e) {
2600
+ function ma(e) {
2450
2601
  return e.level === "rubric";
2451
2602
  }
2452
- function On(e) {
2603
+ function Vn(e) {
2453
2604
  return e.level === "element";
2454
2605
  }
2455
- function Pr(e) {
2456
- if (On(e)) {
2606
+ function Fr(e) {
2607
+ if (Vn(e)) {
2457
2608
  const t = e.item.config;
2458
2609
  if (!t) return "";
2459
- const r = [], i = (s) => s.replace(/<[^>]*>/g, " ").trim(), n = t.elements?.[e.elementId];
2610
+ const r = [], i = (a) => a.replace(/<[^>]*>/g, " ").trim(), n = t.elements?.[e.elementId];
2460
2611
  n && typeof n == "string" && r.push(i(n));
2461
- const o = t.models, a = (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).find((s) => s && typeof s == "object" && s.id === e.elementId);
2462
- if (a) {
2463
- for (const s of Object.values(a))
2464
- if (typeof s == "string" && r.push(i(s)), Array.isArray(s)) {
2465
- for (const c of s) if (c && typeof c == "object")
2466
- for (const h of Object.values(c)) typeof h == "string" && r.push(i(h));
2612
+ const o = t.models, s = (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).find((a) => a && typeof a == "object" && a.id === e.elementId);
2613
+ if (s) {
2614
+ for (const a of Object.values(s))
2615
+ if (typeof a == "string" && r.push(i(a)), Array.isArray(a)) {
2616
+ for (const c of a) if (c && typeof c == "object")
2617
+ for (const f of Object.values(c)) typeof f == "string" && r.push(i(f));
2467
2618
  }
2468
2619
  }
2469
2620
  return r.filter(Boolean).join(" ").trim();
2470
2621
  }
2471
- if (Mn(e)) {
2622
+ if (zn(e)) {
2472
2623
  const t = e.item;
2473
2624
  if (!t?.config) return "";
2474
2625
  const r = t.config, i = [], n = (c) => c.replace(/<[^>]*>/g, " ").trim();
@@ -2476,18 +2627,18 @@ function Pr(e) {
2476
2627
  const o = r.elements;
2477
2628
  if (o && typeof o == "object")
2478
2629
  for (const c of Object.values(o)) typeof c == "string" && i.push(n(c));
2479
- const a = r.models, s = Array.isArray(a) ? a : a && typeof a == "object" ? Object.values(a) : [];
2480
- for (const c of s)
2630
+ const s = r.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
2631
+ for (const c of a)
2481
2632
  if (!(!c || typeof c != "object")) {
2482
- for (const h of Object.values(c))
2483
- if (typeof h == "string" && i.push(n(h)), Array.isArray(h)) {
2484
- for (const u of h) if (u && typeof u == "object")
2485
- for (const p of Object.values(u)) typeof p == "string" && i.push(n(p));
2633
+ for (const f of Object.values(c))
2634
+ if (typeof f == "string" && i.push(n(f)), Array.isArray(f)) {
2635
+ for (const u of f) if (u && typeof u == "object")
2636
+ for (const h of Object.values(u)) typeof h == "string" && i.push(n(h));
2486
2637
  }
2487
2638
  }
2488
2639
  return i.filter(Boolean).join(" ").trim();
2489
2640
  }
2490
- if (Zs(e)) {
2641
+ if (ga(e)) {
2491
2642
  const t = e.passage;
2492
2643
  if (!t?.config) return "";
2493
2644
  const r = t.config, i = [], n = (c) => c.replace(/<[^>]*>/g, " ").trim();
@@ -2495,25 +2646,25 @@ function Pr(e) {
2495
2646
  const o = r.elements;
2496
2647
  if (o && typeof o == "object")
2497
2648
  for (const c of Object.values(o)) typeof c == "string" && i.push(n(c));
2498
- const a = r.models, s = Array.isArray(a) ? a : a && typeof a == "object" ? Object.values(a) : [];
2499
- for (const c of s)
2649
+ const s = r.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
2650
+ for (const c of a)
2500
2651
  if (!(!c || typeof c != "object")) {
2501
- for (const h of Object.values(c))
2502
- if (typeof h == "string" && i.push(n(h)), Array.isArray(h)) {
2503
- for (const u of h) if (u && typeof u == "object")
2504
- for (const p of Object.values(u)) typeof p == "string" && i.push(n(p));
2652
+ for (const f of Object.values(c))
2653
+ if (typeof f == "string" && i.push(n(f)), Array.isArray(f)) {
2654
+ for (const u of f) if (u && typeof u == "object")
2655
+ for (const h of Object.values(u)) typeof h == "string" && i.push(n(h));
2505
2656
  }
2506
2657
  }
2507
2658
  return i.filter(Boolean).join(" ").trim();
2508
2659
  }
2509
- if (ea(e)) {
2660
+ if (ma(e)) {
2510
2661
  const t = e.rubricBlock;
2511
2662
  return t.passage?.config ? (t.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (t.content || "").replace(/<[^>]*>/g, " ").trim();
2512
2663
  }
2513
2664
  return "";
2514
2665
  }
2515
- function Bt(e) {
2516
- const t = Pr(e);
2666
+ function Xt(e) {
2667
+ const t = Fr(e);
2517
2668
  return [
2518
2669
  /<math[>\s]/i,
2519
2670
  /\\\[([^\]]+)\\\]/,
@@ -2523,7 +2674,7 @@ function Bt(e) {
2523
2674
  /\d+\s*[+\-*/=]\s*\d+/
2524
2675
  ].some((r) => r.test(t));
2525
2676
  }
2526
- function ta(e) {
2677
+ function ba(e) {
2527
2678
  const t = [
2528
2679
  "pie-multiple-choice",
2529
2680
  "pie-inline-choice",
@@ -2532,7 +2683,7 @@ function ta(e) {
2532
2683
  "inline-choice",
2533
2684
  "select-text"
2534
2685
  ];
2535
- if (On(e)) {
2686
+ if (Vn(e)) {
2536
2687
  const r = e.item.config;
2537
2688
  if (!r?.models) return !1;
2538
2689
  const i = (Array.isArray(r.models) ? r.models : Object.values(r.models)).find((o) => o && typeof o == "object" && o.id === e.elementId);
@@ -2540,7 +2691,7 @@ function ta(e) {
2540
2691
  const n = i.element || "";
2541
2692
  return t.includes(n);
2542
2693
  }
2543
- if (Mn(e)) {
2694
+ if (zn(e)) {
2544
2695
  const r = e.item.config?.models;
2545
2696
  return (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).some((i) => {
2546
2697
  if (!i || typeof i != "object") return !1;
@@ -2550,11 +2701,11 @@ function ta(e) {
2550
2701
  }
2551
2702
  return !1;
2552
2703
  }
2553
- function Ut(e) {
2554
- return Pr(e).trim().length >= 10;
2704
+ function Jt(e) {
2705
+ return Fr(e).trim().length >= 10;
2555
2706
  }
2556
- function ra(e) {
2557
- const t = Pr(e);
2707
+ function ya(e) {
2708
+ const t = Fr(e);
2558
2709
  return [
2559
2710
  /chemistry|chemical|element|atom|molecule|compound/i,
2560
2711
  /periodic\s+table/i,
@@ -2564,23 +2715,23 @@ function ra(e) {
2564
2715
  /physics|force|energy|velocity|acceleration/i
2565
2716
  ].some((r) => r.test(t));
2566
2717
  }
2567
- var ia = [
2718
+ var wa = [
2568
2719
  "assessment",
2569
2720
  "section",
2570
2721
  "item",
2571
2722
  "passage",
2572
2723
  "rubric"
2573
- ], na = new Set(ia);
2574
- function oa(e) {
2575
- return na.has(e);
2724
+ ], Ta = new Set(wa);
2725
+ function ka(e) {
2726
+ return Ta.has(e);
2576
2727
  }
2577
- function xr(e, t, r) {
2728
+ function Br(e, t, r) {
2578
2729
  const i = e.trim(), n = r.trim();
2579
2730
  if (!i || !n) throw new Error("Tool instance ids require non-empty tool and scope ids");
2580
- if (!oa(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
2731
+ if (!ka(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
2581
2732
  return `${i}:${t}:${n}`;
2582
2733
  }
2583
- var sa = class {
2734
+ var Sa = class {
2584
2735
  constructor() {
2585
2736
  g(this, "providerId", "desmos-calculator"), g(this, "providerName", "Desmos Calculator"), g(this, "category", "calculator"), g(this, "version", "1.10"), g(this, "requiresAuth", !0), g(this, "desmosProvider", null), g(this, "config", null);
2586
2737
  }
@@ -2602,34 +2753,36 @@ var sa = class {
2602
2753
  toolId: "calculator",
2603
2754
  operation: "desmos-provider-module-import",
2604
2755
  backend: "desmos"
2605
- }), this.desmosProvider = new (await (async () => {
2756
+ });
2757
+ const r = await (async () => {
2606
2758
  try {
2607
- const r = await import("./dist-DwP27yIs.js");
2759
+ const i = await import("./dist-rF11IR1B.js");
2608
2760
  return await this.emitTelemetry("pie-tool-library-load-success", {
2609
2761
  toolId: "calculator",
2610
2762
  operation: "desmos-provider-module-import",
2611
2763
  backend: "desmos",
2612
2764
  duration: Date.now() - t
2613
- }), r;
2614
- } catch (r) {
2765
+ }), i;
2766
+ } catch (i) {
2615
2767
  throw await this.emitTelemetry("pie-tool-library-load-error", {
2616
2768
  toolId: "calculator",
2617
2769
  operation: "desmos-provider-module-import",
2618
2770
  backend: "desmos",
2619
2771
  duration: Date.now() - t,
2620
2772
  errorType: "ToolLibraryLoadError",
2621
- message: r instanceof Error ? r.message : String(r)
2622
- }), r;
2773
+ message: i instanceof Error ? i.message : String(i)
2774
+ }), i;
2623
2775
  }
2624
- })()).DesmosCalculatorProvider();
2776
+ })();
2777
+ this.desmosProvider = new r.DesmosCalculatorProvider();
2625
2778
  try {
2626
2779
  await this.desmosProvider.initialize({
2627
2780
  apiKey: e.apiKey,
2628
2781
  proxyEndpoint: e.proxyEndpoint,
2629
2782
  onTelemetry: e.onTelemetry
2630
2783
  }), console.log(`[DesmosToolProvider] Initialized successfully ${e.proxyEndpoint ? "(using proxy)" : e.apiKey ? "(direct API key)" : "(no auth)"}`);
2631
- } catch (r) {
2632
- throw console.error("[DesmosToolProvider] Initialization failed:", r), new Error("Failed to initialize Desmos calculator provider. Check API key or proxy endpoint.");
2784
+ } catch (i) {
2785
+ throw console.error("[DesmosToolProvider] Initialization failed:", i), new Error("Failed to initialize Desmos calculator provider. Check API key or proxy endpoint.");
2633
2786
  }
2634
2787
  }
2635
2788
  async createInstance(e) {
@@ -2655,41 +2808,41 @@ var sa = class {
2655
2808
  destroy() {
2656
2809
  this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
2657
2810
  }
2658
- }, aa = (e, t) => {
2811
+ }, Ia = (e, t) => {
2659
2812
  const r = t?.useSentenceSegmenter !== !1;
2660
2813
  try {
2661
2814
  if (!r) throw new Error("Segmenter disabled by policy");
2662
- const a = globalThis.Intl?.Segmenter;
2663
- if (typeof a == "function") {
2664
- const s = new a(t?.locale, { granularity: "sentence" }), c = Array.from(s.segment(e)).map((h) => ({
2665
- text: h.segment,
2666
- offset: h.index
2667
- })).filter((h) => h.text.trim().length > 0);
2815
+ const s = globalThis.Intl?.Segmenter;
2816
+ if (typeof s == "function") {
2817
+ const a = new s(t?.locale, { granularity: "sentence" }), c = Array.from(a.segment(e)).map((f) => ({
2818
+ text: f.segment,
2819
+ offset: f.index
2820
+ })).filter((f) => f.text.trim().length > 0);
2668
2821
  if (c.length > 0) return c;
2669
2822
  }
2670
2823
  } catch {
2671
2824
  }
2672
2825
  const i = e.match(/[^.!?]+(?:[.!?]+|$)/g) || [e], n = [];
2673
2826
  let o = 0;
2674
- for (const a of i) {
2675
- const s = e.indexOf(a, o);
2676
- s !== -1 && (n.push({
2677
- text: a,
2678
- offset: s
2679
- }), o = s + a.length);
2827
+ for (const s of i) {
2828
+ const a = e.indexOf(s, o);
2829
+ a !== -1 && (n.push({
2830
+ text: s,
2831
+ offset: a
2832
+ }), o = a + s.length);
2680
2833
  }
2681
2834
  return n.length > 0 ? n : [{
2682
2835
  text: e,
2683
2836
  offset: 0
2684
2837
  }];
2685
- }, la = class {
2838
+ }, $a = class {
2686
2839
  constructor() {
2687
2840
  g(this, "providerId", "browser"), g(this, "providerName", "Browser Speech Synthesis"), g(this, "version", "1.0.0");
2688
2841
  }
2689
2842
  async initialize(e) {
2690
2843
  if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
2691
2844
  if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
2692
- return new ca(e);
2845
+ return new Aa(e);
2693
2846
  }
2694
2847
  supportsFeature(e) {
2695
2848
  return !0;
@@ -2706,7 +2859,7 @@ var sa = class {
2706
2859
  }
2707
2860
  destroy() {
2708
2861
  }
2709
- }, ca = class {
2862
+ }, Aa = class {
2710
2863
  constructor(e) {
2711
2864
  g(this, "utterance", null), g(this, "config", null), g(this, "_isPlaying", !1), g(this, "_isPaused", !1), g(this, "speakRunId", 0), g(this, "onWordBoundary", void 0), this.config = e;
2712
2865
  }
@@ -2741,19 +2894,19 @@ var sa = class {
2741
2894
  }];
2742
2895
  const r = this.segmentSentences(e), i = [];
2743
2896
  let n = "", o = 0;
2744
- for (const a of r) {
2745
- const s = a.text.trim();
2746
- if (!s) continue;
2747
- const c = a.text.search(/\S/), h = a.offset + (c === -1 ? 0 : c);
2897
+ for (const s of r) {
2898
+ const a = s.text.trim();
2899
+ if (!a) continue;
2900
+ const c = s.text.search(/\S/), f = s.offset + (c === -1 ? 0 : c);
2748
2901
  if (!n) {
2749
- n = s, o = h;
2902
+ n = a, o = f;
2750
2903
  continue;
2751
2904
  }
2752
- const u = `${n} ${s}`;
2905
+ const u = `${n} ${a}`;
2753
2906
  u.length <= 260 ? n = u : (i.push({
2754
2907
  text: n,
2755
2908
  offset: o
2756
- }), n = s, o = h);
2909
+ }), n = a, o = f);
2757
2910
  }
2758
2911
  return n && i.push({
2759
2912
  text: n,
@@ -2776,7 +2929,7 @@ var sa = class {
2776
2929
  }
2777
2930
  segmentSentences(e) {
2778
2931
  const t = this.getSegmentationPolicy();
2779
- return aa(e, {
2932
+ return Ia(e, {
2780
2933
  locale: t.locale,
2781
2934
  useSentenceSegmenter: t.useSentenceSegmenter
2782
2935
  });
@@ -2792,7 +2945,7 @@ var sa = class {
2792
2945
  return;
2793
2946
  }
2794
2947
  if (this.utterance = new SpeechSynthesisUtterance(e), this.config?.voice) {
2795
- const o = speechSynthesis.getVoices().find((a) => a.name === this.config.voice);
2948
+ const o = speechSynthesis.getVoices().find((s) => s.name === this.config.voice);
2796
2949
  o && (this.utterance.voice = o);
2797
2950
  }
2798
2951
  this.config?.rate && (this.utterance.rate = this.config.rate), this.config?.pitch && (this.utterance.pitch = this.config.pitch), this.utterance.onstart = () => {
@@ -2819,8 +2972,8 @@ var sa = class {
2819
2972
  r === this.speakRunId && (this._isPaused = !1);
2820
2973
  }, this.utterance.onboundary = (o) => {
2821
2974
  if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", o.name, "charIndex:", o.charIndex, "charLength:", o.charLength), o.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
2822
- const a = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), s = Number(o.charLength || 0), c = this.inferWordLength(e, a), h = Number.isFinite(s) && s > 0 && s <= 80 && a + s <= e.length ? s : c, u = e.substring(a, Math.min(e.length, a + h)).trim(), p = t + a;
2823
- console.log("[BrowserProvider] Calling onWordBoundary with word:", u, "at position:", p), this.onWordBoundary(u, p, h);
2975
+ const s = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), a = Number(o.charLength || 0), c = this.inferWordLength(e, s), f = Number.isFinite(a) && a > 0 && a <= 80 && s + a <= e.length ? a : c, u = e.substring(s, Math.min(e.length, s + f)).trim(), h = t + s;
2976
+ console.log("[BrowserProvider] Calling onWordBoundary with word:", u, "at position:", h), this.onWordBoundary(u, h, f);
2824
2977
  }, speechSynthesis.speak(this.utterance);
2825
2978
  });
2826
2979
  }
@@ -2845,7 +2998,7 @@ var sa = class {
2845
2998
  ...e.providerOptions || {}
2846
2999
  });
2847
3000
  }
2848
- }, ua = class {
3001
+ }, Ea = class {
2849
3002
  async emitTelemetry(e, t) {
2850
3003
  try {
2851
3004
  await this.config?.onTelemetry?.(e, t);
@@ -2877,7 +3030,7 @@ var sa = class {
2877
3030
  }
2878
3031
  async _initializeBrowserTTS(e) {
2879
3032
  if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
2880
- this.ttsProvider = new la(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
3033
+ this.ttsProvider = new $a(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
2881
3034
  }
2882
3035
  async _initializeServerTTS(e) {
2883
3036
  if (!e.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
@@ -2886,26 +3039,28 @@ var sa = class {
2886
3039
  toolId: "tts",
2887
3040
  operation: "server-provider-module-import",
2888
3041
  backend: e.serverProvider || e.backend
2889
- }), this.ttsProvider = new (await (async () => {
3042
+ });
3043
+ const r = await (async () => {
2890
3044
  try {
2891
- const r = await import("./dist-Bud4G4lv.js");
3045
+ const i = await import("./dist-DIBQdekL.js");
2892
3046
  return await this.emitTelemetry("pie-tool-library-load-success", {
2893
3047
  toolId: "tts",
2894
3048
  operation: "server-provider-module-import",
2895
3049
  backend: e.serverProvider || e.backend,
2896
3050
  duration: Date.now() - t
2897
- }), r;
2898
- } catch (r) {
3051
+ }), i;
3052
+ } catch (i) {
2899
3053
  throw await this.emitTelemetry("pie-tool-library-load-error", {
2900
3054
  toolId: "tts",
2901
3055
  operation: "server-provider-module-import",
2902
3056
  backend: e.serverProvider || e.backend,
2903
3057
  duration: Date.now() - t,
2904
3058
  errorType: "ToolLibraryLoadError",
2905
- message: r instanceof Error ? r.message : String(r)
2906
- }), r;
3059
+ message: i instanceof Error ? i.message : String(i)
3060
+ }), i;
2907
3061
  }
2908
- })()).ServerTTSProvider(), console.log(`[TTSToolProvider] Server TTS initialized (provider: ${e.serverProvider || e.backend})`);
3062
+ })();
3063
+ this.ttsProvider = new r.ServerTTSProvider(), console.log(`[TTSToolProvider] Server TTS initialized (provider: ${e.serverProvider || e.backend})`);
2909
3064
  }
2910
3065
  async createInstance(e) {
2911
3066
  if (!this.ttsProvider) throw new Error("[TTSToolProvider] Provider not initialized. Call initialize() first.");
@@ -2933,7 +3088,7 @@ var sa = class {
2933
3088
  destroy() {
2934
3089
  this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
2935
3090
  }
2936
- }, fa = /* @__PURE__ */ new Set([
3091
+ }, Ma = /* @__PURE__ */ new Set([
2937
3092
  "annotation-xml",
2938
3093
  "color-profile",
2939
3094
  "font-face",
@@ -2942,16 +3097,16 @@ var sa = class {
2942
3097
  "font-face-format",
2943
3098
  "font-face-name",
2944
3099
  "missing-glyph"
2945
- ]), da = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, ha = (e, t = "custom element tag") => {
3100
+ ]), Oa = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, xa = (e, t = "custom element tag") => {
2946
3101
  if (!e || typeof e != "string") throw new Error(`Invalid ${t}: expected a non-empty string`);
2947
3102
  const r = e.trim();
2948
3103
  if (!r) throw new Error(`Invalid ${t}: tag is empty`);
2949
3104
  if (r !== r.toLowerCase()) throw new Error(`Invalid ${t} "${r}": custom element names must be lowercase`);
2950
3105
  if (!r.includes("-")) throw new Error(`Invalid ${t} "${r}": custom element names must include a hyphen`);
2951
- if (fa.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
2952
- if (!da.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
3106
+ if (Ma.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
3107
+ if (!Oa.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
2953
3108
  return r;
2954
- }, Pn = {
3109
+ }, Wn = {
2955
3110
  calculator: "pie-tool-calculator",
2956
3111
  textToSpeech: "pie-tool-text-to-speech",
2957
3112
  ruler: "pie-tool-ruler",
@@ -2964,22 +3119,22 @@ var sa = class {
2964
3119
  annotationToolbar: "pie-tool-annotation-toolbar",
2965
3120
  graph: "pie-tool-graph",
2966
3121
  periodicTable: "pie-tool-periodic-table"
2967
- }, pa = (e, t) => ha(t?.toolTagMap?.[e] ?? Pn[e] ?? e, `tool component tag for "${e}"`), va = (e) => document.createElement(e), ue = (e, t, r, i) => {
2968
- const n = pa(e, i), o = i?.toolComponentFactories?.[e] ?? i?.toolComponentFactory;
3122
+ }, Pa = (e, t) => xa(t?.toolTagMap?.[e] ?? Wn[e] ?? e, `tool component tag for "${e}"`), La = (e) => document.createElement(e), pe = (e, t, r, i) => {
3123
+ const n = Pa(e, i), o = i?.toolComponentFactories?.[e] ?? i?.toolComponentFactory;
2969
3124
  return o ? o({
2970
3125
  toolId: e,
2971
3126
  tagName: n,
2972
3127
  context: t,
2973
3128
  toolbarContext: r
2974
- }) : va(n);
2975
- }, _a = {
3129
+ }) : La(n);
3130
+ }, Ra = {
2976
3131
  toolId: "calculator",
2977
3132
  name: "Calculator",
2978
3133
  description: "Multi-type calculator (basic, scientific, graphing)",
2979
3134
  icon: "calculator",
2980
3135
  provider: {
2981
3136
  getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
2982
- createProvider: () => new sa(),
3137
+ createProvider: () => new Sa(),
2983
3138
  getInitConfig: (e) => e?.provider?.init ?? {},
2984
3139
  getAuthFetcher: (e) => {
2985
3140
  const t = e?.provider?.runtime?.authFetcher;
@@ -3002,10 +3157,10 @@ var sa = class {
3002
3157
  "scientificCalculator"
3003
3158
  ],
3004
3159
  isVisibleInContext(e) {
3005
- return Bt(e);
3160
+ return Xt(e);
3006
3161
  },
3007
3162
  renderToolbar(e, t) {
3008
- const r = xr(this.toolId, t.scope.level, t.scope.scopeId), i = t.componentOverrides, n = ue(this.toolId, e, t, i);
3163
+ const r = Br(this.toolId, t.scope.level, t.scope.scopeId), i = t.componentOverrides, n = pe(this.toolId, e, t, i);
3009
3164
  n.setAttribute("tool-id", r), n.toolkitCoordinator = t.toolkitCoordinator;
3010
3165
  const o = {
3011
3166
  toolId: this.toolId,
@@ -3017,7 +3172,7 @@ var sa = class {
3017
3172
  onClick: () => t.toggleTool(this.toolId),
3018
3173
  active: t.isToolVisible(r)
3019
3174
  };
3020
- let a = o.active;
3175
+ let s = o.active;
3021
3176
  return n.visible = o.active, {
3022
3177
  toolId: this.toolId,
3023
3178
  elements: [{
@@ -3036,22 +3191,22 @@ var sa = class {
3036
3191
  }],
3037
3192
  button: o,
3038
3193
  sync: () => {
3039
- const s = t.isToolVisible(r);
3040
- o.active = s, o.ariaLabel = s ? "Close scientific calculator" : "Open scientific calculator", o.tooltip = s ? "Close calculator" : "Calculator", a !== s && (n.visible = s, a = s), n.toolkitCoordinator !== t.toolkitCoordinator && (n.toolkitCoordinator = t.toolkitCoordinator);
3194
+ const a = t.isToolVisible(r);
3195
+ o.active = a, o.ariaLabel = a ? "Close scientific calculator" : "Open scientific calculator", o.tooltip = a ? "Close calculator" : "Calculator", s !== a && (n.visible = a, s = a), n.toolkitCoordinator !== t.toolkitCoordinator && (n.toolkitCoordinator = t.toolkitCoordinator);
3041
3196
  },
3042
- subscribeActive: (s) => t.subscribeVisibility ? t.subscribeVisibility(() => {
3043
- s(t.isToolVisible(r));
3197
+ subscribeActive: (a) => t.subscribeVisibility ? t.subscribeVisibility(() => {
3198
+ a(t.isToolVisible(r));
3044
3199
  }) : () => {
3045
3200
  }
3046
3201
  };
3047
3202
  }
3048
- }, ga = /* @__PURE__ */ new Set([
3203
+ }, Ca = /* @__PURE__ */ new Set([
3049
3204
  "reserved-row",
3050
3205
  "expanding-row",
3051
3206
  "floating-overlay",
3052
3207
  "left-aligned"
3053
- ]), wi = (e) => e && typeof e == "object" ? e : {}, ma = (e) => e === "polly" || e === "google" || e === "server", U = (e, t) => e === void 0 ? t : e, zt = (e, t = "left-aligned") => typeof e == "string" && ga.has(e) ? e : t, Ti = Object.freeze([0.8, 1.25]), nr = (e) => {
3054
- if (!Array.isArray(e)) return [...Ti];
3208
+ ]), xi = (e) => e && typeof e == "object" ? e : {}, Na = (e) => e === "polly" || e === "google" || e === "server", q = (e, t) => e === void 0 ? t : e, Ut = (e, t = "left-aligned") => typeof e == "string" && Ca.has(e) ? e : t, Pi = Object.freeze([0.8, 1.25]), ur = (e) => {
3209
+ if (!Array.isArray(e)) return [...Pi];
3055
3210
  if (e.length === 0) return [];
3056
3211
  const t = /* @__PURE__ */ new Set();
3057
3212
  for (const r of e) {
@@ -3059,41 +3214,41 @@ var sa = class {
3059
3214
  const i = Math.round(r * 100) / 100;
3060
3215
  i !== 1 && t.add(i);
3061
3216
  }
3062
- return t.size ? Array.from(t) : [...Ti];
3063
- }, ya = (e) => {
3217
+ return t.size ? Array.from(t) : [...Pi];
3218
+ }, ja = (e) => {
3064
3219
  const t = {
3065
3220
  ...e,
3066
- layoutMode: zt(e.layoutMode)
3221
+ layoutMode: Ut(e.layoutMode)
3067
3222
  }, r = e.backend || "browser";
3068
- if (!ma(r)) return t;
3223
+ if (!Na(r)) return t;
3069
3224
  const i = {
3070
3225
  ...t,
3071
- apiEndpoint: U(t.apiEndpoint, "/api/tts"),
3072
- transportMode: U(t.transportMode, "pie"),
3073
- endpointValidationMode: U(t.endpointValidationMode, "voices"),
3074
- validateEndpoint: U(t.validateEndpoint, !0),
3075
- includeAuthOnAssetFetch: U(t.includeAuthOnAssetFetch, !1),
3076
- rate: U(t.rate, 1),
3077
- language: U(t.language, "en-US")
3226
+ apiEndpoint: q(t.apiEndpoint, "/api/tts"),
3227
+ transportMode: q(t.transportMode, "pie"),
3228
+ endpointValidationMode: q(t.endpointValidationMode, "voices"),
3229
+ validateEndpoint: q(t.validateEndpoint, !0),
3230
+ includeAuthOnAssetFetch: q(t.includeAuthOnAssetFetch, !1),
3231
+ rate: q(t.rate, 1),
3232
+ language: q(t.language, "en-US")
3078
3233
  };
3079
3234
  return r === "polly" ? {
3080
3235
  ...i,
3081
- defaultVoice: U(i.defaultVoice, "Joanna"),
3082
- engine: U(i.engine, "neural"),
3083
- format: U(i.format, "mp3"),
3084
- speechMarksMode: U(i.speechMarksMode, "word+sentence")
3236
+ defaultVoice: q(i.defaultVoice, "Joanna"),
3237
+ engine: q(i.engine, "neural"),
3238
+ format: q(i.format, "mp3"),
3239
+ speechMarksMode: q(i.speechMarksMode, "word+sentence")
3085
3240
  } : r === "google" ? {
3086
3241
  ...i,
3087
- defaultVoice: U(i.defaultVoice, "en-US-Wavenet-A")
3242
+ defaultVoice: q(i.defaultVoice, "en-US-Wavenet-A")
3088
3243
  } : i;
3089
- }, or = (e) => {
3090
- const t = wi(e), r = wi(e?.settings);
3091
- return ya({
3244
+ }, fr = (e) => {
3245
+ const t = xi(e), r = xi(e?.settings);
3246
+ return ja({
3092
3247
  ...t,
3093
3248
  ...r
3094
3249
  });
3095
- }, vr = (e) => e.backend || "browser", xn = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, Ln = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), ba = (e) => {
3096
- const t = vr(e), r = xn(e, t), i = Ln(e, r);
3250
+ }, Ir = (e) => e.backend || "browser", Hn = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, Fn = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), Da = (e) => {
3251
+ const t = Ir(e), r = Hn(e, t), i = Fn(e, r);
3097
3252
  return {
3098
3253
  voice: e.defaultVoice,
3099
3254
  rate: e.rate,
@@ -3117,8 +3272,8 @@ var sa = class {
3117
3272
  includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
3118
3273
  validateEndpoint: e.validateEndpoint
3119
3274
  };
3120
- }, Rn = (e) => zt(e.layoutMode), wa = (e) => {
3121
- switch (Rn(e)) {
3275
+ }, Bn = (e) => Ut(e.layoutMode), za = (e) => {
3276
+ switch (Bn(e)) {
3122
3277
  case "reserved-row":
3123
3278
  return {
3124
3279
  mount: "before-buttons",
@@ -3144,21 +3299,21 @@ var sa = class {
3144
3299
  }
3145
3300
  };
3146
3301
  }
3147
- }, st = /* @__PURE__ */ new Map(), Ta = "__pieToolElementUnmount", ki = "pie-tool-active-change", ka = {
3302
+ }, dt = /* @__PURE__ */ new Map(), Va = "__pieToolElementUnmount", Li = "pie-tool-active-change", Wa = {
3148
3303
  toolId: "textToSpeech",
3149
3304
  name: "Text to Speech",
3150
3305
  description: "Read content aloud",
3151
3306
  icon: "volume-up",
3152
3307
  provider: {
3153
3308
  getProviderId: () => "tts",
3154
- createProvider: (e) => new ua(vr(or(e))),
3309
+ createProvider: (e) => new Ea(Ir(fr(e))),
3155
3310
  getInitConfig: (e) => {
3156
- const t = or(e), r = vr(t), i = xn(t, r);
3311
+ const t = fr(e), r = Ir(t), i = Hn(t, r);
3157
3312
  return {
3158
3313
  backend: r,
3159
3314
  serverProvider: i,
3160
- transportMode: Ln(t, i),
3161
- ...ba(t)
3315
+ transportMode: Fn(t, i),
3316
+ ...Da(t)
3162
3317
  };
3163
3318
  },
3164
3319
  getAuthFetcher: (e) => {
@@ -3167,9 +3322,9 @@ var sa = class {
3167
3322
  },
3168
3323
  sanitizeConfig: (e) => {
3169
3324
  const t = e.settings && typeof e.settings == "object" ? { ...e.settings } : void 0;
3170
- t && "layoutMode" in t && (t.layoutMode = zt(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = nr(t.speedOptions));
3325
+ t && "layoutMode" in t && (t.layoutMode = Ut(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = ur(t.speedOptions));
3171
3326
  const r = { ...e };
3172
- return "layoutMode" in r && (r.layoutMode = zt(r.layoutMode)), "speedOptions" in r && (r.speedOptions = nr(r.speedOptions)), t && (r.settings = t), r;
3327
+ return "layoutMode" in r && (r.layoutMode = Ut(r.layoutMode)), "speedOptions" in r && (r.speedOptions = ur(r.speedOptions)), t && (r.settings = t), r;
3173
3328
  },
3174
3329
  lazy: !0
3175
3330
  },
@@ -3181,47 +3336,47 @@ var sa = class {
3181
3336
  "speechOutput"
3182
3337
  ],
3183
3338
  isVisibleInContext(e) {
3184
- return Ut(e);
3339
+ return Jt(e);
3185
3340
  },
3186
3341
  renderToolbar(e, t) {
3187
- const r = () => or(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), i = () => nr(r().speedOptions), n = () => Rn(r()), o = () => wa(r()), a = xr(this.toolId, t.scope.level, t.scope.scopeId), s = () => {
3342
+ const r = () => fr(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), i = () => ur(r().speedOptions), n = () => Bn(r()), o = () => za(r()), s = Br(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
3188
3343
  const u = t.ui?.size;
3189
3344
  return u === "sm" || u === "lg" ? u : "md";
3190
3345
  }, c = () => {
3191
- let u = st.get(a);
3192
- return u && typeof u.isConnected == "boolean" && !u.isConnected && (st.delete(a), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[Ta] = () => {
3193
- st.get(a) === u && st.delete(a);
3194
- }, st.set(a, u)), u.setAttribute("tool-id", a), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", s()), u.setAttribute("layout-mode", n()), u.speedOptions = i(), u;
3195
- }, h = o();
3346
+ let u = dt.get(s);
3347
+ return u && typeof u.isConnected == "boolean" && !u.isConnected && (dt.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[Va] = () => {
3348
+ dt.get(s) === u && dt.delete(s);
3349
+ }, dt.set(s, u)), u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", n()), u.speedOptions = i(), u;
3350
+ }, f = o();
3196
3351
  return {
3197
3352
  toolId: this.toolId,
3198
3353
  button: null,
3199
3354
  elements: [{
3200
3355
  element: c(),
3201
- mount: h.mount,
3356
+ mount: f.mount,
3202
3357
  layoutHints: { controlsRow: {
3203
- reserveSpace: h.controlsRow.reserveSpace,
3204
- showWhenToolActive: h.controlsRow.expandWhenToolActive
3358
+ reserveSpace: f.controlsRow.reserveSpace,
3359
+ showWhenToolActive: f.controlsRow.expandWhenToolActive
3205
3360
  } }
3206
3361
  }],
3207
3362
  subscribeActive: (u) => {
3208
- const p = c(), f = (v) => {
3363
+ const h = c(), d = (v) => {
3209
3364
  const _ = v.detail;
3210
3365
  u(_?.active === !0);
3211
3366
  };
3212
- return p.addEventListener(ki, f), () => {
3213
- p.removeEventListener(ki, f);
3367
+ return h.addEventListener(Li, d), () => {
3368
+ h.removeEventListener(Li, d);
3214
3369
  };
3215
3370
  },
3216
3371
  sync: () => {
3217
3372
  const u = c();
3218
- u.setAttribute("tool-id", a), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", s()), u.setAttribute("layout-mode", n()), u.speedOptions = i();
3373
+ u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", n()), u.speedOptions = i();
3219
3374
  }
3220
3375
  };
3221
3376
  }
3222
3377
  };
3223
- function ye(e, t) {
3224
- const r = xr(e, t.scope.level, t.scope.scopeId);
3378
+ function ke(e, t) {
3379
+ const r = Br(e, t.scope.level, t.scope.scopeId);
3225
3380
  return {
3226
3381
  fullToolId: r,
3227
3382
  isActive: () => t.isToolVisible(r),
@@ -3231,14 +3386,14 @@ function ye(e, t) {
3231
3386
  }
3232
3387
  };
3233
3388
  }
3234
- function be(e) {
3389
+ function Se(e) {
3235
3390
  const t = e.isActive();
3236
3391
  e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
3237
3392
  }
3238
- function Lr(e, t) {
3393
+ function Ur(e, t) {
3239
3394
  e.setAttribute("data-pie-tool-surface", t);
3240
3395
  }
3241
- var Sa = {
3396
+ var Ha = {
3242
3397
  toolId: "ruler",
3243
3398
  name: "Ruler",
3244
3399
  description: "On-screen ruler for measurements",
@@ -3250,10 +3405,10 @@ var Sa = {
3250
3405
  ],
3251
3406
  pnpSupportIds: ["ruler", "measurement"],
3252
3407
  isVisibleInContext(e) {
3253
- return Bt(e);
3408
+ return Xt(e);
3254
3409
  },
3255
3410
  renderToolbar(e, t) {
3256
- const r = ye(this.toolId, t), i = {
3411
+ const r = ke(this.toolId, t), i = {
3257
3412
  toolId: this.toolId,
3258
3413
  label: this.name,
3259
3414
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3262,8 +3417,8 @@ var Sa = {
3262
3417
  tooltip: "Ruler",
3263
3418
  onClick: () => t.toggleTool(this.toolId),
3264
3419
  active: r.isActive()
3265
- }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3266
- return o.setAttribute("tool-id", r.fullToolId), Lr(o, "frameless"), {
3420
+ }, n = t.componentOverrides ?? {}, o = pe(this.toolId, e, t, n);
3421
+ return o.setAttribute("tool-id", r.fullToolId), Ur(o, "frameless"), {
3267
3422
  toolId: this.toolId,
3268
3423
  button: i,
3269
3424
  elements: [{
@@ -3271,7 +3426,7 @@ var Sa = {
3271
3426
  mount: "after-buttons"
3272
3427
  }],
3273
3428
  sync: () => {
3274
- be({
3429
+ Se({
3275
3430
  button: i,
3276
3431
  overlay: o,
3277
3432
  isActive: r.isActive
@@ -3280,7 +3435,7 @@ var Sa = {
3280
3435
  subscribeActive: r.subscribeActive
3281
3436
  };
3282
3437
  }
3283
- }, $a = {
3438
+ }, Fa = {
3284
3439
  toolId: "protractor",
3285
3440
  name: "Protractor",
3286
3441
  description: "On-screen protractor for angle measurements",
@@ -3292,10 +3447,10 @@ var Sa = {
3292
3447
  ],
3293
3448
  pnpSupportIds: ["protractor", "angleMeasurement"],
3294
3449
  isVisibleInContext(e) {
3295
- return Bt(e);
3450
+ return Xt(e);
3296
3451
  },
3297
3452
  renderToolbar(e, t) {
3298
- const r = ye(this.toolId, t), i = {
3453
+ const r = ke(this.toolId, t), i = {
3299
3454
  toolId: this.toolId,
3300
3455
  label: this.name,
3301
3456
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3304,8 +3459,8 @@ var Sa = {
3304
3459
  tooltip: "Protractor",
3305
3460
  onClick: () => t.toggleTool(this.toolId),
3306
3461
  active: r.isActive()
3307
- }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3308
- return o.setAttribute("tool-id", r.fullToolId), Lr(o, "frameless"), {
3462
+ }, n = t.componentOverrides ?? {}, o = pe(this.toolId, e, t, n);
3463
+ return o.setAttribute("tool-id", r.fullToolId), Ur(o, "frameless"), {
3309
3464
  toolId: this.toolId,
3310
3465
  button: i,
3311
3466
  elements: [{
@@ -3313,7 +3468,7 @@ var Sa = {
3313
3468
  mount: "after-buttons"
3314
3469
  }],
3315
3470
  sync: () => {
3316
- be({
3471
+ Se({
3317
3472
  button: i,
3318
3473
  overlay: o,
3319
3474
  isActive: r.isActive
@@ -3322,7 +3477,7 @@ var Sa = {
3322
3477
  subscribeActive: r.subscribeActive
3323
3478
  };
3324
3479
  }
3325
- }, Ia = {
3480
+ }, Ba = {
3326
3481
  toolId: "answerEliminator",
3327
3482
  name: "Answer Eliminator",
3328
3483
  description: "Strike through answer choices",
@@ -3335,10 +3490,10 @@ var Sa = {
3335
3490
  "choiceMasking"
3336
3491
  ],
3337
3492
  isVisibleInContext(e) {
3338
- return ta(e);
3493
+ return ba(e);
3339
3494
  },
3340
3495
  renderToolbar(e, t) {
3341
- const r = ye(this.toolId, t), i = t.componentOverrides ?? {}, n = ue(this.toolId, e, t, i);
3496
+ const r = ke(this.toolId, t), i = t.componentOverrides ?? {}, n = pe(this.toolId, e, t, i);
3342
3497
  n.setAttribute("tool-id", r.fullToolId), n.setAttribute("strategy", "strikethrough"), n.setAttribute("button-alignment", "inline");
3343
3498
  const o = {
3344
3499
  toolId: this.toolId,
@@ -3358,18 +3513,18 @@ var Sa = {
3358
3513
  mount: "after-buttons"
3359
3514
  }],
3360
3515
  sync: () => {
3361
- be({
3516
+ Se({
3362
3517
  button: o,
3363
3518
  overlay: n,
3364
3519
  isActive: r.isActive
3365
3520
  }), t.toolCoordinator && (n.coordinator = t.toolCoordinator), n.scopeElement = t.getScopeElement?.() || null, t.elementToolStateStore && (n.elementToolStateStore = t.elementToolStateStore);
3366
- const a = t.getGlobalElementId?.();
3367
- a && (n.globalElementId = a);
3521
+ const s = t.getGlobalElementId?.();
3522
+ s && (n.globalElementId = s);
3368
3523
  },
3369
3524
  subscribeActive: r.subscribeActive
3370
3525
  };
3371
3526
  }
3372
- }, Aa = {
3527
+ }, Ua = {
3373
3528
  toolId: "highlighter",
3374
3529
  name: "Highlighter",
3375
3530
  description: "Highlight text",
@@ -3387,10 +3542,10 @@ var Sa = {
3387
3542
  "annotation"
3388
3543
  ],
3389
3544
  isVisibleInContext(e) {
3390
- return Ut(e);
3545
+ return Jt(e);
3391
3546
  },
3392
3547
  renderToolbar(e, t) {
3393
- const r = ye(this.toolId, t), i = {
3548
+ const r = ke(this.toolId, t), i = {
3394
3549
  toolId: this.toolId,
3395
3550
  label: this.name,
3396
3551
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3399,7 +3554,7 @@ var Sa = {
3399
3554
  tooltip: "Highlight",
3400
3555
  onClick: () => t.toggleTool(this.toolId),
3401
3556
  active: r.isActive()
3402
- }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3557
+ }, n = t.componentOverrides ?? {}, o = pe(this.toolId, e, t, n);
3403
3558
  return o.setAttribute("tool-id", r.fullToolId), {
3404
3559
  toolId: this.toolId,
3405
3560
  button: i,
@@ -3408,19 +3563,19 @@ var Sa = {
3408
3563
  mount: "after-buttons"
3409
3564
  }],
3410
3565
  sync: () => {
3411
- be({
3566
+ Se({
3412
3567
  button: i,
3413
3568
  overlay: o,
3414
3569
  isActive: r.isActive,
3415
- onActiveChange: (a) => {
3416
- o.enabled = a;
3570
+ onActiveChange: (s) => {
3571
+ o.enabled = s;
3417
3572
  }
3418
3573
  }), t.ttsService && (o.ttsService = t.ttsService);
3419
3574
  },
3420
3575
  subscribeActive: r.subscribeActive
3421
3576
  };
3422
3577
  }
3423
- }, Ea = {
3578
+ }, Ga = {
3424
3579
  toolId: "lineReader",
3425
3580
  name: "Line Reader",
3426
3581
  description: "Reading guide overlay",
@@ -3439,10 +3594,10 @@ var Sa = {
3439
3594
  "trackingGuide"
3440
3595
  ],
3441
3596
  isVisibleInContext(e) {
3442
- return Ut(e);
3597
+ return Jt(e);
3443
3598
  },
3444
3599
  renderToolbar(e, t) {
3445
- const r = ye(this.toolId, t), i = {
3600
+ const r = ke(this.toolId, t), i = {
3446
3601
  toolId: this.toolId,
3447
3602
  label: this.name,
3448
3603
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3451,8 +3606,8 @@ var Sa = {
3451
3606
  tooltip: "Line Reader",
3452
3607
  onClick: () => t.toggleTool(this.toolId),
3453
3608
  active: r.isActive()
3454
- }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3455
- return o.setAttribute("tool-id", r.fullToolId), Lr(o, "frameless"), {
3609
+ }, n = t.componentOverrides ?? {}, o = pe(this.toolId, e, t, n);
3610
+ return o.setAttribute("tool-id", r.fullToolId), Ur(o, "frameless"), {
3456
3611
  toolId: this.toolId,
3457
3612
  button: i,
3458
3613
  elements: [{
@@ -3460,7 +3615,7 @@ var Sa = {
3460
3615
  mount: "after-buttons"
3461
3616
  }],
3462
3617
  sync: () => {
3463
- be({
3618
+ Se({
3464
3619
  button: i,
3465
3620
  overlay: o,
3466
3621
  isActive: r.isActive
@@ -3469,7 +3624,7 @@ var Sa = {
3469
3624
  subscribeActive: r.subscribeActive
3470
3625
  };
3471
3626
  }
3472
- }, Ma = {
3627
+ }, qa = {
3473
3628
  toolId: "theme",
3474
3629
  name: "Theme",
3475
3630
  description: "Accessible themes and contrast",
@@ -3488,7 +3643,7 @@ var Sa = {
3488
3643
  return !0;
3489
3644
  },
3490
3645
  renderToolbar(e, t) {
3491
- const r = ye(this.toolId, t), i = {
3646
+ const r = ke(this.toolId, t), i = {
3492
3647
  toolId: this.toolId,
3493
3648
  label: this.name,
3494
3649
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3497,7 +3652,7 @@ var Sa = {
3497
3652
  tooltip: "Theme",
3498
3653
  onClick: () => t.toggleTool(this.toolId),
3499
3654
  active: r.isActive()
3500
- }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3655
+ }, n = t.componentOverrides ?? {}, o = pe(this.toolId, e, t, n);
3501
3656
  return o.setAttribute("tool-id", r.fullToolId), {
3502
3657
  toolId: this.toolId,
3503
3658
  button: i,
@@ -3516,7 +3671,7 @@ var Sa = {
3516
3671
  }
3517
3672
  }],
3518
3673
  sync: () => {
3519
- be({
3674
+ Se({
3520
3675
  button: i,
3521
3676
  overlay: o,
3522
3677
  isActive: r.isActive
@@ -3525,7 +3680,7 @@ var Sa = {
3525
3680
  subscribeActive: r.subscribeActive
3526
3681
  };
3527
3682
  }
3528
- }, Oa = {
3683
+ }, Ya = {
3529
3684
  toolId: "annotationToolbar",
3530
3685
  name: "Highlighter",
3531
3686
  description: "Highlight and annotate text",
@@ -3546,10 +3701,10 @@ var Sa = {
3546
3701
  "annotation"
3547
3702
  ],
3548
3703
  isVisibleInContext(e) {
3549
- return Ut(e);
3704
+ return Jt(e);
3550
3705
  },
3551
3706
  renderToolbar(e, t) {
3552
- const r = ye(this.toolId, t), i = {
3707
+ const r = ke(this.toolId, t), i = {
3553
3708
  toolId: this.toolId,
3554
3709
  label: this.name,
3555
3710
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3558,7 +3713,7 @@ var Sa = {
3558
3713
  tooltip: "Highlight",
3559
3714
  onClick: () => t.toggleTool(this.toolId),
3560
3715
  active: r.isActive()
3561
- }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3716
+ }, n = t.componentOverrides ?? {}, o = pe(this.toolId, e, t, n);
3562
3717
  return o.setAttribute("tool-id", r.fullToolId), {
3563
3718
  toolId: this.toolId,
3564
3719
  button: i,
@@ -3567,7 +3722,7 @@ var Sa = {
3567
3722
  mount: "after-buttons"
3568
3723
  }],
3569
3724
  sync: () => {
3570
- be({
3725
+ Se({
3571
3726
  button: i,
3572
3727
  overlay: o,
3573
3728
  isActive: r.isActive
@@ -3576,7 +3731,7 @@ var Sa = {
3576
3731
  subscribeActive: r.subscribeActive
3577
3732
  };
3578
3733
  }
3579
- }, Pa = {
3734
+ }, Ka = {
3580
3735
  toolId: "graph",
3581
3736
  name: "Graph",
3582
3737
  description: "Graphing calculator and coordinate plane",
@@ -3589,10 +3744,10 @@ var Sa = {
3589
3744
  "graphingTool"
3590
3745
  ],
3591
3746
  isVisibleInContext(e) {
3592
- return Bt(e);
3747
+ return Xt(e);
3593
3748
  },
3594
3749
  renderToolbar(e, t) {
3595
- const r = ye(this.toolId, t), i = {
3750
+ const r = ke(this.toolId, t), i = {
3596
3751
  toolId: this.toolId,
3597
3752
  label: this.name,
3598
3753
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3601,7 +3756,7 @@ var Sa = {
3601
3756
  tooltip: "Graph",
3602
3757
  onClick: () => t.toggleTool(this.toolId),
3603
3758
  active: r.isActive()
3604
- }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3759
+ }, n = t.componentOverrides ?? {}, o = pe(this.toolId, e, t, n);
3605
3760
  return o.setAttribute("tool-id", r.fullToolId), {
3606
3761
  toolId: this.toolId,
3607
3762
  button: i,
@@ -3620,7 +3775,7 @@ var Sa = {
3620
3775
  }
3621
3776
  }],
3622
3777
  sync: () => {
3623
- be({
3778
+ Se({
3624
3779
  button: i,
3625
3780
  overlay: o,
3626
3781
  isActive: r.isActive
@@ -3629,7 +3784,7 @@ var Sa = {
3629
3784
  subscribeActive: r.subscribeActive
3630
3785
  };
3631
3786
  }
3632
- }, xa = {
3787
+ }, Xa = {
3633
3788
  toolId: "periodicTable",
3634
3789
  name: "Periodic Table",
3635
3790
  description: "Chemistry periodic table reference",
@@ -3641,10 +3796,10 @@ var Sa = {
3641
3796
  "elementReference"
3642
3797
  ],
3643
3798
  isVisibleInContext(e) {
3644
- return ra(e);
3799
+ return ya(e);
3645
3800
  },
3646
3801
  renderToolbar(e, t) {
3647
- const r = ye(this.toolId, t), i = {
3802
+ const r = ke(this.toolId, t), i = {
3648
3803
  toolId: this.toolId,
3649
3804
  label: this.name,
3650
3805
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -3653,7 +3808,7 @@ var Sa = {
3653
3808
  tooltip: "Periodic Table",
3654
3809
  onClick: () => t.toggleTool(this.toolId),
3655
3810
  active: r.isActive()
3656
- }, n = t.componentOverrides ?? {}, o = ue(this.toolId, e, t, n);
3811
+ }, n = t.componentOverrides ?? {}, o = pe(this.toolId, e, t, n);
3657
3812
  return o.setAttribute("tool-id", r.fullToolId), {
3658
3813
  toolId: this.toolId,
3659
3814
  button: i,
@@ -3672,7 +3827,7 @@ var Sa = {
3672
3827
  }
3673
3828
  }],
3674
3829
  sync: () => {
3675
- be({
3830
+ Se({
3676
3831
  button: i,
3677
3832
  overlay: o,
3678
3833
  isActive: r.isActive
@@ -3681,54 +3836,54 @@ var Sa = {
3681
3836
  subscribeActive: r.subscribeActive
3682
3837
  };
3683
3838
  }
3684
- }, La = [
3685
- _a,
3686
- ka,
3687
- Sa,
3688
- $a,
3689
- Ia,
3690
- Aa,
3691
- Ea,
3692
- Ma,
3693
- Oa,
3694
- Pa,
3695
- xa
3839
+ }, Ja = [
3840
+ Ra,
3841
+ Wa,
3842
+ Ha,
3843
+ Fa,
3844
+ Ba,
3845
+ Ua,
3846
+ Ga,
3847
+ qa,
3848
+ Ya,
3849
+ Ka,
3850
+ Xa
3696
3851
  ];
3697
- function Ra(e = {}) {
3698
- const t = new Qs(), r = {
3852
+ function Qa(e = {}) {
3853
+ const t = new _a(), r = {
3699
3854
  toolTagMap: {
3700
- ...Pn,
3855
+ ...Wn,
3701
3856
  ...e.toolTagMap || {}
3702
3857
  },
3703
3858
  toolComponentFactory: e.toolComponentFactory,
3704
3859
  toolComponentFactories: e.toolComponentFactories
3705
3860
  }, i = (n) => e.overrides?.[n.toolId] || n;
3706
- return e.includePackagedTools && Ca(t, {
3861
+ return e.includePackagedTools && Za(t, {
3707
3862
  toolIds: e.toolIds,
3708
3863
  applyOverrides: i
3709
3864
  }), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(r), t;
3710
3865
  }
3711
- function Ca(e, t = {}) {
3866
+ function Za(e, t = {}) {
3712
3867
  const r = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, i = t.applyOverrides || ((n) => n);
3713
- for (const n of La)
3868
+ for (const n of Ja)
3714
3869
  r && !r.has(n.toolId) || e.register(i(n));
3715
3870
  }
3716
- function Na(e = {}) {
3717
- return Ra({
3871
+ function el(e = {}) {
3872
+ return Qa({
3718
3873
  ...e,
3719
3874
  includePackagedTools: !0
3720
3875
  });
3721
3876
  }
3722
- function Da() {
3723
- const e = Na(), t = /* @__PURE__ */ new Set();
3877
+ function tl() {
3878
+ const e = el(), t = /* @__PURE__ */ new Set();
3724
3879
  for (const r of e.getAllTools()) for (const i of r.pnpSupportIds || []) t.add(i);
3725
3880
  return [...t].sort();
3726
3881
  }
3727
- var ja = Da(), nl = {
3728
- supports: [...ja],
3882
+ var rl = tl(), wl = {
3883
+ supports: [...rl],
3729
3884
  prohibitedSupports: [],
3730
3885
  activateAtInit: []
3731
- }, za = {
3886
+ }, il = {
3732
3887
  visual: {
3733
3888
  magnification: "magnification",
3734
3889
  screenMagnifier: "screenMagnifier",
@@ -3841,15 +3996,26 @@ var ja = Da(), nl = {
3841
3996
  itemGlossary: "itemGlossary",
3842
3997
  tutorialAvailable: "tutorialAvailable"
3843
3998
  }
3844
- }, ol = Object.values(za).flatMap((e) => Object.values(e)), sl = En("ToolCoordinator"), _r;
3999
+ }, Tl = Object.values(il).flatMap((e) => Object.values(e)), kl = jn("ToolCoordinator"), $r;
3845
4000
  (function(e) {
3846
4001
  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";
3847
- })(_r || (_r = {}));
3848
- var Si;
4002
+ })($r || ($r = {}));
4003
+ var Ri;
3849
4004
  (function(e) {
3850
4005
  e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
3851
- })(Si || (Si = {}));
3852
- var Va = /* @__PURE__ */ Tn('<div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--top svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--bottom svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--left svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--right svelte-1a3d6dx" aria-hidden="true"></div>', 1), Wa = /* @__PURE__ */ Tn('<div class="pie-sr-only svelte-1a3d6dx" role="status" aria-live="polite" aria-atomic="true"> </div> <!> <div role="group" tabindex="0" aria-roledescription="Draggable and resizable reading guide overlay"><div class="pie-tool-line-reader__container svelte-1a3d6dx"></div> <div class="pie-tool-line-reader__resize-handle pie-tool-line-reader__resize-handle--bottom svelte-1a3d6dx" title="Drag to resize height" role="button" tabindex="-1" aria-label="Resize handle - drag to adjust height"><svg width="20" height="8" viewBox="0 0 20 8" aria-hidden="true"><rect x="8" y="3" width="4" height="2" fill="var(--pie-primary, #4CAF50)" rx="1"></rect></svg></div></div>', 1), Fa = {
4006
+ })(Ri || (Ri = {}));
4007
+ var Sl = da({
4008
+ policy: {
4009
+ allowed: [],
4010
+ blocked: []
4011
+ },
4012
+ placement: {
4013
+ section: [],
4014
+ item: [],
4015
+ passage: []
4016
+ },
4017
+ providers: {}
4018
+ }), nl = /* @__PURE__ */ xn('<div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--top svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--bottom svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--left svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--right svelte-1a3d6dx" aria-hidden="true"></div>', 1), ol = /* @__PURE__ */ xn('<div class="pie-sr-only svelte-1a3d6dx" role="status" aria-live="polite" aria-atomic="true"> </div> <!> <div role="group" tabindex="0" aria-roledescription="Draggable and resizable reading guide overlay"><div class="pie-tool-line-reader__container svelte-1a3d6dx"></div> <div class="pie-tool-line-reader__resize-handle pie-tool-line-reader__resize-handle--bottom svelte-1a3d6dx" title="Drag to resize height" role="button" tabindex="-1" aria-label="Resize handle - drag to adjust height"><svg width="20" height="8" viewBox="0 0 20 8" aria-hidden="true"><rect x="8" y="3" width="4" height="2" fill="var(--pie-primary, #4CAF50)" rx="1"></rect></svg></div></div>', 1), sl = {
3853
4019
  hash: "svelte-1a3d6dx",
3854
4020
  code: `.pie-sr-only.svelte-1a3d6dx {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;}.pie-tool-line-reader.svelte-1a3d6dx {border:none;cursor:move;overflow:visible;position:absolute;transform:translate(-50%, -50%);user-select:none;pointer-events:auto;touch-action:none;}.pie-tool-line-reader.svelte-1a3d6dx:focus-visible {outline:3px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2));outline-offset:2px;}.pie-tool-line-reader__container.svelte-1a3d6dx {width:100%;height:100%;position:relative;transition:background-color 0.2s ease;}.pie-tool-line-reader__resize-handle.svelte-1a3d6dx {position:absolute;cursor:ns-resize;z-index:10;display:flex;align-items:center;justify-content:center;}.pie-tool-line-reader__resize-handle--bottom.svelte-1a3d6dx {bottom:-12px;left:50%;transform:translateX(-50%);width:44px;height:24px;background-color:color-mix(in srgb, var(--pie-background, #fff) 90%, transparent);border-radius:12px;border:2px solid var(--pie-primary, #4caf50);}.pie-tool-line-reader__resize-handle.svelte-1a3d6dx:hover {background-color:color-mix(in srgb, var(--pie-primary, #4caf50) 20%, transparent);}.pie-tool-line-reader__resize-handle.svelte-1a3d6dx:active {cursor:ns-resize;}.pie-tool-line-reader.svelte-1a3d6dx:active {cursor:grabbing;}
3855
4021
 
@@ -3863,27 +4029,27 @@ var Va = /* @__PURE__ */ Tn('<div class="pie-tool-line-reader__mask pie-tool-lin
3863
4029
 
3864
4030
  /* In masking mode, the window should be transparent to show content underneath */.pie-tool-line-reader.pie-tool-line-reader--masking-mode.svelte-1a3d6dx .pie-tool-line-reader__container:where(.svelte-1a3d6dx) {background-color:transparent !important;}`
3865
4031
  };
3866
- function Ha(e, t) {
3867
- xi(t, !0), Es(e, Fa);
3868
- let r = gi(t, "visible", 7, !1), i = gi(t, "toolId", 7, "lineReader");
4032
+ function al(e, t) {
4033
+ Hi(t, !0), zs(e, sl);
4034
+ let r = Ai(t, "visible", 7, !1), i = Ai(t, "toolId", 7, "lineReader");
3869
4035
  const n = typeof window < "u";
3870
- let o = /* @__PURE__ */ x(void 0), a = /* @__PURE__ */ x(null);
3871
- const s = /* @__PURE__ */ ei(() => d(a)?.toolCoordinator);
3872
- let c = /* @__PURE__ */ x(!1), h = /* @__PURE__ */ x(!1), u = /* @__PURE__ */ x(se({
4036
+ let o = /* @__PURE__ */ P(void 0), s = /* @__PURE__ */ P(null);
4037
+ const a = /* @__PURE__ */ ui(() => p(s)?.toolCoordinator);
4038
+ let c = /* @__PURE__ */ P(!1), f = /* @__PURE__ */ P(!1), u = /* @__PURE__ */ P(ue({
3873
4039
  x: n ? window.innerWidth / 2 : 400,
3874
4040
  y: n ? window.innerHeight / 2 : 300
3875
- })), p = /* @__PURE__ */ x(se({
4041
+ })), h = /* @__PURE__ */ P(ue({
3876
4042
  width: 600,
3877
4043
  height: 60
3878
- })), f = /* @__PURE__ */ x(se({
4044
+ })), d = /* @__PURE__ */ P(ue({
3879
4045
  x: 0,
3880
4046
  y: 0
3881
- })), v = /* @__PURE__ */ x(se({
4047
+ })), v = /* @__PURE__ */ P(ue({
3882
4048
  width: 0,
3883
4049
  height: 0,
3884
4050
  mouseY: 0
3885
- })), _ = /* @__PURE__ */ x(""), m = /* @__PURE__ */ x("#ffff00"), b = /* @__PURE__ */ x(0.3), A = /* @__PURE__ */ x("highlight"), H = /* @__PURE__ */ x(!1);
3886
- const E = [
4051
+ })), _ = /* @__PURE__ */ P(""), m = /* @__PURE__ */ P("#ffff00"), b = /* @__PURE__ */ P(0.3), E = /* @__PURE__ */ P("highlight"), U = /* @__PURE__ */ P(!1);
4052
+ const M = [
3887
4053
  {
3888
4054
  name: "Yellow",
3889
4055
  value: "#ffff00"
@@ -3904,143 +4070,143 @@ function Ha(e, t) {
3904
4070
  name: "Orange",
3905
4071
  value: "#ffa500"
3906
4072
  }
3907
- ], B = 10, we = 10;
3908
- at(() => {
3909
- if (d(o))
3910
- return Ks(d(o), (w) => {
3911
- P(a, w, !0);
4073
+ ], G = 10, Ie = 10;
4074
+ ht(() => {
4075
+ if (p(o))
4076
+ return sa(p(o), (T) => {
4077
+ x(s, T, !0);
3912
4078
  });
3913
4079
  });
3914
- function W(w) {
3915
- P(_, w, !0), setTimeout(() => P(_, ""), 1e3);
3916
- }
3917
- function Cn() {
3918
- const w = (E.findIndex((C) => C.value === d(m)) + 1) % E.length;
3919
- P(m, E[w].value, !0), W(`Color changed to ${E[w].name}`);
3920
- }
3921
- function Rr(w) {
3922
- P(b, Math.max(0.1, Math.min(0.9, d(b) + w)), !0), W(`Opacity ${Math.round(d(b) * 100)}%`);
3923
- }
3924
- function Nn() {
3925
- P(A, d(A) === "highlight" ? "obscure" : "highlight", !0), W(`Mode changed to ${d(A) === "highlight" ? "highlight" : "masking"}`);
3926
- }
3927
- function Dn(w) {
3928
- w.target.closest(".resize-handle") ? zn(w) : jn(w);
3929
- }
3930
- function jn(w) {
3931
- d(o) && (d(o).setPointerCapture(w.pointerId), P(c, !0), P(f, {
3932
- x: w.clientX - d(u).x,
3933
- y: w.clientY - d(u).y
3934
- }, !0), d(s)?.bringToFront(d(o)), d(o).addEventListener("pointermove", Gt), d(o).addEventListener("pointerup", qt), w.preventDefault());
3935
- }
3936
- function zn(w) {
3937
- d(o) && (d(o).setPointerCapture(w.pointerId), P(h, !0), P(v, {
3938
- width: d(p).width,
3939
- height: d(p).height,
3940
- mouseY: w.clientY
3941
- }, !0), d(s)?.bringToFront(d(o)), d(o).addEventListener("pointermove", Gt), d(o).addEventListener("pointerup", qt), w.preventDefault(), w.stopPropagation());
3942
- }
3943
- function Gt(w) {
3944
- if (d(c)) P(u, {
3945
- x: w.clientX - d(f).x,
3946
- y: w.clientY - d(f).y
4080
+ function H(T) {
4081
+ x(_, T, !0), setTimeout(() => x(_, ""), 1e3);
4082
+ }
4083
+ function Un() {
4084
+ const T = (M.findIndex((C) => C.value === p(m)) + 1) % M.length;
4085
+ x(m, M[T].value, !0), H(`Color changed to ${M[T].name}`);
4086
+ }
4087
+ function Gr(T) {
4088
+ x(b, Math.max(0.1, Math.min(0.9, p(b) + T)), !0), H(`Opacity ${Math.round(p(b) * 100)}%`);
4089
+ }
4090
+ function Gn() {
4091
+ x(E, p(E) === "highlight" ? "obscure" : "highlight", !0), H(`Mode changed to ${p(E) === "highlight" ? "highlight" : "masking"}`);
4092
+ }
4093
+ function qn(T) {
4094
+ T.target.closest(".resize-handle") ? Kn(T) : Yn(T);
4095
+ }
4096
+ function Yn(T) {
4097
+ p(o) && (p(o).setPointerCapture(T.pointerId), x(c, !0), x(d, {
4098
+ x: T.clientX - p(u).x,
4099
+ y: T.clientY - p(u).y
4100
+ }, !0), p(a)?.bringToFront(p(o)), p(o).addEventListener("pointermove", Qt), p(o).addEventListener("pointerup", Zt), T.preventDefault());
4101
+ }
4102
+ function Kn(T) {
4103
+ p(o) && (p(o).setPointerCapture(T.pointerId), x(f, !0), x(v, {
4104
+ width: p(h).width,
4105
+ height: p(h).height,
4106
+ mouseY: T.clientY
4107
+ }, !0), p(a)?.bringToFront(p(o)), p(o).addEventListener("pointermove", Qt), p(o).addEventListener("pointerup", Zt), T.preventDefault(), T.stopPropagation());
4108
+ }
4109
+ function Qt(T) {
4110
+ if (p(c)) x(u, {
4111
+ x: T.clientX - p(d).x,
4112
+ y: T.clientY - p(d).y
3947
4113
  }, !0);
3948
- else if (d(h)) {
3949
- const C = w.clientY - d(v).mouseY;
3950
- d(p).height = Math.max(20, Math.min(400, d(v).height + C));
4114
+ else if (p(f)) {
4115
+ const C = T.clientY - p(v).mouseY;
4116
+ p(h).height = Math.max(20, Math.min(400, p(v).height + C));
3951
4117
  }
3952
4118
  }
3953
- function qt(w) {
3954
- d(o) && (d(o).releasePointerCapture(w.pointerId), d(o).removeEventListener("pointermove", Gt), d(o).removeEventListener("pointerup", qt), P(c, !1), P(h, !1));
4119
+ function Zt(T) {
4120
+ p(o) && (p(o).releasePointerCapture(T.pointerId), p(o).removeEventListener("pointermove", Qt), p(o).removeEventListener("pointerup", Zt), x(c, !1), x(f, !1));
3955
4121
  }
3956
- function Vn(w) {
4122
+ function Xn(T) {
3957
4123
  let C = !1;
3958
- switch (w.key) {
4124
+ switch (T.key) {
3959
4125
  case "ArrowUp":
3960
- d(u).y -= B, W(`Moved up to ${Math.round(d(u).y)}`), C = !0;
4126
+ p(u).y -= G, H(`Moved up to ${Math.round(p(u).y)}`), C = !0;
3961
4127
  break;
3962
4128
  case "ArrowDown":
3963
- d(u).y += B, W(`Moved down to ${Math.round(d(u).y)}`), C = !0;
4129
+ p(u).y += G, H(`Moved down to ${Math.round(p(u).y)}`), C = !0;
3964
4130
  break;
3965
4131
  case "ArrowLeft":
3966
- d(u).x -= B, W(`Moved left to ${Math.round(d(u).x)}`), C = !0;
4132
+ p(u).x -= G, H(`Moved left to ${Math.round(p(u).x)}`), C = !0;
3967
4133
  break;
3968
4134
  case "ArrowRight":
3969
- d(u).x += B, W(`Moved right to ${Math.round(d(u).x)}`), C = !0;
4135
+ p(u).x += G, H(`Moved right to ${Math.round(p(u).x)}`), C = !0;
3970
4136
  break;
3971
4137
  case "+":
3972
4138
  case "=":
3973
- d(p).height = Math.min(400, d(p).height + we), W(`Height ${d(p).height} pixels`), C = !0;
4139
+ p(h).height = Math.min(400, p(h).height + Ie), H(`Height ${p(h).height} pixels`), C = !0;
3974
4140
  break;
3975
4141
  case "-":
3976
4142
  case "_":
3977
- d(p).height = Math.max(20, d(p).height - we), W(`Height ${d(p).height} pixels`), C = !0;
4143
+ p(h).height = Math.max(20, p(h).height - Ie), H(`Height ${p(h).height} pixels`), C = !0;
3978
4144
  break;
3979
4145
  case "c":
3980
4146
  case "C":
3981
- Cn(), C = !0;
4147
+ Un(), C = !0;
3982
4148
  break;
3983
4149
  case "]":
3984
- Rr(0.1), C = !0;
4150
+ Gr(0.1), C = !0;
3985
4151
  break;
3986
4152
  case "[":
3987
- Rr(-0.1), C = !0;
4153
+ Gr(-0.1), C = !0;
3988
4154
  break;
3989
4155
  case "m":
3990
4156
  case "M":
3991
- Nn(), C = !0;
4157
+ Gn(), C = !0;
3992
4158
  break;
3993
4159
  }
3994
- C && w.preventDefault();
3995
- }
3996
- at(() => {
3997
- d(s) && i() && !d(H) && (d(s).registerTool(i(), "Line Reader", void 0, _r.TOOL), P(H, !0));
3998
- }), Is(() => () => {
3999
- d(s) && i() && d(s).unregisterTool(i());
4000
- }), at(() => {
4001
- d(s) && d(o) && i() && d(s).updateToolElement(i(), d(o));
4002
- }), at(() => {
4003
- r() && d(o) && setTimeout(() => d(o)?.focus(), 100);
4160
+ C && T.preventDefault();
4161
+ }
4162
+ ht(() => {
4163
+ p(a) && i() && !p(U) && (p(a).registerTool(i(), "Line Reader", void 0, $r.TOOL), x(U, !0));
4164
+ }), js(() => () => {
4165
+ p(a) && i() && p(a).unregisterTool(i());
4166
+ }), ht(() => {
4167
+ p(a) && p(o) && i() && p(a).updateToolElement(i(), p(o));
4168
+ }), ht(() => {
4169
+ r() && p(o) && setTimeout(() => p(o)?.focus(), 100);
4004
4170
  });
4005
- let Wn = /* @__PURE__ */ ei(() => d(m) + Math.round(d(b) * 255).toString(16).padStart(2, "0"));
4006
- var Fn = {
4171
+ let Jn = /* @__PURE__ */ ui(() => p(m) + Math.round(p(b) * 255).toString(16).padStart(2, "0"));
4172
+ var Qn = {
4007
4173
  get visible() {
4008
4174
  return r();
4009
4175
  },
4010
- set visible(w = !1) {
4011
- r(w), ar();
4176
+ set visible(T = !1) {
4177
+ r(T), _r();
4012
4178
  },
4013
4179
  get toolId() {
4014
4180
  return i();
4015
4181
  },
4016
- set toolId(w = "lineReader") {
4017
- i(w), ar();
4018
- }
4019
- }, Cr = gs(), Hn = Jt(Cr), Bn = (w) => {
4020
- var C = Wa(), Yt = Jt(C), Un = ri(Yt, !0);
4021
- Gr(Yt);
4022
- var Nr = nt(Yt, 2), Gn = (fe) => {
4023
- var bt = Va(), jr = Jt(bt), zr = nt(jr, 2), Vr = nt(zr, 2), Yn = nt(Vr, 2);
4024
- ii((Kn, Xn) => {
4025
- Fe(jr, `height: ${Kn ?? ""}px;`), Fe(zr, `top: ${d(u).y + d(p).height / 2}px;`), Fe(Vr, `top: ${d(u).y - d(p).height / 2}px; height: ${d(p).height ?? ""}px; width: ${Xn ?? ""}px;`), Fe(Yn, `top: ${d(u).y - d(p).height / 2}px; height: ${d(p).height ?? ""}px; left: ${d(u).x + d(p).width / 2}px;`);
4026
- }, [() => Math.max(0, d(u).y - d(p).height / 2), () => Math.max(0, d(u).x - d(p).width / 2)]), Et(fe, bt);
4182
+ set toolId(T = "lineReader") {
4183
+ i(T), _r();
4184
+ }
4185
+ }, qr = Es(), Zn = rr(qr), eo = (T) => {
4186
+ var C = ol(), er = rr(C), to = di(er, !0);
4187
+ ni(er);
4188
+ var Yr = ut(er, 2), ro = (ve) => {
4189
+ var It = nl(), Xr = rr(It), Jr = ut(Xr, 2), Qr = ut(Jr, 2), no = ut(Qr, 2);
4190
+ hi((oo, so) => {
4191
+ qe(Xr, `height: ${oo ?? ""}px;`), qe(Jr, `top: ${p(u).y + p(h).height / 2}px;`), qe(Qr, `top: ${p(u).y - p(h).height / 2}px; height: ${p(h).height ?? ""}px; width: ${so ?? ""}px;`), qe(no, `top: ${p(u).y - p(h).height / 2}px; height: ${p(h).height ?? ""}px; left: ${p(u).x + p(h).width / 2}px;`);
4192
+ }, [() => Math.max(0, p(u).y - p(h).height / 2), () => Math.max(0, p(u).x - p(h).width / 2)]), Rt(ve, It);
4027
4193
  };
4028
- fi(Nr, (fe) => {
4029
- d(A) === "obscure" && fe(Gn);
4194
+ wi(Yr, (ve) => {
4195
+ p(E) === "obscure" && ve(ro);
4030
4196
  });
4031
- var Te = nt(Nr, 2);
4032
- let Dr;
4033
- var qn = ri(Te);
4034
- Ei(2), Gr(Te), zs(Te, (fe) => P(o, fe), () => d(o)), ii((fe, bt) => {
4035
- Ts(Un, d(_)), Dr = Ps(Te, 1, "pie-tool-line-reader svelte-1a3d6dx", null, Dr, { "pie-tool-line-reader--masking-mode": d(A) === "obscure" }), Fe(Te, `left: ${d(u).x ?? ""}px; top: ${d(u).y ?? ""}px; width: ${d(p).width ?? ""}px; height: ${d(p).height ?? ""}px;`), Cs(Te, "aria-label", `Line Reader tool. Mode: ${d(A) === "highlight" ? "Highlight" : "Masking"}. Use arrow keys to move, +/- to resize height, C to change color, [ and ] to adjust opacity, M to toggle mode. Current color: ${fe ?? ""}, Opacity: ${bt ?? ""}%`), Fe(qn, `background-color: ${d(Wn) ?? ""};`);
4036
- }, [() => E.find((fe) => fe.value === d(m))?.name, () => Math.round(d(b) * 100)]), si("pointerdown", Te, Dn), si("keydown", Te, Vn), Et(w, C);
4197
+ var $e = ut(Yr, 2);
4198
+ let Kr;
4199
+ var io = di($e);
4200
+ Di(2), ni($e), Xs($e, (ve) => x(o, ve), () => p(o)), hi((ve, It) => {
4201
+ Ls(to, p(_)), Kr = Hs($e, 1, "pie-tool-line-reader svelte-1a3d6dx", null, Kr, { "pie-tool-line-reader--masking-mode": p(E) === "obscure" }), qe($e, `left: ${p(u).x ?? ""}px; top: ${p(u).y ?? ""}px; width: ${p(h).width ?? ""}px; height: ${p(h).height ?? ""}px;`), Gs($e, "aria-label", `Line Reader tool. Mode: ${p(E) === "highlight" ? "Highlight" : "Masking"}. Use arrow keys to move, +/- to resize height, C to change color, [ and ] to adjust opacity, M to toggle mode. Current color: ${ve ?? ""}, Opacity: ${It ?? ""}%`), qe(io, `background-color: ${p(Jn) ?? ""};`);
4202
+ }, [() => M.find((ve) => ve.value === p(m))?.name, () => Math.round(p(b) * 100)]), _i("pointerdown", $e, qn), _i("keydown", $e, Xn), Rt(T, C);
4037
4203
  };
4038
- return fi(Hn, (w) => {
4039
- r() && w(Bn);
4040
- }), Et(e, Cr), Li(Fn);
4204
+ return wi(Zn, (T) => {
4205
+ r() && T(eo);
4206
+ }), Rt(e, qr), Fi(Qn);
4041
4207
  }
4042
- hs(["pointerdown", "keydown"]);
4043
- customElements.define("pie-tool-line-reader", Hs(Ha, {
4208
+ Ss(["pointerdown", "keydown"]);
4209
+ customElements.define("pie-tool-line-reader", ea(al, {
4044
4210
  visible: {
4045
4211
  attribute: "visible",
4046
4212
  type: "Boolean"
@@ -4051,5 +4217,5 @@ customElements.define("pie-tool-line-reader", Hs(Ha, {
4051
4217
  }
4052
4218
  }, [], [], { mode: "open" }));
4053
4219
  export {
4054
- Ha as default
4220
+ al as default
4055
4221
  };