@pie-qti/item-player 0.1.6 → 0.1.7

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/dist/catalog/applyGlossaryTriggers.d.ts +2 -1
  2. package/dist/catalog/applyGlossaryTriggers.d.ts.map +1 -1
  3. package/dist/catalog/applyGlossaryTriggers.js +145 -30
  4. package/dist/catalog/glossaryAction.d.ts.map +1 -1
  5. package/dist/catalog/glossaryAction.js +14 -4
  6. package/dist/components/utils/stimulusRender.d.ts +17 -0
  7. package/dist/components/utils/stimulusRender.d.ts.map +1 -0
  8. package/dist/components/utils/stimulusRender.js +70 -0
  9. package/dist/components/utils/stylesheetRender.d.ts +4 -0
  10. package/dist/components/utils/stylesheetRender.d.ts.map +1 -0
  11. package/dist/components/utils/stylesheetRender.js +57 -0
  12. package/dist/core/Player.d.ts +37 -2
  13. package/dist/core/Player.d.ts.map +1 -1
  14. package/dist/core/Player.js +320 -48
  15. package/dist/element.js +1288 -924
  16. package/dist/element.js.map +1 -1
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/pnp/applyPnp.d.ts.map +1 -1
  20. package/dist/pnp/applyPnp.js +9 -2
  21. package/dist/pnp/parsePnpXml.d.ts.map +1 -1
  22. package/dist/pnp/parsePnpXml.js +91 -3
  23. package/dist/pnp/types.d.ts +24 -1
  24. package/dist/pnp/types.d.ts.map +1 -1
  25. package/dist/types/index.d.ts +47 -0
  26. package/dist/types/index.d.ts.map +1 -1
  27. package/package.json +6 -6
  28. package/src/catalog/applyGlossaryTriggers.ts +174 -34
  29. package/src/catalog/glossaryAction.ts +14 -4
  30. package/src/components/ItemBody.svelte +36 -27
  31. package/src/components/utils/stimulusRender.ts +93 -0
  32. package/src/components/utils/stylesheetRender.ts +58 -0
  33. package/src/core/Player.ts +355 -48
  34. package/src/index.ts +1 -0
  35. package/src/pnp/applyPnp.ts +8 -2
  36. package/src/pnp/parsePnpXml.ts +102 -5
  37. package/src/pnp/types.ts +43 -1
  38. package/src/types/index.ts +53 -0
  39. package/src/__tests__/glossaryTriggers.test.ts +0 -411
  40. package/src/__tests__/pnp.test.ts +0 -250
package/dist/element.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { DeclarationContext as e, OperatorRegistry as t, buildOutcomeProcessingAst as n, buildResponseProcessingAst as r, buildTemplateProcessingAst as i, childElements as a, coerceBaseValue as o, evalExpr as s, execProgram as c, findAssessmentItem as l, findDescendants as u, findFirstDescendant as d, getAttr as f, parseXml as p, qtiNull as m, qtiValue as h, serializeXml as g, toBoolean as _, toNumber as v, toStringValue as y } from "@pie-qti/qti-processing";
2
- import { Qti2xAttributeNameMapper as b, Qti2xElementNameMapper as ee, Qti3AttributeNameMapper as x, Qti3ElementNameMapper as S, assignProps as te, detectQtiVersion as ne } from "@pie-qti/qti-common";
3
- import { parse as re } from "node-html-parser";
4
- import { typesetMathInElement as ie } from "@pie-qti/typeset-katex";
5
- import { normalizeHeuristicsConfig as ae } from "@pie-qti/ims-cp-core";
2
+ import { Qti2xAttributeNameMapper as b, Qti2xElementNameMapper as ee, Qti3AttributeNameMapper as x, Qti3ElementNameMapper as te, assignProps as ne, detectQtiVersion as re } from "@pie-qti/qti-common";
3
+ import { parse as ie } from "node-html-parser";
4
+ import { typesetMathInElement as ae } from "@pie-qti/typeset-katex";
5
+ import { normalizeHeuristicsConfig as oe } from "@pie-qti/ims-cp-core";
6
6
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/shared/utils.js
7
- var oe = Array.isArray, se = Array.prototype.indexOf, ce = Array.prototype.includes, le = Array.from, ue = Object.defineProperty, de = Object.getOwnPropertyDescriptor, fe = Object.getOwnPropertyDescriptors, pe = Object.prototype, me = Array.prototype, he = Object.getPrototypeOf, ge = Object.isExtensible, _e = () => {};
8
- function ve(e) {
7
+ var se = Array.isArray, ce = Array.prototype.indexOf, le = Array.prototype.includes, ue = Array.from, de = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, pe = Object.getOwnPropertyDescriptors, me = Object.prototype, he = Array.prototype, ge = Object.getPrototypeOf, _e = Object.isExtensible, ve = () => {};
8
+ function ye(e) {
9
9
  for (var t = 0; t < e.length; t++) e[t]();
10
10
  }
11
- function ye() {
11
+ function be() {
12
12
  var e, t;
13
13
  return {
14
14
  promise: new Promise((n, r) => {
@@ -20,122 +20,122 @@ function ye() {
20
20
  }
21
21
  //#endregion
22
22
  //#region \0@oxc-project+runtime@0.127.0/helpers/typeof.js
23
- function be(e) {
23
+ function xe(e) {
24
24
  "@babel/helpers - typeof";
25
- return be = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
25
+ return xe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
26
26
  return typeof e;
27
27
  } : function(e) {
28
28
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
29
- }, be(e);
29
+ }, xe(e);
30
30
  }
31
31
  //#endregion
32
32
  //#region \0@oxc-project+runtime@0.127.0/helpers/toPrimitive.js
33
- function xe(e, t) {
34
- if (be(e) != "object" || !e) return e;
33
+ function Se(e, t) {
34
+ if (xe(e) != "object" || !e) return e;
35
35
  var n = e[Symbol.toPrimitive];
36
36
  if (n !== void 0) {
37
37
  var r = n.call(e, t || "default");
38
- if (be(r) != "object") return r;
38
+ if (xe(r) != "object") return r;
39
39
  throw TypeError("@@toPrimitive must return a primitive value.");
40
40
  }
41
41
  return (t === "string" ? String : Number)(e);
42
42
  }
43
43
  //#endregion
44
44
  //#region \0@oxc-project+runtime@0.127.0/helpers/toPropertyKey.js
45
- function Se(e) {
46
- var t = xe(e, "string");
47
- return be(t) == "symbol" ? t : t + "";
45
+ function Ce(e) {
46
+ var t = Se(e, "string");
47
+ return xe(t) == "symbol" ? t : t + "";
48
48
  }
49
49
  //#endregion
50
50
  //#region \0@oxc-project+runtime@0.127.0/helpers/defineProperty.js
51
- function Ce(e, t, n) {
52
- return (t = Se(t)) in e ? Object.defineProperty(e, t, {
51
+ function we(e, t, n) {
52
+ return (t = Ce(t)) in e ? Object.defineProperty(e, t, {
53
53
  value: n,
54
54
  enumerable: !0,
55
55
  configurable: !0,
56
56
  writable: !0
57
57
  }) : e[t] = n, e;
58
58
  }
59
- var we = 1024, Te = 2048, Ee = 4096, De = 8192, Oe = 16384, ke = 32768, Ae = 1 << 25, je = 65536, Me = 1 << 19, Ne = 1 << 20, Pe = 1 << 25, Fe = 65536, Ie = 1 << 21, Le = 1 << 22, Re = 1 << 23, ze = Symbol("$state"), Be = Symbol("legacy props"), Ve = Symbol(""), He = new class extends Error {
59
+ var Te = 1024, Ee = 2048, De = 4096, Oe = 8192, ke = 16384, Ae = 32768, je = 1 << 25, Me = 65536, Ne = 1 << 19, Pe = 1 << 20, Fe = 1 << 25, Ie = 65536, Le = 1 << 21, Re = 1 << 22, ze = 1 << 23, Be = Symbol("$state"), Ve = Symbol("legacy props"), He = Symbol(""), Ue = new class extends Error {
60
60
  constructor(...e) {
61
- super(...e), Ce(this, "name", "StaleReactionError"), Ce(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
61
+ super(...e), we(this, "name", "StaleReactionError"), we(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
62
62
  }
63
- }(), Ue = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
63
+ }(), We = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
64
64
  //#endregion
65
65
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/errors.js
66
- function We() {
66
+ function Ge() {
67
67
  throw Error("https://svelte.dev/e/async_derived_orphan");
68
68
  }
69
- function Ge(e, t, n) {
69
+ function Ke(e, t, n) {
70
70
  throw Error("https://svelte.dev/e/each_key_duplicate");
71
71
  }
72
- function Ke(e) {
72
+ function qe(e) {
73
73
  throw Error("https://svelte.dev/e/effect_in_teardown");
74
74
  }
75
- function qe() {
75
+ function Je() {
76
76
  throw Error("https://svelte.dev/e/effect_in_unowned_derived");
77
77
  }
78
- function Je(e) {
78
+ function Ye(e) {
79
79
  throw Error("https://svelte.dev/e/effect_orphan");
80
80
  }
81
- function Ye() {
81
+ function Xe() {
82
82
  throw Error("https://svelte.dev/e/effect_update_depth_exceeded");
83
83
  }
84
- function Xe(e) {
84
+ function Ze(e) {
85
85
  throw Error("https://svelte.dev/e/props_invalid_value");
86
86
  }
87
- function Ze() {
87
+ function Qe() {
88
88
  throw Error("https://svelte.dev/e/state_descriptors_fixed");
89
89
  }
90
- function Qe() {
90
+ function $e() {
91
91
  throw Error("https://svelte.dev/e/state_prototype_fixed");
92
92
  }
93
- function $e() {
93
+ function et() {
94
94
  throw Error("https://svelte.dev/e/state_unsafe_mutation");
95
95
  }
96
- function et() {
96
+ function tt() {
97
97
  throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
98
98
  }
99
99
  //#endregion
100
100
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/constants.js
101
- var tt = {}, C = Symbol(), nt = "http://www.w3.org/2000/svg", rt = "http://www.w3.org/1998/Math/MathML";
102
- function it(e) {
101
+ var nt = {}, S = Symbol(), rt = "http://www.w3.org/2000/svg", it = "http://www.w3.org/1998/Math/MathML";
102
+ function at(e) {
103
103
  console.warn("https://svelte.dev/e/hydration_mismatch");
104
104
  }
105
- function at() {
105
+ function ot() {
106
106
  console.warn("https://svelte.dev/e/select_multiple_invalid_value");
107
107
  }
108
- function ot() {
108
+ function st() {
109
109
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
110
110
  }
111
111
  //#endregion
112
112
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/hydration.js
113
- var w = !1;
114
- function st(e) {
115
- w = e;
113
+ var C = !1;
114
+ function ct(e) {
115
+ C = e;
116
116
  }
117
- var T;
118
- function E(e) {
119
- if (e === null) throw it(), tt;
120
- return T = e;
117
+ var w;
118
+ function T(e) {
119
+ if (e === null) throw at(), nt;
120
+ return w = e;
121
121
  }
122
- function ct() {
123
- return E(/* @__PURE__ */ br(T));
122
+ function lt() {
123
+ return T(/* @__PURE__ */ br(w));
124
124
  }
125
- function D(e) {
126
- if (w) {
127
- if (/* @__PURE__ */ br(T) !== null) throw it(), tt;
128
- T = e;
125
+ function E(e) {
126
+ if (C) {
127
+ if (/* @__PURE__ */ br(w) !== null) throw at(), nt;
128
+ w = e;
129
129
  }
130
130
  }
131
- function lt(e = 1) {
132
- if (w) {
133
- for (var t = e, n = T; t--;) n = /* @__PURE__ */ br(n);
134
- T = n;
131
+ function ut(e = 1) {
132
+ if (C) {
133
+ for (var t = e, n = w; t--;) n = /* @__PURE__ */ br(n);
134
+ w = n;
135
135
  }
136
136
  }
137
- function ut(e = !0) {
138
- for (var t = 0, n = T;;) {
137
+ function dt(e = !0) {
138
+ for (var t = 0, n = w;;) {
139
139
  if (n.nodeType === 8) {
140
140
  var r = n.data;
141
141
  if (r === "]") {
@@ -147,77 +147,77 @@ function ut(e = !0) {
147
147
  e && n.remove(), n = i;
148
148
  }
149
149
  }
150
- function dt(e) {
151
- if (!e || e.nodeType !== 8) throw it(), tt;
150
+ function ft(e) {
151
+ if (!e || e.nodeType !== 8) throw at(), nt;
152
152
  return e.data;
153
153
  }
154
154
  //#endregion
155
155
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/equality.js
156
- function ft(e) {
156
+ function pt(e) {
157
157
  return e === this.v;
158
158
  }
159
- function pt(e, t) {
159
+ function mt(e, t) {
160
160
  return e == e ? e !== t || typeof e == "object" && !!e || typeof e == "function" : t == t;
161
161
  }
162
- function mt(e) {
163
- return !pt(e, this.v);
162
+ function ht(e) {
163
+ return !mt(e, this.v);
164
164
  }
165
165
  //#endregion
166
166
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/flags/index.js
167
- var ht = !1, gt = !1, O = null;
168
- function _t(e) {
169
- O = e;
167
+ var gt = !1, _t = !1, D = null;
168
+ function vt(e) {
169
+ D = e;
170
170
  }
171
- function vt(e, t = !1, n) {
172
- O = {
173
- p: O,
171
+ function yt(e, t = !1, n) {
172
+ D = {
173
+ p: D,
174
174
  i: !1,
175
175
  c: null,
176
176
  e: null,
177
177
  s: e,
178
178
  x: null,
179
179
  r: G,
180
- l: gt && !t ? {
180
+ l: _t && !t ? {
181
181
  s: null,
182
182
  u: null,
183
183
  $: []
184
184
  } : null
185
185
  };
186
186
  }
187
- function yt(e) {
188
- var t = O, n = t.e;
187
+ function bt(e) {
188
+ var t = D, n = t.e;
189
189
  if (n !== null) {
190
190
  t.e = null;
191
191
  for (var r of n) Ir(r);
192
192
  }
193
- return e !== void 0 && (t.x = e), t.i = !0, O = t.p, e ?? {};
193
+ return e !== void 0 && (t.x = e), t.i = !0, D = t.p, e ?? {};
194
194
  }
195
- function bt() {
196
- return !gt || O !== null && O.l === null;
195
+ function xt() {
196
+ return !_t || D !== null && D.l === null;
197
197
  }
198
198
  //#endregion
199
199
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/task.js
200
- var xt = [];
201
- function St() {
202
- var e = xt;
203
- xt = [], ve(e);
204
- }
205
- function Ct(e) {
206
- if (xt.length === 0 && !Rt) {
207
- var t = xt;
200
+ var St = [];
201
+ function Ct() {
202
+ var e = St;
203
+ St = [], ye(e);
204
+ }
205
+ function wt(e) {
206
+ if (St.length === 0 && !zt) {
207
+ var t = St;
208
208
  queueMicrotask(() => {
209
- t === xt && St();
209
+ t === St && Ct();
210
210
  });
211
211
  }
212
- xt.push(e);
212
+ St.push(e);
213
213
  }
214
- function wt(e) {
214
+ function Tt(e) {
215
215
  var t = G;
216
- if (t === null) return W.f |= Re, e;
216
+ if (t === null) return W.f |= ze, e;
217
217
  if (!(t.f & 32768) && !(t.f & 4)) throw e;
218
- Tt(e, t);
218
+ Et(e, t);
219
219
  }
220
- function Tt(e, t) {
220
+ function Et(e, t) {
221
221
  for (; t !== null;) {
222
222
  if (t.f & 128) {
223
223
  if (!(t.f & 32768)) throw e;
@@ -234,201 +234,201 @@ function Tt(e, t) {
234
234
  }
235
235
  //#endregion
236
236
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/status.js
237
- var Et = ~(Te | Ee | we);
238
- function k(e, t) {
239
- e.f = e.f & Et | t;
237
+ var Dt = ~(Ee | De | Te);
238
+ function O(e, t) {
239
+ e.f = e.f & Dt | t;
240
240
  }
241
- function Dt(e) {
242
- e.f & 512 || e.deps === null ? k(e, we) : k(e, Ee);
241
+ function Ot(e) {
242
+ e.f & 512 || e.deps === null ? O(e, Te) : O(e, De);
243
243
  }
244
244
  //#endregion
245
245
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/utils.js
246
- function Ot(e) {
247
- if (e !== null) for (let t of e) !(t.f & 2) || !(t.f & 65536) || (t.f ^= Fe, Ot(t.deps));
246
+ function kt(e) {
247
+ if (e !== null) for (let t of e) !(t.f & 2) || !(t.f & 65536) || (t.f ^= Ie, kt(t.deps));
248
248
  }
249
- function kt(e, t, n) {
250
- e.f & 2048 ? t.add(e) : e.f & 4096 && n.add(e), Ot(e.deps), k(e, we);
249
+ function At(e, t, n) {
250
+ e.f & 2048 ? t.add(e) : e.f & 4096 && n.add(e), kt(e.deps), O(e, Te);
251
251
  }
252
252
  //#endregion
253
253
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/store.js
254
- var At = !1, jt = !1;
255
- function Mt(e) {
256
- var t = jt;
254
+ var jt = !1, Mt = !1;
255
+ function Nt(e) {
256
+ var t = Mt;
257
257
  try {
258
- return jt = !1, [e(), jt];
258
+ return Mt = !1, [e(), Mt];
259
259
  } finally {
260
- jt = t;
260
+ Mt = t;
261
261
  }
262
262
  }
263
263
  //#endregion
264
264
  //#region \0@oxc-project+runtime@0.127.0/helpers/checkPrivateRedeclaration.js
265
- function Nt(e, t) {
265
+ function Pt(e, t) {
266
266
  if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
267
267
  }
268
268
  //#endregion
269
269
  //#region \0@oxc-project+runtime@0.127.0/helpers/classPrivateMethodInitSpec.js
270
- function Pt(e, t) {
271
- Nt(e, t), t.add(e);
270
+ function Ft(e, t) {
271
+ Pt(e, t), t.add(e);
272
272
  }
273
273
  //#endregion
274
274
  //#region \0@oxc-project+runtime@0.127.0/helpers/classPrivateFieldInitSpec.js
275
- function A(e, t, n) {
276
- Nt(e, t), t.set(e, n);
275
+ function k(e, t, n) {
276
+ Pt(e, t), t.set(e, n);
277
277
  }
278
278
  //#endregion
279
279
  //#region \0@oxc-project+runtime@0.127.0/helpers/assertClassBrand.js
280
- function j(e, t, n) {
280
+ function A(e, t, n) {
281
281
  if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
282
282
  throw TypeError("Private element is not present on this object");
283
283
  }
284
284
  //#endregion
285
285
  //#region \0@oxc-project+runtime@0.127.0/helpers/classPrivateFieldGet2.js
286
- function M(e, t) {
287
- return e.get(j(e, t));
286
+ function j(e, t) {
287
+ return e.get(A(e, t));
288
288
  }
289
289
  //#endregion
290
290
  //#region \0@oxc-project+runtime@0.127.0/helpers/classPrivateFieldSet2.js
291
- function N(e, t, n) {
292
- return e.set(j(e, t), n), n;
291
+ function M(e, t, n) {
292
+ return e.set(A(e, t), n), n;
293
293
  }
294
294
  //#endregion
295
295
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/batch.js
296
- var Ft, It = /* @__PURE__ */ new Set(), P = null, F = null, Lt = null, Rt = !1, zt = !1, Bt = null, Vt = null, Ht = 0, Ut = 1, Wt = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakSet(), tn = class e {
296
+ var It, Lt = /* @__PURE__ */ new Set(), N = null, P = null, Rt = null, zt = !1, Bt = !1, Vt = null, Ht = null, Ut = 0, Wt = 1, Gt = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), tn = /* @__PURE__ */ new WeakSet(), nn = class e {
297
297
  constructor() {
298
- Pt(this, en), Ce(this, "id", Ut++), Ce(this, "current", /* @__PURE__ */ new Map()), Ce(this, "previous", /* @__PURE__ */ new Map()), A(this, Wt, /* @__PURE__ */ new Set()), A(this, Gt, /* @__PURE__ */ new Set()), A(this, Kt, 0), A(this, qt, 0), A(this, Jt, null), A(this, Yt, []), A(this, Xt, /* @__PURE__ */ new Set()), A(this, Zt, /* @__PURE__ */ new Set()), A(this, Qt, /* @__PURE__ */ new Map()), Ce(this, "is_fork", !1), A(this, $t, !1);
298
+ Ft(this, tn), we(this, "id", Wt++), we(this, "current", /* @__PURE__ */ new Map()), we(this, "previous", /* @__PURE__ */ new Map()), k(this, Gt, /* @__PURE__ */ new Set()), k(this, Kt, /* @__PURE__ */ new Set()), k(this, qt, 0), k(this, Jt, 0), k(this, Yt, null), k(this, Xt, []), k(this, Zt, /* @__PURE__ */ new Set()), k(this, Qt, /* @__PURE__ */ new Set()), k(this, $t, /* @__PURE__ */ new Map()), we(this, "is_fork", !1), k(this, en, !1);
299
299
  }
300
300
  skip_effect(e) {
301
- M(Qt, this).has(e) || M(Qt, this).set(e, {
301
+ j($t, this).has(e) || j($t, this).set(e, {
302
302
  d: [],
303
303
  m: []
304
304
  });
305
305
  }
306
306
  unskip_effect(e) {
307
- var t = M(Qt, this).get(e);
307
+ var t = j($t, this).get(e);
308
308
  if (t) {
309
- M(Qt, this).delete(e);
310
- for (var n of t.d) k(n, Te), this.schedule(n);
311
- for (n of t.m) k(n, Ee), this.schedule(n);
309
+ j($t, this).delete(e);
310
+ for (var n of t.d) O(n, Ee), this.schedule(n);
311
+ for (n of t.m) O(n, De), this.schedule(n);
312
312
  }
313
313
  }
314
314
  capture(e, t) {
315
- t !== C && !this.previous.has(e) && this.previous.set(e, t), e.f & 8388608 || (this.current.set(e, e.v), F?.set(e, e.v));
315
+ t !== S && !this.previous.has(e) && this.previous.set(e, t), e.f & 8388608 || (this.current.set(e, e.v), P?.set(e, e.v));
316
316
  }
317
317
  activate() {
318
- P = this;
318
+ N = this;
319
319
  }
320
320
  deactivate() {
321
- P = null, F = null;
321
+ N = null, P = null;
322
322
  }
323
323
  flush() {
324
324
  try {
325
- zt = !0, P = this, j(en, this, rn).call(this);
325
+ Bt = !0, N = this, A(tn, this, an).call(this);
326
326
  } finally {
327
- Ht = 0, Lt = null, Bt = null, Vt = null, zt = !1, P = null, F = null, rr.clear();
327
+ Ut = 0, Rt = null, Vt = null, Ht = null, Bt = !1, N = null, P = null, ir.clear();
328
328
  }
329
329
  }
330
330
  discard() {
331
- for (let e of M(Gt, this)) e(this);
332
- M(Gt, this).clear(), It.delete(this);
331
+ for (let e of j(Kt, this)) e(this);
332
+ j(Kt, this).clear(), Lt.delete(this);
333
333
  }
334
334
  increment(e) {
335
- N(Kt, this, M(Kt, this) + 1), e && N(qt, this, M(qt, this) + 1);
335
+ M(qt, this, j(qt, this) + 1), e && M(Jt, this, j(Jt, this) + 1);
336
336
  }
337
337
  decrement(e, t) {
338
- N(Kt, this, M(Kt, this) - 1), e && N(qt, this, M(qt, this) - 1), !(M($t, this) || t) && (N($t, this, !0), Ct(() => {
339
- N($t, this, !1), this.flush();
338
+ M(qt, this, j(qt, this) - 1), e && M(Jt, this, j(Jt, this) - 1), !(j(en, this) || t) && (M(en, this, !0), wt(() => {
339
+ M(en, this, !1), this.flush();
340
340
  }));
341
341
  }
342
342
  transfer_effects(e, t) {
343
- for (let t of e) M(Xt, this).add(t);
344
- for (let e of t) M(Zt, this).add(e);
343
+ for (let t of e) j(Zt, this).add(t);
344
+ for (let e of t) j(Qt, this).add(e);
345
345
  e.clear(), t.clear();
346
346
  }
347
347
  oncommit(e) {
348
- M(Wt, this).add(e);
348
+ j(Gt, this).add(e);
349
349
  }
350
350
  ondiscard(e) {
351
- M(Gt, this).add(e);
351
+ j(Kt, this).add(e);
352
352
  }
353
353
  settled() {
354
- return (M(Jt, this) ?? N(Jt, this, ye())).promise;
354
+ return (j(Yt, this) ?? M(Yt, this, be())).promise;
355
355
  }
356
356
  static ensure() {
357
- if (P === null) {
358
- let t = P = new e();
359
- zt || (It.add(P), Rt || Ct(() => {
360
- P === t && t.flush();
357
+ if (N === null) {
358
+ let t = N = new e();
359
+ Bt || (Lt.add(N), zt || wt(() => {
360
+ N === t && t.flush();
361
361
  }));
362
362
  }
363
- return P;
363
+ return N;
364
364
  }
365
365
  apply() {
366
- if (!ht || !this.is_fork && It.size === 1) {
367
- F = null;
366
+ if (!gt || !this.is_fork && Lt.size === 1) {
367
+ P = null;
368
368
  return;
369
369
  }
370
- F = new Map(this.current);
371
- for (let e of It) if (!(e === this || e.is_fork)) for (let [t, n] of e.previous) F.has(t) || F.set(t, n);
370
+ P = new Map(this.current);
371
+ for (let e of Lt) if (!(e === this || e.is_fork)) for (let [t, n] of e.previous) P.has(t) || P.set(t, n);
372
372
  }
373
373
  schedule(e) {
374
- if (Lt = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
374
+ if (Rt = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
375
375
  e.b.defer_effect(e);
376
376
  return;
377
377
  }
378
378
  for (var t = e; t.parent !== null;) {
379
379
  t = t.parent;
380
380
  var n = t.f;
381
- if (Bt !== null && t === G && (ht || (W === null || !(W.f & 2)) && !At)) return;
381
+ if (Vt !== null && t === G && (gt || (W === null || !(W.f & 2)) && !jt)) return;
382
382
  if (n & 96) {
383
383
  if (!(n & 1024)) return;
384
- t.f ^= we;
384
+ t.f ^= Te;
385
385
  }
386
386
  }
387
- M(Yt, this).push(t);
387
+ j(Xt, this).push(t);
388
388
  }
389
389
  };
390
- Ft = tn;
391
- function nn() {
392
- return this.is_fork || M(qt, this) > 0;
393
- }
390
+ It = nn;
394
391
  function rn() {
395
- if (Ht++ > 1e3 && (It.delete(this), cn()), !j(en, this, nn).call(this)) {
396
- for (let e of M(Xt, this)) M(Zt, this).delete(e), k(e, Te), this.schedule(e);
397
- for (let e of M(Zt, this)) k(e, Ee), this.schedule(e);
392
+ return this.is_fork || j(Jt, this) > 0;
393
+ }
394
+ function an() {
395
+ if (Ut++ > 1e3 && (Lt.delete(this), ln()), !A(tn, this, rn).call(this)) {
396
+ for (let e of j(Zt, this)) j(Qt, this).delete(e), O(e, Ee), this.schedule(e);
397
+ for (let e of j(Qt, this)) O(e, De), this.schedule(e);
398
398
  }
399
- let e = M(Yt, this);
400
- N(Yt, this, []), this.apply();
401
- var t = Bt = [], n = [], r = Vt = [];
399
+ let e = j(Xt, this);
400
+ M(Xt, this, []), this.apply();
401
+ var t = Vt = [], n = [], r = Ht = [];
402
402
  for (let r of e) try {
403
- j(en, this, an).call(this, r, t, n);
403
+ A(tn, this, on).call(this, r, t, n);
404
404
  } catch (e) {
405
- throw hn(r), e;
405
+ throw gn(r), e;
406
406
  }
407
- if (P = null, r.length > 0) {
408
- var i = Ft.ensure();
407
+ if (N = null, r.length > 0) {
408
+ var i = It.ensure();
409
409
  for (let e of r) i.schedule(e);
410
410
  }
411
- if (Bt = null, Vt = null, j(en, this, nn).call(this)) {
412
- j(en, this, on).call(this, n), j(en, this, on).call(this, t);
413
- for (let [e, t] of M(Qt, this)) mn(e, t);
411
+ if (Vt = null, Ht = null, A(tn, this, rn).call(this)) {
412
+ A(tn, this, sn).call(this, n), A(tn, this, sn).call(this, t);
413
+ for (let [e, t] of j($t, this)) hn(e, t);
414
414
  } else {
415
- M(Kt, this) === 0 && It.delete(this), M(Xt, this).clear(), M(Zt, this).clear();
416
- for (let e of M(Wt, this)) e(this);
417
- M(Wt, this).clear(), un(n), un(t), M(Jt, this)?.resolve();
415
+ j(qt, this) === 0 && Lt.delete(this), j(Zt, this).clear(), j(Qt, this).clear();
416
+ for (let e of j(Gt, this)) e(this);
417
+ j(Gt, this).clear(), dn(n), dn(t), j(Yt, this)?.resolve();
418
418
  }
419
- var a = P;
420
- if (M(Yt, this).length > 0) {
419
+ var a = N;
420
+ if (j(Xt, this).length > 0) {
421
421
  let e = a ?? (a = this);
422
- M(Yt, e).push(...M(Yt, this).filter((t) => !M(Yt, e).includes(t)));
422
+ j(Xt, e).push(...j(Xt, this).filter((t) => !j(Xt, e).includes(t)));
423
423
  }
424
- a !== null && (It.add(a), j(en, a, rn).call(a)), It.has(this) || j(en, this, sn).call(this);
424
+ a !== null && (Lt.add(a), A(tn, a, an).call(a)), Lt.has(this) || A(tn, this, cn).call(this);
425
425
  }
426
- function an(e, t, n) {
427
- e.f ^= we;
426
+ function on(e, t, n) {
427
+ e.f ^= Te;
428
428
  for (var r = e.first; r !== null;) {
429
429
  var i = r.f, a = (i & 96) != 0;
430
- if (!(a && i & 1024 || i & 8192 || M(Qt, this).has(r)) && r.fn !== null) {
431
- a ? r.f ^= we : i & 4 ? t.push(r) : ht && i & 16777224 ? n.push(r) : hi(r) && (i & 16 && M(Zt, this).add(r), bi(r));
430
+ if (!(a && i & 1024 || i & 8192 || j($t, this).has(r)) && r.fn !== null) {
431
+ a ? r.f ^= Te : i & 4 ? t.push(r) : gt && i & 16777224 ? n.push(r) : hi(r) && (i & 16 && j(Qt, this).add(r), bi(r));
432
432
  var o = r.first;
433
433
  if (o !== null) {
434
434
  r = o;
@@ -445,11 +445,11 @@ function an(e, t, n) {
445
445
  }
446
446
  }
447
447
  }
448
- function on(e) {
449
- for (var t = 0; t < e.length; t += 1) kt(e[t], M(Xt, this), M(Zt, this));
448
+ function sn(e) {
449
+ for (var t = 0; t < e.length; t += 1) At(e[t], j(Zt, this), j(Qt, this));
450
450
  }
451
- function sn() {
452
- for (let s of It) {
451
+ function cn() {
452
+ for (let s of Lt) {
453
453
  var e = s.id < this.id, t = [];
454
454
  for (let [n, r] of this.current) {
455
455
  if (s.current.has(n)) if (e && r !== s.current.get(n)) s.current.set(n, r);
@@ -461,330 +461,330 @@ function sn() {
461
461
  else if (t.length > 0) {
462
462
  s.activate();
463
463
  var r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
464
- for (var a of t) dn(a, n, r, i);
465
- if (M(Yt, s).length > 0) {
464
+ for (var a of t) fn(a, n, r, i);
465
+ if (j(Xt, s).length > 0) {
466
466
  s.apply();
467
- for (var o of M(Yt, s)) j(en, s, an).call(s, o, [], []);
468
- N(Yt, s, []);
467
+ for (var o of j(Xt, s)) A(tn, s, on).call(s, o, [], []);
468
+ M(Xt, s, []);
469
469
  }
470
470
  s.deactivate();
471
471
  }
472
472
  }
473
473
  }
474
- function cn() {
474
+ function ln() {
475
475
  try {
476
- Ye();
476
+ Xe();
477
477
  } catch (e) {
478
- Tt(e, Lt);
478
+ Et(e, Rt);
479
479
  }
480
480
  }
481
- var ln = null;
482
- function un(e) {
481
+ var un = null;
482
+ function dn(e) {
483
483
  var t = e.length;
484
484
  if (t !== 0) {
485
485
  for (var n = 0; n < t;) {
486
486
  var r = e[n++];
487
- if (!(r.f & 24576) && hi(r) && (ln = /* @__PURE__ */ new Set(), bi(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && qr(r), ln?.size > 0)) {
488
- rr.clear();
489
- for (let e of ln) {
487
+ if (!(r.f & 24576) && hi(r) && (un = /* @__PURE__ */ new Set(), bi(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && qr(r), un?.size > 0)) {
488
+ ir.clear();
489
+ for (let e of un) {
490
490
  if (e.f & 24576) continue;
491
491
  let t = [e], n = e.parent;
492
- for (; n !== null;) ln.has(n) && (ln.delete(n), t.push(n)), n = n.parent;
492
+ for (; n !== null;) un.has(n) && (un.delete(n), t.push(n)), n = n.parent;
493
493
  for (let e = t.length - 1; e >= 0; e--) {
494
494
  let n = t[e];
495
495
  n.f & 24576 || bi(n);
496
496
  }
497
497
  }
498
- ln.clear();
498
+ un.clear();
499
499
  }
500
500
  }
501
- ln = null;
501
+ un = null;
502
502
  }
503
503
  }
504
- function dn(e, t, n, r) {
504
+ function fn(e, t, n, r) {
505
505
  if (!n.has(e) && (n.add(e), e.reactions !== null)) for (let i of e.reactions) {
506
506
  let e = i.f;
507
- e & 2 ? dn(i, t, n, r) : e & 4194320 && !(e & 2048) && fn(i, t, r) && (k(i, Te), pn(i));
507
+ e & 2 ? fn(i, t, n, r) : e & 4194320 && !(e & 2048) && pn(i, t, r) && (O(i, Ee), mn(i));
508
508
  }
509
509
  }
510
- function fn(e, t, n) {
510
+ function pn(e, t, n) {
511
511
  let r = n.get(e);
512
512
  if (r !== void 0) return r;
513
513
  if (e.deps !== null) for (let r of e.deps) {
514
- if (ce.call(t, r)) return !0;
515
- if (r.f & 2 && fn(r, t, n)) return n.set(r, !0), !0;
514
+ if (le.call(t, r)) return !0;
515
+ if (r.f & 2 && pn(r, t, n)) return n.set(r, !0), !0;
516
516
  }
517
517
  return n.set(e, !1), !1;
518
518
  }
519
- function pn(e) {
520
- P.schedule(e);
519
+ function mn(e) {
520
+ N.schedule(e);
521
521
  }
522
- function mn(e, t) {
522
+ function hn(e, t) {
523
523
  if (!(e.f & 32 && e.f & 1024)) {
524
- e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), k(e, we);
525
- for (var n = e.first; n !== null;) mn(n, t), n = n.next;
524
+ e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), O(e, Te);
525
+ for (var n = e.first; n !== null;) hn(n, t), n = n.next;
526
526
  }
527
527
  }
528
- function hn(e) {
529
- k(e, we);
530
- for (var t = e.first; t !== null;) hn(t), t = t.next;
528
+ function gn(e) {
529
+ O(e, Te);
530
+ for (var t = e.first; t !== null;) gn(t), t = t.next;
531
531
  }
532
532
  //#endregion
533
533
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/reactivity/create-subscriber.js
534
- function gn(e) {
535
- let t = 0, n = ar(0), r;
534
+ function _n(e) {
535
+ let t = 0, n = or(0), r;
536
536
  return () => {
537
- Nr() && (J(n), Br(() => (t === 0 && (r = Ci(() => e(() => lr(n)))), t += 1, () => {
538
- Ct(() => {
539
- --t, t === 0 && (r?.(), r = void 0, lr(n));
537
+ Nr() && (J(n), Br(() => (t === 0 && (r = Ci(() => e(() => ur(n)))), t += 1, () => {
538
+ wt(() => {
539
+ --t, t === 0 && (r?.(), r = void 0, ur(n));
540
540
  });
541
541
  })));
542
542
  };
543
543
  }
544
544
  //#endregion
545
545
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
546
- var _n = je | Me;
547
- function vn(e, t, n, r) {
548
- new Fn(e, t, n, r);
546
+ var vn = Me | Ne;
547
+ function yn(e, t, n, r) {
548
+ new In(e, t, n, r);
549
549
  }
550
- var yn = /* @__PURE__ */ new WeakMap(), bn = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Mn = /* @__PURE__ */ new WeakMap(), Nn = /* @__PURE__ */ new WeakMap(), Pn = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakSet(), Fn = class {
550
+ var bn = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Mn = /* @__PURE__ */ new WeakMap(), Nn = /* @__PURE__ */ new WeakMap(), Pn = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), In = class {
551
551
  constructor(e, t, n, r) {
552
- Pt(this, I), Ce(this, "parent", void 0), Ce(this, "is_pending", !1), Ce(this, "transform_error", void 0), A(this, yn, void 0), A(this, bn, w ? T : null), A(this, xn, void 0), A(this, Sn, void 0), A(this, Cn, void 0), A(this, wn, null), A(this, Tn, null), A(this, En, null), A(this, Dn, null), A(this, On, 0), A(this, kn, 0), A(this, An, !1), A(this, jn, /* @__PURE__ */ new Set()), A(this, Mn, /* @__PURE__ */ new Set()), A(this, Nn, null), A(this, Pn, gn(() => (N(Nn, this, ar(M(On, this))), () => {
553
- N(Nn, this, null);
554
- }))), N(yn, this, e), N(xn, this, t), N(Sn, this, (e) => {
552
+ Ft(this, F), we(this, "parent", void 0), we(this, "is_pending", !1), we(this, "transform_error", void 0), k(this, bn, void 0), k(this, xn, C ? w : null), k(this, Sn, void 0), k(this, Cn, void 0), k(this, wn, void 0), k(this, Tn, null), k(this, En, null), k(this, Dn, null), k(this, On, null), k(this, kn, 0), k(this, An, 0), k(this, jn, !1), k(this, Mn, /* @__PURE__ */ new Set()), k(this, Nn, /* @__PURE__ */ new Set()), k(this, Pn, null), k(this, Fn, _n(() => (M(Pn, this, or(j(kn, this))), () => {
553
+ M(Pn, this, null);
554
+ }))), M(bn, this, e), M(Sn, this, t), M(Cn, this, (e) => {
555
555
  var t = G;
556
556
  t.b = this, t.f |= 128, n(e);
557
- }), this.parent = G.b, this.transform_error = r ?? this.parent?.transform_error ?? ((e) => e), N(Cn, this, Vr(() => {
558
- if (w) {
559
- let e = M(bn, this);
560
- ct();
557
+ }), this.parent = G.b, this.transform_error = r ?? this.parent?.transform_error ?? ((e) => e), M(wn, this, Vr(() => {
558
+ if (C) {
559
+ let e = j(xn, this);
560
+ lt();
561
561
  let t = e.data === "[!";
562
562
  if (e.data.startsWith("[?")) {
563
563
  let t = JSON.parse(e.data.slice(2));
564
- j(I, this, Ln).call(this, t);
565
- } else t ? j(I, this, Rn).call(this) : j(I, this, In).call(this);
566
- } else j(I, this, zn).call(this);
567
- }, _n)), w && N(yn, this, T);
564
+ A(F, this, Rn).call(this, t);
565
+ } else t ? A(F, this, zn).call(this) : A(F, this, Ln).call(this);
566
+ } else A(F, this, Bn).call(this);
567
+ }, vn)), C && M(bn, this, w);
568
568
  }
569
569
  defer_effect(e) {
570
- kt(e, M(jn, this), M(Mn, this));
570
+ At(e, j(Mn, this), j(Nn, this));
571
571
  }
572
572
  is_rendered() {
573
573
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
574
574
  }
575
575
  has_pending_snippet() {
576
- return !!M(xn, this).pending;
576
+ return !!j(Sn, this).pending;
577
577
  }
578
578
  update_pending_count(e, t) {
579
- j(I, this, Hn).call(this, e, t), N(On, this, M(On, this) + e), !(!M(Nn, this) || M(An, this)) && (N(An, this, !0), Ct(() => {
580
- N(An, this, !1), M(Nn, this) && sr(M(Nn, this), M(On, this));
579
+ A(F, this, Un).call(this, e, t), M(kn, this, j(kn, this) + e), !(!j(Pn, this) || j(jn, this)) && (M(jn, this, !0), wt(() => {
580
+ M(jn, this, !1), j(Pn, this) && cr(j(Pn, this), j(kn, this));
581
581
  }));
582
582
  }
583
583
  get_effect_pending() {
584
- return M(Pn, this).call(this), J(M(Nn, this));
584
+ return j(Fn, this).call(this), J(j(Pn, this));
585
585
  }
586
586
  error(e) {
587
- var t = M(xn, this).onerror;
588
- let n = M(xn, this).failed;
587
+ var t = j(Sn, this).onerror;
588
+ let n = j(Sn, this).failed;
589
589
  if (!t && !n) throw e;
590
- M(wn, this) && (U(M(wn, this)), N(wn, this, null)), M(Tn, this) && (U(M(Tn, this)), N(Tn, this, null)), M(En, this) && (U(M(En, this)), N(En, this, null)), w && (E(M(bn, this)), lt(), E(ut()));
590
+ j(Tn, this) && (U(j(Tn, this)), M(Tn, this, null)), j(En, this) && (U(j(En, this)), M(En, this, null)), j(Dn, this) && (U(j(Dn, this)), M(Dn, this, null)), C && (T(j(xn, this)), ut(), T(dt()));
591
591
  var r = !1, i = !1;
592
592
  let a = () => {
593
593
  if (r) {
594
- ot();
594
+ st();
595
595
  return;
596
596
  }
597
- r = !0, i && et(), M(En, this) !== null && Jr(M(En, this), () => {
598
- N(En, this, null);
599
- }), j(I, this, Vn).call(this, () => {
600
- j(I, this, zn).call(this);
597
+ r = !0, i && tt(), j(Dn, this) !== null && Jr(j(Dn, this), () => {
598
+ M(Dn, this, null);
599
+ }), A(F, this, Hn).call(this, () => {
600
+ A(F, this, Bn).call(this);
601
601
  });
602
602
  }, o = (e) => {
603
603
  try {
604
604
  i = !0, t?.(e, a), i = !1;
605
605
  } catch (e) {
606
- Tt(e, M(Cn, this) && M(Cn, this).parent);
606
+ Et(e, j(wn, this) && j(wn, this).parent);
607
607
  }
608
- n && N(En, this, j(I, this, Vn).call(this, () => {
608
+ n && M(Dn, this, A(F, this, Hn).call(this, () => {
609
609
  try {
610
610
  return Hr(() => {
611
611
  var t = G;
612
- t.b = this, t.f |= 128, n(M(yn, this), () => e, () => a);
612
+ t.b = this, t.f |= 128, n(j(bn, this), () => e, () => a);
613
613
  });
614
614
  } catch (e) {
615
- return Tt(e, M(Cn, this).parent), null;
615
+ return Et(e, j(wn, this).parent), null;
616
616
  }
617
617
  }));
618
618
  };
619
- Ct(() => {
619
+ wt(() => {
620
620
  var t;
621
621
  try {
622
622
  t = this.transform_error(e);
623
623
  } catch (e) {
624
- Tt(e, M(Cn, this) && M(Cn, this).parent);
624
+ Et(e, j(wn, this) && j(wn, this).parent);
625
625
  return;
626
626
  }
627
- typeof t == "object" && t && typeof t.then == "function" ? t.then(o, (e) => Tt(e, M(Cn, this) && M(Cn, this).parent)) : o(t);
627
+ typeof t == "object" && t && typeof t.then == "function" ? t.then(o, (e) => Et(e, j(wn, this) && j(wn, this).parent)) : o(t);
628
628
  });
629
629
  }
630
630
  };
631
- function In() {
631
+ function Ln() {
632
632
  try {
633
- N(wn, this, Hr(() => M(Sn, this).call(this, M(yn, this))));
633
+ M(Tn, this, Hr(() => j(Cn, this).call(this, j(bn, this))));
634
634
  } catch (e) {
635
635
  this.error(e);
636
636
  }
637
637
  }
638
- function Ln(e) {
639
- let t = M(xn, this).failed;
640
- t && N(En, this, Hr(() => {
641
- t(M(yn, this), () => e, () => () => {});
638
+ function Rn(e) {
639
+ let t = j(Sn, this).failed;
640
+ t && M(Dn, this, Hr(() => {
641
+ t(j(bn, this), () => e, () => () => {});
642
642
  }));
643
643
  }
644
- function Rn() {
645
- let e = M(xn, this).pending;
646
- e && (this.is_pending = !0, N(Tn, this, Hr(() => e(M(yn, this)))), Ct(() => {
647
- var e = N(Dn, this, document.createDocumentFragment()), t = B();
648
- e.append(t), N(wn, this, j(I, this, Vn).call(this, () => Hr(() => M(Sn, this).call(this, t)))), M(kn, this) === 0 && (M(yn, this).before(e), N(Dn, this, null), Jr(M(Tn, this), () => {
649
- N(Tn, this, null);
650
- }), j(I, this, Bn).call(this, P));
644
+ function zn() {
645
+ let e = j(Sn, this).pending;
646
+ e && (this.is_pending = !0, M(En, this, Hr(() => e(j(bn, this)))), wt(() => {
647
+ var e = M(On, this, document.createDocumentFragment()), t = z();
648
+ e.append(t), M(Tn, this, A(F, this, Hn).call(this, () => Hr(() => j(Cn, this).call(this, t)))), j(An, this) === 0 && (j(bn, this).before(e), M(On, this, null), Jr(j(En, this), () => {
649
+ M(En, this, null);
650
+ }), A(F, this, Vn).call(this, N));
651
651
  }));
652
652
  }
653
- function zn() {
653
+ function Bn() {
654
654
  try {
655
- if (this.is_pending = this.has_pending_snippet(), N(kn, this, 0), N(On, this, 0), N(wn, this, Hr(() => {
656
- M(Sn, this).call(this, M(yn, this));
657
- })), M(kn, this) > 0) {
658
- var e = N(Dn, this, document.createDocumentFragment());
659
- Qr(M(wn, this), e);
660
- let t = M(xn, this).pending;
661
- N(Tn, this, Hr(() => t(M(yn, this))));
662
- } else j(I, this, Bn).call(this, P);
655
+ if (this.is_pending = this.has_pending_snippet(), M(An, this, 0), M(kn, this, 0), M(Tn, this, Hr(() => {
656
+ j(Cn, this).call(this, j(bn, this));
657
+ })), j(An, this) > 0) {
658
+ var e = M(On, this, document.createDocumentFragment());
659
+ Qr(j(Tn, this), e);
660
+ let t = j(Sn, this).pending;
661
+ M(En, this, Hr(() => t(j(bn, this))));
662
+ } else A(F, this, Vn).call(this, N);
663
663
  } catch (e) {
664
664
  this.error(e);
665
665
  }
666
666
  }
667
- function Bn(e) {
668
- this.is_pending = !1, e.transfer_effects(M(jn, this), M(Mn, this));
669
- }
670
667
  function Vn(e) {
671
- var t = G, n = W, r = O;
672
- ai(M(Cn, this)), ii(M(Cn, this)), _t(M(Cn, this).ctx);
668
+ this.is_pending = !1, e.transfer_effects(j(Mn, this), j(Nn, this));
669
+ }
670
+ function Hn(e) {
671
+ var t = G, n = W, r = D;
672
+ ai(j(wn, this)), ii(j(wn, this)), vt(j(wn, this).ctx);
673
673
  try {
674
- return tn.ensure(), e();
674
+ return nn.ensure(), e();
675
675
  } catch (e) {
676
- return wt(e), null;
676
+ return Tt(e), null;
677
677
  } finally {
678
- ai(t), ii(n), _t(r);
678
+ ai(t), ii(n), vt(r);
679
679
  }
680
680
  }
681
- function Hn(e, t) {
681
+ function Un(e, t) {
682
682
  if (!this.has_pending_snippet()) {
683
683
  if (this.parent) {
684
684
  var n;
685
- j(I, n = this.parent, Hn).call(n, e, t);
685
+ A(F, n = this.parent, Un).call(n, e, t);
686
686
  }
687
687
  return;
688
688
  }
689
- N(kn, this, M(kn, this) + e), M(kn, this) === 0 && (j(I, this, Bn).call(this, t), M(Tn, this) && Jr(M(Tn, this), () => {
690
- N(Tn, this, null);
691
- }), M(Dn, this) && (M(yn, this).before(M(Dn, this)), N(Dn, this, null)));
689
+ M(An, this, j(An, this) + e), j(An, this) === 0 && (A(F, this, Vn).call(this, t), j(En, this) && Jr(j(En, this), () => {
690
+ M(En, this, null);
691
+ }), j(On, this) && (j(bn, this).before(j(On, this)), M(On, this, null)));
692
692
  }
693
693
  //#endregion
694
694
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/async.js
695
- function Un(e, t, n, r) {
696
- let i = bt() ? qn : Yn;
695
+ function Wn(e, t, n, r) {
696
+ let i = xt() ? Jn : Xn;
697
697
  var a = e.filter((e) => !e.settled);
698
698
  if (n.length === 0 && a.length === 0) {
699
699
  r(t.map(i));
700
700
  return;
701
701
  }
702
- var o = G, s = Wn(), c = a.length === 1 ? a[0].promise : a.length > 1 ? Promise.all(a.map((e) => e.promise)) : null;
702
+ var o = G, s = Gn(), c = a.length === 1 ? a[0].promise : a.length > 1 ? Promise.all(a.map((e) => e.promise)) : null;
703
703
  function l(e) {
704
704
  s();
705
705
  try {
706
706
  r(e);
707
707
  } catch (e) {
708
- o.f & 16384 || Tt(e, o);
708
+ o.f & 16384 || Et(e, o);
709
709
  }
710
- Gn();
710
+ Kn();
711
711
  }
712
712
  if (n.length === 0) {
713
713
  c.then(() => l(t.map(i)));
714
714
  return;
715
715
  }
716
- var u = Kn();
716
+ var u = qn();
717
717
  function d() {
718
- Promise.all(n.map((e) => /* @__PURE__ */ Jn(e))).then((e) => l([...t.map(i), ...e])).catch((e) => Tt(e, o)).finally(() => u());
718
+ Promise.all(n.map((e) => /* @__PURE__ */ Yn(e))).then((e) => l([...t.map(i), ...e])).catch((e) => Et(e, o)).finally(() => u());
719
719
  }
720
720
  c ? c.then(() => {
721
- s(), d(), Gn();
721
+ s(), d(), Kn();
722
722
  }) : d();
723
723
  }
724
- function Wn() {
725
- var e = G, t = W, n = O, r = P;
724
+ function Gn() {
725
+ var e = G, t = W, n = D, r = N;
726
726
  return function(i = !0) {
727
- ai(e), ii(t), _t(n), i && !(e.f & 16384) && (r?.activate(), r?.apply());
727
+ ai(e), ii(t), vt(n), i && !(e.f & 16384) && (r?.activate(), r?.apply());
728
728
  };
729
729
  }
730
- function Gn(e = !0) {
731
- ai(null), ii(null), _t(null), e && P?.deactivate();
730
+ function Kn(e = !0) {
731
+ ai(null), ii(null), vt(null), e && N?.deactivate();
732
732
  }
733
- function Kn() {
734
- var e = G.b, t = P, n = e.is_rendered();
733
+ function qn() {
734
+ var e = G.b, t = N, n = e.is_rendered();
735
735
  return e.update_pending_count(1, t), t.increment(n), (r = !1) => {
736
736
  e.update_pending_count(-1, t), t.decrement(n, r);
737
737
  };
738
738
  }
739
739
  /* @__NO_SIDE_EFFECTS__ */
740
- function qn(e) {
741
- var t = 2 | Te, n = W !== null && W.f & 2 ? W : null;
742
- return G !== null && (G.f |= Me), {
743
- ctx: O,
740
+ function Jn(e) {
741
+ var t = 2 | Ee, n = W !== null && W.f & 2 ? W : null;
742
+ return G !== null && (G.f |= Ne), {
743
+ ctx: D,
744
744
  deps: null,
745
745
  effects: null,
746
- equals: ft,
746
+ equals: pt,
747
747
  f: t,
748
748
  fn: e,
749
749
  reactions: null,
750
750
  rv: 0,
751
- v: C,
751
+ v: S,
752
752
  wv: 0,
753
753
  parent: n ?? G,
754
754
  ac: null
755
755
  };
756
756
  }
757
757
  /* @__NO_SIDE_EFFECTS__ */
758
- function Jn(e, t, n) {
758
+ function Yn(e, t, n) {
759
759
  let r = G;
760
- r === null && We();
761
- var i = void 0, a = ar(C), o = !W, s = /* @__PURE__ */ new Map();
760
+ r === null && Ge();
761
+ var i = void 0, a = or(S), o = !W, s = /* @__PURE__ */ new Map();
762
762
  return zr(() => {
763
- var t = G, n = ye();
763
+ var t = G, n = be();
764
764
  i = n.promise;
765
765
  try {
766
- Promise.resolve(e()).then(n.resolve, n.reject).finally(Gn);
766
+ Promise.resolve(e()).then(n.resolve, n.reject).finally(Kn);
767
767
  } catch (e) {
768
- n.reject(e), Gn();
768
+ n.reject(e), Kn();
769
769
  }
770
- var c = P;
770
+ var c = N;
771
771
  if (o) {
772
- if (t.f & 32768) var l = Kn();
773
- if (r.b.is_rendered()) s.get(c)?.reject(He), s.delete(c);
772
+ if (t.f & 32768) var l = qn();
773
+ if (r.b.is_rendered()) s.get(c)?.reject(Ue), s.delete(c);
774
774
  else {
775
- for (let e of s.values()) e.reject(He);
775
+ for (let e of s.values()) e.reject(Ue);
776
776
  s.clear();
777
777
  }
778
778
  s.set(c, n);
779
779
  }
780
780
  let u = (e, n = void 0) => {
781
- if (l && l(n === He), !(n === He || t.f & 16384)) {
782
- if (c.activate(), n) a.f |= Re, sr(a, n);
781
+ if (l && l(n === Ue), !(n === Ue || t.f & 16384)) {
782
+ if (c.activate(), n) a.f |= ze, cr(a, n);
783
783
  else {
784
- a.f & 8388608 && (a.f ^= Re), sr(a, e);
784
+ a.f & 8388608 && (a.f ^= ze), cr(a, e);
785
785
  for (let [e, t] of s) {
786
786
  if (s.delete(e), e === c) break;
787
- t.reject(He);
787
+ t.reject(Ue);
788
788
  }
789
789
  }
790
790
  c.deactivate();
@@ -792,7 +792,7 @@ function Jn(e, t, n) {
792
792
  };
793
793
  n.promise.then(u, (e) => u(null, e || "unknown"));
794
794
  }), Pr(() => {
795
- for (let e of s.values()) e.reject(He);
795
+ for (let e of s.values()) e.reject(Ue);
796
796
  }), new Promise((e) => {
797
797
  function t(n) {
798
798
  function r() {
@@ -804,156 +804,156 @@ function Jn(e, t, n) {
804
804
  });
805
805
  }
806
806
  /* @__NO_SIDE_EFFECTS__ */
807
- function L(e) {
808
- let t = /* @__PURE__ */ qn(e);
809
- return ht || si(t), t;
807
+ function I(e) {
808
+ let t = /* @__PURE__ */ Jn(e);
809
+ return gt || si(t), t;
810
810
  }
811
811
  /* @__NO_SIDE_EFFECTS__ */
812
- function Yn(e) {
813
- let t = /* @__PURE__ */ qn(e);
814
- return t.equals = mt, t;
815
- }
816
812
  function Xn(e) {
813
+ let t = /* @__PURE__ */ Jn(e);
814
+ return t.equals = ht, t;
815
+ }
816
+ function Zn(e) {
817
817
  var t = e.effects;
818
818
  if (t !== null) {
819
819
  e.effects = null;
820
820
  for (var n = 0; n < t.length; n += 1) U(t[n]);
821
821
  }
822
822
  }
823
- function Zn(e) {
823
+ function Qn(e) {
824
824
  for (var t = e.parent; t !== null;) {
825
825
  if (!(t.f & 2)) return t.f & 16384 ? null : t;
826
826
  t = t.parent;
827
827
  }
828
828
  return null;
829
829
  }
830
- function Qn(e) {
830
+ function $n(e) {
831
831
  var t, n = G;
832
- ai(Zn(e));
832
+ ai(Qn(e));
833
833
  try {
834
- e.f &= ~Fe, Xn(e), t = _i(e);
834
+ e.f &= ~Ie, Zn(e), t = _i(e);
835
835
  } finally {
836
836
  ai(n);
837
837
  }
838
838
  return t;
839
839
  }
840
- function $n(e) {
841
- var t = e.v, n = Qn(e);
842
- if (!e.equals(n) && (e.wv = mi(), (!P?.is_fork || e.deps === null) && (e.v = n, P?.capture(e, t), e.deps === null))) {
843
- k(e, we);
840
+ function er(e) {
841
+ var t = e.v, n = $n(e);
842
+ if (!e.equals(n) && (e.wv = mi(), (!N?.is_fork || e.deps === null) && (e.v = n, N?.capture(e, t), e.deps === null))) {
843
+ O(e, Te);
844
844
  return;
845
845
  }
846
- ti || (F === null ? Dt(e) : (Nr() || P?.is_fork) && F.set(e, n));
847
- }
848
- function er(e) {
849
- if (e.effects !== null) for (let t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(He), t.teardown = _e, t.ac = null, yi(t, 0), Wr(t));
846
+ ti || (P === null ? Ot(e) : (Nr() || N?.is_fork) && P.set(e, n));
850
847
  }
851
848
  function tr(e) {
849
+ if (e.effects !== null) for (let t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Ue), t.teardown = ve, t.ac = null, yi(t, 0), Wr(t));
850
+ }
851
+ function nr(e) {
852
852
  if (e.effects !== null) for (let t of e.effects) t.teardown && bi(t);
853
853
  }
854
854
  //#endregion
855
855
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/sources.js
856
- var nr = /* @__PURE__ */ new Set(), rr = /* @__PURE__ */ new Map(), ir = !1;
857
- function ar(e, t) {
856
+ var rr = /* @__PURE__ */ new Set(), ir = /* @__PURE__ */ new Map(), ar = !1;
857
+ function or(e, t) {
858
858
  return {
859
859
  f: 0,
860
860
  v: e,
861
861
  reactions: null,
862
- equals: ft,
862
+ equals: pt,
863
863
  rv: 0,
864
864
  wv: 0
865
865
  };
866
866
  }
867
867
  /* @__NO_SIDE_EFFECTS__ */
868
- function R(e, t) {
869
- let n = ar(e, t);
868
+ function L(e, t) {
869
+ let n = or(e, t);
870
870
  return si(n), n;
871
871
  }
872
872
  /* @__NO_SIDE_EFFECTS__ */
873
- function or(e, t = !1, n = !0) {
874
- let r = ar(e);
875
- if (t || (r.equals = mt), gt && n && O !== null && O.l !== null) {
873
+ function sr(e, t = !1, n = !0) {
874
+ let r = or(e);
875
+ if (t || (r.equals = ht), _t && n && D !== null && D.l !== null) {
876
876
  var i;
877
- ((i = O.l).s ?? (i.s = [])).push(r);
877
+ ((i = D.l).s ?? (i.s = [])).push(r);
878
878
  }
879
879
  return r;
880
880
  }
881
- function z(e, t, n = !1) {
882
- return W !== null && (!ri || W.f & 131072) && bt() && W.f & 4325394 && (oi === null || !ce.call(oi, e)) && $e(), sr(e, n ? dr(t) : t, Vt);
881
+ function R(e, t, n = !1) {
882
+ return W !== null && (!ri || W.f & 131072) && xt() && W.f & 4325394 && (oi === null || !le.call(oi, e)) && et(), cr(e, n ? fr(t) : t, Ht);
883
883
  }
884
- function sr(e, t, n = null) {
884
+ function cr(e, t, n = null) {
885
885
  if (!e.equals(t)) {
886
886
  var r = e.v;
887
- ti ? rr.set(e, t) : rr.set(e, r), e.v = t;
888
- var i = tn.ensure();
887
+ ti ? ir.set(e, t) : ir.set(e, r), e.v = t;
888
+ var i = nn.ensure();
889
889
  if (i.capture(e, r), e.f & 2) {
890
890
  let t = e;
891
- e.f & 2048 && Qn(t), F === null && Dt(t);
891
+ e.f & 2048 && $n(t), P === null && Ot(t);
892
892
  }
893
- e.wv = mi(), ur(e, Te, n), bt() && G !== null && G.f & 1024 && !(G.f & 96) && (ci === null ? li([e]) : ci.push(e)), !i.is_fork && nr.size > 0 && !ir && cr();
893
+ e.wv = mi(), dr(e, Ee, n), xt() && G !== null && G.f & 1024 && !(G.f & 96) && (ci === null ? li([e]) : ci.push(e)), !i.is_fork && rr.size > 0 && !ar && lr();
894
894
  }
895
895
  return t;
896
896
  }
897
- function cr() {
898
- ir = !1;
899
- for (let e of nr) e.f & 1024 && k(e, Ee), hi(e) && bi(e);
900
- nr.clear();
897
+ function lr() {
898
+ ar = !1;
899
+ for (let e of rr) e.f & 1024 && O(e, De), hi(e) && bi(e);
900
+ rr.clear();
901
901
  }
902
- function lr(e) {
903
- z(e, e.v + 1);
902
+ function ur(e) {
903
+ R(e, e.v + 1);
904
904
  }
905
- function ur(e, t, n) {
905
+ function dr(e, t, n) {
906
906
  var r = e.reactions;
907
- if (r !== null) for (var i = bt(), a = r.length, o = 0; o < a; o++) {
907
+ if (r !== null) for (var i = xt(), a = r.length, o = 0; o < a; o++) {
908
908
  var s = r[o], c = s.f;
909
909
  if (!(!i && s === G)) {
910
- var l = (c & Te) === 0;
911
- if (l && k(s, t), c & 2) {
910
+ var l = (c & Ee) === 0;
911
+ if (l && O(s, t), c & 2) {
912
912
  var u = s;
913
- F?.delete(u), c & 65536 || (c & 512 && (s.f |= Fe), ur(u, Ee, n));
913
+ P?.delete(u), c & 65536 || (c & 512 && (s.f |= Ie), dr(u, De, n));
914
914
  } else if (l) {
915
915
  var d = s;
916
- c & 16 && ln !== null && ln.add(d), n === null ? pn(d) : n.push(d);
916
+ c & 16 && un !== null && un.add(d), n === null ? mn(d) : n.push(d);
917
917
  }
918
918
  }
919
919
  }
920
920
  }
921
- function dr(e) {
922
- if (typeof e != "object" || !e || ze in e) return e;
923
- let t = he(e);
924
- if (t !== pe && t !== me) return e;
925
- var n = /* @__PURE__ */ new Map(), r = oe(e), i = /* @__PURE__ */ R(0), a = null, o = fi, s = (e) => {
921
+ function fr(e) {
922
+ if (typeof e != "object" || !e || Be in e) return e;
923
+ let t = ge(e);
924
+ if (t !== me && t !== he) return e;
925
+ var n = /* @__PURE__ */ new Map(), r = se(e), i = /* @__PURE__ */ L(0), a = null, o = fi, s = (e) => {
926
926
  if (fi === o) return e();
927
927
  var t = W, n = fi;
928
928
  ii(null), pi(o);
929
929
  var r = e();
930
930
  return ii(t), pi(n), r;
931
931
  };
932
- return r && n.set("length", /* @__PURE__ */ R(e.length, a)), new Proxy(e, {
932
+ return r && n.set("length", /* @__PURE__ */ L(e.length, a)), new Proxy(e, {
933
933
  defineProperty(e, t, r) {
934
- (!("value" in r) || r.configurable === !1 || r.enumerable === !1 || r.writable === !1) && Ze();
934
+ (!("value" in r) || r.configurable === !1 || r.enumerable === !1 || r.writable === !1) && Qe();
935
935
  var i = n.get(t);
936
936
  return i === void 0 ? s(() => {
937
- var e = /* @__PURE__ */ R(r.value, a);
937
+ var e = /* @__PURE__ */ L(r.value, a);
938
938
  return n.set(t, e), e;
939
- }) : z(i, r.value, !0), !0;
939
+ }) : R(i, r.value, !0), !0;
940
940
  },
941
941
  deleteProperty(e, t) {
942
942
  var r = n.get(t);
943
943
  if (r === void 0) {
944
944
  if (t in e) {
945
- let e = s(() => /* @__PURE__ */ R(C, a));
946
- n.set(t, e), lr(i);
945
+ let e = s(() => /* @__PURE__ */ L(S, a));
946
+ n.set(t, e), ur(i);
947
947
  }
948
- } else z(r, C), lr(i);
948
+ } else R(r, S), ur(i);
949
949
  return !0;
950
950
  },
951
951
  get(t, r, i) {
952
- if (r === ze) return e;
952
+ if (r === Be) return e;
953
953
  var o = n.get(r), c = r in t;
954
- if (o === void 0 && (!c || de(t, r)?.writable) && (o = s(() => /* @__PURE__ */ R(dr(c ? t[r] : C), a)), n.set(r, o)), o !== void 0) {
954
+ if (o === void 0 && (!c || fe(t, r)?.writable) && (o = s(() => /* @__PURE__ */ L(fr(c ? t[r] : S), a)), n.set(r, o)), o !== void 0) {
955
955
  var l = J(o);
956
- return l === C ? void 0 : l;
956
+ return l === S ? void 0 : l;
957
957
  }
958
958
  return Reflect.get(t, r, i);
959
959
  },
@@ -964,7 +964,7 @@ function dr(e) {
964
964
  i && (r.value = J(i));
965
965
  } else if (r === void 0) {
966
966
  var a = n.get(t), o = a?.v;
967
- if (a !== void 0 && o !== C) return {
967
+ if (a !== void 0 && o !== S) return {
968
968
  enumerable: !0,
969
969
  configurable: !0,
970
970
  value: o,
@@ -974,29 +974,29 @@ function dr(e) {
974
974
  return r;
975
975
  },
976
976
  has(e, t) {
977
- if (t === ze) return !0;
978
- var r = n.get(t), i = r !== void 0 && r.v !== C || Reflect.has(e, t);
979
- return (r !== void 0 || G !== null && (!i || de(e, t)?.writable)) && (r === void 0 && (r = s(() => /* @__PURE__ */ R(i ? dr(e[t]) : C, a)), n.set(t, r)), J(r) === C) ? !1 : i;
977
+ if (t === Be) return !0;
978
+ var r = n.get(t), i = r !== void 0 && r.v !== S || Reflect.has(e, t);
979
+ return (r !== void 0 || G !== null && (!i || fe(e, t)?.writable)) && (r === void 0 && (r = s(() => /* @__PURE__ */ L(i ? fr(e[t]) : S, a)), n.set(t, r)), J(r) === S) ? !1 : i;
980
980
  },
981
981
  set(e, t, o, c) {
982
982
  var l = n.get(t), u = t in e;
983
983
  if (r && t === "length") for (var d = o; d < l.v; d += 1) {
984
984
  var f = n.get(d + "");
985
- f === void 0 ? d in e && (f = s(() => /* @__PURE__ */ R(C, a)), n.set(d + "", f)) : z(f, C);
985
+ f === void 0 ? d in e && (f = s(() => /* @__PURE__ */ L(S, a)), n.set(d + "", f)) : R(f, S);
986
986
  }
987
- if (l === void 0) (!u || de(e, t)?.writable) && (l = s(() => /* @__PURE__ */ R(void 0, a)), z(l, dr(o)), n.set(t, l));
987
+ if (l === void 0) (!u || fe(e, t)?.writable) && (l = s(() => /* @__PURE__ */ L(void 0, a)), R(l, fr(o)), n.set(t, l));
988
988
  else {
989
- u = l.v !== C;
990
- var p = s(() => dr(o));
991
- z(l, p);
989
+ u = l.v !== S;
990
+ var p = s(() => fr(o));
991
+ R(l, p);
992
992
  }
993
993
  var m = Reflect.getOwnPropertyDescriptor(e, t);
994
994
  if (m?.set && m.set.call(c, o), !u) {
995
995
  if (r && typeof t == "string") {
996
996
  var h = n.get("length"), g = Number(t);
997
- Number.isInteger(g) && g >= h.v && z(h, g + 1);
997
+ Number.isInteger(g) && g >= h.v && R(h, g + 1);
998
998
  }
999
- lr(i);
999
+ ur(i);
1000
1000
  }
1001
1001
  return !0;
1002
1002
  },
@@ -1004,86 +1004,86 @@ function dr(e) {
1004
1004
  J(i);
1005
1005
  var t = Reflect.ownKeys(e).filter((e) => {
1006
1006
  var t = n.get(e);
1007
- return t === void 0 || t.v !== C;
1007
+ return t === void 0 || t.v !== S;
1008
1008
  });
1009
- for (var [r, a] of n) a.v !== C && !(r in e) && t.push(r);
1009
+ for (var [r, a] of n) a.v !== S && !(r in e) && t.push(r);
1010
1010
  return t;
1011
1011
  },
1012
1012
  setPrototypeOf() {
1013
- Qe();
1013
+ $e();
1014
1014
  }
1015
1015
  });
1016
1016
  }
1017
- function fr(e) {
1017
+ function pr(e) {
1018
1018
  try {
1019
- if (typeof e == "object" && e && ze in e) return e[ze];
1019
+ if (typeof e == "object" && e && Be in e) return e[Be];
1020
1020
  } catch {}
1021
1021
  return e;
1022
1022
  }
1023
- function pr(e, t) {
1024
- return Object.is(fr(e), fr(t));
1023
+ function mr(e, t) {
1024
+ return Object.is(pr(e), pr(t));
1025
1025
  }
1026
- var mr, hr, gr, _r;
1027
- function vr() {
1028
- if (mr === void 0) {
1029
- mr = window, hr = /Firefox/.test(navigator.userAgent);
1026
+ var hr, gr, _r, vr;
1027
+ function yr() {
1028
+ if (hr === void 0) {
1029
+ hr = window, gr = /Firefox/.test(navigator.userAgent);
1030
1030
  var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1031
- gr = de(t, "firstChild").get, _r = de(t, "nextSibling").get, ge(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), ge(n) && (n.__t = void 0);
1031
+ _r = fe(t, "firstChild").get, vr = fe(t, "nextSibling").get, _e(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), _e(n) && (n.__t = void 0);
1032
1032
  }
1033
1033
  }
1034
- function B(e = "") {
1034
+ function z(e = "") {
1035
1035
  return document.createTextNode(e);
1036
1036
  }
1037
1037
  /* @__NO_SIDE_EFFECTS__ */
1038
- function yr(e) {
1039
- return gr.call(e);
1038
+ function B(e) {
1039
+ return _r.call(e);
1040
1040
  }
1041
1041
  /* @__NO_SIDE_EFFECTS__ */
1042
1042
  function br(e) {
1043
- return _r.call(e);
1043
+ return vr.call(e);
1044
1044
  }
1045
1045
  function V(e, t) {
1046
- if (!w) return /* @__PURE__ */ yr(e);
1047
- var n = /* @__PURE__ */ yr(T);
1048
- if (n === null) n = T.appendChild(B());
1046
+ if (!C) return /* @__PURE__ */ B(e);
1047
+ var n = /* @__PURE__ */ B(w);
1048
+ if (n === null) n = w.appendChild(z());
1049
1049
  else if (t && n.nodeType !== 3) {
1050
- var r = B();
1051
- return n?.before(r), E(r), r;
1050
+ var r = z();
1051
+ return n?.before(r), T(r), r;
1052
1052
  }
1053
- return t && Er(n), E(n), n;
1053
+ return t && Er(n), T(n), n;
1054
1054
  }
1055
1055
  function xr(e, t = !1) {
1056
- if (!w) {
1057
- var n = /* @__PURE__ */ yr(e);
1056
+ if (!C) {
1057
+ var n = /* @__PURE__ */ B(e);
1058
1058
  return n instanceof Comment && n.data === "" ? /* @__PURE__ */ br(n) : n;
1059
1059
  }
1060
1060
  if (t) {
1061
- if (T?.nodeType !== 3) {
1062
- var r = B();
1063
- return T?.before(r), E(r), r;
1061
+ if (w?.nodeType !== 3) {
1062
+ var r = z();
1063
+ return w?.before(r), T(r), r;
1064
1064
  }
1065
- Er(T);
1065
+ Er(w);
1066
1066
  }
1067
- return T;
1067
+ return w;
1068
1068
  }
1069
1069
  function Sr(e, t = 1, n = !1) {
1070
- let r = w ? T : e;
1070
+ let r = C ? w : e;
1071
1071
  for (var i; t--;) i = r, r = /* @__PURE__ */ br(r);
1072
- if (!w) return r;
1072
+ if (!C) return r;
1073
1073
  if (n) {
1074
1074
  if (r?.nodeType !== 3) {
1075
- var a = B();
1076
- return r === null ? i?.after(a) : r.before(a), E(a), a;
1075
+ var a = z();
1076
+ return r === null ? i?.after(a) : r.before(a), T(a), a;
1077
1077
  }
1078
1078
  Er(r);
1079
1079
  }
1080
- return E(r), r;
1080
+ return T(r), r;
1081
1081
  }
1082
1082
  function Cr(e) {
1083
1083
  e.textContent = "";
1084
1084
  }
1085
1085
  function wr() {
1086
- return !ht || ln !== null ? !1 : (G.f & ke) !== 0;
1086
+ return !gt || un !== null ? !1 : (G.f & Ae) !== 0;
1087
1087
  }
1088
1088
  function Tr(e, t, n) {
1089
1089
  let r = n ? { is: n } : void 0;
@@ -1118,7 +1118,7 @@ function kr(e) {
1118
1118
  //#endregion
1119
1119
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/effects.js
1120
1120
  function Ar(e) {
1121
- G === null && (W === null && Je(e), qe()), ti && Ke(e);
1121
+ G === null && (W === null && Ye(e), Je()), ti && qe(e);
1122
1122
  }
1123
1123
  function jr(e, t) {
1124
1124
  var n = t.last;
@@ -1126,12 +1126,12 @@ function jr(e, t) {
1126
1126
  }
1127
1127
  function Mr(e, t) {
1128
1128
  var n = G;
1129
- n !== null && n.f & 8192 && (e |= De);
1129
+ n !== null && n.f & 8192 && (e |= Oe);
1130
1130
  var r = {
1131
- ctx: O,
1131
+ ctx: D,
1132
1132
  deps: null,
1133
1133
  nodes: null,
1134
- f: e | Te | 512,
1134
+ f: e | Ee | 512,
1135
1135
  first: null,
1136
1136
  fn: t,
1137
1137
  last: null,
@@ -1143,14 +1143,14 @@ function Mr(e, t) {
1143
1143
  wv: 0,
1144
1144
  ac: null
1145
1145
  }, i = r;
1146
- if (e & 4) Bt === null ? tn.ensure().schedule(r) : Bt.push(r);
1146
+ if (e & 4) Vt === null ? nn.ensure().schedule(r) : Vt.push(r);
1147
1147
  else if (t !== null) {
1148
1148
  try {
1149
1149
  bi(r);
1150
1150
  } catch (e) {
1151
1151
  throw U(r), e;
1152
1152
  }
1153
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, e & 16 && e & 65536 && i !== null && (i.f |= je));
1153
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, e & 16 && e & 65536 && i !== null && (i.f |= Me));
1154
1154
  }
1155
1155
  if (i !== null && (i.parent = n, n !== null && jr(i, n), W !== null && W.f & 2 && !(e & 64))) {
1156
1156
  var a = W;
@@ -1163,22 +1163,22 @@ function Nr() {
1163
1163
  }
1164
1164
  function Pr(e) {
1165
1165
  let t = Mr(8, null);
1166
- return k(t, we), t.teardown = e, t;
1166
+ return O(t, Te), t.teardown = e, t;
1167
1167
  }
1168
1168
  function Fr(e) {
1169
1169
  Ar("$effect");
1170
1170
  var t = G.f;
1171
1171
  if (!W && t & 32 && !(t & 32768)) {
1172
- var n = O;
1172
+ var n = D;
1173
1173
  (n.e ?? (n.e = [])).push(e);
1174
1174
  } else return Ir(e);
1175
1175
  }
1176
1176
  function Ir(e) {
1177
- return Mr(4 | Ne, e);
1177
+ return Mr(4 | Pe, e);
1178
1178
  }
1179
1179
  function Lr(e) {
1180
- tn.ensure();
1181
- let t = Mr(64 | Me, e);
1180
+ nn.ensure();
1181
+ let t = Mr(64 | Ne, e);
1182
1182
  return (e = {}) => new Promise((n) => {
1183
1183
  e.outro ? Jr(t, () => {
1184
1184
  U(t), n(void 0);
@@ -1189,13 +1189,13 @@ function Rr(e) {
1189
1189
  return Mr(4, e);
1190
1190
  }
1191
1191
  function zr(e) {
1192
- return Mr(Le | Me, e);
1192
+ return Mr(Re | Ne, e);
1193
1193
  }
1194
1194
  function Br(e, t = 0) {
1195
1195
  return Mr(8 | t, e);
1196
1196
  }
1197
1197
  function H(e, t = [], n = [], r = []) {
1198
- Un(r, t, n, (t) => {
1198
+ Wn(r, t, n, (t) => {
1199
1199
  Mr(8, () => e(...t.map(J)));
1200
1200
  });
1201
1201
  }
@@ -1203,7 +1203,7 @@ function Vr(e, t = 0) {
1203
1203
  return Mr(16 | t, e);
1204
1204
  }
1205
1205
  function Hr(e) {
1206
- return Mr(32 | Me, e);
1206
+ return Mr(32 | Ne, e);
1207
1207
  }
1208
1208
  function Ur(e) {
1209
1209
  var t = e.teardown;
@@ -1222,7 +1222,7 @@ function Wr(e, t = !1) {
1222
1222
  for (e.first = e.last = null; n !== null;) {
1223
1223
  let e = n.ac;
1224
1224
  e !== null && kr(() => {
1225
- e.abort(He);
1225
+ e.abort(Ue);
1226
1226
  });
1227
1227
  var r = n.next;
1228
1228
  n.f & 64 ? n.parent = null : U(n, t), n = r;
@@ -1236,10 +1236,10 @@ function Gr(e) {
1236
1236
  }
1237
1237
  function U(e, t = !0) {
1238
1238
  var n = !1;
1239
- (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (Kr(e.nodes.start, e.nodes.end), n = !0), k(e, Ae), Wr(e, t && !n), yi(e, 0);
1239
+ (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (Kr(e.nodes.start, e.nodes.end), n = !0), O(e, je), Wr(e, t && !n), yi(e, 0);
1240
1240
  var r = e.nodes && e.nodes.t;
1241
1241
  if (r !== null) for (let e of r) e.stop();
1242
- Ur(e), e.f ^= Ae, e.f |= Oe;
1242
+ Ur(e), e.f ^= je, e.f |= ke;
1243
1243
  var i = e.parent;
1244
1244
  i !== null && i.first !== null && qr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1245
1245
  }
@@ -1266,7 +1266,7 @@ function Jr(e, t, n = !0) {
1266
1266
  }
1267
1267
  function Yr(e, t, n) {
1268
1268
  if (!(e.f & 8192)) {
1269
- e.f ^= De;
1269
+ e.f ^= Oe;
1270
1270
  var r = e.nodes && e.nodes.t;
1271
1271
  if (r !== null) for (let e of r) (e.is_global || n) && t.push(e);
1272
1272
  for (var i = e.first; i !== null;) {
@@ -1280,7 +1280,7 @@ function Xr(e) {
1280
1280
  }
1281
1281
  function Zr(e, t) {
1282
1282
  if (e.f & 8192) {
1283
- e.f ^= De, e.f & 1024 || (k(e, Te), tn.ensure().schedule(e));
1283
+ e.f ^= Oe, e.f & 1024 || (O(e, Ee), nn.ensure().schedule(e));
1284
1284
  for (var n = e.first; n !== null;) {
1285
1285
  var r = n.next, i = (n.f & 65536) != 0 || (n.f & 32) != 0;
1286
1286
  Zr(n, i ? t : !1), n = r;
@@ -1311,7 +1311,7 @@ function ai(e) {
1311
1311
  }
1312
1312
  var oi = null;
1313
1313
  function si(e) {
1314
- W !== null && (!ht || W.f & 2) && (oi === null ? oi = [e] : oi.push(e));
1314
+ W !== null && (!gt || W.f & 2) && (oi === null ? oi = [e] : oi.push(e));
1315
1315
  }
1316
1316
  var K = null, q = 0, ci = null;
1317
1317
  function li(e) {
@@ -1327,32 +1327,32 @@ function mi() {
1327
1327
  function hi(e) {
1328
1328
  var t = e.f;
1329
1329
  if (t & 2048) return !0;
1330
- if (t & 2 && (e.f &= ~Fe), t & 4096) {
1330
+ if (t & 2 && (e.f &= ~Ie), t & 4096) {
1331
1331
  for (var n = e.deps, r = n.length, i = 0; i < r; i++) {
1332
1332
  var a = n[i];
1333
- if (hi(a) && $n(a), a.wv > e.wv) return !0;
1333
+ if (hi(a) && er(a), a.wv > e.wv) return !0;
1334
1334
  }
1335
- t & 512 && F === null && k(e, we);
1335
+ t & 512 && P === null && O(e, Te);
1336
1336
  }
1337
1337
  return !1;
1338
1338
  }
1339
1339
  function gi(e, t, n = !0) {
1340
1340
  var r = e.reactions;
1341
- if (r !== null && !(!ht && oi !== null && ce.call(oi, e))) for (var i = 0; i < r.length; i++) {
1341
+ if (r !== null && !(!gt && oi !== null && le.call(oi, e))) for (var i = 0; i < r.length; i++) {
1342
1342
  var a = r[i];
1343
- a.f & 2 ? gi(a, t, !1) : t === a && (n ? k(a, Te) : a.f & 1024 && k(a, Ee), pn(a));
1343
+ a.f & 2 ? gi(a, t, !1) : t === a && (n ? O(a, Ee) : a.f & 1024 && O(a, De), mn(a));
1344
1344
  }
1345
1345
  }
1346
1346
  function _i(e) {
1347
- var t = K, n = q, r = ci, i = W, a = oi, o = O, s = ri, c = fi, l = e.f;
1348
- K = null, q = 0, ci = null, W = l & 96 ? null : e, oi = null, _t(e.ctx), ri = !1, fi = ++di, e.ac !== null && (kr(() => {
1349
- e.ac.abort(He);
1347
+ var t = K, n = q, r = ci, i = W, a = oi, o = D, s = ri, c = fi, l = e.f;
1348
+ K = null, q = 0, ci = null, W = l & 96 ? null : e, oi = null, vt(e.ctx), ri = !1, fi = ++di, e.ac !== null && (kr(() => {
1349
+ e.ac.abort(Ue);
1350
1350
  }), e.ac = null);
1351
1351
  try {
1352
- e.f |= Ie;
1352
+ e.f |= Le;
1353
1353
  var u = e.fn, d = u();
1354
- e.f |= ke;
1355
- var f = e.deps, p = P?.is_fork;
1354
+ e.f |= Ae;
1355
+ var f = e.deps, p = N?.is_fork;
1356
1356
  if (K !== null) {
1357
1357
  var m;
1358
1358
  if (p || yi(e, q), f !== null && q > 0) for (f.length = q + K.length, m = 0; m < K.length; m++) f[q + m] = K[m];
@@ -1362,31 +1362,31 @@ function _i(e) {
1362
1362
  ((h = f[m]).reactions ?? (h.reactions = [])).push(e);
1363
1363
  }
1364
1364
  } else !p && f !== null && q < f.length && (yi(e, q), f.length = q);
1365
- if (bt() && ci !== null && !ri && f !== null && !(e.f & 6146)) for (m = 0; m < ci.length; m++) gi(ci[m], e);
1365
+ if (xt() && ci !== null && !ri && f !== null && !(e.f & 6146)) for (m = 0; m < ci.length; m++) gi(ci[m], e);
1366
1366
  if (i !== null && i !== e) {
1367
1367
  if (di++, i.deps !== null) for (let e = 0; e < n; e += 1) i.deps[e].rv = di;
1368
1368
  if (t !== null) for (let e of t) e.rv = di;
1369
1369
  ci !== null && (r === null ? r = ci : r.push(...ci));
1370
1370
  }
1371
- return e.f & 8388608 && (e.f ^= Re), d;
1371
+ return e.f & 8388608 && (e.f ^= ze), d;
1372
1372
  } catch (e) {
1373
- return wt(e);
1373
+ return Tt(e);
1374
1374
  } finally {
1375
- e.f ^= Ie, K = t, q = n, ci = r, W = i, oi = a, _t(o), ri = s, fi = c;
1375
+ e.f ^= Le, K = t, q = n, ci = r, W = i, oi = a, vt(o), ri = s, fi = c;
1376
1376
  }
1377
1377
  }
1378
1378
  function vi(e, t) {
1379
1379
  let n = t.reactions;
1380
1380
  if (n !== null) {
1381
- var r = se.call(n, e);
1381
+ var r = ce.call(n, e);
1382
1382
  if (r !== -1) {
1383
1383
  var i = n.length - 1;
1384
1384
  i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
1385
1385
  }
1386
1386
  }
1387
- if (n === null && t.f & 2 && (K === null || !ce.call(K, t))) {
1387
+ if (n === null && t.f & 2 && (K === null || !le.call(K, t))) {
1388
1388
  var a = t;
1389
- a.f & 512 && (a.f ^= 512, a.f &= ~Fe), Dt(a), er(a), yi(a, 0);
1389
+ a.f & 512 && (a.f ^= 512, a.f &= ~Ie), Ot(a), tr(a), yi(a, 0);
1390
1390
  }
1391
1391
  }
1392
1392
  function yi(e, t) {
@@ -1396,7 +1396,7 @@ function yi(e, t) {
1396
1396
  function bi(e) {
1397
1397
  var t = e.f;
1398
1398
  if (!(t & 16384)) {
1399
- k(e, we);
1399
+ O(e, Te);
1400
1400
  var n = G, r = ei;
1401
1401
  G = e, ei = !0;
1402
1402
  try {
@@ -1410,37 +1410,37 @@ function bi(e) {
1410
1410
  }
1411
1411
  function J(e) {
1412
1412
  var t = (e.f & 2) != 0;
1413
- if ($r?.add(e), W !== null && !ri && !(G !== null && G.f & 16384) && (oi === null || !ce.call(oi, e))) {
1413
+ if ($r?.add(e), W !== null && !ri && !(G !== null && G.f & 16384) && (oi === null || !le.call(oi, e))) {
1414
1414
  var n = W.deps;
1415
1415
  if (W.f & 2097152) e.rv < di && (e.rv = di, K === null && n !== null && n[q] === e ? q++ : K === null ? K = [e] : K.push(e));
1416
1416
  else {
1417
1417
  var r;
1418
1418
  ((r = W).deps ?? (r.deps = [])).push(e);
1419
1419
  var i = e.reactions;
1420
- i === null ? e.reactions = [W] : ce.call(i, W) || i.push(W);
1420
+ i === null ? e.reactions = [W] : le.call(i, W) || i.push(W);
1421
1421
  }
1422
1422
  }
1423
- if (ti && rr.has(e)) return rr.get(e);
1423
+ if (ti && ir.has(e)) return ir.get(e);
1424
1424
  if (t) {
1425
1425
  var a = e;
1426
1426
  if (ti) {
1427
1427
  var o = a.v;
1428
- return (!(a.f & 1024) && a.reactions !== null || Si(a)) && (o = Qn(a)), rr.set(a, o), o;
1428
+ return (!(a.f & 1024) && a.reactions !== null || Si(a)) && (o = $n(a)), ir.set(a, o), o;
1429
1429
  }
1430
- var s = (a.f & 512) == 0 && !ri && W !== null && (ei || (W.f & 512) != 0), c = (a.f & ke) === 0;
1431
- hi(a) && (s && (a.f |= 512), $n(a)), s && !c && (tr(a), xi(a));
1430
+ var s = (a.f & 512) == 0 && !ri && W !== null && (ei || (W.f & 512) != 0), c = (a.f & Ae) === 0;
1431
+ hi(a) && (s && (a.f |= 512), er(a)), s && !c && (nr(a), xi(a));
1432
1432
  }
1433
- if (F?.has(e)) return F.get(e);
1433
+ if (P?.has(e)) return P.get(e);
1434
1434
  if (e.f & 8388608) throw e.v;
1435
1435
  return e.v;
1436
1436
  }
1437
1437
  function xi(e) {
1438
- if (e.f |= 512, e.deps !== null) for (let t of e.deps) (t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (tr(t), xi(t));
1438
+ if (e.f |= 512, e.deps !== null) for (let t of e.deps) (t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (nr(t), xi(t));
1439
1439
  }
1440
1440
  function Si(e) {
1441
- if (e.v === C) return !0;
1441
+ if (e.v === S) return !0;
1442
1442
  if (e.deps === null) return !1;
1443
- for (let t of e.deps) if (rr.has(t) || t.f & 2 && Si(t)) return !0;
1443
+ for (let t of e.deps) if (ir.has(t) || t.f & 2 && Si(t)) return !0;
1444
1444
  return !1;
1445
1445
  }
1446
1446
  function Ci(e) {
@@ -1453,10 +1453,10 @@ function Ci(e) {
1453
1453
  }
1454
1454
  function wi(e) {
1455
1455
  if (!(typeof e != "object" || !e || e instanceof EventTarget)) {
1456
- if (ze in e) Ti(e);
1456
+ if (Be in e) Ti(e);
1457
1457
  else if (!Array.isArray(e)) for (let t in e) {
1458
1458
  let n = e[t];
1459
- typeof n == "object" && n && ze in n && Ti(n);
1459
+ typeof n == "object" && n && Be in n && Ti(n);
1460
1460
  }
1461
1461
  }
1462
1462
  }
@@ -1466,9 +1466,9 @@ function Ti(e, t = /* @__PURE__ */ new Set()) {
1466
1466
  for (let n in e) try {
1467
1467
  Ti(e[n], t);
1468
1468
  } catch {}
1469
- let n = he(e);
1469
+ let n = ge(e);
1470
1470
  if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) {
1471
- let t = fe(n);
1471
+ let t = pe(n);
1472
1472
  for (let n in t) {
1473
1473
  let r = t[n].get;
1474
1474
  if (r) try {
@@ -1499,7 +1499,7 @@ function Ni(e, t, n, r = {}) {
1499
1499
  function i(e) {
1500
1500
  if (r.capture || Ri.call(t, e), !e.cancelBubble) return kr(() => n?.call(this, e));
1501
1501
  }
1502
- return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? Ct(() => {
1502
+ return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? wt(() => {
1503
1503
  t.addEventListener(e, i, r);
1504
1504
  }) : t.addEventListener(e, i, r), i;
1505
1505
  }
@@ -1535,7 +1535,7 @@ function Ri(e) {
1535
1535
  c <= l && (o = c);
1536
1536
  }
1537
1537
  if (a = i[o] || e.target, a !== t) {
1538
- ue(e, "currentTarget", {
1538
+ de(e, "currentTarget", {
1539
1539
  configurable: !0,
1540
1540
  get() {
1541
1541
  return a || n;
@@ -1591,25 +1591,25 @@ function Hi(e, t) {
1591
1591
  function Y(e, t) {
1592
1592
  var n = (t & 1) != 0, r = (t & 2) != 0, i, a = !e.startsWith("<!>");
1593
1593
  return () => {
1594
- if (w) return Hi(T, null), T;
1595
- i === void 0 && (i = Vi(a ? e : "<!>" + e), n || (i = /* @__PURE__ */ yr(i)));
1596
- var t = r || hr ? document.importNode(i, !0) : i.cloneNode(!0);
1594
+ if (C) return Hi(w, null), w;
1595
+ i === void 0 && (i = Vi(a ? e : "<!>" + e), n || (i = /* @__PURE__ */ B(i)));
1596
+ var t = r || gr ? document.importNode(i, !0) : i.cloneNode(!0);
1597
1597
  if (n) {
1598
- var o = /* @__PURE__ */ yr(t), s = t.lastChild;
1598
+ var o = /* @__PURE__ */ B(t), s = t.lastChild;
1599
1599
  Hi(o, s);
1600
1600
  } else Hi(t, t);
1601
1601
  return t;
1602
1602
  };
1603
1603
  }
1604
1604
  function Ui() {
1605
- if (w) return Hi(T, null), T;
1606
- var e = document.createDocumentFragment(), t = document.createComment(""), n = B();
1605
+ if (C) return Hi(w, null), w;
1606
+ var e = document.createDocumentFragment(), t = document.createComment(""), n = z();
1607
1607
  return e.append(t, n), Hi(t, n), e;
1608
1608
  }
1609
1609
  function X(e, t) {
1610
- if (w) {
1610
+ if (C) {
1611
1611
  var n = G;
1612
- (!(n.f & 32768) || n.nodes.end === null) && (n.nodes.end = T), ct();
1612
+ (!(n.f & 32768) || n.nodes.end === null) && (n.nodes.end = w), lt();
1613
1613
  return;
1614
1614
  }
1615
1615
  e !== null && e.before(t);
@@ -1623,14 +1623,14 @@ function Gi(e, t) {
1623
1623
  }
1624
1624
  var Ki = /* @__PURE__ */ new Map();
1625
1625
  function qi(e, { target: t, anchor: n, props: r = {}, events: i, context: a, intro: o = !0, transformError: s }) {
1626
- vr();
1626
+ yr();
1627
1627
  var c = void 0, l = Lr(() => {
1628
- var o = n ?? t.appendChild(B());
1629
- vn(o, { pending: () => {} }, (t) => {
1630
- vt({});
1631
- var n = O;
1632
- if (a && (n.c = a), i && (r.$$events = i), w && Hi(t, null), c = e(t, r) || {}, w && (G.nodes.end = T, T === null || T.nodeType !== 8 || T.data !== "]")) throw it(), tt;
1633
- yt();
1628
+ var o = n ?? t.appendChild(z());
1629
+ yn(o, { pending: () => {} }, (t) => {
1630
+ yt({});
1631
+ var n = D;
1632
+ if (a && (n.c = a), i && (r.$$events = i), C && Hi(t, null), c = e(t, r) || {}, C && (G.nodes.end = w, w === null || w.nodeType !== 8 || w.data !== "]")) throw at(), nt;
1633
+ bt();
1634
1634
  }, s);
1635
1635
  var l = /* @__PURE__ */ new Set(), u = (e) => {
1636
1636
  for (var n = 0; n < e.length; n++) {
@@ -1647,7 +1647,7 @@ function qi(e, { target: t, anchor: n, props: r = {}, events: i, context: a, int
1647
1647
  }
1648
1648
  }
1649
1649
  };
1650
- return u(le(ji)), Mi.add(u), () => {
1650
+ return u(ue(ji)), Mi.add(u), () => {
1651
1651
  for (var e of l) for (let n of [t, document]) {
1652
1652
  var r = Ki.get(n), i = r.get(e);
1653
1653
  --i == 0 ? (n.removeEventListener(e, Ri), r.delete(e), r.size === 0 && Ki.delete(n)) : r.set(e, i);
@@ -1666,68 +1666,68 @@ function Yi(e, t) {
1666
1666
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/blocks/branches.js
1667
1667
  var Xi = /* @__PURE__ */ new WeakMap(), Zi = /* @__PURE__ */ new WeakMap(), Qi = /* @__PURE__ */ new WeakMap(), $i = /* @__PURE__ */ new WeakMap(), ea = /* @__PURE__ */ new WeakMap(), ta = /* @__PURE__ */ new WeakMap(), na = /* @__PURE__ */ new WeakMap(), ra = class {
1668
1668
  constructor(e, t = !0) {
1669
- Ce(this, "anchor", void 0), A(this, Xi, /* @__PURE__ */ new Map()), A(this, Zi, /* @__PURE__ */ new Map()), A(this, Qi, /* @__PURE__ */ new Map()), A(this, $i, /* @__PURE__ */ new Set()), A(this, ea, !0), A(this, ta, (e) => {
1670
- if (M(Xi, this).has(e)) {
1671
- var t = M(Xi, this).get(e), n = M(Zi, this).get(t);
1672
- if (n) Xr(n), M($i, this).delete(t);
1669
+ we(this, "anchor", void 0), k(this, Xi, /* @__PURE__ */ new Map()), k(this, Zi, /* @__PURE__ */ new Map()), k(this, Qi, /* @__PURE__ */ new Map()), k(this, $i, /* @__PURE__ */ new Set()), k(this, ea, !0), k(this, ta, (e) => {
1670
+ if (j(Xi, this).has(e)) {
1671
+ var t = j(Xi, this).get(e), n = j(Zi, this).get(t);
1672
+ if (n) Xr(n), j($i, this).delete(t);
1673
1673
  else {
1674
- var r = M(Qi, this).get(t);
1675
- r && (M(Zi, this).set(t, r.effect), M(Qi, this).delete(t), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), n = r.effect);
1674
+ var r = j(Qi, this).get(t);
1675
+ r && (j(Zi, this).set(t, r.effect), j(Qi, this).delete(t), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), n = r.effect);
1676
1676
  }
1677
- for (let [t, n] of M(Xi, this)) {
1678
- if (M(Xi, this).delete(t), t === e) break;
1679
- let r = M(Qi, this).get(n);
1680
- r && (U(r.effect), M(Qi, this).delete(n));
1677
+ for (let [t, n] of j(Xi, this)) {
1678
+ if (j(Xi, this).delete(t), t === e) break;
1679
+ let r = j(Qi, this).get(n);
1680
+ r && (U(r.effect), j(Qi, this).delete(n));
1681
1681
  }
1682
- for (let [e, r] of M(Zi, this)) {
1683
- if (e === t || M($i, this).has(e)) continue;
1682
+ for (let [e, r] of j(Zi, this)) {
1683
+ if (e === t || j($i, this).has(e)) continue;
1684
1684
  let i = () => {
1685
- if (Array.from(M(Xi, this).values()).includes(e)) {
1685
+ if (Array.from(j(Xi, this).values()).includes(e)) {
1686
1686
  var t = document.createDocumentFragment();
1687
- Qr(r, t), t.append(B()), M(Qi, this).set(e, {
1687
+ Qr(r, t), t.append(z()), j(Qi, this).set(e, {
1688
1688
  effect: r,
1689
1689
  fragment: t
1690
1690
  });
1691
1691
  } else U(r);
1692
- M($i, this).delete(e), M(Zi, this).delete(e);
1692
+ j($i, this).delete(e), j(Zi, this).delete(e);
1693
1693
  };
1694
- M(ea, this) || !n ? (M($i, this).add(e), Jr(r, i, !1)) : i();
1694
+ j(ea, this) || !n ? (j($i, this).add(e), Jr(r, i, !1)) : i();
1695
1695
  }
1696
1696
  }
1697
- }), A(this, na, (e) => {
1698
- M(Xi, this).delete(e);
1699
- let t = Array.from(M(Xi, this).values());
1700
- for (let [e, n] of M(Qi, this)) t.includes(e) || (U(n.effect), M(Qi, this).delete(e));
1701
- }), this.anchor = e, N(ea, this, t);
1697
+ }), k(this, na, (e) => {
1698
+ j(Xi, this).delete(e);
1699
+ let t = Array.from(j(Xi, this).values());
1700
+ for (let [e, n] of j(Qi, this)) t.includes(e) || (U(n.effect), j(Qi, this).delete(e));
1701
+ }), this.anchor = e, M(ea, this, t);
1702
1702
  }
1703
1703
  ensure(e, t) {
1704
- var n = P, r = wr();
1705
- if (t && !M(Zi, this).has(e) && !M(Qi, this).has(e)) if (r) {
1706
- var i = document.createDocumentFragment(), a = B();
1707
- i.append(a), M(Qi, this).set(e, {
1704
+ var n = N, r = wr();
1705
+ if (t && !j(Zi, this).has(e) && !j(Qi, this).has(e)) if (r) {
1706
+ var i = document.createDocumentFragment(), a = z();
1707
+ i.append(a), j(Qi, this).set(e, {
1708
1708
  effect: Hr(() => t(a)),
1709
1709
  fragment: i
1710
1710
  });
1711
- } else M(Zi, this).set(e, Hr(() => t(this.anchor)));
1712
- if (M(Xi, this).set(n, e), r) {
1713
- for (let [t, r] of M(Zi, this)) t === e ? n.unskip_effect(r) : n.skip_effect(r);
1714
- for (let [t, r] of M(Qi, this)) t === e ? n.unskip_effect(r.effect) : n.skip_effect(r.effect);
1715
- n.oncommit(M(ta, this)), n.ondiscard(M(na, this));
1716
- } else w && (this.anchor = T), M(ta, this).call(this, n);
1711
+ } else j(Zi, this).set(e, Hr(() => t(this.anchor)));
1712
+ if (j(Xi, this).set(n, e), r) {
1713
+ for (let [t, r] of j(Zi, this)) t === e ? n.unskip_effect(r) : n.skip_effect(r);
1714
+ for (let [t, r] of j(Qi, this)) t === e ? n.unskip_effect(r.effect) : n.skip_effect(r.effect);
1715
+ n.oncommit(j(ta, this)), n.ondiscard(j(na, this));
1716
+ } else C && (this.anchor = w), j(ta, this).call(this, n);
1717
1717
  }
1718
1718
  };
1719
1719
  //#endregion
1720
1720
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/blocks/if.js
1721
1721
  function ia(e, t, n = !1) {
1722
1722
  var r;
1723
- w && (r = T, ct());
1724
- var i = new ra(e), a = n ? je : 0;
1723
+ C && (r = w, lt());
1724
+ var i = new ra(e), a = n ? Me : 0;
1725
1725
  function o(e, t) {
1726
- if (w) {
1727
- var n = dt(r);
1726
+ if (C) {
1727
+ var n = ft(r);
1728
1728
  if (e !== parseInt(n.substring(1))) {
1729
- var a = ut();
1730
- E(a), i.anchor = a, st(!1), i.ensure(e, t), st(!0);
1729
+ var a = dt();
1730
+ T(a), i.anchor = a, ct(!1), i.ensure(e, t), ct(!0);
1731
1731
  return;
1732
1732
  }
1733
1733
  }
@@ -1752,7 +1752,7 @@ function oa(e, t, n) {
1752
1752
  if (a) {
1753
1753
  if (a.pending.delete(n), a.done.add(n), a.pending.size === 0) {
1754
1754
  var t = e.outrogroups;
1755
- sa(e, le(a.done)), t.delete(a), t.size === 0 && (e.outrogroups = null);
1755
+ sa(e, ue(a.done)), t.delete(a), t.size === 0 && (e.outrogroups = null);
1756
1756
  }
1757
1757
  } else --o;
1758
1758
  }, !1);
@@ -1777,7 +1777,7 @@ function sa(e, t, n = !0) {
1777
1777
  }
1778
1778
  for (var i = 0; i < t.length; i++) {
1779
1779
  var a = t[i];
1780
- r?.has(a) ? (a.f |= Pe, Qr(a, document.createDocumentFragment())) : U(t[i], n);
1780
+ r?.has(a) ? (a.f |= Fe, Qr(a, document.createDocumentFragment())) : U(t[i], n);
1781
1781
  }
1782
1782
  }
1783
1783
  var ca;
@@ -1785,15 +1785,15 @@ function la(e, t, n, r, i, a = null) {
1785
1785
  var o = e, s = /* @__PURE__ */ new Map();
1786
1786
  if (t & 4) {
1787
1787
  var c = e;
1788
- o = w ? E(/* @__PURE__ */ yr(c)) : c.appendChild(B());
1788
+ o = C ? T(/* @__PURE__ */ B(c)) : c.appendChild(z());
1789
1789
  }
1790
- w && ct();
1791
- var l = null, u = /* @__PURE__ */ Yn(() => {
1790
+ C && lt();
1791
+ var l = null, u = /* @__PURE__ */ Xn(() => {
1792
1792
  var e = n();
1793
- return oe(e) ? e : e == null ? [] : le(e);
1793
+ return se(e) ? e : e == null ? [] : ue(e);
1794
1794
  }), d, f = /* @__PURE__ */ new Map(), p = !0;
1795
1795
  function m(e) {
1796
- g.effect.f & 16384 || (g.pending.delete(e), g.fallback = l, da(g, d, o, t, r), l !== null && (d.length === 0 ? l.f & 33554432 ? (l.f ^= Pe, pa(l, null, o)) : Xr(l) : Jr(l, () => {
1796
+ g.effect.f & 16384 || (g.pending.delete(e), g.fallback = l, da(g, d, o, t, r), l !== null && (d.length === 0 ? l.f & 33554432 ? (l.f ^= Fe, pa(l, null, o)) : Xr(l) : Jr(l, () => {
1797
1797
  l = null;
1798
1798
  })));
1799
1799
  }
@@ -1805,17 +1805,17 @@ function la(e, t, n, r, i, a = null) {
1805
1805
  d = J(u);
1806
1806
  var e = d.length;
1807
1807
  let c = !1;
1808
- w && dt(o) === "[!" != (e === 0) && (o = ut(), E(o), st(!1), c = !0);
1809
- for (var g = /* @__PURE__ */ new Set(), _ = P, v = wr(), y = 0; y < e; y += 1) {
1810
- w && T.nodeType === 8 && T.data === "]" && (o = T, c = !0, st(!1));
1808
+ C && ft(o) === "[!" != (e === 0) && (o = dt(), T(o), ct(!1), c = !0);
1809
+ for (var g = /* @__PURE__ */ new Set(), _ = N, v = wr(), y = 0; y < e; y += 1) {
1810
+ C && w.nodeType === 8 && w.data === "]" && (o = w, c = !0, ct(!1));
1811
1811
  var b = d[y], ee = r(b, y), x = p ? null : s.get(ee);
1812
- x ? (x.v && sr(x.v, b), x.i && sr(x.i, y), v && _.unskip_effect(x.e)) : (x = fa(s, p ? o : ca ?? (ca = B()), b, ee, y, i, t, n), p || (x.e.f |= Pe), s.set(ee, x)), g.add(ee);
1812
+ x ? (x.v && cr(x.v, b), x.i && cr(x.i, y), v && _.unskip_effect(x.e)) : (x = fa(s, p ? o : ca ?? (ca = z()), b, ee, y, i, t, n), p || (x.e.f |= Fe), s.set(ee, x)), g.add(ee);
1813
1813
  }
1814
- if (e === 0 && a && !l && (p ? l = Hr(() => a(o)) : (l = Hr(() => a(ca ?? (ca = B()))), l.f |= Pe)), e > g.size && Ge("", "", ""), w && e > 0 && E(ut()), !p) if (f.set(_, g), v) {
1814
+ if (e === 0 && a && !l && (p ? l = Hr(() => a(o)) : (l = Hr(() => a(ca ?? (ca = z()))), l.f |= Fe)), e > g.size && Ke("", "", ""), C && e > 0 && T(dt()), !p) if (f.set(_, g), v) {
1815
1815
  for (let [e, t] of s) g.has(e) || _.skip_effect(t.e);
1816
1816
  _.oncommit(m), _.ondiscard(h);
1817
1817
  } else m(_);
1818
- c && st(!0), J(u);
1818
+ c && ct(!0), J(u);
1819
1819
  }),
1820
1820
  flags: t,
1821
1821
  items: s,
@@ -1823,7 +1823,7 @@ function la(e, t, n, r, i, a = null) {
1823
1823
  outrogroups: null,
1824
1824
  fallback: l
1825
1825
  };
1826
- p = !1, w && (o = T);
1826
+ p = !1, C && (o = w);
1827
1827
  }
1828
1828
  function ua(e) {
1829
1829
  for (; e !== null && !(e.f & 32);) e = e.next;
@@ -1834,7 +1834,7 @@ function da(e, t, n, r, i) {
1834
1834
  if (a) for (_ = 0; _ < o; _ += 1) m = t[_], h = i(m, _), g = s.get(h).e, g.f & 33554432 || (g.nodes?.a?.measure(), (d ?? (d = /* @__PURE__ */ new Set())).add(g));
1835
1835
  for (_ = 0; _ < o; _ += 1) {
1836
1836
  if (m = t[_], h = i(m, _), g = s.get(h).e, e.outrogroups !== null) for (let t of e.outrogroups) t.pending.delete(g), t.done.delete(g);
1837
- if (g.f & 8192 && (Xr(g), a && (g.nodes?.a?.unfix(), (d ?? (d = /* @__PURE__ */ new Set())).delete(g))), g.f & 33554432) if (g.f ^= Pe, g === c) pa(g, null, n);
1837
+ if (g.f & 8192 && (Xr(g), a && (g.nodes?.a?.unfix(), (d ?? (d = /* @__PURE__ */ new Set())).delete(g))), g.f & 33554432) if (g.f ^= Fe, g === c) pa(g, null, n);
1838
1838
  else {
1839
1839
  var v = u ? u.next : c;
1840
1840
  g === e.effect.last && (e.effect.last = g.prev), g.prev && (g.prev.next = g.next), g.next && (g.next.prev = g.prev), ma(e, u, g), ma(e, g, v), pa(g, v, n), u = g, f = [], p = [], c = ua(u.next);
@@ -1858,29 +1858,29 @@ function da(e, t, n, r, i) {
1858
1858
  g.f & 33554432 || f.push(g), u = g, c = ua(g.next);
1859
1859
  }
1860
1860
  if (e.outrogroups !== null) {
1861
- for (let t of e.outrogroups) t.pending.size === 0 && (sa(e, le(t.done)), e.outrogroups?.delete(t));
1861
+ for (let t of e.outrogroups) t.pending.size === 0 && (sa(e, ue(t.done)), e.outrogroups?.delete(t));
1862
1862
  e.outrogroups.size === 0 && (e.outrogroups = null);
1863
1863
  }
1864
1864
  if (c !== null || l !== void 0) {
1865
- var S = [];
1866
- if (l !== void 0) for (g of l) g.f & 8192 || S.push(g);
1867
- for (; c !== null;) !(c.f & 8192) && c !== e.fallback && S.push(c), c = ua(c.next);
1868
- var te = S.length;
1869
- if (te > 0) {
1870
- var ne = r & 4 && o === 0 ? n : null;
1865
+ var te = [];
1866
+ if (l !== void 0) for (g of l) g.f & 8192 || te.push(g);
1867
+ for (; c !== null;) !(c.f & 8192) && c !== e.fallback && te.push(c), c = ua(c.next);
1868
+ var ne = te.length;
1869
+ if (ne > 0) {
1870
+ var re = r & 4 && o === 0 ? n : null;
1871
1871
  if (a) {
1872
- for (_ = 0; _ < te; _ += 1) S[_].nodes?.a?.measure();
1873
- for (_ = 0; _ < te; _ += 1) S[_].nodes?.a?.fix();
1872
+ for (_ = 0; _ < ne; _ += 1) te[_].nodes?.a?.measure();
1873
+ for (_ = 0; _ < ne; _ += 1) te[_].nodes?.a?.fix();
1874
1874
  }
1875
- oa(e, S, ne);
1875
+ oa(e, te, re);
1876
1876
  }
1877
1877
  }
1878
- a && Ct(() => {
1878
+ a && wt(() => {
1879
1879
  if (d !== void 0) for (g of d) g.nodes?.a?.apply();
1880
1880
  });
1881
1881
  }
1882
1882
  function fa(e, t, n, r, i, a, o, s) {
1883
- var c = o & 1 ? o & 16 ? ar(n) : /* @__PURE__ */ or(n, !1, !1) : null, l = o & 2 ? ar(i) : null;
1883
+ var c = o & 1 ? o & 16 ? or(n) : /* @__PURE__ */ sr(n, !1, !1) : null, l = o & 2 ? or(i) : null;
1884
1884
  return {
1885
1885
  v: c,
1886
1886
  i: l,
@@ -1903,29 +1903,29 @@ function ha(e, t, n = !1, r = !1, i = !1, a = !1) {
1903
1903
  var o = e, s = "";
1904
1904
  if (n) {
1905
1905
  var c = e;
1906
- w && (o = E(/* @__PURE__ */ yr(c)));
1906
+ C && (o = T(/* @__PURE__ */ B(c)));
1907
1907
  }
1908
1908
  H(() => {
1909
1909
  var e = G;
1910
1910
  if (s === (s = t() ?? "")) {
1911
- w && ct();
1911
+ C && lt();
1912
1912
  return;
1913
1913
  }
1914
- if (n && !w) {
1915
- e.nodes = null, c.innerHTML = s, s !== "" && Hi(/* @__PURE__ */ yr(c), c.lastChild);
1914
+ if (n && !C) {
1915
+ e.nodes = null, c.innerHTML = s, s !== "" && Hi(/* @__PURE__ */ B(c), c.lastChild);
1916
1916
  return;
1917
1917
  }
1918
1918
  if (e.nodes !== null && (Kr(e.nodes.start, e.nodes.end), e.nodes = null), s !== "") {
1919
- if (w) {
1920
- for (var a = T.data, l = ct(), u = l; l !== null && (l.nodeType !== 8 || l.data !== "");) u = l, l = /* @__PURE__ */ br(l);
1921
- if (l === null) throw it(), tt;
1922
- Hi(T, u), o = E(l);
1919
+ if (C) {
1920
+ for (var a = w.data, l = lt(), u = l; l !== null && (l.nodeType !== 8 || l.data !== "");) u = l, l = /* @__PURE__ */ br(l);
1921
+ if (l === null) throw at(), nt;
1922
+ Hi(w, u), o = T(l);
1923
1923
  return;
1924
1924
  }
1925
- var d = Tr(r ? "svg" : i ? "math" : "template", r ? nt : i ? rt : void 0);
1925
+ var d = Tr(r ? "svg" : i ? "math" : "template", r ? rt : i ? it : void 0);
1926
1926
  d.innerHTML = s;
1927
1927
  var f = r || i ? d : d.content;
1928
- if (Hi(/* @__PURE__ */ yr(f), f.lastChild), r || i) for (; /* @__PURE__ */ yr(f);) o.before(/* @__PURE__ */ yr(f));
1928
+ if (Hi(/* @__PURE__ */ B(f), f.lastChild), r || i) for (; /* @__PURE__ */ B(f);) o.before(/* @__PURE__ */ B(f));
1929
1929
  else o.before(f);
1930
1930
  }
1931
1931
  });
@@ -1933,30 +1933,30 @@ function ha(e, t, n = !1, r = !1, i = !1, a = !1) {
1933
1933
  //#endregion
1934
1934
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js
1935
1935
  function ga(e, t, n, r, i, a) {
1936
- let o = w;
1937
- w && ct();
1936
+ let o = C;
1937
+ C && lt();
1938
1938
  var s = null;
1939
- w && T.nodeType === 1 && (s = T, ct());
1940
- var c = w ? T : e, l = new ra(c, !1);
1939
+ C && w.nodeType === 1 && (s = w, lt());
1940
+ var c = C ? w : e, l = new ra(c, !1);
1941
1941
  Vr(() => {
1942
1942
  let e = t() || null;
1943
- var a = i ? i() : n || e === "svg" ? nt : void 0;
1943
+ var a = i ? i() : n || e === "svg" ? rt : void 0;
1944
1944
  if (e === null) {
1945
1945
  l.ensure(null, null);
1946
1946
  return;
1947
1947
  }
1948
1948
  return l.ensure(e, (t) => {
1949
1949
  if (e) {
1950
- if (s = w ? s : Tr(e, a), Hi(s, s), r) {
1951
- w && ki(e) && s.append(document.createComment(""));
1952
- var n = w ? /* @__PURE__ */ yr(s) : s.appendChild(B());
1953
- w && (n === null ? st(!1) : E(n)), r(s, n);
1950
+ if (s = C ? s : Tr(e, a), Hi(s, s), r) {
1951
+ C && ki(e) && s.append(document.createComment(""));
1952
+ var n = C ? /* @__PURE__ */ B(s) : s.appendChild(z());
1953
+ C && (n === null ? ct(!1) : T(n)), r(s, n);
1954
1954
  }
1955
1955
  G.nodes.end = s, t.before(s);
1956
1956
  }
1957
- w && E(t);
1957
+ C && T(t);
1958
1958
  }), () => {};
1959
- }, je), Pr(() => {}), o && (st(!0), E(c));
1959
+ }, Me), Pr(() => {}), o && (ct(!0), T(c));
1960
1960
  }
1961
1961
  //#endregion
1962
1962
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/css.js
@@ -1978,7 +1978,7 @@ function va(e, t, n) {
1978
1978
  var i = !1, a = {};
1979
1979
  Br(() => {
1980
1980
  var e = n();
1981
- wi(e), i && pt(a, e) && (a = e, r.update(e));
1981
+ wi(e), i && mt(a, e) && (a = e, r.update(e));
1982
1982
  }), i = !0;
1983
1983
  }
1984
1984
  if (r?.destroy) return () => r.destroy();
@@ -2062,9 +2062,9 @@ function Ea(e, t) {
2062
2062
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/elements/class.js
2063
2063
  function Da(e, t, n, r, i, a) {
2064
2064
  var o = e.__className;
2065
- if (w || o !== n || o === void 0) {
2065
+ if (C || o !== n || o === void 0) {
2066
2066
  var s = Ca(n, r, a);
2067
- (!w || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : t ? e.className = s : e.setAttribute("class", s)), e.__className = n;
2067
+ (!C || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : t ? e.className = s : e.setAttribute("class", s)), e.__className = n;
2068
2068
  } else if (a && i !== a) for (var c in a) {
2069
2069
  var l = !!a[c];
2070
2070
  (i == null || l !== !!i[c]) && e.classList.toggle(c, l);
@@ -2081,9 +2081,9 @@ function Oa(e, t = {}, n, r) {
2081
2081
  }
2082
2082
  function ka(e, t, n, r) {
2083
2083
  var i = e.__style;
2084
- if (w || i !== t) {
2084
+ if (C || i !== t) {
2085
2085
  var a = Ea(t, r);
2086
- (!w || a !== e.getAttribute("style")) && (a == null ? e.removeAttribute("style") : e.style.cssText = a), e.__style = t;
2086
+ (!C || a !== e.getAttribute("style")) && (a == null ? e.removeAttribute("style") : e.style.cssText = a), e.__style = t;
2087
2087
  } else r && (Array.isArray(r) ? (Oa(e, n?.[0], r[0]), Oa(e, n?.[1], r[1], "important")) : Oa(e, n, r));
2088
2088
  return r;
2089
2089
  }
@@ -2092,11 +2092,11 @@ function ka(e, t, n, r) {
2092
2092
  function Aa(e, t, n = !1) {
2093
2093
  if (e.multiple) {
2094
2094
  if (t == null) return;
2095
- if (!oe(t)) return at();
2095
+ if (!se(t)) return ot();
2096
2096
  for (var r of e.options) r.selected = t.includes(Ma(r));
2097
2097
  return;
2098
2098
  }
2099
- for (r of e.options) if (pr(Ma(r), t)) {
2099
+ for (r of e.options) if (mr(Ma(r), t)) {
2100
2100
  r.selected = !0;
2101
2101
  return;
2102
2102
  }
@@ -2120,9 +2120,9 @@ function Ma(e) {
2120
2120
  }
2121
2121
  //#endregion
2122
2122
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/elements/attributes.js
2123
- var Na = Symbol("is custom element"), Pa = Symbol("is html"), Fa = Ue ? "link" : "LINK", Ia = Ue ? "progress" : "PROGRESS";
2123
+ var Na = Symbol("is custom element"), Pa = Symbol("is html"), Fa = We ? "link" : "LINK", Ia = We ? "progress" : "PROGRESS";
2124
2124
  function La(e) {
2125
- if (w) {
2125
+ if (C) {
2126
2126
  var t = !1, n = () => {
2127
2127
  if (!t) {
2128
2128
  if (t = !0, e.hasAttribute("value")) {
@@ -2135,7 +2135,7 @@ function La(e) {
2135
2135
  }
2136
2136
  }
2137
2137
  };
2138
- e.__on_r = n, Ct(n), Or();
2138
+ e.__on_r = n, wt(n), Or();
2139
2139
  }
2140
2140
  }
2141
2141
  function Ra(e, t) {
@@ -2144,7 +2144,7 @@ function Ra(e, t) {
2144
2144
  }
2145
2145
  function Z(e, t, n, r) {
2146
2146
  var i = za(e);
2147
- w && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Fa) || i[t] !== (i[t] = n) && (t === "loading" && (e[Ve] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && Va(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2147
+ C && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Fa) || i[t] !== (i[t] = n) && (t === "loading" && (e[He] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && Va(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2148
2148
  }
2149
2149
  function za(e) {
2150
2150
  return e.__attributes ?? (e.__attributes = {
@@ -2158,8 +2158,8 @@ function Va(e) {
2158
2158
  if (n) return n;
2159
2159
  Ba.set(t, n = []);
2160
2160
  for (var r, i = e, a = Element.prototype; a !== i;) {
2161
- for (var o in r = fe(i), r) r[o].set && n.push(o);
2162
- i = he(i);
2161
+ for (var o in r = pe(i), r) r[o].set && n.push(o);
2162
+ i = ge(i);
2163
2163
  }
2164
2164
  return n;
2165
2165
  }
@@ -2167,33 +2167,33 @@ function Va(e) {
2167
2167
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
2168
2168
  var Ha, Ua = /* @__PURE__ */ new WeakMap(), Wa = /* @__PURE__ */ new WeakMap(), Ga = /* @__PURE__ */ new WeakMap(), Ka = /* @__PURE__ */ new WeakSet(), qa = class {
2169
2169
  constructor(e) {
2170
- Pt(this, Ka), A(this, Ua, /* @__PURE__ */ new WeakMap()), A(this, Wa, void 0), A(this, Ga, void 0), N(Ga, this, e);
2170
+ Ft(this, Ka), k(this, Ua, /* @__PURE__ */ new WeakMap()), k(this, Wa, void 0), k(this, Ga, void 0), M(Ga, this, e);
2171
2171
  }
2172
2172
  observe(e, t) {
2173
- var n = M(Ua, this).get(e) || /* @__PURE__ */ new Set();
2174
- return n.add(t), M(Ua, this).set(e, n), j(Ka, this, Ja).call(this).observe(e, M(Ga, this)), () => {
2175
- var n = M(Ua, this).get(e);
2176
- n.delete(t), n.size === 0 && (M(Ua, this).delete(e), M(Wa, this).unobserve(e));
2173
+ var n = j(Ua, this).get(e) || /* @__PURE__ */ new Set();
2174
+ return n.add(t), j(Ua, this).set(e, n), A(Ka, this, Ja).call(this).observe(e, j(Ga, this)), () => {
2175
+ var n = j(Ua, this).get(e);
2176
+ n.delete(t), n.size === 0 && (j(Ua, this).delete(e), j(Wa, this).unobserve(e));
2177
2177
  };
2178
2178
  }
2179
2179
  };
2180
2180
  Ha = qa;
2181
2181
  function Ja() {
2182
- return M(Wa, this) ?? N(Wa, this, new ResizeObserver((e) => {
2182
+ return j(Wa, this) ?? M(Wa, this, new ResizeObserver((e) => {
2183
2183
  for (var t of e) {
2184
2184
  Ha.entries.set(t.target, t);
2185
- for (var n of M(Ua, this).get(t.target) || []) n(t);
2185
+ for (var n of j(Ua, this).get(t.target) || []) n(t);
2186
2186
  }
2187
2187
  }));
2188
2188
  }
2189
- Ce(qa, "entries", /* @__PURE__ */ new WeakMap());
2189
+ we(qa, "entries", /* @__PURE__ */ new WeakMap());
2190
2190
  //#endregion
2191
2191
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
2192
2192
  function Ya(e, t) {
2193
- return e === t || e?.[ze] === t;
2193
+ return e === t || e?.[Be] === t;
2194
2194
  }
2195
2195
  function Xa(e = {}, t, n, r) {
2196
- var i = O.r, a = G;
2196
+ var i = D.r, a = G;
2197
2197
  return Rr(() => {
2198
2198
  var o, s;
2199
2199
  return Br(() => {
@@ -2215,14 +2215,14 @@ function Xa(e = {}, t, n, r) {
2215
2215
  //#endregion
2216
2216
  //#region ../../node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/props.js
2217
2217
  function Q(e, t, n, r) {
2218
- var i = !gt || (n & 2) != 0, a = (n & 8) != 0, o = (n & 16) != 0, s = r, c = !0, l = () => (c && (c = !1, s = o ? Ci(r) : r), s);
2218
+ var i = !_t || (n & 2) != 0, a = (n & 8) != 0, o = (n & 16) != 0, s = r, c = !0, l = () => (c && (c = !1, s = o ? Ci(r) : r), s);
2219
2219
  let u;
2220
2220
  if (a) {
2221
- var d = ze in e || Be in e;
2222
- u = de(e, t)?.set ?? (d && t in e ? (n) => e[t] = n : void 0);
2221
+ var d = Be in e || Ve in e;
2222
+ u = fe(e, t)?.set ?? (d && t in e ? (n) => e[t] = n : void 0);
2223
2223
  }
2224
2224
  var f, p = !1;
2225
- a ? [f, p] = Mt(() => e[t]) : f = e[t], f === void 0 && r !== void 0 && (f = l(), u && (i && Xe(t), u(f)));
2225
+ a ? [f, p] = Nt(() => e[t]) : f = e[t], f === void 0 && r !== void 0 && (f = l(), u && (i && Ze(t), u(f)));
2226
2226
  var m = i ? () => {
2227
2227
  var n = e[t];
2228
2228
  return n === void 0 ? l() : (c = !0, n);
@@ -2237,13 +2237,13 @@ function Q(e, t, n, r) {
2237
2237
  return arguments.length > 0 ? ((!i || !t || h || p) && u(t ? m() : e), e) : m();
2238
2238
  });
2239
2239
  }
2240
- var g = !1, _ = (n & 1 ? qn : Yn)(() => (g = !1, m()));
2240
+ var g = !1, _ = (n & 1 ? Jn : Xn)(() => (g = !1, m()));
2241
2241
  a && J(_);
2242
2242
  var v = G;
2243
2243
  return (function(e, t) {
2244
2244
  if (arguments.length > 0) {
2245
- let n = t ? J(_) : i && a ? dr(e) : e;
2246
- return z(_, n), g = !0, s !== void 0 && (s = n), e;
2245
+ let n = t ? J(_) : i && a ? fr(e) : e;
2246
+ return R(_, n), g = !0, s !== void 0 && (s = n), e;
2247
2247
  }
2248
2248
  return ti && g || v.f & 16384 ? _.v : J(_);
2249
2249
  });
@@ -2968,7 +2968,7 @@ function Oo(e, t) {
2968
2968
  let t = globalThis.TextEncoder;
2969
2969
  if ((t ? new t().encode(e).byteLength : e.length * 2) > n.maxHtmlBytes) return "";
2970
2970
  }
2971
- let r = re(e, { comment: !1 }), i = r.childNodes.filter((e) => e.rawTagName), a = {
2971
+ let r = ie(e, { comment: !1 }), i = r.childNodes.filter((e) => e.rawTagName), a = {
2972
2972
  enabled: n.enabled,
2973
2973
  nodes: 0,
2974
2974
  maxNodes: n.maxHtmlNodes,
@@ -3648,7 +3648,7 @@ var Lo = class {
3648
3648
  return this.extractionRoot = e.querySelector?.(t) ?? null, this.extractionRoot;
3649
3649
  }
3650
3650
  getExtractionDocument() {
3651
- return this.extractionDocument || (no(this.itemXml, this.security), this.extractionDocument = re(this.itemXml, {
3651
+ return this.extractionDocument || (no(this.itemXml, this.security), this.extractionDocument = ie(this.itemXml, {
3652
3652
  lowerCaseTagName: !1,
3653
3653
  comment: !1
3654
3654
  })), this.extractionDocument;
@@ -4010,23 +4010,30 @@ function cs(e) {
4010
4010
  }
4011
4011
  //#endregion
4012
4012
  //#region src/pnp/applyPnp.ts
4013
- var ls = "data-qti-colorscheme";
4014
- function us(e, t) {
4013
+ var ls = "data-qti-colorscheme", us = "data-qti-magnification";
4014
+ function ds(e, t) {
4015
4015
  let n = t?.display?.colorScheme;
4016
- !n || n === "default" ? e.removeAttribute(ls) : e.setAttribute(ls, n), t?.display?.magnification !== void 0 && console.warn("[QTI Player] PnpProfile.display.magnification is not yet applied by the player. Use browser zoom or a host stylesheet instead.");
4016
+ !n || n === "default" ? e.removeAttribute(ls) : e.setAttribute(ls, n);
4017
+ let r = t?.display?.magnification;
4018
+ r !== void 0 && Number.isFinite(r) && r > 0 ? (e.setAttribute(us, String(r)), e.style?.setProperty?.("--qti-magnification", String(r))) : (e.removeAttribute(us), e.style?.removeProperty?.("--qti-magnification"));
4017
4019
  }
4018
4020
  //#endregion
4019
4021
  //#region src/catalog/catalogExtractor.ts
4020
- function ds(e) {
4021
- let t = re(e, { lowerCaseTagName: !0 }).querySelector("qti-catalog-info");
4022
- return t ? ps(t) : /* @__PURE__ */ new Map();
4022
+ function fs(e) {
4023
+ if (!e.trim()) return /* @__PURE__ */ new Map();
4024
+ let t = ie(`<root>${e}</root>`, { lowerCaseTagName: !0 }).querySelector("qti-catalog-info");
4025
+ return t ? hs(t) : /* @__PURE__ */ new Map();
4023
4026
  }
4024
- function fs(e, t) {
4027
+ function ps(e) {
4028
+ let t = ie(e, { lowerCaseTagName: !0 }).querySelector("qti-catalog-info");
4029
+ return t ? hs(t) : /* @__PURE__ */ new Map();
4030
+ }
4031
+ function ms(e, t) {
4025
4032
  let n = new Map(e);
4026
4033
  for (let [e, r] of t) n.set(e, r);
4027
4034
  return n;
4028
4035
  }
4029
- function ps(e) {
4036
+ function hs(e) {
4030
4037
  let t = /* @__PURE__ */ new Map();
4031
4038
  for (let n of e.querySelectorAll("qti-catalog")) {
4032
4039
  let e = n.getAttribute("id") ?? n.getAttribute("identifier");
@@ -4034,14 +4041,14 @@ function ps(e) {
4034
4041
  let r = [];
4035
4042
  for (let e of n.querySelectorAll("qti-card")) {
4036
4043
  let t = e.getAttribute("support") ?? e.getAttribute("usage");
4037
- for (let n of ms(e, t ?? void 0)) r.push(n);
4044
+ for (let n of gs(e, t ?? void 0)) r.push(n);
4038
4045
  }
4039
4046
  r.length > 0 && t.set(e, { entries: r });
4040
4047
  }
4041
4048
  for (let n of e.querySelectorAll("qti-card")) {
4042
4049
  let e = n.getAttribute("identifier");
4043
4050
  if (!e) continue;
4044
- let r = ms(n);
4051
+ let r = gs(n);
4045
4052
  if (r.length > 0) {
4046
4053
  let n = t.get(e);
4047
4054
  n ? n.entries.push(...r) : t.set(e, { entries: r });
@@ -4049,35 +4056,35 @@ function ps(e) {
4049
4056
  }
4050
4057
  return t;
4051
4058
  }
4052
- function ms(e, t) {
4059
+ function gs(e, t) {
4053
4060
  let n = e.querySelectorAll("qti-card-entry"), r = [];
4054
4061
  if (n.length > 0) {
4055
4062
  for (let e of n) {
4056
4063
  let n = e.getAttribute("usage") ?? e.getAttribute("data-reading-type") ?? t;
4057
4064
  n && r.push({
4058
4065
  usage: n,
4059
- lang: hs(e),
4060
- html: gs(e)
4066
+ lang: _s(e),
4067
+ html: vs(e)
4061
4068
  });
4062
4069
  }
4063
4070
  return r;
4064
4071
  }
4065
4072
  return t && r.push({
4066
4073
  usage: t,
4067
- lang: hs(e),
4068
- html: gs(e)
4074
+ lang: _s(e),
4075
+ html: vs(e)
4069
4076
  }), r;
4070
4077
  }
4071
- function hs(e) {
4078
+ function _s(e) {
4072
4079
  return e.getAttribute("xml:lang") ?? e.getAttribute("xmllang") ?? e.getAttribute("lang") ?? void 0;
4073
4080
  }
4074
- function gs(e) {
4081
+ function vs(e) {
4075
4082
  let t = e.querySelector("qti-html-content"), n = e.querySelector("qti-file-href");
4076
4083
  return t ? t.innerHTML ?? t.text ?? "" : n ? n.getAttribute("src") ?? n.text?.trim() ?? "" : "";
4077
4084
  }
4078
4085
  //#endregion
4079
4086
  //#region src/catalog/catalogLookup.ts
4080
- function _s(e, t, n, r) {
4087
+ function ys(e, t, n, r) {
4081
4088
  let i = e.get(t);
4082
4089
  if (!i) return null;
4083
4090
  let a = i.entries.filter((e) => e.usage === n);
@@ -4093,7 +4100,7 @@ function _s(e, t, n, r) {
4093
4100
  }
4094
4101
  //#endregion
4095
4102
  //#region src/pci/types.ts
4096
- var vs = class extends Error {
4103
+ var bs = class extends Error {
4097
4104
  constructor(e, t, n) {
4098
4105
  super(t ? `PCI module failed to load from '${e}' and fallback '${t}'` : `PCI module failed to load from '${e}'`), this.primaryPath = e, this.fallbackPath = t, this.name = "PciLoadError", n && Object.defineProperty(this, "cause", {
4099
4106
  value: n,
@@ -4101,7 +4108,7 @@ var vs = class extends Error {
4101
4108
  configurable: !0
4102
4109
  });
4103
4110
  }
4104
- }, ys = class {
4111
+ }, xs = class {
4105
4112
  constructor(e, t) {
4106
4113
  this.module = null, this._response = null, this._onResponseChange = null, this.data = e, this.baseUrl = t;
4107
4114
  }
@@ -4115,14 +4122,14 @@ var vs = class extends Error {
4115
4122
  this.module = this.extractPciInterface(t);
4116
4123
  return;
4117
4124
  } catch (e) {
4118
- if (!this.data.fallbackPath) throw new vs(this.data.primaryPath, void 0, e);
4125
+ if (!this.data.fallbackPath) throw new bs(this.data.primaryPath, void 0, e);
4119
4126
  }
4120
4127
  let t = this.resolveUrl(this.data.fallbackPath);
4121
4128
  try {
4122
4129
  let e = await this.dynamicImport(t);
4123
4130
  this.module = this.extractPciInterface(e);
4124
4131
  } catch (e) {
4125
- throw new vs(this.data.primaryPath, this.data.fallbackPath, e);
4132
+ throw new bs(this.data.primaryPath, this.data.fallbackPath, e);
4126
4133
  }
4127
4134
  }
4128
4135
  initialize(e) {
@@ -4162,9 +4169,9 @@ var vs = class extends Error {
4162
4169
  if (typeof t?.initialize != "function") throw Error(`PCI module at '${this.data.primaryPath}' does not export a valid PciModule interface (expected .initialize, .getResponse, .setResponse, .disable, .enable, .destroy)`);
4163
4170
  return t;
4164
4171
  }
4165
- }, bs = class {
4172
+ }, Ss = class {
4166
4173
  constructor(a) {
4167
- this.responseProcessingProgram = null, this.templateProcessingProgram = null, this.outcomeProcessingProgram = null, this._catalogIndex = /* @__PURE__ */ new Map(), this._pciHosts = /* @__PURE__ */ new Map(), this.config = a, this.itemXml = a.itemXml ?? "", this.role = a.role ?? "candidate", this.rng = a.rng ?? (typeof a.seed == "number" ? cs(a.seed) : Math.random), a.elementNameMapper ? (this.mapper = a.elementNameMapper, a.attributeNameMapper || (a.attributeNameMapper = this.mapper.version === "3.0" ? new x() : new b())) : ne(this.itemXml) === "3.0" ? (this.mapper = new S(), a.elementNameMapper = this.mapper, a.attributeNameMapper || (a.attributeNameMapper = new x())) : (this.mapper = new ee(), a.elementNameMapper = this.mapper, a.attributeNameMapper || (a.attributeNameMapper = new b())), this.itemDocument = Ro({
4174
+ this.responseProcessingProgram = null, this.templateProcessingProgram = null, this.outcomeProcessingProgram = null, this._catalogIndex = /* @__PURE__ */ new Map(), this._stimulusCatalogIndexes = /* @__PURE__ */ new Map(), this._pciHosts = /* @__PURE__ */ new Map(), this._pnpChangeListeners = /* @__PURE__ */ new Set(), this.lifecycleStatus = "initial", this.accumulatedDurationMs = 0, this.config = a, this.itemXml = a.itemXml ?? "", this.role = a.role ?? "candidate", this.sessionGuid = ws(), this.sessionStartedAt = Date.now(), this.rng = a.rng ?? (typeof a.seed == "number" ? cs(a.seed) : Math.random), a.elementNameMapper ? (this.mapper = a.elementNameMapper, a.attributeNameMapper || (a.attributeNameMapper = this.mapper.version === "3.0" ? new x() : new b())) : re(this.itemXml) === "3.0" ? (this.mapper = new te(), a.elementNameMapper = this.mapper, a.attributeNameMapper || (a.attributeNameMapper = new x())) : (this.mapper = new ee(), a.elementNameMapper = this.mapper, a.attributeNameMapper || (a.attributeNameMapper = new b())), this.itemDocument = Ro({
4168
4175
  itemXml: this.itemXml,
4169
4176
  elementNameMapper: this.mapper,
4170
4177
  attributeNameMapper: a.attributeNameMapper,
@@ -4184,27 +4191,41 @@ var vs = class extends Error {
4184
4191
  c && (this.outcomeProcessingProgram = n(c, { elementNameMapper: this.mapper })), a.responses && this.setResponses(a.responses);
4185
4192
  let l = this.detectQTIVersion();
4186
4193
  l === "unknown" ? console.warn("[QTI Player] Could not detect QTI version. Assuming QTI 2.2 compatibility.") : l === "2.0" ? console.warn("[QTI Player] QTI 2.0 detected. Some features may not be fully supported. QTI 2.2 is recommended.") : l === "2.1" && console.info("[QTI Player] QTI 2.1 detected. Using QTI 2.2 compatibility mode with CC2 template support."), this._pnp = a.pnp;
4187
- let u = ds(this.itemXml);
4188
- if (a.catalogXml) {
4189
- let e = ds(a.catalogXml);
4190
- this._catalogIndex = fs(e, u);
4191
- } else this._catalogIndex = u;
4192
- this.config.strictQtiCompliance?.enabled && this.validateStrictCompliance();
4194
+ let u = /* @__PURE__ */ new Map();
4195
+ for (let e of a.deliveryContext?.catalogSources ?? []) {
4196
+ let t = fs(e.xml);
4197
+ if (e.scope === "stimulus" && e.stimulusIdentifier) {
4198
+ let n = this._stimulusCatalogIndexes.get(e.stimulusIdentifier) ?? /* @__PURE__ */ new Map();
4199
+ this._stimulusCatalogIndexes.set(e.stimulusIdentifier, ms(n, t));
4200
+ } else u = ms(u, t);
4201
+ }
4202
+ a.catalogXml && (u = ms(u, ps(a.catalogXml))), this._catalogIndex = ms(u, ps(this.itemXml)), this.config.strictQtiCompliance?.enabled && this.validateStrictCompliance();
4193
4203
  }
4194
4204
  applyPnp(e) {
4195
- this._rootEl = e, us(e, this._pnp);
4205
+ this._rootEl = e, ds(e, this._pnp);
4196
4206
  }
4197
4207
  updatePnp(e) {
4198
- this._pnp = xs(this._pnp, e), this._rootEl && us(this._rootEl, this._pnp);
4208
+ this._pnp = Cs(this._pnp, e), this._rootEl && ds(this._rootEl, this._pnp);
4209
+ for (let e of this._pnpChangeListeners) e(this._pnp);
4199
4210
  }
4200
4211
  getPnp() {
4201
4212
  return this._pnp;
4202
4213
  }
4203
- getCatalogEntry(e, t, n) {
4204
- return _s(this._catalogIndex, e, t, n);
4214
+ onPnpChange(e) {
4215
+ return this._pnpChangeListeners.add(e), () => this._pnpChangeListeners.delete(e);
4216
+ }
4217
+ getDeliveryContext() {
4218
+ return this.config.deliveryContext;
4219
+ }
4220
+ getCatalogEntry(e, t, n, r) {
4221
+ let i = (r?.stimulusIdentifier ? ys(this._stimulusCatalogIndexes.get(r.stimulusIdentifier) ?? /* @__PURE__ */ new Map(), e, t, n) : null) ?? ys(this._catalogIndex, e, t, n);
4222
+ return i === null ? null : Ts(i) ? bo(i.trim(), this.config.security?.urlPolicy, "img") : this.sanitizeHtmlContent(i);
4223
+ }
4224
+ sanitizeHtmlContent(e) {
4225
+ return Oo(e, { security: this.config.security });
4205
4226
  }
4206
4227
  createPciHost(e) {
4207
- let t = new ys(e, this.config.pciBaseUrl ?? (typeof document < "u" ? document.baseURI : ""));
4228
+ let t = new xs(e, this.config.pciBaseUrl ?? (typeof document < "u" ? document.baseURI : ""));
4208
4229
  return t.onResponseChange((e, t) => {
4209
4230
  let n = this.decls[e];
4210
4231
  n && (n.value = this.coerceToDeclarationValue(n.baseType, n.cardinality, t));
@@ -4234,25 +4255,86 @@ var vs = class extends Error {
4234
4255
  this.destroyPciHosts();
4235
4256
  }
4236
4257
  processResponses() {
4237
- this.resetOutcomesToDefault();
4238
- let e = this.itemDocument.getProcessingElement("response");
4239
- if (e) if (a(e).length > 0) this.execResponseProcessingProgram();
4240
- else {
4241
- let t = f(e, "template");
4242
- t && this.execResponseProcessingTemplate(t);
4243
- }
4244
- if (this.execOutcomeProcessingProgram(), !this.isAdaptive()) {
4245
- this.ctx.setValue("completionStatus", h("identifier", "single", "completed"));
4246
- let e = this.getNumAttempts();
4247
- this.ctx.setValue("numAttempts", h("integer", "single", e + 1));
4258
+ return this.runResponseProcessing({ finalizeNonAdaptiveAttempt: !0 });
4259
+ }
4260
+ saveItemSession() {
4261
+ return this.freezeDuration(), this.serializeItemSession();
4262
+ }
4263
+ restoreItemSession(e) {
4264
+ this.sessionGuid = e.sessionGuid, this.lifecycleStatus = e.lifecycleStatus, this.accumulatedDurationMs = Math.max(0, Number(e.duration) || 0), this.sessionStartedAt = Date.now(), this.applySerializedVariables(e.responseVariables), this.applySerializedVariables(e.outcomeVariables), this.applySerializedVariables(e.templateVariables), this.applySerializedVariables(e.contextVariables), this.updateDuration();
4265
+ }
4266
+ suspendAttempt() {
4267
+ let e = this.validateResponses(this.getResponses());
4268
+ this.lifecycleStatus = "suspended";
4269
+ let t = this.saveItemSession();
4270
+ return {
4271
+ action: "suspendAttempt",
4272
+ lifecycleStatus: this.lifecycleStatus,
4273
+ completionStatus: this.getCompletionStatus(),
4274
+ numAttempts: this.getNumAttempts(),
4275
+ duration: t.duration,
4276
+ completed: this.isCompleted(),
4277
+ sessionState: t,
4278
+ validation: e
4279
+ };
4280
+ }
4281
+ endAttempt(e = {}) {
4282
+ let t = e.validateResponses ?? !1 ? this.validateResponses(this.getResponses()) : void 0;
4283
+ if (t && !t.valid) {
4284
+ let e = this.saveItemSession();
4285
+ return {
4286
+ action: "endAttempt",
4287
+ lifecycleStatus: this.lifecycleStatus,
4288
+ completionStatus: this.getCompletionStatus(),
4289
+ numAttempts: this.getNumAttempts(),
4290
+ duration: e.duration,
4291
+ completed: this.isCompleted(),
4292
+ sessionState: e,
4293
+ validation: t
4294
+ };
4248
4295
  }
4249
- let t = this.collectOutcomes();
4296
+ let n = this.isAdaptive() ? this.submitAttempt(e.countAttempt ?? !0) : this.runResponseProcessing({
4297
+ finalizeNonAdaptiveAttempt: !0,
4298
+ countAttempt: e.countAttempt ?? !0
4299
+ });
4300
+ this.lifecycleStatus = n.completed ? "closed" : "interacting";
4301
+ let r = this.saveItemSession();
4302
+ return {
4303
+ action: "endAttempt",
4304
+ lifecycleStatus: this.lifecycleStatus,
4305
+ completionStatus: this.getCompletionStatus(),
4306
+ numAttempts: this.getNumAttempts(),
4307
+ duration: r.duration,
4308
+ completed: n.completed,
4309
+ sessionState: r,
4310
+ validation: t,
4311
+ scoring: n
4312
+ };
4313
+ }
4314
+ scoreAttempt() {
4315
+ let e = this.runResponseProcessing({ finalizeNonAdaptiveAttempt: !1 }), t = this.saveItemSession();
4316
+ return {
4317
+ action: "scoreAttempt",
4318
+ lifecycleStatus: this.lifecycleStatus,
4319
+ completionStatus: this.getCompletionStatus(),
4320
+ numAttempts: this.getNumAttempts(),
4321
+ duration: t.duration,
4322
+ completed: e.completed,
4323
+ sessionState: t,
4324
+ scoring: e
4325
+ };
4326
+ }
4327
+ newTemplate(e = {}) {
4328
+ this.resetOutcomesToDefault(), (e.resetResponses ?? !0) && this.resetResponsesToDefault(), this.resetTemplatesToDefault(), this.ctx.setValue("completionStatus", h("identifier", "single", "not_attempted")), this.ctx.setValue("numAttempts", h("integer", "single", 0)), this.execTemplateProcessing(), this.lifecycleStatus = "initial", this.accumulatedDurationMs = 0, this.sessionStartedAt = Date.now(), this.updateDuration();
4329
+ let t = this.serializeItemSession();
4250
4330
  return {
4251
- score: Number(t.SCORE ?? 0),
4252
- maxScore: Number(t.MAXSCORE ?? 1),
4253
- completed: (t.completionStatus ?? "not_attempted") === "completed" || !this.isAdaptive(),
4254
- outcomeValues: t,
4255
- modalFeedback: this.getModalFeedback(t)
4331
+ action: "newTemplate",
4332
+ lifecycleStatus: this.lifecycleStatus,
4333
+ completionStatus: this.getCompletionStatus(),
4334
+ numAttempts: this.getNumAttempts(),
4335
+ duration: t.duration,
4336
+ completed: this.isCompleted(),
4337
+ sessionState: t
4256
4338
  };
4257
4339
  }
4258
4340
  getSecurityConfig() {
@@ -4303,7 +4385,34 @@ var vs = class extends Error {
4303
4385
  }
4304
4386
  }
4305
4387
  resetOutcomesToDefault() {
4306
- for (let e of Object.values(this.decls)) e.__kind === "outcome" && (e.identifier === "numAttempts" || e.identifier === "completionStatus" || this.ctx.resetToDefault(e.identifier));
4388
+ for (let e of Object.values(this.decls)) e.__kind === "outcome" && (e.identifier === "numAttempts" || e.identifier === "completionStatus" || e.identifier === "duration" || this.ctx.resetToDefault(e.identifier));
4389
+ }
4390
+ resetResponsesToDefault() {
4391
+ for (let e of Object.values(this.decls)) e.__kind === "response" && (this.ctx.resetToDefault(e.identifier), this.setPciResponse(e.identifier, e.value.kind === "value" ? e.value.value : null));
4392
+ }
4393
+ resetTemplatesToDefault() {
4394
+ for (let e of Object.values(this.decls)) e.isTemplate && this.ctx.resetToDefault(e.identifier);
4395
+ }
4396
+ runResponseProcessing(e) {
4397
+ this.updateDuration(), this.resetOutcomesToDefault();
4398
+ let t = this.itemDocument.getProcessingElement("response");
4399
+ if (t) if (a(t).length > 0) this.execResponseProcessingProgram();
4400
+ else {
4401
+ let e = f(t, "template");
4402
+ e && this.execResponseProcessingTemplate(e);
4403
+ }
4404
+ if (this.execOutcomeProcessingProgram(), !this.isAdaptive() && e.finalizeNonAdaptiveAttempt && (this.ctx.setValue("completionStatus", h("identifier", "single", "completed")), e.countAttempt ?? !0)) {
4405
+ let e = this.getNumAttempts();
4406
+ this.ctx.setValue("numAttempts", h("integer", "single", e + 1));
4407
+ }
4408
+ let n = this.collectOutcomes();
4409
+ return {
4410
+ score: Number(n.SCORE ?? 0),
4411
+ maxScore: Number(n.MAXSCORE ?? 1),
4412
+ completed: (n.completionStatus ?? "not_attempted") === "completed" || !this.isAdaptive() && e.finalizeNonAdaptiveAttempt,
4413
+ outcomeValues: n,
4414
+ modalFeedback: this.getModalFeedback(n)
4415
+ };
4307
4416
  }
4308
4417
  getItemBodyHtml() {
4309
4418
  let e = this.itemDocument.serializeItemBodyChildren();
@@ -4674,9 +4783,18 @@ var vs = class extends Error {
4674
4783
  identifier: "numAttempts",
4675
4784
  baseType: "integer",
4676
4785
  cardinality: "single",
4786
+ defaultValue: h("integer", "single", 0),
4677
4787
  value: h("integer", "single", 0),
4678
4788
  isTemplate: !1,
4679
4789
  __kind: "outcome"
4790
+ }), e.duration || (e.duration = {
4791
+ identifier: "duration",
4792
+ baseType: "duration",
4793
+ cardinality: "single",
4794
+ defaultValue: h("duration", "single", 0),
4795
+ value: h("duration", "single", 0),
4796
+ isTemplate: !1,
4797
+ __kind: "outcome"
4680
4798
  }), e.SCORE || (e.SCORE = {
4681
4799
  identifier: "SCORE",
4682
4800
  baseType: "float",
@@ -4698,6 +4816,78 @@ var vs = class extends Error {
4698
4816
  let e = this.decls[t];
4699
4817
  e && (e.value = this.coerceToDeclarationValue(e.baseType, e.cardinality, n));
4700
4818
  }
4819
+ let t = Number(e.duration);
4820
+ Number.isFinite(t) && t >= 0 && (this.accumulatedDurationMs = t, this.sessionStartedAt = Date.now(), this.updateDuration());
4821
+ }
4822
+ applySerializedVariables(e) {
4823
+ for (let t of Object.values(e)) {
4824
+ let e = this.decls[t.identifier];
4825
+ e && (e.value = this.coerceToDeclarationValue(e.baseType, e.cardinality, t.value), e.__kind === "response" && this.setPciResponse(e.identifier, t.value));
4826
+ }
4827
+ }
4828
+ serializeItemSession() {
4829
+ let e = {}, t = {}, n = {}, r = {}, i = new Set([
4830
+ "completionStatus",
4831
+ "numAttempts",
4832
+ "duration"
4833
+ ]);
4834
+ for (let a of Object.values(this.decls)) {
4835
+ let o = this.serializeVariable(a);
4836
+ a.isTemplate ? n[a.identifier] = {
4837
+ ...o,
4838
+ kind: "template"
4839
+ } : i.has(a.identifier) ? r[a.identifier] = {
4840
+ ...o,
4841
+ kind: "context"
4842
+ } : a.__kind === "response" ? e[a.identifier] = {
4843
+ ...o,
4844
+ kind: "response"
4845
+ } : a.__kind === "outcome" && (t[a.identifier] = {
4846
+ ...o,
4847
+ kind: "outcome"
4848
+ });
4849
+ }
4850
+ let a = this.validateResponses(this.getResponses());
4851
+ return {
4852
+ itemIdentifier: this.itemDocument.getAssessmentItemAttribute("identifier") ?? void 0,
4853
+ sessionGuid: this.sessionGuid,
4854
+ lifecycleStatus: this.lifecycleStatus,
4855
+ completionStatus: this.getCompletionStatus(),
4856
+ numAttempts: this.getNumAttempts(),
4857
+ duration: this.getDuration(),
4858
+ responseVariables: e,
4859
+ outcomeVariables: t,
4860
+ templateVariables: n,
4861
+ contextVariables: r,
4862
+ validationMessages: a.issues,
4863
+ savedAt: (/* @__PURE__ */ new Date()).toISOString()
4864
+ };
4865
+ }
4866
+ serializeVariable(e) {
4867
+ return {
4868
+ identifier: e.identifier,
4869
+ kind: e.__kind ?? (e.isTemplate ? "template" : "context"),
4870
+ baseType: e.baseType,
4871
+ cardinality: e.cardinality,
4872
+ value: this.qtiValueToSerializable(e.value),
4873
+ defaultValue: this.qtiValueToSerializable(e.defaultValue)
4874
+ };
4875
+ }
4876
+ qtiValueToSerializable(e) {
4877
+ return !e || e.kind !== "value" ? null : e.value;
4878
+ }
4879
+ updateDuration() {
4880
+ let e = Math.max(0, Date.now() - this.sessionStartedAt), t = this.accumulatedDurationMs + e;
4881
+ this.ctx.setValue("duration", h("duration", "single", t));
4882
+ }
4883
+ freezeDuration() {
4884
+ this.updateDuration();
4885
+ let e = this.getDuration();
4886
+ return this.accumulatedDurationMs = e, this.sessionStartedAt = Date.now(), e;
4887
+ }
4888
+ getDuration() {
4889
+ let e = this.ctx.getValue("duration");
4890
+ return Math.max(0, Math.floor(v(e) || 0));
4701
4891
  }
4702
4892
  parseDefaultValue(e, t, n) {
4703
4893
  let r = d(e, this.mapper.toNative("defaultvalue"));
@@ -4807,7 +4997,7 @@ var vs = class extends Error {
4807
4997
  return n;
4808
4998
  }
4809
4999
  };
4810
- function xs(e, t) {
5000
+ function Cs(e, t) {
4811
5001
  return {
4812
5002
  display: {
4813
5003
  ...e?.display ?? {},
@@ -4823,9 +5013,16 @@ function xs(e, t) {
4823
5013
  }
4824
5014
  };
4825
5015
  }
5016
+ function ws() {
5017
+ return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `item-session-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
5018
+ }
5019
+ function Ts(e) {
5020
+ let t = e.trim();
5021
+ return /^(https?:\/\/|\/\/|\/|\.{0,2}\/|data:|blob:)/i.test(t) || /\.(png|jpe?g|gif|webp|svg|mp3|wav|ogg|mp4|webm|pdf)(\?.*)?$/i.test(t);
5022
+ }
4826
5023
  //#endregion
4827
5024
  //#region src/components/utils/feedbackUtils.ts
4828
- var Ss = [
5025
+ var Es = [
4829
5026
  {
4830
5027
  pattern: /<strong>Incorrect;<\/strong>/gi,
4831
5028
  replacement: "<strong>Incorrect</strong> "
@@ -4843,24 +5040,24 @@ var Ss = [
4843
5040
  replacement: "Correct "
4844
5041
  }
4845
5042
  ];
4846
- function Cs(e, t = Ss) {
5043
+ function Ds(e, t = Es) {
4847
5044
  if (!e) return e;
4848
5045
  let n = e;
4849
5046
  for (let e of t) n = n.replace(e.pattern, e.replacement);
4850
5047
  return n;
4851
5048
  }
4852
- function ws(e, t) {
5049
+ function Os(e, t) {
4853
5050
  let { outcomeValues: n, applyHeuristics: r = !1, wrapWithSpan: i = !1, transforms: a } = t;
4854
5051
  return e && e.replace(/<feedbackInline[^>]*outcomeIdentifier="([^"]+)"[^>]*identifier="([^"]+)"[^>]*showHide="([^"]+)"[^>]*>([\s\S]*?)<\/feedbackInline>/gi, (e, t, o, s) => {
4855
5052
  let c = n[t];
4856
5053
  if (c == null || c === "" || !(s.toLowerCase() === "show" ? c === o : c !== o)) return "";
4857
5054
  let l = e.replace(/<feedbackInline[^>]*>/, "").replace(/<\/feedbackInline>/, "");
4858
- return r && (l = Cs(l, a)), i ? ` <span class="qti-feedback-inline">${l}</span>` : l;
5055
+ return r && (l = Ds(l, a)), i ? ` <span class="qti-feedback-inline">${l}</span>` : l;
4859
5056
  });
4860
5057
  }
4861
5058
  //#endregion
4862
5059
  //#region src/components/actions/typesetAction.ts
4863
- function Ts(e, t) {
5060
+ function ks(e, t) {
4864
5061
  if (!(typeof window < "u" && typeof MutationObserver < "u")) return {
4865
5062
  update() {},
4866
5063
  destroy() {}
@@ -4891,131 +5088,304 @@ function Ts(e, t) {
4891
5088
  }
4892
5089
  //#endregion
4893
5090
  //#region src/catalog/applyGlossaryTriggers.ts
4894
- var Es = new Set([
4895
- "tts-pronunciation",
4896
- "signing-definition",
4897
- "braille-text",
4898
- "audio-description"
4899
- ]);
4900
- function Ds(e, t) {
5091
+ var As = [
5092
+ {
5093
+ usage: "tts-pronunciation",
5094
+ flag: "ttsPronunciation",
5095
+ label: "Request pronunciation",
5096
+ text: "P"
5097
+ },
5098
+ {
5099
+ usage: "signing-definition",
5100
+ flag: "signingDefinition",
5101
+ label: "Request signing definition",
5102
+ text: "S"
5103
+ },
5104
+ {
5105
+ usage: "braille-text",
5106
+ flag: "brailleText",
5107
+ label: "Request braille text",
5108
+ text: "B"
5109
+ },
5110
+ {
5111
+ usage: "audio-description",
5112
+ flag: "audioDescription",
5113
+ label: "Request audio description",
5114
+ text: "A"
5115
+ },
5116
+ {
5117
+ usage: "extended-description",
5118
+ flag: "extendedDescription",
5119
+ label: "Request extended description",
5120
+ text: "D"
5121
+ }
5122
+ ], js = "illustrated-glossary", Ms = new Set([
5123
+ "glossary-on-screen",
5124
+ "keyword-translation",
5125
+ js
5126
+ ]), Ns = new Set(As.map((e) => e.flag)), Ps = new Set(As.map((e) => e.usage)), Fs = /^[a-z][a-z0-9._-]*$/;
5127
+ function Is(e, t) {
5128
+ Ls(e);
4901
5129
  let n = t.getPnp();
4902
- if (!n) return;
4903
- let r = n.content?.glossaryOnScreen === !0, i = n.content?.keywordTranslation, a = i?.active === !0 && !!i.languageCode;
4904
- if (!r && !a) return;
4905
- let o = e.querySelectorAll("[data-catalog-idref]");
4906
- if (o.length === 0) return;
4907
- let s = null;
4908
- for (let e of Array.from(o)) {
5130
+ if (!n) return () => Ls(e);
5131
+ let r = n.content?.glossaryOnScreen === !0, i = n.content?.keywordTranslation, a = i?.active === !0 && !!i.languageCode, o = n.content?.illustratedGlossary === !0, s = n.content?.catalogSupports ?? {}, c = Vs(s), l = As.some((e) => Us(Hs(s, e)));
5132
+ if (!r && !a && !o && !l && c.length === 0) return () => Ls(e);
5133
+ let u = e.querySelectorAll("[data-catalog-idref]");
5134
+ if (u.length === 0) return () => Ls(e);
5135
+ let d = null;
5136
+ for (let e of Array.from(u)) {
4909
5137
  let n = e.getAttribute("data-catalog-idref");
4910
5138
  if (!n) continue;
4911
- let o = document.createElement("span");
4912
- if (o.className = "qti-catalog-term", o.style.cssText = "position:relative;display:inline", e.parentNode?.insertBefore(o, e), o.appendChild(e), r) {
4913
- let r = Os(e.textContent ?? n, "glossary-on-screen");
4914
- o.appendChild(r), r.addEventListener("click", () => {
4915
- if (s) {
4916
- s(), s = null;
5139
+ let l = Bs(e), u = document.createElement("span");
5140
+ if (u.className = "qti-catalog-term", u.style.cssText = "position:relative;display:inline", e.parentNode?.insertBefore(u, e), u.appendChild(e), r) {
5141
+ let r = Rs(e.textContent ?? n, "glossary-on-screen", "Show definition");
5142
+ u.appendChild(r), r.addEventListener("click", () => {
5143
+ if (d) {
5144
+ d(), d = null;
4917
5145
  return;
4918
5146
  }
4919
- let i = t.getCatalogEntry(n, "glossary-on-screen");
4920
- i !== null && (s = ks(o, e.textContent ?? n, i, r, t, () => {
4921
- s = null;
5147
+ let i = t.getCatalogEntry(n, "glossary-on-screen", void 0, { stimulusIdentifier: l });
5148
+ i !== null && (d = qs(u, e.textContent ?? n, i, r, t, () => {
5149
+ d = null;
4922
5150
  }));
4923
5151
  });
4924
5152
  }
4925
5153
  if (a) {
4926
- let r = i.languageCode, a = Os(e.textContent ?? n, "keyword-translation");
4927
- o.appendChild(a), a.addEventListener("click", () => {
4928
- if (s) {
4929
- s(), s = null;
5154
+ let r = i.languageCode, a = Rs(e.textContent ?? n, "keyword-translation", "Show translation");
5155
+ u.appendChild(a), a.addEventListener("click", () => {
5156
+ if (d) {
5157
+ d(), d = null;
4930
5158
  return;
4931
5159
  }
4932
- let i = t.getCatalogEntry(n, "keyword-translation", r);
4933
- i !== null && (s = ks(o, e.textContent ?? n, i, a, t, () => {
4934
- s = null;
5160
+ let i = t.getCatalogEntry(n, "keyword-translation", r, { stimulusIdentifier: l });
5161
+ i !== null && (d = qs(u, e.textContent ?? n, i, a, t, () => {
5162
+ d = null;
4935
5163
  }));
4936
5164
  });
4937
5165
  }
4938
- for (let r of Es) {
4939
- let i = t.getCatalogEntry(n, r);
4940
- i !== null && e.dispatchEvent(new CustomEvent("qti-catalog-lookup", {
4941
- bubbles: !0,
4942
- composed: !0,
4943
- detail: {
4944
- idref: n,
4945
- usage: r,
4946
- html: i
5166
+ if (o) {
5167
+ let r = Rs(e.textContent ?? n, js, "Show illustrated glossary");
5168
+ u.appendChild(r), r.addEventListener("click", () => {
5169
+ if (d) {
5170
+ d(), d = null;
5171
+ return;
4947
5172
  }
4948
- }));
5173
+ let i = t.getCatalogEntry(n, js, void 0, { stimulusIdentifier: l });
5174
+ i !== null && (d = qs(u, e.textContent ?? n, i, r, t, () => {
5175
+ d = null;
5176
+ }));
5177
+ });
4949
5178
  }
5179
+ for (let r of As) {
5180
+ let i = Hs(s, r);
5181
+ Us(i) && zs(u, e, n, {
5182
+ ...r,
5183
+ languageCode: Ws(i)
5184
+ }, t, l);
5185
+ }
5186
+ for (let r of c) zs(u, e, n, r, t, l);
4950
5187
  }
5188
+ return () => {
5189
+ d?.(), Ls(e);
5190
+ };
4951
5191
  }
4952
- function Os(e, t) {
4953
- let n = document.createElement("button");
4954
- return n.type = "button", n.className = "qti-catalog-trigger", n.setAttribute("aria-label", `Show definition: ${e}`), n.setAttribute("data-catalog-usage", t), n.textContent = t === "keyword-translation" ? "T" : "?", n;
5192
+ function Ls(e) {
5193
+ for (let t of Array.from(e.querySelectorAll(".qti-catalog-term"))) {
5194
+ let e = Array.from(t.children).find((e) => e.getAttribute?.("data-catalog-idref") !== null);
5195
+ e && t.parentNode && t.parentNode.insertBefore(e, t), t.remove();
5196
+ }
5197
+ }
5198
+ function Rs(e, t, n, r) {
5199
+ let i = document.createElement("button");
5200
+ return i.type = "button", i.className = "qti-catalog-trigger", i.style.cssText = "display:inline-flex;align-items:center;justify-content:center;min-width:1.75rem;min-height:1.75rem;margin-inline:0.25rem;line-height:1;", i.setAttribute("aria-label", `${n}: ${e}`), i.setAttribute("data-catalog-usage", t), i.textContent = r ?? (t === "keyword-translation" ? "T" : t === js ? "I" : "?"), i;
5201
+ }
5202
+ function zs(e, t, n, r, i, a) {
5203
+ let o = i.getCatalogEntry(n, r.usage, r.languageCode, { stimulusIdentifier: a });
5204
+ if (o === null) return;
5205
+ let s = Rs(t.textContent ?? n, r.usage, r.label, r.text);
5206
+ e.appendChild(s), s.addEventListener("click", () => {
5207
+ s.dispatchEvent(new CustomEvent("qti-catalog-lookup", {
5208
+ bubbles: !0,
5209
+ composed: !0,
5210
+ detail: {
5211
+ idref: n,
5212
+ usage: r.usage,
5213
+ html: o,
5214
+ content: o,
5215
+ languageCode: r.languageCode
5216
+ }
5217
+ }));
5218
+ });
4955
5219
  }
4956
- function ks(e, t, n, r, i, a) {
4957
- let o = i.getComponentRegistry(), s, c = o.getTagNameForType("catalogPopup");
4958
- if (c !== null) {
4959
- let r = document.createElement(c);
4960
- r.content = n, r.label = t, r.onClose = l, e.appendChild(r), s = r;
4961
- } else s = As(t, n), e.appendChild(s);
5220
+ function Bs(e) {
5221
+ return (e.closest?.("[data-stimulus-idref]"))?.getAttribute?.("data-stimulus-idref")?.trim() || void 0;
5222
+ }
5223
+ function Vs(e) {
5224
+ return Object.entries(e).map(([e, t]) => ({
5225
+ usage: Gs(e),
5226
+ preference: t
5227
+ })).filter(({ usage: e, preference: t }) => e !== null && Us(t) && !Ks(e)).map(({ usage: e, preference: t }) => ({
5228
+ usage: e,
5229
+ label: `Request ${e.replace(/[-_]+/g, " ")}`,
5230
+ text: e.slice(0, 1).toUpperCase(),
5231
+ languageCode: Ws(t)
5232
+ }));
5233
+ }
5234
+ function Hs(e, t) {
5235
+ return e[t.flag] ?? e[t.usage];
5236
+ }
5237
+ function Us(e) {
5238
+ return e === void 0 ? !1 : typeof e == "boolean" ? e : e.active !== !1;
5239
+ }
5240
+ function Ws(e) {
5241
+ if (!e || typeof e == "boolean") return;
5242
+ let t = e.languageCode?.trim();
5243
+ if (!(!t || !/^[a-zA-Z]{2,8}(?:-[a-zA-Z0-9]{1,8})*$/.test(t))) return t;
5244
+ }
5245
+ function Gs(e) {
5246
+ let t = e.trim().toLowerCase();
5247
+ return Fs.test(t) ? t : null;
5248
+ }
5249
+ function Ks(e) {
5250
+ return Ns.has(e) || Ps.has(e) || Ms.has(e);
5251
+ }
5252
+ function qs(e, t, n, r, i, a) {
5253
+ let o = i.getComponentRegistry(), s, c = !1;
4962
5254
  function l() {
4963
- s.remove(), r.focus(), a();
5255
+ c || (c = !0, s.remove(), r.focus(), a());
4964
5256
  }
5257
+ let u = o.getTagNameForType("catalogPopup");
5258
+ if (u !== null) {
5259
+ let r = document.createElement(u);
5260
+ r.content = n, r.label = t, r.onClose = l, e.appendChild(r), s = r;
5261
+ } else s = Js(t, n, l), e.appendChild(s);
4965
5262
  return l;
4966
5263
  }
4967
- function As(e, t) {
4968
- let n = document.createElement("div");
4969
- n.className = "card card-bordered bg-base-100 shadow-lg qti-catalog-popup", n.setAttribute("role", "dialog"), n.setAttribute("aria-label", e), n.setAttribute("aria-modal", "true"), n.style.cssText = "position:absolute;z-index:1000;min-width:16rem;max-width:24rem";
5264
+ function Js(e, t, n) {
4970
5265
  let r = document.createElement("div");
4971
- r.className = "card-title flex justify-between items-center px-3 py-2 border-b border-base-300 bg-base-200";
4972
- let i = document.createElement("span");
4973
- i.className = "text-sm font-semibold", i.textContent = e;
4974
- let a = document.createElement("button");
4975
- a.type = "button", a.className = "btn btn-ghost btn-xs", a.setAttribute("aria-label", "Close"), a.textContent = "✕", r.appendChild(i), r.appendChild(a);
4976
- let o = document.createElement("div");
4977
- if (o.className = "card-body p-3", /^(https?:\/\/|\/)/i.test(t.trim())) {
5266
+ r.className = "card card-bordered bg-base-100 shadow-lg qti-catalog-popup", r.setAttribute("role", "dialog"), r.setAttribute("aria-label", e), r.setAttribute("aria-modal", "true"), r.style.cssText = "position:absolute;z-index:1000;min-width:16rem;max-width:24rem";
5267
+ let i = document.createElement("div");
5268
+ i.className = "card-title flex justify-between items-center px-3 py-2 border-b border-base-300 bg-base-200";
5269
+ let a = document.createElement("span");
5270
+ a.className = "text-sm font-semibold", a.textContent = e;
5271
+ let o = document.createElement("button");
5272
+ o.type = "button", o.className = "btn btn-ghost btn-xs", o.setAttribute("aria-label", "Close"), o.textContent = "✕", i.appendChild(a), i.appendChild(o);
5273
+ let s = document.createElement("div");
5274
+ if (s.className = "card-body p-3", /^(https?:\/\/|\/)/i.test(t.trim())) {
4978
5275
  let n = document.createElement("img");
4979
- n.src = t.trim(), n.alt = e, n.className = "max-w-full h-auto block mx-auto", o.appendChild(n);
4980
- } else o.innerHTML = t;
4981
- n.appendChild(r), n.appendChild(o);
4982
- function s(e) {
5276
+ n.src = t.trim(), n.alt = e, n.className = "max-w-full h-auto block mx-auto", s.appendChild(n);
5277
+ } else s.innerHTML = t;
5278
+ r.appendChild(i), r.appendChild(s);
5279
+ function c(e) {
4983
5280
  if (e.key === "Escape") {
4984
- e.preventDefault(), a.click();
5281
+ e.preventDefault(), o.click();
4985
5282
  return;
4986
5283
  }
4987
5284
  if (e.key === "Tab") {
4988
- let t = Array.from(n.querySelectorAll("a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex=\"-1\"])")).filter((e) => e.offsetParent !== null);
5285
+ let t = Array.from(r.querySelectorAll("a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex=\"-1\"])")).filter((e) => e.offsetParent !== null);
4989
5286
  if (t.length === 0) {
4990
5287
  e.preventDefault();
4991
5288
  return;
4992
5289
  }
4993
- let r = t[0], i = t[t.length - 1];
4994
- e.shiftKey && document.activeElement === r ? (e.preventDefault(), i.focus()) : !e.shiftKey && document.activeElement === i && (e.preventDefault(), r.focus());
5290
+ let n = t[0], i = t[t.length - 1];
5291
+ e.shiftKey && document.activeElement === n ? (e.preventDefault(), i.focus()) : !e.shiftKey && document.activeElement === i && (e.preventDefault(), n.focus());
4995
5292
  }
4996
5293
  }
4997
- return n.addEventListener("keydown", s), a.addEventListener("click", () => n.remove()), setTimeout(() => a.focus(), 0), n;
5294
+ return r.addEventListener("keydown", c), o.addEventListener("click", () => n()), setTimeout(() => o.focus(), 0), r;
4998
5295
  }
4999
5296
  //#endregion
5000
5297
  //#region src/catalog/glossaryAction.ts
5001
- function js(e, t) {
5002
- return Ds(e, t.player), {
5298
+ function Ys(e, t) {
5299
+ let n = Is(e, t.player), r = t.player.onPnpChange?.(() => {
5300
+ n(), n = Is(e, t.player);
5301
+ }) ?? (() => {});
5302
+ return {
5003
5303
  update(t) {
5004
- Ds(e, t.player);
5304
+ n(), r(), n = Is(e, t.player), r = t.player.onPnpChange?.(() => {
5305
+ n(), n = Is(e, t.player);
5306
+ }) ?? (() => {});
5005
5307
  },
5006
- destroy() {}
5308
+ destroy() {
5309
+ r(), n();
5310
+ }
5311
+ };
5312
+ }
5313
+ //#endregion
5314
+ //#region src/components/utils/stylesheetRender.ts
5315
+ var Xs = /@import\b|url\s*\(|<\/style|expression\s*\(|javascript\s*:|vbscript\s*:|data\s*:/i;
5316
+ function Zs(e, t = "[data-qti-item-body-scope]") {
5317
+ return e ? e.stylesheets.map((e) => Qs(e, t)).filter(Boolean).join("\n") : "";
5318
+ }
5319
+ function Qs(e, t) {
5320
+ let n = e.cssText?.trim();
5321
+ return !n || Xs.test(n) ? "" : $s(n, ec(e, t)) || "";
5322
+ }
5323
+ function $s(e, t = "[data-qti-item-body-scope]") {
5324
+ let n = e.replace(/\/\*[\s\S]*?\*\//g, ""), r = "";
5325
+ for (let e of n.matchAll(/([^{}@]+)\{([^{}]*)\}/g)) {
5326
+ let n = e[1]?.trim(), i = e[2]?.trim();
5327
+ if (!n || !i) continue;
5328
+ let a = n.split(",").map((e) => tc(e.trim(), t)).filter(Boolean);
5329
+ a.length !== 0 && (r += `${a.join(", ")} { ${i} }\n`);
5330
+ }
5331
+ return r.trim();
5332
+ }
5333
+ function ec(e, t) {
5334
+ return e.source !== "stimulus" || !e.stimulusIdentifier ? t : `${t} [data-stimulus-idref="${nc(e.stimulusIdentifier)}"]`;
5335
+ }
5336
+ function tc(e, t) {
5337
+ return e ? e.startsWith(t) ? e : e === ":root" || e === "html" || e === "body" ? t : e.startsWith(":") ? `${t}${e}` : `${t} ${e}` : "";
5338
+ }
5339
+ function nc(e) {
5340
+ return e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n|\r|\f/g, " ");
5341
+ }
5342
+ //#endregion
5343
+ //#region src/components/utils/stimulusRender.ts
5344
+ function rc(e, t, n) {
5345
+ let r = Object.fromEntries(Object.entries(e?.stimuli ?? {}).map(([e, t]) => [e, n(t.bodyHtml)])), i = Object.fromEntries(Object.entries(t).map(([e, t]) => [e, n(t)]));
5346
+ return {
5347
+ ...r,
5348
+ ...i
5007
5349
  };
5008
5350
  }
5351
+ function ic(e, t) {
5352
+ if (Object.keys(t).length === 0) return e;
5353
+ let n = /* @__PURE__ */ new Set(), r = e.replace(/<([a-z][\w:-]*)([^>]*\bdata-stimulus-idref=(["'])([^"']+)\3[^>]*)>\s*<\/\1>/gi, (e, r, i, a, o) => {
5354
+ let s = t[o];
5355
+ return s ? (n.add(o), `<${r}${oc(i, "qti-stimulus-dock")}>${s}</${r}>`) : e;
5356
+ });
5357
+ r = r.replace(/<qti-assessment-stimulus-ref\b([^>]*)\/?>\s*(?:<\/qti-assessment-stimulus-ref>)?/gi, (e, r) => {
5358
+ let i = ac(r, "identifier");
5359
+ if (!i) return e;
5360
+ if (n.has(i)) return "";
5361
+ let a = t[i];
5362
+ return a ? (n.add(i), `<div data-stimulus-idref="${sc(i)}" class="qti-stimulus-dock">${a}</div>`) : e;
5363
+ });
5364
+ let i = Object.entries(t).filter(([e]) => !n.has(e)).map(([e, t]) => `<div data-stimulus-idref="${sc(e)}" class="qti-stimulus-block">${t}</div>`).join("");
5365
+ return i ? i + r : r;
5366
+ }
5367
+ function ac(e, t) {
5368
+ return e.match(RegExp(`\\b${t}\\s*=\\s*["']([^"']+)["']`, "i"))?.[1] ?? null;
5369
+ }
5370
+ function oc(e, t) {
5371
+ let n = e.match(/\bclass\s*=\s*(["'])([^"']*)\1/i);
5372
+ if (!n) return `${e} class="${t}"`;
5373
+ let r = n[1], i = n[2] ?? "", a = new Set(i.split(/\s+/).filter(Boolean));
5374
+ return a.add(t), e.replace(n[0], `class=${r}${Array.from(a).join(" ")}${r}`);
5375
+ }
5376
+ function sc(e) {
5377
+ return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
5378
+ }
5009
5379
  //#endregion
5010
5380
  //#region src/core/rolePolicy.ts
5011
- var Ms = new Set([
5381
+ var cc = new Set([
5012
5382
  "scorer",
5013
5383
  "author",
5014
5384
  "tutor",
5015
5385
  "testConstructor"
5016
5386
  ]);
5017
- function Ns(e) {
5018
- let t = e === "candidate", n = Ms.has(e);
5387
+ function lc(e) {
5388
+ let t = e === "candidate", n = cc.has(e);
5019
5389
  return {
5020
5390
  isCandidate: t,
5021
5391
  isReadOnly: !t,
@@ -5024,65 +5394,65 @@ function Ns(e) {
5024
5394
  }
5025
5395
  //#endregion
5026
5396
  //#region src/interactions/inline-choice/InlineChoice.svelte
5027
- var Ps = /* @__PURE__ */ Y("<option> </option>"), Fs = /* @__PURE__ */ Y("<span class=\"badge badge-success badge-sm\" style=\"position: absolute; top: -1.5rem; left: 0; white-space: nowrap; font-size: 0.7rem;\"> </span>"), Is = /* @__PURE__ */ Y("<span class=\"inline-choice-wrapper\" style=\"display: inline-block; position: relative;\"><select style=\"display: inline-block; margin: 0 4px; width: auto; min-width: 120px;\"><option> </option><!></select> <!></span>");
5028
- function Ls(e, t) {
5029
- vt(t, !0);
5030
- let n = Q(t, "response", 3, ""), r = Q(t, "correctAnswer", 3, null), i = Q(t, "disabled", 3, !1), a = Q(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ L(() => r() === null ? n() : r()), s = /* @__PURE__ */ L(() => r() ? t.interaction.choices.find((e) => e.identifier === r()) : null);
5397
+ var uc = /* @__PURE__ */ Y("<option> </option>"), dc = /* @__PURE__ */ Y("<span class=\"badge badge-success badge-sm\" style=\"position: absolute; top: -1.5rem; left: 0; white-space: nowrap; font-size: 0.7rem;\"> </span>"), fc = /* @__PURE__ */ Y("<span class=\"inline-choice-wrapper\" style=\"display: inline-block; position: relative;\"><select style=\"display: inline-block; margin: 0 4px; width: auto; min-width: 120px;\"><option> </option><!></select> <!></span>");
5398
+ function pc(e, t) {
5399
+ yt(t, !0);
5400
+ let n = Q(t, "response", 3, ""), r = Q(t, "correctAnswer", 3, null), i = Q(t, "disabled", 3, !1), a = Q(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ I(() => r() === null ? n() : r()), s = /* @__PURE__ */ I(() => r() ? t.interaction.choices.find((e) => e.identifier === r()) : null);
5031
5401
  function c(e) {
5032
5402
  let n = e.currentTarget?.value ?? "";
5033
5403
  a()(t.interaction.responseId, n);
5034
5404
  }
5035
- var l = Is(), u = V(l);
5405
+ var l = fc(), u = V(l);
5036
5406
  let d;
5037
5407
  var f = V(u), p = V(f, !0);
5038
- D(f), f.value = f.__value = "", la(Sr(f), 17, () => t.interaction.choices, aa, (e, t) => {
5039
- let n = /* @__PURE__ */ L(() => r() === J(t).identifier);
5040
- var i = Ps(), a = V(i);
5041
- D(i);
5408
+ E(f), f.value = f.__value = "", la(Sr(f), 17, () => t.interaction.choices, aa, (e, t) => {
5409
+ let n = /* @__PURE__ */ I(() => r() === J(t).identifier);
5410
+ var i = uc(), a = V(i);
5411
+ E(i);
5042
5412
  var o = {};
5043
5413
  H(() => {
5044
5414
  Wi(a, `${J(t).text ?? ""}${J(n) ? " ✓" : ""}`), o !== (o = J(t).identifier) && (i.value = (i.__value = J(t).identifier) ?? "");
5045
5415
  }), X(e, i);
5046
- }), D(u);
5416
+ }), E(u);
5047
5417
  var m;
5048
5418
  ja(u);
5049
5419
  var h = Sr(u, 2), g = (e) => {
5050
- var n = Fs(), r = V(n);
5051
- D(n), H((e) => Wi(r, `${e ?? ""}: ${J(s).text ?? ""}`), [() => t.i18n?.t("interactions.choice.correct", "Correct") ?? "Correct"]), X(e, n);
5420
+ var n = dc(), r = V(n);
5421
+ E(n), H((e) => Wi(r, `${e ?? ""}: ${J(s).text ?? ""}`), [() => t.i18n?.t("interactions.choice.correct", "Correct") ?? "Correct"]), X(e, n);
5052
5422
  };
5053
5423
  ia(h, (e) => {
5054
5424
  r() !== null && J(s) && e(g);
5055
- }), D(l), H((e) => {
5425
+ }), E(l), H((e) => {
5056
5426
  d = Da(u, 1, "select select-bordered select-sm inline-select", null, d, {
5057
5427
  "border-success": r() !== null,
5058
5428
  "bg-success": r() !== null,
5059
5429
  "bg-opacity-10": r() !== null
5060
5430
  }), Z(u, "aria-label", `Inline choice ${t.interaction.responseId}${r() && J(s) ? ". Correct answer: " + J(s).text : ""}`), u.disabled = i(), Wi(p, e), m !== (m = J(o)) && (u.value = (u.__value = J(o)) ?? "", Aa(u, J(o)));
5061
- }, [() => t.interaction.label ?? t.interaction.dataPrompt ?? t.i18n?.t("interactions.inline.selectPlaceholder", "Select...")]), Fi("change", u, c), X(e, l), yt();
5431
+ }, [() => t.interaction.label ?? t.interaction.dataPrompt ?? t.i18n?.t("interactions.inline.selectPlaceholder", "Select...")]), Fi("change", u, c), X(e, l), bt();
5062
5432
  }
5063
5433
  Ii(["change"]);
5064
5434
  //#endregion
5065
5435
  //#region src/interactions/text-entry/InlineTextEntry.svelte
5066
- var Rs = /* @__PURE__ */ Y("<span role=\"alert\" class=\"qti-text-entry-error text-error text-xs\" style=\"display: block;\"> </span>"), zs = /* @__PURE__ */ Y("<input type=\"text\"/> <!>", 1);
5067
- function Bs(e, t) {
5068
- vt(t, !0);
5069
- let n = Q(t, "response", 3, ""), r = Q(t, "correctAnswer", 3, null), i = Q(t, "disabled", 3, !1), a = Q(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ R(null), s = /* @__PURE__ */ L(() => r() === null ? n() : r()), c = /* @__PURE__ */ L(() => (t.interaction.interactionClasses ?? []).find((e) => e.startsWith("qti-input-width-"))), l = /* @__PURE__ */ L(() => (t.interaction.interactionClasses ?? []).filter((e) => !e.startsWith("qti-input-width-")).join(" ")), u = /* @__PURE__ */ L(() => `${t.interaction.responseId}-error`);
5436
+ var mc = /* @__PURE__ */ Y("<span role=\"alert\" class=\"qti-text-entry-error text-error text-xs\" style=\"display: block;\"> </span>"), hc = /* @__PURE__ */ Y("<input type=\"text\"/> <!>", 1);
5437
+ function gc(e, t) {
5438
+ yt(t, !0);
5439
+ let n = Q(t, "response", 3, ""), r = Q(t, "correctAnswer", 3, null), i = Q(t, "disabled", 3, !1), a = Q(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ L(null), s = /* @__PURE__ */ I(() => r() === null ? n() : r()), c = /* @__PURE__ */ I(() => (t.interaction.interactionClasses ?? []).find((e) => e.startsWith("qti-input-width-"))), l = /* @__PURE__ */ I(() => (t.interaction.interactionClasses ?? []).filter((e) => !e.startsWith("qti-input-width-")).join(" ")), u = /* @__PURE__ */ I(() => `${t.interaction.responseId}-error`);
5070
5440
  function d(e) {
5071
5441
  let n = e.currentTarget, r = n?.value ?? "";
5072
- a()(t.interaction.responseId, r), n?.validity.valid && z(o, null);
5442
+ a()(t.interaction.responseId, r), n?.validity.valid && R(o, null);
5073
5443
  }
5074
5444
  function f(e) {
5075
- e.preventDefault(), z(o, t.interaction.patternMaskMessage ?? t.i18n?.t("interactions.textEntry.patternError", "Please match the required format") ?? "Please match the required format", !0);
5445
+ e.preventDefault(), R(o, t.interaction.patternMaskMessage ?? t.i18n?.t("interactions.textEntry.patternError", "Please match the required format") ?? "Please match the required format", !0);
5076
5446
  }
5077
5447
  function p(e) {
5078
5448
  e.currentTarget?.checkValidity();
5079
5449
  }
5080
- var m = zs(), h = xr(m);
5450
+ var m = hc(), h = xr(m);
5081
5451
  La(h);
5082
5452
  let g;
5083
5453
  var _ = Sr(h, 2), v = (e) => {
5084
- var t = Rs(), n = V(t, !0);
5085
- D(t), H(() => {
5454
+ var t = mc(), n = V(t, !0);
5455
+ E(t), H(() => {
5086
5456
  Z(t, "id", J(u)), Wi(n, J(o));
5087
5457
  }), X(e, t);
5088
5458
  };
@@ -5098,34 +5468,34 @@ function Bs(e, t) {
5098
5468
  "input input-bordered input-sm inline-input",
5099
5469
  J(c) ?? "",
5100
5470
  J(l)
5101
- ].filter(Boolean).join(" "))]), Fi("input", h, d), Pi("invalid", h, f), Pi("blur", h, p), X(e, m), yt();
5471
+ ].filter(Boolean).join(" "))]), Fi("input", h, d), Pi("invalid", h, f), Pi("blur", h, p), X(e, m), bt();
5102
5472
  }
5103
5473
  Ii(["input"]);
5104
5474
  //#endregion
5105
5475
  //#region src/interactions/inline/render-plan.ts
5106
- function Vs(e) {
5476
+ function _c(e) {
5107
5477
  return Fo(e);
5108
5478
  }
5109
- function Hs(e) {
5479
+ function vc(e) {
5110
5480
  return Io(e);
5111
5481
  }
5112
- function Us(e, t) {
5113
- return e.replace(/<textEntryInteraction[^>]*responseIdentifier="([^"]+)"[^>]*?(?:\/>|><\/textEntryInteraction>)/gi, (e, n) => Ks(t, n, "textEntryInteraction") ? Gs("textEntry", n) : e).replace(/<qti-text-entry-interaction[^>]*response-identifier="([^"]+)"[^>]*?(?:\/>|><\/qti-text-entry-interaction>)/gi, (e, n) => Ks(t, n, "textEntryInteraction") ? Gs("textEntry", n) : e).replace(/<inlineChoiceInteraction[^>]*responseIdentifier="([^"]+)"[^>]*>[\s\S]*?<\/inlineChoiceInteraction>/gi, (e, n) => Ks(t, n, "inlineChoiceInteraction") ? Gs("inlineChoice", n) : e).replace(/<qti-inline-choice-interaction[^>]*response-identifier="([^"]+)"[^>]*>[\s\S]*?<\/qti-inline-choice-interaction>/gi, (e, n) => Ks(t, n, "inlineChoiceInteraction") ? Gs("inlineChoice", n) : e);
5482
+ function yc(e, t) {
5483
+ return e.replace(/<textEntryInteraction[^>]*responseIdentifier="([^"]+)"[^>]*?(?:\/>|><\/textEntryInteraction>)/gi, (e, n) => Sc(t, n, "textEntryInteraction") ? xc("textEntry", n) : e).replace(/<qti-text-entry-interaction[^>]*response-identifier="([^"]+)"[^>]*?(?:\/>|><\/qti-text-entry-interaction>)/gi, (e, n) => Sc(t, n, "textEntryInteraction") ? xc("textEntry", n) : e).replace(/<inlineChoiceInteraction[^>]*responseIdentifier="([^"]+)"[^>]*>[\s\S]*?<\/inlineChoiceInteraction>/gi, (e, n) => Sc(t, n, "inlineChoiceInteraction") ? xc("inlineChoice", n) : e).replace(/<qti-inline-choice-interaction[^>]*response-identifier="([^"]+)"[^>]*>[\s\S]*?<\/qti-inline-choice-interaction>/gi, (e, n) => Sc(t, n, "inlineChoiceInteraction") ? xc("inlineChoice", n) : e);
5114
5484
  }
5115
- function Ws(e, t) {
5116
- let n = Us(e, t), r = [], i = /\[TEXTENTRY:([^\]]+)\]|\[INLINECHOICE:([^\]]+)\]/g, a = 0, o;
5485
+ function bc(e, t) {
5486
+ let n = yc(e, t), r = [], i = /\[TEXTENTRY:([^\]]+)\]|\[INLINECHOICE:([^\]]+)\]/g, a = 0, o;
5117
5487
  for (; (o = i.exec(n)) !== null;) {
5118
5488
  if (o.index > a && r.push({
5119
5489
  type: "html",
5120
5490
  content: n.substring(a, o.index)
5121
5491
  }), o[0].startsWith("[TEXTENTRY:")) {
5122
- let e = qs(t, o[1], "textEntryInteraction");
5492
+ let e = Cc(t, o[1], "textEntryInteraction");
5123
5493
  e && r.push({
5124
5494
  type: "textEntry",
5125
5495
  interaction: e
5126
5496
  });
5127
5497
  } else {
5128
- let e = qs(t, o[2], "inlineChoiceInteraction");
5498
+ let e = Cc(t, o[2], "inlineChoiceInteraction");
5129
5499
  e && r.push({
5130
5500
  type: "inlineChoice",
5131
5501
  interaction: e
@@ -5141,92 +5511,84 @@ function Ws(e, t) {
5141
5511
  content: n
5142
5512
  }];
5143
5513
  }
5144
- function Gs(e, t) {
5514
+ function xc(e, t) {
5145
5515
  return e === "textEntry" ? `[TEXTENTRY:${t}]` : `[INLINECHOICE:${t}]`;
5146
5516
  }
5147
- function Ks(e, t, n) {
5148
- return !!qs(e, t, n);
5517
+ function Sc(e, t, n) {
5518
+ return !!Cc(e, t, n);
5149
5519
  }
5150
- function qs(e, t, n) {
5520
+ function Cc(e, t, n) {
5151
5521
  return e.find((e) => e.responseId === t && e.type === n) ?? null;
5152
5522
  }
5153
5523
  //#endregion
5154
5524
  //#region src/components/ItemBody.svelte
5155
- var Js = /* @__PURE__ */ Y("<div class=\"qti-item-body svelte-11qbngh\"><div class=\"prose max-w-none mb-4\"><div class=\"inline-interaction-container svelte-11qbngh\"></div></div> <!></div>"), Ys = {
5525
+ var wc = 0, Tc = /* @__PURE__ */ Y("<div class=\"qti-item-body svelte-11qbngh\"><div class=\"prose max-w-none mb-4\"><div class=\"inline-interaction-container svelte-11qbngh\"></div></div> <!></div>"), Ec = {
5156
5526
  hash: "svelte-11qbngh",
5157
5527
  code: "\n /* Allow the whole item body to shrink inside flex/grid layouts (prevents overflow). */.qti-item-body.svelte-11qbngh {max-width:100%;min-width:0;}\n\n /*\n * Custom elements default to inline; force them to be block-level and width-contained.\n * This prevents wide interactions (SVGs, tables, canvases) from spilling outside panels.\n */.qti-item-body :is(\n pie-qti-choice,\n pie-qti-slider,\n pie-qti-order,\n pie-qti-match,\n pie-qti-associate,\n pie-qti-gap-match,\n pie-qti-hotspot,\n pie-qti-hottext,\n pie-qti-media,\n pie-qti-custom,\n pie-qti-end-attempt,\n pie-qti-position-object,\n pie-qti-graphic-gap-match,\n pie-qti-graphic-order,\n pie-qti-graphic-associate,\n pie-qti-select-point,\n pie-qti-extended-text\n ) {display:block;max-width:100%;min-width:0;}\n\n /* Keep inline interactions from breaking paragraph flow */.inline-interaction-container.svelte-11qbngh p {display:inline;}\n\n /*\n * Hide all QTI interaction elements wrapped with qti-hidden-interaction.\n * These are rendered separately as web components above.\n * Keeping them in the HTML (but hidden) makes debugging easier and is fully extensible.\n * Any *Interaction element will be automatically wrapped and hidden - no hardcoded list needed!\n */.qti-item-body .qti-hidden-interaction {display:none !important;}\n\n /*\n * Style for inline feedback elements that appear within choice text or other content.\n * Provides visual distinction and spacing for feedback that appears inline with content.\n */.qti-feedback-inline {display:inline-block;margin-left:0.5rem;padding-left:0.5rem;border-left:2px solid var(--color-base-content, currentColor);opacity:0.8;}\n\n /* QTI 3.0 Shared Stimulus: stimulus blocks that were prepended before the item body */.qti-stimulus-block {margin-bottom:1rem;}\n\n /* QTI 3.0 Shared Vocabulary: qti-input-width-N sets minimum input width in character units. */.qti-input-width-1 {min-width:1ch;}.qti-input-width-2 {min-width:2ch;}.qti-input-width-3 {min-width:3ch;}.qti-input-width-4 {min-width:4ch;}.qti-input-width-5 {min-width:5ch;}.qti-input-width-6 {min-width:6ch;}.qti-input-width-10 {min-width:10ch;}.qti-input-width-15 {min-width:15ch;}.qti-input-width-20 {min-width:20ch;}.qti-input-width-25 {min-width:25ch;}.qti-input-width-30 {min-width:30ch;}.qti-input-width-35 {min-width:35ch;}.qti-input-width-40 {min-width:40ch;}.qti-input-width-45 {min-width:45ch;}.qti-input-width-50 {min-width:50ch;}.qti-input-width-72 {min-width:72ch;}"
5158
5528
  };
5159
- function Xs(e, t) {
5160
- vt(t, !0), _a(e, Ys);
5161
- let n = Q(t, "responses", 19, () => ({})), r = Q(t, "disabled", 3, !1), i = Q(t, "role", 3, "candidate"), a = Q(t, "onResponseChange", 3, () => {}), o = Q(t, "outcomeValues", 19, () => ({})), s = Q(t, "stimulusContent", 19, () => ({})), c = /* @__PURE__ */ L(() => ae(t.heuristicsConfig)), l = /* @__PURE__ */ L(() => t.player.getComponentRegistry()), u = /* @__PURE__ */ L(() => Ns(i())), d = /* @__PURE__ */ L(() => r() || J(u).isReadOnly), f = /* @__PURE__ */ L(() => t.player.getInteractionData()), p = /* @__PURE__ */ L(() => J(u).canViewCorrectResponses ? t.player.getCorrectResponses() : {}), m = /* @__PURE__ */ L(() => J(f).filter((e) => !Vs(e.type)).map((e) => {
5529
+ function Dc(e, t) {
5530
+ yt(t, !0), _a(e, Ec);
5531
+ let n = Q(t, "responses", 19, () => ({})), r = Q(t, "disabled", 3, !1), i = Q(t, "role", 3, "candidate"), a = Q(t, "onResponseChange", 3, () => {}), o = Q(t, "outcomeValues", 19, () => ({})), s = Q(t, "stimulusContent", 19, () => ({})), c = `qti-item-body-${++wc}`, l = `[data-qti-item-body-scope="${c}"]`, u = /* @__PURE__ */ I(() => oe(t.heuristicsConfig)), d = /* @__PURE__ */ I(() => t.player.getComponentRegistry()), f = /* @__PURE__ */ I(() => lc(i())), p = /* @__PURE__ */ I(() => r() || J(f).isReadOnly), m = /* @__PURE__ */ I(() => t.player.getInteractionData()), h = /* @__PURE__ */ I(() => J(f).canViewCorrectResponses ? t.player.getCorrectResponses() : {}), g = /* @__PURE__ */ I(() => J(m).filter((e) => !_c(e.type)).map((e) => {
5162
5532
  try {
5163
5533
  return {
5164
5534
  interaction: e,
5165
- tagName: J(l).getTagName(e)
5535
+ tagName: J(d).getTagName(e)
5166
5536
  };
5167
5537
  } catch (t) {
5168
5538
  return console.error(`Failed to get tag name for ${e.type}:`, t), null;
5169
5539
  }
5170
- }).filter((e) => e !== null)), h = /* @__PURE__ */ L(() => {
5171
- let e = t.player.getItemBodyHtml();
5172
- if (s() && Object.keys(s()).length > 0) {
5173
- let t = /* @__PURE__ */ new Set();
5174
- e = e.replace(/<div([^>]*)\bdata-stimulus-idref="([^"]+)"([^>]*)>\s*<\/div>/gi, (e, n, r, i) => {
5175
- let a = s()[r];
5176
- return a ? (t.add(r), `<div${n} data-stimulus-idref="${r}"${i} class="qti-stimulus-dock">${a}</div>`) : e;
5177
- });
5178
- let n = Object.entries(s()).filter(([e]) => !t.has(e)).map(([, e]) => `<div class="qti-stimulus-block">${e}</div>`).join("");
5179
- n && (e = n + e);
5180
- }
5181
- return e = ws(e, {
5540
+ }).filter((e) => e !== null)), _ = /* @__PURE__ */ I(() => {
5541
+ let e = t.player.getItemBodyHtml(), n = t.deliveryContext ?? t.player.getDeliveryContext(), r = Zs(n, l), i = rc(n, s(), (e) => t.player.sanitizeHtmlContent(e));
5542
+ return e = ic(e, i), r && (e = `<style data-qti-stylesheets="resolved">${r}</style>${e}`), e = Os(e, {
5182
5543
  outcomeValues: o(),
5183
- applyHeuristics: J(c).feedbackTextFormatting,
5544
+ applyHeuristics: J(u).feedbackTextFormatting,
5184
5545
  wrapWithSpan: !1
5185
- }), e = e.replace(/<(\w+Interaction|qti-[\w-]+-interaction)(\s[^>]*)?>[\s\S]*?<\/\1>/gi, (e, t) => Hs(t.toLowerCase()) ? e : `<span class="qti-hidden-interaction">${e}</span>`), e;
5186
- }), g = /* @__PURE__ */ L(() => Ws(J(h), J(f)));
5187
- function _(e) {
5546
+ }), e = e.replace(/<(\w+Interaction|qti-[\w-]+-interaction)(\s[^>]*)?>[\s\S]*?<\/\1>/gi, (e, t) => vc(t.toLowerCase()) ? e : `<span class="qti-hidden-interaction">${e}</span>`), e;
5547
+ }), v = /* @__PURE__ */ I(() => bc(J(_), J(m)));
5548
+ function y(e) {
5188
5549
  let t = n()[e];
5189
5550
  return typeof t == "string" ? t : "";
5190
5551
  }
5191
- function v(e, t) {
5552
+ function b(e, t) {
5192
5553
  a()(e, t);
5193
5554
  }
5194
- function y(e) {
5555
+ function ee(e) {
5195
5556
  let { responseId: t, value: n } = e.detail;
5196
- v(t, n);
5557
+ b(t, n);
5197
5558
  }
5198
- let b = /* @__PURE__ */ R(null);
5559
+ let x = /* @__PURE__ */ L(null);
5199
5560
  Fr(() => {
5200
- if (!J(b)) return;
5201
- let e = (e) => y(e), t = J(b);
5202
- return t.addEventListener("qti-change", e), () => {
5203
- t.removeEventListener("qti-change", e);
5561
+ if (!J(x)) return;
5562
+ t.player.applyPnp(J(x));
5563
+ let e = (e) => ee(e), n = J(x);
5564
+ return n.addEventListener("qti-change", e), () => {
5565
+ n.removeEventListener("qti-change", e);
5204
5566
  };
5205
5567
  });
5206
- function ee(e) {
5568
+ function te(e) {
5207
5569
  let t = e, n = Array.isArray(t?.choices) && t.choices.length > 0 ? t.choices.map((e) => e?.identifier).filter(Boolean).join(",") : "", r = typeof t?.prompt == "string" ? t.prompt : "";
5208
5570
  return `${e.type}|${e.responseId}|${n}|${r}`;
5209
5571
  }
5210
- function x(e, t) {
5572
+ function re(e, t) {
5211
5573
  return queueMicrotask(() => {
5212
- e && te(e, t);
5574
+ e && ne(e, t);
5213
5575
  }), {
5214
5576
  update(t) {
5215
- te(e, t);
5577
+ ne(e, t);
5216
5578
  },
5217
5579
  destroy() {}
5218
5580
  };
5219
5581
  }
5220
- var S = Js(), ne = V(S), re = V(ne);
5221
- la(re, 21, () => J(g), aa, (e, n) => {
5582
+ var ie = Tc(), ae = V(ie), se = V(ae);
5583
+ la(se, 21, () => J(v), aa, (e, n) => {
5222
5584
  var r = Ui(), i = xr(r), a = (e) => {
5223
5585
  var t = Ui();
5224
5586
  ha(xr(t), () => J(n).content), X(e, t);
5225
5587
  }, o = (e) => {
5226
- let r = /* @__PURE__ */ L(() => J(u).canViewCorrectResponses ? J(p)[J(n).interaction.responseId] ?? null : null);
5588
+ let r = /* @__PURE__ */ I(() => J(f).canViewCorrectResponses ? J(h)[J(n).interaction.responseId] ?? null : null);
5227
5589
  {
5228
- let i = /* @__PURE__ */ L(() => _(J(n).interaction.responseId)), a = /* @__PURE__ */ L(() => J(u).canViewCorrectResponses ? J(r) : null);
5229
- Bs(e, {
5590
+ let i = /* @__PURE__ */ I(() => y(J(n).interaction.responseId)), a = /* @__PURE__ */ I(() => J(f).canViewCorrectResponses ? J(r) : null);
5591
+ gc(e, {
5230
5592
  get interaction() {
5231
5593
  return J(n).interaction;
5232
5594
  },
@@ -5237,19 +5599,19 @@ function Xs(e, t) {
5237
5599
  return J(a);
5238
5600
  },
5239
5601
  get disabled() {
5240
- return J(d);
5602
+ return J(p);
5241
5603
  },
5242
5604
  get i18n() {
5243
5605
  return t.i18n;
5244
5606
  },
5245
- onResponseChange: v
5607
+ onResponseChange: b
5246
5608
  });
5247
5609
  }
5248
5610
  }, s = (e) => {
5249
- let r = /* @__PURE__ */ L(() => J(u).canViewCorrectResponses ? J(p)[J(n).interaction.responseId] ?? null : null);
5611
+ let r = /* @__PURE__ */ I(() => J(f).canViewCorrectResponses ? J(h)[J(n).interaction.responseId] ?? null : null);
5250
5612
  {
5251
- let i = /* @__PURE__ */ L(() => _(J(n).interaction.responseId)), a = /* @__PURE__ */ L(() => J(u).canViewCorrectResponses ? J(r) : null);
5252
- Ls(e, {
5613
+ let i = /* @__PURE__ */ I(() => y(J(n).interaction.responseId)), a = /* @__PURE__ */ I(() => J(f).canViewCorrectResponses ? J(r) : null);
5614
+ pc(e, {
5253
5615
  get interaction() {
5254
5616
  return J(n).interaction;
5255
5617
  },
@@ -5260,43 +5622,45 @@ function Xs(e, t) {
5260
5622
  return J(a);
5261
5623
  },
5262
5624
  get disabled() {
5263
- return J(d);
5625
+ return J(p);
5264
5626
  },
5265
5627
  get i18n() {
5266
5628
  return t.i18n;
5267
5629
  },
5268
- onResponseChange: v
5630
+ onResponseChange: b
5269
5631
  });
5270
5632
  }
5271
5633
  };
5272
5634
  ia(i, (e) => {
5273
5635
  J(n).type === "html" ? e(a) : J(n).type === "textEntry" ? e(o, 1) : J(n).type === "inlineChoice" && e(s, 2);
5274
5636
  }), X(e, r);
5275
- }), D(re), D(ne), la(Sr(ne, 2), 17, () => J(m), ({ interaction: e, tagName: t }) => ee(e), (e, r) => {
5276
- let i = () => J(r).interaction, a = () => J(r).tagName, o = /* @__PURE__ */ L(() => J(p)[i().responseId] ?? null);
5637
+ }), E(se), E(ae), la(Sr(ae, 2), 17, () => J(g), ({ interaction: e, tagName: t }) => te(e), (e, r) => {
5638
+ let i = () => J(r).interaction, a = () => J(r).tagName, o = /* @__PURE__ */ I(() => J(h)[i().responseId] ?? null);
5277
5639
  var s = Ui();
5278
5640
  ga(xr(s), a, !1, (e, r) => {
5279
- va(e, (e, t) => x?.(e, t), () => ({
5641
+ va(e, (e, t) => re?.(e, t), () => ({
5280
5642
  i18n: t.i18n,
5281
5643
  typeset: t.typeset,
5282
5644
  interaction: i(),
5283
5645
  response: n()[i().responseId] ?? null,
5284
- correctResponse: J(u).canViewCorrectResponses ? J(o) : null,
5285
- disabled: J(d),
5286
- role: J(u).canViewCorrectResponses ? "scorer" : void 0
5646
+ correctResponse: J(f).canViewCorrectResponses ? J(o) : null,
5647
+ pnp: t.player.getPnp(),
5648
+ eliminationTool: t.player.getPnp()?.cognitive?.eliminationTool === !0,
5649
+ disabled: J(p),
5650
+ role: J(f).canViewCorrectResponses ? "scorer" : void 0
5287
5651
  }));
5288
5652
  }), X(e, s);
5289
- }), D(S), Xa(S, (e) => z(b, e), () => J(b)), va(S, (e, t) => Ts?.(e, t), () => ({ typeset: t.typeset })), va(S, (e, t) => js?.(e, t), () => ({ player: t.player })), X(e, S), yt();
5653
+ }), E(ie), Xa(ie, (e) => R(x, e), () => J(x)), va(ie, (e, t) => ks?.(e, t), () => ({ typeset: t.typeset })), va(ie, (e, t) => Ys?.(e, t), () => ({ player: t.player })), H(() => Z(ie, "data-qti-item-body-scope", c)), X(e, ie), bt();
5290
5654
  }
5291
5655
  //#endregion
5292
5656
  //#region src/components/ModalFeedbackDisplay.svelte
5293
- var Zs = /* @__PURE__ */ Y("<h3 class=\"font-bold text-lg mb-2\"> </h3>"), Qs = /* @__PURE__ */ Y("<div class=\"prose max-w-none\"></div>"), $s = /* @__PURE__ */ Y("<div class=\"prose max-w-none\"></div>"), ec = /* @__PURE__ */ Y("<div><!> <!></div>"), tc = /* @__PURE__ */ Y("<dialog open=\"\" class=\"modal modal-open svelte-i66ia0\" aria-modal=\"true\"><div class=\"modal-box max-w-3xl svelte-i66ia0\"><button class=\"btn btn-sm btn-circle btn-ghost absolute right-2 top-2\" type=\"button\">✕</button> <!> <div class=\"modal-action\"><button class=\"btn btn-primary\" type=\"button\"> </button></div></div></dialog>"), nc = {
5657
+ var Oc = /* @__PURE__ */ Y("<h3 class=\"font-bold text-lg mb-2\"> </h3>"), kc = /* @__PURE__ */ Y("<div class=\"prose max-w-none\"></div>"), Ac = /* @__PURE__ */ Y("<div class=\"prose max-w-none\"></div>"), jc = /* @__PURE__ */ Y("<div><!> <!></div>"), Mc = /* @__PURE__ */ Y("<dialog open=\"\" class=\"modal modal-open svelte-i66ia0\" aria-modal=\"true\"><div class=\"modal-box max-w-3xl svelte-i66ia0\"><button class=\"btn btn-sm btn-circle btn-ghost absolute right-2 top-2\" type=\"button\">✕</button> <!> <div class=\"modal-action\"><button class=\"btn btn-primary\" type=\"button\"> </button></div></div></dialog>"), Nc = {
5294
5658
  hash: "svelte-i66ia0",
5295
5659
  code: "\n /* Ensure modal is accessible */dialog.svelte-i66ia0 {background-color:rgba(0, 0, 0, 0.5);}\n\n /* Ensure feedback content is readable */.modal-box.svelte-i66ia0 {max-height:80vh;overflow-y:auto;}"
5296
5660
  };
5297
- function rc(e, t) {
5298
- vt(t, !0), _a(e, nc);
5299
- let n = Q(t, "feedback", 19, () => []), r = /* @__PURE__ */ L(() => n().length > 0), i = "item-player-modal-feedback-title", a = /* @__PURE__ */ L(() => n().find((e) => e.title)?.title);
5661
+ function Pc(e, t) {
5662
+ yt(t, !0), _a(e, Nc);
5663
+ let n = Q(t, "feedback", 19, () => []), r = /* @__PURE__ */ I(() => n().length > 0), i = "item-player-modal-feedback-title", a = /* @__PURE__ */ I(() => n().find((e) => e.title)?.title);
5300
5664
  function o() {
5301
5665
  t.onClose?.();
5302
5666
  }
@@ -5304,30 +5668,30 @@ function rc(e, t) {
5304
5668
  e.target === e.currentTarget && o();
5305
5669
  }
5306
5670
  var c = Ui(), l = xr(c), u = (e) => {
5307
- var r = tc(), c = V(r), l = V(c), u = Sr(l, 2);
5671
+ var r = Mc(), c = V(r), l = V(c), u = Sr(l, 2);
5308
5672
  la(u, 17, n, aa, (e, r, a) => {
5309
- var o = ec(), s = V(o), c = (e) => {
5310
- var t = Zs();
5673
+ var o = jc(), s = V(o), c = (e) => {
5674
+ var t = Oc();
5311
5675
  Z(t, "id", a === 0 ? i : void 0);
5312
5676
  var n = V(t, !0);
5313
- D(t), H(() => Wi(n, J(r).title)), X(e, t);
5677
+ E(t), H(() => Wi(n, J(r).title)), X(e, t);
5314
5678
  };
5315
5679
  ia(s, (e) => {
5316
5680
  J(r).title && e(c);
5317
5681
  });
5318
5682
  var l = Sr(s, 2), u = (e) => {
5319
- var n = Qs();
5320
- ha(n, () => J(r).content, !0), D(n), va(n, (e, t) => Ts?.(e, t), () => ({ typeset: t.typeset })), X(e, n);
5683
+ var n = kc();
5684
+ ha(n, () => J(r).content, !0), E(n), va(n, (e, t) => ks?.(e, t), () => ({ typeset: t.typeset })), X(e, n);
5321
5685
  }, d = (e) => {
5322
- var t = $s();
5323
- ha(t, () => J(r).content, !0), D(t), X(e, t);
5686
+ var t = Ac();
5687
+ ha(t, () => J(r).content, !0), E(t), X(e, t);
5324
5688
  };
5325
5689
  ia(l, (e) => {
5326
5690
  t.typeset ? e(u) : e(d, -1);
5327
- }), D(o), H(() => Da(o, 1, `mb-4 ${a < n().length - 1 ? "border-b pb-4" : ""}`)), X(e, o);
5691
+ }), E(o), H(() => Da(o, 1, `mb-4 ${a < n().length - 1 ? "border-b pb-4" : ""}`)), X(e, o);
5328
5692
  });
5329
5693
  var d = Sr(u, 2), f = V(d), p = V(f, !0);
5330
- D(f), D(d), D(c), D(r), H((e, t, n) => {
5694
+ E(f), E(d), E(c), E(r), H((e, t, n) => {
5331
5695
  Z(r, "aria-labelledby", J(a) ? i : void 0), Z(r, "aria-label", e), Z(l, "aria-label", t), Wi(p, n);
5332
5696
  }, [
5333
5697
  () => J(a) ? void 0 : t.i18n?.t("feedback.title") ?? "Feedback",
@@ -5337,28 +5701,28 @@ function rc(e, t) {
5337
5701
  };
5338
5702
  ia(l, (e) => {
5339
5703
  J(r) && e(u);
5340
- }), X(e, c), yt();
5704
+ }), X(e, c), bt();
5341
5705
  }
5342
5706
  Ii(["click"]);
5343
5707
  //#endregion
5344
5708
  //#region src/components/ItemPlayer.svelte
5345
- var ic = /* @__PURE__ */ Y("<div class=\"alert alert-error\"><span> </span></div>"), ac = /* @__PURE__ */ Y("<span class=\"badge badge-success\"> </span>"), oc = /* @__PURE__ */ Y("<span> </span>"), sc = /* @__PURE__ */ Y("<div class=\"text-sm text-base-content/70\"><!></div>"), cc = /* @__PURE__ */ Y("<div class=\"mt-6 flex items-center gap-4\"><button class=\"btn btn-primary\"> </button> <!></div>"), lc = /* @__PURE__ */ Y("<!> <!> <!>", 1), uc = /* @__PURE__ */ Y("<div class=\"alert alert-info\"><span> </span></div>"), dc = /* @__PURE__ */ Y("<div class=\"qti-item-player\"><!></div>");
5346
- function fc(e, t) {
5347
- vt(t, !0);
5348
- let n = Q(t, "role", 3, "candidate"), r = Q(t, "disabled", 3, !1), i = /* @__PURE__ */ L(() => t.typeset ?? ie), a = /* @__PURE__ */ R(null), o = /* @__PURE__ */ R(dr({})), s = /* @__PURE__ */ R(null), c = /* @__PURE__ */ R(dr([])), l = /* @__PURE__ */ R(dr({})), u = /* @__PURE__ */ R(!1), d = /* @__PURE__ */ R(!1), f = /* @__PURE__ */ R(0);
5709
+ var Fc = /* @__PURE__ */ Y("<div class=\"alert alert-error\"><span> </span></div>"), Ic = /* @__PURE__ */ Y("<span class=\"badge badge-success\"> </span>"), Lc = /* @__PURE__ */ Y("<span> </span>"), Rc = /* @__PURE__ */ Y("<div class=\"text-sm text-base-content/70\"><!></div>"), zc = /* @__PURE__ */ Y("<div class=\"mt-6 flex items-center gap-4\"><button class=\"btn btn-primary\"> </button> <!></div>"), Bc = /* @__PURE__ */ Y("<!> <!> <!>", 1), Vc = /* @__PURE__ */ Y("<div class=\"alert alert-info\"><span> </span></div>"), Hc = /* @__PURE__ */ Y("<div class=\"qti-item-player\"><!></div>");
5710
+ function Uc(e, t) {
5711
+ yt(t, !0);
5712
+ let n = Q(t, "role", 3, "candidate"), r = Q(t, "disabled", 3, !1), i = /* @__PURE__ */ I(() => t.typeset ?? ae), a = /* @__PURE__ */ L(null), o = /* @__PURE__ */ L(fr({})), s = /* @__PURE__ */ L(null), c = /* @__PURE__ */ L(fr([])), l = /* @__PURE__ */ L(fr({})), u = /* @__PURE__ */ L(!1), d = /* @__PURE__ */ L(!1), f = /* @__PURE__ */ L(0);
5349
5713
  Fr(() => {
5350
5714
  try {
5351
- z(a, new bs({
5715
+ R(a, new Ss({
5352
5716
  itemXml: t.itemXml,
5353
5717
  role: n(),
5354
5718
  security: t.security
5355
- }), !0), z(s, null), z(o, {}, !0), z(c, [], !0), z(l, {}, !0), z(u, J(a).isAdaptive(), !0), z(d, J(a).isCompleted(), !0), z(f, J(a).getNumAttempts(), !0);
5719
+ }), !0), R(s, null), R(o, {}, !0), R(c, [], !0), R(l, {}, !0), R(u, J(a).isAdaptive(), !0), R(d, J(a).isCompleted(), !0), R(f, J(a).getNumAttempts(), !0);
5356
5720
  } catch (e) {
5357
- z(s, e instanceof Error ? e.message : t.i18n?.t("item.parsingError") ?? "item.parsingError", !0), z(a, null);
5721
+ R(s, e instanceof Error ? e.message : t.i18n?.t("item.parsingError") ?? "item.parsingError", !0), R(a, null);
5358
5722
  }
5359
5723
  });
5360
5724
  function p(e, n) {
5361
- z(o, {
5725
+ R(o, {
5362
5726
  ...J(o),
5363
5727
  [e]: n
5364
5728
  }, !0), t.onResponseChange?.(e, n);
@@ -5367,24 +5731,24 @@ function fc(e, t) {
5367
5731
  if (J(a)) try {
5368
5732
  if (J(a).setResponses(J(o)), J(u) && !J(d)) {
5369
5733
  let n = J(a).submitAttempt(e);
5370
- z(f, n.numAttempts, !0), z(d, n.completed, !0), z(c, n.modalFeedback || [], !0), z(l, n.outcomeValues || {}, !0), t.onSubmit?.(J(o), n), n.completed && t.onComplete && t.onComplete(n);
5734
+ R(f, n.numAttempts, !0), R(d, n.completed, !0), R(c, n.modalFeedback || [], !0), R(l, n.outcomeValues || {}, !0), t.onSubmit?.(J(o), n), n.completed && t.onComplete && t.onComplete(n);
5371
5735
  } else {
5372
5736
  let e = J(a).processResponses();
5373
- z(c, e.modalFeedback || [], !0), z(l, e.outcomeValues || {}, !0), t.onSubmit?.(J(o), e);
5737
+ R(c, e.modalFeedback || [], !0), R(l, e.outcomeValues || {}, !0), t.onSubmit?.(J(o), e);
5374
5738
  }
5375
5739
  } catch (e) {
5376
- z(s, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
5740
+ R(s, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
5377
5741
  }
5378
5742
  }
5379
5743
  function h() {
5380
- z(c, [], !0);
5744
+ R(c, [], !0);
5381
5745
  }
5382
- var g = dc(), _ = V(g), v = (e) => {
5383
- var t = ic(), n = V(t), r = V(n, !0);
5384
- D(n), D(t), H(() => Wi(r, J(s))), X(e, t);
5746
+ var g = Hc(), _ = V(g), v = (e) => {
5747
+ var t = Fc(), n = V(t), r = V(n, !0);
5748
+ E(n), E(t), H(() => Wi(r, J(s))), X(e, t);
5385
5749
  }, y = (e) => {
5386
- var s = lc(), g = xr(s);
5387
- Xs(g, {
5750
+ var s = Bc(), g = xr(s);
5751
+ Dc(g, {
5388
5752
  get player() {
5389
5753
  return J(a);
5390
5754
  },
@@ -5409,30 +5773,30 @@ function fc(e, t) {
5409
5773
  onResponseChange: p
5410
5774
  });
5411
5775
  var _ = Sr(g, 2), v = (e) => {
5412
- let n = /* @__PURE__ */ L(() => J(a).canSubmitResponses(J(o)));
5413
- var r = cc(), i = V(r), s = V(i, !0);
5414
- D(i);
5776
+ let n = /* @__PURE__ */ I(() => J(a).canSubmitResponses(J(o)));
5777
+ var r = zc(), i = V(r), s = V(i, !0);
5778
+ E(i);
5415
5779
  var c = Sr(i, 2), l = (e) => {
5416
- var n = sc(), r = V(n), i = (e) => {
5417
- var n = ac(), r = V(n, !0);
5418
- D(n), H((e) => Wi(r, e), [() => t.i18n?.t("item.complete") ?? "item.complete"]), X(e, n);
5780
+ var n = Rc(), r = V(n), i = (e) => {
5781
+ var n = Ic(), r = V(n, !0);
5782
+ E(n), H((e) => Wi(r, e), [() => t.i18n?.t("item.complete") ?? "item.complete"]), X(e, n);
5419
5783
  }, a = (e) => {
5420
- var n = oc(), r = V(n, !0);
5421
- D(n), H((e) => Wi(r, e), [() => t.i18n?.t("item.attempt", { numAttempts: J(f) + 1 }) ?? `item.attempt (${J(f) + 1})`]), X(e, n);
5784
+ var n = Lc(), r = V(n, !0);
5785
+ E(n), H((e) => Wi(r, e), [() => t.i18n?.t("item.attempt", { numAttempts: J(f) + 1 }) ?? `item.attempt (${J(f) + 1})`]), X(e, n);
5422
5786
  };
5423
5787
  ia(r, (e) => {
5424
5788
  J(d) ? e(i) : e(a, -1);
5425
- }), D(n), X(e, n);
5789
+ }), E(n), X(e, n);
5426
5790
  };
5427
5791
  ia(c, (e) => {
5428
5792
  J(u) && e(l);
5429
- }), D(r), H((e) => {
5793
+ }), E(r), H((e) => {
5430
5794
  i.disabled = J(d) || !J(n), Wi(s, e);
5431
5795
  }, [() => J(u) && J(d) ? t.i18n?.t("item.completed") ?? "item.completed" : t.i18n?.t("item.submit") ?? "item.submit"]), Fi("click", i, () => m(!0)), X(e, r);
5432
5796
  };
5433
5797
  ia(_, (e) => {
5434
5798
  n() === "candidate" && !r() && t.onSubmit && e(v);
5435
- }), rc(Sr(_, 2), {
5799
+ }), Pc(Sr(_, 2), {
5436
5800
  get feedback() {
5437
5801
  return J(c);
5438
5802
  },
@@ -5445,104 +5809,104 @@ function fc(e, t) {
5445
5809
  }
5446
5810
  }), X(e, s);
5447
5811
  }, b = (e) => {
5448
- var n = uc(), r = V(n), i = V(r, !0);
5449
- D(r), D(n), H((e) => Wi(i, e), [() => t.i18n?.t("item.loading") ?? "item.loading"]), X(e, n);
5812
+ var n = Vc(), r = V(n), i = V(r, !0);
5813
+ E(r), E(n), H((e) => Wi(i, e), [() => t.i18n?.t("item.loading") ?? "item.loading"]), X(e, n);
5450
5814
  };
5451
5815
  ia(_, (e) => {
5452
5816
  J(s) ? e(v) : J(a) ? e(y, 1) : e(b, -1);
5453
- }), D(g), X(e, g), yt();
5817
+ }), E(g), X(e, g), bt();
5454
5818
  }
5455
5819
  Ii(["click"]);
5456
5820
  //#endregion
5457
5821
  //#region src/element.ts
5458
- var pc, mc = "pie-qti-item-player", hc = /* @__PURE__ */ new WeakMap(), gc = /* @__PURE__ */ new WeakMap(), _c = /* @__PURE__ */ new WeakMap(), vc = /* @__PURE__ */ new WeakMap(), yc = /* @__PURE__ */ new WeakMap(), bc = /* @__PURE__ */ new WeakMap(), xc = /* @__PURE__ */ new WeakMap(), Sc = /* @__PURE__ */ new WeakMap(), Cc = /* @__PURE__ */ new WeakMap(), wc = /* @__PURE__ */ new WeakMap(), Tc = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), Ec = class extends HTMLElement {
5822
+ var Wc, Gc = "pie-qti-item-player", Kc = /* @__PURE__ */ new WeakMap(), qc = /* @__PURE__ */ new WeakMap(), Jc = /* @__PURE__ */ new WeakMap(), Yc = /* @__PURE__ */ new WeakMap(), Xc = /* @__PURE__ */ new WeakMap(), Zc = /* @__PURE__ */ new WeakMap(), Qc = /* @__PURE__ */ new WeakMap(), $c = /* @__PURE__ */ new WeakMap(), el = /* @__PURE__ */ new WeakMap(), tl = /* @__PURE__ */ new WeakMap(), nl = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), rl = class extends HTMLElement {
5459
5823
  constructor(...e) {
5460
- super(...e), Pt(this, $), A(this, hc, null), A(this, gc, null), A(this, _c, ""), A(this, vc, "candidate"), A(this, yc, !1), A(this, bc, void 0), A(this, xc, void 0), A(this, Sc, void 0), A(this, Cc, void 0), A(this, wc, void 0), A(this, Tc, void 0);
5824
+ super(...e), Ft(this, $), k(this, Kc, null), k(this, qc, null), k(this, Jc, ""), k(this, Yc, "candidate"), k(this, Xc, !1), k(this, Zc, void 0), k(this, Qc, void 0), k(this, $c, void 0), k(this, el, void 0), k(this, tl, void 0), k(this, nl, void 0);
5461
5825
  }
5462
5826
  get typeset() {
5463
- return M(bc, this);
5827
+ return j(Zc, this);
5464
5828
  }
5465
5829
  set typeset(e) {
5466
- N(bc, this, e), j($, this, kc).call(this);
5830
+ M(Zc, this, e), A($, this, ol).call(this);
5467
5831
  }
5468
5832
  get i18n() {
5469
- return M(xc, this);
5833
+ return j(Qc, this);
5470
5834
  }
5471
5835
  set i18n(e) {
5472
- N(xc, this, e), j($, this, kc).call(this);
5836
+ M(Qc, this, e), A($, this, ol).call(this);
5473
5837
  }
5474
5838
  get security() {
5475
- return M(Sc, this);
5839
+ return j($c, this);
5476
5840
  }
5477
5841
  set security(e) {
5478
- N(Sc, this, e), j($, this, kc).call(this);
5842
+ M($c, this, e), A($, this, ol).call(this);
5479
5843
  }
5480
5844
  get onResponseChange() {
5481
- return M(Cc, this);
5845
+ return j(el, this);
5482
5846
  }
5483
5847
  set onResponseChange(e) {
5484
- N(Cc, this, e), j($, this, kc).call(this);
5848
+ M(el, this, e), A($, this, ol).call(this);
5485
5849
  }
5486
5850
  get onSubmit() {
5487
- return M(wc, this);
5851
+ return j(tl, this);
5488
5852
  }
5489
5853
  set onSubmit(e) {
5490
- N(wc, this, e), j($, this, kc).call(this);
5854
+ M(tl, this, e), A($, this, ol).call(this);
5491
5855
  }
5492
5856
  get onComplete() {
5493
- return M(Tc, this);
5857
+ return j(nl, this);
5494
5858
  }
5495
5859
  set onComplete(e) {
5496
- N(Tc, this, e), j($, this, kc).call(this);
5860
+ M(nl, this, e), A($, this, ol).call(this);
5497
5861
  }
5498
5862
  connectedCallback() {
5499
- j($, this, Oc).call(this);
5863
+ A($, this, al).call(this);
5500
5864
  }
5501
5865
  disconnectedCallback() {
5502
- j($, this, Ac).call(this);
5866
+ A($, this, sl).call(this);
5503
5867
  }
5504
5868
  attributeChangedCallback(e, t, n) {
5505
- e === "item-xml" ? N(_c, this, n ?? "") : e === "role" ? N(vc, this, n ?? "candidate") : e === "disabled" && N(yc, this, n !== null), j($, this, kc).call(this);
5869
+ e === "item-xml" ? M(Jc, this, n ?? "") : e === "role" ? M(Yc, this, n ?? "candidate") : e === "disabled" && M(Xc, this, n !== null), A($, this, ol).call(this);
5506
5870
  }
5507
5871
  };
5508
- pc = Ec;
5509
- function Dc() {
5872
+ Wc = rl;
5873
+ function il() {
5510
5874
  return {
5511
- itemXml: M(_c, this),
5512
- role: M(vc, this),
5513
- disabled: M(yc, this),
5514
- typeset: M(bc, this),
5515
- i18n: M(xc, this),
5516
- security: M(Sc, this),
5517
- onResponseChange: M(Cc, this),
5518
- onSubmit: M(wc, this),
5519
- onComplete: M(Tc, this)
5875
+ itemXml: j(Jc, this),
5876
+ role: j(Yc, this),
5877
+ disabled: j(Xc, this),
5878
+ typeset: j(Zc, this),
5879
+ i18n: j(Qc, this),
5880
+ security: j($c, this),
5881
+ onResponseChange: j(el, this),
5882
+ onSubmit: j(tl, this),
5883
+ onComplete: j(nl, this)
5520
5884
  };
5521
5885
  }
5522
- function Oc() {
5523
- M(gc, this) || (M(hc, this) || (N(hc, this, document.createElement("div")), M(hc, this).style.display = "contents", this.appendChild(M(hc, this))), N(gc, this, Gi(fc, {
5524
- target: M(hc, this),
5525
- props: j($, this, Dc).call(this)
5886
+ function al() {
5887
+ j(qc, this) || (j(Kc, this) || (M(Kc, this, document.createElement("div")), j(Kc, this).style.display = "contents", this.appendChild(j(Kc, this))), M(qc, this, Gi(Uc, {
5888
+ target: j(Kc, this),
5889
+ props: A($, this, il).call(this)
5526
5890
  })));
5527
5891
  }
5528
- function kc() {
5529
- M(gc, this) && (typeof M(gc, this).$set == "function" ? M(gc, this).$set(j($, this, Dc).call(this)) : (j($, this, Ac).call(this), j($, this, Oc).call(this)));
5892
+ function ol() {
5893
+ j(qc, this) && (typeof j(qc, this).$set == "function" ? j(qc, this).$set(A($, this, il).call(this)) : (A($, this, sl).call(this), A($, this, al).call(this)));
5530
5894
  }
5531
- function Ac() {
5532
- if (M(gc, this)) {
5895
+ function sl() {
5896
+ if (j(qc, this)) {
5533
5897
  try {
5534
- Yi(M(gc, this));
5898
+ Yi(j(qc, this));
5535
5899
  } catch {}
5536
- N(gc, this, null);
5900
+ M(qc, this, null);
5537
5901
  }
5538
- M(hc, this) && (M(hc, this).remove(), N(hc, this, null));
5902
+ j(Kc, this) && (j(Kc, this).remove(), M(Kc, this, null));
5539
5903
  }
5540
- pc.observedAttributes = [
5904
+ Wc.observedAttributes = [
5541
5905
  "item-xml",
5542
5906
  "role",
5543
5907
  "disabled"
5544
- ], customElements.get(mc) || customElements.define(mc, Ec);
5908
+ ], customElements.get(Gc) || customElements.define(Gc, rl);
5545
5909
  //#endregion
5546
- export { Ec as PieQtiItemPlayerElement };
5910
+ export { rl as PieQtiItemPlayerElement };
5547
5911
 
5548
5912
  //# sourceMappingURL=element.js.map