@pie-players/pie-section-player 0.3.30 → 0.3.32

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.
Files changed (40) hide show
  1. package/README.md +87 -24
  2. package/dist/chunks/tool-annotation-toolbar-db5bfbec.js +1018 -934
  3. package/dist/components/shared/player-preload.d.ts +88 -71
  4. package/dist/components/shared/player-preload.d.ts.map +1 -1
  5. package/dist/components/shared/section-player-host-runtime.d.ts +72 -0
  6. package/dist/components/shared/section-player-host-runtime.d.ts.map +1 -0
  7. package/dist/components/shared/section-player-runtime-callbacks.d.ts +33 -0
  8. package/dist/components/shared/section-player-runtime-callbacks.d.ts.map +1 -0
  9. package/dist/components/shared/section-player-view-state.d.ts.map +1 -1
  10. package/dist/contracts/host-hooks.d.ts +20 -0
  11. package/dist/contracts/host-hooks.d.ts.map +1 -1
  12. package/dist/contracts/layout-contract.d.ts +2 -2
  13. package/dist/contracts/layout-contract.d.ts.map +1 -1
  14. package/dist/contracts/layout-parity-metadata.d.ts.map +1 -1
  15. package/dist/contracts/public-events.d.ts +86 -10
  16. package/dist/contracts/public-events.d.ts.map +1 -1
  17. package/dist/contracts/stages.d.ts +11 -0
  18. package/dist/contracts/stages.d.ts.map +1 -0
  19. package/dist/controllers/SectionController.d.ts +9 -0
  20. package/dist/controllers/SectionController.d.ts.map +1 -1
  21. package/dist/controllers/toolkit-section-contracts.d.ts +1 -1
  22. package/dist/controllers/toolkit-section-contracts.d.ts.map +1 -1
  23. package/dist/controllers/types.d.ts +6 -0
  24. package/dist/controllers/types.d.ts.map +1 -1
  25. package/dist/pie-section-player.d.ts +2 -2
  26. package/dist/pie-section-player.d.ts.map +1 -1
  27. package/dist/pie-section-player.js +18407 -6465
  28. package/dist/policies/index.d.ts +21 -4
  29. package/dist/policies/index.d.ts.map +1 -1
  30. package/dist/policies/types.d.ts +0 -5
  31. package/dist/policies/types.d.ts.map +1 -1
  32. package/package.json +12 -15
  33. package/dist/chunks/player-preload-79b07366.js +0 -10093
  34. package/dist/components/shared/section-player-readiness.d.ts +0 -14
  35. package/dist/components/shared/section-player-readiness.d.ts.map +0 -1
  36. package/dist/components/shared/section-player-runtime.d.ts +0 -154
  37. package/dist/components/shared/section-player-runtime.d.ts.map +0 -1
  38. package/dist/utils/player-preload.d.ts +0 -2
  39. package/dist/utils/player-preload.d.ts.map +0 -1
  40. package/dist/utils/player-preload.js +0 -8
@@ -1,14 +1,14 @@
1
1
  import { t as y } from "./defineProperty-CyepwRr5-3800a70a.js";
2
2
  if (typeof window < "u") {
3
- var _n, Cn;
4
- ((_n = (Cn = window).__svelte ?? (Cn.__svelte = {})).v ?? (_n.v = /* @__PURE__ */ new Set())).add("5");
3
+ var Ln, Pn;
4
+ ((Ln = (Pn = window).__svelte ?? (Pn.__svelte = {})).v ?? (Ln.v = /* @__PURE__ */ new Set())).add("5");
5
5
  }
6
- var pe = {}, W = Symbol(), ii = Array.isArray, Tr = Array.prototype.indexOf, ve = Array.prototype.includes, bo = Array.from, lo = Object.keys, co = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, Ir = Object.getOwnPropertyDescriptors, kr = Object.prototype, $r = Array.prototype, ri = Object.getPrototypeOf, En = Object.isExtensible, Sr = () => {
6
+ var me = {}, N = Symbol(), li = Array.isArray, Ar = Array.prototype.indexOf, be = Array.prototype.includes, To = Array.from, ho = Object.keys, fo = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, xr = Object.getOwnPropertyDescriptors, _r = Object.prototype, Cr = Array.prototype, ci = Object.getPrototypeOf, On = Object.isExtensible, Er = () => {
7
7
  };
8
- function Ar(t) {
8
+ function Mr(t) {
9
9
  for (var e = 0; e < t.length; e++) t[e]();
10
10
  }
11
- function si() {
11
+ function ui() {
12
12
  var t, e;
13
13
  return {
14
14
  promise: new Promise((o, n) => {
@@ -18,54 +18,54 @@ function si() {
18
18
  reject: e
19
19
  };
20
20
  }
21
- var nt = 1024, vt = 2048, se = 4096, Qo = 8192, xr = 16384, tn = 32768, Mn = 1 << 25, en = 65536, Te = 1 << 19, _r = 1 << 20, Me = 1 << 25, We = 65536, Ln = 1 << 21, Cr = 1 << 22, uo = 1 << 23, Le = Symbol("$state"), ai = Symbol("legacy props"), Er = Symbol(""), Mt = new class extends Error {
21
+ var nt = 1024, vt = 2048, ce = 4096, nn = 8192, Lr = 16384, rn = 32768, Rn = 1 << 25, sn = 65536, $e = 1 << 19, Pr = 1 << 20, Oe = 1 << 25, ze = 65536, jn = 1 << 21, Or = 1 << 22, po = 1 << 23, Re = Symbol("$state"), di = Symbol("legacy props"), Rr = Symbol(""), Mt = new class extends Error {
22
22
  constructor(...t) {
23
23
  super(...t), y(this, "name", "StaleReactionError"), y(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
24
24
  }
25
- }(), Mr = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
26
- function Lr() {
25
+ }(), jr = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
26
+ function Nr() {
27
27
  throw new Error("https://svelte.dev/e/async_derived_orphan");
28
28
  }
29
- function Pr(t, e, o) {
29
+ function Wr(t, e, o) {
30
30
  throw new Error("https://svelte.dev/e/each_key_duplicate");
31
31
  }
32
- function Or(t) {
32
+ function Vr(t) {
33
33
  throw new Error("https://svelte.dev/e/effect_in_teardown");
34
34
  }
35
- function Rr() {
35
+ function zr() {
36
36
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
37
37
  }
38
- function Nr(t) {
38
+ function qr(t) {
39
39
  throw new Error("https://svelte.dev/e/effect_orphan");
40
40
  }
41
- function Wr() {
41
+ function Dr() {
42
42
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
43
43
  }
44
- function Vr() {
44
+ function Hr() {
45
45
  throw new Error("https://svelte.dev/e/hydration_failed");
46
46
  }
47
- function jr(t) {
47
+ function Br(t) {
48
48
  throw new Error("https://svelte.dev/e/props_invalid_value");
49
49
  }
50
- function zr() {
50
+ function Fr() {
51
51
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
52
52
  }
53
- function qr() {
53
+ function Gr() {
54
54
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
55
55
  }
56
- function Hr() {
56
+ function Ur() {
57
57
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
58
58
  }
59
- function Dr() {
59
+ function Jr() {
60
60
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
61
61
  }
62
- function Br() {
62
+ function Kr() {
63
63
  console.warn("https://svelte.dev/e/derived_inert");
64
64
  }
65
- function yo(t) {
65
+ function Io(t) {
66
66
  console.warn("https://svelte.dev/e/hydration_mismatch");
67
67
  }
68
- function Fr() {
68
+ function Zr() {
69
69
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
70
70
  }
71
71
  var P = !1;
@@ -74,25 +74,25 @@ function Lt(t) {
74
74
  }
75
75
  var L;
76
76
  function U(t) {
77
- if (t === null) throw yo(), pe;
77
+ if (t === null) throw Io(), me;
78
78
  return L = t;
79
79
  }
80
- function wo() {
80
+ function ko() {
81
81
  return U(/* @__PURE__ */ St(L));
82
82
  }
83
- function Be(t) {
83
+ function Ue(t) {
84
84
  if (P) {
85
- if (/* @__PURE__ */ St(L) !== null) throw yo(), pe;
85
+ if (/* @__PURE__ */ St(L) !== null) throw Io(), me;
86
86
  L = t;
87
87
  }
88
88
  }
89
- function Gr(t = 1) {
89
+ function Yr(t = 1) {
90
90
  if (P) {
91
91
  for (var e = t, o = L; e--; ) o = /* @__PURE__ */ St(o);
92
92
  L = o;
93
93
  }
94
94
  }
95
- function ho(t = !0) {
95
+ function vo(t = !0) {
96
96
  for (var e = 0, o = L; ; ) {
97
97
  if (o.nodeType === 8) {
98
98
  var n = o.data;
@@ -105,74 +105,74 @@ function ho(t = !0) {
105
105
  t && o.remove(), o = i;
106
106
  }
107
107
  }
108
- function li(t) {
109
- if (!t || t.nodeType !== 8) throw yo(), pe;
108
+ function hi(t) {
109
+ if (!t || t.nodeType !== 8) throw Io(), me;
110
110
  return t.data;
111
111
  }
112
- function ci(t) {
112
+ function fi(t) {
113
113
  return t === this.v;
114
114
  }
115
- function Ur(t, e) {
115
+ function Xr(t, e) {
116
116
  return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
117
117
  }
118
- function ui(t) {
119
- return !Ur(t, this.v);
118
+ function pi(t) {
119
+ return !Xr(t, this.v);
120
120
  }
121
- var Pt = !1, To = !1, j = null;
122
- function ge(t) {
123
- j = t;
121
+ var Pt = !1, $o = !1, V = null;
122
+ function ye(t) {
123
+ V = t;
124
124
  }
125
- function di(t, e = !1, o) {
126
- j = {
127
- p: j,
125
+ function vi(t, e = !1, o) {
126
+ V = {
127
+ p: V,
128
128
  i: !1,
129
129
  c: null,
130
130
  e: null,
131
131
  s: t,
132
132
  x: null,
133
133
  r: S,
134
- l: To && !e ? {
134
+ l: $o && !e ? {
135
135
  s: null,
136
136
  u: null,
137
137
  $: []
138
138
  } : null
139
139
  };
140
140
  }
141
- function hi(t) {
142
- var e = j, o = e.e;
141
+ function gi(t) {
142
+ var e = V, o = e.e;
143
143
  if (o !== null) {
144
144
  e.e = null;
145
- for (var n of o) ji(n);
145
+ for (var n of o) Hi(n);
146
146
  }
147
- return t !== void 0 && (e.x = t), e.i = !0, j = e.p, t ?? {};
147
+ return t !== void 0 && (e.x = t), e.i = !0, V = e.p, t ?? {};
148
148
  }
149
- function Ve() {
150
- return !To || j !== null && j.l === null;
149
+ function qe() {
150
+ return !$o || V !== null && V.l === null;
151
151
  }
152
- var Kt = [];
153
- function fi() {
154
- var t = Kt;
155
- Kt = [], Ar(t);
152
+ var Zt = [];
153
+ function mi() {
154
+ var t = Zt;
155
+ Zt = [], Mr(t);
156
156
  }
157
- function ne(t) {
158
- if (Kt.length === 0 && !Pe) {
159
- var e = Kt;
157
+ function se(t) {
158
+ if (Zt.length === 0 && !je) {
159
+ var e = Zt;
160
160
  queueMicrotask(() => {
161
- e === Kt && fi();
161
+ e === Zt && mi();
162
162
  });
163
163
  }
164
- Kt.push(t);
164
+ Zt.push(t);
165
165
  }
166
- function Kr() {
167
- for (; Kt.length > 0; ) fi();
166
+ function Qr() {
167
+ for (; Zt.length > 0; ) mi();
168
168
  }
169
- function pi(t) {
169
+ function bi(t) {
170
170
  var e = S;
171
- if (e === null) return _.f |= uo, t;
171
+ if (e === null) return _.f |= po, t;
172
172
  if (!(e.f & 32768) && !(e.f & 4)) throw t;
173
- Ht(t, e);
173
+ Bt(t, e);
174
174
  }
175
- function Ht(t, e) {
175
+ function Bt(t, e) {
176
176
  for (; e !== null; ) {
177
177
  if (e.f & 128) {
178
178
  if (!(e.f & 32768)) throw t;
@@ -187,36 +187,36 @@ function Ht(t, e) {
187
187
  }
188
188
  throw t;
189
189
  }
190
- var Jr = ~(vt | se | nt);
191
- function N(t, e) {
192
- t.f = t.f & Jr | e;
190
+ var ts = ~(vt | ce | nt);
191
+ function j(t, e) {
192
+ t.f = t.f & ts | e;
193
193
  }
194
- function on(t) {
195
- t.f & 512 || t.deps === null ? N(t, nt) : N(t, se);
194
+ function an(t) {
195
+ t.f & 512 || t.deps === null ? j(t, nt) : j(t, ce);
196
196
  }
197
- function vi(t) {
198
- if (t !== null) for (const e of t) !(e.f & 2) || !(e.f & 65536) || (e.f ^= We, vi(e.deps));
197
+ function yi(t) {
198
+ if (t !== null) for (const e of t) !(e.f & 2) || !(e.f & 65536) || (e.f ^= ze, yi(e.deps));
199
199
  }
200
- function gi(t, e, o) {
201
- t.f & 2048 ? e.add(t) : t.f & 4096 && o.add(t), vi(t.deps), N(t, nt);
200
+ function wi(t, e, o) {
201
+ t.f & 2048 ? e.add(t) : t.f & 4096 && o.add(t), yi(t.deps), j(t, nt);
202
202
  }
203
- var Zr = !1, Fe = !1;
204
- function Yr(t) {
205
- var e = Fe;
203
+ var es = !1, Je = !1;
204
+ function os(t) {
205
+ var e = Je;
206
206
  try {
207
- return Fe = !1, [t(), Fe];
207
+ return Je = !1, [t(), Je];
208
208
  } finally {
209
- Fe = e;
209
+ Je = e;
210
210
  }
211
211
  }
212
- function mi(t, e) {
212
+ function Ti(t, e) {
213
213
  if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object");
214
214
  }
215
- function nn(t, e) {
216
- mi(t, e), e.add(t);
215
+ function ln(t, e) {
216
+ Ti(t, e), e.add(t);
217
217
  }
218
218
  function I(t, e, o) {
219
- mi(t, e), e.set(t, o);
219
+ Ti(t, e), e.set(t, o);
220
220
  }
221
221
  function E(t, e, o) {
222
222
  if (typeof t == "function" ? t === e : t.has(e)) return arguments.length < 3 ? e : o;
@@ -228,27 +228,27 @@ function c(t, e) {
228
228
  function $(t, e, o) {
229
229
  return t.set(E(t, e), o), o;
230
230
  }
231
- var bi, It = /* @__PURE__ */ new Set(), x = null, q = null, jo = null, Pe = !1, Ao = !1, me = null, fo = null, yi = 0, Xr = 1, po = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), zo = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), to = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), ae = class wi {
231
+ var Ii, It = /* @__PURE__ */ new Set(), x = null, q = null, Ho = null, je = !1, Co = !1, we = null, go = null, ki = 0, ns = 1, mo = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), oo = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), Bo = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), no = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), ue = class $i {
232
232
  constructor() {
233
- nn(this, F), y(this, "id", Xr++), y(this, "current", /* @__PURE__ */ new Map()), y(this, "previous", /* @__PURE__ */ new Map()), I(this, po, /* @__PURE__ */ new Set()), I(this, Ge, /* @__PURE__ */ new Set()), I(this, $e, /* @__PURE__ */ new Set()), I(this, Ut, /* @__PURE__ */ new Map()), I(this, jt, /* @__PURE__ */ new Map()), I(this, Qe, null), I(this, dt, []), I(this, zo, []), I(this, be, /* @__PURE__ */ new Set()), I(this, Xt, /* @__PURE__ */ new Set()), I(this, qt, /* @__PURE__ */ new Map()), I(this, to, /* @__PURE__ */ new Set()), y(this, "is_fork", !1), I(this, Ue, !1), I(this, fe, /* @__PURE__ */ new Set());
233
+ ln(this, F), y(this, "id", ns++), y(this, "current", /* @__PURE__ */ new Map()), y(this, "previous", /* @__PURE__ */ new Map()), I(this, mo, /* @__PURE__ */ new Set()), I(this, Ke, /* @__PURE__ */ new Set()), I(this, xe, /* @__PURE__ */ new Set()), I(this, Kt, /* @__PURE__ */ new Map()), I(this, qt, /* @__PURE__ */ new Map()), I(this, oo, null), I(this, dt, []), I(this, Bo, []), I(this, Te, /* @__PURE__ */ new Set()), I(this, te, /* @__PURE__ */ new Set()), I(this, Ht, /* @__PURE__ */ new Map()), I(this, no, /* @__PURE__ */ new Set()), y(this, "is_fork", !1), I(this, Ze, !1), I(this, ge, /* @__PURE__ */ new Set());
234
234
  }
235
235
  skip_effect(e) {
236
- c(qt, this).has(e) || c(qt, this).set(e, {
236
+ c(Ht, this).has(e) || c(Ht, this).set(e, {
237
237
  d: [],
238
238
  m: []
239
- }), c(to, this).delete(e);
239
+ }), c(no, this).delete(e);
240
240
  }
241
241
  unskip_effect(e, o = (n) => this.schedule(n)) {
242
- var n = c(qt, this).get(e);
242
+ var n = c(Ht, this).get(e);
243
243
  if (n) {
244
- c(qt, this).delete(e);
245
- for (var i of n.d) N(i, vt), o(i);
246
- for (i of n.m) N(i, se), o(i);
244
+ c(Ht, this).delete(e);
245
+ for (var i of n.d) j(i, vt), o(i);
246
+ for (i of n.m) j(i, ce), o(i);
247
247
  }
248
- c(to, this).add(e);
248
+ c(no, this).add(e);
249
249
  }
250
250
  capture(e, o, n = !1) {
251
- e.v !== W && !this.previous.has(e) && this.previous.set(e, e.v), e.f & 8388608 || (this.current.set(e, [o, n]), q?.set(e, o)), this.is_fork || (e.v = o);
251
+ e.v !== N && !this.previous.has(e) && this.previous.set(e, e.v), e.f & 8388608 || (this.current.set(e, [o, n]), q?.set(e, o)), this.is_fork || (e.v = o);
252
252
  }
253
253
  activate() {
254
254
  x = this;
@@ -258,60 +258,60 @@ var bi, It = /* @__PURE__ */ new Set(), x = null, q = null, jo = null, Pe = !1,
258
258
  }
259
259
  flush() {
260
260
  try {
261
- Ao = !0, x = this, E(F, this, rn).call(this);
261
+ Co = !0, x = this, E(F, this, cn).call(this);
262
262
  } finally {
263
- yi = 0, jo = null, me = null, fo = null, Ao = !1, x = null, q = null, ee.clear();
263
+ ki = 0, Ho = null, we = null, go = null, Co = !1, x = null, q = null, ne.clear();
264
264
  }
265
265
  }
266
266
  discard() {
267
- for (const e of c(Ge, this)) e(this);
268
- c(Ge, this).clear(), c($e, this).clear(), It.delete(this);
267
+ for (const e of c(Ke, this)) e(this);
268
+ c(Ke, this).clear(), c(xe, this).clear(), It.delete(this);
269
269
  }
270
270
  register_created_effect(e) {
271
- c(zo, this).push(e);
271
+ c(Bo, this).push(e);
272
272
  }
273
273
  increment(e, o) {
274
- let n = c(Ut, this).get(o) ?? 0;
275
- if (c(Ut, this).set(o, n + 1), e) {
276
- let i = c(jt, this).get(o) ?? 0;
277
- c(jt, this).set(o, i + 1);
274
+ let n = c(Kt, this).get(o) ?? 0;
275
+ if (c(Kt, this).set(o, n + 1), e) {
276
+ let i = c(qt, this).get(o) ?? 0;
277
+ c(qt, this).set(o, i + 1);
278
278
  }
279
279
  }
280
280
  decrement(e, o, n) {
281
- let i = c(Ut, this).get(o) ?? 0;
282
- if (i === 1 ? c(Ut, this).delete(o) : c(Ut, this).set(o, i - 1), e) {
283
- let r = c(jt, this).get(o) ?? 0;
284
- r === 1 ? c(jt, this).delete(o) : c(jt, this).set(o, r - 1);
281
+ let i = c(Kt, this).get(o) ?? 0;
282
+ if (i === 1 ? c(Kt, this).delete(o) : c(Kt, this).set(o, i - 1), e) {
283
+ let r = c(qt, this).get(o) ?? 0;
284
+ r === 1 ? c(qt, this).delete(o) : c(qt, this).set(o, r - 1);
285
285
  }
286
- c(Ue, this) || n || ($(Ue, this, !0), ne(() => {
287
- $(Ue, this, !1), this.flush();
286
+ c(Ze, this) || n || ($(Ze, this, !0), se(() => {
287
+ $(Ze, this, !1), this.flush();
288
288
  }));
289
289
  }
290
290
  transfer_effects(e, o) {
291
- for (const n of e) c(be, this).add(n);
292
- for (const n of o) c(Xt, this).add(n);
291
+ for (const n of e) c(Te, this).add(n);
292
+ for (const n of o) c(te, this).add(n);
293
293
  e.clear(), o.clear();
294
294
  }
295
295
  oncommit(e) {
296
- c(po, this).add(e);
296
+ c(mo, this).add(e);
297
297
  }
298
298
  ondiscard(e) {
299
- c(Ge, this).add(e);
299
+ c(Ke, this).add(e);
300
300
  }
301
301
  on_fork_commit(e) {
302
- c($e, this).add(e);
302
+ c(xe, this).add(e);
303
303
  }
304
304
  run_fork_commit_callbacks() {
305
- for (const e of c($e, this)) e(this);
306
- c($e, this).clear();
305
+ for (const e of c(xe, this)) e(this);
306
+ c(xe, this).clear();
307
307
  }
308
308
  settled() {
309
- return (c(Qe, this) ?? $(Qe, this, si())).promise;
309
+ return (c(oo, this) ?? $(oo, this, ui())).promise;
310
310
  }
311
311
  static ensure() {
312
312
  if (x === null) {
313
- const e = x = new wi();
314
- Ao || (It.add(x), Pe || ne(() => {
313
+ const e = x = new $i();
314
+ Co || (It.add(x), je || se(() => {
315
315
  x === e && e.flush();
316
316
  }));
317
317
  }
@@ -327,19 +327,19 @@ var bi, It = /* @__PURE__ */ new Set(), x = null, q = null, jo = null, Pe = !1,
327
327
  for (const n of It) if (!(n === this || n.is_fork)) {
328
328
  var e = !1, o = !1;
329
329
  if (n.id < this.id) for (const [i, [, r]] of n.current) r || (e || (e = this.current.has(i)), o || (o = !this.current.has(i)));
330
- if (e && o) c(fe, this).add(n);
330
+ if (e && o) c(ge, this).add(n);
331
331
  else for (const [i, r] of n.previous) q.has(i) || q.set(i, r);
332
332
  }
333
333
  }
334
334
  schedule(e) {
335
- if (jo = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
335
+ if (Ho = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
336
336
  e.b.defer_effect(e);
337
337
  return;
338
338
  }
339
339
  for (var o = e; o.parent !== null; ) {
340
340
  o = o.parent;
341
341
  var n = o.f;
342
- if (me !== null && o === S && (Pt || (_ === null || !(_.f & 2)) && !Zr)) return;
342
+ if (we !== null && o === S && (Pt || (_ === null || !(_.f & 2)) && !es)) return;
343
343
  if (n & 96) {
344
344
  if (!(n & 1024)) return;
345
345
  o.f ^= nt;
@@ -348,14 +348,14 @@ var bi, It = /* @__PURE__ */ new Set(), x = null, q = null, jo = null, Pe = !1,
348
348
  c(dt, this).push(o);
349
349
  }
350
350
  };
351
- bi = ae;
352
- function qo() {
353
- return this.is_fork || c(jt, this).size > 0;
351
+ Ii = ue;
352
+ function Fo() {
353
+ return this.is_fork || c(qt, this).size > 0;
354
354
  }
355
- function Qr() {
356
- for (const o of c(fe, this)) for (const n of c(jt, o).keys()) {
355
+ function is() {
356
+ for (const o of c(ge, this)) for (const n of c(qt, o).keys()) {
357
357
  for (var t = !1, e = n; e.parent !== null; ) {
358
- if (c(qt, this).has(e)) {
358
+ if (c(Ht, this).has(e)) {
359
359
  t = !0;
360
360
  break;
361
361
  }
@@ -365,44 +365,44 @@ function Qr() {
365
365
  }
366
366
  return !1;
367
367
  }
368
- function rn() {
369
- if (yi++ > 1e3 && (It.delete(this), es()), !E(F, this, qo).call(this)) {
370
- for (const s of c(be, this)) c(Xt, this).delete(s), N(s, vt), this.schedule(s);
371
- for (const s of c(Xt, this)) N(s, se), this.schedule(s);
368
+ function cn() {
369
+ if (ki++ > 1e3 && (It.delete(this), ss()), !E(F, this, Fo).call(this)) {
370
+ for (const s of c(Te, this)) c(te, this).delete(s), j(s, vt), this.schedule(s);
371
+ for (const s of c(te, this)) j(s, ce), this.schedule(s);
372
372
  }
373
373
  const t = c(dt, this);
374
374
  $(dt, this, []), this.apply();
375
- var e = me = [], o = [], n = fo = [];
375
+ var e = we = [], o = [], n = go = [];
376
376
  for (const s of t) try {
377
- E(F, this, Ti).call(this, s, e, o);
377
+ E(F, this, Si).call(this, s, e, o);
378
378
  } catch (a) {
379
- throw $i(s), a;
379
+ throw _i(s), a;
380
380
  }
381
381
  if (x = null, n.length > 0) {
382
- var i = bi.ensure();
382
+ var i = Ii.ensure();
383
383
  for (const s of n) i.schedule(s);
384
384
  }
385
- if (me = null, fo = null, E(F, this, qo).call(this) || E(F, this, Qr).call(this)) {
386
- E(F, this, Ho).call(this, o), E(F, this, Ho).call(this, e);
387
- for (const [s, a] of c(qt, this)) ki(s, a);
385
+ if (we = null, go = null, E(F, this, Fo).call(this) || E(F, this, is).call(this)) {
386
+ E(F, this, Go).call(this, o), E(F, this, Go).call(this, e);
387
+ for (const [s, a] of c(Ht, this)) xi(s, a);
388
388
  } else {
389
- c(Ut, this).size === 0 && It.delete(this), c(be, this).clear(), c(Xt, this).clear();
390
- for (const s of c(po, this)) s(this);
391
- c(po, this).clear(), Pn(o), Pn(e), c(Qe, this)?.resolve();
389
+ c(Kt, this).size === 0 && It.delete(this), c(Te, this).clear(), c(te, this).clear();
390
+ for (const s of c(mo, this)) s(this);
391
+ c(mo, this).clear(), Nn(o), Nn(e), c(oo, this)?.resolve();
392
392
  }
393
393
  var r = x;
394
394
  if (c(dt, this).length > 0) {
395
395
  const s = r ?? (r = this);
396
396
  c(dt, s).push(...c(dt, this).filter((a) => !c(dt, s).includes(a)));
397
397
  }
398
- r !== null && (It.add(r), E(F, r, rn).call(r)), Pt && !It.has(this) && E(F, this, ts).call(this);
398
+ r !== null && (It.add(r), E(F, r, cn).call(r)), Pt && !It.has(this) && E(F, this, rs).call(this);
399
399
  }
400
- function Ti(t, e, o) {
400
+ function Si(t, e, o) {
401
401
  t.f ^= nt;
402
402
  for (var n = t.first; n !== null; ) {
403
403
  var i = n.f, r = (i & 96) !== 0;
404
- if (!(r && i & 1024 || i & 8192 || c(qt, this).has(n)) && n.fn !== null) {
405
- r ? n.f ^= nt : i & 4 ? e.push(n) : Pt && i & 16777224 ? o.push(n) : je(n) && (i & 16 && c(Xt, this).add(n), we(n));
404
+ if (!(r && i & 1024 || i & 8192 || c(Ht, this).has(n)) && n.fn !== null) {
405
+ r ? n.f ^= nt : i & 4 ? e.push(n) : Pt && i & 16777224 ? o.push(n) : De(n) && (i & 16 && c(te, this).add(n), ke(n));
406
406
  var s = n.first;
407
407
  if (s !== null) {
408
408
  n = s;
@@ -419,10 +419,10 @@ function Ti(t, e, o) {
419
419
  }
420
420
  }
421
421
  }
422
- function Ho(t) {
423
- for (var e = 0; e < t.length; e += 1) gi(t[e], c(be, this), c(Xt, this));
422
+ function Go(t) {
423
+ for (var e = 0; e < t.length; e += 1) wi(t[e], c(Te, this), c(te, this));
424
424
  }
425
- function ts() {
425
+ function rs() {
426
426
  for (const l of It) {
427
427
  var t = l.id < this.id, e = [];
428
428
  for (const [d, [h, f]] of this.current) {
@@ -436,53 +436,53 @@ function ts() {
436
436
  var n = [...l.current.keys()].filter((d) => !this.current.has(d));
437
437
  if (n.length === 0) t && l.discard();
438
438
  else if (e.length > 0) {
439
- if (t) for (const d of c(to, this)) l.unskip_effect(d, (h) => {
440
- h.f & 4194320 ? l.schedule(h) : E(F, l, Ho).call(l, [h]);
439
+ if (t) for (const d of c(no, this)) l.unskip_effect(d, (h) => {
440
+ h.f & 4194320 ? l.schedule(h) : E(F, l, Go).call(l, [h]);
441
441
  });
442
442
  l.activate();
443
443
  var i = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
444
- for (var s of e) Ii(s, n, i, r);
444
+ for (var s of e) Ai(s, n, i, r);
445
445
  r = /* @__PURE__ */ new Map();
446
446
  var a = [...l.current.keys()].filter((d) => this.current.has(d) ? this.current.get(d)[0] !== d : !0);
447
- for (const d of c(zo, this)) !(d.f & 155648) && sn(d, a, r) && (d.f & 4194320 ? (N(d, vt), l.schedule(d)) : c(be, l).add(d));
447
+ for (const d of c(Bo, this)) !(d.f & 155648) && un(d, a, r) && (d.f & 4194320 ? (j(d, vt), l.schedule(d)) : c(Te, l).add(d));
448
448
  if (c(dt, l).length > 0) {
449
449
  l.apply();
450
- for (var u of c(dt, l)) E(F, l, Ti).call(l, u, [], []);
450
+ for (var u of c(dt, l)) E(F, l, Si).call(l, u, [], []);
451
451
  $(dt, l, []);
452
452
  }
453
453
  l.deactivate();
454
454
  }
455
455
  }
456
- for (const l of It) c(fe, l).has(this) && (c(fe, l).delete(this), c(fe, l).size === 0 && !E(F, l, qo).call(l) && (l.activate(), E(F, l, rn).call(l)));
456
+ for (const l of It) c(ge, l).has(this) && (c(ge, l).delete(this), c(ge, l).size === 0 && !E(F, l, Fo).call(l) && (l.activate(), E(F, l, cn).call(l)));
457
457
  }
458
- function eo(t) {
459
- var e = Pe;
460
- Pe = !0;
458
+ function io(t) {
459
+ var e = je;
460
+ je = !0;
461
461
  try {
462
462
  var o;
463
463
  for (t && (x !== null && !x.is_fork && x.flush(), o = t()); ; ) {
464
- if (Kr(), x === null) return o;
464
+ if (Qr(), x === null) return o;
465
465
  x.flush();
466
466
  }
467
467
  } finally {
468
- Pe = e;
468
+ je = e;
469
469
  }
470
470
  }
471
- function es() {
471
+ function ss() {
472
472
  try {
473
- Wr();
473
+ Dr();
474
474
  } catch (t) {
475
- Ht(t, jo);
475
+ Bt(t, Ho);
476
476
  }
477
477
  }
478
478
  var wt = null;
479
- function Pn(t) {
479
+ function Nn(t) {
480
480
  var e = t.length;
481
481
  if (e !== 0) {
482
482
  for (var o = 0; o < e; ) {
483
483
  var n = t[o++];
484
- if (!(n.f & 24576) && je(n) && (wt = /* @__PURE__ */ new Set(), we(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Hi(n), wt?.size > 0)) {
485
- ee.clear();
484
+ if (!(n.f & 24576) && De(n) && (wt = /* @__PURE__ */ new Set(), ke(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Gi(n), wt?.size > 0)) {
485
+ ne.clear();
486
486
  for (const i of wt) {
487
487
  if (i.f & 24576) continue;
488
488
  const r = [i];
@@ -490,7 +490,7 @@ function Pn(t) {
490
490
  for (; s !== null; ) wt.has(s) && (wt.delete(s), r.push(s)), s = s.parent;
491
491
  for (let a = r.length - 1; a >= 0; a--) {
492
492
  const u = r[a];
493
- u.f & 24576 || we(u);
493
+ u.f & 24576 || ke(u);
494
494
  }
495
495
  }
496
496
  wt.clear();
@@ -499,69 +499,69 @@ function Pn(t) {
499
499
  wt = null;
500
500
  }
501
501
  }
502
- function Ii(t, e, o, n) {
502
+ function Ai(t, e, o, n) {
503
503
  if (!o.has(t) && (o.add(t), t.reactions !== null)) for (const i of t.reactions) {
504
504
  const r = i.f;
505
- r & 2 ? Ii(i, e, o, n) : r & 4194320 && !(r & 2048) && sn(i, e, n) && (N(i, vt), an(i));
505
+ r & 2 ? Ai(i, e, o, n) : r & 4194320 && !(r & 2048) && un(i, e, n) && (j(i, vt), dn(i));
506
506
  }
507
507
  }
508
- function sn(t, e, o) {
508
+ function un(t, e, o) {
509
509
  const n = o.get(t);
510
510
  if (n !== void 0) return n;
511
511
  if (t.deps !== null) for (const i of t.deps) {
512
- if (ve.call(e, i)) return !0;
513
- if (i.f & 2 && sn(i, e, o)) return o.set(i, !0), !0;
512
+ if (be.call(e, i)) return !0;
513
+ if (i.f & 2 && un(i, e, o)) return o.set(i, !0), !0;
514
514
  }
515
515
  return o.set(t, !1), !1;
516
516
  }
517
- function an(t) {
517
+ function dn(t) {
518
518
  x.schedule(t);
519
519
  }
520
- function ki(t, e) {
520
+ function xi(t, e) {
521
521
  if (!(t.f & 32 && t.f & 1024)) {
522
- t.f & 2048 ? e.d.push(t) : t.f & 4096 && e.m.push(t), N(t, nt);
523
- for (var o = t.first; o !== null; ) ki(o, e), o = o.next;
522
+ t.f & 2048 ? e.d.push(t) : t.f & 4096 && e.m.push(t), j(t, nt);
523
+ for (var o = t.first; o !== null; ) xi(o, e), o = o.next;
524
524
  }
525
525
  }
526
- function $i(t) {
527
- N(t, nt);
528
- for (var e = t.first; e !== null; ) $i(e), e = e.next;
526
+ function _i(t) {
527
+ j(t, nt);
528
+ for (var e = t.first; e !== null; ) _i(e), e = e.next;
529
529
  }
530
- function os(t) {
531
- let e = 0, o = ie(0), n;
530
+ function as(t) {
531
+ let e = 0, o = ae(0), n;
532
532
  return () => {
533
- fn() && (g(o), pn(() => (e === 0 && (n = yn(() => t(() => Oe(o)))), e += 1, () => {
534
- ne(() => {
535
- e -= 1, e === 0 && (n?.(), n = void 0, Oe(o));
533
+ mn() && (g(o), bn(() => (e === 0 && (n = kn(() => t(() => Ne(o)))), e += 1, () => {
534
+ se(() => {
535
+ e -= 1, e === 0 && (n?.(), n = void 0, Ne(o));
536
536
  });
537
537
  })));
538
538
  };
539
539
  }
540
- var ns = en | Te;
541
- function is(t, e, o, n) {
542
- new rs(t, e, o, n);
540
+ var ls = sn | $e;
541
+ function cs(t, e, o, n) {
542
+ new us(t, e, o, n);
543
543
  }
544
- var ft = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), Bo = /* @__PURE__ */ new WeakMap(), Fo = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakSet(), rs = class {
544
+ var ft = /* @__PURE__ */ new WeakMap(), Uo = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), Jo = /* @__PURE__ */ new WeakMap(), Ko = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakSet(), us = class {
545
545
  constructor(t, e, o, n) {
546
- nn(this, z), y(this, "parent", void 0), y(this, "is_pending", !1), y(this, "transform_error", void 0), I(this, ft, void 0), I(this, Do, P ? L : null), I(this, Tt, void 0), I(this, Re, void 0), I(this, et, void 0), I(this, kt, null), I(this, X, null), I(this, ut, null), I(this, Qt, null), I(this, ue, 0), I(this, te, 0), I(this, Ke, !1), I(this, Bo, /* @__PURE__ */ new Set()), I(this, Fo, /* @__PURE__ */ new Set()), I(this, Ft, null), I(this, On, os(() => ($(Ft, this, ie(c(ue, this))), () => {
547
- $(Ft, this, null);
548
- }))), $(ft, this, t), $(Tt, this, e), $(Re, this, (i) => {
546
+ ln(this, z), y(this, "parent", void 0), y(this, "is_pending", !1), y(this, "transform_error", void 0), I(this, ft, void 0), I(this, Uo, P ? L : null), I(this, Tt, void 0), I(this, We, void 0), I(this, et, void 0), I(this, kt, null), I(this, X, null), I(this, ut, null), I(this, ee, null), I(this, fe, 0), I(this, oe, 0), I(this, Ye, !1), I(this, Jo, /* @__PURE__ */ new Set()), I(this, Ko, /* @__PURE__ */ new Set()), I(this, Ut, null), I(this, Wn, as(() => ($(Ut, this, ae(c(fe, this))), () => {
547
+ $(Ut, this, null);
548
+ }))), $(ft, this, t), $(Tt, this, e), $(We, this, (i) => {
549
549
  var r = S;
550
550
  r.b = this, r.f |= 128, o(i);
551
- }), this.parent = S.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), $(et, this, vn(() => {
551
+ }), this.parent = S.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), $(et, this, yn(() => {
552
552
  if (P) {
553
- const i = c(Do, this);
554
- wo();
553
+ const i = c(Uo, this);
554
+ ko();
555
555
  const r = i.data === "[!";
556
556
  if (i.data.startsWith("[?")) {
557
557
  const s = JSON.parse(i.data.slice(2));
558
- E(z, this, as).call(this, s);
559
- } else r ? E(z, this, ls).call(this) : E(z, this, ss).call(this);
560
- } else E(z, this, Si).call(this);
561
- }, ns)), P && $(ft, this, L);
558
+ E(z, this, hs).call(this, s);
559
+ } else r ? E(z, this, fs).call(this) : E(z, this, ds).call(this);
560
+ } else E(z, this, Ci).call(this);
561
+ }, ls)), P && $(ft, this, L);
562
562
  }
563
563
  defer_effect(t) {
564
- gi(t, c(Bo, this), c(Fo, this));
564
+ wi(t, c(Jo, this), c(Ko, this));
565
565
  }
566
566
  is_rendered() {
567
567
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
@@ -570,204 +570,204 @@ var ft = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), Tt =
570
570
  return !!c(Tt, this).pending;
571
571
  }
572
572
  update_pending_count(t, e) {
573
- E(z, this, Ai).call(this, t, e), $(ue, this, c(ue, this) + t), !(!c(Ft, this) || c(Ke, this)) && ($(Ke, this, !0), ne(() => {
574
- $(Ke, this, !1), c(Ft, this) && ye(c(Ft, this), c(ue, this));
573
+ E(z, this, Ei).call(this, t, e), $(fe, this, c(fe, this) + t), !(!c(Ut, this) || c(Ye, this)) && ($(Ye, this, !0), se(() => {
574
+ $(Ye, this, !1), c(Ut, this) && Ie(c(Ut, this), c(fe, this));
575
575
  }));
576
576
  }
577
577
  get_effect_pending() {
578
- return c(On, this).call(this), g(c(Ft, this));
578
+ return c(Wn, this).call(this), g(c(Ut, this));
579
579
  }
580
580
  error(t) {
581
581
  if (!c(Tt, this).onerror && !c(Tt, this).failed) throw t;
582
582
  x?.is_fork ? (c(kt, this) && x.skip_effect(c(kt, this)), c(X, this) && x.skip_effect(c(X, this)), c(ut, this) && x.skip_effect(c(ut, this)), x.on_fork_commit(() => {
583
- E(z, this, Rn).call(this, t);
584
- })) : E(z, this, Rn).call(this, t);
583
+ E(z, this, Vn).call(this, t);
584
+ })) : E(z, this, Vn).call(this, t);
585
585
  }
586
586
  };
587
- function ss() {
587
+ function ds() {
588
588
  try {
589
- $(kt, this, it(() => c(Re, this).call(this, c(ft, this))));
589
+ $(kt, this, it(() => c(We, this).call(this, c(ft, this))));
590
590
  } catch (t) {
591
591
  this.error(t);
592
592
  }
593
593
  }
594
- function as(t) {
594
+ function hs(t) {
595
595
  const e = c(Tt, this).failed;
596
596
  e && $(ut, this, it(() => {
597
597
  e(c(ft, this), () => t, () => () => {
598
598
  });
599
599
  }));
600
600
  }
601
- function ls() {
601
+ function fs() {
602
602
  const t = c(Tt, this).pending;
603
- t && (this.is_pending = !0, $(X, this, it(() => t(c(ft, this)))), ne(() => {
604
- var e = $(Qt, this, document.createDocumentFragment()), o = pt();
605
- e.append(o), $(kt, this, E(z, this, Go).call(this, () => it(() => c(Re, this).call(this, o)))), c(te, this) === 0 && (c(ft, this).before(e), $(Qt, this, null), le(c(X, this), () => {
603
+ t && (this.is_pending = !0, $(X, this, it(() => t(c(ft, this)))), se(() => {
604
+ var e = $(ee, this, document.createDocumentFragment()), o = pt();
605
+ e.append(o), $(kt, this, E(z, this, Zo).call(this, () => it(() => c(We, this).call(this, o)))), c(oe, this) === 0 && (c(ft, this).before(e), $(ee, this, null), de(c(X, this), () => {
606
606
  $(X, this, null);
607
- }), E(z, this, ln).call(this, x));
607
+ }), E(z, this, hn).call(this, x));
608
608
  }));
609
609
  }
610
- function Si() {
610
+ function Ci() {
611
611
  try {
612
- if (this.is_pending = this.has_pending_snippet(), $(te, this, 0), $(ue, this, 0), $(kt, this, it(() => {
613
- c(Re, this).call(this, c(ft, this));
614
- })), c(te, this) > 0) {
615
- var t = $(Qt, this, document.createDocumentFragment());
616
- bn(c(kt, this), t);
612
+ if (this.is_pending = this.has_pending_snippet(), $(oe, this, 0), $(fe, this, 0), $(kt, this, it(() => {
613
+ c(We, this).call(this, c(ft, this));
614
+ })), c(oe, this) > 0) {
615
+ var t = $(ee, this, document.createDocumentFragment());
616
+ In(c(kt, this), t);
617
617
  const e = c(Tt, this).pending;
618
618
  $(X, this, it(() => e(c(ft, this))));
619
- } else E(z, this, ln).call(this, x);
619
+ } else E(z, this, hn).call(this, x);
620
620
  } catch (e) {
621
621
  this.error(e);
622
622
  }
623
623
  }
624
- function ln(t) {
625
- this.is_pending = !1, t.transfer_effects(c(Bo, this), c(Fo, this));
624
+ function hn(t) {
625
+ this.is_pending = !1, t.transfer_effects(c(Jo, this), c(Ko, this));
626
626
  }
627
- function Go(t) {
628
- var e = S, o = _, n = j;
629
- $t(c(et, this)), rt(c(et, this)), ge(c(et, this).ctx);
627
+ function Zo(t) {
628
+ var e = S, o = _, n = V;
629
+ $t(c(et, this)), rt(c(et, this)), ye(c(et, this).ctx);
630
630
  try {
631
- return ae.ensure(), t();
631
+ return ue.ensure(), t();
632
632
  } catch (i) {
633
- return pi(i), null;
633
+ return bi(i), null;
634
634
  } finally {
635
- $t(e), rt(o), ge(n);
635
+ $t(e), rt(o), ye(n);
636
636
  }
637
637
  }
638
- function Ai(t, e) {
638
+ function Ei(t, e) {
639
639
  if (!this.has_pending_snippet()) {
640
640
  if (this.parent) {
641
641
  var o;
642
- E(z, o = this.parent, Ai).call(o, t, e);
642
+ E(z, o = this.parent, Ei).call(o, t, e);
643
643
  }
644
644
  return;
645
645
  }
646
- $(te, this, c(te, this) + t), c(te, this) === 0 && (E(z, this, ln).call(this, e), c(X, this) && le(c(X, this), () => {
646
+ $(oe, this, c(oe, this) + t), c(oe, this) === 0 && (E(z, this, hn).call(this, e), c(X, this) && de(c(X, this), () => {
647
647
  $(X, this, null);
648
- }), c(Qt, this) && (c(ft, this).before(c(Qt, this)), $(Qt, this, null)));
648
+ }), c(ee, this) && (c(ft, this).before(c(ee, this)), $(ee, this, null)));
649
649
  }
650
- function Rn(t) {
651
- c(kt, this) && (H(c(kt, this)), $(kt, this, null)), c(X, this) && (H(c(X, this)), $(X, this, null)), c(ut, this) && (H(c(ut, this)), $(ut, this, null)), P && (U(c(Do, this)), Gr(), U(ho()));
650
+ function Vn(t) {
651
+ c(kt, this) && (D(c(kt, this)), $(kt, this, null)), c(X, this) && (D(c(X, this)), $(X, this, null)), c(ut, this) && (D(c(ut, this)), $(ut, this, null)), P && (U(c(Uo, this)), Yr(), U(vo()));
652
652
  var e = c(Tt, this).onerror;
653
653
  let o = c(Tt, this).failed;
654
654
  var n = !1, i = !1;
655
655
  const r = () => {
656
656
  if (n) {
657
- Fr();
657
+ Zr();
658
658
  return;
659
659
  }
660
- n = !0, i && Dr(), c(ut, this) !== null && le(c(ut, this), () => {
660
+ n = !0, i && Jr(), c(ut, this) !== null && de(c(ut, this), () => {
661
661
  $(ut, this, null);
662
- }), E(z, this, Go).call(this, () => {
663
- E(z, this, Si).call(this);
662
+ }), E(z, this, Zo).call(this, () => {
663
+ E(z, this, Ci).call(this);
664
664
  });
665
665
  }, s = (a) => {
666
666
  try {
667
667
  i = !0, e?.(a, r), i = !1;
668
668
  } catch (u) {
669
- Ht(u, c(et, this) && c(et, this).parent);
669
+ Bt(u, c(et, this) && c(et, this).parent);
670
670
  }
671
- o && $(ut, this, E(z, this, Go).call(this, () => {
671
+ o && $(ut, this, E(z, this, Zo).call(this, () => {
672
672
  try {
673
673
  return it(() => {
674
674
  var u = S;
675
675
  u.b = this, u.f |= 128, o(c(ft, this), () => a, () => r);
676
676
  });
677
677
  } catch (u) {
678
- return Ht(u, c(et, this).parent), null;
678
+ return Bt(u, c(et, this).parent), null;
679
679
  }
680
680
  }));
681
681
  };
682
- ne(() => {
682
+ se(() => {
683
683
  var a;
684
684
  try {
685
685
  a = this.transform_error(t);
686
686
  } catch (u) {
687
- Ht(u, c(et, this) && c(et, this).parent);
687
+ Bt(u, c(et, this) && c(et, this).parent);
688
688
  return;
689
689
  }
690
- a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (u) => Ht(u, c(et, this) && c(et, this).parent)) : s(a);
690
+ a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (u) => Bt(u, c(et, this) && c(et, this).parent)) : s(a);
691
691
  });
692
692
  }
693
- function cs(t, e, o, n) {
694
- const i = Ve() ? Io : cn;
693
+ function ps(t, e, o, n) {
694
+ const i = qe() ? So : fn;
695
695
  var r = t.filter((f) => !f.settled);
696
696
  if (o.length === 0 && r.length === 0) {
697
697
  n(e.map(i));
698
698
  return;
699
699
  }
700
- var s = S, a = us(), u = r.length === 1 ? r[0].promise : r.length > 1 ? Promise.all(r.map((f) => f.promise)) : null;
700
+ var s = S, a = vs(), u = r.length === 1 ? r[0].promise : r.length > 1 ? Promise.all(r.map((f) => f.promise)) : null;
701
701
  function l(f) {
702
702
  a();
703
703
  try {
704
704
  n(f);
705
705
  } catch (v) {
706
- s.f & 16384 || Ht(v, s);
706
+ s.f & 16384 || Bt(v, s);
707
707
  }
708
- vo();
708
+ bo();
709
709
  }
710
710
  if (o.length === 0) {
711
711
  u.then(() => l(e.map(i)));
712
712
  return;
713
713
  }
714
- var d = xi();
714
+ var d = Mi();
715
715
  function h() {
716
- Promise.all(o.map((f) => /* @__PURE__ */ ds(f))).then((f) => l([...e.map(i), ...f])).catch((f) => Ht(f, s)).finally(() => d());
716
+ Promise.all(o.map((f) => /* @__PURE__ */ gs(f))).then((f) => l([...e.map(i), ...f])).catch((f) => Bt(f, s)).finally(() => d());
717
717
  }
718
718
  u ? u.then(() => {
719
- a(), h(), vo();
719
+ a(), h(), bo();
720
720
  }) : h();
721
721
  }
722
- function us() {
723
- var t = S, e = _, o = j, n = x;
722
+ function vs() {
723
+ var t = S, e = _, o = V, n = x;
724
724
  return function(i = !0) {
725
- $t(t), rt(e), ge(o), i && !(t.f & 16384) && (n?.activate(), n?.apply());
725
+ $t(t), rt(e), ye(o), i && !(t.f & 16384) && (n?.activate(), n?.apply());
726
726
  };
727
727
  }
728
- function vo(t = !0) {
729
- $t(null), rt(null), ge(null), t && x?.deactivate();
728
+ function bo(t = !0) {
729
+ $t(null), rt(null), ye(null), t && x?.deactivate();
730
730
  }
731
- function xi() {
731
+ function Mi() {
732
732
  var t = S, e = t.b, o = x, n = e.is_rendered();
733
733
  return e.update_pending_count(1, o), o.increment(n, t), (i = !1) => {
734
734
  e.update_pending_count(-1, o), o.decrement(n, t, i);
735
735
  };
736
736
  }
737
737
  // @__NO_SIDE_EFFECTS__
738
- function Io(t) {
738
+ function So(t) {
739
739
  var e = 2 | vt;
740
- return S !== null && (S.f |= Te), {
741
- ctx: j,
740
+ return S !== null && (S.f |= $e), {
741
+ ctx: V,
742
742
  deps: null,
743
743
  effects: null,
744
- equals: ci,
744
+ equals: fi,
745
745
  f: e,
746
746
  fn: t,
747
747
  reactions: null,
748
748
  rv: 0,
749
- v: W,
749
+ v: N,
750
750
  wv: 0,
751
751
  parent: S,
752
752
  ac: null
753
753
  };
754
754
  }
755
755
  // @__NO_SIDE_EFFECTS__
756
- function ds(t, e, o) {
756
+ function gs(t, e, o) {
757
757
  let n = S;
758
- n === null && Lr();
759
- var i = void 0, r = ie(W), s = !_, a = /* @__PURE__ */ new Map();
760
- return ws(() => {
761
- var u = S, l = si();
758
+ n === null && Nr();
759
+ var i = void 0, r = ae(N), s = !_, a = /* @__PURE__ */ new Map();
760
+ return Ss(() => {
761
+ var u = S, l = ui();
762
762
  i = l.promise;
763
763
  try {
764
- Promise.resolve(t()).then(l.resolve, l.reject).finally(vo);
764
+ Promise.resolve(t()).then(l.resolve, l.reject).finally(bo);
765
765
  } catch (v) {
766
- l.reject(v), vo();
766
+ l.reject(v), bo();
767
767
  }
768
768
  var d = x;
769
769
  if (s) {
770
- if (u.f & 32768) var h = xi();
770
+ if (u.f & 32768) var h = Mi();
771
771
  if (n.b.is_rendered()) a.get(d)?.reject(Mt), a.delete(d);
772
772
  else {
773
773
  for (const v of a.values()) v.reject(Mt);
@@ -777,9 +777,9 @@ function ds(t, e, o) {
777
777
  }
778
778
  const f = (v, m = void 0) => {
779
779
  if (h && h(m === Mt), !(m === Mt || u.f & 16384)) {
780
- if (d.activate(), m) r.f |= uo, ye(r, m);
780
+ if (d.activate(), m) r.f |= po, Ie(r, m);
781
781
  else {
782
- r.f & 8388608 && (r.f ^= uo), ye(r, v);
782
+ r.f & 8388608 && (r.f ^= po), Ie(r, v);
783
783
  for (const [k, p] of a) {
784
784
  if (a.delete(k), k === d) break;
785
785
  p.reject(Mt);
@@ -789,7 +789,7 @@ function ds(t, e, o) {
789
789
  }
790
790
  };
791
791
  l.promise.then(f, (v) => f(null, v || "unknown"));
792
- }), ms(() => {
792
+ }), Is(() => {
793
793
  for (const u of a.values()) u.reject(Mt);
794
794
  }), new Promise((u) => {
795
795
  function l(d) {
@@ -802,128 +802,128 @@ function ds(t, e, o) {
802
802
  });
803
803
  }
804
804
  // @__NO_SIDE_EFFECTS__
805
- function xo(t) {
806
- const e = /* @__PURE__ */ Io(t);
807
- return Pt || Fi(e), e;
805
+ function Eo(t) {
806
+ const e = /* @__PURE__ */ So(t);
807
+ return Pt || Ki(e), e;
808
808
  }
809
809
  // @__NO_SIDE_EFFECTS__
810
- function cn(t) {
811
- const e = /* @__PURE__ */ Io(t);
812
- return e.equals = ui, e;
810
+ function fn(t) {
811
+ const e = /* @__PURE__ */ So(t);
812
+ return e.equals = pi, e;
813
813
  }
814
- function hs(t) {
814
+ function ms(t) {
815
815
  var e = t.effects;
816
816
  if (e !== null) {
817
817
  t.effects = null;
818
- for (var o = 0; o < e.length; o += 1) H(e[o]);
818
+ for (var o = 0; o < e.length; o += 1) D(e[o]);
819
819
  }
820
820
  }
821
- function un(t) {
821
+ function pn(t) {
822
822
  var e, o = S, n = t.parent;
823
- if (!Ot && n !== null && n.f & 24576) return Br(), t.v;
823
+ if (!Ot && n !== null && n.f & 24576) return Kr(), t.v;
824
824
  $t(n);
825
825
  try {
826
- t.f &= ~We, hs(t), e = Ji(t);
826
+ t.f &= ~ze, ms(t), e = Qi(t);
827
827
  } finally {
828
828
  $t(o);
829
829
  }
830
830
  return e;
831
831
  }
832
- function _i(t) {
833
- var e = un(t);
834
- if (!t.equals(e) && (t.wv = Ui(), (!x?.is_fork || t.deps === null) && (x !== null ? x.capture(t, e, !0) : t.v = e, t.deps === null))) {
835
- N(t, nt);
832
+ function Li(t) {
833
+ var e = pn(t);
834
+ if (!t.equals(e) && (t.wv = Yi(), (!x?.is_fork || t.deps === null) && (x !== null ? x.capture(t, e, !0) : t.v = e, t.deps === null))) {
835
+ j(t, nt);
836
836
  return;
837
837
  }
838
- Ot || (q !== null ? (fn() || x?.is_fork) && q.set(t, e) : on(t));
838
+ Ot || (q !== null ? (mn() || x?.is_fork) && q.set(t, e) : an(t));
839
839
  }
840
- function fs(t) {
841
- if (t.effects !== null) for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Mt), e.teardown = Sr, e.ac = null, Ne(e, 0), gn(e));
840
+ function bs(t) {
841
+ if (t.effects !== null) for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Mt), e.teardown = Er, e.ac = null, Ve(e, 0), wn(e));
842
842
  }
843
- function Ci(t) {
844
- if (t.effects !== null) for (const e of t.effects) e.teardown && we(e);
843
+ function Pi(t) {
844
+ if (t.effects !== null) for (const e of t.effects) e.teardown && ke(e);
845
845
  }
846
- var Uo = /* @__PURE__ */ new Set(), ee = /* @__PURE__ */ new Map(), Ei = !1;
847
- function ie(t, e) {
846
+ var Yo = /* @__PURE__ */ new Set(), ne = /* @__PURE__ */ new Map(), Oi = !1;
847
+ function ae(t, e) {
848
848
  return {
849
849
  f: 0,
850
850
  v: t,
851
851
  reactions: null,
852
- equals: ci,
852
+ equals: fi,
853
853
  rv: 0,
854
854
  wv: 0
855
855
  };
856
856
  }
857
857
  // @__NO_SIDE_EFFECTS__
858
- function V(t, e) {
859
- const o = ie(t, e);
860
- return Fi(o), o;
858
+ function W(t, e) {
859
+ const o = ae(t, e);
860
+ return Ki(o), o;
861
861
  }
862
862
  // @__NO_SIDE_EFFECTS__
863
- function Mi(t, e = !1, o = !0) {
864
- const n = ie(t);
865
- if (e || (n.equals = ui), To && o && j !== null && j.l !== null) {
863
+ function Ri(t, e = !1, o = !0) {
864
+ const n = ae(t);
865
+ if (e || (n.equals = pi), $o && o && V !== null && V.l !== null) {
866
866
  var i;
867
- ((i = j.l).s ?? (i.s = [])).push(n);
867
+ ((i = V.l).s ?? (i.s = [])).push(n);
868
868
  }
869
869
  return n;
870
870
  }
871
871
  function C(t, e, o = !1) {
872
- return _ !== null && (!ht || _.f & 131072) && Ve() && _.f & 4325394 && (ot === null || !ve.call(ot, t)) && Hr(), ye(t, o ? Jt(e) : e, fo);
872
+ return _ !== null && (!ht || _.f & 131072) && qe() && _.f & 4325394 && (ot === null || !be.call(ot, t)) && Ur(), Ie(t, o ? Yt(e) : e, go);
873
873
  }
874
- function ye(t, e, o = null) {
874
+ function Ie(t, e, o = null) {
875
875
  if (!t.equals(e)) {
876
- ee.set(t, Ot ? e : t.v);
877
- var n = ae.ensure();
876
+ ne.set(t, Ot ? e : t.v);
877
+ var n = ue.ensure();
878
878
  if (n.capture(t, e), t.f & 2) {
879
879
  const i = t;
880
- t.f & 2048 && un(i), q === null && on(i);
880
+ t.f & 2048 && pn(i), q === null && an(i);
881
881
  }
882
- t.wv = Ui(), Li(t, vt, o), Ve() && S !== null && S.f & 1024 && !(S.f & 96) && (tt === null ? $s([t]) : tt.push(t)), !n.is_fork && Uo.size > 0 && !Ei && ps();
882
+ t.wv = Yi(), ji(t, vt, o), qe() && S !== null && S.f & 1024 && !(S.f & 96) && (tt === null ? Cs([t]) : tt.push(t)), !n.is_fork && Yo.size > 0 && !Oi && ys();
883
883
  }
884
884
  return e;
885
885
  }
886
- function ps() {
887
- Ei = !1;
888
- for (const t of Uo) t.f & 1024 && N(t, se), je(t) && we(t);
889
- Uo.clear();
886
+ function ys() {
887
+ Oi = !1;
888
+ for (const t of Yo) t.f & 1024 && j(t, ce), De(t) && ke(t);
889
+ Yo.clear();
890
890
  }
891
- function Oe(t) {
891
+ function Ne(t) {
892
892
  C(t, t.v + 1);
893
893
  }
894
- function Li(t, e, o) {
894
+ function ji(t, e, o) {
895
895
  var n = t.reactions;
896
- if (n !== null) for (var i = Ve(), r = n.length, s = 0; s < r; s++) {
896
+ if (n !== null) for (var i = qe(), r = n.length, s = 0; s < r; s++) {
897
897
  var a = n[s], u = a.f;
898
898
  if (!(!i && a === S)) {
899
899
  var l = (u & vt) === 0;
900
- if (l && N(a, e), u & 2) {
900
+ if (l && j(a, e), u & 2) {
901
901
  var d = a;
902
- q?.delete(d), u & 65536 || (u & 512 && (a.f |= We), Li(d, se, o));
902
+ q?.delete(d), u & 65536 || (u & 512 && (a.f |= ze), ji(d, ce, o));
903
903
  } else if (l) {
904
904
  var h = a;
905
- u & 16 && wt !== null && wt.add(h), o !== null ? o.push(h) : an(h);
905
+ u & 16 && wt !== null && wt.add(h), o !== null ? o.push(h) : dn(h);
906
906
  }
907
907
  }
908
908
  }
909
909
  }
910
- function Jt(t) {
911
- if (typeof t != "object" || t === null || Le in t) return t;
912
- const e = ri(t);
913
- if (e !== kr && e !== $r) return t;
914
- var o = /* @__PURE__ */ new Map(), n = ii(t), i = /* @__PURE__ */ V(0), r = null, s = oe, a = (u) => {
915
- if (oe === s) return u();
916
- var l = _, d = oe;
917
- rt(null), jn(s);
910
+ function Yt(t) {
911
+ if (typeof t != "object" || t === null || Re in t) return t;
912
+ const e = ci(t);
913
+ if (e !== _r && e !== Cr) return t;
914
+ var o = /* @__PURE__ */ new Map(), n = li(t), i = /* @__PURE__ */ W(0), r = null, s = ie, a = (u) => {
915
+ if (ie === s) return u();
916
+ var l = _, d = ie;
917
+ rt(null), Hn(s);
918
918
  var h = u();
919
- return rt(l), jn(d), h;
919
+ return rt(l), Hn(d), h;
920
920
  };
921
- return n && o.set("length", /* @__PURE__ */ V(t.length, r)), new Proxy(t, {
921
+ return n && o.set("length", /* @__PURE__ */ W(t.length, r)), new Proxy(t, {
922
922
  defineProperty(u, l, d) {
923
- (!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && zr();
923
+ (!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && Fr();
924
924
  var h = o.get(l);
925
925
  return h === void 0 ? a(() => {
926
- var f = /* @__PURE__ */ V(d.value, r);
926
+ var f = /* @__PURE__ */ W(d.value, r);
927
927
  return o.set(l, f), f;
928
928
  }) : C(h, d.value, !0), !0;
929
929
  },
@@ -931,18 +931,18 @@ function Jt(t) {
931
931
  var d = o.get(l);
932
932
  if (d === void 0) {
933
933
  if (l in u) {
934
- const h = a(() => /* @__PURE__ */ V(W, r));
935
- o.set(l, h), Oe(i);
934
+ const h = a(() => /* @__PURE__ */ W(N, r));
935
+ o.set(l, h), Ne(i);
936
936
  }
937
- } else C(d, W), Oe(i);
937
+ } else C(d, N), Ne(i);
938
938
  return !0;
939
939
  },
940
940
  get(u, l, d) {
941
- if (l === Le) return t;
941
+ if (l === Re) return t;
942
942
  var h = o.get(l), f = l in u;
943
- if (h === void 0 && (!f || Yt(u, l)?.writable) && (h = a(() => /* @__PURE__ */ V(Jt(f ? u[l] : W), r)), o.set(l, h)), h !== void 0) {
943
+ if (h === void 0 && (!f || Qt(u, l)?.writable) && (h = a(() => /* @__PURE__ */ W(Yt(f ? u[l] : N), r)), o.set(l, h)), h !== void 0) {
944
944
  var v = g(h);
945
- return v === W ? void 0 : v;
945
+ return v === N ? void 0 : v;
946
946
  }
947
947
  return Reflect.get(u, l, d);
948
948
  },
@@ -953,7 +953,7 @@ function Jt(t) {
953
953
  h && (d.value = g(h));
954
954
  } else if (d === void 0) {
955
955
  var f = o.get(l), v = f?.v;
956
- if (f !== void 0 && v !== W) return {
956
+ if (f !== void 0 && v !== N) return {
957
957
  enumerable: !0,
958
958
  configurable: !0,
959
959
  value: v,
@@ -963,20 +963,20 @@ function Jt(t) {
963
963
  return d;
964
964
  },
965
965
  has(u, l) {
966
- if (l === Le) return !0;
967
- var d = o.get(l), h = d !== void 0 && d.v !== W || Reflect.has(u, l);
968
- return (d !== void 0 || S !== null && (!h || Yt(u, l)?.writable)) && (d === void 0 && (d = a(() => /* @__PURE__ */ V(h ? Jt(u[l]) : W, r)), o.set(l, d)), g(d) === W) ? !1 : h;
966
+ if (l === Re) return !0;
967
+ var d = o.get(l), h = d !== void 0 && d.v !== N || Reflect.has(u, l);
968
+ return (d !== void 0 || S !== null && (!h || Qt(u, l)?.writable)) && (d === void 0 && (d = a(() => /* @__PURE__ */ W(h ? Yt(u[l]) : N, r)), o.set(l, d)), g(d) === N) ? !1 : h;
969
969
  },
970
970
  set(u, l, d, h) {
971
971
  var f = o.get(l), v = l in u;
972
972
  if (n && l === "length") for (var m = d; m < f.v; m += 1) {
973
973
  var k = o.get(m + "");
974
- k !== void 0 ? C(k, W) : m in u && (k = a(() => /* @__PURE__ */ V(W, r)), o.set(m + "", k));
974
+ k !== void 0 ? C(k, N) : m in u && (k = a(() => /* @__PURE__ */ W(N, r)), o.set(m + "", k));
975
975
  }
976
- if (f === void 0) (!v || Yt(u, l)?.writable) && (f = a(() => /* @__PURE__ */ V(void 0, r)), C(f, Jt(d)), o.set(l, f));
976
+ if (f === void 0) (!v || Qt(u, l)?.writable) && (f = a(() => /* @__PURE__ */ W(void 0, r)), C(f, Yt(d)), o.set(l, f));
977
977
  else {
978
- v = f.v !== W;
979
- var p = a(() => Jt(d));
978
+ v = f.v !== N;
979
+ var p = a(() => Yt(d));
980
980
  C(f, p);
981
981
  }
982
982
  var w = Reflect.getOwnPropertyDescriptor(u, l);
@@ -985,7 +985,7 @@ function Jt(t) {
985
985
  var R = o.get("length"), A = Number(l);
986
986
  Number.isInteger(A) && A >= R.v && C(R, A + 1);
987
987
  }
988
- Oe(i);
988
+ Ne(i);
989
989
  }
990
990
  return !0;
991
991
  },
@@ -993,48 +993,48 @@ function Jt(t) {
993
993
  g(i);
994
994
  var l = Reflect.ownKeys(u).filter((f) => {
995
995
  var v = o.get(f);
996
- return v === void 0 || v.v !== W;
996
+ return v === void 0 || v.v !== N;
997
997
  });
998
- for (var [d, h] of o) h.v !== W && !(d in u) && l.push(d);
998
+ for (var [d, h] of o) h.v !== N && !(d in u) && l.push(d);
999
999
  return l;
1000
1000
  },
1001
1001
  setPrototypeOf() {
1002
- qr();
1002
+ Gr();
1003
1003
  }
1004
1004
  });
1005
1005
  }
1006
- var Nn, Pi, Oi, Ri;
1007
- function Ko() {
1008
- if (Nn === void 0) {
1009
- Nn = window, Pi = /Firefox/.test(navigator.userAgent);
1006
+ var zn, Ni, Wi, Vi;
1007
+ function Xo() {
1008
+ if (zn === void 0) {
1009
+ zn = window, Ni = /Firefox/.test(navigator.userAgent);
1010
1010
  var t = Element.prototype, e = Node.prototype, o = Text.prototype;
1011
- Oi = Yt(e, "firstChild").get, Ri = Yt(e, "nextSibling").get, En(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), En(o) && (o.__t = void 0);
1011
+ Wi = Qt(e, "firstChild").get, Vi = Qt(e, "nextSibling").get, On(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), On(o) && (o.__t = void 0);
1012
1012
  }
1013
1013
  }
1014
1014
  function pt(t = "") {
1015
1015
  return document.createTextNode(t);
1016
1016
  }
1017
1017
  // @__NO_SIDE_EFFECTS__
1018
- function re(t) {
1019
- return Oi.call(t);
1018
+ function le(t) {
1019
+ return Wi.call(t);
1020
1020
  }
1021
1021
  // @__NO_SIDE_EFFECTS__
1022
1022
  function St(t) {
1023
- return Ri.call(t);
1023
+ return Vi.call(t);
1024
1024
  }
1025
- function Je(t, e) {
1026
- if (!P) return /* @__PURE__ */ re(t);
1027
- var o = /* @__PURE__ */ re(L);
1025
+ function Xe(t, e) {
1026
+ if (!P) return /* @__PURE__ */ le(t);
1027
+ var o = /* @__PURE__ */ le(L);
1028
1028
  if (o === null) o = L.appendChild(pt());
1029
1029
  else if (e && o.nodeType !== 3) {
1030
1030
  var n = pt();
1031
1031
  return o?.before(n), U(n), n;
1032
1032
  }
1033
- return e && hn(o), U(o), o;
1033
+ return e && gn(o), U(o), o;
1034
1034
  }
1035
- function _o(t, e = !1) {
1035
+ function Mo(t, e = !1) {
1036
1036
  if (!P) {
1037
- var o = /* @__PURE__ */ re(t);
1037
+ var o = /* @__PURE__ */ le(t);
1038
1038
  return o instanceof Comment && o.data === "" ? /* @__PURE__ */ St(o) : o;
1039
1039
  }
1040
1040
  if (e) {
@@ -1042,7 +1042,7 @@ function _o(t, e = !1) {
1042
1042
  var n = pt();
1043
1043
  return L?.before(n), U(n), n;
1044
1044
  }
1045
- hn(L);
1045
+ gn(L);
1046
1046
  }
1047
1047
  return L;
1048
1048
  }
@@ -1055,26 +1055,26 @@ function Rt(t, e = 1, o = !1) {
1055
1055
  var r = pt();
1056
1056
  return n === null ? i?.after(r) : n.before(r), U(r), r;
1057
1057
  }
1058
- hn(n);
1058
+ gn(n);
1059
1059
  }
1060
1060
  return U(n), n;
1061
1061
  }
1062
- function Ni(t) {
1062
+ function zi(t) {
1063
1063
  t.textContent = "";
1064
1064
  }
1065
- function Wi() {
1066
- return !Pt || wt !== null ? !1 : (S.f & tn) !== 0;
1065
+ function qi() {
1066
+ return !Pt || wt !== null ? !1 : (S.f & rn) !== 0;
1067
1067
  }
1068
- function dn(t, e, o) {
1068
+ function vn(t, e, o) {
1069
1069
  let n = o ? { is: o } : void 0;
1070
1070
  return document.createElementNS(e ?? "http://www.w3.org/1999/xhtml", t, n);
1071
1071
  }
1072
- function hn(t) {
1072
+ function gn(t) {
1073
1073
  if (t.nodeValue.length < 65536) return;
1074
1074
  let e = t.nextSibling;
1075
1075
  for (; e !== null && e.nodeType === 3; ) e.remove(), t.nodeValue += e.nodeValue, e = t.nextSibling;
1076
1076
  }
1077
- function Vi(t) {
1077
+ function Di(t) {
1078
1078
  var e = _, o = S;
1079
1079
  rt(null), $t(null);
1080
1080
  try {
@@ -1083,18 +1083,18 @@ function Vi(t) {
1083
1083
  rt(e), $t(o);
1084
1084
  }
1085
1085
  }
1086
- function vs(t) {
1087
- S === null && (_ === null && Nr(t), Rr()), Ot && Or(t);
1086
+ function ws(t) {
1087
+ S === null && (_ === null && qr(t), zr()), Ot && Vr(t);
1088
1088
  }
1089
- function gs(t, e) {
1089
+ function Ts(t, e) {
1090
1090
  var o = e.last;
1091
1091
  o === null ? e.last = e.first = t : (o.next = t, t.prev = o, e.last = t);
1092
1092
  }
1093
1093
  function At(t, e) {
1094
1094
  var o = S;
1095
- o !== null && o.f & 8192 && (t |= Qo);
1095
+ o !== null && o.f & 8192 && (t |= nn);
1096
1096
  var n = {
1097
- ctx: j,
1097
+ ctx: V,
1098
1098
  deps: null,
1099
1099
  nodes: null,
1100
1100
  f: t | vt | 512,
@@ -1111,171 +1111,171 @@ function At(t, e) {
1111
1111
  };
1112
1112
  x?.register_created_effect(n);
1113
1113
  var i = n;
1114
- if (t & 4) me !== null ? me.push(n) : ae.ensure().schedule(n);
1114
+ if (t & 4) we !== null ? we.push(n) : ue.ensure().schedule(n);
1115
1115
  else if (e !== null) {
1116
1116
  try {
1117
- we(n);
1117
+ ke(n);
1118
1118
  } catch (s) {
1119
- throw H(n), s;
1119
+ throw D(n), s;
1120
1120
  }
1121
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, t & 16 && t & 65536 && i !== null && (i.f |= en));
1121
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, t & 16 && t & 65536 && i !== null && (i.f |= sn));
1122
1122
  }
1123
- if (i !== null && (i.parent = o, o !== null && gs(i, o), _ !== null && _.f & 2 && !(t & 64))) {
1123
+ if (i !== null && (i.parent = o, o !== null && Ts(i, o), _ !== null && _.f & 2 && !(t & 64))) {
1124
1124
  var r = _;
1125
1125
  (r.effects ?? (r.effects = [])).push(i);
1126
1126
  }
1127
1127
  return n;
1128
1128
  }
1129
- function fn() {
1129
+ function mn() {
1130
1130
  return _ !== null && !ht;
1131
1131
  }
1132
- function ms(t) {
1132
+ function Is(t) {
1133
1133
  const e = At(8, null);
1134
- return N(e, nt), e.teardown = t, e;
1134
+ return j(e, nt), e.teardown = t, e;
1135
1135
  }
1136
- function Wn(t) {
1137
- vs("$effect");
1136
+ function qn(t) {
1137
+ ws("$effect");
1138
1138
  var e = S.f;
1139
1139
  if (!_ && e & 32 && !(e & 32768)) {
1140
- var o = j;
1140
+ var o = V;
1141
1141
  (o.e ?? (o.e = [])).push(t);
1142
- } else return ji(t);
1142
+ } else return Hi(t);
1143
1143
  }
1144
- function ji(t) {
1145
- return At(4 | _r, t);
1144
+ function Hi(t) {
1145
+ return At(4 | Pr, t);
1146
1146
  }
1147
- function bs(t) {
1148
- ae.ensure();
1149
- const e = At(64 | Te, t);
1147
+ function ks(t) {
1148
+ ue.ensure();
1149
+ const e = At(64 | $e, t);
1150
1150
  return () => {
1151
- H(e);
1151
+ D(e);
1152
1152
  };
1153
1153
  }
1154
- function ys(t) {
1155
- ae.ensure();
1156
- const e = At(64 | Te, t);
1154
+ function $s(t) {
1155
+ ue.ensure();
1156
+ const e = At(64 | $e, t);
1157
1157
  return (o = {}) => new Promise((n) => {
1158
- o.outro ? le(e, () => {
1159
- H(e), n(void 0);
1160
- }) : (H(e), n(void 0));
1158
+ o.outro ? de(e, () => {
1159
+ D(e), n(void 0);
1160
+ }) : (D(e), n(void 0));
1161
1161
  });
1162
1162
  }
1163
- function zi(t) {
1163
+ function Bi(t) {
1164
1164
  return At(4, t);
1165
1165
  }
1166
- function ws(t) {
1167
- return At(Cr | Te, t);
1166
+ function Ss(t) {
1167
+ return At(Or | $e, t);
1168
1168
  }
1169
- function pn(t, e = 0) {
1169
+ function bn(t, e = 0) {
1170
1170
  return At(8 | e, t);
1171
1171
  }
1172
- function Ze(t, e = [], o = [], n = []) {
1173
- cs(n, e, o, (i) => {
1172
+ function Qe(t, e = [], o = [], n = []) {
1173
+ ps(n, e, o, (i) => {
1174
1174
  At(8, () => t(...i.map(g)));
1175
1175
  });
1176
1176
  }
1177
- function vn(t, e = 0) {
1177
+ function yn(t, e = 0) {
1178
1178
  return At(16 | e, t);
1179
1179
  }
1180
1180
  function it(t) {
1181
- return At(32 | Te, t);
1181
+ return At(32 | $e, t);
1182
1182
  }
1183
- function qi(t) {
1183
+ function Fi(t) {
1184
1184
  var e = t.teardown;
1185
1185
  if (e !== null) {
1186
1186
  const o = Ot, n = _;
1187
- Vn(!0), rt(null);
1187
+ Dn(!0), rt(null);
1188
1188
  try {
1189
1189
  e.call(null);
1190
1190
  } finally {
1191
- Vn(o), rt(n);
1191
+ Dn(o), rt(n);
1192
1192
  }
1193
1193
  }
1194
1194
  }
1195
- function gn(t, e = !1) {
1195
+ function wn(t, e = !1) {
1196
1196
  var o = t.first;
1197
1197
  for (t.first = t.last = null; o !== null; ) {
1198
1198
  const i = o.ac;
1199
- i !== null && Vi(() => {
1199
+ i !== null && Di(() => {
1200
1200
  i.abort(Mt);
1201
1201
  });
1202
1202
  var n = o.next;
1203
- o.f & 64 ? o.parent = null : H(o, e), o = n;
1203
+ o.f & 64 ? o.parent = null : D(o, e), o = n;
1204
1204
  }
1205
1205
  }
1206
- function Ts(t) {
1206
+ function As(t) {
1207
1207
  for (var e = t.first; e !== null; ) {
1208
1208
  var o = e.next;
1209
- e.f & 32 || H(e), e = o;
1209
+ e.f & 32 || D(e), e = o;
1210
1210
  }
1211
1211
  }
1212
- function H(t, e = !0) {
1212
+ function D(t, e = !0) {
1213
1213
  var o = !1;
1214
- (e || t.f & 262144) && t.nodes !== null && t.nodes.end !== null && (Is(t.nodes.start, t.nodes.end), o = !0), N(t, Mn), gn(t, e && !o), Ne(t, 0);
1214
+ (e || t.f & 262144) && t.nodes !== null && t.nodes.end !== null && (xs(t.nodes.start, t.nodes.end), o = !0), j(t, Rn), wn(t, e && !o), Ve(t, 0);
1215
1215
  var n = t.nodes && t.nodes.t;
1216
1216
  if (n !== null) for (const r of n) r.stop();
1217
- qi(t), t.f ^= Mn, t.f |= xr;
1217
+ Fi(t), t.f ^= Rn, t.f |= Lr;
1218
1218
  var i = t.parent;
1219
- i !== null && i.first !== null && Hi(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
1219
+ i !== null && i.first !== null && Gi(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
1220
1220
  }
1221
- function Is(t, e) {
1221
+ function xs(t, e) {
1222
1222
  for (; t !== null; ) {
1223
1223
  var o = t === e ? null : /* @__PURE__ */ St(t);
1224
1224
  t.remove(), t = o;
1225
1225
  }
1226
1226
  }
1227
- function Hi(t) {
1227
+ function Gi(t) {
1228
1228
  var e = t.parent, o = t.prev, n = t.next;
1229
1229
  o !== null && (o.next = n), n !== null && (n.prev = o), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = o));
1230
1230
  }
1231
- function le(t, e, o = !0) {
1231
+ function de(t, e, o = !0) {
1232
1232
  var n = [];
1233
- Di(t, n, !0);
1233
+ Ui(t, n, !0);
1234
1234
  var i = () => {
1235
- o && H(t), e && e();
1235
+ o && D(t), e && e();
1236
1236
  }, r = n.length;
1237
1237
  if (r > 0) {
1238
1238
  var s = () => --r || i();
1239
1239
  for (var a of n) a.out(s);
1240
1240
  } else i();
1241
1241
  }
1242
- function Di(t, e, o) {
1242
+ function Ui(t, e, o) {
1243
1243
  if (!(t.f & 8192)) {
1244
- t.f ^= Qo;
1244
+ t.f ^= nn;
1245
1245
  var n = t.nodes && t.nodes.t;
1246
1246
  if (n !== null) for (const a of n) (a.is_global || o) && e.push(a);
1247
1247
  for (var i = t.first; i !== null; ) {
1248
1248
  var r = i.next;
1249
1249
  if (!(i.f & 64)) {
1250
1250
  var s = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
1251
- Di(i, e, s ? o : !1);
1251
+ Ui(i, e, s ? o : !1);
1252
1252
  }
1253
1253
  i = r;
1254
1254
  }
1255
1255
  }
1256
1256
  }
1257
- function mn(t) {
1258
- Bi(t, !0);
1257
+ function Tn(t) {
1258
+ Ji(t, !0);
1259
1259
  }
1260
- function Bi(t, e) {
1260
+ function Ji(t, e) {
1261
1261
  if (t.f & 8192) {
1262
- t.f ^= Qo, t.f & 1024 || (N(t, vt), ae.ensure().schedule(t));
1262
+ t.f ^= nn, t.f & 1024 || (j(t, vt), ue.ensure().schedule(t));
1263
1263
  for (var o = t.first; o !== null; ) {
1264
1264
  var n = o.next, i = (o.f & 65536) !== 0 || (o.f & 32) !== 0;
1265
- Bi(o, i ? e : !1), o = n;
1265
+ Ji(o, i ? e : !1), o = n;
1266
1266
  }
1267
1267
  var r = t.nodes && t.nodes.t;
1268
1268
  if (r !== null) for (const s of r) (s.is_global || e) && s.in();
1269
1269
  }
1270
1270
  }
1271
- function bn(t, e) {
1271
+ function In(t, e) {
1272
1272
  if (t.nodes) for (var o = t.nodes.start, n = t.nodes.end; o !== null; ) {
1273
1273
  var i = o === n ? null : /* @__PURE__ */ St(o);
1274
1274
  e.append(o), o = i;
1275
1275
  }
1276
1276
  }
1277
- var ks = null, oo = !1, Ot = !1;
1278
- function Vn(t) {
1277
+ var _s = null, ro = !1, Ot = !1;
1278
+ function Dn(t) {
1279
1279
  Ot = t;
1280
1280
  }
1281
1281
  var _ = null, ht = !1;
@@ -1287,140 +1287,140 @@ function $t(t) {
1287
1287
  S = t;
1288
1288
  }
1289
1289
  var ot = null;
1290
- function Fi(t) {
1290
+ function Ki(t) {
1291
1291
  _ !== null && (!Pt || _.f & 2) && (ot === null ? ot = [t] : ot.push(t));
1292
1292
  }
1293
1293
  var G = null, Y = 0, tt = null;
1294
- function $s(t) {
1294
+ function Cs(t) {
1295
1295
  tt = t;
1296
1296
  }
1297
- var Gi = 1, Zt = 0, oe = Zt;
1298
- function jn(t) {
1299
- oe = t;
1297
+ var Zi = 1, Xt = 0, ie = Xt;
1298
+ function Hn(t) {
1299
+ ie = t;
1300
1300
  }
1301
- function Ui() {
1302
- return ++Gi;
1301
+ function Yi() {
1302
+ return ++Zi;
1303
1303
  }
1304
- function je(t) {
1304
+ function De(t) {
1305
1305
  var e = t.f;
1306
1306
  if (e & 2048) return !0;
1307
- if (e & 2 && (t.f &= ~We), e & 4096) {
1307
+ if (e & 2 && (t.f &= ~ze), e & 4096) {
1308
1308
  for (var o = t.deps, n = o.length, i = 0; i < n; i++) {
1309
1309
  var r = o[i];
1310
- if (je(r) && _i(r), r.wv > t.wv) return !0;
1310
+ if (De(r) && Li(r), r.wv > t.wv) return !0;
1311
1311
  }
1312
- e & 512 && q === null && N(t, nt);
1312
+ e & 512 && q === null && j(t, nt);
1313
1313
  }
1314
1314
  return !1;
1315
1315
  }
1316
- function Ki(t, e, o = !0) {
1316
+ function Xi(t, e, o = !0) {
1317
1317
  var n = t.reactions;
1318
- if (n !== null && !(!Pt && ot !== null && ve.call(ot, t))) for (var i = 0; i < n.length; i++) {
1318
+ if (n !== null && !(!Pt && ot !== null && be.call(ot, t))) for (var i = 0; i < n.length; i++) {
1319
1319
  var r = n[i];
1320
- r.f & 2 ? Ki(r, e, !1) : e === r && (o ? N(r, vt) : r.f & 1024 && N(r, se), an(r));
1320
+ r.f & 2 ? Xi(r, e, !1) : e === r && (o ? j(r, vt) : r.f & 1024 && j(r, ce), dn(r));
1321
1321
  }
1322
1322
  }
1323
- function Ji(t) {
1324
- var e = G, o = Y, n = tt, i = _, r = ot, s = j, a = ht, u = oe, l = t.f;
1325
- G = null, Y = 0, tt = null, _ = l & 96 ? null : t, ot = null, ge(t.ctx), ht = !1, oe = ++Zt, t.ac !== null && (Vi(() => {
1323
+ function Qi(t) {
1324
+ var e = G, o = Y, n = tt, i = _, r = ot, s = V, a = ht, u = ie, l = t.f;
1325
+ G = null, Y = 0, tt = null, _ = l & 96 ? null : t, ot = null, ye(t.ctx), ht = !1, ie = ++Xt, t.ac !== null && (Di(() => {
1326
1326
  t.ac.abort(Mt);
1327
1327
  }), t.ac = null);
1328
1328
  try {
1329
- t.f |= Ln;
1329
+ t.f |= jn;
1330
1330
  var d = t.fn, h = d();
1331
- t.f |= tn;
1331
+ t.f |= rn;
1332
1332
  var f = t.deps, v = x?.is_fork;
1333
1333
  if (G !== null) {
1334
1334
  var m;
1335
- if (v || Ne(t, Y), f !== null && Y > 0) for (f.length = Y + G.length, m = 0; m < G.length; m++) f[Y + m] = G[m];
1335
+ if (v || Ve(t, Y), f !== null && Y > 0) for (f.length = Y + G.length, m = 0; m < G.length; m++) f[Y + m] = G[m];
1336
1336
  else t.deps = f = G;
1337
- if (fn() && t.f & 512) for (m = Y; m < f.length; m++) {
1337
+ if (mn() && t.f & 512) for (m = Y; m < f.length; m++) {
1338
1338
  var k;
1339
1339
  ((k = f[m]).reactions ?? (k.reactions = [])).push(t);
1340
1340
  }
1341
- } else !v && f !== null && Y < f.length && (Ne(t, Y), f.length = Y);
1342
- if (Ve() && tt !== null && !ht && f !== null && !(t.f & 6146)) for (m = 0; m < tt.length; m++) Ki(tt[m], t);
1341
+ } else !v && f !== null && Y < f.length && (Ve(t, Y), f.length = Y);
1342
+ if (qe() && tt !== null && !ht && f !== null && !(t.f & 6146)) for (m = 0; m < tt.length; m++) Xi(tt[m], t);
1343
1343
  if (i !== null && i !== t) {
1344
- if (Zt++, i.deps !== null) for (let p = 0; p < o; p += 1) i.deps[p].rv = Zt;
1345
- if (e !== null) for (const p of e) p.rv = Zt;
1344
+ if (Xt++, i.deps !== null) for (let p = 0; p < o; p += 1) i.deps[p].rv = Xt;
1345
+ if (e !== null) for (const p of e) p.rv = Xt;
1346
1346
  tt !== null && (n === null ? n = tt : n.push(...tt));
1347
1347
  }
1348
- return t.f & 8388608 && (t.f ^= uo), h;
1348
+ return t.f & 8388608 && (t.f ^= po), h;
1349
1349
  } catch (p) {
1350
- return pi(p);
1350
+ return bi(p);
1351
1351
  } finally {
1352
- t.f ^= Ln, G = e, Y = o, tt = n, _ = i, ot = r, ge(s), ht = a, oe = u;
1352
+ t.f ^= jn, G = e, Y = o, tt = n, _ = i, ot = r, ye(s), ht = a, ie = u;
1353
1353
  }
1354
1354
  }
1355
- function Ss(t, e) {
1355
+ function Es(t, e) {
1356
1356
  let o = e.reactions;
1357
1357
  if (o !== null) {
1358
- var n = Tr.call(o, t);
1358
+ var n = Ar.call(o, t);
1359
1359
  if (n !== -1) {
1360
1360
  var i = o.length - 1;
1361
1361
  i === 0 ? o = e.reactions = null : (o[n] = o[i], o.pop());
1362
1362
  }
1363
1363
  }
1364
- if (o === null && e.f & 2 && (G === null || !ve.call(G, e))) {
1364
+ if (o === null && e.f & 2 && (G === null || !be.call(G, e))) {
1365
1365
  var r = e;
1366
- r.f & 512 && (r.f ^= 512, r.f &= ~We), r.v !== W && on(r), fs(r), Ne(r, 0);
1366
+ r.f & 512 && (r.f ^= 512, r.f &= ~ze), r.v !== N && an(r), bs(r), Ve(r, 0);
1367
1367
  }
1368
1368
  }
1369
- function Ne(t, e) {
1369
+ function Ve(t, e) {
1370
1370
  var o = t.deps;
1371
- if (o !== null) for (var n = e; n < o.length; n++) Ss(t, o[n]);
1371
+ if (o !== null) for (var n = e; n < o.length; n++) Es(t, o[n]);
1372
1372
  }
1373
- function we(t) {
1373
+ function ke(t) {
1374
1374
  var e = t.f;
1375
1375
  if (!(e & 16384)) {
1376
- N(t, nt);
1377
- var o = S, n = oo;
1378
- S = t, oo = !0;
1376
+ j(t, nt);
1377
+ var o = S, n = ro;
1378
+ S = t, ro = !0;
1379
1379
  try {
1380
- e & 16777232 ? Ts(t) : gn(t), qi(t);
1381
- var i = Ji(t);
1382
- t.teardown = typeof i == "function" ? i : null, t.wv = Gi;
1380
+ e & 16777232 ? As(t) : wn(t), Fi(t);
1381
+ var i = Qi(t);
1382
+ t.teardown = typeof i == "function" ? i : null, t.wv = Zi;
1383
1383
  } finally {
1384
- oo = n, S = o;
1384
+ ro = n, S = o;
1385
1385
  }
1386
1386
  }
1387
1387
  }
1388
1388
  function g(t) {
1389
1389
  var e = (t.f & 2) !== 0;
1390
- if (ks?.add(t), _ !== null && !ht && !(S !== null && S.f & 16384) && (ot === null || !ve.call(ot, t))) {
1390
+ if (_s?.add(t), _ !== null && !ht && !(S !== null && S.f & 16384) && (ot === null || !be.call(ot, t))) {
1391
1391
  var o = _.deps;
1392
- if (_.f & 2097152) t.rv < Zt && (t.rv = Zt, G === null && o !== null && o[Y] === t ? Y++ : G === null ? G = [t] : G.push(t));
1392
+ if (_.f & 2097152) t.rv < Xt && (t.rv = Xt, G === null && o !== null && o[Y] === t ? Y++ : G === null ? G = [t] : G.push(t));
1393
1393
  else {
1394
1394
  var n;
1395
1395
  ((n = _).deps ?? (n.deps = [])).push(t);
1396
1396
  var i = t.reactions;
1397
- i === null ? t.reactions = [_] : ve.call(i, _) || i.push(_);
1397
+ i === null ? t.reactions = [_] : be.call(i, _) || i.push(_);
1398
1398
  }
1399
1399
  }
1400
- if (Ot && ee.has(t)) return ee.get(t);
1400
+ if (Ot && ne.has(t)) return ne.get(t);
1401
1401
  if (e) {
1402
1402
  var r = t;
1403
1403
  if (Ot) {
1404
1404
  var s = r.v;
1405
- return (!(r.f & 1024) && r.reactions !== null || Yi(r)) && (s = un(r)), ee.set(r, s), s;
1405
+ return (!(r.f & 1024) && r.reactions !== null || er(r)) && (s = pn(r)), ne.set(r, s), s;
1406
1406
  }
1407
- var a = (r.f & 512) === 0 && !ht && _ !== null && (oo || (_.f & 512) !== 0), u = (r.f & tn) === 0;
1408
- je(r) && (a && (r.f |= 512), _i(r)), a && !u && (Ci(r), Zi(r));
1407
+ var a = (r.f & 512) === 0 && !ht && _ !== null && (ro || (_.f & 512) !== 0), u = (r.f & rn) === 0;
1408
+ De(r) && (a && (r.f |= 512), Li(r)), a && !u && (Pi(r), tr(r));
1409
1409
  }
1410
1410
  if (q?.has(t)) return q.get(t);
1411
1411
  if (t.f & 8388608) throw t.v;
1412
1412
  return t.v;
1413
1413
  }
1414
- function Zi(t) {
1415
- if (t.f |= 512, t.deps !== null) for (const e of t.deps) (e.reactions ?? (e.reactions = [])).push(t), e.f & 2 && !(e.f & 512) && (Ci(e), Zi(e));
1414
+ function tr(t) {
1415
+ if (t.f |= 512, t.deps !== null) for (const e of t.deps) (e.reactions ?? (e.reactions = [])).push(t), e.f & 2 && !(e.f & 512) && (Pi(e), tr(e));
1416
1416
  }
1417
- function Yi(t) {
1418
- if (t.v === W) return !0;
1417
+ function er(t) {
1418
+ if (t.v === N) return !0;
1419
1419
  if (t.deps === null) return !1;
1420
- for (const e of t.deps) if (ee.has(e) || e.f & 2 && Yi(e)) return !0;
1420
+ for (const e of t.deps) if (ne.has(e) || e.f & 2 && er(e)) return !0;
1421
1421
  return !1;
1422
1422
  }
1423
- function yn(t) {
1423
+ function kn(t) {
1424
1424
  var e = ht;
1425
1425
  try {
1426
1426
  return ht = !0, t();
@@ -1428,23 +1428,23 @@ function yn(t) {
1428
1428
  ht = e;
1429
1429
  }
1430
1430
  }
1431
- var he = Symbol("events"), Xi = /* @__PURE__ */ new Set(), Jo = /* @__PURE__ */ new Set();
1432
- function Se(t, e, o) {
1433
- (e[he] ?? (e[he] = {}))[t] = o;
1431
+ var ve = Symbol("events"), or = /* @__PURE__ */ new Set(), Qo = /* @__PURE__ */ new Set();
1432
+ function _e(t, e, o) {
1433
+ (e[ve] ?? (e[ve] = {}))[t] = o;
1434
1434
  }
1435
- function As(t) {
1436
- for (var e = 0; e < t.length; e++) Xi.add(t[e]);
1437
- for (var o of Jo) o(t);
1435
+ function Ms(t) {
1436
+ for (var e = 0; e < t.length; e++) or.add(t[e]);
1437
+ for (var o of Qo) o(t);
1438
1438
  }
1439
- var zn = null;
1440
- function qn(t) {
1439
+ var Bn = null;
1440
+ function Fn(t) {
1441
1441
  var e = this, o = e.ownerDocument, n = t.type, i = t.composedPath?.() || [], r = i[0] || t.target;
1442
- zn = t;
1443
- var s = 0, a = zn === t && t[he];
1442
+ Bn = t;
1443
+ var s = 0, a = Bn === t && t[ve];
1444
1444
  if (a) {
1445
1445
  var u = i.indexOf(a);
1446
1446
  if (u !== -1 && (e === document || e === window)) {
1447
- t[he] = e;
1447
+ t[ve] = e;
1448
1448
  return;
1449
1449
  }
1450
1450
  var l = i.indexOf(e);
@@ -1452,7 +1452,7 @@ function qn(t) {
1452
1452
  u <= l && (s = u);
1453
1453
  }
1454
1454
  if (r = i[s] || t.target, r !== e) {
1455
- co(t, "currentTarget", {
1455
+ fo(t, "currentTarget", {
1456
1456
  configurable: !0,
1457
1457
  get() {
1458
1458
  return r || o;
@@ -1464,7 +1464,7 @@ function qn(t) {
1464
1464
  for (var f, v = []; r !== null; ) {
1465
1465
  var m = r.assignedSlot || r.parentNode || r.host || null;
1466
1466
  try {
1467
- var k = r[he]?.[n];
1467
+ var k = r[ve]?.[n];
1468
1468
  k != null && (!r.disabled || t.target === r) && k.call(r, t);
1469
1469
  } catch (p) {
1470
1470
  f ? v.push(p) : f = p;
@@ -1479,19 +1479,19 @@ function qn(t) {
1479
1479
  throw f;
1480
1480
  }
1481
1481
  } finally {
1482
- t[he] = e, delete t.currentTarget, rt(d), $t(h);
1482
+ t[ve] = e, delete t.currentTarget, rt(d), $t(h);
1483
1483
  }
1484
1484
  }
1485
1485
  }
1486
- var xs = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
1487
- function _s(t) {
1488
- return xs?.createHTML(t) ?? t;
1486
+ var Ls = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
1487
+ function Ps(t) {
1488
+ return Ls?.createHTML(t) ?? t;
1489
1489
  }
1490
- function Cs(t) {
1491
- var e = dn("template");
1492
- return e.innerHTML = _s(t.replaceAll("<!>", "<!---->")), e.content;
1490
+ function Os(t) {
1491
+ var e = vn("template");
1492
+ return e.innerHTML = Ps(t.replaceAll("<!>", "<!---->")), e.content;
1493
1493
  }
1494
- function no(t, e) {
1494
+ function so(t, e) {
1495
1495
  var o = S;
1496
1496
  o.nodes === null && (o.nodes = {
1497
1497
  start: t,
@@ -1501,46 +1501,46 @@ function no(t, e) {
1501
1501
  });
1502
1502
  }
1503
1503
  // @__NO_SIDE_EFFECTS__
1504
- function ce(t, e) {
1504
+ function he(t, e) {
1505
1505
  var o = (e & 1) !== 0, n = (e & 2) !== 0, i, r = !t.startsWith("<!>");
1506
1506
  return () => {
1507
- if (P) return no(L, null), L;
1508
- i === void 0 && (i = Cs(r ? t : "<!>" + t), o || (i = /* @__PURE__ */ re(i)));
1509
- var s = n || Pi ? document.importNode(i, !0) : i.cloneNode(!0);
1507
+ if (P) return so(L, null), L;
1508
+ i === void 0 && (i = Os(r ? t : "<!>" + t), o || (i = /* @__PURE__ */ le(i)));
1509
+ var s = n || Ni ? document.importNode(i, !0) : i.cloneNode(!0);
1510
1510
  if (o) {
1511
- var a = /* @__PURE__ */ re(s), u = s.lastChild;
1512
- no(a, u);
1513
- } else no(s, s);
1511
+ var a = /* @__PURE__ */ le(s), u = s.lastChild;
1512
+ so(a, u);
1513
+ } else so(s, s);
1514
1514
  return s;
1515
1515
  };
1516
1516
  }
1517
- function Vt(t, e) {
1517
+ function zt(t, e) {
1518
1518
  if (P) {
1519
1519
  var o = S;
1520
- (!(o.f & 32768) || o.nodes.end === null) && (o.nodes.end = L), wo();
1520
+ (!(o.f & 32768) || o.nodes.end === null) && (o.nodes.end = L), ko();
1521
1521
  return;
1522
1522
  }
1523
1523
  t !== null && t.before(e);
1524
1524
  }
1525
- var Es = ["touchstart", "touchmove"];
1526
- function Ms(t) {
1527
- return Es.includes(t);
1525
+ var Rs = ["touchstart", "touchmove"];
1526
+ function js(t) {
1527
+ return Rs.includes(t);
1528
1528
  }
1529
- function Hn(t, e) {
1529
+ function Gn(t, e) {
1530
1530
  var o = e == null ? "" : typeof e == "object" ? `${e}` : e;
1531
1531
  o !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = o, t.nodeValue = `${o}`);
1532
1532
  }
1533
- function Qi(t, e) {
1534
- return tr(t, e);
1533
+ function nr(t, e) {
1534
+ return ir(t, e);
1535
1535
  }
1536
- function Ls(t, e) {
1537
- Ko(), e.intro = e.intro ?? !1;
1536
+ function Ns(t, e) {
1537
+ Xo(), e.intro = e.intro ?? !1;
1538
1538
  const o = e.target, n = P, i = L;
1539
1539
  try {
1540
- for (var r = /* @__PURE__ */ re(o); r && (r.nodeType !== 8 || r.data !== "["); ) r = /* @__PURE__ */ St(r);
1541
- if (!r) throw pe;
1540
+ for (var r = /* @__PURE__ */ le(o); r && (r.nodeType !== 8 || r.data !== "["); ) r = /* @__PURE__ */ St(r);
1541
+ if (!r) throw me;
1542
1542
  Lt(!0), U(r);
1543
- const s = tr(t, {
1543
+ const s = ir(t, {
1544
1544
  ...e,
1545
1545
  anchor: r
1546
1546
  });
@@ -1548,138 +1548,138 @@ function Ls(t, e) {
1548
1548
  } catch (s) {
1549
1549
  if (s instanceof Error && s.message.split(`
1550
1550
  `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
1551
- return s !== pe && console.warn("Failed to hydrate: ", s), e.recover === !1 && Vr(), Ko(), Ni(o), Lt(!1), Qi(t, e);
1551
+ return s !== me && console.warn("Failed to hydrate: ", s), e.recover === !1 && Hr(), Xo(), zi(o), Lt(!1), nr(t, e);
1552
1552
  } finally {
1553
1553
  Lt(n), U(i);
1554
1554
  }
1555
1555
  }
1556
- var Ye = /* @__PURE__ */ new Map();
1557
- function tr(t, { target: e, anchor: o, props: n = {}, events: i, context: r, intro: s = !0, transformError: a }) {
1558
- Ko();
1559
- var u = void 0, l = ys(() => {
1556
+ var to = /* @__PURE__ */ new Map();
1557
+ function ir(t, { target: e, anchor: o, props: n = {}, events: i, context: r, intro: s = !0, transformError: a }) {
1558
+ Xo();
1559
+ var u = void 0, l = $s(() => {
1560
1560
  var d = o ?? e.appendChild(pt());
1561
- is(d, { pending: () => {
1561
+ cs(d, { pending: () => {
1562
1562
  } }, (v) => {
1563
- di({});
1564
- var m = j;
1565
- if (r && (m.c = r), i && (n.$$events = i), P && no(v, null), u = t(v, n) || {}, P && (S.nodes.end = L, L === null || L.nodeType !== 8 || L.data !== "]")) throw yo(), pe;
1566
- hi();
1563
+ vi({});
1564
+ var m = V;
1565
+ if (r && (m.c = r), i && (n.$$events = i), P && so(v, null), u = t(v, n) || {}, P && (S.nodes.end = L, L === null || L.nodeType !== 8 || L.data !== "]")) throw Io(), me;
1566
+ gi();
1567
1567
  }, a);
1568
1568
  var h = /* @__PURE__ */ new Set(), f = (v) => {
1569
1569
  for (var m = 0; m < v.length; m++) {
1570
1570
  var k = v[m];
1571
1571
  if (!h.has(k)) {
1572
1572
  h.add(k);
1573
- var p = Ms(k);
1573
+ var p = js(k);
1574
1574
  for (const A of [e, document]) {
1575
- var w = Ye.get(A);
1576
- w === void 0 && (w = /* @__PURE__ */ new Map(), Ye.set(A, w));
1575
+ var w = to.get(A);
1576
+ w === void 0 && (w = /* @__PURE__ */ new Map(), to.set(A, w));
1577
1577
  var R = w.get(k);
1578
- R === void 0 ? (A.addEventListener(k, qn, { passive: p }), w.set(k, 1)) : w.set(k, R + 1);
1578
+ R === void 0 ? (A.addEventListener(k, Fn, { passive: p }), w.set(k, 1)) : w.set(k, R + 1);
1579
1579
  }
1580
1580
  }
1581
1581
  }
1582
1582
  };
1583
- return f(bo(Xi)), Jo.add(f), () => {
1583
+ return f(To(or)), Qo.add(f), () => {
1584
1584
  for (var v of h) for (const p of [e, document]) {
1585
- var m = Ye.get(p), k = m.get(v);
1586
- --k == 0 ? (p.removeEventListener(v, qn), m.delete(v), m.size === 0 && Ye.delete(p)) : m.set(v, k);
1585
+ var m = to.get(p), k = m.get(v);
1586
+ --k == 0 ? (p.removeEventListener(v, Fn), m.delete(v), m.size === 0 && to.delete(p)) : m.set(v, k);
1587
1587
  }
1588
- Jo.delete(f), d !== o && d.parentNode?.removeChild(d);
1588
+ Qo.delete(f), d !== o && d.parentNode?.removeChild(d);
1589
1589
  };
1590
1590
  });
1591
- return Zo.set(u, l), u;
1591
+ return tn.set(u, l), u;
1592
1592
  }
1593
- var Zo = /* @__PURE__ */ new WeakMap();
1594
- function Ps(t, e) {
1595
- const o = Zo.get(t);
1596
- return o ? (Zo.delete(t), o(e)) : Promise.resolve();
1593
+ var tn = /* @__PURE__ */ new WeakMap();
1594
+ function Ws(t, e) {
1595
+ const o = tn.get(t);
1596
+ return o ? (tn.delete(t), o(e)) : Promise.resolve();
1597
1597
  }
1598
- var _t = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), Os = class {
1598
+ var _t = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap(), Vs = class {
1599
1599
  constructor(t, e = !0) {
1600
- y(this, "anchor", void 0), I(this, _t, /* @__PURE__ */ new Map()), I(this, Nt, /* @__PURE__ */ new Map()), I(this, ct, /* @__PURE__ */ new Map()), I(this, Ae, /* @__PURE__ */ new Set()), I(this, Co, !0), I(this, Eo, (o) => {
1600
+ y(this, "anchor", void 0), I(this, _t, /* @__PURE__ */ new Map()), I(this, jt, /* @__PURE__ */ new Map()), I(this, ct, /* @__PURE__ */ new Map()), I(this, Ce, /* @__PURE__ */ new Set()), I(this, Lo, !0), I(this, Po, (o) => {
1601
1601
  if (c(_t, this).has(o)) {
1602
- var n = c(_t, this).get(o), i = c(Nt, this).get(n);
1603
- if (i) mn(i), c(Ae, this).delete(n);
1602
+ var n = c(_t, this).get(o), i = c(jt, this).get(n);
1603
+ if (i) Tn(i), c(Ce, this).delete(n);
1604
1604
  else {
1605
1605
  var r = c(ct, this).get(n);
1606
- r && (c(Nt, this).set(n, r.effect), c(ct, this).delete(n), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), i = r.effect);
1606
+ r && (c(jt, this).set(n, r.effect), c(ct, this).delete(n), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), i = r.effect);
1607
1607
  }
1608
1608
  for (const [s, a] of c(_t, this)) {
1609
1609
  if (c(_t, this).delete(s), s === o) break;
1610
1610
  const u = c(ct, this).get(a);
1611
- u && (H(u.effect), c(ct, this).delete(a));
1611
+ u && (D(u.effect), c(ct, this).delete(a));
1612
1612
  }
1613
- for (const [s, a] of c(Nt, this)) {
1614
- if (s === n || c(Ae, this).has(s)) continue;
1613
+ for (const [s, a] of c(jt, this)) {
1614
+ if (s === n || c(Ce, this).has(s)) continue;
1615
1615
  const u = () => {
1616
1616
  if (Array.from(c(_t, this).values()).includes(s)) {
1617
1617
  var l = document.createDocumentFragment();
1618
- bn(a, l), l.append(pt()), c(ct, this).set(s, {
1618
+ In(a, l), l.append(pt()), c(ct, this).set(s, {
1619
1619
  effect: a,
1620
1620
  fragment: l
1621
1621
  });
1622
- } else H(a);
1623
- c(Ae, this).delete(s), c(Nt, this).delete(s);
1622
+ } else D(a);
1623
+ c(Ce, this).delete(s), c(jt, this).delete(s);
1624
1624
  };
1625
- c(Co, this) || !i ? (c(Ae, this).add(s), le(a, u, !1)) : u();
1625
+ c(Lo, this) || !i ? (c(Ce, this).add(s), de(a, u, !1)) : u();
1626
1626
  }
1627
1627
  }
1628
- }), I(this, Dn, (o) => {
1628
+ }), I(this, Un, (o) => {
1629
1629
  c(_t, this).delete(o);
1630
1630
  const n = Array.from(c(_t, this).values());
1631
- for (const [i, r] of c(ct, this)) n.includes(i) || (H(r.effect), c(ct, this).delete(i));
1632
- }), this.anchor = t, $(Co, this, e);
1631
+ for (const [i, r] of c(ct, this)) n.includes(i) || (D(r.effect), c(ct, this).delete(i));
1632
+ }), this.anchor = t, $(Lo, this, e);
1633
1633
  }
1634
1634
  ensure(t, e) {
1635
- var o = x, n = Wi();
1636
- if (e && !c(Nt, this).has(t) && !c(ct, this).has(t)) if (n) {
1635
+ var o = x, n = qi();
1636
+ if (e && !c(jt, this).has(t) && !c(ct, this).has(t)) if (n) {
1637
1637
  var i = document.createDocumentFragment(), r = pt();
1638
1638
  i.append(r), c(ct, this).set(t, {
1639
1639
  effect: it(() => e(r)),
1640
1640
  fragment: i
1641
1641
  });
1642
- } else c(Nt, this).set(t, it(() => e(this.anchor)));
1642
+ } else c(jt, this).set(t, it(() => e(this.anchor)));
1643
1643
  if (c(_t, this).set(o, t), n) {
1644
- for (const [s, a] of c(Nt, this)) s === t ? o.unskip_effect(a) : o.skip_effect(a);
1644
+ for (const [s, a] of c(jt, this)) s === t ? o.unskip_effect(a) : o.skip_effect(a);
1645
1645
  for (const [s, a] of c(ct, this)) s === t ? o.unskip_effect(a.effect) : o.skip_effect(a.effect);
1646
- o.oncommit(c(Eo, this)), o.ondiscard(c(Dn, this));
1647
- } else P && (this.anchor = L), c(Eo, this).call(this, o);
1646
+ o.oncommit(c(Po, this)), o.ondiscard(c(Un, this));
1647
+ } else P && (this.anchor = L), c(Po, this).call(this, o);
1648
1648
  }
1649
1649
  };
1650
- function xe(t, e, o = !1) {
1650
+ function Ee(t, e, o = !1) {
1651
1651
  var n;
1652
- P && (n = L, wo());
1653
- var i = new Os(t), r = o ? en : 0;
1652
+ P && (n = L, ko());
1653
+ var i = new Vs(t), r = o ? sn : 0;
1654
1654
  function s(a, u) {
1655
1655
  if (P) {
1656
- var l = li(n);
1656
+ var l = hi(n);
1657
1657
  if (a !== parseInt(l.substring(1))) {
1658
- var d = ho();
1658
+ var d = vo();
1659
1659
  U(d), i.anchor = d, Lt(!1), i.ensure(a, u), Lt(!0);
1660
1660
  return;
1661
1661
  }
1662
1662
  }
1663
1663
  i.ensure(a, u);
1664
1664
  }
1665
- vn(() => {
1665
+ yn(() => {
1666
1666
  var a = !1;
1667
1667
  e((u, l = 0) => {
1668
1668
  a = !0, s(l, u);
1669
1669
  }), a || s(-1, null);
1670
1670
  }, r);
1671
1671
  }
1672
- function Rs(t, e) {
1672
+ function zs(t, e) {
1673
1673
  return e;
1674
1674
  }
1675
- function Ns(t, e, o) {
1675
+ function qs(t, e, o) {
1676
1676
  for (var n = [], i = e.length, r, s = e.length, a = 0; a < i; a++) {
1677
1677
  let h = e[a];
1678
- le(h, () => {
1678
+ de(h, () => {
1679
1679
  if (r) {
1680
1680
  if (r.pending.delete(h), r.done.add(h), r.pending.size === 0) {
1681
1681
  var f = t.outrogroups;
1682
- Yo(t, bo(r.done)), f.delete(r), f.size === 0 && (t.outrogroups = null);
1682
+ en(t, To(r.done)), f.delete(r), f.size === 0 && (t.outrogroups = null);
1683
1683
  }
1684
1684
  } else s -= 1;
1685
1685
  }, !1);
@@ -1688,15 +1688,15 @@ function Ns(t, e, o) {
1688
1688
  var u = n.length === 0 && o !== null;
1689
1689
  if (u) {
1690
1690
  var l = o, d = l.parentNode;
1691
- Ni(d), d.append(l), t.items.clear();
1691
+ zi(d), d.append(l), t.items.clear();
1692
1692
  }
1693
- Yo(t, e, !u);
1693
+ en(t, e, !u);
1694
1694
  } else r = {
1695
1695
  pending: new Set(e),
1696
1696
  done: /* @__PURE__ */ new Set()
1697
1697
  }, (t.outrogroups ?? (t.outrogroups = /* @__PURE__ */ new Set())).add(r);
1698
1698
  }
1699
- function Yo(t, e, o = !0) {
1699
+ function en(t, e, o = !0) {
1700
1700
  var n;
1701
1701
  if (t.pending.size > 0) {
1702
1702
  n = /* @__PURE__ */ new Set();
@@ -1704,23 +1704,23 @@ function Yo(t, e, o = !0) {
1704
1704
  }
1705
1705
  for (var i = 0; i < e.length; i++) {
1706
1706
  var r = e[i];
1707
- n?.has(r) ? (r.f |= Me, bn(r, document.createDocumentFragment())) : H(e[i], o);
1707
+ n?.has(r) ? (r.f |= Oe, In(r, document.createDocumentFragment())) : D(e[i], o);
1708
1708
  }
1709
1709
  }
1710
- var Xe;
1711
- function Ws(t, e, o, n, i, r = null) {
1710
+ var eo;
1711
+ function Ds(t, e, o, n, i, r = null) {
1712
1712
  var s = t, a = /* @__PURE__ */ new Map();
1713
1713
  if (e & 4) {
1714
1714
  var u = t;
1715
- s = P ? U(/* @__PURE__ */ re(u)) : u.appendChild(pt());
1715
+ s = P ? U(/* @__PURE__ */ le(u)) : u.appendChild(pt());
1716
1716
  }
1717
- P && wo();
1718
- var l = null, d = /* @__PURE__ */ cn(() => {
1717
+ P && ko();
1718
+ var l = null, d = /* @__PURE__ */ fn(() => {
1719
1719
  var w = o();
1720
- return ii(w) ? w : w == null ? [] : bo(w);
1720
+ return li(w) ? w : w == null ? [] : To(w);
1721
1721
  }), h, f = /* @__PURE__ */ new Map(), v = !0;
1722
1722
  function m(w) {
1723
- p.effect.f & 16384 || (p.pending.delete(w), p.fallback = l, Vs(p, h, s, e, n), l !== null && (h.length === 0 ? l.f & 33554432 ? (l.f ^= Me, Ee(l, null, s)) : mn(l) : le(l, () => {
1723
+ p.effect.f & 16384 || (p.pending.delete(w), p.fallback = l, Hs(p, h, s, e, n), l !== null && (h.length === 0 ? l.f & 33554432 ? (l.f ^= Oe, Pe(l, null, s)) : Tn(l) : de(l, () => {
1724
1724
  l = null;
1725
1725
  })));
1726
1726
  }
@@ -1728,18 +1728,18 @@ function Ws(t, e, o, n, i, r = null) {
1728
1728
  p.pending.delete(w);
1729
1729
  }
1730
1730
  var p = {
1731
- effect: vn(() => {
1731
+ effect: yn(() => {
1732
1732
  h = g(d);
1733
1733
  var w = h.length;
1734
1734
  let R = !1;
1735
- P && li(s) === "[!" != (w === 0) && (s = ho(), U(s), Lt(!1), R = !0);
1736
- for (var A = /* @__PURE__ */ new Set(), O = x, K = Wi(), D = 0; D < w; D += 1) {
1735
+ P && hi(s) === "[!" != (w === 0) && (s = vo(), U(s), Lt(!1), R = !0);
1736
+ for (var A = /* @__PURE__ */ new Set(), O = x, J = qi(), H = 0; H < w; H += 1) {
1737
1737
  P && L.nodeType === 8 && L.data === "]" && (s = L, R = !0, Lt(!1));
1738
- var B = h[D], gt = n(B, D), J = v ? null : a.get(gt);
1739
- J ? (J.v && ye(J.v, B), J.i && ye(J.i, D), K && O.unskip_effect(J.e)) : (J = js(a, v ? s : Xe ?? (Xe = pt()), B, gt, D, i, e, o), v || (J.e.f |= Me), a.set(gt, J)), A.add(gt);
1738
+ var B = h[H], gt = n(B, H), K = v ? null : a.get(gt);
1739
+ K ? (K.v && Ie(K.v, B), K.i && Ie(K.i, H), J && O.unskip_effect(K.e)) : (K = Bs(a, v ? s : eo ?? (eo = pt()), B, gt, H, i, e, o), v || (K.e.f |= Oe), a.set(gt, K)), A.add(gt);
1740
1740
  }
1741
- if (w === 0 && r && !l && (v ? l = it(() => r(s)) : (l = it(() => r(Xe ?? (Xe = pt()))), l.f |= Me)), w > A.size && Pr("", "", ""), P && w > 0 && U(ho()), !v) if (f.set(O, A), K) {
1742
- for (const [mt, ze] of a) A.has(mt) || O.skip_effect(ze.e);
1741
+ if (w === 0 && r && !l && (v ? l = it(() => r(s)) : (l = it(() => r(eo ?? (eo = pt()))), l.f |= Oe)), w > A.size && Wr("", "", ""), P && w > 0 && U(vo()), !v) if (f.set(O, A), J) {
1742
+ for (const [mt, He] of a) A.has(mt) || O.skip_effect(He.e);
1743
1743
  O.oncommit(m), O.ondiscard(k);
1744
1744
  } else m(O);
1745
1745
  R && Lt(!0), g(d);
@@ -1752,19 +1752,19 @@ function Ws(t, e, o, n, i, r = null) {
1752
1752
  };
1753
1753
  v = !1, P && (s = L);
1754
1754
  }
1755
- function _e(t) {
1755
+ function Me(t) {
1756
1756
  for (; t !== null && !(t.f & 32); ) t = t.next;
1757
1757
  return t;
1758
1758
  }
1759
- function Vs(t, e, o, n, i) {
1760
- var r = (n & 8) !== 0, s = e.length, a = t.items, u = _e(t.effect.first), l, d = null, h, f = [], v = [], m, k, p, w;
1759
+ function Hs(t, e, o, n, i) {
1760
+ var r = (n & 8) !== 0, s = e.length, a = t.items, u = Me(t.effect.first), l, d = null, h, f = [], v = [], m, k, p, w;
1761
1761
  if (r) for (w = 0; w < s; w += 1) m = e[w], k = i(m, w), p = a.get(k).e, p.f & 33554432 || (p.nodes?.a?.measure(), (h ?? (h = /* @__PURE__ */ new Set())).add(p));
1762
1762
  for (w = 0; w < s; w += 1) {
1763
1763
  if (m = e[w], k = i(m, w), p = a.get(k).e, t.outrogroups !== null) for (const mt of t.outrogroups) mt.pending.delete(p), mt.done.delete(p);
1764
- if (p.f & 8192 && (mn(p), r && (p.nodes?.a?.unfix(), (h ?? (h = /* @__PURE__ */ new Set())).delete(p))), p.f & 33554432) if (p.f ^= Me, p === u) Ee(p, null, o);
1764
+ if (p.f & 8192 && (Tn(p), r && (p.nodes?.a?.unfix(), (h ?? (h = /* @__PURE__ */ new Set())).delete(p))), p.f & 33554432) if (p.f ^= Oe, p === u) Pe(p, null, o);
1765
1765
  else {
1766
1766
  var R = d ? d.next : u;
1767
- p === t.effect.last && (t.effect.last = p.prev), p.prev && (p.prev.next = p.next), p.next && (p.next.prev = p.prev), Wt(t, d, p), Wt(t, p, R), Ee(p, R, o), d = p, f = [], v = [], u = _e(d.next);
1767
+ p === t.effect.last && (t.effect.last = p.prev), p.prev && (p.prev.next = p.next), p.next && (p.next.prev = p.prev), Nt(t, d, p), Nt(t, p, R), Pe(p, R, o), d = p, f = [], v = [], u = Me(d.next);
1768
1768
  continue;
1769
1769
  }
1770
1770
  if (p !== u) {
@@ -1772,42 +1772,42 @@ function Vs(t, e, o, n, i) {
1772
1772
  if (f.length < v.length) {
1773
1773
  var A = v[0], O;
1774
1774
  d = A.prev;
1775
- var K = f[0], D = f[f.length - 1];
1776
- for (O = 0; O < f.length; O += 1) Ee(f[O], A, o);
1775
+ var J = f[0], H = f[f.length - 1];
1776
+ for (O = 0; O < f.length; O += 1) Pe(f[O], A, o);
1777
1777
  for (O = 0; O < v.length; O += 1) l.delete(v[O]);
1778
- Wt(t, K.prev, D.next), Wt(t, d, K), Wt(t, D, A), u = A, d = D, w -= 1, f = [], v = [];
1779
- } else l.delete(p), Ee(p, u, o), Wt(t, p.prev, p.next), Wt(t, p, d === null ? t.effect.first : d.next), Wt(t, d, p), d = p;
1778
+ Nt(t, J.prev, H.next), Nt(t, d, J), Nt(t, H, A), u = A, d = H, w -= 1, f = [], v = [];
1779
+ } else l.delete(p), Pe(p, u, o), Nt(t, p.prev, p.next), Nt(t, p, d === null ? t.effect.first : d.next), Nt(t, d, p), d = p;
1780
1780
  continue;
1781
1781
  }
1782
- for (f = [], v = []; u !== null && u !== p; ) (l ?? (l = /* @__PURE__ */ new Set())).add(u), v.push(u), u = _e(u.next);
1782
+ for (f = [], v = []; u !== null && u !== p; ) (l ?? (l = /* @__PURE__ */ new Set())).add(u), v.push(u), u = Me(u.next);
1783
1783
  if (u === null) continue;
1784
1784
  }
1785
- p.f & 33554432 || f.push(p), d = p, u = _e(p.next);
1785
+ p.f & 33554432 || f.push(p), d = p, u = Me(p.next);
1786
1786
  }
1787
1787
  if (t.outrogroups !== null) {
1788
- for (const mt of t.outrogroups) mt.pending.size === 0 && (Yo(t, bo(mt.done)), t.outrogroups?.delete(mt));
1788
+ for (const mt of t.outrogroups) mt.pending.size === 0 && (en(t, To(mt.done)), t.outrogroups?.delete(mt));
1789
1789
  t.outrogroups.size === 0 && (t.outrogroups = null);
1790
1790
  }
1791
1791
  if (u !== null || l !== void 0) {
1792
1792
  var B = [];
1793
1793
  if (l !== void 0) for (p of l) p.f & 8192 || B.push(p);
1794
- for (; u !== null; ) !(u.f & 8192) && u !== t.fallback && B.push(u), u = _e(u.next);
1794
+ for (; u !== null; ) !(u.f & 8192) && u !== t.fallback && B.push(u), u = Me(u.next);
1795
1795
  var gt = B.length;
1796
1796
  if (gt > 0) {
1797
- var J = n & 4 && s === 0 ? o : null;
1797
+ var K = n & 4 && s === 0 ? o : null;
1798
1798
  if (r) {
1799
1799
  for (w = 0; w < gt; w += 1) B[w].nodes?.a?.measure();
1800
1800
  for (w = 0; w < gt; w += 1) B[w].nodes?.a?.fix();
1801
1801
  }
1802
- Ns(t, B, J);
1802
+ qs(t, B, K);
1803
1803
  }
1804
1804
  }
1805
- r && ne(() => {
1805
+ r && se(() => {
1806
1806
  if (h !== void 0) for (p of h) p.nodes?.a?.apply();
1807
1807
  });
1808
1808
  }
1809
- function js(t, e, o, n, i, r, s, a) {
1810
- var u = s & 1 ? s & 16 ? ie(o) : /* @__PURE__ */ Mi(o, !1, !1) : null, l = s & 2 ? ie(i) : null;
1809
+ function Bs(t, e, o, n, i, r, s, a) {
1810
+ var u = s & 1 ? s & 16 ? ae(o) : /* @__PURE__ */ Ri(o, !1, !1) : null, l = s & 2 ? ae(i) : null;
1811
1811
  return {
1812
1812
  v: u,
1813
1813
  i: l,
@@ -1816,26 +1816,26 @@ function js(t, e, o, n, i, r, s, a) {
1816
1816
  }))
1817
1817
  };
1818
1818
  }
1819
- function Ee(t, e, o) {
1819
+ function Pe(t, e, o) {
1820
1820
  if (t.nodes) for (var n = t.nodes.start, i = t.nodes.end, r = e && !(e.f & 33554432) ? e.nodes.start : o; n !== null; ) {
1821
1821
  var s = /* @__PURE__ */ St(n);
1822
1822
  if (r.before(n), n === i) return;
1823
1823
  n = s;
1824
1824
  }
1825
1825
  }
1826
- function Wt(t, e, o) {
1826
+ function Nt(t, e, o) {
1827
1827
  e === null ? t.effect.first = o : e.next = o, o === null ? t.effect.last = e : o.prev = e;
1828
1828
  }
1829
- function zs(t, e) {
1830
- zi(() => {
1829
+ function Fs(t, e) {
1830
+ Bi(() => {
1831
1831
  var o = t.getRootNode(), n = o.host ? o : o.head ?? o.ownerDocument.head;
1832
1832
  if (!n.querySelector("#" + e.hash)) {
1833
- const i = dn("style");
1833
+ const i = vn("style");
1834
1834
  i.id = e.hash, i.textContent = e.code, n.appendChild(i);
1835
1835
  }
1836
1836
  });
1837
1837
  }
1838
- function Bn(t, e = !1) {
1838
+ function Jn(t, e = !1) {
1839
1839
  var o = e ? " !important;" : ";", n = "";
1840
1840
  for (var i of Object.keys(t)) {
1841
1841
  var r = t[i];
@@ -1843,16 +1843,16 @@ function Bn(t, e = !1) {
1843
1843
  }
1844
1844
  return n;
1845
1845
  }
1846
- function Mo(t) {
1846
+ function Oo(t) {
1847
1847
  return t[0] !== "-" || t[1] !== "-" ? t.toLowerCase() : t;
1848
1848
  }
1849
- function qs(t, e) {
1849
+ function Gs(t, e) {
1850
1850
  if (e) {
1851
1851
  var o = "", n, i;
1852
1852
  if (Array.isArray(e) ? (n = e[0], i = e[1]) : n = e, t) {
1853
1853
  t = String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1854
1854
  var r = !1, s = 0, a = !1, u = [];
1855
- n && u.push(...Object.keys(n).map(Mo)), i && u.push(...Object.keys(i).map(Mo));
1855
+ n && u.push(...Object.keys(n).map(Oo)), i && u.push(...Object.keys(i).map(Oo));
1856
1856
  var l = 0, d = -1;
1857
1857
  const k = t.length;
1858
1858
  for (var h = 0; h < k; h++) {
@@ -1861,7 +1861,7 @@ function qs(t, e) {
1861
1861
  if (f === ":" && d === -1) d = h;
1862
1862
  else if (f === ";" || h === k - 1) {
1863
1863
  if (d !== -1) {
1864
- var v = Mo(t.substring(l, d).trim());
1864
+ var v = Oo(t.substring(l, d).trim());
1865
1865
  if (!u.includes(v)) {
1866
1866
  f !== ";" && h++;
1867
1867
  var m = t.substring(l, h).trim();
@@ -1873,85 +1873,85 @@ function qs(t, e) {
1873
1873
  }
1874
1874
  }
1875
1875
  }
1876
- return n && (o += Bn(n)), i && (o += Bn(i, !0)), o = o.trim(), o === "" ? null : o;
1876
+ return n && (o += Jn(n)), i && (o += Jn(i, !0)), o = o.trim(), o === "" ? null : o;
1877
1877
  }
1878
1878
  return t == null ? null : String(t);
1879
1879
  }
1880
- function Lo(t, e = {}, o, n) {
1880
+ function Ro(t, e = {}, o, n) {
1881
1881
  for (var i in o) {
1882
1882
  var r = o[i];
1883
1883
  e[i] !== r && (o[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, r, n));
1884
1884
  }
1885
1885
  }
1886
- function Fn(t, e, o, n) {
1886
+ function Kn(t, e, o, n) {
1887
1887
  var i = t.__style;
1888
1888
  if (P || i !== e) {
1889
- var r = qs(e, n);
1889
+ var r = Gs(e, n);
1890
1890
  (!P || r !== t.getAttribute("style")) && (r == null ? t.removeAttribute("style") : t.style.cssText = r), t.__style = e;
1891
- } else n && (Array.isArray(n) ? (Lo(t, o?.[0], n[0]), Lo(t, o?.[1], n[1], "important")) : Lo(t, o, n));
1891
+ } else n && (Array.isArray(n) ? (Ro(t, o?.[0], n[0]), Ro(t, o?.[1], n[1], "important")) : Ro(t, o, n));
1892
1892
  return n;
1893
1893
  }
1894
- var Hs = Symbol("is custom element"), Ds = Symbol("is html"), Bs = Mr ? "link" : "LINK";
1895
- function Gn(t, e, o, n) {
1896
- var i = Fs(t);
1897
- P && (i[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === Bs) || i[e] !== (i[e] = o) && (e === "loading" && (t[Er] = o), o == null ? t.removeAttribute(e) : typeof o != "string" && Gs(t).includes(e) ? t[e] = o : t.setAttribute(e, o));
1894
+ var Us = Symbol("is custom element"), Js = Symbol("is html"), Ks = jr ? "link" : "LINK";
1895
+ function Zn(t, e, o, n) {
1896
+ var i = Zs(t);
1897
+ P && (i[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === Ks) || i[e] !== (i[e] = o) && (e === "loading" && (t[Rr] = o), o == null ? t.removeAttribute(e) : typeof o != "string" && Ys(t).includes(e) ? t[e] = o : t.setAttribute(e, o));
1898
1898
  }
1899
- function Fs(t) {
1899
+ function Zs(t) {
1900
1900
  return t.__attributes ?? (t.__attributes = {
1901
- [Hs]: t.nodeName.includes("-"),
1902
- [Ds]: t.namespaceURI === "http://www.w3.org/1999/xhtml"
1901
+ [Us]: t.nodeName.includes("-"),
1902
+ [Js]: t.namespaceURI === "http://www.w3.org/1999/xhtml"
1903
1903
  });
1904
1904
  }
1905
- var Un = /* @__PURE__ */ new Map();
1906
- function Gs(t) {
1907
- var e = t.getAttribute("is") || t.nodeName, o = Un.get(e);
1905
+ var Yn = /* @__PURE__ */ new Map();
1906
+ function Ys(t) {
1907
+ var e = t.getAttribute("is") || t.nodeName, o = Yn.get(e);
1908
1908
  if (o) return o;
1909
- Un.set(e, o = []);
1909
+ Yn.set(e, o = []);
1910
1910
  for (var n, i = t, r = Element.prototype; r !== i; ) {
1911
- n = Ir(i);
1911
+ n = xr(i);
1912
1912
  for (var s in n) n[s].set && o.push(s);
1913
- i = ri(i);
1913
+ i = ci(i);
1914
1914
  }
1915
1915
  return o;
1916
1916
  }
1917
- var er, de = /* @__PURE__ */ new WeakMap(), go = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakSet(), or = class {
1917
+ var rr, pe = /* @__PURE__ */ new WeakMap(), yo = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakSet(), sr = class {
1918
1918
  constructor(t) {
1919
- nn(this, Kn), I(this, de, /* @__PURE__ */ new WeakMap()), I(this, go, void 0), I(this, Po, void 0), $(Po, this, t);
1919
+ ln(this, Xn), I(this, pe, /* @__PURE__ */ new WeakMap()), I(this, yo, void 0), I(this, jo, void 0), $(jo, this, t);
1920
1920
  }
1921
1921
  observe(t, e) {
1922
- var o = c(de, this).get(t) || /* @__PURE__ */ new Set();
1923
- return o.add(e), c(de, this).set(t, o), E(Kn, this, Us).call(this).observe(t, c(Po, this)), () => {
1924
- var n = c(de, this).get(t);
1925
- n.delete(e), n.size === 0 && (c(de, this).delete(t), c(go, this).unobserve(t));
1922
+ var o = c(pe, this).get(t) || /* @__PURE__ */ new Set();
1923
+ return o.add(e), c(pe, this).set(t, o), E(Xn, this, Xs).call(this).observe(t, c(jo, this)), () => {
1924
+ var n = c(pe, this).get(t);
1925
+ n.delete(e), n.size === 0 && (c(pe, this).delete(t), c(yo, this).unobserve(t));
1926
1926
  };
1927
1927
  }
1928
1928
  };
1929
- er = or;
1930
- function Us() {
1931
- return c(go, this) ?? $(go, this, new ResizeObserver((t) => {
1929
+ rr = sr;
1930
+ function Xs() {
1931
+ return c(yo, this) ?? $(yo, this, new ResizeObserver((t) => {
1932
1932
  for (var e of t) {
1933
- er.entries.set(e.target, e);
1934
- for (var o of c(de, this).get(e.target) || []) o(e);
1933
+ rr.entries.set(e.target, e);
1934
+ for (var o of c(pe, this).get(e.target) || []) o(e);
1935
1935
  }
1936
1936
  }));
1937
1937
  }
1938
- y(or, "entries", /* @__PURE__ */ new WeakMap());
1939
- function Jn(t, e) {
1940
- return t === e || t?.[Le] === e;
1938
+ y(sr, "entries", /* @__PURE__ */ new WeakMap());
1939
+ function Qn(t, e) {
1940
+ return t === e || t?.[Re] === e;
1941
1941
  }
1942
- function Zn(t = {}, e, o, n) {
1943
- var i = j.r, r = S;
1944
- return zi(() => {
1942
+ function ti(t = {}, e, o, n) {
1943
+ var i = V.r, r = S;
1944
+ return Bi(() => {
1945
1945
  var s, a;
1946
- return pn(() => {
1947
- s = a, a = n?.() || [], yn(() => {
1948
- t !== o(...a) && (e(t, ...a), s && Jn(o(...s), t) && e(null, ...s));
1946
+ return bn(() => {
1947
+ s = a, a = n?.() || [], kn(() => {
1948
+ t !== o(...a) && (e(t, ...a), s && Qn(o(...s), t) && e(null, ...s));
1949
1949
  });
1950
1950
  }), () => {
1951
1951
  let u = r;
1952
1952
  for (; u !== i && u.parent !== null && u.parent.f & 33554432; ) u = u.parent;
1953
1953
  const l = () => {
1954
- a && Jn(o(...a), t) && e(null, ...a);
1954
+ a && Qn(o(...a), t) && e(null, ...a);
1955
1955
  }, d = u.teardown;
1956
1956
  u.teardown = () => {
1957
1957
  l(), d?.();
@@ -1959,15 +1959,15 @@ function Zn(t = {}, e, o, n) {
1959
1959
  };
1960
1960
  }), t;
1961
1961
  }
1962
- function Oo(t, e, o, n) {
1963
- var i = !To || (o & 2) !== 0, r = (o & 8) !== 0, s = (o & 16) !== 0, a = n, u = !0, l = () => (u && (u = !1, a = s ? yn(n) : n), a);
1962
+ function No(t, e, o, n) {
1963
+ var i = !$o || (o & 2) !== 0, r = (o & 8) !== 0, s = (o & 16) !== 0, a = n, u = !0, l = () => (u && (u = !1, a = s ? kn(n) : n), a);
1964
1964
  let d;
1965
1965
  if (r) {
1966
- var h = Le in t || ai in t;
1967
- d = Yt(t, e)?.set ?? (h && e in t ? (A) => t[e] = A : void 0);
1966
+ var h = Re in t || di in t;
1967
+ d = Qt(t, e)?.set ?? (h && e in t ? (A) => t[e] = A : void 0);
1968
1968
  }
1969
1969
  var f, v = !1;
1970
- r ? [f, v] = Yr(() => t[e]) : f = t[e], f === void 0 && n !== void 0 && (f = l(), d && (i && jr(e), d(f)));
1970
+ r ? [f, v] = os(() => t[e]) : f = t[e], f === void 0 && n !== void 0 && (f = l(), d && (i && Br(e), d(f)));
1971
1971
  var m;
1972
1972
  if (i ? m = () => {
1973
1973
  var A = t[e];
@@ -1982,25 +1982,25 @@ function Oo(t, e, o, n) {
1982
1982
  return arguments.length > 0 ? ((!i || !O || k || v) && d(O ? m() : A), A) : m();
1983
1983
  };
1984
1984
  }
1985
- var p = !1, w = (o & 1 ? Io : cn)(() => (p = !1, m()));
1985
+ var p = !1, w = (o & 1 ? So : fn)(() => (p = !1, m()));
1986
1986
  r && g(w);
1987
1987
  var R = S;
1988
1988
  return function(A, O) {
1989
1989
  if (arguments.length > 0) {
1990
- const K = O ? g(w) : i && r ? Jt(A) : A;
1991
- return C(w, K), p = !0, a !== void 0 && (a = K), A;
1990
+ const J = O ? g(w) : i && r ? Yt(A) : A;
1991
+ return C(w, J), p = !0, a !== void 0 && (a = J), A;
1992
1992
  }
1993
1993
  return Ot && p || R.f & 16384 ? w.v : g(w);
1994
1994
  };
1995
1995
  }
1996
- function Ks(t) {
1997
- return new Js(t);
1996
+ function Qs(t) {
1997
+ return new ta(t);
1998
1998
  }
1999
- var Gt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Js = class {
1999
+ var Jt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), ta = class {
2000
2000
  constructor(t) {
2001
- I(this, Gt, void 0), I(this, bt, void 0);
2001
+ I(this, Jt, void 0), I(this, bt, void 0);
2002
2002
  var e = /* @__PURE__ */ new Map(), o = (i, r) => {
2003
- var s = /* @__PURE__ */ Mi(r, !1, !1);
2003
+ var s = /* @__PURE__ */ Ri(r, !1, !1);
2004
2004
  return e.set(i, s), s;
2005
2005
  };
2006
2006
  const n = new Proxy({
@@ -2011,13 +2011,13 @@ var Gt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Js =
2011
2011
  return g(e.get(r) ?? o(r, Reflect.get(i, r)));
2012
2012
  },
2013
2013
  has(i, r) {
2014
- return r === ai ? !0 : (g(e.get(r) ?? o(r, Reflect.get(i, r))), Reflect.has(i, r));
2014
+ return r === di ? !0 : (g(e.get(r) ?? o(r, Reflect.get(i, r))), Reflect.has(i, r));
2015
2015
  },
2016
2016
  set(i, r, s) {
2017
2017
  return C(e.get(r) ?? o(r, s), s), Reflect.set(i, r, s);
2018
2018
  }
2019
2019
  });
2020
- $(bt, this, (t.hydrate ? Ls : Qi)(t.component, {
2020
+ $(bt, this, (t.hydrate ? Ns : nr)(t.component, {
2021
2021
  target: t.target,
2022
2022
  anchor: t.anchor,
2023
2023
  props: n,
@@ -2025,8 +2025,8 @@ var Gt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Js =
2025
2025
  intro: t.intro ?? !1,
2026
2026
  recover: t.recover,
2027
2027
  transformError: t.transformError
2028
- })), !Pt && (!t?.props?.$$host || t.sync === !1) && eo(), $(Gt, this, n.$$events);
2029
- for (const i of Object.keys(c(bt, this))) i === "$set" || i === "$destroy" || i === "$on" || co(this, i, {
2028
+ })), !Pt && (!t?.props?.$$host || t.sync === !1) && io(), $(Jt, this, n.$$events);
2029
+ for (const i of Object.keys(c(bt, this))) i === "$set" || i === "$destroy" || i === "$on" || fo(this, i, {
2030
2030
  get() {
2031
2031
  return c(bt, this)[i];
2032
2032
  },
@@ -2038,24 +2038,24 @@ var Gt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Js =
2038
2038
  c(bt, this).$set = (i) => {
2039
2039
  Object.assign(n, i);
2040
2040
  }, c(bt, this).$destroy = () => {
2041
- Ps(c(bt, this));
2041
+ Ws(c(bt, this));
2042
2042
  };
2043
2043
  }
2044
2044
  $set(t) {
2045
2045
  c(bt, this).$set(t);
2046
2046
  }
2047
2047
  $on(t, e) {
2048
- c(Gt, this)[t] = c(Gt, this)[t] || [];
2048
+ c(Jt, this)[t] = c(Jt, this)[t] || [];
2049
2049
  const o = (...n) => e.call(this, ...n);
2050
- return c(Gt, this)[t].push(o), () => {
2051
- c(Gt, this)[t] = c(Gt, this)[t].filter((n) => n !== o);
2050
+ return c(Jt, this)[t].push(o), () => {
2051
+ c(Jt, this)[t] = c(Jt, this)[t].filter((n) => n !== o);
2052
2052
  };
2053
2053
  }
2054
2054
  $destroy() {
2055
2055
  c(bt, this).$destroy();
2056
2056
  }
2057
- }, nr;
2058
- typeof HTMLElement == "function" && (nr = class extends HTMLElement {
2057
+ }, ar;
2058
+ typeof HTMLElement == "function" && (ar = class extends HTMLElement {
2059
2059
  constructor(t, e, o) {
2060
2060
  super(), y(this, "$$ctor", void 0), y(this, "$$s", void 0), y(this, "$$c", void 0), y(this, "$$cn", !1), y(this, "$$d", {}), y(this, "$$r", !1), y(this, "$$p_d", {}), y(this, "$$l", {}), y(this, "$$l_u", /* @__PURE__ */ new Map()), y(this, "$$me", void 0), y(this, "$$shadowRoot", null), this.$$ctor = t, this.$$s = e, o && (this.$$shadowRoot = this.attachShadow(o));
2061
2061
  }
@@ -2076,19 +2076,19 @@ typeof HTMLElement == "function" && (nr = class extends HTMLElement {
2076
2076
  if (this.$$cn = !0, !this.$$c) {
2077
2077
  let t = function(n) {
2078
2078
  return (i) => {
2079
- const r = dn("slot");
2080
- n !== "default" && (r.name = n), Vt(i, r);
2079
+ const r = vn("slot");
2080
+ n !== "default" && (r.name = n), zt(i, r);
2081
2081
  };
2082
2082
  };
2083
2083
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2084
- const e = {}, o = Zs(this);
2084
+ const e = {}, o = ea(this);
2085
2085
  for (const n of this.$$s) n in o && (n === "default" && !this.$$d.children ? (this.$$d.children = t(n), e.default = !0) : e[n] = t(n));
2086
2086
  for (const n of this.attributes) {
2087
2087
  const i = this.$$g_p(n.name);
2088
- i in this.$$d || (this.$$d[i] = io(i, n.value, this.$$p_d, "toProp"));
2088
+ i in this.$$d || (this.$$d[i] = ao(i, n.value, this.$$p_d, "toProp"));
2089
2089
  }
2090
2090
  for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
2091
- this.$$c = Ks({
2091
+ this.$$c = Qs({
2092
2092
  component: this.$$ctor,
2093
2093
  target: this.$$shadowRoot || this,
2094
2094
  props: {
@@ -2096,13 +2096,13 @@ typeof HTMLElement == "function" && (nr = class extends HTMLElement {
2096
2096
  $$slots: e,
2097
2097
  $$host: this
2098
2098
  }
2099
- }), this.$$me = bs(() => {
2100
- pn(() => {
2099
+ }), this.$$me = ks(() => {
2100
+ bn(() => {
2101
2101
  this.$$r = !0;
2102
- for (const n of lo(this.$$c)) {
2102
+ for (const n of ho(this.$$c)) {
2103
2103
  if (!this.$$p_d[n]?.reflect) continue;
2104
2104
  this.$$d[n] = this.$$c[n];
2105
- const i = io(n, this.$$d[n], this.$$p_d, "toAttribute");
2105
+ const i = ao(n, this.$$d[n], this.$$p_d, "toAttribute");
2106
2106
  i == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, i);
2107
2107
  }
2108
2108
  this.$$r = !1;
@@ -2116,7 +2116,7 @@ typeof HTMLElement == "function" && (nr = class extends HTMLElement {
2116
2116
  }
2117
2117
  }
2118
2118
  attributeChangedCallback(t, e, o) {
2119
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = io(t, o, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
2119
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = ao(t, o, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
2120
2120
  }
2121
2121
  disconnectedCallback() {
2122
2122
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -2124,10 +2124,10 @@ typeof HTMLElement == "function" && (nr = class extends HTMLElement {
2124
2124
  });
2125
2125
  }
2126
2126
  $$g_p(t) {
2127
- return lo(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
2127
+ return ho(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
2128
2128
  }
2129
2129
  });
2130
- function io(t, e, o, n) {
2130
+ function ao(t, e, o, n) {
2131
2131
  const i = o[t]?.type;
2132
2132
  if (e = i === "Boolean" && typeof e != "boolean" ? e != null : e, !n || !o[t]) return e;
2133
2133
  if (n === "toAttribute") switch (i) {
@@ -2153,46 +2153,46 @@ function io(t, e, o, n) {
2153
2153
  return e;
2154
2154
  }
2155
2155
  }
2156
- function Zs(t) {
2156
+ function ea(t) {
2157
2157
  const e = {};
2158
2158
  return t.childNodes.forEach((o) => {
2159
2159
  e[o.slot || "default"] = !0;
2160
2160
  }), e;
2161
2161
  }
2162
- function Ys(t, e, o, n, i, r) {
2163
- let s = class extends nr {
2162
+ function oa(t, e, o, n, i, r) {
2163
+ let s = class extends ar {
2164
2164
  constructor() {
2165
2165
  super(t, o, i), this.$$p_d = e;
2166
2166
  }
2167
2167
  static get observedAttributes() {
2168
- return lo(e).map((a) => (e[a].attribute || a).toLowerCase());
2168
+ return ho(e).map((a) => (e[a].attribute || a).toLowerCase());
2169
2169
  }
2170
2170
  };
2171
- return lo(e).forEach((a) => {
2172
- co(s.prototype, a, {
2171
+ return ho(e).forEach((a) => {
2172
+ fo(s.prototype, a, {
2173
2173
  get() {
2174
2174
  return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
2175
2175
  },
2176
2176
  set(u) {
2177
- u = io(a, u, e), this.$$d[a] = u;
2177
+ u = ao(a, u, e), this.$$d[a] = u;
2178
2178
  var l = this.$$c;
2179
- l && (Yt(l, a)?.get ? l[a] = u : l.$set({ [a]: u }));
2179
+ l && (Qt(l, a)?.get ? l[a] = u : l.$set({ [a]: u }));
2180
2180
  }
2181
2181
  });
2182
2182
  }), n.forEach((a) => {
2183
- co(s.prototype, a, { get() {
2183
+ fo(s.prototype, a, { get() {
2184
2184
  return this.$$c?.[a];
2185
2185
  } });
2186
2186
  }), r && (s = r(s)), t.element = s, s;
2187
2187
  }
2188
- var Xs = class extends Event {
2188
+ var na = class extends Event {
2189
2189
  constructor(t, e, o, n) {
2190
2190
  super("context-request", {
2191
2191
  bubbles: !0,
2192
2192
  composed: !0
2193
2193
  }), y(this, "context", void 0), y(this, "contextTarget", void 0), y(this, "callback", void 0), y(this, "subscribe", void 0), this.context = t, this.contextTarget = e, this.callback = o, this.subscribe = n ?? !1;
2194
2194
  }
2195
- }, Qs = class {
2195
+ }, ia = class {
2196
2196
  constructor(t, e) {
2197
2197
  y(this, "host", void 0), y(this, "context", void 0), y(this, "subscribe", void 0), y(this, "onValue", void 0), y(this, "isConnected", !1), y(this, "unsubscribe", void 0), y(this, "currentValue", void 0), y(this, "handleValue", (o, n) => {
2198
2198
  n !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = n), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = o, this.onValue?.(o);
@@ -2208,15 +2208,15 @@ var Xs = class extends Event {
2208
2208
  return this.currentValue;
2209
2209
  }
2210
2210
  requestValue() {
2211
- this.host.dispatchEvent(new Xs(this.context, this.host, this.handleValue, this.subscribe));
2211
+ this.host.dispatchEvent(new na(this.context, this.host, this.handleValue, this.subscribe));
2212
2212
  }
2213
- }, ko = (t) => t;
2214
- ko(Symbol.for("pie.assessmentToolkit.runtimeContext"));
2215
- ko(Symbol.for("pie.assessmentToolkit.hostRuntimeContext"));
2216
- var ta = ko(Symbol.for("pie.assessmentToolkit.shellContext")), ea = ko(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2217
- function ir(t, e, o) {
2213
+ }, Ao = (t) => t;
2214
+ Ao(Symbol.for("pie.assessmentToolkit.runtimeContext"));
2215
+ Ao(Symbol.for("pie.assessmentToolkit.hostRuntimeContext"));
2216
+ var ra = Ao(Symbol.for("pie.assessmentToolkit.shellContext")), sa = Ao(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2217
+ function lr(t, e, o) {
2218
2218
  let n = !1;
2219
- const i = new Qs(t, {
2219
+ const i = new ia(t, {
2220
2220
  context: e,
2221
2221
  subscribe: !0,
2222
2222
  onValue: (l) => {
@@ -2240,39 +2240,111 @@ function ir(t, e, o) {
2240
2240
  globalThis.clearInterval(u), t.removeEventListener("context-provider", r), i.disconnect();
2241
2241
  };
2242
2242
  }
2243
- function oa(t, e) {
2244
- return ir(t, ta, e);
2243
+ function aa(t, e) {
2244
+ return lr(t, ra, e);
2245
2245
  }
2246
- function na(t, e) {
2247
- return ir(t, ea, e);
2246
+ function la(t, e) {
2247
+ return lr(t, sa, e);
2248
2248
  }
2249
- var Yn;
2249
+ var ei;
2250
2250
  (function(t) {
2251
2251
  t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
2252
- })(Yn || (Yn = {}));
2253
- var zt;
2252
+ })(ei || (ei = {}));
2253
+ var Dt;
2254
2254
  (function(t) {
2255
2255
  t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
2256
- })(zt || (zt = {}));
2257
- function rr(t) {
2256
+ })(Dt || (Dt = {}));
2257
+ function cr(t) {
2258
2258
  return (...e) => {
2259
2259
  console.debug(`[${t}]`, ...e);
2260
2260
  };
2261
2261
  }
2262
- rr("I18nService");
2263
- var Ro = {
2262
+ cr("I18nService");
2263
+ var Wo = {
2264
2264
  assessment: [],
2265
2265
  section: [],
2266
2266
  item: [],
2267
2267
  passage: [],
2268
2268
  rubric: [],
2269
2269
  element: []
2270
+ }, Vo = {
2271
+ section: [...Wo.section],
2272
+ item: [...Wo.item],
2273
+ passage: [...Wo.passage]
2270
2274
  };
2271
- [...Ro.section], [...Ro.item], [...Ro.passage];
2272
- function ia(t) {
2275
+ function re(t) {
2276
+ return typeof t == "object" && t !== null && !Array.isArray(t);
2277
+ }
2278
+ function Wt(t, e) {
2279
+ if (t == null) return [];
2280
+ if (!Array.isArray(t)) throw new Error(`Invalid tools config at "${e}": expected an array of tool ids.`);
2281
+ if (t.find((o) => typeof o != "string") !== void 0) throw new Error(`Invalid tools config at "${e}": all entries must be strings.`);
2282
+ return t;
2283
+ }
2284
+ function ca(t) {
2285
+ if (t != null) {
2286
+ if (!re(t)) throw new Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');
2287
+ return t;
2288
+ }
2289
+ }
2290
+ function ua(t) {
2291
+ if (t != null) {
2292
+ if (!re(t)) throw new Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');
2293
+ return t;
2294
+ }
2295
+ }
2296
+ function da(t, e) {
2297
+ if (e == null) return;
2298
+ if (!re(e)) throw new Error(`Invalid tools config at "providers.${t}": expected an object.`);
2299
+ const o = e;
2300
+ if ("enabled" in o && o.enabled !== void 0 && typeof o.enabled != "boolean") throw new Error(`Invalid tools config at "providers.${t}.enabled": expected a boolean.`);
2301
+ if ("settings" in o && o.settings !== void 0 && !re(o.settings)) throw new Error(`Invalid tools config at "providers.${t}.settings": expected an object.`);
2302
+ if ("provider" in o && o.provider !== void 0 && !re(o.provider)) throw new Error(`Invalid tools config at "providers.${t}.provider": expected an object.`);
2303
+ return o;
2304
+ }
2305
+ function ha(t) {
2306
+ if (t == null) return {};
2307
+ if (!re(t)) throw new Error('Invalid tools config at "providers": expected an object keyed by tool id.');
2308
+ const e = {};
2309
+ for (const [o, n] of Object.entries(t)) e[o] = da(o, n);
2310
+ return e;
2311
+ }
2312
+ function ur(t) {
2273
2313
  return t.trim() || "";
2274
2314
  }
2275
- var ra = [
2315
+ function Vt(t) {
2316
+ if (!t || t.length === 0) return [];
2317
+ const e = /* @__PURE__ */ new Set();
2318
+ for (const o of t) {
2319
+ if (typeof o != "string") throw new Error("Invalid tools config: tool list entries must be strings.");
2320
+ const n = ur(o);
2321
+ n && e.add(n);
2322
+ }
2323
+ return Array.from(e);
2324
+ }
2325
+ function fa(t) {
2326
+ if (t != null) {
2327
+ if (t === "on" || t === "off") return t;
2328
+ throw new Error(`Invalid tools config at "qtiEnforcement": expected "on" or "off", got ${JSON.stringify(t)}.`);
2329
+ }
2330
+ }
2331
+ function pa(t) {
2332
+ if (t != null && !re(t)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
2333
+ const e = ua(t?.policy), o = ca(t?.placement), n = ha(t?.providers), i = fa(t?.qtiEnforcement), r = {
2334
+ policy: {
2335
+ allowed: Vt(Wt(e?.allowed, "policy.allowed")),
2336
+ blocked: Vt(Wt(e?.blocked, "policy.blocked"))
2337
+ },
2338
+ placement: {
2339
+ section: Vt(Wt(o?.section, "placement.section")).length ? Vt(Wt(o?.section, "placement.section")) : [...Vo.section],
2340
+ item: Vt(Wt(o?.item, "placement.item")).length ? Vt(Wt(o?.item, "placement.item")) : [...Vo.item],
2341
+ passage: Vt(Wt(o?.passage, "placement.passage")).length ? Vt(Wt(o?.passage, "placement.passage")) : [...Vo.passage]
2342
+ },
2343
+ providers: n
2344
+ };
2345
+ return i && (r.qtiEnforcement = i), r;
2346
+ }
2347
+ var va = [
2276
2348
  "assessment",
2277
2349
  "section",
2278
2350
  "item",
@@ -2280,10 +2352,10 @@ var ra = [
2280
2352
  "rubric",
2281
2353
  "element"
2282
2354
  ];
2283
- function ro(t, e) {
2355
+ function lo(t, e) {
2284
2356
  if (typeof t != "string" || t.trim().length === 0) throw new Error(`Invalid tool registration: "${e}" must be a non-empty string.`);
2285
2357
  }
2286
- var sa = [
2358
+ var ga = [
2287
2359
  {
2288
2360
  pattern: /<script\b/i,
2289
2361
  reason: "contains a <script> tag"
@@ -2301,17 +2373,17 @@ var sa = [
2301
2373
  reason: "contains a <foreignObject> element"
2302
2374
  }
2303
2375
  ];
2304
- function aa(t, e, o) {
2376
+ function ma(t, e, o) {
2305
2377
  const n = e.trimStart(), i = n.toLowerCase().startsWith("<svg"), r = /^https?:/i.test(n);
2306
2378
  if (/^data:/i.test(n)) throw new Error(`Invalid tool registration "${t}": "${o}" may not be a data: URL.`);
2307
2379
  if (!(!i && !r)) {
2308
- for (const { pattern: s, reason: a } of sa) if (s.test(e)) throw new Error(`Invalid tool registration "${t}": "${o}" ${a}. Inline SVG icons must not include scriptable content.`);
2380
+ for (const { pattern: s, reason: a } of ga) if (s.test(e)) throw new Error(`Invalid tool registration "${t}": "${o}" ${a}. Inline SVG icons must not include scriptable content.`);
2309
2381
  }
2310
2382
  }
2311
- function Xn(t) {
2312
- if (ro(t.toolId, "toolId"), ro(t.name, "name"), ro(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function") throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
2313
- if (typeof t.icon == "string" && aa(t.toolId, t.icon, "icon"), !Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
2314
- const e = t.supportedLevels.find((o) => !ra.includes(o));
2383
+ function oi(t) {
2384
+ if (lo(t.toolId, "toolId"), lo(t.name, "name"), lo(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function") throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
2385
+ if (typeof t.icon == "string" && ma(t.toolId, t.icon, "icon"), !Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
2386
+ const e = t.supportedLevels.find((o) => !va.includes(o));
2315
2387
  if (e) throw new Error(`Invalid tool registration "${t.toolId}": unsupported level "${e}".`);
2316
2388
  if (t.activation !== void 0 && t.activation !== "toolbar-toggle" && t.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${t.toolId}": unsupported activation "${String(t.activation)}".`);
2317
2389
  if (t.singletonScope !== void 0 && t.singletonScope !== "section") throw new Error(`Invalid tool registration "${t.toolId}": unsupported singletonScope "${String(t.singletonScope)}".`);
@@ -2320,22 +2392,22 @@ function Xn(t) {
2320
2392
  if (typeof t.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${t.toolId}": "isVisibleInContext" must be a function.`);
2321
2393
  if (typeof t.renderToolbar != "function") throw new Error(`Invalid tool registration "${t.toolId}": "renderToolbar" must be a function.`);
2322
2394
  }
2323
- var la = class {
2395
+ var ba = class {
2324
2396
  constructor() {
2325
2397
  y(this, "tools", /* @__PURE__ */ new Map()), y(this, "pnpIndex", /* @__PURE__ */ new Map()), y(this, "componentOverrides", {}), y(this, "moduleLoaders", /* @__PURE__ */ new Map()), y(this, "loadedToolModules", /* @__PURE__ */ new Set()), y(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
2326
2398
  }
2327
2399
  normalizeToolId(t) {
2328
- return ia(t);
2400
+ return ur(t);
2329
2401
  }
2330
2402
  normalizeToolIds(t) {
2331
2403
  return t.map((e) => this.normalizeToolId(e));
2332
2404
  }
2333
2405
  register(t) {
2334
- if (Xn(t), this.tools.has(t.toolId)) throw new Error(`Tool '${t.toolId}' is already registered`);
2406
+ if (oi(t), this.tools.has(t.toolId)) throw new Error(`Tool '${t.toolId}' is already registered`);
2335
2407
  if (this.tools.set(t.toolId, t), t.pnpSupportIds) for (const e of t.pnpSupportIds) this.pnpIndex.has(e) || this.pnpIndex.set(e, /* @__PURE__ */ new Set()), this.pnpIndex.get(e).add(t.toolId);
2336
2408
  }
2337
2409
  override(t) {
2338
- if (Xn(t), !this.tools.has(t.toolId)) throw new Error(`Cannot override non-existent tool '${t.toolId}'`);
2410
+ if (oi(t), !this.tools.has(t.toolId)) throw new Error(`Cannot override non-existent tool '${t.toolId}'`);
2339
2411
  const e = this.tools.get(t.toolId);
2340
2412
  if (e.pnpSupportIds) for (const o of e.pnpSupportIds) this.pnpIndex.get(o)?.delete(t.toolId);
2341
2413
  if (this.tools.set(t.toolId, t), t.pnpSupportIds) for (const o of t.pnpSupportIds) this.pnpIndex.has(o) || this.pnpIndex.set(o, /* @__PURE__ */ new Set()), this.pnpIndex.get(o).add(t.toolId);
@@ -2417,7 +2489,7 @@ var la = class {
2417
2489
  }
2418
2490
  setToolModuleLoaders(t) {
2419
2491
  for (const [e, o] of Object.entries(t)) if (o) {
2420
- if (ro(e, "tool module loader id"), typeof o != "function") throw new Error(`Invalid tool module loader for "${e}": expected a function.`);
2492
+ if (lo(e, "tool module loader id"), typeof o != "function") throw new Error(`Invalid tool module loader for "${e}": expected a function.`);
2421
2493
  this.moduleLoaders.set(e, o);
2422
2494
  }
2423
2495
  }
@@ -2459,20 +2531,20 @@ var la = class {
2459
2531
  return n.renderToolbar(e, i);
2460
2532
  }
2461
2533
  };
2462
- function sr(t) {
2534
+ function dr(t) {
2463
2535
  return t.level === "item";
2464
2536
  }
2465
- function ca(t) {
2537
+ function ya(t) {
2466
2538
  return t.level === "passage";
2467
2539
  }
2468
- function ua(t) {
2540
+ function wa(t) {
2469
2541
  return t.level === "rubric";
2470
2542
  }
2471
- function ar(t) {
2543
+ function hr(t) {
2472
2544
  return t.level === "element";
2473
2545
  }
2474
- function wn(t) {
2475
- if (ar(t)) {
2546
+ function $n(t) {
2547
+ if (hr(t)) {
2476
2548
  const e = t.item.config;
2477
2549
  if (!e) return "";
2478
2550
  const o = [], n = (a) => a.replace(/<[^>]*>/g, " ").trim(), i = e.elements?.[t.elementId];
@@ -2485,7 +2557,7 @@ function wn(t) {
2485
2557
  }
2486
2558
  return o.filter(Boolean).join(" ").trim();
2487
2559
  }
2488
- if (sr(t)) {
2560
+ if (dr(t)) {
2489
2561
  const e = t.item;
2490
2562
  if (!e?.config) return "";
2491
2563
  const o = e.config, n = [], i = (u) => u.replace(/<[^>]*>/g, " ").trim();
@@ -2500,7 +2572,7 @@ function wn(t) {
2500
2572
  }
2501
2573
  return n.filter(Boolean).join(" ").trim();
2502
2574
  }
2503
- if (ca(t)) {
2575
+ if (ya(t)) {
2504
2576
  const e = t.passage;
2505
2577
  if (!e?.config) return "";
2506
2578
  const o = e.config, n = [], i = (u) => u.replace(/<[^>]*>/g, " ").trim();
@@ -2515,14 +2587,14 @@ function wn(t) {
2515
2587
  }
2516
2588
  return n.filter(Boolean).join(" ").trim();
2517
2589
  }
2518
- if (ua(t)) {
2590
+ if (wa(t)) {
2519
2591
  const e = t.rubricBlock;
2520
2592
  return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
2521
2593
  }
2522
2594
  return "";
2523
2595
  }
2524
- function so(t) {
2525
- const e = wn(t);
2596
+ function co(t) {
2597
+ const e = $n(t);
2526
2598
  return [
2527
2599
  /<math[>\s]/i,
2528
2600
  /\\\[([^\]]+)\\\]/,
@@ -2532,7 +2604,7 @@ function so(t) {
2532
2604
  /\d+\s*[+\-*/=]\s*\d+/
2533
2605
  ].some((o) => o.test(e));
2534
2606
  }
2535
- function da(t) {
2607
+ function Ta(t) {
2536
2608
  const e = [
2537
2609
  "pie-multiple-choice",
2538
2610
  "pie-inline-choice",
@@ -2541,7 +2613,7 @@ function da(t) {
2541
2613
  "inline-choice",
2542
2614
  "select-text"
2543
2615
  ];
2544
- if (ar(t)) {
2616
+ if (hr(t)) {
2545
2617
  const o = t.item.config;
2546
2618
  if (!o?.models) return !1;
2547
2619
  const n = (Array.isArray(o.models) ? o.models : Object.values(o.models)).find((r) => r && typeof r == "object" && r.id === t.elementId);
@@ -2549,7 +2621,7 @@ function da(t) {
2549
2621
  const i = n.element || "";
2550
2622
  return e.includes(i);
2551
2623
  }
2552
- if (sr(t)) {
2624
+ if (dr(t)) {
2553
2625
  const o = t.item.config?.models;
2554
2626
  return (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).some((n) => {
2555
2627
  if (!n || typeof n != "object") return !1;
@@ -2559,11 +2631,11 @@ function da(t) {
2559
2631
  }
2560
2632
  return !1;
2561
2633
  }
2562
- function ao(t) {
2563
- return wn(t).trim().length >= 10;
2634
+ function uo(t) {
2635
+ return $n(t).trim().length >= 10;
2564
2636
  }
2565
- function ha(t) {
2566
- const e = wn(t);
2637
+ function Ia(t) {
2638
+ const e = $n(t);
2567
2639
  return [
2568
2640
  /chemistry|chemical|element|atom|molecule|compound/i,
2569
2641
  /periodic\s+table/i,
@@ -2573,23 +2645,23 @@ function ha(t) {
2573
2645
  /physics|force|energy|velocity|acceleration/i
2574
2646
  ].some((o) => o.test(e));
2575
2647
  }
2576
- var fa = /* @__PURE__ */ new Set([
2648
+ var ka = /* @__PURE__ */ new Set([
2577
2649
  "assessment",
2578
2650
  "section",
2579
2651
  "item",
2580
2652
  "passage",
2581
2653
  "rubric"
2582
2654
  ]);
2583
- function pa(t) {
2584
- return fa.has(t);
2655
+ function $a(t) {
2656
+ return ka.has(t);
2585
2657
  }
2586
- function Tn(t, e, o) {
2658
+ function Sn(t, e, o) {
2587
2659
  const n = t.trim(), i = o.trim();
2588
2660
  if (!n || !i) throw new Error("Tool instance ids require non-empty tool and scope ids");
2589
- if (!pa(e)) throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
2661
+ if (!$a(e)) throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
2590
2662
  return `${n}:${e}:${i}`;
2591
2663
  }
2592
- var va = class {
2664
+ var Sa = class {
2593
2665
  constructor() {
2594
2666
  y(this, "providerId", "desmos-calculator"), y(this, "providerName", "Desmos Calculator"), y(this, "category", "calculator"), y(this, "version", "1.10"), y(this, "requiresAuth", !0), y(this, "desmosProvider", null), y(this, "config", null);
2595
2667
  }
@@ -2666,7 +2738,7 @@ var va = class {
2666
2738
  destroy() {
2667
2739
  this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
2668
2740
  }
2669
- }, ga = (t, e) => {
2741
+ }, Aa = (t, e) => {
2670
2742
  const o = e?.useSentenceSegmenter !== !1;
2671
2743
  try {
2672
2744
  if (!o) throw new Error("Segmenter disabled by policy");
@@ -2693,14 +2765,14 @@ var va = class {
2693
2765
  text: t,
2694
2766
  offset: 0
2695
2767
  }];
2696
- }, ma = class {
2768
+ }, xa = class {
2697
2769
  constructor() {
2698
2770
  y(this, "providerId", "browser"), y(this, "providerName", "Browser Speech Synthesis"), y(this, "version", "1.0.0");
2699
2771
  }
2700
2772
  async initialize(t) {
2701
2773
  if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
2702
2774
  if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
2703
- return new ba(t);
2775
+ return new _a(t);
2704
2776
  }
2705
2777
  supportsFeature(t) {
2706
2778
  return !0;
@@ -2717,7 +2789,7 @@ var va = class {
2717
2789
  }
2718
2790
  destroy() {
2719
2791
  }
2720
- }, ba = class {
2792
+ }, _a = class {
2721
2793
  constructor(t) {
2722
2794
  y(this, "utterance", null), y(this, "config", null), y(this, "_isPlaying", !1), y(this, "_isPaused", !1), y(this, "speakRunId", 0), y(this, "onWordBoundary", void 0), this.config = t;
2723
2795
  }
@@ -2784,7 +2856,7 @@ var va = class {
2784
2856
  }
2785
2857
  segmentSentences(t) {
2786
2858
  const e = this.getSegmentationPolicy();
2787
- return ga(t, {
2859
+ return Aa(t, {
2788
2860
  locale: e.locale,
2789
2861
  useSentenceSegmenter: e.useSentenceSegmenter
2790
2862
  });
@@ -2853,7 +2925,7 @@ var va = class {
2853
2925
  ...t.providerOptions || {}
2854
2926
  });
2855
2927
  }
2856
- }, ya = class {
2928
+ }, Ca = class {
2857
2929
  async emitTelemetry(t, e) {
2858
2930
  try {
2859
2931
  await this.config?.onTelemetry?.(t, e);
@@ -2885,7 +2957,7 @@ var va = class {
2885
2957
  }
2886
2958
  async _initializeBrowserTTS(t) {
2887
2959
  if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
2888
- this.ttsProvider = new ma(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
2960
+ this.ttsProvider = new xa(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
2889
2961
  }
2890
2962
  async _initializeServerTTS(t) {
2891
2963
  if (!t.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
@@ -2943,7 +3015,7 @@ var va = class {
2943
3015
  destroy() {
2944
3016
  this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
2945
3017
  }
2946
- }, wa = /* @__PURE__ */ new Set([
3018
+ }, Ea = /* @__PURE__ */ new Set([
2947
3019
  "annotation-xml",
2948
3020
  "color-profile",
2949
3021
  "font-face",
@@ -2952,16 +3024,16 @@ var va = class {
2952
3024
  "font-face-format",
2953
3025
  "font-face-name",
2954
3026
  "missing-glyph"
2955
- ]), Ta = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Ia = (t, e = "custom element tag") => {
3027
+ ]), Ma = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, La = (t, e = "custom element tag") => {
2956
3028
  if (!t || typeof t != "string") throw new Error(`Invalid ${e}: expected a non-empty string`);
2957
3029
  const o = t.trim();
2958
3030
  if (!o) throw new Error(`Invalid ${e}: tag is empty`);
2959
3031
  if (o !== o.toLowerCase()) throw new Error(`Invalid ${e} "${o}": custom element names must be lowercase`);
2960
3032
  if (!o.includes("-")) throw new Error(`Invalid ${e} "${o}": custom element names must include a hyphen`);
2961
- if (wa.has(o)) throw new Error(`Invalid ${e} "${o}": this name is reserved by the HTML spec`);
2962
- if (!Ta.test(o)) throw new Error(`Invalid ${e} "${o}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
3033
+ if (Ea.has(o)) throw new Error(`Invalid ${e} "${o}": this name is reserved by the HTML spec`);
3034
+ if (!Ma.test(o)) throw new Error(`Invalid ${e} "${o}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
2963
3035
  return o;
2964
- }, lr = {
3036
+ }, fr = {
2965
3037
  calculator: "pie-tool-calculator",
2966
3038
  textToSpeech: "pie-tool-text-to-speech",
2967
3039
  ruler: "pie-tool-ruler",
@@ -2974,22 +3046,22 @@ var va = class {
2974
3046
  annotationToolbar: "pie-tool-annotation-toolbar",
2975
3047
  graph: "pie-tool-graph",
2976
3048
  periodicTable: "pie-tool-periodic-table"
2977
- }, ka = (t, e) => Ia(e?.toolTagMap?.[t] ?? lr[t] ?? t, `tool component tag for "${t}"`), $a = (t) => document.createElement(t), yt = (t, e, o, n) => {
2978
- const i = ka(t, n), r = n?.toolComponentFactories?.[t] ?? n?.toolComponentFactory;
3049
+ }, Pa = (t, e) => La(e?.toolTagMap?.[t] ?? fr[t] ?? t, `tool component tag for "${t}"`), Oa = (t) => document.createElement(t), yt = (t, e, o, n) => {
3050
+ const i = Pa(t, n), r = n?.toolComponentFactories?.[t] ?? n?.toolComponentFactory;
2979
3051
  return r ? r({
2980
3052
  toolId: t,
2981
3053
  tagName: i,
2982
3054
  context: e,
2983
3055
  toolbarContext: o
2984
- }) : $a(i);
2985
- }, Sa = {
3056
+ }) : Oa(i);
3057
+ }, Ra = {
2986
3058
  toolId: "calculator",
2987
3059
  name: "Calculator",
2988
3060
  description: "Multi-type calculator (basic, scientific, graphing)",
2989
3061
  icon: "calculator",
2990
3062
  provider: {
2991
3063
  getProviderId: (t) => typeof t?.provider?.id == "string" && t.provider.id.length > 0 ? t.provider.id : "calculator-desmos",
2992
- createProvider: () => new va(),
3064
+ createProvider: () => new Sa(),
2993
3065
  getInitConfig: (t) => t?.provider?.init ?? {},
2994
3066
  getAuthFetcher: (t) => {
2995
3067
  const e = t?.provider?.runtime?.authFetcher;
@@ -3012,10 +3084,10 @@ var va = class {
3012
3084
  "scientificCalculator"
3013
3085
  ],
3014
3086
  isVisibleInContext(t) {
3015
- return so(t);
3087
+ return co(t);
3016
3088
  },
3017
3089
  renderToolbar(t, e) {
3018
- const o = Tn(this.toolId, e.scope.level, e.scope.scopeId), n = e.componentOverrides, i = yt(this.toolId, t, e, n);
3090
+ const o = Sn(this.toolId, e.scope.level, e.scope.scopeId), n = e.componentOverrides, i = yt(this.toolId, t, e, n);
3019
3091
  i.setAttribute("tool-id", o), i.toolkitCoordinator = e.toolkitCoordinator;
3020
3092
  const r = {
3021
3093
  toolId: this.toolId,
@@ -3055,13 +3127,13 @@ var va = class {
3055
3127
  }
3056
3128
  };
3057
3129
  }
3058
- }, Aa = /* @__PURE__ */ new Set([
3130
+ }, ja = /* @__PURE__ */ new Set([
3059
3131
  "reserved-row",
3060
3132
  "expanding-row",
3061
3133
  "floating-overlay",
3062
3134
  "left-aligned"
3063
- ]), Qn = (t) => t && typeof t == "object" ? t : {}, xa = (t) => t === "polly" || t === "google" || t === "server", Q = (t, e) => t === void 0 ? e : t, mo = (t, e = "left-aligned") => typeof t == "string" && Aa.has(t) ? t : e, ti = Object.freeze([0.8, 1.25]), No = (t) => {
3064
- if (!Array.isArray(t)) return [...ti];
3135
+ ]), ni = (t) => t && typeof t == "object" ? t : {}, Na = (t) => t === "polly" || t === "google" || t === "server", Q = (t, e) => t === void 0 ? e : t, wo = (t, e = "left-aligned") => typeof t == "string" && ja.has(t) ? t : e, ii = Object.freeze([0.8, 1.25]), zo = (t) => {
3136
+ if (!Array.isArray(t)) return [...ii];
3065
3137
  if (t.length === 0) return [];
3066
3138
  const e = /* @__PURE__ */ new Set();
3067
3139
  for (const o of t) {
@@ -3069,13 +3141,13 @@ var va = class {
3069
3141
  const n = Math.round(o * 100) / 100;
3070
3142
  n !== 1 && e.add(n);
3071
3143
  }
3072
- return e.size ? Array.from(e) : [...ti];
3073
- }, _a = (t) => {
3144
+ return e.size ? Array.from(e) : [...ii];
3145
+ }, Wa = (t) => {
3074
3146
  const e = {
3075
3147
  ...t,
3076
- layoutMode: mo(t.layoutMode)
3148
+ layoutMode: wo(t.layoutMode)
3077
3149
  }, o = t.backend || "browser";
3078
- if (!xa(o)) return e;
3150
+ if (!Na(o)) return e;
3079
3151
  const n = {
3080
3152
  ...e,
3081
3153
  apiEndpoint: Q(e.apiEndpoint, "/api/tts"),
@@ -3096,14 +3168,14 @@ var va = class {
3096
3168
  ...n,
3097
3169
  defaultVoice: Q(n.defaultVoice, "en-US-Wavenet-A")
3098
3170
  } : n;
3099
- }, Wo = (t) => {
3100
- const e = Qn(t), o = Qn(t?.settings);
3101
- return _a({
3171
+ }, qo = (t) => {
3172
+ const e = ni(t), o = ni(t?.settings);
3173
+ return Wa({
3102
3174
  ...e,
3103
3175
  ...o
3104
3176
  });
3105
- }, Xo = (t) => t.backend || "browser", cr = (t, e) => e === "polly" || e === "google" ? e : t.serverProvider || t.provider, ur = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), Ca = (t) => {
3106
- const e = Xo(t), o = cr(t, e), n = ur(t, o);
3177
+ }, on = (t) => t.backend || "browser", pr = (t, e) => e === "polly" || e === "google" ? e : t.serverProvider || t.provider, vr = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), Va = (t) => {
3178
+ const e = on(t), o = pr(t, e), n = vr(t, o);
3107
3179
  return {
3108
3180
  voice: t.defaultVoice,
3109
3181
  rate: t.rate,
@@ -3127,8 +3199,8 @@ var va = class {
3127
3199
  includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
3128
3200
  validateEndpoint: t.validateEndpoint
3129
3201
  };
3130
- }, dr = (t) => mo(t.layoutMode), Ea = (t) => {
3131
- switch (dr(t)) {
3202
+ }, gr = (t) => wo(t.layoutMode), za = (t) => {
3203
+ switch (gr(t)) {
3132
3204
  case "reserved-row":
3133
3205
  return {
3134
3206
  mount: "before-buttons",
@@ -3154,21 +3226,21 @@ var va = class {
3154
3226
  }
3155
3227
  };
3156
3228
  }
3157
- }, Ce = /* @__PURE__ */ new Map(), Ma = "__pieToolElementUnmount", ei = "pie-tool-active-change", La = {
3229
+ }, Le = /* @__PURE__ */ new Map(), qa = "__pieToolElementUnmount", ri = "pie-tool-active-change", Da = {
3158
3230
  toolId: "textToSpeech",
3159
3231
  name: "Text to Speech",
3160
3232
  description: "Read content aloud",
3161
3233
  icon: "volume-up",
3162
3234
  provider: {
3163
3235
  getProviderId: () => "tts",
3164
- createProvider: (t) => new ya(Xo(Wo(t))),
3236
+ createProvider: (t) => new Ca(on(qo(t))),
3165
3237
  getInitConfig: (t) => {
3166
- const e = Wo(t), o = Xo(e), n = cr(e, o);
3238
+ const e = qo(t), o = on(e), n = pr(e, o);
3167
3239
  return {
3168
3240
  backend: o,
3169
3241
  serverProvider: n,
3170
- transportMode: ur(e, n),
3171
- ...Ca(e)
3242
+ transportMode: vr(e, n),
3243
+ ...Va(e)
3172
3244
  };
3173
3245
  },
3174
3246
  getAuthFetcher: (t) => {
@@ -3177,9 +3249,9 @@ var va = class {
3177
3249
  },
3178
3250
  sanitizeConfig: (t) => {
3179
3251
  const e = t.settings && typeof t.settings == "object" ? { ...t.settings } : void 0;
3180
- e && "layoutMode" in e && (e.layoutMode = mo(e.layoutMode)), e && "speedOptions" in e && (e.speedOptions = No(e.speedOptions));
3252
+ e && "layoutMode" in e && (e.layoutMode = wo(e.layoutMode)), e && "speedOptions" in e && (e.speedOptions = zo(e.speedOptions));
3181
3253
  const o = { ...t };
3182
- return "layoutMode" in o && (o.layoutMode = mo(o.layoutMode)), "speedOptions" in o && (o.speedOptions = No(o.speedOptions)), e && (o.settings = e), o;
3254
+ return "layoutMode" in o && (o.layoutMode = wo(o.layoutMode)), "speedOptions" in o && (o.speedOptions = zo(o.speedOptions)), e && (o.settings = e), o;
3183
3255
  },
3184
3256
  lazy: !0
3185
3257
  },
@@ -3191,17 +3263,17 @@ var va = class {
3191
3263
  "speechOutput"
3192
3264
  ],
3193
3265
  isVisibleInContext(t) {
3194
- return ao(t);
3266
+ return uo(t);
3195
3267
  },
3196
3268
  renderToolbar(t, e) {
3197
- const o = () => Wo(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), n = () => No(o().speedOptions), i = () => dr(o()), r = () => Ea(o()), s = Tn(this.toolId, e.scope.level, e.scope.scopeId), a = () => {
3269
+ const o = () => qo(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), n = () => zo(o().speedOptions), i = () => gr(o()), r = () => za(o()), s = Sn(this.toolId, e.scope.level, e.scope.scopeId), a = () => {
3198
3270
  const d = e.ui?.size;
3199
3271
  return d === "sm" || d === "lg" ? d : "md";
3200
3272
  }, u = () => {
3201
- let d = Ce.get(s);
3202
- return d && typeof d.isConnected == "boolean" && !d.isConnected && (Ce.delete(s), d = void 0), d || (d = document.createElement("pie-tool-tts-inline"), d[Ma] = () => {
3203
- Ce.get(s) === d && Ce.delete(s);
3204
- }, Ce.set(s, d)), d.setAttribute("tool-id", s), d.setAttribute("catalog-id", e.catalogId || e.itemId), d.setAttribute("language", e.language || "en-US"), d.setAttribute("size", a()), d.setAttribute("layout-mode", i()), d.speedOptions = n(), d;
3273
+ let d = Le.get(s);
3274
+ return d && typeof d.isConnected == "boolean" && !d.isConnected && (Le.delete(s), d = void 0), d || (d = document.createElement("pie-tool-tts-inline"), d[qa] = () => {
3275
+ Le.get(s) === d && Le.delete(s);
3276
+ }, Le.set(s, d)), d.setAttribute("tool-id", s), d.setAttribute("catalog-id", e.catalogId || e.itemId), d.setAttribute("language", e.language || "en-US"), d.setAttribute("size", a()), d.setAttribute("layout-mode", i()), d.speedOptions = n(), d;
3205
3277
  }, l = r();
3206
3278
  return {
3207
3279
  toolId: this.toolId,
@@ -3219,8 +3291,8 @@ var va = class {
3219
3291
  const m = v.detail;
3220
3292
  d(m?.active === !0);
3221
3293
  };
3222
- return h.addEventListener(ei, f), () => {
3223
- h.removeEventListener(ei, f);
3294
+ return h.addEventListener(ri, f), () => {
3295
+ h.removeEventListener(ri, f);
3224
3296
  };
3225
3297
  },
3226
3298
  sync: () => {
@@ -3231,7 +3303,7 @@ var va = class {
3231
3303
  }
3232
3304
  };
3233
3305
  function Ct(t, e) {
3234
- const o = Tn(t, e.scope.level, e.scope.scopeId);
3306
+ const o = Sn(t, e.scope.level, e.scope.scopeId);
3235
3307
  return {
3236
3308
  fullToolId: o,
3237
3309
  isActive: () => e.isToolVisible(o),
@@ -3245,12 +3317,12 @@ function Et(t) {
3245
3317
  const e = t.isActive();
3246
3318
  t.button.active = e, t.overlay.visible = e, t.onActiveChange?.(e);
3247
3319
  }
3248
- function Vo(t, e) {
3320
+ function Do(t, e) {
3249
3321
  t.setAttribute("data-pie-tool-surface", e);
3250
3322
  }
3251
- var Pa = [
3252
- Sa,
3253
- La,
3323
+ var Ha = [
3324
+ Ra,
3325
+ Da,
3254
3326
  {
3255
3327
  toolId: "ruler",
3256
3328
  name: "Ruler",
@@ -3263,7 +3335,7 @@ var Pa = [
3263
3335
  ],
3264
3336
  pnpSupportIds: ["ruler", "measurement"],
3265
3337
  isVisibleInContext(t) {
3266
- return so(t);
3338
+ return co(t);
3267
3339
  },
3268
3340
  renderToolbar(t, e) {
3269
3341
  const o = Ct(this.toolId, e), n = {
@@ -3276,7 +3348,7 @@ var Pa = [
3276
3348
  onClick: () => e.toggleTool(this.toolId),
3277
3349
  active: o.isActive()
3278
3350
  }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3279
- return r.setAttribute("tool-id", o.fullToolId), Vo(r, "frameless"), {
3351
+ return r.setAttribute("tool-id", o.fullToolId), Do(r, "frameless"), {
3280
3352
  toolId: this.toolId,
3281
3353
  button: n,
3282
3354
  elements: [{
@@ -3306,7 +3378,7 @@ var Pa = [
3306
3378
  ],
3307
3379
  pnpSupportIds: ["protractor", "angleMeasurement"],
3308
3380
  isVisibleInContext(t) {
3309
- return so(t);
3381
+ return co(t);
3310
3382
  },
3311
3383
  renderToolbar(t, e) {
3312
3384
  const o = Ct(this.toolId, e), n = {
@@ -3319,7 +3391,7 @@ var Pa = [
3319
3391
  onClick: () => e.toggleTool(this.toolId),
3320
3392
  active: o.isActive()
3321
3393
  }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3322
- return r.setAttribute("tool-id", o.fullToolId), Vo(r, "frameless"), {
3394
+ return r.setAttribute("tool-id", o.fullToolId), Do(r, "frameless"), {
3323
3395
  toolId: this.toolId,
3324
3396
  button: n,
3325
3397
  elements: [{
@@ -3350,7 +3422,7 @@ var Pa = [
3350
3422
  "choiceMasking"
3351
3423
  ],
3352
3424
  isVisibleInContext(t) {
3353
- return da(t);
3425
+ return Ta(t);
3354
3426
  },
3355
3427
  renderToolbar(t, e) {
3356
3428
  const o = Ct(this.toolId, e), n = e.componentOverrides ?? {}, i = yt(this.toolId, t, e, n);
@@ -3403,7 +3475,7 @@ var Pa = [
3403
3475
  "annotation"
3404
3476
  ],
3405
3477
  isVisibleInContext(t) {
3406
- return ao(t);
3478
+ return uo(t);
3407
3479
  },
3408
3480
  renderToolbar(t, e) {
3409
3481
  const o = Ct(this.toolId, e), n = {
@@ -3456,7 +3528,7 @@ var Pa = [
3456
3528
  "trackingGuide"
3457
3529
  ],
3458
3530
  isVisibleInContext(t) {
3459
- return ao(t);
3531
+ return uo(t);
3460
3532
  },
3461
3533
  renderToolbar(t, e) {
3462
3534
  const o = Ct(this.toolId, e), n = {
@@ -3469,7 +3541,7 @@ var Pa = [
3469
3541
  onClick: () => e.toggleTool(this.toolId),
3470
3542
  active: o.isActive()
3471
3543
  }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3472
- return r.setAttribute("tool-id", o.fullToolId), Vo(r, "frameless"), {
3544
+ return r.setAttribute("tool-id", o.fullToolId), Do(r, "frameless"), {
3473
3545
  toolId: this.toolId,
3474
3546
  button: n,
3475
3547
  elements: [{
@@ -3565,7 +3637,7 @@ var Pa = [
3565
3637
  "annotation"
3566
3638
  ],
3567
3639
  isVisibleInContext(t) {
3568
- return ao(t);
3640
+ return uo(t);
3569
3641
  },
3570
3642
  renderToolbar(t, e) {
3571
3643
  const o = Ct(this.toolId, e), n = {
@@ -3609,7 +3681,7 @@ var Pa = [
3609
3681
  "graphingTool"
3610
3682
  ],
3611
3683
  isVisibleInContext(t) {
3612
- return so(t);
3684
+ return co(t);
3613
3685
  },
3614
3686
  renderToolbar(t, e) {
3615
3687
  const o = Ct(this.toolId, e), n = {
@@ -3662,7 +3734,7 @@ var Pa = [
3662
3734
  "elementReference"
3663
3735
  ],
3664
3736
  isVisibleInContext(t) {
3665
- return ha(t);
3737
+ return Ia(t);
3666
3738
  },
3667
3739
  renderToolbar(t, e) {
3668
3740
  const o = Ct(this.toolId, e), n = {
@@ -3704,36 +3776,36 @@ var Pa = [
3704
3776
  }
3705
3777
  }
3706
3778
  ];
3707
- function Oa(t = {}) {
3708
- const e = new la(), o = {
3779
+ function Ba(t = {}) {
3780
+ const e = new ba(), o = {
3709
3781
  toolTagMap: {
3710
- ...lr,
3782
+ ...fr,
3711
3783
  ...t.toolTagMap || {}
3712
3784
  },
3713
3785
  toolComponentFactory: t.toolComponentFactory,
3714
3786
  toolComponentFactories: t.toolComponentFactories
3715
3787
  }, n = (i) => t.overrides?.[i.toolId] || i;
3716
- return t.includePackagedTools && Ra(e, {
3788
+ return t.includePackagedTools && Fa(e, {
3717
3789
  toolIds: t.toolIds,
3718
3790
  applyOverrides: n
3719
3791
  }), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(o), e;
3720
3792
  }
3721
- function Ra(t, e = {}) {
3793
+ function Fa(t, e = {}) {
3722
3794
  const o = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, n = e.applyOverrides || ((i) => i);
3723
- for (const i of Pa) o && !o.has(i.toolId) || t.register(n(i));
3795
+ for (const i of Ha) o && !o.has(i.toolId) || t.register(n(i));
3724
3796
  }
3725
- function Na(t = {}) {
3726
- return Oa({
3797
+ function Ga(t = {}) {
3798
+ return Ba({
3727
3799
  ...t,
3728
3800
  includePackagedTools: !0
3729
3801
  });
3730
3802
  }
3731
- function Wa() {
3732
- const t = Na(), e = /* @__PURE__ */ new Set();
3803
+ function Ua() {
3804
+ const t = Ga(), e = /* @__PURE__ */ new Set();
3733
3805
  for (const o of t.getAllTools()) for (const n of o.pnpSupportIds || []) e.add(n);
3734
3806
  return [...e].sort();
3735
3807
  }
3736
- [...Wa()];
3808
+ [...Ua()];
3737
3809
  Object.values({
3738
3810
  visual: {
3739
3811
  magnification: "magnification",
@@ -3848,16 +3920,28 @@ Object.values({
3848
3920
  tutorialAvailable: "tutorialAvailable"
3849
3921
  }
3850
3922
  }).flatMap((t) => Object.values(t));
3851
- rr("ToolCoordinator");
3852
- var oi;
3923
+ cr("ToolCoordinator");
3924
+ var si;
3853
3925
  (function(t) {
3854
3926
  t[t.BASE = 0] = "BASE", t[t.TOOL = 1e3] = "TOOL", t[t.MODAL = 2e3] = "MODAL", t[t.CONTROL = 3e3] = "CONTROL", t[t.HIGHLIGHT = 4e3] = "HIGHLIGHT";
3855
- })(oi || (oi = {}));
3856
- var ni;
3927
+ })(si || (si = {}));
3928
+ var ai;
3857
3929
  (function(t) {
3858
3930
  t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
3859
- })(ni || (ni = {}));
3860
- var Va = /* @__PURE__ */ ce('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), ja = /* @__PURE__ */ ce('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), za = /* @__PURE__ */ ce('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), qa = /* @__PURE__ */ ce('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), Ha = /* @__PURE__ */ ce('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Da = /* @__PURE__ */ ce('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), Ba = /* @__PURE__ */ ce('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1), Fa = {
3931
+ })(ai || (ai = {}));
3932
+ pa({
3933
+ policy: {
3934
+ allowed: [],
3935
+ blocked: []
3936
+ },
3937
+ placement: {
3938
+ section: [],
3939
+ item: [],
3940
+ passage: []
3941
+ },
3942
+ providers: {}
3943
+ });
3944
+ var Ja = /* @__PURE__ */ he('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), Ka = /* @__PURE__ */ he('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), Za = /* @__PURE__ */ he('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), Ya = /* @__PURE__ */ he('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), Xa = /* @__PURE__ */ he('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Qa = /* @__PURE__ */ he('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), tl = /* @__PURE__ */ he('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1), el = {
3861
3945
  hash: "svelte-g8qu62",
3862
3946
  code: `.pie-tool-annotation-toolbar.svelte-g8qu62 {position:fixed;z-index:4200;display:flex;gap:0.25rem;padding:0.5rem;border-radius:0.5rem;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border, #d1d5db);box-shadow:0 10px 25px -8px rgb(0 0 0 / 0.3);user-select:none;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62 {width:2.5rem;height:2rem;border:2px solid color-mix(in srgb, var(--pie-border-dark, #111827) 20%, transparent);border-radius:0.375rem;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;padding:0;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:hover {transform:scale(1.1);border-color:color-mix(in srgb, var(--pie-border-dark, #111827) 45%, transparent);box-shadow:0 2px 8px rgb(0 0 0 / 0.15);}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar.svelte-g8qu62 .divider-horizontal:where(.svelte-g8qu62) {height:auto;width:1px;background-color:color-mix(in srgb, var(--pie-border, #d1d5db) 70%, transparent);}
3863
3947
 
@@ -3865,27 +3949,27 @@ var Va = /* @__PURE__ */ ce('<button class="pie-tool-annotation-toolbar__highlig
3865
3949
 
3866
3950
  /* Button styling */.pie-tool-annotation-toolbar__button.svelte-g8qu62 {display:inline-flex;align-items:center;justify-content:center;gap:0.35rem;padding:0.4rem 0.55rem;border:1px solid var(--pie-button-border, #d1d5db);border-radius:0.4rem;background:var(--pie-button-bg, #fff);color:var(--pie-button-color, var(--pie-text, #111827));cursor:pointer;}.pie-tool-annotation-toolbar__button--icon.svelte-g8qu62 {min-width:2rem;min-height:2rem;padding:0.45rem;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:hover {background:var(--pie-button-hover-bg, #f9fafb);color:var(--pie-button-hover-color, var(--pie-text, #111827));border-color:var(--pie-button-hover-border, #9ca3af);}.pie-tool-annotation-toolbar__button.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:disabled {opacity:0.6;cursor:not-allowed;}.pie-tool-annotation-toolbar__button--warning.svelte-g8qu62 {color:var(--pie-missing-icon, #92400e);}.pie-tool-annotation-toolbar__button--danger.svelte-g8qu62 {color:var(--pie-incorrect-icon, #b91c1c);}.pie-tool-annotation-toolbar__button.svelte-g8qu62 svg:where(.svelte-g8qu62) {width:18px;height:18px;}`
3867
3951
  };
3868
- function Ga(t, e) {
3869
- di(e, !0), zs(t, Fa);
3870
- let o = Oo(e, "enabled", 7, !0), n = Oo(e, "highlightCoordinator", 7, null), i = Oo(e, "ttsService", 7, null);
3952
+ function ol(t, e) {
3953
+ vi(e, !0), Fs(t, el);
3954
+ let o = No(e, "enabled", 7, !0), n = No(e, "highlightCoordinator", 7, null), i = No(e, "ttsService", 7, null);
3871
3955
  const r = typeof window < "u", s = "pie-annotations", a = [
3872
3956
  {
3873
- name: zt.YELLOW,
3957
+ name: Dt.YELLOW,
3874
3958
  hex: "#fde995",
3875
3959
  label: "Yellow highlight"
3876
3960
  },
3877
3961
  {
3878
- name: zt.PINK,
3962
+ name: Dt.PINK,
3879
3963
  hex: "#ff9fae",
3880
3964
  label: "Pink highlight"
3881
3965
  },
3882
3966
  {
3883
- name: zt.BLUE,
3967
+ name: Dt.BLUE,
3884
3968
  hex: "#a7e0f6",
3885
3969
  label: "Blue highlight"
3886
3970
  },
3887
3971
  {
3888
- name: zt.GREEN,
3972
+ name: Dt.GREEN,
3889
3973
  hex: "#a6e1c5",
3890
3974
  label: "Green highlight"
3891
3975
  }
@@ -3900,7 +3984,7 @@ function Ga(t, e) {
3900
3984
  '[role="button"]',
3901
3985
  '[role="textbox"]'
3902
3986
  ];
3903
- let l = /* @__PURE__ */ V(null), d = /* @__PURE__ */ V(null), h = /* @__PURE__ */ V(null), f = /* @__PURE__ */ V(null), v = /* @__PURE__ */ V(Jt({
3987
+ let l = /* @__PURE__ */ W(null), d = /* @__PURE__ */ W(null), h = /* @__PURE__ */ W(null), f = /* @__PURE__ */ W(null), v = /* @__PURE__ */ W(Yt({
3904
3988
  isVisible: !1,
3905
3989
  selectedText: "",
3906
3990
  selectedRange: null,
@@ -3908,10 +3992,10 @@ function Ga(t, e) {
3908
3992
  x: 0,
3909
3993
  y: 0
3910
3994
  }
3911
- })), m = /* @__PURE__ */ V(!1), k = /* @__PURE__ */ V(!1), p = /* @__PURE__ */ V(""), w = /* @__PURE__ */ V(0), R = /* @__PURE__ */ V(null), A = /* @__PURE__ */ xo(() => g(w) > 0), O = /* @__PURE__ */ xo(() => g(R) !== null), K = /* @__PURE__ */ xo(() => g(f)?.scopeElement || g(h)?.scopeElement || null);
3912
- function D() {
3995
+ })), m = /* @__PURE__ */ W(!1), k = /* @__PURE__ */ W(!1), p = /* @__PURE__ */ W(""), w = /* @__PURE__ */ W(0), R = /* @__PURE__ */ W(null), A = /* @__PURE__ */ Eo(() => g(w) > 0), O = /* @__PURE__ */ Eo(() => g(R) !== null), J = /* @__PURE__ */ Eo(() => g(f)?.scopeElement || g(h)?.scopeElement || null);
3996
+ function H() {
3913
3997
  const b = g(l)?.ownerDocument;
3914
- return g(K) || b?.documentElement || document.documentElement;
3998
+ return g(J) || b?.documentElement || document.documentElement;
3915
3999
  }
3916
4000
  function B() {
3917
4001
  return `${s}:${g(h)?.canonicalItemId || g(h)?.itemId || "global"}`;
@@ -3920,12 +4004,12 @@ function Ga(t, e) {
3920
4004
  if (!n()) return null;
3921
4005
  const T = n().getAnnotations();
3922
4006
  for (const M of T) {
3923
- const st = b.compareBoundaryPoints(Range.START_TO_START, M.range), Dt = b.compareBoundaryPoints(Range.END_TO_END, M.range), Ie = b.compareBoundaryPoints(Range.START_TO_END, M.range), $o = b.compareBoundaryPoints(Range.END_TO_START, M.range);
3924
- if (st >= 0 && Dt <= 0 || st <= 0 && Dt >= 0 || Ie > 0 && $o < 0) return M.id;
4007
+ const st = b.compareBoundaryPoints(Range.START_TO_START, M.range), Ft = b.compareBoundaryPoints(Range.END_TO_END, M.range), Se = b.compareBoundaryPoints(Range.START_TO_END, M.range), xo = b.compareBoundaryPoints(Range.END_TO_START, M.range);
4008
+ if (st >= 0 && Ft <= 0 || st <= 0 && Ft >= 0 || Se > 0 && xo < 0) return M.id;
3925
4009
  }
3926
4010
  return null;
3927
4011
  }
3928
- function J(b) {
4012
+ function K(b) {
3929
4013
  if (b.nodeType !== Node.ELEMENT_NODE && b.nodeType !== Node.TEXT_NODE) return !1;
3930
4014
  const T = b.nodeType === Node.TEXT_NODE ? b.parentElement : b;
3931
4015
  return T ? !u.some((M) => {
@@ -3937,38 +4021,38 @@ function Ga(t, e) {
3937
4021
  }) : !1;
3938
4022
  }
3939
4023
  function mt(b) {
3940
- if (!g(K)) return !0;
4024
+ if (!g(J)) return !0;
3941
4025
  const T = b.commonAncestorContainer, M = T.nodeType === Node.TEXT_NODE ? T.parentElement : T;
3942
- return !!M && g(K).contains(M);
4026
+ return !!M && g(J).contains(M);
3943
4027
  }
3944
- function ze() {
4028
+ function He() {
3945
4029
  if (!(!r || !n())) try {
3946
- const b = D(), T = n().exportAnnotations(b);
4030
+ const b = H(), T = n().exportAnnotations(b);
3947
4031
  sessionStorage.setItem(B(), JSON.stringify(T));
3948
4032
  } catch (b) {
3949
4033
  console.error("[AnnotationToolbar] Failed to save annotations:", b);
3950
4034
  }
3951
4035
  }
3952
- function hr() {
4036
+ function mr() {
3953
4037
  if (!(!r || !n())) try {
3954
4038
  const b = sessionStorage.getItem(B());
3955
4039
  if (!b) return;
3956
- const T = JSON.parse(b), M = D(), st = n().importAnnotations(T, M);
4040
+ const T = JSON.parse(b), M = H(), st = n().importAnnotations(T, M);
3957
4041
  console.log(`[AnnotationToolbar] Restored ${st} annotations`), C(w, n().getAnnotations().length, !0);
3958
4042
  } catch (b) {
3959
4043
  console.error("[AnnotationToolbar] Failed to load annotations:", b);
3960
4044
  }
3961
4045
  }
3962
- function qe() {
4046
+ function Be() {
3963
4047
  if (!o() || !r) return;
3964
4048
  const b = window.getSelection();
3965
4049
  if (!b || b.rangeCount === 0) return xt();
3966
4050
  const T = b.getRangeAt(0), M = b.toString().trim();
3967
- if (!M || !mt(T) || !J(T.commonAncestorContainer)) return xt();
3968
- const st = T.getBoundingClientRect(), Dt = st.left + st.width / 2, Ie = st.top - 8;
4051
+ if (!M || !mt(T) || !K(T.commonAncestorContainer)) return xt();
4052
+ const st = T.getBoundingClientRect(), Ft = st.left + st.width / 2, Se = st.top - 8;
3969
4053
  C(R, gt(T), !0), g(v).isVisible = !0, g(v).selectedText = M, g(v).selectedRange = T.cloneRange(), g(v).toolbarPosition = {
3970
- x: Dt,
3971
- y: Ie
4054
+ x: Ft,
4055
+ y: Se
3972
4056
  }, C(p, `Annotation toolbar opened for "${M.length > 30 ? M.substring(0, 30) + "..." : M}"`), setTimeout(() => {
3973
4057
  C(p, "");
3974
4058
  }, 2e3), C(k, !0), setTimeout(() => {
@@ -3978,16 +4062,16 @@ function Ga(t, e) {
3978
4062
  function xt() {
3979
4063
  g(m) && i() && (i().stop(), C(m, !1)), g(v).isVisible = !1, g(v).selectedText = "", g(v).selectedRange = null;
3980
4064
  }
3981
- function In(b) {
4065
+ function An(b) {
3982
4066
  if (!g(v).selectedRange || !n()) return;
3983
4067
  const T = g(v).selectedText;
3984
- n().addAnnotation(g(v).selectedRange, b), C(w, n().getAnnotations().length, !0), ze();
3985
- const M = b === zt.UNDERLINE ? "underlined" : `highlighted in ${b}`;
4068
+ n().addAnnotation(g(v).selectedRange, b), C(w, n().getAnnotations().length, !0), He();
4069
+ const M = b === Dt.UNDERLINE ? "underlined" : `highlighted in ${b}`;
3986
4070
  C(p, `"${T.length > 30 ? T.substring(0, 30) + "..." : T}" ${M}`), setTimeout(() => {
3987
4071
  C(p, "");
3988
4072
  }, 3e3), xt();
3989
4073
  }
3990
- function fr() {
4074
+ function br() {
3991
4075
  if (!g(R) || !n()) {
3992
4076
  console.warn("[AnnotationToolbar] No overlapping annotation to remove");
3993
4077
  return;
@@ -4001,21 +4085,21 @@ function Ga(t, e) {
4001
4085
  const T = b.range.toString();
4002
4086
  n().removeAnnotation(g(R));
4003
4087
  const M = n().getAnnotations().length;
4004
- C(w, M, !0), console.log("[AnnotationToolbar] Annotations remaining:", M), ze(), C(p, `Removed annotation from "${T.length > 30 ? T.substring(0, 30) + "..." : T}"`), setTimeout(() => {
4088
+ C(w, M, !0), console.log("[AnnotationToolbar] Annotations remaining:", M), He(), C(p, `Removed annotation from "${T.length > 30 ? T.substring(0, 30) + "..." : T}"`), setTimeout(() => {
4005
4089
  C(p, "");
4006
4090
  }, 3e3), xt();
4007
4091
  }
4008
- function pr() {
4092
+ function yr() {
4009
4093
  const b = g(w);
4010
4094
  n()?.clearAnnotations(), C(w, 0), sessionStorage.removeItem(B()), C(p, `${b} annotation${b === 1 ? "" : "s"} cleared`), setTimeout(() => {
4011
4095
  C(p, "");
4012
4096
  }, 3e3), xt();
4013
4097
  }
4014
- async function vr() {
4098
+ async function wr() {
4015
4099
  if (!(!g(v).selectedRange || !i())) {
4016
4100
  C(m, !0);
4017
4101
  try {
4018
- console.log("[AnnotationToolbar] Speaking range:", g(v).selectedRange.toString().substring(0, 50)), await i().speakRange(g(v).selectedRange, { contentRoot: D() }), console.log("[AnnotationToolbar] TTS completed successfully");
4102
+ console.log("[AnnotationToolbar] Speaking range:", g(v).selectedRange.toString().substring(0, 50)), await i().speakRange(g(v).selectedRange, { contentRoot: H() }), console.log("[AnnotationToolbar] TTS completed successfully");
4019
4103
  } catch (b) {
4020
4104
  console.error("[AnnotationToolbar] TTS error:", b), alert(`TTS failed: ${b instanceof Error ? b.message : String(b)}`);
4021
4105
  } finally {
@@ -4023,95 +4107,95 @@ function Ga(t, e) {
4023
4107
  }
4024
4108
  }
4025
4109
  }
4026
- function kn(b) {
4110
+ function xn(b) {
4027
4111
  b.key === "Escape" && g(v).isVisible && (b.preventDefault(), xt());
4028
4112
  }
4029
- function He(b) {
4113
+ function Fe(b) {
4030
4114
  !g(v).isVisible || g(k) || g(d) && !g(d).contains(b.target) && xt();
4031
4115
  }
4032
- Wn(() => {
4116
+ qn(() => {
4033
4117
  if (!r) return;
4034
4118
  const b = setTimeout(() => {
4035
- hr();
4036
- }, 2e3), T = g(K) || document;
4037
- return T.addEventListener("mouseup", qe), T.addEventListener("click", He), T.addEventListener("touchend", qe), T.addEventListener("touchstart", He), document.addEventListener("keydown", kn), window.addEventListener("scroll", xt, !0), () => {
4038
- clearTimeout(b), T.removeEventListener("mouseup", qe), T.removeEventListener("click", He), T.removeEventListener("touchend", qe), T.removeEventListener("touchstart", He), document.removeEventListener("keydown", kn), window.removeEventListener("scroll", xt, !0);
4119
+ mr();
4120
+ }, 2e3), T = g(J) || document;
4121
+ return T.addEventListener("mouseup", Be), T.addEventListener("click", Fe), T.addEventListener("touchend", Be), T.addEventListener("touchstart", Fe), document.addEventListener("keydown", xn), window.addEventListener("scroll", xt, !0), () => {
4122
+ clearTimeout(b), T.removeEventListener("mouseup", Be), T.removeEventListener("click", Fe), T.removeEventListener("touchend", Be), T.removeEventListener("touchstart", Fe), document.removeEventListener("keydown", xn), window.removeEventListener("scroll", xt, !0);
4039
4123
  };
4040
- }), Wn(() => {
4124
+ }), qn(() => {
4041
4125
  if (!g(l)) return;
4042
- const b = oa(g(l), (M) => {
4126
+ const b = aa(g(l), (M) => {
4043
4127
  C(h, M, !0);
4044
- }), T = na(g(l), (M) => {
4128
+ }), T = la(g(l), (M) => {
4045
4129
  C(f, M, !0);
4046
4130
  });
4047
4131
  return () => {
4048
4132
  T(), b();
4049
4133
  };
4050
4134
  });
4051
- var gr = {
4135
+ var Tr = {
4052
4136
  get enabled() {
4053
4137
  return o();
4054
4138
  },
4055
4139
  set enabled(b = !0) {
4056
- o(b), eo();
4140
+ o(b), io();
4057
4141
  },
4058
4142
  get highlightCoordinator() {
4059
4143
  return n();
4060
4144
  },
4061
4145
  set highlightCoordinator(b = null) {
4062
- n(b), eo();
4146
+ n(b), io();
4063
4147
  },
4064
4148
  get ttsService() {
4065
4149
  return i();
4066
4150
  },
4067
4151
  set ttsService(b = null) {
4068
- i(b), eo();
4152
+ i(b), io();
4069
4153
  }
4070
- }, $n = Ba(), Sn = _o($n);
4071
- Zn(Sn, (b) => C(l, b), () => g(l));
4072
- var An = Rt(Sn, 2), mr = (b) => {
4073
- var T = Da(), M = Je(T);
4074
- Ws(M, 17, () => a, Rs, (at, lt) => {
4075
- var Z = Va(), De = Je(Z), So = Je(De, !0);
4076
- Be(De), Be(Z), Ze(() => {
4077
- Fn(Z, `background-color: ${g(lt).hex ?? ""};`), Gn(Z, "aria-label", g(lt).label), Gn(Z, "title", g(lt).label), Hn(So, g(lt).label);
4078
- }), Se("click", Z, () => In(g(lt).name)), Vt(at, Z);
4154
+ }, _n = tl(), Cn = Mo(_n);
4155
+ ti(Cn, (b) => C(l, b), () => g(l));
4156
+ var En = Rt(Cn, 2), Ir = (b) => {
4157
+ var T = Qa(), M = Xe(T);
4158
+ Ds(M, 17, () => a, zs, (at, lt) => {
4159
+ var Z = Ja(), Ge = Xe(Z), _o = Xe(Ge, !0);
4160
+ Ue(Ge), Ue(Z), Qe(() => {
4161
+ Kn(Z, `background-color: ${g(lt).hex ?? ""};`), Zn(Z, "aria-label", g(lt).label), Zn(Z, "title", g(lt).label), Gn(_o, g(lt).label);
4162
+ }), _e("click", Z, () => An(g(lt).name)), zt(at, Z);
4079
4163
  });
4080
- var st = Rt(M, 2), Dt = Rt(st, 2), Ie = (at) => {
4081
- var lt = ja(), Z = Rt(_o(lt), 2);
4082
- Ze(() => Z.disabled = g(m)), Se("click", Z, vr), Vt(at, lt);
4164
+ var st = Rt(M, 2), Ft = Rt(st, 2), Se = (at) => {
4165
+ var lt = Ka(), Z = Rt(Mo(lt), 2);
4166
+ Qe(() => Z.disabled = g(m)), _e("click", Z, wr), zt(at, lt);
4083
4167
  };
4084
- xe(Dt, (at) => {
4085
- i() && at(Ie);
4168
+ Ee(Ft, (at) => {
4169
+ i() && at(Se);
4086
4170
  });
4087
- var $o = Rt(Dt, 2), yr = (at) => {
4088
- var lt = Ha(), Z = Rt(_o(lt), 2), De = (Bt) => {
4089
- var ke = za();
4090
- Se("click", ke, fr), Vt(Bt, ke);
4171
+ var xo = Rt(Ft, 2), $r = (at) => {
4172
+ var lt = Xa(), Z = Rt(Mo(lt), 2), Ge = (Gt) => {
4173
+ var Ae = Za();
4174
+ _e("click", Ae, br), zt(Gt, Ae);
4091
4175
  };
4092
- xe(Z, (Bt) => {
4093
- g(O) && Bt(De);
4176
+ Ee(Z, (Gt) => {
4177
+ g(O) && Gt(Ge);
4094
4178
  });
4095
- var So = Rt(Z, 2), wr = (Bt) => {
4096
- var ke = qa();
4097
- Se("click", ke, pr), Vt(Bt, ke);
4179
+ var _o = Rt(Z, 2), Sr = (Gt) => {
4180
+ var Ae = Ya();
4181
+ _e("click", Ae, yr), zt(Gt, Ae);
4098
4182
  };
4099
- xe(So, (Bt) => {
4100
- g(A) && Bt(wr);
4101
- }), Vt(at, lt);
4183
+ Ee(_o, (Gt) => {
4184
+ g(A) && Gt(Sr);
4185
+ }), zt(at, lt);
4102
4186
  };
4103
- xe($o, (at) => {
4104
- (g(O) || g(A)) && at(yr);
4105
- }), Be(T), Zn(T, (at) => C(d, at), () => g(d)), Ze(() => Fn(T, `left:${g(v).toolbarPosition.x}px; top:${g(v).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), Se("click", st, () => In(zt.UNDERLINE)), Vt(b, T);
4187
+ Ee(xo, (at) => {
4188
+ (g(O) || g(A)) && at($r);
4189
+ }), Ue(T), ti(T, (at) => C(d, at), () => g(d)), Qe(() => Kn(T, `left:${g(v).toolbarPosition.x}px; top:${g(v).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), _e("click", st, () => An(Dt.UNDERLINE)), zt(b, T);
4106
4190
  };
4107
- xe(An, (b) => {
4108
- g(v).isVisible && b(mr);
4191
+ Ee(En, (b) => {
4192
+ g(v).isVisible && b(Ir);
4109
4193
  });
4110
- var xn = Rt(An, 2), br = Je(xn, !0);
4111
- return Be(xn), Ze(() => Hn(br, g(p))), Vt(t, $n), hi(gr);
4194
+ var Mn = Rt(En, 2), kr = Xe(Mn, !0);
4195
+ return Ue(Mn), Qe(() => Gn(kr, g(p))), zt(t, _n), gi(Tr);
4112
4196
  }
4113
- As(["click"]);
4114
- customElements.define("pie-tool-annotation-toolbar", Ys(Ga, {
4197
+ Ms(["click"]);
4198
+ customElements.define("pie-tool-annotation-toolbar", oa(ol, {
4115
4199
  enabled: {
4116
4200
  attribute: "enabled",
4117
4201
  type: "Boolean"