@pie-players/pie-section-player-tools-session-debugger 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,144 +1,144 @@
1
- var vs = Object.defineProperty;
2
- var zn = (e) => {
1
+ var xs = Object.defineProperty;
2
+ var Gn = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var _s = (e, t, n) => t in e ? vs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var T = (e, t, n) => _s(e, typeof t != "symbol" ? t + "" : t, n), tn = (e, t, n) => t.has(e) || zn("Cannot " + n);
7
- var l = (e, t, n) => (tn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), m = (e, t, n) => t.has(e) ? zn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), p = (e, t, n, r) => (tn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), j = (e, t, n) => (tn(e, t, "access private method"), n);
8
- var Zn;
9
- typeof window < "u" && ((Zn = window.__svelte ?? (window.__svelte = {})).v ?? (Zn.v = /* @__PURE__ */ new Set())).add("5");
10
- const ps = 2, bn = "[", $n = "[!", Qn = "]", ot = {}, R = /* @__PURE__ */ Symbol(), er = "http://www.w3.org/1999/xhtml", on = !1;
11
- var tr = Array.isArray, gs = Array.prototype.indexOf, lt = Array.prototype.includes, ms = Array.from, Ft = Object.keys, Ht = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, ws = Object.getOwnPropertyDescriptors, bs = Object.prototype, $s = Array.prototype, nr = Object.getPrototypeOf, Vn = Object.isExtensible;
12
- const ys = () => {
5
+ var ks = (e, t, n) => t in e ? xs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var A = (e, t, n) => ks(e, typeof t != "symbol" ? t + "" : t, n), cn = (e, t, n) => t.has(e) || Gn("Cannot " + n);
7
+ var l = (e, t, n) => (cn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), w = (e, t, n) => t.has(e) ? Gn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), p = (e, t, n, r) => (cn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), j = (e, t, n) => (cn(e, t, "access private method"), n);
8
+ var ur;
9
+ typeof window < "u" && ((ur = window.__svelte ?? (window.__svelte = {})).v ?? (ur.v = /* @__PURE__ */ new Set())).add("5");
10
+ const Is = 2, Mn = "[", Tn = "[!", ar = "]", ut = {}, O = /* @__PURE__ */ Symbol(), fr = "http://www.w3.org/1999/xhtml", _n = !1;
11
+ var cr = Array.isArray, As = Array.prototype.indexOf, at = Array.prototype.includes, Ms = Array.from, Vt = Object.keys, Yt = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, Ts = Object.getOwnPropertyDescriptors, Cs = Object.prototype, Rs = Array.prototype, dr = Object.getPrototypeOf, Zn = Object.isExtensible;
12
+ const Ns = () => {
13
13
  };
14
- function Es(e) {
14
+ function Os(e) {
15
15
  for (var t = 0; t < e.length; t++)
16
16
  e[t]();
17
17
  }
18
- function rr() {
18
+ function hr() {
19
19
  var e, t, n = new Promise((r, s) => {
20
20
  e = r, t = s;
21
21
  });
22
22
  return { promise: n, resolve: e, reject: t };
23
23
  }
24
- const O = 2, zt = 4, Wt = 8, sr = 1 << 24, $e = 16, de = 32, Ne = 64, ln = 128, J = 512, N = 1024, D = 2048, ne = 4096, fe = 8192, we = 16384, ht = 32768, ft = 65536, Yn = 1 << 17, ir = 1 << 18, qe = 1 << 19, xs = 1 << 20, Be = 65536, fn = 1 << 21, yn = 1 << 22, Me = 1 << 23, nn = /* @__PURE__ */ Symbol("$state"), Ss = /* @__PURE__ */ Symbol("legacy props"), Oe = new class extends Error {
24
+ const L = 2, Bt = 4, Xt = 8, vr = 1 << 24, Se = 16, he = 32, Oe = 64, pn = 128, K = 512, C = 1024, P = 2048, re = 4096, ae = 8192, $e = 16384, _t = 32768, ft = 65536, Qn = 1 << 17, _r = 1 << 18, Je = 1 << 19, Ds = 1 << 20, Ue = 65536, gn = 1 << 21, Cn = 1 << 22, Ce = 1 << 23, dn = /* @__PURE__ */ Symbol("$state"), Ls = /* @__PURE__ */ Symbol("legacy props"), Pe = new class extends Error {
25
25
  constructor() {
26
26
  super(...arguments);
27
- T(this, "name", "StaleReactionError");
28
- T(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
27
+ A(this, "name", "StaleReactionError");
28
+ A(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
29
29
  }
30
- }(), En = 3, qt = 8;
31
- function or(e) {
30
+ }(), Rn = 3, Jt = 8;
31
+ function pr(e) {
32
32
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
33
33
  }
34
- function ks() {
34
+ function Ps() {
35
35
  throw new Error("https://svelte.dev/e/async_derived_orphan");
36
36
  }
37
- function Is(e) {
37
+ function Fs(e) {
38
38
  throw new Error("https://svelte.dev/e/effect_in_teardown");
39
39
  }
40
- function Ts() {
40
+ function js() {
41
41
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
42
42
  }
43
- function Ms(e) {
43
+ function Hs(e) {
44
44
  throw new Error("https://svelte.dev/e/effect_orphan");
45
45
  }
46
- function As() {
46
+ function zs() {
47
47
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
48
48
  }
49
- function Cs() {
49
+ function Vs() {
50
50
  throw new Error("https://svelte.dev/e/hydration_failed");
51
51
  }
52
- function Ns() {
52
+ function Ys() {
53
53
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
54
54
  }
55
- function Rs() {
55
+ function Bs() {
56
56
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
57
57
  }
58
- function Os() {
58
+ function Ws() {
59
59
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
60
60
  }
61
- function Ds() {
61
+ function qs() {
62
62
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
63
63
  }
64
- function Ut(e) {
64
+ function Kt(e) {
65
65
  console.warn("https://svelte.dev/e/hydration_mismatch");
66
66
  }
67
- function Ps() {
67
+ function Us() {
68
68
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
69
69
  }
70
- let k = !1;
71
- function Je(e) {
72
- k = e;
70
+ let I = !1;
71
+ function Ge(e) {
72
+ I = e;
73
73
  }
74
- let S;
75
- function ue(e) {
74
+ let k;
75
+ function fe(e) {
76
76
  if (e === null)
77
- throw Ut(), ot;
78
- return S = e;
77
+ throw Kt(), ut;
78
+ return k = e;
79
79
  }
80
- function xn() {
81
- return ue(/* @__PURE__ */ Re(S));
80
+ function Nn() {
81
+ return fe(/* @__PURE__ */ De(k));
82
82
  }
83
- function xe(e) {
84
- if (k) {
85
- if (/* @__PURE__ */ Re(S) !== null)
86
- throw Ut(), ot;
87
- S = e;
83
+ function Ie(e) {
84
+ if (I) {
85
+ if (/* @__PURE__ */ De(k) !== null)
86
+ throw Kt(), ut;
87
+ k = e;
88
88
  }
89
89
  }
90
- function Ls(e = 1) {
91
- if (k) {
92
- for (var t = e, n = S; t--; )
90
+ function Xs(e = 1) {
91
+ if (I) {
92
+ for (var t = e, n = k; t--; )
93
93
  n = /** @type {TemplateNode} */
94
- /* @__PURE__ */ Re(n);
95
- S = n;
94
+ /* @__PURE__ */ De(n);
95
+ k = n;
96
96
  }
97
97
  }
98
- function lr(e = !0) {
99
- for (var t = 0, n = S; ; ) {
100
- if (n.nodeType === qt) {
98
+ function gr(e = !0) {
99
+ for (var t = 0, n = k; ; ) {
100
+ if (n.nodeType === Jt) {
101
101
  var r = (
102
102
  /** @type {Comment} */
103
103
  n.data
104
104
  );
105
- if (r === Qn) {
105
+ if (r === ar) {
106
106
  if (t === 0) return n;
107
107
  t -= 1;
108
- } else (r === bn || r === $n || // "[1", "[2", etc. for if blocks
108
+ } else (r === Mn || r === Tn || // "[1", "[2", etc. for if blocks
109
109
  r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
110
110
  }
111
111
  var s = (
112
112
  /** @type {TemplateNode} */
113
- /* @__PURE__ */ Re(n)
113
+ /* @__PURE__ */ De(n)
114
114
  );
115
115
  e && n.remove(), n = s;
116
116
  }
117
117
  }
118
- function js(e) {
119
- if (!e || e.nodeType !== qt)
120
- throw Ut(), ot;
118
+ function Js(e) {
119
+ if (!e || e.nodeType !== Jt)
120
+ throw Kt(), ut;
121
121
  return (
122
122
  /** @type {Comment} */
123
123
  e.data
124
124
  );
125
125
  }
126
- function fr(e) {
126
+ function mr(e) {
127
127
  return e === this.v;
128
128
  }
129
- function Fs(e, t) {
129
+ function Ks(e, t) {
130
130
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
131
131
  }
132
- function Hs(e) {
133
- return !Fs(e, this.v);
132
+ function Gs(e) {
133
+ return !Ks(e, this.v);
134
134
  }
135
- let zs = !1, V = null;
136
- function ut(e) {
137
- V = e;
135
+ let Zs = !1, Y = null;
136
+ function ct(e) {
137
+ Y = e;
138
138
  }
139
- function ur(e, t = !1, n) {
140
- V = {
141
- p: V,
139
+ function wr(e, t = !1, n) {
140
+ Y = {
141
+ p: Y,
142
142
  i: !1,
143
143
  c: null,
144
144
  e: null,
@@ -147,52 +147,52 @@ function ur(e, t = !1, n) {
147
147
  l: null
148
148
  };
149
149
  }
150
- function ar(e) {
150
+ function br(e) {
151
151
  var t = (
152
152
  /** @type {ComponentContext} */
153
- V
153
+ Y
154
154
  ), n = t.e;
155
155
  if (n !== null) {
156
156
  t.e = null;
157
157
  for (var r of n)
158
- Rr(r);
158
+ Yr(r);
159
159
  }
160
- return e !== void 0 && (t.x = e), t.i = !0, V = t.p, e ?? /** @type {T} */
160
+ return e !== void 0 && (t.x = e), t.i = !0, Y = t.p, e ?? /** @type {T} */
161
161
  {};
162
162
  }
163
- function cr() {
163
+ function yr() {
164
164
  return !0;
165
165
  }
166
- let De = [];
167
- function dr() {
168
- var e = De;
169
- De = [], Es(e);
166
+ let Fe = [];
167
+ function $r() {
168
+ var e = Fe;
169
+ Fe = [], Os(e);
170
170
  }
171
- function Ze(e) {
172
- if (De.length === 0 && !pt) {
173
- var t = De;
171
+ function et(e) {
172
+ if (Fe.length === 0 && !mt) {
173
+ var t = Fe;
174
174
  queueMicrotask(() => {
175
- t === De && dr();
175
+ t === Fe && $r();
176
176
  });
177
177
  }
178
- De.push(e);
178
+ Fe.push(e);
179
179
  }
180
- function Vs() {
181
- for (; De.length > 0; )
182
- dr();
180
+ function Qs() {
181
+ for (; Fe.length > 0; )
182
+ $r();
183
183
  }
184
- function hr(e) {
185
- var t = $;
184
+ function Er(e) {
185
+ var t = y;
186
186
  if (t === null)
187
- return b.f |= Me, e;
188
- if ((t.f & ht) === 0 && (t.f & zt) === 0)
187
+ return b.f |= Ce, e;
188
+ if ((t.f & _t) === 0 && (t.f & Bt) === 0)
189
189
  throw e;
190
- at(e, t);
190
+ dt(e, t);
191
191
  }
192
- function at(e, t) {
192
+ function dt(e, t) {
193
193
  for (; t !== null; ) {
194
- if ((t.f & ln) !== 0) {
195
- if ((t.f & ht) === 0)
194
+ if ((t.f & pn) !== 0) {
195
+ if ((t.f & _t) === 0)
196
196
  throw e;
197
197
  try {
198
198
  t.b.error(e);
@@ -205,78 +205,78 @@ function at(e, t) {
205
205
  }
206
206
  throw e;
207
207
  }
208
- const Ys = -7169;
208
+ const ei = -7169;
209
209
  function M(e, t) {
210
- e.f = e.f & Ys | t;
210
+ e.f = e.f & ei | t;
211
211
  }
212
- function Sn(e) {
213
- (e.f & J) !== 0 || e.deps === null ? M(e, N) : M(e, ne);
212
+ function On(e) {
213
+ (e.f & K) !== 0 || e.deps === null ? M(e, C) : M(e, re);
214
214
  }
215
- function vr(e) {
215
+ function Sr(e) {
216
216
  if (e !== null)
217
217
  for (const t of e)
218
- (t.f & O) === 0 || (t.f & Be) === 0 || (t.f ^= Be, vr(
218
+ (t.f & L) === 0 || (t.f & Ue) === 0 || (t.f ^= Ue, Sr(
219
219
  /** @type {Derived} */
220
220
  t.deps
221
221
  ));
222
222
  }
223
- function _r(e, t, n) {
224
- (e.f & D) !== 0 ? t.add(e) : (e.f & ne) !== 0 && n.add(e), vr(e.deps), M(e, N);
223
+ function xr(e, t, n) {
224
+ (e.f & P) !== 0 ? t.add(e) : (e.f & re) !== 0 && n.add(e), Sr(e.deps), M(e, C);
225
225
  }
226
- const Ct = /* @__PURE__ */ new Set();
227
- let x = null, Q = null, F = [], Xt = null, un = !1, pt = !1;
228
- var Qe, et, je, tt, $t, yt, Fe, ve, nt, ce, an, cn, pr;
229
- const An = class An {
226
+ const Ot = /* @__PURE__ */ new Set();
227
+ let x = null, ee = null, H = [], Gt = null, mn = !1, mt = !1;
228
+ var tt, nt, ze, rt, Et, St, Ve, ge, st, de, wn, bn, kr;
229
+ const jn = class jn {
230
230
  constructor() {
231
- m(this, ce);
232
- T(this, "committed", !1);
231
+ w(this, de);
232
+ A(this, "committed", !1);
233
233
  /**
234
234
  * The current values of any sources that are updated in this batch
235
235
  * They keys of this map are identical to `this.#previous`
236
236
  * @type {Map<Source, any>}
237
237
  */
238
- T(this, "current", /* @__PURE__ */ new Map());
238
+ A(this, "current", /* @__PURE__ */ new Map());
239
239
  /**
240
240
  * The values of any sources that are updated in this batch _before_ those updates took place.
241
241
  * They keys of this map are identical to `this.#current`
242
242
  * @type {Map<Source, any>}
243
243
  */
244
- T(this, "previous", /* @__PURE__ */ new Map());
244
+ A(this, "previous", /* @__PURE__ */ new Map());
245
245
  /**
246
246
  * When the batch is committed (and the DOM is updated), we need to remove old branches
247
247
  * and append new ones by calling the functions added inside (if/each/key/etc) blocks
248
248
  * @type {Set<() => void>}
249
249
  */
250
- m(this, Qe, /* @__PURE__ */ new Set());
250
+ w(this, tt, /* @__PURE__ */ new Set());
251
251
  /**
252
252
  * If a fork is discarded, we need to destroy any effects that are no longer needed
253
253
  * @type {Set<(batch: Batch) => void>}
254
254
  */
255
- m(this, et, /* @__PURE__ */ new Set());
255
+ w(this, nt, /* @__PURE__ */ new Set());
256
256
  /**
257
257
  * The number of async effects that are currently in flight
258
258
  */
259
- m(this, je, 0);
259
+ w(this, ze, 0);
260
260
  /**
261
261
  * The number of async effects that are currently in flight, _not_ inside a pending boundary
262
262
  */
263
- m(this, tt, 0);
263
+ w(this, rt, 0);
264
264
  /**
265
265
  * A deferred that resolves when the batch is committed, used with `settled()`
266
266
  * TODO replace with Promise.withResolvers once supported widely enough
267
267
  * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
268
268
  */
269
- m(this, $t, null);
269
+ w(this, Et, null);
270
270
  /**
271
271
  * Deferred effects (which run after async work has completed) that are DIRTY
272
272
  * @type {Set<Effect>}
273
273
  */
274
- m(this, yt, /* @__PURE__ */ new Set());
274
+ w(this, St, /* @__PURE__ */ new Set());
275
275
  /**
276
276
  * Deferred effects that are MAYBE_DIRTY
277
277
  * @type {Set<Effect>}
278
278
  */
279
- m(this, Fe, /* @__PURE__ */ new Set());
279
+ w(this, Ve, /* @__PURE__ */ new Set());
280
280
  /**
281
281
  * A map of branches that still exist, but will be destroyed when this batch
282
282
  * is committed — we skip over these during `process`.
@@ -284,19 +284,19 @@ const An = class An {
284
284
  * so they can be rescheduled if the branch survives.
285
285
  * @type {Map<Effect, { d: Effect[], m: Effect[] }>}
286
286
  */
287
- m(this, ve, /* @__PURE__ */ new Map());
288
- T(this, "is_fork", !1);
289
- m(this, nt, !1);
287
+ w(this, ge, /* @__PURE__ */ new Map());
288
+ A(this, "is_fork", !1);
289
+ w(this, st, !1);
290
290
  }
291
291
  is_deferred() {
292
- return this.is_fork || l(this, tt) > 0;
292
+ return this.is_fork || l(this, rt) > 0;
293
293
  }
294
294
  /**
295
295
  * Add an effect to the #skipped_branches map and reset its children
296
296
  * @param {Effect} effect
297
297
  */
298
298
  skip_effect(t) {
299
- l(this, ve).has(t) || l(this, ve).set(t, { d: [], m: [] });
299
+ l(this, ge).has(t) || l(this, ge).set(t, { d: [], m: [] });
300
300
  }
301
301
  /**
302
302
  * Remove an effect from the #skipped_branches map and reschedule
@@ -304,13 +304,13 @@ const An = class An {
304
304
  * @param {Effect} effect
305
305
  */
306
306
  unskip_effect(t) {
307
- var n = l(this, ve).get(t);
307
+ var n = l(this, ge).get(t);
308
308
  if (n) {
309
- l(this, ve).delete(t);
309
+ l(this, ge).delete(t);
310
310
  for (var r of n.d)
311
- M(r, D), ee(r);
311
+ M(r, P), te(r);
312
312
  for (r of n.m)
313
- M(r, ne), ee(r);
313
+ M(r, re), te(r);
314
314
  }
315
315
  }
316
316
  /**
@@ -318,19 +318,19 @@ const An = class An {
318
318
  * @param {Effect[]} root_effects
319
319
  */
320
320
  process(t) {
321
- F = [], this.apply();
321
+ H = [], this.apply();
322
322
  var n = [], r = [];
323
323
  for (const s of t)
324
- j(this, ce, an).call(this, s, n, r);
324
+ j(this, de, wn).call(this, s, n, r);
325
325
  if (this.is_deferred()) {
326
- j(this, ce, cn).call(this, r), j(this, ce, cn).call(this, n);
327
- for (const [s, i] of l(this, ve))
328
- br(s, i);
326
+ j(this, de, bn).call(this, r), j(this, de, bn).call(this, n);
327
+ for (const [s, i] of l(this, ge))
328
+ Tr(s, i);
329
329
  } else {
330
- for (const s of l(this, Qe)) s();
331
- l(this, Qe).clear(), l(this, je) === 0 && j(this, ce, pr).call(this), x = null, Bn(r), Bn(n), l(this, $t)?.resolve();
330
+ for (const s of l(this, tt)) s();
331
+ l(this, tt).clear(), l(this, ze) === 0 && j(this, de, kr).call(this), x = null, er(r), er(n), l(this, Et)?.resolve();
332
332
  }
333
- Q = null;
333
+ ee = null;
334
334
  }
335
335
  /**
336
336
  * Associate a change to a given source with the current
@@ -339,63 +339,63 @@ const An = class An {
339
339
  * @param {any} value
340
340
  */
341
341
  capture(t, n) {
342
- n !== R && !this.previous.has(t) && this.previous.set(t, n), (t.f & Me) === 0 && (this.current.set(t, t.v), Q?.set(t, t.v));
342
+ n !== O && !this.previous.has(t) && this.previous.set(t, n), (t.f & Ce) === 0 && (this.current.set(t, t.v), ee?.set(t, t.v));
343
343
  }
344
344
  activate() {
345
345
  x = this, this.apply();
346
346
  }
347
347
  deactivate() {
348
- x === this && (x = null, Q = null);
348
+ x === this && (x = null, ee = null);
349
349
  }
350
350
  flush() {
351
- if (this.activate(), F.length > 0) {
352
- if (gr(), x !== null && x !== this)
351
+ if (this.activate(), H.length > 0) {
352
+ if (Ir(), x !== null && x !== this)
353
353
  return;
354
- } else l(this, je) === 0 && this.process([]);
354
+ } else l(this, ze) === 0 && this.process([]);
355
355
  this.deactivate();
356
356
  }
357
357
  discard() {
358
- for (const t of l(this, et)) t(this);
359
- l(this, et).clear();
358
+ for (const t of l(this, nt)) t(this);
359
+ l(this, nt).clear();
360
360
  }
361
361
  /**
362
362
  *
363
363
  * @param {boolean} blocking
364
364
  */
365
365
  increment(t) {
366
- p(this, je, l(this, je) + 1), t && p(this, tt, l(this, tt) + 1);
366
+ p(this, ze, l(this, ze) + 1), t && p(this, rt, l(this, rt) + 1);
367
367
  }
368
368
  /**
369
369
  *
370
370
  * @param {boolean} blocking
371
371
  */
372
372
  decrement(t) {
373
- p(this, je, l(this, je) - 1), t && p(this, tt, l(this, tt) - 1), !l(this, nt) && (p(this, nt, !0), Ze(() => {
374
- p(this, nt, !1), this.is_deferred() ? F.length > 0 && this.flush() : this.revive();
373
+ p(this, ze, l(this, ze) - 1), t && p(this, rt, l(this, rt) - 1), !l(this, st) && (p(this, st, !0), et(() => {
374
+ p(this, st, !1), this.is_deferred() ? H.length > 0 && this.flush() : this.revive();
375
375
  }));
376
376
  }
377
377
  revive() {
378
- for (const t of l(this, yt))
379
- l(this, Fe).delete(t), M(t, D), ee(t);
380
- for (const t of l(this, Fe))
381
- M(t, ne), ee(t);
378
+ for (const t of l(this, St))
379
+ l(this, Ve).delete(t), M(t, P), te(t);
380
+ for (const t of l(this, Ve))
381
+ M(t, re), te(t);
382
382
  this.flush();
383
383
  }
384
384
  /** @param {() => void} fn */
385
385
  oncommit(t) {
386
- l(this, Qe).add(t);
386
+ l(this, tt).add(t);
387
387
  }
388
388
  /** @param {(batch: Batch) => void} fn */
389
389
  ondiscard(t) {
390
- l(this, et).add(t);
390
+ l(this, nt).add(t);
391
391
  }
392
392
  settled() {
393
- return (l(this, $t) ?? p(this, $t, rr())).promise;
393
+ return (l(this, Et) ?? p(this, Et, hr())).promise;
394
394
  }
395
395
  static ensure() {
396
396
  if (x === null) {
397
- const t = x = new An();
398
- Ct.add(x), pt || Ze(() => {
397
+ const t = x = new jn();
398
+ Ot.add(x), mt || et(() => {
399
399
  x === t && t.flush();
400
400
  });
401
401
  }
@@ -404,19 +404,19 @@ const An = class An {
404
404
  apply() {
405
405
  }
406
406
  };
407
- Qe = new WeakMap(), et = new WeakMap(), je = new WeakMap(), tt = new WeakMap(), $t = new WeakMap(), yt = new WeakMap(), Fe = new WeakMap(), ve = new WeakMap(), nt = new WeakMap(), ce = new WeakSet(), /**
407
+ tt = new WeakMap(), nt = new WeakMap(), ze = new WeakMap(), rt = new WeakMap(), Et = new WeakMap(), St = new WeakMap(), Ve = new WeakMap(), ge = new WeakMap(), st = new WeakMap(), de = new WeakSet(), /**
408
408
  * Traverse the effect tree, executing effects or stashing
409
409
  * them for later execution as appropriate
410
410
  * @param {Effect} root
411
411
  * @param {Effect[]} effects
412
412
  * @param {Effect[]} render_effects
413
413
  */
414
- an = function(t, n, r) {
415
- t.f ^= N;
414
+ wn = function(t, n, r) {
415
+ t.f ^= C;
416
416
  for (var s = t.first, i = null; s !== null; ) {
417
- var o = s.f, f = (o & (de | Ne)) !== 0, u = f && (o & N) !== 0, a = u || (o & fe) !== 0 || l(this, ve).has(s);
418
- if (!a && s.fn !== null) {
419
- f ? s.f ^= N : i !== null && (o & (zt | Wt | sr)) !== 0 ? i.b.defer_effect(s) : (o & zt) !== 0 ? n.push(s) : It(s) && ((o & $e) !== 0 && l(this, Fe).add(s), dt(s));
417
+ var o = s.f, u = (o & (he | Oe)) !== 0, a = u && (o & C) !== 0, f = a || (o & ae) !== 0 || l(this, ge).has(s);
418
+ if (!f && s.fn !== null) {
419
+ u ? s.f ^= C : i !== null && (o & (Bt | Xt | vr)) !== 0 ? i.b.defer_effect(s) : (o & Bt) !== 0 ? n.push(s) : Mt(s) && ((o & Se) !== 0 && l(this, Ve).add(s), vt(s));
420
420
  var c = s.first;
421
421
  if (c !== null) {
422
422
  s = c;
@@ -425,9 +425,9 @@ an = function(t, n, r) {
425
425
  }
426
426
  for (; s !== null; ) {
427
427
  s === i && (i = null);
428
- var h = s.next;
429
- if (h !== null) {
430
- s = h;
428
+ var v = s.next;
429
+ if (v !== null) {
430
+ s = v;
431
431
  break;
432
432
  }
433
433
  s = s.parent;
@@ -436,137 +436,137 @@ an = function(t, n, r) {
436
436
  }, /**
437
437
  * @param {Effect[]} effects
438
438
  */
439
- cn = function(t) {
439
+ bn = function(t) {
440
440
  for (var n = 0; n < t.length; n += 1)
441
- _r(t[n], l(this, yt), l(this, Fe));
442
- }, pr = function() {
441
+ xr(t[n], l(this, St), l(this, Ve));
442
+ }, kr = function() {
443
443
  var s;
444
- if (Ct.size > 1) {
444
+ if (Ot.size > 1) {
445
445
  this.previous.clear();
446
- var t = Q, n = !0;
447
- for (const i of Ct) {
446
+ var t = ee, n = !0;
447
+ for (const i of Ot) {
448
448
  if (i === this) {
449
449
  n = !1;
450
450
  continue;
451
451
  }
452
452
  const o = [];
453
- for (const [u, a] of this.current) {
454
- if (i.current.has(u))
455
- if (n && a !== i.current.get(u))
456
- i.current.set(u, a);
453
+ for (const [a, f] of this.current) {
454
+ if (i.current.has(a))
455
+ if (n && f !== i.current.get(a))
456
+ i.current.set(a, f);
457
457
  else
458
458
  continue;
459
- o.push(u);
459
+ o.push(a);
460
460
  }
461
461
  if (o.length === 0)
462
462
  continue;
463
- const f = [...i.current.keys()].filter((u) => !this.current.has(u));
464
- if (f.length > 0) {
465
- var r = F;
466
- F = [];
467
- const u = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
463
+ const u = [...i.current.keys()].filter((a) => !this.current.has(a));
464
+ if (u.length > 0) {
465
+ var r = H;
466
+ H = [];
467
+ const a = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
468
468
  for (const c of o)
469
- mr(c, f, u, a);
470
- if (F.length > 0) {
469
+ Ar(c, u, a, f);
470
+ if (H.length > 0) {
471
471
  x = i, i.apply();
472
- for (const c of F)
473
- j(s = i, ce, an).call(s, c, [], []);
472
+ for (const c of H)
473
+ j(s = i, de, wn).call(s, c, [], []);
474
474
  i.deactivate();
475
475
  }
476
- F = r;
476
+ H = r;
477
477
  }
478
478
  }
479
- x = null, Q = t;
479
+ x = null, ee = t;
480
480
  }
481
- this.committed = !0, Ct.delete(this);
481
+ this.committed = !0, Ot.delete(this);
482
482
  };
483
- let be = An;
484
- function Dt(e) {
485
- var t = pt;
486
- pt = !0;
483
+ let Ee = jn;
484
+ function Ft(e) {
485
+ var t = mt;
486
+ mt = !0;
487
487
  try {
488
488
  for (var n; ; ) {
489
- if (Vs(), F.length === 0 && (x?.flush(), F.length === 0))
490
- return Xt = null, /** @type {T} */
489
+ if (Qs(), H.length === 0 && (x?.flush(), H.length === 0))
490
+ return Gt = null, /** @type {T} */
491
491
  n;
492
- gr();
492
+ Ir();
493
493
  }
494
494
  } finally {
495
- pt = t;
495
+ mt = t;
496
496
  }
497
497
  }
498
- function gr() {
499
- un = !0;
498
+ function Ir() {
499
+ mn = !0;
500
500
  var e = null;
501
501
  try {
502
- for (var t = 0; F.length > 0; ) {
503
- var n = be.ensure();
502
+ for (var t = 0; H.length > 0; ) {
503
+ var n = Ee.ensure();
504
504
  if (t++ > 1e3) {
505
505
  var r, s;
506
- Bs();
506
+ ti();
507
507
  }
508
- n.process(F), Ae.clear();
508
+ n.process(H), Re.clear();
509
509
  }
510
510
  } finally {
511
- F = [], un = !1, Xt = null;
511
+ H = [], mn = !1, Gt = null;
512
512
  }
513
513
  }
514
- function Bs() {
514
+ function ti() {
515
515
  try {
516
- As();
516
+ zs();
517
517
  } catch (e) {
518
- at(e, Xt);
518
+ dt(e, Gt);
519
519
  }
520
520
  }
521
- let he = null;
522
- function Bn(e) {
521
+ let pe = null;
522
+ function er(e) {
523
523
  var t = e.length;
524
524
  if (t !== 0) {
525
525
  for (var n = 0; n < t; ) {
526
526
  var r = e[n++];
527
- if ((r.f & (we | fe)) === 0 && It(r) && (he = /* @__PURE__ */ new Set(), dt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Lr(r), he?.size > 0)) {
528
- Ae.clear();
529
- for (const s of he) {
530
- if ((s.f & (we | fe)) !== 0) continue;
527
+ if ((r.f & ($e | ae)) === 0 && Mt(r) && (pe = /* @__PURE__ */ new Set(), vt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Ur(r), pe?.size > 0)) {
528
+ Re.clear();
529
+ for (const s of pe) {
530
+ if ((s.f & ($e | ae)) !== 0) continue;
531
531
  const i = [s];
532
532
  let o = s.parent;
533
533
  for (; o !== null; )
534
- he.has(o) && (he.delete(o), i.push(o)), o = o.parent;
535
- for (let f = i.length - 1; f >= 0; f--) {
536
- const u = i[f];
537
- (u.f & (we | fe)) === 0 && dt(u);
534
+ pe.has(o) && (pe.delete(o), i.push(o)), o = o.parent;
535
+ for (let u = i.length - 1; u >= 0; u--) {
536
+ const a = i[u];
537
+ (a.f & ($e | ae)) === 0 && vt(a);
538
538
  }
539
539
  }
540
- he.clear();
540
+ pe.clear();
541
541
  }
542
542
  }
543
- he = null;
543
+ pe = null;
544
544
  }
545
545
  }
546
- function mr(e, t, n, r) {
546
+ function Ar(e, t, n, r) {
547
547
  if (!n.has(e) && (n.add(e), e.reactions !== null))
548
548
  for (const s of e.reactions) {
549
549
  const i = s.f;
550
- (i & O) !== 0 ? mr(
550
+ (i & L) !== 0 ? Ar(
551
551
  /** @type {Derived} */
552
552
  s,
553
553
  t,
554
554
  n,
555
555
  r
556
- ) : (i & (yn | $e)) !== 0 && (i & D) === 0 && wr(s, t, r) && (M(s, D), ee(
556
+ ) : (i & (Cn | Se)) !== 0 && (i & P) === 0 && Mr(s, t, r) && (M(s, P), te(
557
557
  /** @type {Effect} */
558
558
  s
559
559
  ));
560
560
  }
561
561
  }
562
- function wr(e, t, n) {
562
+ function Mr(e, t, n) {
563
563
  const r = n.get(e);
564
564
  if (r !== void 0) return r;
565
565
  if (e.deps !== null)
566
566
  for (const s of e.deps) {
567
- if (lt.call(t, s))
567
+ if (at.call(t, s))
568
568
  return !0;
569
- if ((s.f & O) !== 0 && wr(
569
+ if ((s.f & L) !== 0 && Mr(
570
570
  /** @type {Derived} */
571
571
  s,
572
572
  t,
@@ -580,77 +580,77 @@ function wr(e, t, n) {
580
580
  }
581
581
  return n.set(e, !1), !1;
582
582
  }
583
- function ee(e) {
584
- for (var t = Xt = e; t.parent !== null; ) {
583
+ function te(e) {
584
+ for (var t = Gt = e; t.parent !== null; ) {
585
585
  t = t.parent;
586
586
  var n = t.f;
587
- if (un && t === $ && (n & $e) !== 0 && (n & ir) === 0)
587
+ if (mn && t === y && (n & Se) !== 0 && (n & _r) === 0)
588
588
  return;
589
- if ((n & (Ne | de)) !== 0) {
590
- if ((n & N) === 0) return;
591
- t.f ^= N;
589
+ if ((n & (Oe | he)) !== 0) {
590
+ if ((n & C) === 0) return;
591
+ t.f ^= C;
592
592
  }
593
593
  }
594
- F.push(t);
594
+ H.push(t);
595
595
  }
596
- function br(e, t) {
597
- if (!((e.f & de) !== 0 && (e.f & N) !== 0)) {
598
- (e.f & D) !== 0 ? t.d.push(e) : (e.f & ne) !== 0 && t.m.push(e), M(e, N);
596
+ function Tr(e, t) {
597
+ if (!((e.f & he) !== 0 && (e.f & C) !== 0)) {
598
+ (e.f & P) !== 0 ? t.d.push(e) : (e.f & re) !== 0 && t.m.push(e), M(e, C);
599
599
  for (var n = e.first; n !== null; )
600
- br(n, t), n = n.next;
600
+ Tr(n, t), n = n.next;
601
601
  }
602
602
  }
603
- function Ws(e) {
604
- let t = 0, n = kt(0), r;
603
+ function ni(e) {
604
+ let t = 0, n = At(0), r;
605
605
  return () => {
606
- Tn() && (w(n), Or(() => (t === 0 && (r = Xr(() => e(() => gt(n)))), t += 1, () => {
607
- Ze(() => {
608
- t -= 1, t === 0 && (r?.(), r = void 0, gt(n));
606
+ Pn() && (m(n), Br(() => (t === 0 && (r = ss(() => e(() => wt(n)))), t += 1, () => {
607
+ et(() => {
608
+ t -= 1, t === 0 && (r?.(), r = void 0, wt(n));
609
609
  });
610
610
  })));
611
611
  };
612
612
  }
613
- var qs = ft | qe;
614
- function Us(e, t, n) {
615
- new Xs(e, t, n);
613
+ var ri = ft | Je;
614
+ function si(e, t, n) {
615
+ new ii(e, t, n);
616
616
  }
617
- var U, Et, _e, He, se, ie, B, oe, pe, ze, Te, rt, st, it, ge, Yt, L, $r, yr, dn, Pt, hn;
618
- class Xs {
617
+ var X, xt, me, Ye, ie, oe, W, le, we, Be, Te, it, ot, lt, be, qt, F, Cr, Rr, yn, jt, $n;
618
+ class ii {
619
619
  /**
620
620
  * @param {TemplateNode} node
621
621
  * @param {BoundaryProps} props
622
622
  * @param {((anchor: Node) => void)} children
623
623
  */
624
624
  constructor(t, n, r) {
625
- m(this, L);
625
+ w(this, F);
626
626
  /** @type {Boundary | null} */
627
- T(this, "parent");
628
- T(this, "is_pending", !1);
627
+ A(this, "parent");
628
+ A(this, "is_pending", !1);
629
629
  /** @type {TemplateNode} */
630
- m(this, U);
630
+ w(this, X);
631
631
  /** @type {TemplateNode | null} */
632
- m(this, Et, k ? S : null);
632
+ w(this, xt, I ? k : null);
633
633
  /** @type {BoundaryProps} */
634
- m(this, _e);
634
+ w(this, me);
635
635
  /** @type {((anchor: Node) => void)} */
636
- m(this, He);
636
+ w(this, Ye);
637
637
  /** @type {Effect} */
638
- m(this, se);
638
+ w(this, ie);
639
639
  /** @type {Effect | null} */
640
- m(this, ie, null);
640
+ w(this, oe, null);
641
641
  /** @type {Effect | null} */
642
- m(this, B, null);
642
+ w(this, W, null);
643
643
  /** @type {Effect | null} */
644
- m(this, oe, null);
644
+ w(this, le, null);
645
645
  /** @type {DocumentFragment | null} */
646
- m(this, pe, null);
647
- m(this, ze, 0);
648
- m(this, Te, 0);
649
- m(this, rt, !1);
646
+ w(this, we, null);
647
+ w(this, Be, 0);
648
+ w(this, Te, 0);
649
+ w(this, it, !1);
650
650
  /** @type {Set<Effect>} */
651
- m(this, st, /* @__PURE__ */ new Set());
651
+ w(this, ot, /* @__PURE__ */ new Set());
652
652
  /** @type {Set<Effect>} */
653
- m(this, it, /* @__PURE__ */ new Set());
653
+ w(this, lt, /* @__PURE__ */ new Set());
654
654
  /**
655
655
  * A source containing the number of pending async deriveds/expressions.
656
656
  * Only created if `$effect.pending()` is used inside the boundary,
@@ -658,34 +658,34 @@ class Xs {
658
658
  * calls followed by no-op flushes
659
659
  * @type {Source<number> | null}
660
660
  */
661
- m(this, ge, null);
662
- m(this, Yt, Ws(() => (p(this, ge, kt(l(this, ze))), () => {
663
- p(this, ge, null);
661
+ w(this, be, null);
662
+ w(this, qt, ni(() => (p(this, be, At(l(this, Be))), () => {
663
+ p(this, be, null);
664
664
  })));
665
- p(this, U, t), p(this, _e, n), p(this, He, (s) => {
665
+ p(this, X, t), p(this, me, n), p(this, Ye, (s) => {
666
666
  var i = (
667
667
  /** @type {Effect} */
668
- $
668
+ y
669
669
  );
670
- i.b = this, i.f |= ln, r(s);
670
+ i.b = this, i.f |= pn, r(s);
671
671
  }), this.parent = /** @type {Effect} */
672
- $.b, p(this, se, Dr(() => {
673
- if (k) {
672
+ y.b, p(this, ie, Wr(() => {
673
+ if (I) {
674
674
  const s = (
675
675
  /** @type {Comment} */
676
- l(this, Et)
676
+ l(this, xt)
677
677
  );
678
- xn(), s.data === $n ? j(this, L, yr).call(this) : j(this, L, $r).call(this);
678
+ Nn(), s.data === Tn ? j(this, F, Rr).call(this) : j(this, F, Cr).call(this);
679
679
  } else
680
- j(this, L, dn).call(this);
681
- }, qs)), k && p(this, U, S);
680
+ j(this, F, yn).call(this);
681
+ }, ri)), I && p(this, X, k);
682
682
  }
683
683
  /**
684
684
  * Defer an effect inside a pending boundary until the boundary resolves
685
685
  * @param {Effect} effect
686
686
  */
687
687
  defer_effect(t) {
688
- _r(t, l(this, st), l(this, it));
688
+ xr(t, l(this, ot), l(this, lt));
689
689
  }
690
690
  /**
691
691
  * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
@@ -695,7 +695,7 @@ class Xs {
695
695
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
696
696
  }
697
697
  has_pending_snippet() {
698
- return !!l(this, _e).pending;
698
+ return !!l(this, me).pending;
699
699
  }
700
700
  /**
701
701
  * Update the source that powers `$effect.pending()` inside this boundary,
@@ -704,99 +704,99 @@ class Xs {
704
704
  * @param {1 | -1} d
705
705
  */
706
706
  update_pending_count(t) {
707
- j(this, L, hn).call(this, t), p(this, ze, l(this, ze) + t), !(!l(this, ge) || l(this, rt)) && (p(this, rt, !0), Ze(() => {
708
- p(this, rt, !1), l(this, ge) && Vt(l(this, ge), l(this, ze));
707
+ j(this, F, $n).call(this, t), p(this, Be, l(this, Be) + t), !(!l(this, be) || l(this, it)) && (p(this, it, !0), et(() => {
708
+ p(this, it, !1), l(this, be) && Wt(l(this, be), l(this, Be));
709
709
  }));
710
710
  }
711
711
  get_effect_pending() {
712
- return l(this, Yt).call(this), w(
712
+ return l(this, qt).call(this), m(
713
713
  /** @type {Source<number>} */
714
- l(this, ge)
714
+ l(this, be)
715
715
  );
716
716
  }
717
717
  /** @param {unknown} error */
718
718
  error(t) {
719
- var n = l(this, _e).onerror;
720
- let r = l(this, _e).failed;
719
+ var n = l(this, me).onerror;
720
+ let r = l(this, me).failed;
721
721
  if (!n && !r)
722
722
  throw t;
723
- l(this, ie) && (z(l(this, ie)), p(this, ie, null)), l(this, B) && (z(l(this, B)), p(this, B, null)), l(this, oe) && (z(l(this, oe)), p(this, oe, null)), k && (ue(
723
+ l(this, oe) && (V(l(this, oe)), p(this, oe, null)), l(this, W) && (V(l(this, W)), p(this, W, null)), l(this, le) && (V(l(this, le)), p(this, le, null)), I && (fe(
724
724
  /** @type {TemplateNode} */
725
- l(this, Et)
726
- ), Ls(), ue(lr()));
725
+ l(this, xt)
726
+ ), Xs(), fe(gr()));
727
727
  var s = !1, i = !1;
728
728
  const o = () => {
729
729
  if (s) {
730
- Ps();
730
+ Us();
731
731
  return;
732
732
  }
733
- s = !0, i && Ds(), l(this, oe) !== null && mt(l(this, oe), () => {
734
- p(this, oe, null);
735
- }), j(this, L, Pt).call(this, () => {
736
- be.ensure(), j(this, L, dn).call(this);
733
+ s = !0, i && qs(), l(this, le) !== null && bt(l(this, le), () => {
734
+ p(this, le, null);
735
+ }), j(this, F, jt).call(this, () => {
736
+ Ee.ensure(), j(this, F, yn).call(this);
737
737
  });
738
738
  };
739
- Ze(() => {
739
+ et(() => {
740
740
  try {
741
741
  i = !0, n?.(t, o), i = !1;
742
- } catch (f) {
743
- at(f, l(this, se) && l(this, se).parent);
742
+ } catch (u) {
743
+ dt(u, l(this, ie) && l(this, ie).parent);
744
744
  }
745
- r && p(this, oe, j(this, L, Pt).call(this, () => {
746
- be.ensure();
745
+ r && p(this, le, j(this, F, jt).call(this, () => {
746
+ Ee.ensure();
747
747
  try {
748
- return Ie(() => {
749
- var f = (
748
+ return Me(() => {
749
+ var u = (
750
750
  /** @type {Effect} */
751
- $
751
+ y
752
752
  );
753
- f.b = this, f.f |= ln, r(
754
- l(this, U),
753
+ u.b = this, u.f |= pn, r(
754
+ l(this, X),
755
755
  () => t,
756
756
  () => o
757
757
  );
758
758
  });
759
- } catch (f) {
760
- return at(
761
- f,
759
+ } catch (u) {
760
+ return dt(
761
+ u,
762
762
  /** @type {Effect} */
763
- l(this, se).parent
763
+ l(this, ie).parent
764
764
  ), null;
765
765
  }
766
766
  }));
767
767
  });
768
768
  }
769
769
  }
770
- U = new WeakMap(), Et = new WeakMap(), _e = new WeakMap(), He = new WeakMap(), se = new WeakMap(), ie = new WeakMap(), B = new WeakMap(), oe = new WeakMap(), pe = new WeakMap(), ze = new WeakMap(), Te = new WeakMap(), rt = new WeakMap(), st = new WeakMap(), it = new WeakMap(), ge = new WeakMap(), Yt = new WeakMap(), L = new WeakSet(), $r = function() {
770
+ X = new WeakMap(), xt = new WeakMap(), me = new WeakMap(), Ye = new WeakMap(), ie = new WeakMap(), oe = new WeakMap(), W = new WeakMap(), le = new WeakMap(), we = new WeakMap(), Be = new WeakMap(), Te = new WeakMap(), it = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), be = new WeakMap(), qt = new WeakMap(), F = new WeakSet(), Cr = function() {
771
771
  try {
772
- p(this, ie, Ie(() => l(this, He).call(this, l(this, U))));
772
+ p(this, oe, Me(() => l(this, Ye).call(this, l(this, X))));
773
773
  } catch (t) {
774
774
  this.error(t);
775
775
  }
776
- }, yr = function() {
777
- const t = l(this, _e).pending;
778
- t && (this.is_pending = !0, p(this, B, Ie(() => t(l(this, U)))), Ze(() => {
779
- var n = p(this, pe, document.createDocumentFragment()), r = We();
780
- n.append(r), p(this, ie, j(this, L, Pt).call(this, () => (be.ensure(), Ie(() => l(this, He).call(this, r))))), l(this, Te) === 0 && (l(this, U).before(n), p(this, pe, null), mt(
776
+ }, Rr = function() {
777
+ const t = l(this, me).pending;
778
+ t && (this.is_pending = !0, p(this, W, Me(() => t(l(this, X)))), et(() => {
779
+ var n = p(this, we, document.createDocumentFragment()), r = Xe();
780
+ n.append(r), p(this, oe, j(this, F, jt).call(this, () => (Ee.ensure(), Me(() => l(this, Ye).call(this, r))))), l(this, Te) === 0 && (l(this, X).before(n), p(this, we, null), bt(
781
781
  /** @type {Effect} */
782
- l(this, B),
782
+ l(this, W),
783
783
  () => {
784
- p(this, B, null);
784
+ p(this, W, null);
785
785
  }
786
786
  ), this.is_pending = !1);
787
787
  }));
788
- }, dn = function() {
788
+ }, yn = function() {
789
789
  try {
790
- if (this.is_pending = this.has_pending_snippet(), p(this, Te, 0), p(this, ze, 0), p(this, ie, Ie(() => {
791
- l(this, He).call(this, l(this, U));
790
+ if (this.is_pending = this.has_pending_snippet(), p(this, Te, 0), p(this, Be, 0), p(this, oe, Me(() => {
791
+ l(this, Ye).call(this, l(this, X));
792
792
  })), l(this, Te) > 0) {
793
- var t = p(this, pe, document.createDocumentFragment());
794
- Hr(l(this, ie), t);
793
+ var t = p(this, we, document.createDocumentFragment());
794
+ Kr(l(this, oe), t);
795
795
  const n = (
796
796
  /** @type {(anchor: Node) => void} */
797
- l(this, _e).pending
797
+ l(this, me).pending
798
798
  );
799
- p(this, B, Ie(() => n(l(this, U))));
799
+ p(this, W, Me(() => n(l(this, X))));
800
800
  } else
801
801
  this.is_pending = !1;
802
802
  } catch (n) {
@@ -806,107 +806,107 @@ U = new WeakMap(), Et = new WeakMap(), _e = new WeakMap(), He = new WeakMap(), s
806
806
  * @template T
807
807
  * @param {() => T} fn
808
808
  */
809
- Pt = function(t) {
810
- var n = $, r = b, s = V;
811
- ae(l(this, se)), G(l(this, se)), ut(l(this, se).ctx);
809
+ jt = function(t) {
810
+ var n = y, r = b, s = Y;
811
+ ce(l(this, ie)), Z(l(this, ie)), ct(l(this, ie).ctx);
812
812
  try {
813
813
  return t();
814
814
  } catch (i) {
815
- return hr(i), null;
815
+ return Er(i), null;
816
816
  } finally {
817
- ae(n), G(r), ut(s);
817
+ ce(n), Z(r), ct(s);
818
818
  }
819
819
  }, /**
820
820
  * Updates the pending count associated with the currently visible pending snippet,
821
821
  * if any, such that we can replace the snippet with content once work is done
822
822
  * @param {1 | -1} d
823
823
  */
824
- hn = function(t) {
824
+ $n = function(t) {
825
825
  var n;
826
826
  if (!this.has_pending_snippet()) {
827
- this.parent && j(n = this.parent, L, hn).call(n, t);
827
+ this.parent && j(n = this.parent, F, $n).call(n, t);
828
828
  return;
829
829
  }
830
830
  if (p(this, Te, l(this, Te) + t), l(this, Te) === 0) {
831
831
  this.is_pending = !1;
832
- for (const r of l(this, st))
833
- M(r, D), ee(r);
834
- for (const r of l(this, it))
835
- M(r, ne), ee(r);
836
- l(this, st).clear(), l(this, it).clear(), l(this, B) && mt(l(this, B), () => {
837
- p(this, B, null);
838
- }), l(this, pe) && (l(this, U).before(l(this, pe)), p(this, pe, null));
832
+ for (const r of l(this, ot))
833
+ M(r, P), te(r);
834
+ for (const r of l(this, lt))
835
+ M(r, re), te(r);
836
+ l(this, ot).clear(), l(this, lt).clear(), l(this, W) && bt(l(this, W), () => {
837
+ p(this, W, null);
838
+ }), l(this, we) && (l(this, X).before(l(this, we)), p(this, we, null));
839
839
  }
840
840
  };
841
- function Js(e, t, n, r) {
842
- const s = kn;
841
+ function oi(e, t, n, r) {
842
+ const s = Dn;
843
843
  var i = e.filter((d) => !d.settled);
844
844
  if (n.length === 0 && i.length === 0) {
845
845
  r(t.map(s));
846
846
  return;
847
847
  }
848
- var o = x, f = (
848
+ var o = x, u = (
849
849
  /** @type {Effect} */
850
- $
851
- ), u = Ks(), a = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((d) => d.promise)) : null;
850
+ y
851
+ ), a = li(), f = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((d) => d.promise)) : null;
852
852
  function c(d) {
853
- u();
853
+ a();
854
854
  try {
855
855
  r(d);
856
856
  } catch (g) {
857
- (f.f & we) === 0 && at(g, f);
857
+ (u.f & $e) === 0 && dt(g, u);
858
858
  }
859
- o?.deactivate(), vn();
859
+ o?.deactivate(), En();
860
860
  }
861
861
  if (n.length === 0) {
862
- a.then(() => c(t.map(s)));
862
+ f.then(() => c(t.map(s)));
863
863
  return;
864
864
  }
865
- function h() {
866
- u(), Promise.all(n.map((d) => /* @__PURE__ */ Gs(d))).then((d) => c([...t.map(s), ...d])).catch((d) => at(d, f));
865
+ function v() {
866
+ a(), Promise.all(n.map((d) => /* @__PURE__ */ ui(d))).then((d) => c([...t.map(s), ...d])).catch((d) => dt(d, u));
867
867
  }
868
- a ? a.then(h) : h();
868
+ f ? f.then(v) : v();
869
869
  }
870
- function Ks() {
871
- var e = $, t = b, n = V, r = x;
870
+ function li() {
871
+ var e = y, t = b, n = Y, r = x;
872
872
  return function(i = !0) {
873
- ae(e), G(t), ut(n), i && r?.activate();
873
+ ce(e), Z(t), ct(n), i && r?.activate();
874
874
  };
875
875
  }
876
- function vn() {
877
- ae(null), G(null), ut(null);
876
+ function En() {
877
+ ce(null), Z(null), ct(null);
878
878
  }
879
879
  // @__NO_SIDE_EFFECTS__
880
- function kn(e) {
881
- var t = O | D, n = b !== null && (b.f & O) !== 0 ? (
880
+ function Dn(e) {
881
+ var t = L | P, n = b !== null && (b.f & L) !== 0 ? (
882
882
  /** @type {Derived} */
883
883
  b
884
884
  ) : null;
885
- return $ !== null && ($.f |= qe), {
886
- ctx: V,
885
+ return y !== null && (y.f |= Je), {
886
+ ctx: Y,
887
887
  deps: null,
888
888
  effects: null,
889
- equals: fr,
889
+ equals: mr,
890
890
  f: t,
891
891
  fn: e,
892
892
  reactions: null,
893
893
  rv: 0,
894
894
  v: (
895
895
  /** @type {V} */
896
- R
896
+ O
897
897
  ),
898
898
  wv: 0,
899
- parent: n ?? $,
899
+ parent: n ?? y,
900
900
  ac: null
901
901
  };
902
902
  }
903
903
  // @__NO_SIDE_EFFECTS__
904
- function Gs(e, t, n) {
904
+ function ui(e, t, n) {
905
905
  let r = (
906
906
  /** @type {Effect | null} */
907
- $
907
+ y
908
908
  );
909
- r === null && ks();
909
+ r === null && Ps();
910
910
  var s = (
911
911
  /** @type {Boundary} */
912
912
  r.b
@@ -914,74 +914,74 @@ function Gs(e, t, n) {
914
914
  /** @type {Promise<V>} */
915
915
  /** @type {unknown} */
916
916
  void 0
917
- ), o = kt(
917
+ ), o = At(
918
918
  /** @type {V} */
919
- R
920
- ), f = !b, u = /* @__PURE__ */ new Map();
921
- return ci(() => {
922
- var a = rr();
923
- i = a.promise;
919
+ O
920
+ ), u = !b, a = /* @__PURE__ */ new Map();
921
+ return $i(() => {
922
+ var f = hr();
923
+ i = f.promise;
924
924
  try {
925
- Promise.resolve(e()).then(a.resolve, a.reject).then(() => {
926
- c === x && c.committed && c.deactivate(), vn();
925
+ Promise.resolve(e()).then(f.resolve, f.reject).then(() => {
926
+ c === x && c.committed && c.deactivate(), En();
927
927
  });
928
928
  } catch (g) {
929
- a.reject(g), vn();
929
+ f.reject(g), En();
930
930
  }
931
931
  var c = (
932
932
  /** @type {Batch} */
933
933
  x
934
934
  );
935
- if (f) {
936
- var h = s.is_rendered();
937
- s.update_pending_count(1), c.increment(h), u.get(c)?.reject(Oe), u.delete(c), u.set(c, a);
935
+ if (u) {
936
+ var v = s.is_rendered();
937
+ s.update_pending_count(1), c.increment(v), a.get(c)?.reject(Pe), a.delete(c), a.set(c, f);
938
938
  }
939
- const d = (g, v = void 0) => {
940
- if (c.activate(), v)
941
- v !== Oe && (o.f |= Me, Vt(o, v));
939
+ const d = (g, _ = void 0) => {
940
+ if (c.activate(), _)
941
+ _ !== Pe && (o.f |= Ce, Wt(o, _));
942
942
  else {
943
- (o.f & Me) !== 0 && (o.f ^= Me), Vt(o, g);
944
- for (const [C, y] of u) {
945
- if (u.delete(C), C === c) break;
946
- y.reject(Oe);
943
+ (o.f & Ce) !== 0 && (o.f ^= Ce), Wt(o, g);
944
+ for (const [T, E] of a) {
945
+ if (a.delete(T), T === c) break;
946
+ E.reject(Pe);
947
947
  }
948
948
  }
949
- f && (s.update_pending_count(-1), c.decrement(h));
949
+ u && (s.update_pending_count(-1), c.decrement(v));
950
950
  };
951
- a.promise.then(d, (g) => d(null, g || "unknown"));
952
- }), fi(() => {
953
- for (const a of u.values())
954
- a.reject(Oe);
955
- }), new Promise((a) => {
956
- function c(h) {
951
+ f.promise.then(d, (g) => d(null, g || "unknown"));
952
+ }), wi(() => {
953
+ for (const f of a.values())
954
+ f.reject(Pe);
955
+ }), new Promise((f) => {
956
+ function c(v) {
957
957
  function d() {
958
- h === i ? a(o) : c(i);
958
+ v === i ? f(o) : c(i);
959
959
  }
960
- h.then(d, d);
960
+ v.then(d, d);
961
961
  }
962
962
  c(i);
963
963
  });
964
964
  }
965
965
  // @__NO_SIDE_EFFECTS__
966
- function Zs(e) {
967
- const t = /* @__PURE__ */ kn(e);
968
- return zr(t), t;
966
+ function ai(e) {
967
+ const t = /* @__PURE__ */ Dn(e);
968
+ return Gr(t), t;
969
969
  }
970
- function Qs(e) {
970
+ function fi(e) {
971
971
  var t = e.effects;
972
972
  if (t !== null) {
973
973
  e.effects = null;
974
974
  for (var n = 0; n < t.length; n += 1)
975
- z(
975
+ V(
976
976
  /** @type {Effect} */
977
977
  t[n]
978
978
  );
979
979
  }
980
980
  }
981
- function ei(e) {
981
+ function ci(e) {
982
982
  for (var t = e.parent; t !== null; ) {
983
- if ((t.f & O) === 0)
984
- return (t.f & we) === 0 ? (
983
+ if ((t.f & L) === 0)
984
+ return (t.f & $e) === 0 ? (
985
985
  /** @type {Effect} */
986
986
  t
987
987
  ) : null;
@@ -989,172 +989,172 @@ function ei(e) {
989
989
  }
990
990
  return null;
991
991
  }
992
- function In(e) {
993
- var t, n = $;
994
- ae(ei(e));
992
+ function Ln(e) {
993
+ var t, n = y;
994
+ ce(ci(e));
995
995
  try {
996
- e.f &= ~Be, Qs(e), t = Wr(e);
996
+ e.f &= ~Ue, fi(e), t = ts(e);
997
997
  } finally {
998
- ae(n);
998
+ ce(n);
999
999
  }
1000
1000
  return t;
1001
1001
  }
1002
- function Er(e) {
1003
- var t = In(e);
1004
- if (!e.equals(t) && (e.wv = Yr(), (!x?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
1005
- M(e, N);
1002
+ function Nr(e) {
1003
+ var t = Ln(e);
1004
+ if (!e.equals(t) && (e.wv = Qr(), (!x?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
1005
+ M(e, C);
1006
1006
  return;
1007
1007
  }
1008
- Ce || (Q !== null ? (Tn() || x?.is_fork) && Q.set(e, t) : Sn(e));
1008
+ Ne || (ee !== null ? (Pn() || x?.is_fork) && ee.set(e, t) : On(e));
1009
1009
  }
1010
- function ti(e) {
1010
+ function di(e) {
1011
1011
  if (e.effects !== null)
1012
1012
  for (const t of e.effects)
1013
- (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Oe), t.teardown = ys, t.ac = null, wt(t, 0), Mn(t));
1013
+ (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Pe), t.teardown = Ns, t.ac = null, yt(t, 0), Fn(t));
1014
1014
  }
1015
- function xr(e) {
1015
+ function Or(e) {
1016
1016
  if (e.effects !== null)
1017
1017
  for (const t of e.effects)
1018
- t.teardown && dt(t);
1018
+ t.teardown && vt(t);
1019
1019
  }
1020
- let _n = /* @__PURE__ */ new Set();
1021
- const Ae = /* @__PURE__ */ new Map();
1022
- let Sr = !1;
1023
- function kt(e, t) {
1020
+ let Sn = /* @__PURE__ */ new Set();
1021
+ const Re = /* @__PURE__ */ new Map();
1022
+ let Dr = !1;
1023
+ function At(e, t) {
1024
1024
  var n = {
1025
1025
  f: 0,
1026
1026
  // TODO ideally we could skip this altogether, but it causes type errors
1027
1027
  v: e,
1028
1028
  reactions: null,
1029
- equals: fr,
1029
+ equals: mr,
1030
1030
  rv: 0,
1031
1031
  wv: 0
1032
1032
  };
1033
1033
  return n;
1034
1034
  }
1035
1035
  // @__NO_SIDE_EFFECTS__
1036
- function P(e, t) {
1037
- const n = kt(e);
1038
- return zr(n), n;
1036
+ function D(e, t) {
1037
+ const n = At(e);
1038
+ return Gr(n), n;
1039
1039
  }
1040
1040
  // @__NO_SIDE_EFFECTS__
1041
- function ni(e, t = !1, n = !0) {
1042
- const r = kt(e);
1043
- return t || (r.equals = Hs), r;
1041
+ function hi(e, t = !1, n = !0) {
1042
+ const r = At(e);
1043
+ return t || (r.equals = Gs), r;
1044
1044
  }
1045
- function E(e, t, n = !1) {
1045
+ function $(e, t, n = !1) {
1046
1046
  b !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1047
1047
  // to ensure we error if state is set inside an inspect effect
1048
- (!te || (b.f & Yn) !== 0) && cr() && (b.f & (O | $e | yn | Yn)) !== 0 && (K === null || !lt.call(K, e)) && Os();
1049
- let r = n ? Ke(t) : t;
1050
- return Vt(e, r);
1048
+ (!ne || (b.f & Qn) !== 0) && yr() && (b.f & (L | Se | Cn | Qn)) !== 0 && (G === null || !at.call(G, e)) && Ws();
1049
+ let r = n ? Ze(t) : t;
1050
+ return Wt(e, r);
1051
1051
  }
1052
- function Vt(e, t) {
1052
+ function Wt(e, t) {
1053
1053
  if (!e.equals(t)) {
1054
1054
  var n = e.v;
1055
- Ce ? Ae.set(e, t) : Ae.set(e, n), e.v = t;
1056
- var r = be.ensure();
1057
- if (r.capture(e, n), (e.f & O) !== 0) {
1055
+ Ne ? Re.set(e, t) : Re.set(e, n), e.v = t;
1056
+ var r = Ee.ensure();
1057
+ if (r.capture(e, n), (e.f & L) !== 0) {
1058
1058
  const s = (
1059
1059
  /** @type {Derived} */
1060
1060
  e
1061
1061
  );
1062
- (e.f & D) !== 0 && In(s), Sn(s);
1062
+ (e.f & P) !== 0 && Ln(s), On(s);
1063
1063
  }
1064
- e.wv = Yr(), kr(e, D), $ !== null && ($.f & N) !== 0 && ($.f & (de | Ne)) === 0 && (q === null ? _i([e]) : q.push(e)), !r.is_fork && _n.size > 0 && !Sr && ri();
1064
+ e.wv = Qr(), Lr(e, P), y !== null && (y.f & C) !== 0 && (y.f & (he | Oe)) === 0 && (U === null ? ki([e]) : U.push(e)), !r.is_fork && Sn.size > 0 && !Dr && vi();
1065
1065
  }
1066
1066
  return t;
1067
1067
  }
1068
- function ri() {
1069
- Sr = !1;
1070
- for (const e of _n)
1071
- (e.f & N) !== 0 && M(e, ne), It(e) && dt(e);
1072
- _n.clear();
1068
+ function vi() {
1069
+ Dr = !1;
1070
+ for (const e of Sn)
1071
+ (e.f & C) !== 0 && M(e, re), Mt(e) && vt(e);
1072
+ Sn.clear();
1073
1073
  }
1074
- function gt(e) {
1075
- E(e, e.v + 1);
1074
+ function wt(e) {
1075
+ $(e, e.v + 1);
1076
1076
  }
1077
- function kr(e, t) {
1077
+ function Lr(e, t) {
1078
1078
  var n = e.reactions;
1079
1079
  if (n !== null)
1080
1080
  for (var r = n.length, s = 0; s < r; s++) {
1081
- var i = n[s], o = i.f, f = (o & D) === 0;
1082
- if (f && M(i, t), (o & O) !== 0) {
1083
- var u = (
1081
+ var i = n[s], o = i.f, u = (o & P) === 0;
1082
+ if (u && M(i, t), (o & L) !== 0) {
1083
+ var a = (
1084
1084
  /** @type {Derived} */
1085
1085
  i
1086
1086
  );
1087
- Q?.delete(u), (o & Be) === 0 && (o & J && (i.f |= Be), kr(u, ne));
1088
- } else f && ((o & $e) !== 0 && he !== null && he.add(
1087
+ ee?.delete(a), (o & Ue) === 0 && (o & K && (i.f |= Ue), Lr(a, re));
1088
+ } else u && ((o & Se) !== 0 && pe !== null && pe.add(
1089
1089
  /** @type {Effect} */
1090
1090
  i
1091
- ), ee(
1091
+ ), te(
1092
1092
  /** @type {Effect} */
1093
1093
  i
1094
1094
  ));
1095
1095
  }
1096
1096
  }
1097
- function Ke(e) {
1098
- if (typeof e != "object" || e === null || nn in e)
1097
+ function Ze(e) {
1098
+ if (typeof e != "object" || e === null || dn in e)
1099
1099
  return e;
1100
- const t = nr(e);
1101
- if (t !== bs && t !== $s)
1100
+ const t = dr(e);
1101
+ if (t !== Cs && t !== Rs)
1102
1102
  return e;
1103
- var n = /* @__PURE__ */ new Map(), r = tr(e), s = /* @__PURE__ */ P(0), i = Ye, o = (f) => {
1104
- if (Ye === i)
1105
- return f();
1106
- var u = b, a = Ye;
1107
- G(null), Un(i);
1108
- var c = f();
1109
- return G(u), Un(a), c;
1103
+ var n = /* @__PURE__ */ new Map(), r = cr(e), s = /* @__PURE__ */ D(0), i = qe, o = (u) => {
1104
+ if (qe === i)
1105
+ return u();
1106
+ var a = b, f = qe;
1107
+ Z(null), rr(i);
1108
+ var c = u();
1109
+ return Z(a), rr(f), c;
1110
1110
  };
1111
- return r && n.set("length", /* @__PURE__ */ P(
1111
+ return r && n.set("length", /* @__PURE__ */ D(
1112
1112
  /** @type {any[]} */
1113
1113
  e.length
1114
1114
  )), new Proxy(
1115
1115
  /** @type {any} */
1116
1116
  e,
1117
1117
  {
1118
- defineProperty(f, u, a) {
1119
- (!("value" in a) || a.configurable === !1 || a.enumerable === !1 || a.writable === !1) && Ns();
1120
- var c = n.get(u);
1118
+ defineProperty(u, a, f) {
1119
+ (!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && Ys();
1120
+ var c = n.get(a);
1121
1121
  return c === void 0 ? o(() => {
1122
- var h = /* @__PURE__ */ P(a.value);
1123
- return n.set(u, h), h;
1124
- }) : E(c, a.value, !0), !0;
1122
+ var v = /* @__PURE__ */ D(f.value);
1123
+ return n.set(a, v), v;
1124
+ }) : $(c, f.value, !0), !0;
1125
1125
  },
1126
- deleteProperty(f, u) {
1127
- var a = n.get(u);
1128
- if (a === void 0) {
1129
- if (u in f) {
1130
- const c = o(() => /* @__PURE__ */ P(R));
1131
- n.set(u, c), gt(s);
1126
+ deleteProperty(u, a) {
1127
+ var f = n.get(a);
1128
+ if (f === void 0) {
1129
+ if (a in u) {
1130
+ const c = o(() => /* @__PURE__ */ D(O));
1131
+ n.set(a, c), wt(s);
1132
1132
  }
1133
1133
  } else
1134
- E(a, R), gt(s);
1134
+ $(f, O), wt(s);
1135
1135
  return !0;
1136
1136
  },
1137
- get(f, u, a) {
1138
- if (u === nn)
1137
+ get(u, a, f) {
1138
+ if (a === dn)
1139
1139
  return e;
1140
- var c = n.get(u), h = u in f;
1141
- if (c === void 0 && (!h || Ge(f, u)?.writable) && (c = o(() => {
1142
- var g = Ke(h ? f[u] : R), v = /* @__PURE__ */ P(g);
1143
- return v;
1144
- }), n.set(u, c)), c !== void 0) {
1145
- var d = w(c);
1146
- return d === R ? void 0 : d;
1140
+ var c = n.get(a), v = a in u;
1141
+ if (c === void 0 && (!v || Qe(u, a)?.writable) && (c = o(() => {
1142
+ var g = Ze(v ? u[a] : O), _ = /* @__PURE__ */ D(g);
1143
+ return _;
1144
+ }), n.set(a, c)), c !== void 0) {
1145
+ var d = m(c);
1146
+ return d === O ? void 0 : d;
1147
1147
  }
1148
- return Reflect.get(f, u, a);
1148
+ return Reflect.get(u, a, f);
1149
1149
  },
1150
- getOwnPropertyDescriptor(f, u) {
1151
- var a = Reflect.getOwnPropertyDescriptor(f, u);
1152
- if (a && "value" in a) {
1153
- var c = n.get(u);
1154
- c && (a.value = w(c));
1155
- } else if (a === void 0) {
1156
- var h = n.get(u), d = h?.v;
1157
- if (h !== void 0 && d !== R)
1150
+ getOwnPropertyDescriptor(u, a) {
1151
+ var f = Reflect.getOwnPropertyDescriptor(u, a);
1152
+ if (f && "value" in f) {
1153
+ var c = n.get(a);
1154
+ c && (f.value = m(c));
1155
+ } else if (f === void 0) {
1156
+ var v = n.get(a), d = v?.v;
1157
+ if (v !== void 0 && d !== O)
1158
1158
  return {
1159
1159
  enumerable: !0,
1160
1160
  configurable: !0,
@@ -1162,173 +1162,173 @@ function Ke(e) {
1162
1162
  writable: !0
1163
1163
  };
1164
1164
  }
1165
- return a;
1165
+ return f;
1166
1166
  },
1167
- has(f, u) {
1168
- if (u === nn)
1167
+ has(u, a) {
1168
+ if (a === dn)
1169
1169
  return !0;
1170
- var a = n.get(u), c = a !== void 0 && a.v !== R || Reflect.has(f, u);
1171
- if (a !== void 0 || $ !== null && (!c || Ge(f, u)?.writable)) {
1172
- a === void 0 && (a = o(() => {
1173
- var d = c ? Ke(f[u]) : R, g = /* @__PURE__ */ P(d);
1170
+ var f = n.get(a), c = f !== void 0 && f.v !== O || Reflect.has(u, a);
1171
+ if (f !== void 0 || y !== null && (!c || Qe(u, a)?.writable)) {
1172
+ f === void 0 && (f = o(() => {
1173
+ var d = c ? Ze(u[a]) : O, g = /* @__PURE__ */ D(d);
1174
1174
  return g;
1175
- }), n.set(u, a));
1176
- var h = w(a);
1177
- if (h === R)
1175
+ }), n.set(a, f));
1176
+ var v = m(f);
1177
+ if (v === O)
1178
1178
  return !1;
1179
1179
  }
1180
1180
  return c;
1181
1181
  },
1182
- set(f, u, a, c) {
1183
- var h = n.get(u), d = u in f;
1184
- if (r && u === "length")
1185
- for (var g = a; g < /** @type {Source<number>} */
1186
- h.v; g += 1) {
1187
- var v = n.get(g + "");
1188
- v !== void 0 ? E(v, R) : g in f && (v = o(() => /* @__PURE__ */ P(R)), n.set(g + "", v));
1182
+ set(u, a, f, c) {
1183
+ var v = n.get(a), d = a in u;
1184
+ if (r && a === "length")
1185
+ for (var g = f; g < /** @type {Source<number>} */
1186
+ v.v; g += 1) {
1187
+ var _ = n.get(g + "");
1188
+ _ !== void 0 ? $(_, O) : g in u && (_ = o(() => /* @__PURE__ */ D(O)), n.set(g + "", _));
1189
1189
  }
1190
- if (h === void 0)
1191
- (!d || Ge(f, u)?.writable) && (h = o(() => /* @__PURE__ */ P(void 0)), E(h, Ke(a)), n.set(u, h));
1190
+ if (v === void 0)
1191
+ (!d || Qe(u, a)?.writable) && (v = o(() => /* @__PURE__ */ D(void 0)), $(v, Ze(f)), n.set(a, v));
1192
1192
  else {
1193
- d = h.v !== R;
1194
- var C = o(() => Ke(a));
1195
- E(h, C);
1193
+ d = v.v !== O;
1194
+ var T = o(() => Ze(f));
1195
+ $(v, T);
1196
1196
  }
1197
- var y = Reflect.getOwnPropertyDescriptor(f, u);
1198
- if (y?.set && y.set.call(c, a), !d) {
1199
- if (r && typeof u == "string") {
1200
- var Ee = (
1197
+ var E = Reflect.getOwnPropertyDescriptor(u, a);
1198
+ if (E?.set && E.set.call(c, f), !d) {
1199
+ if (r && typeof a == "string") {
1200
+ var ke = (
1201
1201
  /** @type {Source<number>} */
1202
1202
  n.get("length")
1203
- ), re = Number(u);
1204
- Number.isInteger(re) && re >= Ee.v && E(Ee, re + 1);
1203
+ ), se = Number(a);
1204
+ Number.isInteger(se) && se >= ke.v && $(ke, se + 1);
1205
1205
  }
1206
- gt(s);
1206
+ wt(s);
1207
1207
  }
1208
1208
  return !0;
1209
1209
  },
1210
- ownKeys(f) {
1211
- w(s);
1212
- var u = Reflect.ownKeys(f).filter((h) => {
1213
- var d = n.get(h);
1214
- return d === void 0 || d.v !== R;
1210
+ ownKeys(u) {
1211
+ m(s);
1212
+ var a = Reflect.ownKeys(u).filter((v) => {
1213
+ var d = n.get(v);
1214
+ return d === void 0 || d.v !== O;
1215
1215
  });
1216
- for (var [a, c] of n)
1217
- c.v !== R && !(a in f) && u.push(a);
1218
- return u;
1216
+ for (var [f, c] of n)
1217
+ c.v !== O && !(f in u) && a.push(f);
1218
+ return a;
1219
1219
  },
1220
1220
  setPrototypeOf() {
1221
- Rs();
1221
+ Bs();
1222
1222
  }
1223
1223
  }
1224
1224
  );
1225
1225
  }
1226
- var Wn, Ir, Tr, Mr;
1227
- function pn() {
1228
- if (Wn === void 0) {
1229
- Wn = window, Ir = /Firefox/.test(navigator.userAgent);
1226
+ var tr, Pr, Fr, jr;
1227
+ function xn() {
1228
+ if (tr === void 0) {
1229
+ tr = window, Pr = /Firefox/.test(navigator.userAgent);
1230
1230
  var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1231
- Tr = Ge(t, "firstChild").get, Mr = Ge(t, "nextSibling").get, Vn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Vn(n) && (n.__t = void 0);
1231
+ Fr = Qe(t, "firstChild").get, jr = Qe(t, "nextSibling").get, Zn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Zn(n) && (n.__t = void 0);
1232
1232
  }
1233
1233
  }
1234
- function We(e = "") {
1234
+ function Xe(e = "") {
1235
1235
  return document.createTextNode(e);
1236
1236
  }
1237
1237
  // @__NO_SIDE_EFFECTS__
1238
- function ct(e) {
1238
+ function ht(e) {
1239
1239
  return (
1240
1240
  /** @type {TemplateNode | null} */
1241
- Tr.call(e)
1241
+ Fr.call(e)
1242
1242
  );
1243
1243
  }
1244
1244
  // @__NO_SIDE_EFFECTS__
1245
- function Re(e) {
1245
+ function De(e) {
1246
1246
  return (
1247
1247
  /** @type {TemplateNode | null} */
1248
- Mr.call(e)
1248
+ jr.call(e)
1249
1249
  );
1250
1250
  }
1251
- function Se(e, t) {
1252
- if (!k)
1253
- return /* @__PURE__ */ ct(e);
1254
- var n = /* @__PURE__ */ ct(S);
1251
+ function Ae(e, t) {
1252
+ if (!I)
1253
+ return /* @__PURE__ */ ht(e);
1254
+ var n = /* @__PURE__ */ ht(k);
1255
1255
  if (n === null)
1256
- n = S.appendChild(We());
1257
- else if (t && n.nodeType !== En) {
1258
- var r = We();
1259
- return n?.before(r), ue(r), r;
1256
+ n = k.appendChild(Xe());
1257
+ else if (t && n.nodeType !== Rn) {
1258
+ var r = Xe();
1259
+ return n?.before(r), fe(r), r;
1260
1260
  }
1261
- return t && Cr(
1261
+ return t && zr(
1262
1262
  /** @type {Text} */
1263
1263
  n
1264
- ), ue(n), n;
1264
+ ), fe(n), n;
1265
1265
  }
1266
- function Xe(e, t = 1, n = !1) {
1267
- let r = k ? S : e;
1266
+ function Ke(e, t = 1, n = !1) {
1267
+ let r = I ? k : e;
1268
1268
  for (var s; t--; )
1269
1269
  s = r, r = /** @type {TemplateNode} */
1270
- /* @__PURE__ */ Re(r);
1271
- if (!k)
1270
+ /* @__PURE__ */ De(r);
1271
+ if (!I)
1272
1272
  return r;
1273
1273
  if (n) {
1274
- if (r?.nodeType !== En) {
1275
- var i = We();
1276
- return r === null ? s?.after(i) : r.before(i), ue(i), i;
1274
+ if (r?.nodeType !== Rn) {
1275
+ var i = Xe();
1276
+ return r === null ? s?.after(i) : r.before(i), fe(i), i;
1277
1277
  }
1278
- Cr(
1278
+ zr(
1279
1279
  /** @type {Text} */
1280
1280
  r
1281
1281
  );
1282
1282
  }
1283
- return ue(r), r;
1283
+ return fe(r), r;
1284
1284
  }
1285
- function si(e) {
1285
+ function _i(e) {
1286
1286
  e.textContent = "";
1287
1287
  }
1288
- function ii() {
1288
+ function pi() {
1289
1289
  return !1;
1290
1290
  }
1291
- function Ar(e, t, n) {
1291
+ function Hr(e, t, n) {
1292
1292
  return (
1293
1293
  /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
1294
- document.createElementNS(er, e, void 0)
1294
+ document.createElementNS(fr, e, void 0)
1295
1295
  );
1296
1296
  }
1297
- function Cr(e) {
1297
+ function zr(e) {
1298
1298
  if (
1299
1299
  /** @type {string} */
1300
1300
  e.nodeValue.length < 65536
1301
1301
  )
1302
1302
  return;
1303
1303
  let t = e.nextSibling;
1304
- for (; t !== null && t.nodeType === En; )
1304
+ for (; t !== null && t.nodeType === Rn; )
1305
1305
  t.remove(), e.nodeValue += /** @type {string} */
1306
1306
  t.nodeValue, t = e.nextSibling;
1307
1307
  }
1308
- function Nr(e) {
1309
- var t = b, n = $;
1310
- G(null), ae(null);
1308
+ function Vr(e) {
1309
+ var t = b, n = y;
1310
+ Z(null), ce(null);
1311
1311
  try {
1312
1312
  return e();
1313
1313
  } finally {
1314
- G(t), ae(n);
1314
+ Z(t), ce(n);
1315
1315
  }
1316
1316
  }
1317
- function oi(e) {
1318
- $ === null && (b === null && Ms(), Ts()), Ce && Is();
1317
+ function gi(e) {
1318
+ y === null && (b === null && Hs(), js()), Ne && Fs();
1319
1319
  }
1320
- function li(e, t) {
1320
+ function mi(e, t) {
1321
1321
  var n = t.last;
1322
1322
  n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
1323
1323
  }
1324
- function ye(e, t, n) {
1325
- var r = $;
1326
- r !== null && (r.f & fe) !== 0 && (e |= fe);
1324
+ function xe(e, t, n) {
1325
+ var r = y;
1326
+ r !== null && (r.f & ae) !== 0 && (e |= ae);
1327
1327
  var s = {
1328
- ctx: V,
1328
+ ctx: Y,
1329
1329
  deps: null,
1330
1330
  nodes: null,
1331
- f: e | D | J,
1331
+ f: e | P | K,
1332
1332
  first: null,
1333
1333
  fn: t,
1334
1334
  last: null,
@@ -1342,14 +1342,14 @@ function ye(e, t, n) {
1342
1342
  };
1343
1343
  if (n)
1344
1344
  try {
1345
- dt(s);
1346
- } catch (f) {
1347
- throw z(s), f;
1345
+ vt(s);
1346
+ } catch (u) {
1347
+ throw V(s), u;
1348
1348
  }
1349
- else t !== null && ee(s);
1349
+ else t !== null && te(s);
1350
1350
  var i = s;
1351
1351
  if (n && i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
1352
- (i.f & qe) === 0 && (i = i.first, (e & $e) !== 0 && (e & ft) !== 0 && i !== null && (i.f |= ft)), i !== null && (i.parent = r, r !== null && li(i, r), b !== null && (b.f & O) !== 0 && (e & Ne) === 0)) {
1352
+ (i.f & Je) === 0 && (i = i.first, (e & Se) !== 0 && (e & ft) !== 0 && i !== null && (i.f |= ft)), i !== null && (i.parent = r, r !== null && mi(i, r), b !== null && (b.f & L) !== 0 && (e & Oe) === 0)) {
1353
1353
  var o = (
1354
1354
  /** @type {Derived} */
1355
1355
  b
@@ -1358,157 +1358,157 @@ function ye(e, t, n) {
1358
1358
  }
1359
1359
  return s;
1360
1360
  }
1361
- function Tn() {
1362
- return b !== null && !te;
1361
+ function Pn() {
1362
+ return b !== null && !ne;
1363
1363
  }
1364
- function fi(e) {
1365
- const t = ye(Wt, null, !1);
1366
- return M(t, N), t.teardown = e, t;
1364
+ function wi(e) {
1365
+ const t = xe(Xt, null, !1);
1366
+ return M(t, C), t.teardown = e, t;
1367
1367
  }
1368
- function gn(e) {
1369
- oi();
1368
+ function kn(e) {
1369
+ gi();
1370
1370
  var t = (
1371
1371
  /** @type {Effect} */
1372
- $.f
1373
- ), n = !b && (t & de) !== 0 && (t & ht) === 0;
1372
+ y.f
1373
+ ), n = !b && (t & he) !== 0 && (t & _t) === 0;
1374
1374
  if (n) {
1375
1375
  var r = (
1376
1376
  /** @type {ComponentContext} */
1377
- V
1377
+ Y
1378
1378
  );
1379
1379
  (r.e ?? (r.e = [])).push(e);
1380
1380
  } else
1381
- return Rr(e);
1381
+ return Yr(e);
1382
1382
  }
1383
- function Rr(e) {
1384
- return ye(zt | xs, e, !1);
1383
+ function Yr(e) {
1384
+ return xe(Bt | Ds, e, !1);
1385
1385
  }
1386
- function ui(e) {
1387
- be.ensure();
1388
- const t = ye(Ne | qe, e, !0);
1386
+ function bi(e) {
1387
+ Ee.ensure();
1388
+ const t = xe(Oe | Je, e, !0);
1389
1389
  return () => {
1390
- z(t);
1390
+ V(t);
1391
1391
  };
1392
1392
  }
1393
- function ai(e) {
1394
- be.ensure();
1395
- const t = ye(Ne | qe, e, !0);
1393
+ function yi(e) {
1394
+ Ee.ensure();
1395
+ const t = xe(Oe | Je, e, !0);
1396
1396
  return (n = {}) => new Promise((r) => {
1397
- n.outro ? mt(t, () => {
1398
- z(t), r(void 0);
1399
- }) : (z(t), r(void 0));
1397
+ n.outro ? bt(t, () => {
1398
+ V(t), r(void 0);
1399
+ }) : (V(t), r(void 0));
1400
1400
  });
1401
1401
  }
1402
- function ci(e) {
1403
- return ye(yn | qe, e, !0);
1402
+ function $i(e) {
1403
+ return xe(Cn | Je, e, !0);
1404
1404
  }
1405
- function Or(e, t = 0) {
1406
- return ye(Wt | t, e, !0);
1405
+ function Br(e, t = 0) {
1406
+ return xe(Xt | t, e, !0);
1407
1407
  }
1408
- function rn(e, t = [], n = [], r = []) {
1409
- Js(r, t, n, (s) => {
1410
- ye(Wt, () => e(...s.map(w)), !0);
1408
+ function hn(e, t = [], n = [], r = []) {
1409
+ oi(r, t, n, (s) => {
1410
+ xe(Xt, () => e(...s.map(m)), !0);
1411
1411
  });
1412
1412
  }
1413
- function Dr(e, t = 0) {
1414
- var n = ye($e | t, e, !0);
1413
+ function Wr(e, t = 0) {
1414
+ var n = xe(Se | t, e, !0);
1415
1415
  return n;
1416
1416
  }
1417
- function Ie(e) {
1418
- return ye(de | qe, e, !0);
1417
+ function Me(e) {
1418
+ return xe(he | Je, e, !0);
1419
1419
  }
1420
- function Pr(e) {
1420
+ function qr(e) {
1421
1421
  var t = e.teardown;
1422
1422
  if (t !== null) {
1423
- const n = Ce, r = b;
1424
- qn(!0), G(null);
1423
+ const n = Ne, r = b;
1424
+ nr(!0), Z(null);
1425
1425
  try {
1426
1426
  t.call(null);
1427
1427
  } finally {
1428
- qn(n), G(r);
1428
+ nr(n), Z(r);
1429
1429
  }
1430
1430
  }
1431
1431
  }
1432
- function Mn(e, t = !1) {
1432
+ function Fn(e, t = !1) {
1433
1433
  var n = e.first;
1434
1434
  for (e.first = e.last = null; n !== null; ) {
1435
1435
  const s = n.ac;
1436
- s !== null && Nr(() => {
1437
- s.abort(Oe);
1436
+ s !== null && Vr(() => {
1437
+ s.abort(Pe);
1438
1438
  });
1439
1439
  var r = n.next;
1440
- (n.f & Ne) !== 0 ? n.parent = null : z(n, t), n = r;
1440
+ (n.f & Oe) !== 0 ? n.parent = null : V(n, t), n = r;
1441
1441
  }
1442
1442
  }
1443
- function di(e) {
1443
+ function Ei(e) {
1444
1444
  for (var t = e.first; t !== null; ) {
1445
1445
  var n = t.next;
1446
- (t.f & de) === 0 && z(t), t = n;
1446
+ (t.f & he) === 0 && V(t), t = n;
1447
1447
  }
1448
1448
  }
1449
- function z(e, t = !0) {
1449
+ function V(e, t = !0) {
1450
1450
  var n = !1;
1451
- (t || (e.f & ir) !== 0) && e.nodes !== null && e.nodes.end !== null && (hi(
1451
+ (t || (e.f & _r) !== 0) && e.nodes !== null && e.nodes.end !== null && (Si(
1452
1452
  e.nodes.start,
1453
1453
  /** @type {TemplateNode} */
1454
1454
  e.nodes.end
1455
- ), n = !0), Mn(e, t && !n), wt(e, 0), M(e, we);
1455
+ ), n = !0), Fn(e, t && !n), yt(e, 0), M(e, $e);
1456
1456
  var r = e.nodes && e.nodes.t;
1457
1457
  if (r !== null)
1458
1458
  for (const i of r)
1459
1459
  i.stop();
1460
- Pr(e);
1460
+ qr(e);
1461
1461
  var s = e.parent;
1462
- s !== null && s.first !== null && Lr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1462
+ s !== null && s.first !== null && Ur(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1463
1463
  }
1464
- function hi(e, t) {
1464
+ function Si(e, t) {
1465
1465
  for (; e !== null; ) {
1466
- var n = e === t ? null : /* @__PURE__ */ Re(e);
1466
+ var n = e === t ? null : /* @__PURE__ */ De(e);
1467
1467
  e.remove(), e = n;
1468
1468
  }
1469
1469
  }
1470
- function Lr(e) {
1470
+ function Ur(e) {
1471
1471
  var t = e.parent, n = e.prev, r = e.next;
1472
1472
  n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
1473
1473
  }
1474
- function mt(e, t, n = !0) {
1474
+ function bt(e, t, n = !0) {
1475
1475
  var r = [];
1476
- jr(e, r, !0);
1476
+ Xr(e, r, !0);
1477
1477
  var s = () => {
1478
- n && z(e), t && t();
1478
+ n && V(e), t && t();
1479
1479
  }, i = r.length;
1480
1480
  if (i > 0) {
1481
1481
  var o = () => --i || s();
1482
- for (var f of r)
1483
- f.out(o);
1482
+ for (var u of r)
1483
+ u.out(o);
1484
1484
  } else
1485
1485
  s();
1486
1486
  }
1487
- function jr(e, t, n) {
1488
- if ((e.f & fe) === 0) {
1489
- e.f ^= fe;
1487
+ function Xr(e, t, n) {
1488
+ if ((e.f & ae) === 0) {
1489
+ e.f ^= ae;
1490
1490
  var r = e.nodes && e.nodes.t;
1491
1491
  if (r !== null)
1492
- for (const f of r)
1493
- (f.is_global || n) && t.push(f);
1492
+ for (const u of r)
1493
+ (u.is_global || n) && t.push(u);
1494
1494
  for (var s = e.first; s !== null; ) {
1495
1495
  var i = s.next, o = (s.f & ft) !== 0 || // If this is a branch effect without a block effect parent,
1496
1496
  // it means the parent block effect was pruned. In that case,
1497
1497
  // transparency information was transferred to the branch effect.
1498
- (s.f & de) !== 0 && (e.f & $e) !== 0;
1499
- jr(s, t, o ? n : !1), s = i;
1498
+ (s.f & he) !== 0 && (e.f & Se) !== 0;
1499
+ Xr(s, t, o ? n : !1), s = i;
1500
1500
  }
1501
1501
  }
1502
1502
  }
1503
- function vi(e) {
1504
- Fr(e, !0);
1503
+ function xi(e) {
1504
+ Jr(e, !0);
1505
1505
  }
1506
- function Fr(e, t) {
1507
- if ((e.f & fe) !== 0) {
1508
- e.f ^= fe, (e.f & N) === 0 && (M(e, D), ee(e));
1506
+ function Jr(e, t) {
1507
+ if ((e.f & ae) !== 0) {
1508
+ e.f ^= ae, (e.f & C) === 0 && (M(e, P), te(e));
1509
1509
  for (var n = e.first; n !== null; ) {
1510
- var r = n.next, s = (n.f & ft) !== 0 || (n.f & de) !== 0;
1511
- Fr(n, s ? t : !1), n = r;
1510
+ var r = n.next, s = (n.f & ft) !== 0 || (n.f & he) !== 0;
1511
+ Jr(n, s ? t : !1), n = r;
1512
1512
  }
1513
1513
  var i = e.nodes && e.nodes.t;
1514
1514
  if (i !== null)
@@ -1516,252 +1516,252 @@ function Fr(e, t) {
1516
1516
  (o.is_global || t) && o.in();
1517
1517
  }
1518
1518
  }
1519
- function Hr(e, t) {
1519
+ function Kr(e, t) {
1520
1520
  if (e.nodes)
1521
1521
  for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
1522
- var s = n === r ? null : /* @__PURE__ */ Re(n);
1522
+ var s = n === r ? null : /* @__PURE__ */ De(n);
1523
1523
  t.append(n), n = s;
1524
1524
  }
1525
1525
  }
1526
- let Lt = !1, Ce = !1;
1527
- function qn(e) {
1528
- Ce = e;
1526
+ let Ht = !1, Ne = !1;
1527
+ function nr(e) {
1528
+ Ne = e;
1529
1529
  }
1530
- let b = null, te = !1;
1531
- function G(e) {
1530
+ let b = null, ne = !1;
1531
+ function Z(e) {
1532
1532
  b = e;
1533
1533
  }
1534
- let $ = null;
1535
- function ae(e) {
1536
- $ = e;
1534
+ let y = null;
1535
+ function ce(e) {
1536
+ y = e;
1537
1537
  }
1538
- let K = null;
1539
- function zr(e) {
1540
- b !== null && (K === null ? K = [e] : K.push(e));
1538
+ let G = null;
1539
+ function Gr(e) {
1540
+ b !== null && (G === null ? G = [e] : G.push(e));
1541
1541
  }
1542
- let H = null, Y = 0, q = null;
1543
- function _i(e) {
1544
- q = e;
1542
+ let z = null, B = 0, U = null;
1543
+ function ki(e) {
1544
+ U = e;
1545
1545
  }
1546
- let Vr = 1, Pe = 0, Ye = Pe;
1547
- function Un(e) {
1548
- Ye = e;
1546
+ let Zr = 1, je = 0, qe = je;
1547
+ function rr(e) {
1548
+ qe = e;
1549
1549
  }
1550
- function Yr() {
1551
- return ++Vr;
1550
+ function Qr() {
1551
+ return ++Zr;
1552
1552
  }
1553
- function It(e) {
1553
+ function Mt(e) {
1554
1554
  var t = e.f;
1555
- if ((t & D) !== 0)
1555
+ if ((t & P) !== 0)
1556
1556
  return !0;
1557
- if (t & O && (e.f &= ~Be), (t & ne) !== 0) {
1557
+ if (t & L && (e.f &= ~Ue), (t & re) !== 0) {
1558
1558
  for (var n = (
1559
1559
  /** @type {Value[]} */
1560
1560
  e.deps
1561
1561
  ), r = n.length, s = 0; s < r; s++) {
1562
1562
  var i = n[s];
1563
- if (It(
1563
+ if (Mt(
1564
1564
  /** @type {Derived} */
1565
1565
  i
1566
- ) && Er(
1566
+ ) && Nr(
1567
1567
  /** @type {Derived} */
1568
1568
  i
1569
1569
  ), i.wv > e.wv)
1570
1570
  return !0;
1571
1571
  }
1572
- (t & J) !== 0 && // During time traveling we don't want to reset the status so that
1572
+ (t & K) !== 0 && // During time traveling we don't want to reset the status so that
1573
1573
  // traversal of the graph in the other batches still happens
1574
- Q === null && M(e, N);
1574
+ ee === null && M(e, C);
1575
1575
  }
1576
1576
  return !1;
1577
1577
  }
1578
- function Br(e, t, n = !0) {
1578
+ function es(e, t, n = !0) {
1579
1579
  var r = e.reactions;
1580
- if (r !== null && !(K !== null && lt.call(K, e)))
1580
+ if (r !== null && !(G !== null && at.call(G, e)))
1581
1581
  for (var s = 0; s < r.length; s++) {
1582
1582
  var i = r[s];
1583
- (i.f & O) !== 0 ? Br(
1583
+ (i.f & L) !== 0 ? es(
1584
1584
  /** @type {Derived} */
1585
1585
  i,
1586
1586
  t,
1587
1587
  !1
1588
- ) : t === i && (n ? M(i, D) : (i.f & N) !== 0 && M(i, ne), ee(
1588
+ ) : t === i && (n ? M(i, P) : (i.f & C) !== 0 && M(i, re), te(
1589
1589
  /** @type {Effect} */
1590
1590
  i
1591
1591
  ));
1592
1592
  }
1593
1593
  }
1594
- function Wr(e) {
1595
- var C;
1596
- var t = H, n = Y, r = q, s = b, i = K, o = V, f = te, u = Ye, a = e.f;
1597
- H = /** @type {null | Value[]} */
1598
- null, Y = 0, q = null, b = (a & (de | Ne)) === 0 ? e : null, K = null, ut(e.ctx), te = !1, Ye = ++Pe, e.ac !== null && (Nr(() => {
1599
- e.ac.abort(Oe);
1594
+ function ts(e) {
1595
+ var T;
1596
+ var t = z, n = B, r = U, s = b, i = G, o = Y, u = ne, a = qe, f = e.f;
1597
+ z = /** @type {null | Value[]} */
1598
+ null, B = 0, U = null, b = (f & (he | Oe)) === 0 ? e : null, G = null, ct(e.ctx), ne = !1, qe = ++je, e.ac !== null && (Vr(() => {
1599
+ e.ac.abort(Pe);
1600
1600
  }), e.ac = null);
1601
1601
  try {
1602
- e.f |= fn;
1602
+ e.f |= gn;
1603
1603
  var c = (
1604
1604
  /** @type {Function} */
1605
1605
  e.fn
1606
- ), h = c();
1607
- e.f |= ht;
1606
+ ), v = c();
1607
+ e.f |= _t;
1608
1608
  var d = e.deps, g = x?.is_fork;
1609
- if (H !== null) {
1610
- var v;
1611
- if (g || wt(e, Y), d !== null && Y > 0)
1612
- for (d.length = Y + H.length, v = 0; v < H.length; v++)
1613
- d[Y + v] = H[v];
1609
+ if (z !== null) {
1610
+ var _;
1611
+ if (g || yt(e, B), d !== null && B > 0)
1612
+ for (d.length = B + z.length, _ = 0; _ < z.length; _++)
1613
+ d[B + _] = z[_];
1614
1614
  else
1615
- e.deps = d = H;
1616
- if (Tn() && (e.f & J) !== 0)
1617
- for (v = Y; v < d.length; v++)
1618
- ((C = d[v]).reactions ?? (C.reactions = [])).push(e);
1619
- } else !g && d !== null && Y < d.length && (wt(e, Y), d.length = Y);
1620
- if (cr() && q !== null && !te && d !== null && (e.f & (O | ne | D)) === 0)
1621
- for (v = 0; v < /** @type {Source[]} */
1622
- q.length; v++)
1623
- Br(
1624
- q[v],
1615
+ e.deps = d = z;
1616
+ if (Pn() && (e.f & K) !== 0)
1617
+ for (_ = B; _ < d.length; _++)
1618
+ ((T = d[_]).reactions ?? (T.reactions = [])).push(e);
1619
+ } else !g && d !== null && B < d.length && (yt(e, B), d.length = B);
1620
+ if (yr() && U !== null && !ne && d !== null && (e.f & (L | re | P)) === 0)
1621
+ for (_ = 0; _ < /** @type {Source[]} */
1622
+ U.length; _++)
1623
+ es(
1624
+ U[_],
1625
1625
  /** @type {Effect} */
1626
1626
  e
1627
1627
  );
1628
1628
  if (s !== null && s !== e) {
1629
- if (Pe++, s.deps !== null)
1630
- for (let y = 0; y < n; y += 1)
1631
- s.deps[y].rv = Pe;
1629
+ if (je++, s.deps !== null)
1630
+ for (let E = 0; E < n; E += 1)
1631
+ s.deps[E].rv = je;
1632
1632
  if (t !== null)
1633
- for (const y of t)
1634
- y.rv = Pe;
1635
- q !== null && (r === null ? r = q : r.push(.../** @type {Source[]} */
1636
- q));
1633
+ for (const E of t)
1634
+ E.rv = je;
1635
+ U !== null && (r === null ? r = U : r.push(.../** @type {Source[]} */
1636
+ U));
1637
1637
  }
1638
- return (e.f & Me) !== 0 && (e.f ^= Me), h;
1639
- } catch (y) {
1640
- return hr(y);
1638
+ return (e.f & Ce) !== 0 && (e.f ^= Ce), v;
1639
+ } catch (E) {
1640
+ return Er(E);
1641
1641
  } finally {
1642
- e.f ^= fn, H = t, Y = n, q = r, b = s, K = i, ut(o), te = f, Ye = u;
1642
+ e.f ^= gn, z = t, B = n, U = r, b = s, G = i, ct(o), ne = u, qe = a;
1643
1643
  }
1644
1644
  }
1645
- function pi(e, t) {
1645
+ function Ii(e, t) {
1646
1646
  let n = t.reactions;
1647
1647
  if (n !== null) {
1648
- var r = gs.call(n, e);
1648
+ var r = As.call(n, e);
1649
1649
  if (r !== -1) {
1650
1650
  var s = n.length - 1;
1651
1651
  s === 0 ? n = t.reactions = null : (n[r] = n[s], n.pop());
1652
1652
  }
1653
1653
  }
1654
- if (n === null && (t.f & O) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1654
+ if (n === null && (t.f & L) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1655
1655
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1656
1656
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1657
- (H === null || !lt.call(H, t))) {
1657
+ (z === null || !at.call(z, t))) {
1658
1658
  var i = (
1659
1659
  /** @type {Derived} */
1660
1660
  t
1661
1661
  );
1662
- (i.f & J) !== 0 && (i.f ^= J, i.f &= ~Be), Sn(i), ti(i), wt(i, 0);
1662
+ (i.f & K) !== 0 && (i.f ^= K, i.f &= ~Ue), On(i), di(i), yt(i, 0);
1663
1663
  }
1664
1664
  }
1665
- function wt(e, t) {
1665
+ function yt(e, t) {
1666
1666
  var n = e.deps;
1667
1667
  if (n !== null)
1668
1668
  for (var r = t; r < n.length; r++)
1669
- pi(e, n[r]);
1669
+ Ii(e, n[r]);
1670
1670
  }
1671
- function dt(e) {
1671
+ function vt(e) {
1672
1672
  var t = e.f;
1673
- if ((t & we) === 0) {
1674
- M(e, N);
1675
- var n = $, r = Lt;
1676
- $ = e, Lt = !0;
1673
+ if ((t & $e) === 0) {
1674
+ M(e, C);
1675
+ var n = y, r = Ht;
1676
+ y = e, Ht = !0;
1677
1677
  try {
1678
- (t & ($e | sr)) !== 0 ? di(e) : Mn(e), Pr(e);
1679
- var s = Wr(e);
1680
- e.teardown = typeof s == "function" ? s : null, e.wv = Vr;
1678
+ (t & (Se | vr)) !== 0 ? Ei(e) : Fn(e), qr(e);
1679
+ var s = ts(e);
1680
+ e.teardown = typeof s == "function" ? s : null, e.wv = Zr;
1681
1681
  var i;
1682
- on && zs && (e.f & D) !== 0 && e.deps;
1682
+ _n && Zs && (e.f & P) !== 0 && e.deps;
1683
1683
  } finally {
1684
- Lt = r, $ = n;
1684
+ Ht = r, y = n;
1685
1685
  }
1686
1686
  }
1687
1687
  }
1688
- function w(e) {
1689
- var t = e.f, n = (t & O) !== 0;
1690
- if (b !== null && !te) {
1691
- var r = $ !== null && ($.f & we) !== 0;
1692
- if (!r && (K === null || !lt.call(K, e))) {
1688
+ function m(e) {
1689
+ var t = e.f, n = (t & L) !== 0;
1690
+ if (b !== null && !ne) {
1691
+ var r = y !== null && (y.f & $e) !== 0;
1692
+ if (!r && (G === null || !at.call(G, e))) {
1693
1693
  var s = b.deps;
1694
- if ((b.f & fn) !== 0)
1695
- e.rv < Pe && (e.rv = Pe, H === null && s !== null && s[Y] === e ? Y++ : H === null ? H = [e] : H.push(e));
1694
+ if ((b.f & gn) !== 0)
1695
+ e.rv < je && (e.rv = je, z === null && s !== null && s[B] === e ? B++ : z === null ? z = [e] : z.push(e));
1696
1696
  else {
1697
1697
  (b.deps ?? (b.deps = [])).push(e);
1698
1698
  var i = e.reactions;
1699
- i === null ? e.reactions = [b] : lt.call(i, b) || i.push(b);
1699
+ i === null ? e.reactions = [b] : at.call(i, b) || i.push(b);
1700
1700
  }
1701
1701
  }
1702
1702
  }
1703
- if (Ce && Ae.has(e))
1704
- return Ae.get(e);
1703
+ if (Ne && Re.has(e))
1704
+ return Re.get(e);
1705
1705
  if (n) {
1706
1706
  var o = (
1707
1707
  /** @type {Derived} */
1708
1708
  e
1709
1709
  );
1710
- if (Ce) {
1711
- var f = o.v;
1712
- return ((o.f & N) === 0 && o.reactions !== null || Ur(o)) && (f = In(o)), Ae.set(o, f), f;
1710
+ if (Ne) {
1711
+ var u = o.v;
1712
+ return ((o.f & C) === 0 && o.reactions !== null || rs(o)) && (u = Ln(o)), Re.set(o, u), u;
1713
1713
  }
1714
- var u = (o.f & J) === 0 && !te && b !== null && (Lt || (b.f & J) !== 0), a = (o.f & ht) === 0;
1715
- It(o) && (u && (o.f |= J), Er(o)), u && !a && (xr(o), qr(o));
1714
+ var a = (o.f & K) === 0 && !ne && b !== null && (Ht || (b.f & K) !== 0), f = (o.f & _t) === 0;
1715
+ Mt(o) && (a && (o.f |= K), Nr(o)), a && !f && (Or(o), ns(o));
1716
1716
  }
1717
- if (Q?.has(e))
1718
- return Q.get(e);
1719
- if ((e.f & Me) !== 0)
1717
+ if (ee?.has(e))
1718
+ return ee.get(e);
1719
+ if ((e.f & Ce) !== 0)
1720
1720
  throw e.v;
1721
1721
  return e.v;
1722
1722
  }
1723
- function qr(e) {
1724
- if (e.f |= J, e.deps !== null)
1723
+ function ns(e) {
1724
+ if (e.f |= K, e.deps !== null)
1725
1725
  for (const t of e.deps)
1726
- (t.reactions ?? (t.reactions = [])).push(e), (t.f & O) !== 0 && (t.f & J) === 0 && (xr(
1726
+ (t.reactions ?? (t.reactions = [])).push(e), (t.f & L) !== 0 && (t.f & K) === 0 && (Or(
1727
1727
  /** @type {Derived} */
1728
1728
  t
1729
- ), qr(
1729
+ ), ns(
1730
1730
  /** @type {Derived} */
1731
1731
  t
1732
1732
  ));
1733
1733
  }
1734
- function Ur(e) {
1735
- if (e.v === R) return !0;
1734
+ function rs(e) {
1735
+ if (e.v === O) return !0;
1736
1736
  if (e.deps === null) return !1;
1737
1737
  for (const t of e.deps)
1738
- if (Ae.has(t) || (t.f & O) !== 0 && Ur(
1738
+ if (Re.has(t) || (t.f & L) !== 0 && rs(
1739
1739
  /** @type {Derived} */
1740
1740
  t
1741
1741
  ))
1742
1742
  return !0;
1743
1743
  return !1;
1744
1744
  }
1745
- function Xr(e) {
1746
- var t = te;
1745
+ function ss(e) {
1746
+ var t = ne;
1747
1747
  try {
1748
- return te = !0, e();
1748
+ return ne = !0, e();
1749
1749
  } finally {
1750
- te = t;
1750
+ ne = t;
1751
1751
  }
1752
1752
  }
1753
- const Le = /* @__PURE__ */ Symbol("events"), Jr = /* @__PURE__ */ new Set(), mn = /* @__PURE__ */ new Set();
1754
- function Nt(e, t, n) {
1755
- (t[Le] ?? (t[Le] = {}))[e] = n;
1753
+ const He = /* @__PURE__ */ Symbol("events"), is = /* @__PURE__ */ new Set(), In = /* @__PURE__ */ new Set();
1754
+ function Dt(e, t, n) {
1755
+ (t[He] ?? (t[He] = {}))[e] = n;
1756
1756
  }
1757
- function gi(e) {
1757
+ function Ai(e) {
1758
1758
  for (var t = 0; t < e.length; t++)
1759
- Jr.add(e[t]);
1760
- for (var n of mn)
1759
+ is.add(e[t]);
1760
+ for (var n of In)
1761
1761
  n(e);
1762
1762
  }
1763
- let Xn = null;
1764
- function Jn(e) {
1763
+ let sr = null;
1764
+ function ir(e) {
1765
1765
  var t = this, n = (
1766
1766
  /** @type {Node} */
1767
1767
  t.ownerDocument
@@ -1769,133 +1769,133 @@ function Jn(e) {
1769
1769
  /** @type {null | Element} */
1770
1770
  s[0] || e.target
1771
1771
  );
1772
- Xn = e;
1773
- var o = 0, f = Xn === e && e[Le];
1774
- if (f) {
1775
- var u = s.indexOf(f);
1776
- if (u !== -1 && (t === document || t === /** @type {any} */
1772
+ sr = e;
1773
+ var o = 0, u = sr === e && e[He];
1774
+ if (u) {
1775
+ var a = s.indexOf(u);
1776
+ if (a !== -1 && (t === document || t === /** @type {any} */
1777
1777
  window)) {
1778
- e[Le] = t;
1778
+ e[He] = t;
1779
1779
  return;
1780
1780
  }
1781
- var a = s.indexOf(t);
1782
- if (a === -1)
1781
+ var f = s.indexOf(t);
1782
+ if (f === -1)
1783
1783
  return;
1784
- u <= a && (o = u);
1784
+ a <= f && (o = a);
1785
1785
  }
1786
1786
  if (i = /** @type {Element} */
1787
1787
  s[o] || e.target, i !== t) {
1788
- Ht(e, "currentTarget", {
1788
+ Yt(e, "currentTarget", {
1789
1789
  configurable: !0,
1790
1790
  get() {
1791
1791
  return i || n;
1792
1792
  }
1793
1793
  });
1794
- var c = b, h = $;
1795
- G(null), ae(null);
1794
+ var c = b, v = y;
1795
+ Z(null), ce(null);
1796
1796
  try {
1797
1797
  for (var d, g = []; i !== null; ) {
1798
- var v = i.assignedSlot || i.parentNode || /** @type {any} */
1798
+ var _ = i.assignedSlot || i.parentNode || /** @type {any} */
1799
1799
  i.host || null;
1800
1800
  try {
1801
- var C = i[Le]?.[r];
1802
- C != null && (!/** @type {any} */
1801
+ var T = i[He]?.[r];
1802
+ T != null && (!/** @type {any} */
1803
1803
  i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1804
1804
  // -> the target could not have been disabled because it emits the event in the first place
1805
- e.target === i) && C.call(i, e);
1806
- } catch (y) {
1807
- d ? g.push(y) : d = y;
1805
+ e.target === i) && T.call(i, e);
1806
+ } catch (E) {
1807
+ d ? g.push(E) : d = E;
1808
1808
  }
1809
- if (e.cancelBubble || v === t || v === null)
1809
+ if (e.cancelBubble || _ === t || _ === null)
1810
1810
  break;
1811
- i = v;
1811
+ i = _;
1812
1812
  }
1813
1813
  if (d) {
1814
- for (let y of g)
1814
+ for (let E of g)
1815
1815
  queueMicrotask(() => {
1816
- throw y;
1816
+ throw E;
1817
1817
  });
1818
1818
  throw d;
1819
1819
  }
1820
1820
  } finally {
1821
- e[Le] = t, delete e.currentTarget, G(c), ae(h);
1821
+ e[He] = t, delete e.currentTarget, Z(c), ce(v);
1822
1822
  }
1823
1823
  }
1824
1824
  }
1825
- const mi = (
1825
+ const Mi = (
1826
1826
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
1827
1827
  globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
1828
1828
  /** @param {string} html */
1829
1829
  createHTML: (e) => e
1830
1830
  })
1831
1831
  );
1832
- function wi(e) {
1832
+ function Ti(e) {
1833
1833
  return (
1834
1834
  /** @type {string} */
1835
- mi?.createHTML(e) ?? e
1835
+ Mi?.createHTML(e) ?? e
1836
1836
  );
1837
1837
  }
1838
- function Kr(e, t = !1) {
1839
- var n = Ar("template");
1840
- return e = e.replaceAll("<!>", "<!---->"), n.innerHTML = t ? wi(e) : e, n.content;
1838
+ function os(e, t = !1) {
1839
+ var n = Hr("template");
1840
+ return e = e.replaceAll("<!>", "<!---->"), n.innerHTML = t ? Ti(e) : e, n.content;
1841
1841
  }
1842
- function bt(e, t) {
1842
+ function $t(e, t) {
1843
1843
  var n = (
1844
1844
  /** @type {Effect} */
1845
- $
1845
+ y
1846
1846
  );
1847
1847
  n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
1848
1848
  }
1849
1849
  // @__NO_SIDE_EFFECTS__
1850
- function Tt(e, t) {
1851
- var n = (t & ps) !== 0, r, s = !e.startsWith("<!>");
1850
+ function pt(e, t) {
1851
+ var n = (t & Is) !== 0, r, s = !e.startsWith("<!>");
1852
1852
  return () => {
1853
- if (k)
1854
- return bt(S, null), S;
1855
- r === void 0 && (r = Kr(s ? e : "<!>" + e, !0), r = /** @type {TemplateNode} */
1856
- /* @__PURE__ */ ct(r));
1853
+ if (I)
1854
+ return $t(k, null), k;
1855
+ r === void 0 && (r = os(s ? e : "<!>" + e, !0), r = /** @type {TemplateNode} */
1856
+ /* @__PURE__ */ ht(r));
1857
1857
  var i = (
1858
1858
  /** @type {TemplateNode} */
1859
- n || Ir ? document.importNode(r, !0) : r.cloneNode(!0)
1859
+ n || Pr ? document.importNode(r, !0) : r.cloneNode(!0)
1860
1860
  );
1861
- return bt(i, i), i;
1861
+ return $t(i, i), i;
1862
1862
  };
1863
1863
  }
1864
1864
  // @__NO_SIDE_EFFECTS__
1865
- function bi(e, t, n = "svg") {
1865
+ function Ci(e, t, n = "svg") {
1866
1866
  var r = !e.startsWith("<!>"), s = `<${n}>${r ? e : "<!>" + e}</${n}>`, i;
1867
1867
  return () => {
1868
- if (k)
1869
- return bt(S, null), S;
1868
+ if (I)
1869
+ return $t(k, null), k;
1870
1870
  if (!i) {
1871
1871
  var o = (
1872
1872
  /** @type {DocumentFragment} */
1873
- Kr(s, !0)
1874
- ), f = (
1873
+ os(s, !0)
1874
+ ), u = (
1875
1875
  /** @type {Element} */
1876
- /* @__PURE__ */ ct(o)
1876
+ /* @__PURE__ */ ht(o)
1877
1877
  );
1878
1878
  i = /** @type {Element} */
1879
- /* @__PURE__ */ ct(f);
1879
+ /* @__PURE__ */ ht(u);
1880
1880
  }
1881
- var u = (
1881
+ var a = (
1882
1882
  /** @type {TemplateNode} */
1883
1883
  i.cloneNode(!0)
1884
1884
  );
1885
- return bt(u, u), u;
1885
+ return $t(a, a), a;
1886
1886
  };
1887
1887
  }
1888
1888
  // @__NO_SIDE_EFFECTS__
1889
- function Gr(e, t) {
1890
- return /* @__PURE__ */ bi(e, t, "svg");
1889
+ function ls(e, t) {
1890
+ return /* @__PURE__ */ Ci(e, t, "svg");
1891
1891
  }
1892
- function ke(e, t) {
1893
- if (k) {
1892
+ function _e(e, t) {
1893
+ if (I) {
1894
1894
  var n = (
1895
1895
  /** @type {Effect & { nodes: EffectNodes }} */
1896
- $
1896
+ y
1897
1897
  );
1898
- ((n.f & ht) === 0 || n.nodes.end === null) && (n.nodes.end = S), xn();
1898
+ ((n.f & _t) === 0 || n.nodes.end === null) && (n.nodes.end = k), Nn();
1899
1899
  return;
1900
1900
  }
1901
1901
  e !== null && e.before(
@@ -1903,118 +1903,118 @@ function ke(e, t) {
1903
1903
  t
1904
1904
  );
1905
1905
  }
1906
- const $i = ["touchstart", "touchmove"];
1907
- function yi(e) {
1908
- return $i.includes(e);
1906
+ const Ri = ["touchstart", "touchmove"];
1907
+ function Ni(e) {
1908
+ return Ri.includes(e);
1909
1909
  }
1910
- function Ei(e, t) {
1910
+ function Oi(e, t) {
1911
1911
  var n = t == null ? "" : typeof t == "object" ? t + "" : t;
1912
1912
  n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n + "");
1913
1913
  }
1914
- function Zr(e, t) {
1915
- return Qr(e, t);
1914
+ function us(e, t) {
1915
+ return as(e, t);
1916
1916
  }
1917
- function xi(e, t) {
1918
- pn(), t.intro = t.intro ?? !1;
1919
- const n = t.target, r = k, s = S;
1917
+ function Di(e, t) {
1918
+ xn(), t.intro = t.intro ?? !1;
1919
+ const n = t.target, r = I, s = k;
1920
1920
  try {
1921
- for (var i = /* @__PURE__ */ ct(n); i && (i.nodeType !== qt || /** @type {Comment} */
1922
- i.data !== bn); )
1923
- i = /* @__PURE__ */ Re(i);
1921
+ for (var i = /* @__PURE__ */ ht(n); i && (i.nodeType !== Jt || /** @type {Comment} */
1922
+ i.data !== Mn); )
1923
+ i = /* @__PURE__ */ De(i);
1924
1924
  if (!i)
1925
- throw ot;
1926
- Je(!0), ue(
1925
+ throw ut;
1926
+ Ge(!0), fe(
1927
1927
  /** @type {Comment} */
1928
1928
  i
1929
1929
  );
1930
- const o = Qr(e, { ...t, anchor: i });
1931
- return Je(!1), /** @type {Exports} */
1930
+ const o = as(e, { ...t, anchor: i });
1931
+ return Ge(!1), /** @type {Exports} */
1932
1932
  o;
1933
1933
  } catch (o) {
1934
1934
  if (o instanceof Error && o.message.split(`
1935
- `).some((f) => f.startsWith("https://svelte.dev/e/")))
1935
+ `).some((u) => u.startsWith("https://svelte.dev/e/")))
1936
1936
  throw o;
1937
- return o !== ot && console.warn("Failed to hydrate: ", o), t.recover === !1 && Cs(), pn(), si(n), Je(!1), Zr(e, t);
1937
+ return o !== ut && console.warn("Failed to hydrate: ", o), t.recover === !1 && Vs(), xn(), _i(n), Ge(!1), us(e, t);
1938
1938
  } finally {
1939
- Je(r), ue(s);
1939
+ Ge(r), fe(s);
1940
1940
  }
1941
1941
  }
1942
- const Rt = /* @__PURE__ */ new Map();
1943
- function Qr(e, { target: t, anchor: n, props: r = {}, events: s, context: i, intro: o = !0 }) {
1944
- pn();
1945
- var f = void 0, u = ai(() => {
1946
- var a = n ?? t.appendChild(We());
1947
- Us(
1942
+ const Lt = /* @__PURE__ */ new Map();
1943
+ function as(e, { target: t, anchor: n, props: r = {}, events: s, context: i, intro: o = !0 }) {
1944
+ xn();
1945
+ var u = void 0, a = yi(() => {
1946
+ var f = n ?? t.appendChild(Xe());
1947
+ si(
1948
1948
  /** @type {TemplateNode} */
1949
- a,
1949
+ f,
1950
1950
  {
1951
1951
  pending: () => {
1952
1952
  }
1953
1953
  },
1954
1954
  (d) => {
1955
- ur({});
1955
+ wr({});
1956
1956
  var g = (
1957
1957
  /** @type {ComponentContext} */
1958
- V
1958
+ Y
1959
1959
  );
1960
- if (i && (g.c = i), s && (r.$$events = s), k && bt(
1960
+ if (i && (g.c = i), s && (r.$$events = s), I && $t(
1961
1961
  /** @type {TemplateNode} */
1962
1962
  d,
1963
1963
  null
1964
- ), f = e(d, r) || {}, k && ($.nodes.end = S, S === null || S.nodeType !== qt || /** @type {Comment} */
1965
- S.data !== Qn))
1966
- throw Ut(), ot;
1967
- ar();
1964
+ ), u = e(d, r) || {}, I && (y.nodes.end = k, k === null || k.nodeType !== Jt || /** @type {Comment} */
1965
+ k.data !== ar))
1966
+ throw Kt(), ut;
1967
+ br();
1968
1968
  }
1969
1969
  );
1970
- var c = /* @__PURE__ */ new Set(), h = (d) => {
1970
+ var c = /* @__PURE__ */ new Set(), v = (d) => {
1971
1971
  for (var g = 0; g < d.length; g++) {
1972
- var v = d[g];
1973
- if (!c.has(v)) {
1974
- c.add(v);
1975
- var C = yi(v);
1976
- for (const re of [t, document]) {
1977
- var y = Rt.get(re);
1978
- y === void 0 && (y = /* @__PURE__ */ new Map(), Rt.set(re, y));
1979
- var Ee = y.get(v);
1980
- Ee === void 0 ? (re.addEventListener(v, Jn, { passive: C }), y.set(v, 1)) : y.set(v, Ee + 1);
1972
+ var _ = d[g];
1973
+ if (!c.has(_)) {
1974
+ c.add(_);
1975
+ var T = Ni(_);
1976
+ for (const se of [t, document]) {
1977
+ var E = Lt.get(se);
1978
+ E === void 0 && (E = /* @__PURE__ */ new Map(), Lt.set(se, E));
1979
+ var ke = E.get(_);
1980
+ ke === void 0 ? (se.addEventListener(_, ir, { passive: T }), E.set(_, 1)) : E.set(_, ke + 1);
1981
1981
  }
1982
1982
  }
1983
1983
  }
1984
1984
  };
1985
- return h(ms(Jr)), mn.add(h), () => {
1985
+ return v(Ms(is)), In.add(v), () => {
1986
1986
  for (var d of c)
1987
- for (const C of [t, document]) {
1987
+ for (const T of [t, document]) {
1988
1988
  var g = (
1989
1989
  /** @type {Map<string, number>} */
1990
- Rt.get(C)
1991
- ), v = (
1990
+ Lt.get(T)
1991
+ ), _ = (
1992
1992
  /** @type {number} */
1993
1993
  g.get(d)
1994
1994
  );
1995
- --v == 0 ? (C.removeEventListener(d, Jn), g.delete(d), g.size === 0 && Rt.delete(C)) : g.set(d, v);
1995
+ --_ == 0 ? (T.removeEventListener(d, ir), g.delete(d), g.size === 0 && Lt.delete(T)) : g.set(d, _);
1996
1996
  }
1997
- mn.delete(h), a !== n && a.parentNode?.removeChild(a);
1997
+ In.delete(v), f !== n && f.parentNode?.removeChild(f);
1998
1998
  };
1999
1999
  });
2000
- return wn.set(f, u), f;
2000
+ return An.set(u, a), u;
2001
2001
  }
2002
- let wn = /* @__PURE__ */ new WeakMap();
2003
- function Si(e, t) {
2004
- const n = wn.get(e);
2005
- return n ? (wn.delete(e), n(t)) : Promise.resolve();
2002
+ let An = /* @__PURE__ */ new WeakMap();
2003
+ function Li(e, t) {
2004
+ const n = An.get(e);
2005
+ return n ? (An.delete(e), n(t)) : Promise.resolve();
2006
2006
  }
2007
- var Z, le, W, Ve, xt, St, Bt;
2008
- class ki {
2007
+ var Q, ue, q, We, kt, It, Ut;
2008
+ class Pi {
2009
2009
  /**
2010
2010
  * @param {TemplateNode} anchor
2011
2011
  * @param {boolean} transition
2012
2012
  */
2013
2013
  constructor(t, n = !0) {
2014
2014
  /** @type {TemplateNode} */
2015
- T(this, "anchor");
2015
+ A(this, "anchor");
2016
2016
  /** @type {Map<Batch, Key>} */
2017
- m(this, Z, /* @__PURE__ */ new Map());
2017
+ w(this, Q, /* @__PURE__ */ new Map());
2018
2018
  /**
2019
2019
  * Map of keys to effects that are currently rendered in the DOM.
2020
2020
  * These effects are visible and actively part of the document tree.
@@ -2029,69 +2029,69 @@ class ki {
2029
2029
  * Can result in the entries `true->Effect` and `false->Effect`
2030
2030
  * @type {Map<Key, Effect>}
2031
2031
  */
2032
- m(this, le, /* @__PURE__ */ new Map());
2032
+ w(this, ue, /* @__PURE__ */ new Map());
2033
2033
  /**
2034
2034
  * Similar to #onscreen with respect to the keys, but contains branches that are not yet
2035
2035
  * in the DOM, because their insertion is deferred.
2036
2036
  * @type {Map<Key, Branch>}
2037
2037
  */
2038
- m(this, W, /* @__PURE__ */ new Map());
2038
+ w(this, q, /* @__PURE__ */ new Map());
2039
2039
  /**
2040
2040
  * Keys of effects that are currently outroing
2041
2041
  * @type {Set<Key>}
2042
2042
  */
2043
- m(this, Ve, /* @__PURE__ */ new Set());
2043
+ w(this, We, /* @__PURE__ */ new Set());
2044
2044
  /**
2045
2045
  * Whether to pause (i.e. outro) on change, or destroy immediately.
2046
2046
  * This is necessary for `<svelte:element>`
2047
2047
  */
2048
- m(this, xt, !0);
2049
- m(this, St, () => {
2048
+ w(this, kt, !0);
2049
+ w(this, It, () => {
2050
2050
  var t = (
2051
2051
  /** @type {Batch} */
2052
2052
  x
2053
2053
  );
2054
- if (l(this, Z).has(t)) {
2054
+ if (l(this, Q).has(t)) {
2055
2055
  var n = (
2056
2056
  /** @type {Key} */
2057
- l(this, Z).get(t)
2058
- ), r = l(this, le).get(n);
2057
+ l(this, Q).get(t)
2058
+ ), r = l(this, ue).get(n);
2059
2059
  if (r)
2060
- vi(r), l(this, Ve).delete(n);
2060
+ xi(r), l(this, We).delete(n);
2061
2061
  else {
2062
- var s = l(this, W).get(n);
2063
- s && (l(this, le).set(n, s.effect), l(this, W).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), r = s.effect);
2062
+ var s = l(this, q).get(n);
2063
+ s && (l(this, ue).set(n, s.effect), l(this, q).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), r = s.effect);
2064
2064
  }
2065
- for (const [i, o] of l(this, Z)) {
2066
- if (l(this, Z).delete(i), i === t)
2065
+ for (const [i, o] of l(this, Q)) {
2066
+ if (l(this, Q).delete(i), i === t)
2067
2067
  break;
2068
- const f = l(this, W).get(o);
2069
- f && (z(f.effect), l(this, W).delete(o));
2068
+ const u = l(this, q).get(o);
2069
+ u && (V(u.effect), l(this, q).delete(o));
2070
2070
  }
2071
- for (const [i, o] of l(this, le)) {
2072
- if (i === n || l(this, Ve).has(i)) continue;
2073
- const f = () => {
2074
- if (Array.from(l(this, Z).values()).includes(i)) {
2075
- var a = document.createDocumentFragment();
2076
- Hr(o, a), a.append(We()), l(this, W).set(i, { effect: o, fragment: a });
2071
+ for (const [i, o] of l(this, ue)) {
2072
+ if (i === n || l(this, We).has(i)) continue;
2073
+ const u = () => {
2074
+ if (Array.from(l(this, Q).values()).includes(i)) {
2075
+ var f = document.createDocumentFragment();
2076
+ Kr(o, f), f.append(Xe()), l(this, q).set(i, { effect: o, fragment: f });
2077
2077
  } else
2078
- z(o);
2079
- l(this, Ve).delete(i), l(this, le).delete(i);
2078
+ V(o);
2079
+ l(this, We).delete(i), l(this, ue).delete(i);
2080
2080
  };
2081
- l(this, xt) || !r ? (l(this, Ve).add(i), mt(o, f, !1)) : f();
2081
+ l(this, kt) || !r ? (l(this, We).add(i), bt(o, u, !1)) : u();
2082
2082
  }
2083
2083
  }
2084
2084
  });
2085
2085
  /**
2086
2086
  * @param {Batch} batch
2087
2087
  */
2088
- m(this, Bt, (t) => {
2089
- l(this, Z).delete(t);
2090
- const n = Array.from(l(this, Z).values());
2091
- for (const [r, s] of l(this, W))
2092
- n.includes(r) || (z(s.effect), l(this, W).delete(r));
2088
+ w(this, Ut, (t) => {
2089
+ l(this, Q).delete(t);
2090
+ const n = Array.from(l(this, Q).values());
2091
+ for (const [r, s] of l(this, q))
2092
+ n.includes(r) || (V(s.effect), l(this, q).delete(r));
2093
2093
  });
2094
- this.anchor = t, p(this, xt, n);
2094
+ this.anchor = t, p(this, kt, n);
2095
2095
  }
2096
2096
  /**
2097
2097
  *
@@ -2102,45 +2102,45 @@ class ki {
2102
2102
  var r = (
2103
2103
  /** @type {Batch} */
2104
2104
  x
2105
- ), s = ii();
2106
- if (n && !l(this, le).has(t) && !l(this, W).has(t))
2105
+ ), s = pi();
2106
+ if (n && !l(this, ue).has(t) && !l(this, q).has(t))
2107
2107
  if (s) {
2108
- var i = document.createDocumentFragment(), o = We();
2109
- i.append(o), l(this, W).set(t, {
2110
- effect: Ie(() => n(o)),
2108
+ var i = document.createDocumentFragment(), o = Xe();
2109
+ i.append(o), l(this, q).set(t, {
2110
+ effect: Me(() => n(o)),
2111
2111
  fragment: i
2112
2112
  });
2113
2113
  } else
2114
- l(this, le).set(
2114
+ l(this, ue).set(
2115
2115
  t,
2116
- Ie(() => n(this.anchor))
2116
+ Me(() => n(this.anchor))
2117
2117
  );
2118
- if (l(this, Z).set(r, t), s) {
2119
- for (const [f, u] of l(this, le))
2120
- f === t ? r.unskip_effect(u) : r.skip_effect(u);
2121
- for (const [f, u] of l(this, W))
2122
- f === t ? r.unskip_effect(u.effect) : r.skip_effect(u.effect);
2123
- r.oncommit(l(this, St)), r.ondiscard(l(this, Bt));
2118
+ if (l(this, Q).set(r, t), s) {
2119
+ for (const [u, a] of l(this, ue))
2120
+ u === t ? r.unskip_effect(a) : r.skip_effect(a);
2121
+ for (const [u, a] of l(this, q))
2122
+ u === t ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
2123
+ r.oncommit(l(this, It)), r.ondiscard(l(this, Ut));
2124
2124
  } else
2125
- k && (this.anchor = S), l(this, St).call(this);
2125
+ I && (this.anchor = k), l(this, It).call(this);
2126
2126
  }
2127
2127
  }
2128
- Z = new WeakMap(), le = new WeakMap(), W = new WeakMap(), Ve = new WeakMap(), xt = new WeakMap(), St = new WeakMap(), Bt = new WeakMap();
2129
- function Ii(e) {
2130
- V === null && or(), gn(() => {
2131
- const t = Xr(e);
2128
+ Q = new WeakMap(), ue = new WeakMap(), q = new WeakMap(), We = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), Ut = new WeakMap();
2129
+ function Fi(e) {
2130
+ Y === null && pr(), kn(() => {
2131
+ const t = ss(e);
2132
2132
  if (typeof t == "function") return (
2133
2133
  /** @type {() => void} */
2134
2134
  t
2135
2135
  );
2136
2136
  });
2137
2137
  }
2138
- function Ti(e, t, { bubbles: n = !1, cancelable: r = !1 } = {}) {
2138
+ function ji(e, t, { bubbles: n = !1, cancelable: r = !1 } = {}) {
2139
2139
  return new CustomEvent(e, { detail: t, bubbles: n, cancelable: r });
2140
2140
  }
2141
- function Mi() {
2142
- const e = V;
2143
- return e === null && or(), (t, n, r) => {
2141
+ function Hi() {
2142
+ const e = Y;
2143
+ return e === null && pr(), (t, n, r) => {
2144
2144
  const s = (
2145
2145
  /** @type {Record<string, Function | Function[]>} */
2146
2146
  e.s.$$events?.[
@@ -2149,116 +2149,116 @@ function Mi() {
2149
2149
  ]
2150
2150
  );
2151
2151
  if (s) {
2152
- const i = tr(s) ? s.slice() : [s], o = Ti(
2152
+ const i = cr(s) ? s.slice() : [s], o = ji(
2153
2153
  /** @type {string} */
2154
2154
  t,
2155
2155
  n,
2156
2156
  r
2157
2157
  );
2158
- for (const f of i)
2159
- f.call(e.x, o);
2158
+ for (const u of i)
2159
+ u.call(e.x, o);
2160
2160
  return !o.defaultPrevented;
2161
2161
  }
2162
2162
  return !0;
2163
2163
  };
2164
2164
  }
2165
- function Ot(e, t, n = !1) {
2166
- k && xn();
2167
- var r = new ki(e), s = n ? ft : 0;
2168
- function i(o, f) {
2169
- if (k) {
2170
- const c = js(e);
2171
- var u;
2172
- if (c === bn ? u = 0 : c === $n ? u = !1 : u = parseInt(c.substring(1)), o !== u) {
2173
- var a = lr();
2174
- ue(a), r.anchor = a, Je(!1), r.ensure(o, f), Je(!0);
2165
+ function Pt(e, t, n = !1) {
2166
+ I && Nn();
2167
+ var r = new Pi(e), s = n ? ft : 0;
2168
+ function i(o, u) {
2169
+ if (I) {
2170
+ const c = Js(e);
2171
+ var a;
2172
+ if (c === Mn ? a = 0 : c === Tn ? a = !1 : a = parseInt(c.substring(1)), o !== a) {
2173
+ var f = gr();
2174
+ fe(f), r.anchor = f, Ge(!1), r.ensure(o, u), Ge(!0);
2175
2175
  return;
2176
2176
  }
2177
2177
  }
2178
- r.ensure(o, f);
2178
+ r.ensure(o, u);
2179
2179
  }
2180
- Dr(() => {
2180
+ Wr(() => {
2181
2181
  var o = !1;
2182
- t((f, u = 0) => {
2183
- o = !0, i(u, f);
2182
+ t((u, a = 0) => {
2183
+ o = !0, i(a, u);
2184
2184
  }), o || i(!1, null);
2185
2185
  }, s);
2186
2186
  }
2187
- function Ai(e, t) {
2187
+ function zi(e, t) {
2188
2188
  return e == null ? null : String(e);
2189
2189
  }
2190
- function Kn(e, t, n, r) {
2190
+ function or(e, t, n, r) {
2191
2191
  var s = e.__style;
2192
- if (k || s !== t) {
2193
- var i = Ai(t);
2194
- (!k || i !== e.getAttribute("style")) && (i == null ? e.removeAttribute("style") : e.style.cssText = i), e.__style = t;
2192
+ if (I || s !== t) {
2193
+ var i = zi(t);
2194
+ (!I || i !== e.getAttribute("style")) && (i == null ? e.removeAttribute("style") : e.style.cssText = i), e.__style = t;
2195
2195
  }
2196
2196
  return r;
2197
2197
  }
2198
- const Ci = /* @__PURE__ */ Symbol("is custom element"), Ni = /* @__PURE__ */ Symbol("is html");
2199
- function Ri(e, t, n, r) {
2200
- var s = Oi(e);
2201
- k && (s[t] = e.getAttribute(t)), s[t] !== (s[t] = n) && (n == null ? e.removeAttribute(t) : typeof n != "string" && Di(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2198
+ const Vi = /* @__PURE__ */ Symbol("is custom element"), Yi = /* @__PURE__ */ Symbol("is html");
2199
+ function Bi(e, t, n, r) {
2200
+ var s = Wi(e);
2201
+ I && (s[t] = e.getAttribute(t)), s[t] !== (s[t] = n) && (n == null ? e.removeAttribute(t) : typeof n != "string" && qi(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2202
2202
  }
2203
- function Oi(e) {
2203
+ function Wi(e) {
2204
2204
  return (
2205
2205
  /** @type {Record<string | symbol, unknown>} **/
2206
2206
  // @ts-expect-error
2207
2207
  e.__attributes ?? (e.__attributes = {
2208
- [Ci]: e.nodeName.includes("-"),
2209
- [Ni]: e.namespaceURI === er
2208
+ [Vi]: e.nodeName.includes("-"),
2209
+ [Yi]: e.namespaceURI === fr
2210
2210
  })
2211
2211
  );
2212
2212
  }
2213
- var Gn = /* @__PURE__ */ new Map();
2214
- function Di(e) {
2215
- var t = e.getAttribute("is") || e.nodeName, n = Gn.get(t);
2213
+ var lr = /* @__PURE__ */ new Map();
2214
+ function qi(e) {
2215
+ var t = e.getAttribute("is") || e.nodeName, n = lr.get(t);
2216
2216
  if (n) return n;
2217
- Gn.set(t, n = []);
2217
+ lr.set(t, n = []);
2218
2218
  for (var r, s = e, i = Element.prototype; i !== s; ) {
2219
- r = ws(s);
2219
+ r = Ts(s);
2220
2220
  for (var o in r)
2221
2221
  r[o].set && n.push(o);
2222
- s = nr(s);
2222
+ s = dr(s);
2223
2223
  }
2224
2224
  return n;
2225
2225
  }
2226
- function sn(e, t, n, r) {
2226
+ function vn(e, t, n, r) {
2227
2227
  var s = (
2228
2228
  /** @type {V} */
2229
2229
  r
2230
2230
  ), i = !0, o = () => (i && (i = !1, s = /** @type {V} */
2231
- r), s), f;
2232
- f = /** @type {V} */
2233
- e[t], f === void 0 && r !== void 0 && (f = o());
2234
- var u;
2235
- u = () => {
2231
+ r), s), u;
2232
+ u = /** @type {V} */
2233
+ e[t], u === void 0 && r !== void 0 && (u = o());
2234
+ var a;
2235
+ a = () => {
2236
2236
  var d = (
2237
2237
  /** @type {V} */
2238
2238
  e[t]
2239
2239
  );
2240
2240
  return d === void 0 ? o() : (i = !0, d);
2241
2241
  };
2242
- var a = !1, c = /* @__PURE__ */ kn(() => (a = !1, u())), h = (
2242
+ var f = !1, c = /* @__PURE__ */ Dn(() => (f = !1, a())), v = (
2243
2243
  /** @type {Effect} */
2244
- $
2244
+ y
2245
2245
  );
2246
2246
  return (
2247
2247
  /** @type {() => V} */
2248
2248
  (function(d, g) {
2249
2249
  if (arguments.length > 0) {
2250
- const v = g ? w(c) : d;
2251
- return E(c, v), a = !0, s !== void 0 && (s = v), d;
2250
+ const _ = g ? m(c) : d;
2251
+ return $(c, _), f = !0, s !== void 0 && (s = _), d;
2252
2252
  }
2253
- return Ce && a || (h.f & we) !== 0 ? c.v : w(c);
2253
+ return Ne && f || (v.f & $e) !== 0 ? c.v : m(c);
2254
2254
  })
2255
2255
  );
2256
2256
  }
2257
- function Pi(e) {
2258
- return new Li(e);
2257
+ function Ui(e) {
2258
+ return new Xi(e);
2259
2259
  }
2260
- var me, X;
2261
- class Li {
2260
+ var ye, J;
2261
+ class Xi {
2262
2262
  /**
2263
2263
  * @param {ComponentConstructorOptions & {
2264
2264
  * component: any;
@@ -2266,56 +2266,56 @@ class Li {
2266
2266
  */
2267
2267
  constructor(t) {
2268
2268
  /** @type {any} */
2269
- m(this, me);
2269
+ w(this, ye);
2270
2270
  /** @type {Record<string, any>} */
2271
- m(this, X);
2271
+ w(this, J);
2272
2272
  var n = /* @__PURE__ */ new Map(), r = (i, o) => {
2273
- var f = /* @__PURE__ */ ni(o, !1, !1);
2274
- return n.set(i, f), f;
2273
+ var u = /* @__PURE__ */ hi(o, !1, !1);
2274
+ return n.set(i, u), u;
2275
2275
  };
2276
2276
  const s = new Proxy(
2277
2277
  { ...t.props || {}, $$events: {} },
2278
2278
  {
2279
2279
  get(i, o) {
2280
- return w(n.get(o) ?? r(o, Reflect.get(i, o)));
2280
+ return m(n.get(o) ?? r(o, Reflect.get(i, o)));
2281
2281
  },
2282
2282
  has(i, o) {
2283
- return o === Ss ? !0 : (w(n.get(o) ?? r(o, Reflect.get(i, o))), Reflect.has(i, o));
2283
+ return o === Ls ? !0 : (m(n.get(o) ?? r(o, Reflect.get(i, o))), Reflect.has(i, o));
2284
2284
  },
2285
- set(i, o, f) {
2286
- return E(n.get(o) ?? r(o, f), f), Reflect.set(i, o, f);
2285
+ set(i, o, u) {
2286
+ return $(n.get(o) ?? r(o, u), u), Reflect.set(i, o, u);
2287
2287
  }
2288
2288
  }
2289
2289
  );
2290
- p(this, X, (t.hydrate ? xi : Zr)(t.component, {
2290
+ p(this, J, (t.hydrate ? Di : us)(t.component, {
2291
2291
  target: t.target,
2292
2292
  anchor: t.anchor,
2293
2293
  props: s,
2294
2294
  context: t.context,
2295
2295
  intro: t.intro ?? !1,
2296
2296
  recover: t.recover
2297
- })), (!t?.props?.$$host || t.sync === !1) && Dt(), p(this, me, s.$$events);
2298
- for (const i of Object.keys(l(this, X)))
2299
- i === "$set" || i === "$destroy" || i === "$on" || Ht(this, i, {
2297
+ })), (!t?.props?.$$host || t.sync === !1) && Ft(), p(this, ye, s.$$events);
2298
+ for (const i of Object.keys(l(this, J)))
2299
+ i === "$set" || i === "$destroy" || i === "$on" || Yt(this, i, {
2300
2300
  get() {
2301
- return l(this, X)[i];
2301
+ return l(this, J)[i];
2302
2302
  },
2303
2303
  /** @param {any} value */
2304
2304
  set(o) {
2305
- l(this, X)[i] = o;
2305
+ l(this, J)[i] = o;
2306
2306
  },
2307
2307
  enumerable: !0
2308
2308
  });
2309
- l(this, X).$set = /** @param {Record<string, any>} next */
2309
+ l(this, J).$set = /** @param {Record<string, any>} next */
2310
2310
  (i) => {
2311
2311
  Object.assign(s, i);
2312
- }, l(this, X).$destroy = () => {
2313
- Si(l(this, X));
2312
+ }, l(this, J).$destroy = () => {
2313
+ Li(l(this, J));
2314
2314
  };
2315
2315
  }
2316
2316
  /** @param {Record<string, any>} props */
2317
2317
  $set(t) {
2318
- l(this, X).$set(t);
2318
+ l(this, J).$set(t);
2319
2319
  }
2320
2320
  /**
2321
2321
  * @param {string} event
@@ -2323,22 +2323,22 @@ class Li {
2323
2323
  * @returns {any}
2324
2324
  */
2325
2325
  $on(t, n) {
2326
- l(this, me)[t] = l(this, me)[t] || [];
2326
+ l(this, ye)[t] = l(this, ye)[t] || [];
2327
2327
  const r = (...s) => n.call(this, ...s);
2328
- return l(this, me)[t].push(r), () => {
2329
- l(this, me)[t] = l(this, me)[t].filter(
2328
+ return l(this, ye)[t].push(r), () => {
2329
+ l(this, ye)[t] = l(this, ye)[t].filter(
2330
2330
  /** @param {any} fn */
2331
2331
  (s) => s !== r
2332
2332
  );
2333
2333
  };
2334
2334
  }
2335
2335
  $destroy() {
2336
- l(this, X).$destroy();
2336
+ l(this, J).$destroy();
2337
2337
  }
2338
2338
  }
2339
- me = new WeakMap(), X = new WeakMap();
2340
- let es;
2341
- typeof HTMLElement == "function" && (es = class extends HTMLElement {
2339
+ ye = new WeakMap(), J = new WeakMap();
2340
+ let fs;
2341
+ typeof HTMLElement == "function" && (fs = class extends HTMLElement {
2342
2342
  /**
2343
2343
  * @param {*} $$componentCtor
2344
2344
  * @param {*} $$slots
@@ -2347,27 +2347,27 @@ typeof HTMLElement == "function" && (es = class extends HTMLElement {
2347
2347
  constructor(t, n, r) {
2348
2348
  super();
2349
2349
  /** The Svelte component constructor */
2350
- T(this, "$$ctor");
2350
+ A(this, "$$ctor");
2351
2351
  /** Slots */
2352
- T(this, "$$s");
2352
+ A(this, "$$s");
2353
2353
  /** @type {any} The Svelte component instance */
2354
- T(this, "$$c");
2354
+ A(this, "$$c");
2355
2355
  /** Whether or not the custom element is connected */
2356
- T(this, "$$cn", !1);
2356
+ A(this, "$$cn", !1);
2357
2357
  /** @type {Record<string, any>} Component props data */
2358
- T(this, "$$d", {});
2358
+ A(this, "$$d", {});
2359
2359
  /** `true` if currently in the process of reflecting component props back to attributes */
2360
- T(this, "$$r", !1);
2360
+ A(this, "$$r", !1);
2361
2361
  /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
2362
- T(this, "$$p_d", {});
2362
+ A(this, "$$p_d", {});
2363
2363
  /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
2364
- T(this, "$$l", {});
2364
+ A(this, "$$l", {});
2365
2365
  /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
2366
- T(this, "$$l_u", /* @__PURE__ */ new Map());
2366
+ A(this, "$$l_u", /* @__PURE__ */ new Map());
2367
2367
  /** @type {any} The managed render effect for reflecting attributes */
2368
- T(this, "$$me");
2368
+ A(this, "$$me");
2369
2369
  /** @type {ShadowRoot | null} The ShadowRoot of the custom element */
2370
- T(this, "$$shadowRoot", null);
2370
+ A(this, "$$shadowRoot", null);
2371
2371
  this.$$ctor = t, this.$$s = n, r && (this.$$shadowRoot = this.attachShadow(r));
2372
2372
  }
2373
2373
  /**
@@ -2397,22 +2397,22 @@ typeof HTMLElement == "function" && (es = class extends HTMLElement {
2397
2397
  if (this.$$cn = !0, !this.$$c) {
2398
2398
  let t = function(s) {
2399
2399
  return (i) => {
2400
- const o = Ar("slot");
2401
- s !== "default" && (o.name = s), ke(i, o);
2400
+ const o = Hr("slot");
2401
+ s !== "default" && (o.name = s), _e(i, o);
2402
2402
  };
2403
2403
  };
2404
2404
  if (await Promise.resolve(), !this.$$cn || this.$$c)
2405
2405
  return;
2406
- const n = {}, r = ji(this);
2406
+ const n = {}, r = Ji(this);
2407
2407
  for (const s of this.$$s)
2408
2408
  s in r && (s === "default" && !this.$$d.children ? (this.$$d.children = t(s), n.default = !0) : n[s] = t(s));
2409
2409
  for (const s of this.attributes) {
2410
2410
  const i = this.$$g_p(s.name);
2411
- i in this.$$d || (this.$$d[i] = jt(i, s.value, this.$$p_d, "toProp"));
2411
+ i in this.$$d || (this.$$d[i] = zt(i, s.value, this.$$p_d, "toProp"));
2412
2412
  }
2413
2413
  for (const s in this.$$p_d)
2414
2414
  !(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
2415
- this.$$c = Pi({
2415
+ this.$$c = Ui({
2416
2416
  component: this.$$ctor,
2417
2417
  target: this.$$shadowRoot || this,
2418
2418
  props: {
@@ -2420,13 +2420,13 @@ typeof HTMLElement == "function" && (es = class extends HTMLElement {
2420
2420
  $$slots: n,
2421
2421
  $$host: this
2422
2422
  }
2423
- }), this.$$me = ui(() => {
2424
- Or(() => {
2423
+ }), this.$$me = bi(() => {
2424
+ Br(() => {
2425
2425
  this.$$r = !0;
2426
- for (const s of Ft(this.$$c)) {
2426
+ for (const s of Vt(this.$$c)) {
2427
2427
  if (!this.$$p_d[s]?.reflect) continue;
2428
2428
  this.$$d[s] = this.$$c[s];
2429
- const i = jt(
2429
+ const i = zt(
2430
2430
  s,
2431
2431
  this.$$d[s],
2432
2432
  this.$$p_d,
@@ -2453,7 +2453,7 @@ typeof HTMLElement == "function" && (es = class extends HTMLElement {
2453
2453
  * @param {string} newValue
2454
2454
  */
2455
2455
  attributeChangedCallback(t, n, r) {
2456
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = jt(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
2456
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = zt(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
2457
2457
  }
2458
2458
  disconnectedCallback() {
2459
2459
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -2464,12 +2464,12 @@ typeof HTMLElement == "function" && (es = class extends HTMLElement {
2464
2464
  * @param {string} attribute_name
2465
2465
  */
2466
2466
  $$g_p(t) {
2467
- return Ft(this.$$p_d).find(
2467
+ return Vt(this.$$p_d).find(
2468
2468
  (n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
2469
2469
  ) || t;
2470
2470
  }
2471
2471
  });
2472
- function jt(e, t, n, r) {
2472
+ function zt(e, t, n, r) {
2473
2473
  const s = n[e]?.type;
2474
2474
  if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
2475
2475
  return t;
@@ -2499,7 +2499,7 @@ function jt(e, t, n, r) {
2499
2499
  return t;
2500
2500
  }
2501
2501
  }
2502
- function ji(e) {
2502
+ function Ji(e) {
2503
2503
  const t = {};
2504
2504
  return e.childNodes.forEach((n) => {
2505
2505
  t[
@@ -2508,202 +2508,253 @@ function ji(e) {
2508
2508
  ] = !0;
2509
2509
  }), t;
2510
2510
  }
2511
- function Fi(e, t, n, r, s, i) {
2512
- let o = class extends es {
2511
+ function Ki(e, t, n, r, s, i) {
2512
+ let o = class extends fs {
2513
2513
  constructor() {
2514
2514
  super(e, n, s), this.$$p_d = t;
2515
2515
  }
2516
2516
  static get observedAttributes() {
2517
- return Ft(t).map(
2518
- (f) => (t[f].attribute || f).toLowerCase()
2517
+ return Vt(t).map(
2518
+ (u) => (t[u].attribute || u).toLowerCase()
2519
2519
  );
2520
2520
  }
2521
2521
  };
2522
- return Ft(t).forEach((f) => {
2523
- Ht(o.prototype, f, {
2522
+ return Vt(t).forEach((u) => {
2523
+ Yt(o.prototype, u, {
2524
2524
  get() {
2525
- return this.$$c && f in this.$$c ? this.$$c[f] : this.$$d[f];
2525
+ return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
2526
2526
  },
2527
- set(u) {
2528
- u = jt(f, u, t), this.$$d[f] = u;
2529
- var a = this.$$c;
2530
- if (a) {
2531
- var c = Ge(a, f)?.get;
2532
- c ? a[f] = u : a.$set({ [f]: u });
2527
+ set(a) {
2528
+ a = zt(u, a, t), this.$$d[u] = a;
2529
+ var f = this.$$c;
2530
+ if (f) {
2531
+ var c = Qe(f, u)?.get;
2532
+ c ? f[u] = a : f.$set({ [u]: a });
2533
2533
  }
2534
2534
  }
2535
2535
  });
2536
- }), r.forEach((f) => {
2537
- Ht(o.prototype, f, {
2536
+ }), r.forEach((u) => {
2537
+ Yt(o.prototype, u, {
2538
2538
  get() {
2539
- return this.$$c?.[f];
2539
+ return this.$$c?.[u];
2540
2540
  }
2541
2541
  });
2542
2542
  }), e.element = /** @type {any} */
2543
2543
  o, o;
2544
2544
  }
2545
- var Hi = /* @__PURE__ */ Gr('<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path></svg>'), zi = /* @__PURE__ */ Gr('<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>'), Vi = /* @__PURE__ */ Tt('<div class="alert alert-info"><svg xmlns="http://www.w3.org/2000/svg" class="stroke-current shrink-0 h-5 w-5" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span class="text-xs">No session data yet. Interact with the questions to see updates.</span></div>'), Yi = /* @__PURE__ */ Tt('<div class="bg-base-200 rounded p-3 flex-1 min-h-0 flex flex-col"><div class="text-xs font-semibold mb-2">Item Sessions Snapshot</div> <pre class="bg-base-300 p-2 rounded text-xs overflow-auto flex-1 min-h-0"> </pre></div>'), Bi = /* @__PURE__ */ Tt('<div class="p-4 flex flex-col min-h-0 overflow-hidden"><div class="space-y-3 flex-1 min-h-0 flex flex-col"><div class="mb-2"><div class="text-sm font-bold mb-2">PIE Session Data (Persistent)</div></div> <!></div></div>'), Wi = /* @__PURE__ */ Tt('<div class="absolute bottom-0 right-0 w-4 h-4 cursor-se-resize" role="button" tabindex="0" title="Resize window"><svg class="w-full h-full text-base-content/30" viewBox="0 0 16 16" fill="currentColor"><path d="M16 16V14H14V16H16Z"></path><path d="M16 11V9H14V11H16Z"></path><path d="M13 16V14H11V16H13Z"></path></svg></div>'), qi = /* @__PURE__ */ Tt('<div class="fixed z-100 bg-base-100 rounded-lg shadow-2xl border-2 border-base-300"><div class="flex items-center justify-between px-4 py-2 bg-base-200 rounded-t-lg cursor-move select-none border-b border-base-300" role="button" tabindex="0" aria-label="Drag session panel"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg> <h3 class="font-bold text-sm">Session Data</h3></div> <div class="flex gap-1"><button class="btn btn-xs btn-ghost btn-circle"><!></button> <button class="btn btn-xs btn-ghost btn-circle" title="Close"><svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div></div> <!> <!></div>');
2546
- function Ui(e, t) {
2547
- ur(t, !0);
2548
- const n = Mi();
2549
- let r = sn(t, "toolkitCoordinator", 7, null), s = sn(t, "sectionId", 7, ""), i = sn(t, "attemptId", 7, void 0), o = /* @__PURE__ */ P(!1), f = /* @__PURE__ */ P(24), u = /* @__PURE__ */ P(100), a = /* @__PURE__ */ P(220), c = /* @__PURE__ */ P(600), h = /* @__PURE__ */ P(!1), d = /* @__PURE__ */ P(!1), g = 0, v = 0, C = 0, y = 0, Ee = 0, re = 0, Cn = 0, Nn = 0, Jt = /* @__PURE__ */ P(Ke({
2545
+ var Gi = /* @__PURE__ */ ls('<svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-xs" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path></svg>'), Zi = /* @__PURE__ */ ls('<svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-xs" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>'), Qi = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger__alert pie-section-player-tools-session-debugger__alert--warning"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-md" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01M5.07 19h13.86c1.54 0 2.5-1.67 1.73-3L13.73 4c-.77-1.33-2.69-1.33-3.46 0L3.34 16c-.77 1.33.19 3 1.73 3z"></path></svg> <span class="pie-section-player-tools-session-debugger__text-xs">Section controller not available for this section yet.</span></div>'), eo = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger__alert pie-section-player-tools-session-debugger__alert--info"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-md" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span class="pie-section-player-tools-session-debugger__text-xs">No section session data yet. Interact with the questions to see updates.</span></div>'), to = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger__card"><div class="pie-section-player-tools-session-debugger__card-title">Item Sessions Snapshot</div> <pre class="pie-section-player-tools-session-debugger__card-pre"> </pre></div>'), no = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger__content-shell"><div class="pie-section-player-tools-session-debugger__content"><div class="pie-section-player-tools-session-debugger__section-intro"><div class="pie-section-player-tools-session-debugger__heading">PIE Session Data (Persistent)</div></div> <!></div></div>'), ro = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger__resize-handle" role="button" tabindex="0" title="Resize window"><svg class="pie-section-player-tools-session-debugger__resize-icon" viewBox="0 0 16 16" fill="currentColor"><path d="M16 16V14H14V16H16Z"></path><path d="M16 11V9H14V11H16Z"></path><path d="M13 16V14H11V16H13Z"></path></svg></div>'), so = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger"><div class="pie-section-player-tools-session-debugger__header" role="button" tabindex="0" aria-label="Drag session panel"><div class="pie-section-player-tools-session-debugger__header-title"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-sm" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg> <h3 class="pie-section-player-tools-session-debugger__title">Session Data</h3></div> <div class="pie-section-player-tools-session-debugger__header-actions"><button class="pie-section-player-tools-session-debugger__icon-button"><!></button> <button class="pie-section-player-tools-session-debugger__icon-button" title="Close"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-xs" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div></div> <!> <!></div>');
2546
+ function io(e, t) {
2547
+ wr(t, !0);
2548
+ const n = Hi();
2549
+ let r = vn(t, "toolkitCoordinator", 7, null), s = vn(t, "sectionId", 7, ""), i = vn(t, "attemptId", 7, void 0), o = /* @__PURE__ */ D(!1), u = /* @__PURE__ */ D(24), a = /* @__PURE__ */ D(100), f = /* @__PURE__ */ D(220), c = /* @__PURE__ */ D(600), v = /* @__PURE__ */ D(!1), d = /* @__PURE__ */ D(!1), g = 0, _ = 0, T = 0, E = 0, ke = 0, se = 0, Hn = 0, zn = 0, Tt = /* @__PURE__ */ D(Ze({
2550
2550
  currentItemIndex: null,
2551
2551
  currentItemId: null,
2552
2552
  visitedItemIdentifiers: [],
2553
2553
  updatedAt: null,
2554
2554
  lastChangedItemId: null,
2555
2555
  itemSessions: {}
2556
- }));
2557
- function Rn(_) {
2556
+ })), Zt = null, Qt = null, en = null, tn = /* @__PURE__ */ D(!1), nn = !1;
2557
+ function Vn(h) {
2558
2558
  try {
2559
- return structuredClone(_);
2559
+ return structuredClone(h);
2560
2560
  } catch {
2561
- return JSON.parse(JSON.stringify(_));
2561
+ try {
2562
+ return JSON.parse(JSON.stringify(h));
2563
+ } catch {
2564
+ return h;
2565
+ }
2562
2566
  }
2563
2567
  }
2564
- function On() {
2568
+ function Yn() {
2565
2569
  if (!(!r() || !s()))
2566
2570
  return r().getSectionController?.({ sectionId: s(), attemptId: i() });
2567
2571
  }
2568
- function Dn(_) {
2569
- const A = On()?.getCurrentSectionAttemptSlice?.() || null;
2570
- E(
2571
- Jt,
2572
+ function Ct(h, S) {
2573
+ const R = S || Yn(), N = R?.getCurrentSectionAttemptSlice?.() || null;
2574
+ $(tn, !!R, !0), $(
2575
+ Tt,
2572
2576
  {
2573
- currentItemIndex: typeof A?.currentItemIndex == "number" ? A.currentItemIndex : null,
2574
- currentItemId: typeof A?.currentItemId == "string" && A.currentItemId ? A.currentItemId : null,
2575
- visitedItemIdentifiers: Rn(A?.visitedItemIdentifiers || []),
2576
- updatedAt: _?.updatedAt || Date.now(),
2577
- lastChangedItemId: _?.itemId || null,
2578
- itemSessions: Rn(A?.itemSessions || {})
2577
+ currentItemIndex: typeof N?.currentItemIndex == "number" && N.currentItemIndex >= 0 ? N.currentItemIndex : null,
2578
+ currentItemId: typeof N?.currentItemId == "string" && N.currentItemId ? N.currentItemId : null,
2579
+ visitedItemIdentifiers: Vn(N?.visitedItemIdentifiers || []),
2580
+ updatedAt: h?.updatedAt || Date.now(),
2581
+ lastChangedItemId: h?.itemId || null,
2582
+ itemSessions: Vn(N?.itemSessions || {})
2579
2583
  },
2580
2584
  !0
2581
2585
  );
2582
2586
  }
2583
- gn(() => {
2584
- if (!r() || !s()) return;
2585
- Dn();
2586
- const I = On()?.subscribe?.((A) => {
2587
- Dn({
2588
- itemId: A?.itemId,
2589
- updatedAt: A?.timestamp || Date.now()
2590
- });
2591
- });
2592
- return () => {
2593
- I?.();
2587
+ function Bn(h) {
2588
+ nn || (nn = !0, queueMicrotask(() => {
2589
+ nn = !1, sn(), Ct(h || { updatedAt: Date.now() });
2590
+ }));
2591
+ }
2592
+ function rn() {
2593
+ Qt?.(), Qt = null, Zt = null;
2594
+ }
2595
+ function Wn() {
2596
+ en?.(), en = null;
2597
+ }
2598
+ function sn() {
2599
+ const h = Yn() || null;
2600
+ if (!h) {
2601
+ rn(), $(tn, !1), $(
2602
+ Tt,
2603
+ {
2604
+ currentItemIndex: null,
2605
+ currentItemId: null,
2606
+ visitedItemIdentifiers: [],
2607
+ updatedAt: Date.now(),
2608
+ lastChangedItemId: null,
2609
+ itemSessions: {}
2610
+ },
2611
+ !0
2612
+ );
2613
+ return;
2614
+ }
2615
+ if (h === Zt) return;
2616
+ rn(), Zt = h, Qt = (typeof h.subscribe == "function" ? h.subscribe.bind(h) : null)?.((R) => {
2617
+ Ct(
2618
+ {
2619
+ itemId: R?.itemId,
2620
+ updatedAt: R?.timestamp || Date.now()
2621
+ },
2622
+ h
2623
+ );
2624
+ }) || null, Ct(void 0, h);
2625
+ }
2626
+ function cs() {
2627
+ Bn({ updatedAt: Date.now() });
2628
+ }
2629
+ kn(() => {
2630
+ if (!(!r() || !s()))
2631
+ return sn(), Wn(), en = r().onSectionControllerLifecycle?.((h) => {
2632
+ const S = h?.key?.sectionId || "", R = h?.key?.attemptId || void 0;
2633
+ S === s() && (R || void 0) === (i() || void 0) && (sn(), Ct({ updatedAt: Date.now() }));
2634
+ }) || null, () => {
2635
+ rn(), Wn();
2636
+ };
2637
+ }), Fi(() => {
2638
+ const h = (un, an, fn) => Math.max(an, Math.min(un, fn)), S = window.innerWidth, R = window.innerHeight;
2639
+ $(f, h(Math.round(S * 0.29), 280, 560), !0), $(c, h(Math.round(R * 0.72), 360, 860), !0), $(u, Math.max(16, Math.round(S * 0.08)), !0), $(a, Math.max(16, Math.round((R - m(c)) / 2)), !0);
2640
+ const N = () => {
2641
+ Bn({ updatedAt: Date.now() });
2642
+ };
2643
+ return document.addEventListener("session-changed", N, !0), document.addEventListener("item-session-changed", N, !0), document.addEventListener("composition-changed", N, !0), () => {
2644
+ document.removeEventListener("session-changed", N, !0), document.removeEventListener("item-session-changed", N, !0), document.removeEventListener("composition-changed", N, !0);
2594
2645
  };
2595
- }), Ii(() => {
2596
- const _ = (Zt, Qt, en) => Math.max(Qt, Math.min(Zt, en)), I = window.innerWidth, A = window.innerHeight;
2597
- E(a, _(Math.round(I * 0.29), 280, 560), !0), E(c, _(Math.round(A * 0.72), 360, 860), !0), E(f, Math.max(16, Math.round(I * 0.08)), !0), E(u, Math.max(16, Math.round((A - w(c)) / 2)), !0);
2598
2646
  });
2599
- function ts(_) {
2600
- E(h, !0), g = _.clientX, v = _.clientY, C = w(f), y = w(u), document.addEventListener("mousemove", Pn), document.addEventListener("mouseup", Kt);
2647
+ function ds(h) {
2648
+ $(v, !0), g = h.clientX, _ = h.clientY, T = m(u), E = m(a), document.addEventListener("mousemove", qn), document.addEventListener("mouseup", on);
2601
2649
  }
2602
- function Pn(_) {
2603
- if (!w(h)) return;
2604
- const I = _.clientX - g, A = _.clientY - v;
2605
- E(f, C + I), E(u, y + A), E(f, Math.max(0, Math.min(w(f), window.innerWidth - w(a))), !0), E(u, Math.max(0, Math.min(w(u), window.innerHeight - 100)), !0);
2650
+ function qn(h) {
2651
+ if (!m(v)) return;
2652
+ const S = h.clientX - g, R = h.clientY - _;
2653
+ $(u, T + S), $(a, E + R), $(u, Math.max(0, Math.min(m(u), window.innerWidth - m(f))), !0), $(a, Math.max(0, Math.min(m(a), window.innerHeight - 100)), !0);
2606
2654
  }
2607
- function Kt() {
2608
- E(h, !1), document.removeEventListener("mousemove", Pn), document.removeEventListener("mouseup", Kt);
2655
+ function on() {
2656
+ $(v, !1), document.removeEventListener("mousemove", qn), document.removeEventListener("mouseup", on);
2609
2657
  }
2610
- function ns(_) {
2611
- E(d, !0), Ee = _.clientX, re = _.clientY, Cn = w(a), Nn = w(c), document.addEventListener("mousemove", Ln), document.addEventListener("mouseup", Gt), _.stopPropagation();
2658
+ function hs(h) {
2659
+ $(d, !0), ke = h.clientX, se = h.clientY, Hn = m(f), zn = m(c), document.addEventListener("mousemove", Un), document.addEventListener("mouseup", ln), h.stopPropagation();
2612
2660
  }
2613
- function Ln(_) {
2614
- if (!w(d)) return;
2615
- const I = _.clientX - Ee, A = _.clientY - re;
2616
- E(a, Math.max(300, Math.min(Cn + I, window.innerWidth - w(f))), !0), E(c, Math.max(200, Math.min(Nn + A, window.innerHeight - w(u))), !0);
2661
+ function Un(h) {
2662
+ if (!m(d)) return;
2663
+ const S = h.clientX - ke, R = h.clientY - se;
2664
+ $(f, Math.max(300, Math.min(Hn + S, window.innerWidth - m(u))), !0), $(c, Math.max(200, Math.min(zn + R, window.innerHeight - m(a))), !0);
2617
2665
  }
2618
- function Gt() {
2619
- E(d, !1), document.removeEventListener("mousemove", Ln), document.removeEventListener("mouseup", Gt);
2666
+ function ln() {
2667
+ $(d, !1), document.removeEventListener("mousemove", Un), document.removeEventListener("mouseup", ln);
2620
2668
  }
2621
- gn(() => () => {
2622
- Kt(), Gt();
2669
+ kn(() => () => {
2670
+ on(), ln();
2623
2671
  });
2624
- var rs = {
2672
+ var vs = {
2673
+ refreshFromHost: cs,
2625
2674
  get toolkitCoordinator() {
2626
2675
  return r();
2627
2676
  },
2628
- set toolkitCoordinator(_ = null) {
2629
- r(_), Dt();
2677
+ set toolkitCoordinator(h = null) {
2678
+ r(h), Ft();
2630
2679
  },
2631
2680
  get sectionId() {
2632
2681
  return s();
2633
2682
  },
2634
- set sectionId(_ = "") {
2635
- s(_), Dt();
2683
+ set sectionId(h = "") {
2684
+ s(h), Ft();
2636
2685
  },
2637
2686
  get attemptId() {
2638
2687
  return i();
2639
2688
  },
2640
- set attemptId(_ = void 0) {
2641
- i(_), Dt();
2689
+ set attemptId(h = void 0) {
2690
+ i(h), Ft();
2642
2691
  }
2643
- }, Mt = qi(), At = Se(Mt), jn = Xe(Se(At), 2), vt = Se(jn), ss = Se(vt);
2692
+ }, Rt = so(), Nt = Ae(Rt), Xn = Ke(Ae(Nt), 2), gt = Ae(Xn), _s = Ae(gt);
2644
2693
  {
2645
- var is = (_) => {
2646
- var I = Hi();
2647
- ke(_, I);
2648
- }, os = (_) => {
2649
- var I = zi();
2650
- ke(_, I);
2694
+ var ps = (h) => {
2695
+ var S = Gi();
2696
+ _e(h, S);
2697
+ }, gs = (h) => {
2698
+ var S = Zi();
2699
+ _e(h, S);
2651
2700
  };
2652
- Ot(ss, (_) => {
2653
- w(o) ? _(is) : _(os, !1);
2701
+ Pt(_s, (h) => {
2702
+ m(o) ? h(ps) : h(gs, !1);
2654
2703
  });
2655
2704
  }
2656
- xe(vt);
2657
- var ls = Xe(vt, 2);
2658
- xe(jn), xe(At);
2659
- var Fn = Xe(At, 2);
2705
+ Ie(gt);
2706
+ var ms = Ke(gt, 2);
2707
+ Ie(Xn), Ie(Nt);
2708
+ var Jn = Ke(Nt, 2);
2660
2709
  {
2661
- var fs = (_) => {
2662
- var I = Bi(), A = Se(I), Zt = Xe(Se(A), 2);
2710
+ var ws = (h) => {
2711
+ var S = no(), R = Ae(S), N = Ke(Ae(R), 2);
2663
2712
  {
2664
- var Qt = (Ue) => {
2665
- var _t = Vi();
2666
- ke(Ue, _t);
2667
- }, en = /* @__PURE__ */ Zs(() => Object.keys(w(Jt).itemSessions || {}).length === 0), cs = (Ue) => {
2668
- var _t = Yi(), Hn = Xe(Se(_t), 2), ds = Se(Hn, !0);
2669
- xe(Hn), xe(_t), rn((hs) => Ei(ds, hs), [() => JSON.stringify(w(Jt), null, 2)]), ke(Ue, _t);
2713
+ var un = (ve) => {
2714
+ var Le = Qi();
2715
+ _e(ve, Le);
2716
+ }, an = (ve) => {
2717
+ var Le = eo();
2718
+ _e(ve, Le);
2719
+ }, fn = /* @__PURE__ */ ai(() => Object.keys(m(Tt).itemSessions || {}).length === 0), $s = (ve) => {
2720
+ var Le = to(), Kn = Ke(Ae(Le), 2), Es = Ae(Kn, !0);
2721
+ Ie(Kn), Ie(Le), hn((Ss) => Oi(Es, Ss), [() => JSON.stringify(m(Tt), null, 2)]), _e(ve, Le);
2670
2722
  };
2671
- Ot(Zt, (Ue) => {
2672
- w(en) ? Ue(Qt) : Ue(cs, !1);
2723
+ Pt(N, (ve) => {
2724
+ m(tn) ? m(fn) ? ve(an, 1) : ve($s, !1) : ve(un);
2673
2725
  });
2674
2726
  }
2675
- xe(A), xe(I), rn(() => Kn(I, `height: ${w(c) - 60}px;`)), ke(_, I);
2727
+ Ie(R), Ie(S), hn(() => or(S, `height: ${m(c) - 60}px;`)), _e(h, S);
2676
2728
  };
2677
- Ot(Fn, (_) => {
2678
- w(o) || _(fs);
2729
+ Pt(Jn, (h) => {
2730
+ m(o) || h(ws);
2679
2731
  });
2680
2732
  }
2681
- var us = Xe(Fn, 2);
2733
+ var bs = Ke(Jn, 2);
2682
2734
  {
2683
- var as = (_) => {
2684
- var I = Wi();
2685
- Nt("mousedown", I, ns), ke(_, I);
2735
+ var ys = (h) => {
2736
+ var S = ro();
2737
+ Dt("mousedown", S, hs), _e(h, S);
2686
2738
  };
2687
- Ot(us, (_) => {
2688
- w(o) || _(as);
2739
+ Pt(bs, (h) => {
2740
+ m(o) || h(ys);
2689
2741
  });
2690
2742
  }
2691
- return xe(Mt), rn(() => {
2692
- Kn(Mt, `left: ${w(f) ?? ""}px; top: ${w(u) ?? ""}px; width: ${w(a) ?? ""}px; ${w(o) ? "height: auto;" : `height: ${w(c)}px;`}`), Ri(vt, "title", w(o) ? "Maximize" : "Minimize");
2693
- }), Nt("mousedown", At, ts), Nt("click", vt, () => E(o, !w(o))), Nt("click", ls, () => n("close")), ke(e, Mt), ar(rs);
2743
+ return Ie(Rt), hn(() => {
2744
+ or(Rt, `left: ${m(u) ?? ""}px; top: ${m(a) ?? ""}px; width: ${m(f) ?? ""}px; ${m(o) ? "height: auto;" : `height: ${m(c)}px;`}`), Bi(gt, "title", m(o) ? "Maximize" : "Minimize");
2745
+ }), Dt("mousedown", Nt, ds), Dt("click", gt, () => $(o, !m(o))), Dt("click", ms, () => n("close")), _e(e, Rt), br(vs);
2694
2746
  }
2695
- gi(["mousedown", "click"]);
2696
- customElements.define("pie-section-player-tools-session-debugger", Fi(
2697
- Ui,
2747
+ Ai(["mousedown", "click"]);
2748
+ customElements.define("pie-section-player-tools-session-debugger", Ki(
2749
+ io,
2698
2750
  {
2699
2751
  sectionId: { attribute: "section-id", type: "String" },
2700
2752
  attemptId: { attribute: "attempt-id", type: "String" },
2701
2753
  toolkitCoordinator: { attribute: "toolkit-coordinator", type: "Object" }
2702
2754
  },
2703
2755
  [],
2704
- [],
2705
- { mode: "open" }
2756
+ ["refreshFromHost"]
2706
2757
  ));
2707
2758
  export {
2708
- Ui as default
2759
+ io as default
2709
2760
  };