@tempots/dom 32.0.0 → 33.0.0

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.
package/index.js CHANGED
@@ -1,18 +1,18 @@
1
- const _ = [], qe = (t) => {
1
+ const _ = [], We = (t) => {
2
2
  _.push(t);
3
- }, Fe = () => {
3
+ }, Ue = () => {
4
4
  if (_.length === 0)
5
5
  throw new Error("Cannot pop from empty scope stack");
6
6
  _.pop();
7
- }, ge = () => _[_.length - 1] ?? null, Bt = () => _, Wt = () => _[_.length - 2] ?? null, L = (t, e) => {
8
- qe(t);
7
+ }, ye = () => _[_.length - 1] ?? null, Zt = () => _, zt = () => _[_.length - 2] ?? null, L = (t, e) => {
8
+ We(t);
9
9
  try {
10
10
  return e();
11
11
  } finally {
12
- Fe();
12
+ Ue();
13
13
  }
14
- }, Ut = (t) => {
15
- const e = new q();
14
+ }, Kt = (t) => {
15
+ const e = new j();
16
16
  try {
17
17
  return L(e, () => t(e));
18
18
  } finally {
@@ -79,10 +79,10 @@ class g {
79
79
  * @param equals - Function to compare two values for equality (defaults to strict equality)
80
80
  * @returns A Signal that represents the result of the Promise
81
81
  */
82
- static ofPromise = (e, s, r, n = (i, o) => i === o) => {
83
- const i = new g(s, n);
82
+ static ofPromise = (e, s, n, r = (i, o) => i === o) => {
83
+ const i = new g(s, r);
84
84
  return e.then((o) => i._setAndNotify(o)).catch((o) => {
85
- r != null ? i._setAndNotify(r(o)) : console.error(
85
+ n != null ? i._setAndNotify(n(o)) : console.error(
86
86
  "Unhandled promise rejection in Signal.ofPromise:",
87
87
  o
88
88
  );
@@ -145,17 +145,17 @@ class g {
145
145
  */
146
146
  on = (e, s = {}) => {
147
147
  s.skipInitial || e(this.get(), void 0);
148
- const r = s.once ? (i, o) => {
149
- n(), e(i, o);
148
+ const n = s.once ? (i, o) => {
149
+ r(), e(i, o);
150
150
  } : e;
151
- this._onValueListeners.push(r);
152
- const n = () => {
151
+ this._onValueListeners.push(n);
152
+ const r = () => {
153
153
  this._onValueListeners.splice(
154
- this._onValueListeners.indexOf(r),
154
+ this._onValueListeners.indexOf(n),
155
155
  1
156
- ), s.abortSignal != null && s.abortSignal.removeEventListener("abort", n);
156
+ ), s.abortSignal != null && s.abortSignal.removeEventListener("abort", r);
157
157
  };
158
- return s.abortSignal != null && s.abortSignal.addEventListener("abort", n), n;
158
+ return s.abortSignal != null && s.abortSignal.addEventListener("abort", r), r;
159
159
  };
160
160
  /**
161
161
  * Registers a listener function to be called whenever the value of the signal changes.
@@ -166,11 +166,11 @@ class g {
166
166
  * @param options - Options for the listener.
167
167
  */
168
168
  onChange = (e, s = {}) => {
169
- let r = 0;
170
- const n = (i, o) => {
171
- r++ > 0 && e(i, o);
169
+ let n = 0;
170
+ const r = (i, o) => {
171
+ n++ > 0 && e(i, o);
172
172
  };
173
- return this.on(n, s);
173
+ return this.on(r, s);
174
174
  };
175
175
  /**
176
176
  * @internal
@@ -178,7 +178,7 @@ class g {
178
178
  _setAndNotify = (e) => {
179
179
  if (this._disposed) return;
180
180
  const s = this._value;
181
- this.equals(s, e) || (this._value = e, this._onValueListeners.forEach((n) => n(e, s)));
181
+ this.equals(s, e) || (this._value = e, this._onValueListeners.forEach((r) => r(e, s)));
182
182
  };
183
183
  /**
184
184
  * @internal
@@ -265,15 +265,15 @@ class g {
265
265
  * @param equals - Optional function to determine if two transformed values are equal (defaults to strict equality)
266
266
  * @returns A new computed signal with the transformed value (auto-registered with current scope)
267
267
  */
268
- map = (e, s = (r, n) => r === n) => {
269
- const r = new $(() => {
268
+ map = (e, s = (n, r) => n === r) => {
269
+ const n = new N(() => {
270
270
  try {
271
271
  return e(this.get());
272
- } catch (n) {
273
- throw console.error("Error in Signal.map:", n), n;
272
+ } catch (r) {
273
+ throw console.error("Error in Signal.map:", r), r;
274
274
  }
275
275
  }, s);
276
- return this.setDerivative(r), r;
276
+ return this.setDerivative(n), n;
277
277
  };
278
278
  /**
279
279
  * Returns a new Signal that applies the given function to the value of the current Signal,
@@ -285,15 +285,15 @@ class g {
285
285
  * Defaults to a strict equality check (===).
286
286
  * @returns A new Signal that emits the values of the resulting Signal.
287
287
  */
288
- flatMap = (e, s = (r, n) => r === n) => {
289
- const r = new $(() => {
288
+ flatMap = (e, s = (n, r) => n === r) => {
289
+ const n = new N(() => {
290
290
  try {
291
291
  return e(this.get()).get();
292
- } catch (n) {
293
- throw console.error("Error in Signal.flatMap:", n), n;
292
+ } catch (r) {
293
+ throw console.error("Error in Signal.flatMap:", r), r;
294
294
  }
295
295
  }, s);
296
- return this.setDerivative(r), r;
296
+ return this.setDerivative(n), n;
297
297
  };
298
298
  /**
299
299
  * Invokes a callback function with the current value of the signal, without modifying the signal.
@@ -323,16 +323,16 @@ class g {
323
323
  });
324
324
  }
325
325
  filter = (e, s) => {
326
- let r = s ?? this.get();
327
- const n = new $(() => {
326
+ let n = s ?? this.get();
327
+ const r = new N(() => {
328
328
  try {
329
329
  const i = this.get();
330
- return r = e(i) ? i : r;
330
+ return n = e(i) ? i : n;
331
331
  } catch (i) {
332
332
  throw console.error("Error in Signal.filter:", i), i;
333
333
  }
334
334
  }, this.equals);
335
- return this.setDerivative(n), n;
335
+ return this.setDerivative(r), r;
336
336
  };
337
337
  /**
338
338
  * Returns a new Computed object that applies the provided mapping function to the value of this Signal,
@@ -344,16 +344,16 @@ class g {
344
344
  * @param equals - Optional equality function to determine if two values are equal.
345
345
  * @returns - A new Computed object with the mapped and filtered values.
346
346
  */
347
- filterMap = (e, s, r = (n, i) => n === i) => {
348
- let n = s;
349
- const i = new $(() => {
347
+ filterMap = (e, s, n = (r, i) => r === i) => {
348
+ let r = s;
349
+ const i = new N(() => {
350
350
  try {
351
351
  const o = this.get(), l = e(o);
352
- return n = l ?? n;
352
+ return r = l ?? r;
353
353
  } catch (o) {
354
354
  throw console.error("Error in Signal.filterMap:", o), o;
355
355
  }
356
- }, r);
356
+ }, n);
357
357
  return this.setDerivative(i), i;
358
358
  };
359
359
  /**
@@ -369,8 +369,8 @@ class g {
369
369
  * @param equals - The equality function to compare the mapped values for equality.
370
370
  * @returns A property that holds the mapped value and can be observed for changes.
371
371
  */
372
- mapAsync = (e, s, r, n = (i, o) => i === o) => {
373
- const i = T(s, n);
372
+ mapAsync = (e, s, n, r = (i, o) => i === o) => {
373
+ const i = T(s, r);
374
374
  let o = 0, l = new AbortController();
375
375
  return i.onDispose(
376
376
  this.on(async (c) => {
@@ -381,8 +381,8 @@ class g {
381
381
  a === o && i.set(u);
382
382
  } catch (u) {
383
383
  if (a === o)
384
- if (r != null)
385
- i.set(r(u));
384
+ if (n != null)
385
+ i.set(n(u));
386
386
  else
387
387
  throw u;
388
388
  }
@@ -399,7 +399,7 @@ class g {
399
399
  * @param alt - The alternative value to use when the mapped value is `undefined` or `null`.
400
400
  * @returns A new signal containing the mapped values.
401
401
  */
402
- mapMaybe = (e, s) => this.map((r) => e(r) ?? s);
402
+ mapMaybe = (e, s) => this.map((n) => e(n) ?? s);
403
403
  /**
404
404
  * Feeds a property into the signal and sets up disposal behavior.
405
405
  * @param prop - The property to feed into the signal.
@@ -407,8 +407,8 @@ class g {
407
407
  * @returns The input property.
408
408
  */
409
409
  feedProp = (e, s = !1) => {
410
- const r = this.on(e.set);
411
- return e.onDispose(r), s ? this.onDispose(e.dispose) : this.onDispose(r), e;
410
+ const n = this.on(e.set);
411
+ return e.onDispose(n), s ? this.onDispose(e.dispose) : this.onDispose(n), e;
412
412
  };
413
413
  /**
414
414
  * Derives a new property from the current signal.
@@ -449,8 +449,8 @@ class g {
449
449
  }), e.onDispose(this.on(e.setDirty)), this.onDispose(e.dispose);
450
450
  };
451
451
  }
452
- const Be = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
453
- class $ extends g {
452
+ const Ge = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
453
+ class N extends g {
454
454
  /**
455
455
  * Creates a new Computed signal.
456
456
  *
@@ -477,8 +477,8 @@ class $ extends g {
477
477
  */
478
478
  constructor(e, s) {
479
479
  super(void 0, s), this._fn = e, this.setDirty();
480
- const r = ge();
481
- r?.track(this);
480
+ const n = ye();
481
+ n?.track(this);
482
482
  }
483
483
  /**
484
484
  * Checks if a value is an instance of `Computed`.
@@ -516,7 +516,7 @@ class $ extends g {
516
516
  */
517
517
  _scheduleNotify = () => {
518
518
  const e = ++this._scheduleCount;
519
- Be(() => {
519
+ Ge(() => {
520
520
  this._scheduleCount !== e || this._disposed || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn()));
521
521
  });
522
522
  };
@@ -571,15 +571,15 @@ class Z extends g {
571
571
  * @returns A dispatch function that can be used to update the state and trigger the effects.
572
572
  */
573
573
  reducer = (e, ...s) => {
574
- const r = this;
575
- return function n(i) {
576
- const o = r.value;
577
- r.update((l) => e(l, i)), !r.equals(o, r.value) && s.forEach(
574
+ const n = this;
575
+ return function r(i) {
576
+ const o = n.value;
577
+ n.update((l) => e(l, i)), !n.equals(o, n.value) && s.forEach(
578
578
  (l) => l({
579
579
  previousState: o,
580
- state: r.value,
580
+ state: n.value,
581
581
  action: i,
582
- dispatch: n
582
+ dispatch: r
583
583
  })
584
584
  );
585
585
  };
@@ -595,9 +595,9 @@ class Z extends g {
595
595
  * Defaults to a strict equality check (===).
596
596
  * @returns A Prop object representing the isomorphism.
597
597
  */
598
- iso = (e, s, r = (n, i) => n === i) => {
599
- const n = new Z(e(this.get()), r);
600
- return n.onDispose(this.on((i) => n.set(e(i)))), n.on((i) => this._setAndNotify(s(i))), n;
598
+ iso = (e, s, n = (r, i) => r === i) => {
599
+ const r = new Z(e(this.get()), n);
600
+ return r.onDispose(this.on((i) => r.set(e(i)))), r.on((i) => this._setAndNotify(s(i))), r;
601
601
  };
602
602
  /**
603
603
  * Returns a `Prop` that represents the value at the specified key of the current value.
@@ -619,38 +619,38 @@ class Z extends g {
619
619
  this._setAndNotify(e);
620
620
  }
621
621
  }
622
- const z = (t, e, s = (r, n) => r === n) => {
623
- const r = new $(t, s);
624
- return e.forEach((n) => n.setDerivative(r)), r;
625
- }, me = (t, e, s = {}) => {
626
- let r = s.once ? () => {
622
+ const z = (t, e, s = (n, r) => n === r) => {
623
+ const n = new N(t, s);
624
+ return e.forEach((r) => r.setDerivative(n)), n;
625
+ }, Se = (t, e, s = {}) => {
626
+ let n = s.once ? () => {
627
627
  i(), t();
628
628
  } : t;
629
629
  if (s.skipInitial) {
630
630
  let o = !1;
631
- const l = r;
632
- r = () => {
631
+ const l = n;
632
+ n = () => {
633
633
  o ? l() : o = !0;
634
634
  };
635
635
  }
636
- const n = z(r, e), i = () => {
637
- n.dispose(), s.abortSignal != null && s.abortSignal.removeEventListener("abort", i);
636
+ const r = z(n, e), i = () => {
637
+ r.dispose(), s.abortSignal != null && s.abortSignal.removeEventListener("abort", i);
638
638
  };
639
639
  return s.abortSignal != null && s.abortSignal.addEventListener("abort", i), i;
640
- }, T = (t, e = (s, r) => s === r) => {
641
- const s = new Z(t, e), r = ge();
642
- return r?.track(s), s;
643
- }, K = (t, e = (s, r) => s === r) => new g(t, e);
644
- function ye(t) {
640
+ }, T = (t, e = (s, n) => s === n) => {
641
+ const s = new Z(t, e), n = ye();
642
+ return n?.track(s), s;
643
+ }, K = (t, e = (s, n) => s === n) => new g(t, e);
644
+ function we(t) {
645
645
  return t != null && t !== !1 && t !== 0 && t !== "";
646
646
  }
647
- function We(t) {
648
- return !ye(t);
647
+ function Je(t) {
648
+ return !we(t);
649
649
  }
650
- function Ue(t) {
650
+ function Xe(t) {
651
651
  return t == null;
652
652
  }
653
- function Je(t) {
653
+ function Ye(t) {
654
654
  return t != null;
655
655
  }
656
656
  const y = {
@@ -737,48 +737,48 @@ const y = {
737
737
  * @param value - The value or signal to check.
738
738
  * @returns A signal that emits `true` if the value is truthy, `false` otherwise.
739
739
  */
740
- truthy: (t) => y.map(t, ye),
740
+ truthy: (t) => y.map(t, we),
741
741
  /**
742
742
  * Creates a new signal that emits `true` if the value is falsy, `false` otherwise.
743
743
  * @param value - The value or signal to check.
744
744
  * @returns A signal that emits `true` if the value is falsy, `false` otherwise.
745
745
  */
746
- falsy: (t) => y.map(t, We),
746
+ falsy: (t) => y.map(t, Je),
747
747
  /**
748
748
  * Creates a new signal that emits `true` if the value is null or undefined, `false` otherwise.
749
749
  * @param value - The value or signal to check.
750
750
  * @returns A signal that emits `true` if the value is null or undefined, `false` otherwise.
751
751
  */
752
- nil: (t) => y.map(t, Ue),
752
+ nil: (t) => y.map(t, Xe),
753
753
  /**
754
754
  * Creates a new signal that emits `true` if the value is not null or undefined, `false` otherwise.
755
755
  * @param value - The value or signal to check.
756
756
  * @returns A signal that emits `true` if the value is not null or undefined, `false` otherwise.
757
757
  */
758
- defined: (t) => y.map(t, Je)
758
+ defined: (t) => y.map(t, Ye)
759
759
  }, ee = (...t) => (e, s) => {
760
760
  if (t.length === 1)
761
761
  return y.toSignal(t[0]).map(e);
762
- const r = t.filter((n) => g.is(n));
762
+ const n = t.filter((r) => g.is(r));
763
763
  return z(
764
- () => e(...t.map((n) => y.get(n))),
765
- r,
764
+ () => e(...t.map((r) => y.get(r))),
765
+ n,
766
766
  s
767
767
  );
768
- }, Jt = (t) => {
768
+ }, es = (t) => {
769
769
  const e = Object.keys(t);
770
770
  return ee(...Object.values(t))(
771
- (...s) => Object.fromEntries(e.map((r, n) => [r, s[n]]))
771
+ (...s) => Object.fromEntries(e.map((n, r) => [n, s[r]]))
772
772
  );
773
- }, Ge = (...t) => (e, s = {}) => {
774
- const r = t.filter((n) => g.is(n));
775
- return me(
773
+ }, Qe = (...t) => (e, s = {}) => {
774
+ const n = t.filter((r) => g.is(r));
775
+ return Se(
776
776
  () => e(...t.map(y.get)),
777
- r,
777
+ n,
778
778
  s
779
779
  );
780
780
  };
781
- class q {
781
+ class j {
782
782
  _signals = /* @__PURE__ */ new Set();
783
783
  _callbacks = [];
784
784
  _disposed = !1;
@@ -851,8 +851,8 @@ class q {
851
851
  * @public
852
852
  */
853
853
  prop(e, s) {
854
- const r = oe(() => T(e, s));
855
- return this.track(r), r;
854
+ const n = oe(() => T(e, s));
855
+ return this.track(n), n;
856
856
  }
857
857
  /**
858
858
  * Creates a computed signal and tracks it in this scope.
@@ -864,9 +864,9 @@ class q {
864
864
  * @returns A tracked Computed signal
865
865
  * @public
866
866
  */
867
- computed(e, s, r) {
868
- const n = oe(() => z(e, s, r));
869
- return this.track(n), n;
867
+ computed(e, s, n) {
868
+ const r = oe(() => z(e, s, n));
869
+ return this.track(r), r;
870
870
  }
871
871
  /**
872
872
  * Creates an effect and tracks it in this scope.
@@ -878,8 +878,8 @@ class q {
878
878
  * @returns A clear function (the effect itself is tracked in the scope)
879
879
  * @public
880
880
  */
881
- effect(e, s, r) {
882
- return L(this, () => me(e, s, r));
881
+ effect(e, s, n) {
882
+ return L(this, () => Se(e, s, n));
883
883
  }
884
884
  /**
885
885
  * Creates a computed signal with curried signature and tracks it in this scope.
@@ -890,9 +890,9 @@ class q {
890
890
  * @public
891
891
  */
892
892
  computedOf(...e) {
893
- return (s, r) => {
894
- const n = oe(() => ee(...e)(s, r));
895
- return this.track(n), n;
893
+ return (s, n) => {
894
+ const r = oe(() => ee(...e)(s, n));
895
+ return this.track(r), r;
896
896
  };
897
897
  }
898
898
  /**
@@ -904,20 +904,20 @@ class q {
904
904
  * @public
905
905
  */
906
906
  effectOf(...e) {
907
- return (s, r) => L(this, () => Ge(...e)(s, r));
907
+ return (s, n) => L(this, () => Qe(...e)(s, n));
908
908
  }
909
909
  }
910
- const Xe = (t, e, s) => t + (e - t) * s, de = 97, Ye = (t, e, s) => {
911
- const r = Math.max(t.length, e.length);
912
- let n = "";
913
- for (let i = 0; i < r; i++) {
910
+ const Ze = (t, e, s) => t + (e - t) * s, pe = 97, ze = (t, e, s) => {
911
+ const n = Math.max(t.length, e.length);
912
+ let r = "";
913
+ for (let i = 0; i < n; i++) {
914
914
  let o = t.charCodeAt(i);
915
- isNaN(o) && (o = de);
915
+ isNaN(o) && (o = pe);
916
916
  let l = e.charCodeAt(i);
917
- isNaN(l) && (l = de), n += String.fromCharCode(o + (l - o) * s);
917
+ isNaN(l) && (l = pe), r += String.fromCharCode(o + (l - o) * s);
918
918
  }
919
- return n;
920
- }, Qe = (t, e, s) => new Date(t.getTime() + (e.getTime() - t.getTime()) * s), Ze = (t, e) => e, ze = (t) => typeof t == "number" ? Xe : typeof t == "string" ? Ye : t instanceof Date ? Qe : Ze;
919
+ return r;
920
+ }, Ke = (t, e, s) => new Date(t.getTime() + (e.getTime() - t.getTime()) * s), et = (t, e) => e, tt = (t) => typeof t == "number" ? Ze : typeof t == "string" ? ze : t instanceof Date ? Ke : et;
921
921
  class le {
922
922
  /**
923
923
  * Creates a new instance of `ElementPosition`.
@@ -966,7 +966,7 @@ class le {
966
966
  this.#e?.dispose(), this.#e = void 0;
967
967
  };
968
968
  }
969
- const ce = () => (
969
+ const ue = () => (
970
970
  /* c8 ignore next */
971
971
  typeof window < "u" ? window : void 0
972
972
  );
@@ -987,12 +987,13 @@ class be {
987
987
  this._store.set(e, s);
988
988
  };
989
989
  }
990
- const Se = ({
990
+ let ce = null, ae = null;
991
+ const st = () => (ce || (ce = new be()), ce), nt = () => (ae || (ae = new be()), ae), _e = ({
991
992
  key: t,
992
993
  defaultValue: e,
993
994
  store: s,
994
- serialize: r = JSON.stringify,
995
- deserialize: n = JSON.parse,
995
+ serialize: n = JSON.stringify,
996
+ deserialize: r = JSON.parse,
996
997
  equals: i = (a, u) => a === u,
997
998
  onLoad: o = (a) => a,
998
999
  syncTabs: l = !0,
@@ -1000,22 +1001,22 @@ const Se = ({
1000
1001
  }) => {
1001
1002
  let a = y.get(t);
1002
1003
  const u = s.getItem(a), h = new Z(
1003
- u != null ? o(n(u)) : typeof e == "function" ? e() : e,
1004
+ u != null ? o(r(u)) : typeof e == "function" ? e() : e,
1004
1005
  i
1005
- ), p = ce(), f = l && typeof p?.BroadcastChannel == "function";
1006
- let m = !1, S = null, D = null;
1007
- const w = (b) => {
1008
- if (!f) return null;
1009
- const k = `tempo:storedProp:${b}`, A = new p.BroadcastChannel(k), M = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, x = (F) => {
1006
+ ), p = ue(), d = l && typeof p?.BroadcastChannel == "function";
1007
+ let m = !1, w = null, D = null;
1008
+ const b = (S) => {
1009
+ if (!d) return null;
1010
+ const M = `tempo:storedProp:${S}`, A = new p.BroadcastChannel(M), k = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, x = (F) => {
1010
1011
  const v = F.data;
1011
- if (!(v == null || typeof v != "object" || v.key !== b || typeof v.value != "string" || v.sourceId != null && v.sourceId === M))
1012
+ if (!(v == null || typeof v != "object" || v.key !== S || typeof v.value != "string" || v.sourceId != null && v.sourceId === k))
1012
1013
  try {
1013
1014
  m = !0;
1014
- const ie = o(n(v.value));
1015
+ const ie = o(r(v.value));
1015
1016
  h.set(ie);
1016
1017
  } catch (ie) {
1017
1018
  console.warn(
1018
- `Failed to sync storedProp for key "${b}" via BroadcastChannel`,
1019
+ `Failed to sync storedProp for key "${S}" via BroadcastChannel`,
1019
1020
  ie
1020
1021
  );
1021
1022
  } finally {
@@ -1024,127 +1025,131 @@ const Se = ({
1024
1025
  };
1025
1026
  return A.addEventListener("message", x), h.onDispose(() => {
1026
1027
  A?.removeEventListener("message", x), A?.close();
1027
- }), { channel: A, instanceId: M, handleMessage: x };
1028
- }, P = w(a);
1029
- P && (S = P.channel, D = P.instanceId);
1030
- const ne = (b) => {
1031
- const k = a;
1032
- if (k === b) return;
1033
- const A = h.get(), M = r(A);
1034
- if (s.setItem(k, M), S != null && (S.close(), S = null, D = null), a = b, c === "load") {
1035
- const F = s.getItem(b);
1028
+ }), { channel: A, instanceId: k, handleMessage: x };
1029
+ }, P = b(a);
1030
+ P && (w = P.channel, D = P.instanceId);
1031
+ const re = (S) => {
1032
+ const M = a;
1033
+ if (M === S) return;
1034
+ const A = h.get(), k = n(A);
1035
+ if (s.setItem(M, k), w != null && (w.close(), w = null, D = null), a = S, c === "load") {
1036
+ const F = s.getItem(S);
1036
1037
  if (F != null)
1037
1038
  try {
1038
- const v = o(n(F));
1039
+ const v = o(r(F));
1039
1040
  h.set(v);
1040
1041
  } catch (v) {
1041
1042
  console.warn(
1042
- `Failed to load storedProp from new key "${b}"`,
1043
+ `Failed to load storedProp from new key "${S}"`,
1043
1044
  v
1044
1045
  );
1045
1046
  }
1046
1047
  else
1047
- s.setItem(b, M);
1048
- } else c === "migrate" && s.setItem(b, M);
1049
- const x = w(b);
1050
- x && (S = x.channel, D = x.instanceId);
1051
- };
1052
- return g.is(t) && h.onDispose(t.on(ne)), h.on((b, k) => {
1053
- const A = r(b);
1054
- s.setItem(a, A), S != null && !m && k !== void 0 && D != null && S.postMessage({
1048
+ s.setItem(S, k);
1049
+ } else c === "migrate" && s.setItem(S, k);
1050
+ const x = b(S);
1051
+ x && (w = x.channel, D = x.instanceId);
1052
+ };
1053
+ return g.is(t) && h.onDispose(t.on(re)), h.on((S, M) => {
1054
+ const A = n(S);
1055
+ s.setItem(a, A), w != null && !m && M !== void 0 && D != null && w.postMessage({
1055
1056
  key: a,
1056
1057
  value: A,
1057
1058
  sourceId: D
1058
1059
  });
1059
1060
  }), h;
1060
- }, Gt = (t) => Se({
1061
- ...t,
1062
- /* c8 ignore next 3 */
1063
- store: ce()?.localStorage ?? new be()
1064
- }), Xt = (t) => Se({
1065
- ...t,
1066
- /* c8 ignore next 3 */
1067
- store: ce()?.sessionStorage ?? new be()
1068
- });
1069
- function fe(t) {
1061
+ }, ts = (t) => {
1062
+ const s = ue()?.localStorage, n = s && typeof s.getItem == "function" ? s : st();
1063
+ return _e({
1064
+ ...t,
1065
+ store: n
1066
+ });
1067
+ }, ss = (t) => {
1068
+ const s = ue()?.sessionStorage, n = s && typeof s.getItem == "function" ? s : nt();
1069
+ return _e({
1070
+ ...t,
1071
+ store: n
1072
+ });
1073
+ };
1074
+ function ge(t) {
1070
1075
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
1071
1076
  }
1072
- const Ke = (t, e, s, r) => {
1073
- const n = r?.duration ?? 300, i = r?.easing ?? ((w) => w), o = r?.equals ?? ((w, P) => w === P);
1074
- let l = r?.interpolate, c = t, a = e(), u = performance.now(), h = null, p = !0;
1075
- const f = new $(e, o), m = T(t, o);
1077
+ const rt = (t, e, s, n) => {
1078
+ const r = n?.duration ?? 300, i = n?.easing ?? ((b) => b), o = n?.equals ?? ((b, P) => b === P);
1079
+ let l = n?.interpolate, c = t, a = e(), u = performance.now(), h = null, p = !0;
1080
+ const d = new N(e, o), m = T(t, o);
1076
1081
  m.onDispose(() => {
1077
1082
  h !== null && cancelAnimationFrame(h);
1078
- }), m.onDispose(f.dispose), s.forEach((w) => {
1079
- w.setDerivative(f), w.onDispose(m.dispose);
1083
+ }), m.onDispose(d.dispose), s.forEach((b) => {
1084
+ b.setDerivative(d), b.onDispose(m.dispose);
1080
1085
  });
1081
- const S = (w) => {
1082
- a = w, u = performance.now(), c = m.value, p && (p = !1, h = fe(D));
1086
+ const w = (b) => {
1087
+ a = b, u = performance.now(), c = m.value, p && (p = !1, h = ge(D));
1083
1088
  }, D = () => {
1084
- const P = (performance.now() - u) / y.get(n), ne = i(P);
1085
- l == null && (l = ze(c));
1086
- let b = l(c, a, ne);
1087
- P >= 1 ? (p = !0, b = a) : h = fe(D), m.set(b);
1088
- };
1089
- return f.on(S), m;
1090
- }, Yt = (t, e) => {
1091
- const { initialValue: s, ...r } = e ?? {};
1092
- return Ke(
1089
+ const P = (performance.now() - u) / y.get(r), re = i(P);
1090
+ l == null && (l = tt(c));
1091
+ let S = l(c, a, re);
1092
+ P >= 1 ? (p = !0, S = a) : h = ge(D), m.set(S);
1093
+ };
1094
+ return d.on(w), m;
1095
+ }, ns = (t, e) => {
1096
+ const { initialValue: s, ...n } = e ?? {};
1097
+ return rt(
1093
1098
  /* c8 ignore next 2 */
1094
1099
  s ?? t.get(),
1095
1100
  t.get,
1096
1101
  [t],
1097
- r
1102
+ n
1098
1103
  );
1099
- }, et = (t, e) => {
1100
- const s = Object.values(t).filter(g.is), r = Object.keys(t);
1104
+ }, it = (t, e) => {
1105
+ const s = Object.values(t).filter(g.is), n = Object.keys(t);
1101
1106
  return z(() => {
1102
- const n = {};
1103
- for (const i of r)
1104
- n[i] = y.get(t[i]);
1105
- return e(n);
1107
+ const r = {};
1108
+ for (const i of n)
1109
+ r[i] = y.get(t[i]);
1110
+ return e(r);
1106
1111
  }, s);
1107
- }, Qt = (t) => et(t, (e) => e), Zt = (t, e) => {
1112
+ }, rs = (t) => it(t, (e) => e), is = (t, e) => {
1108
1113
  const s = T(t.get());
1109
- let r = null;
1110
- const n = t.on((i) => {
1111
- r != null && clearTimeout(r), r = setTimeout(
1114
+ let n = null;
1115
+ const r = t.on((i) => {
1116
+ n != null && clearTimeout(n), n = setTimeout(
1112
1117
  () => {
1113
- r = null, s.set(i);
1118
+ n = null, s.set(i);
1114
1119
  },
1115
1120
  typeof e == "function" ? e(i) : e
1116
1121
  );
1117
1122
  });
1118
1123
  return s.onDispose(() => {
1119
- n(), r != null && clearTimeout(r);
1124
+ r(), n != null && clearTimeout(n);
1120
1125
  }), s;
1121
- }, zt = (t) => {
1126
+ }, os = (t) => {
1122
1127
  let e;
1123
1128
  return t.map((s) => {
1124
- const r = e;
1125
- return e = s, r;
1129
+ const n = e;
1130
+ return e = s, n;
1126
1131
  });
1127
- }, Kt = ({
1132
+ }, ls = ({
1128
1133
  size: t = void 0,
1129
1134
  signal: e
1130
1135
  }) => {
1131
1136
  const s = [];
1132
- return e.map((r) => (s.push(r), t != null && s.length > t && s.shift(), s.slice()));
1133
- }, es = (t) => (...e) => ee(
1137
+ return e.map((n) => (s.push(n), t != null && s.length > t && s.shift(), s.slice()));
1138
+ }, cs = (t) => (...e) => ee(
1134
1139
  t,
1135
1140
  ...e
1136
- )((s, ...r) => s(...r));
1137
- function ts(...t) {
1141
+ )((s, ...n) => s(...n));
1142
+ function as(...t) {
1138
1143
  return ee(...t)((...e) => {
1139
1144
  for (const s of e) if (s != null) return s;
1140
1145
  });
1141
1146
  }
1142
- const we = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), _e = /* @__PURE__ */ new Set(["selected"]), ve = /* @__PURE__ */ new Set([
1147
+ const ve = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), Te = /* @__PURE__ */ new Set(["selected"]), Ae = /* @__PURE__ */ new Set([
1143
1148
  "rowSpan",
1144
1149
  "colSpan",
1145
1150
  "tabIndex",
1146
1151
  "valueAsNumber"
1147
- ]), Te = /* @__PURE__ */ new Set(["valueAsDate"]), Ae = /* @__PURE__ */ new Set([
1152
+ ]), Ee = /* @__PURE__ */ new Set(["valueAsDate"]), Ce = /* @__PURE__ */ new Set([
1148
1153
  "value",
1149
1154
  "textContent",
1150
1155
  "innerText",
@@ -1152,28 +1157,28 @@ const we = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), _e = /* @
1152
1157
  "outerHTML",
1153
1158
  "className",
1154
1159
  "classList"
1155
- ]), tt = (t, e) => _e.has(t) ? (s) => {
1160
+ ]), ot = (t, e) => Te.has(t) ? (s) => {
1156
1161
  s == null || s !== !0 ? e.removeAttribute(t) : e.setAttribute(t, "");
1157
- } : we.has(t) ? (s) => {
1158
- s == null ? e[t] = null : e[t] = !!s;
1159
1162
  } : ve.has(t) ? (s) => {
1163
+ s == null ? e[t] = null : e[t] = !!s;
1164
+ } : Ae.has(t) ? (s) => {
1160
1165
  s == null ? e[t] = null : e[t] = Number(s);
1161
- } : Te.has(t) ? (s) => {
1166
+ } : Ee.has(t) ? (s) => {
1162
1167
  s == null ? e[t] = null : e[t] = s;
1163
- } : Ae.has(t) ? (s) => {
1168
+ } : Ce.has(t) ? (s) => {
1164
1169
  s == null ? e[t] = null : e[t] = String(s);
1165
1170
  } : (s) => {
1166
1171
  s == null ? e.removeAttribute(t) : e.setAttribute(t, s);
1167
- }, st = (t, e) => _e.has(t) ? () => e.hasAttribute(t) : we.has(t) ? () => !!e[t] : ve.has(t) ? () => Number(e[t]) : Te.has(t) ? () => e[t] : Ae.has(t) ? () => String(e[t]) : () => e.getAttribute(t), U = (t) => {
1172
+ }, lt = (t, e) => Te.has(t) ? () => e.hasAttribute(t) : ve.has(t) ? () => !!e[t] : Ae.has(t) ? () => Number(e[t]) : Ee.has(t) ? () => e[t] : Ce.has(t) ? () => String(e[t]) : () => e.getAttribute(t), U = (t) => {
1168
1173
  const e = t;
1169
1174
  e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
1170
- }, rt = (t) => Ee(t) ? t : t.parentElement, Ee = (t) => t.nodeType === 1;
1171
- class Ce extends Error {
1175
+ }, ct = (t) => De(t) ? t : t.parentElement, De = (t) => t.nodeType === 1;
1176
+ class Pe extends Error {
1172
1177
  constructor(e) {
1173
1178
  super(`Provider not found: ${e.description}`);
1174
1179
  }
1175
1180
  }
1176
- class N {
1181
+ class $ {
1177
1182
  /**
1178
1183
  * Constructs a new `DOMContext` instance.
1179
1184
  *
@@ -1183,8 +1188,8 @@ class N {
1183
1188
  * @param providers - The `Providers` instance associated with this context.
1184
1189
  * @param isFirstLevel - A boolean value indicating whether this context is at the first level, meaning the outermost node in the generated DOM.
1185
1190
  */
1186
- constructor(e, s, r, n) {
1187
- this.document = e, this.element = s, this.reference = r, this.providers = n;
1191
+ constructor(e, s, n, r) {
1192
+ this.document = e, this.element = s, this.reference = n, this.providers = r;
1188
1193
  }
1189
1194
  /**
1190
1195
  * Creates a new `DOMContext` instance for the given `Element` and optional reference `Node`.
@@ -1194,8 +1199,8 @@ class N {
1194
1199
  * @param providers - The providers to associate with the `DOMContext`.
1195
1200
  * @returns A new `DOMContext` instance.
1196
1201
  */
1197
- static of(e, s, r) {
1198
- return new N(e.ownerDocument, e, s, r);
1202
+ static of(e, s, n) {
1203
+ return new $(e.ownerDocument, e, s, n);
1199
1204
  }
1200
1205
  /**
1201
1206
  * Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
@@ -1228,8 +1233,8 @@ class N {
1228
1233
  * @returns A new DOMContext focused on the newly created child element
1229
1234
  */
1230
1235
  makeChildElement = (e, s) => {
1231
- const r = this.createElement(e, s);
1232
- return this.appendOrInsert(r), this.withElement(r);
1236
+ const n = this.createElement(e, s);
1237
+ return this.appendOrInsert(n), this.withElement(n);
1233
1238
  };
1234
1239
  /**
1235
1240
  * Creates a new text node with the specified text content.
@@ -1280,7 +1285,7 @@ class N {
1280
1285
  * @param element - The DOM element to use in the new `DOMContext` instance.
1281
1286
  * @returns A new `DOMContext` instance with the provided `element`.
1282
1287
  */
1283
- withElement = (e) => new N(this.document, e, void 0, this.providers);
1288
+ withElement = (e) => new $(this.document, e, void 0, this.providers);
1284
1289
  /**
1285
1290
  * Creates a portal to render content in a different part of the DOM tree.
1286
1291
  *
@@ -1337,7 +1342,7 @@ class N {
1337
1342
  * @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
1338
1343
  * @returns A new `DOMContext` instance with the specified reference.
1339
1344
  */
1340
- withReference = (e) => new N(this.document, this.element, e, this.providers);
1345
+ withReference = (e) => new $(this.document, this.element, e, this.providers);
1341
1346
  /**
1342
1347
  * Sets a provider for the given provider mark.
1343
1348
  *
@@ -1345,9 +1350,9 @@ class N {
1345
1350
  * @param value - The provider to set for the given mark.
1346
1351
  * @returns A new `DOMContext` instance with the specified provider.
1347
1352
  */
1348
- setProvider = (e, s, r) => new N(this.document, this.element, this.reference, {
1353
+ setProvider = (e, s, n) => new $(this.document, this.element, this.reference, {
1349
1354
  ...this.providers,
1350
- [e]: [s, r]
1355
+ [e]: [s, n]
1351
1356
  });
1352
1357
  /**
1353
1358
  * Retrieves a provider for the given provider mark.
@@ -1358,9 +1363,9 @@ class N {
1358
1363
  */
1359
1364
  getProvider = (e) => {
1360
1365
  if (this.providers[e] === void 0)
1361
- throw new Ce(e);
1362
- const [s, r] = this.providers[e];
1363
- return { value: s, onUse: r };
1366
+ throw new Pe(e);
1367
+ const [s, n] = this.providers[e];
1368
+ return { value: s, onUse: n };
1364
1369
  };
1365
1370
  clear = (e) => {
1366
1371
  e && (this.reference !== void 0 ? U(this.reference) : U(this.element));
@@ -1391,10 +1396,10 @@ class N {
1391
1396
  * @param options - The options for the event listener.
1392
1397
  * @returns A function to remove the event listener.
1393
1398
  */
1394
- on = (e, s, r) => {
1395
- const n = (i) => s(i, this);
1396
- return this.element.addEventListener(e, n, r), (i) => {
1397
- i && this.element.removeEventListener(e, n, r);
1399
+ on = (e, s, n) => {
1400
+ const r = (i) => s(i, this);
1401
+ return this.element.addEventListener(e, r, n), (i) => {
1402
+ i && this.element.removeEventListener(e, r, n);
1398
1403
  };
1399
1404
  };
1400
1405
  /**
@@ -1433,28 +1438,28 @@ class N {
1433
1438
  */
1434
1439
  getStyle = (e) => this.element.style[e];
1435
1440
  makeAccessors = (e) => ({
1436
- get: st(e, this.element),
1437
- set: tt(e, this.element)
1441
+ get: lt(e, this.element),
1442
+ set: ot(e, this.element)
1438
1443
  });
1439
1444
  getWindow = () => this.document.defaultView;
1440
1445
  }
1441
- const nt = (t) => Symbol(t), ae = (t, e) => {
1442
- const s = new q(), r = L(s, () => t(e));
1443
- return (n = !0) => {
1444
- s.dispose(), r(n);
1446
+ const at = (t) => Symbol(t), he = (t, e) => {
1447
+ const s = new j(), n = L(s, () => t(e));
1448
+ return (r = !0) => {
1449
+ s.dispose(), n(r);
1445
1450
  };
1446
- }, ss = (t, e, { doc: s, clear: r, disposeWithParent: n = !0, providers: i = {} } = {}) => {
1451
+ }, us = (t, e, { doc: s, clear: n, disposeWithParent: r = !0, providers: i = {} } = {}) => {
1447
1452
  const o = typeof e == "string" ? (s ?? document).querySelector(e) : e;
1448
1453
  if (o === null)
1449
- throw new it(
1454
+ throw new ut(
1450
1455
  `Cannot find element by selector for render: ${e}`
1451
1456
  );
1452
- r !== !1 && (s ?? o.ownerDocument) != null && o.nodeType === 1 && (o.innerHTML = "");
1453
- const l = rt(o), c = Ee(o) ? void 0 : o, a = N.of(l, c, i), u = ae(t, a);
1457
+ n !== !1 && (s ?? o.ownerDocument) != null && o.nodeType === 1 && (o.innerHTML = "");
1458
+ const l = ct(o), c = De(o) ? void 0 : o, a = $.of(l, c, i), u = he(t, a);
1454
1459
  let h;
1455
- return n && (h = new MutationObserver((p) => {
1456
- p[0]?.removedNodes.forEach((f) => {
1457
- f === o && (h?.disconnect(), u(o.nodeType !== 1));
1460
+ return r && (h = new MutationObserver((p) => {
1461
+ p[0]?.removedNodes.forEach((d) => {
1462
+ d === o && (h?.disconnect(), u(o.nodeType !== 1));
1458
1463
  });
1459
1464
  }), h.observe(o.parentElement, {
1460
1465
  childList: !0,
@@ -1463,27 +1468,27 @@ const nt = (t) => Symbol(t), ae = (t, e) => {
1463
1468
  })), () => {
1464
1469
  h?.disconnect(), u(!0);
1465
1470
  };
1466
- }, rs = (t, {
1471
+ }, hs = (t, {
1467
1472
  startUrl: e = "https://example.com",
1468
1473
  selector: s,
1469
- providers: r = {}
1474
+ providers: n = {}
1470
1475
  } = {
1471
1476
  selector: "body"
1472
1477
  }) => {
1473
- const n = y.toSignal(e).deriveProp(), i = new Oe(s, void 0), o = new R(i, void 0, { currentURL: n }, r);
1478
+ const r = y.toSignal(e).deriveProp(), i = new ke(s, void 0), o = new R(i, void 0, { currentURL: r }, n);
1474
1479
  return {
1475
- clear: ae(t(), o),
1480
+ clear: he(t(), o),
1476
1481
  root: i,
1477
- currentURL: n
1482
+ currentURL: r
1478
1483
  };
1479
1484
  };
1480
- class it extends Error {
1485
+ class ut extends Error {
1481
1486
  constructor(e) {
1482
1487
  super(e);
1483
1488
  }
1484
1489
  }
1485
- const De = "data-tts-node", J = "data-tts-class", G = "data-tts-style", X = "data-tts-html", Y = "data-tts-text", Q = "data-tts-attrs";
1486
- class ns {
1490
+ const xe = "data-tts-node", G = "data-tts-class", J = "data-tts-style", X = "data-tts-html", Y = "data-tts-text", Q = "data-tts-attrs";
1491
+ class fs {
1487
1492
  /**
1488
1493
  * Selects elements from the headless environment.
1489
1494
  * @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
@@ -1560,8 +1565,8 @@ class ns {
1560
1565
  constructor({
1561
1566
  select: e,
1562
1567
  getAttribute: s,
1563
- setAttribute: r,
1564
- getClass: n,
1568
+ setAttribute: n,
1569
+ getClass: r,
1565
1570
  setClass: i,
1566
1571
  getStyles: o,
1567
1572
  setStyles: l,
@@ -1571,7 +1576,7 @@ class ns {
1571
1576
  getInnerText: h,
1572
1577
  setInnerText: p
1573
1578
  }) {
1574
- this.select = e, this.getAttribute = s, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = o, this.setStyles = l, this.appendHTML = c, this.getInnerHTML = a, this.setInnerHTML = u, this.getInnerText = h, this.setInnerText = p;
1579
+ this.select = e, this.getAttribute = s, this.setAttribute = n, this.getClass = r, this.setClass = i, this.getStyles = o, this.setStyles = l, this.appendHTML = c, this.getInnerHTML = a, this.setInnerHTML = u, this.getInnerText = h, this.setInnerText = p;
1575
1580
  }
1576
1581
  /**
1577
1582
  * Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
@@ -1582,47 +1587,47 @@ class ns {
1582
1587
  * when you render on the server and then hydrate on the client.
1583
1588
  */
1584
1589
  setFromRoot = (e, s) => {
1585
- e.getPortals().forEach((n) => {
1586
- const i = typeof n.selector == "string" ? this.select(n.selector) : [n.selector];
1590
+ e.getPortals().forEach((r) => {
1591
+ const i = typeof r.selector == "string" ? this.select(r.selector) : [r.selector];
1587
1592
  for (const o of i) {
1588
1593
  if (o == null)
1589
1594
  throw new Error(
1590
- `Cannot find element by selector for render: ${n.selector}`
1595
+ `Cannot find element by selector for render: ${r.selector}`
1591
1596
  );
1592
- if (n.hasChildren() && this.appendHTML(o, n.contentToHTML(s)), n.hasInnerHTML()) {
1597
+ if (r.hasChildren() && this.appendHTML(o, r.contentToHTML(s)), r.hasInnerHTML()) {
1593
1598
  if (s) {
1594
1599
  const l = this.getInnerHTML(o);
1595
1600
  l != null && this.setAttribute(o, X, l);
1596
1601
  }
1597
- this.setInnerHTML(o, n.getInnerHTML());
1602
+ this.setInnerHTML(o, r.getInnerHTML());
1598
1603
  }
1599
- if (n.hasInnerText()) {
1604
+ if (r.hasInnerText()) {
1600
1605
  if (s) {
1601
1606
  const l = this.getInnerText(o);
1602
1607
  l != null && this.setAttribute(o, Y, l);
1603
1608
  }
1604
- this.setInnerText(o, n.getInnerText());
1609
+ this.setInnerText(o, r.getInnerText());
1605
1610
  }
1606
- if (n.hasClasses()) {
1611
+ if (r.hasClasses()) {
1607
1612
  if (s) {
1608
1613
  const l = this.getClass(o);
1609
- l != null && this.setAttribute(o, J, l);
1614
+ l != null && this.setAttribute(o, G, l);
1610
1615
  }
1611
- this.setClass(o, n.getClasses().join(" "));
1616
+ this.setClass(o, r.getClasses().join(" "));
1612
1617
  }
1613
- if (n.hasStyles()) {
1618
+ if (r.hasStyles()) {
1614
1619
  if (s) {
1615
1620
  const l = this.getStyles(o);
1616
1621
  Object.keys(l).length > 0 && this.setAttribute(
1617
1622
  o,
1618
- G,
1623
+ J,
1619
1624
  JSON.stringify(l)
1620
1625
  );
1621
1626
  }
1622
- this.setStyles(o, n.getStyles());
1627
+ this.setStyles(o, r.getStyles());
1623
1628
  }
1624
- if (n.hasAttributes()) {
1625
- const l = n.getAttributes();
1629
+ if (r.hasAttributes()) {
1630
+ const l = r.getAttributes();
1626
1631
  if (s) {
1627
1632
  const c = [];
1628
1633
  l.forEach(([a]) => {
@@ -1642,56 +1647,56 @@ class ns {
1642
1647
  });
1643
1648
  };
1644
1649
  }
1645
- const ot = () => {
1646
- document.querySelectorAll(`[${De}]`).forEach(U);
1647
- }, lt = (t) => {
1648
- const e = t.getAttribute(J);
1649
- t.removeAttribute(J), e != null && t.setAttribute("class", e);
1650
- }, ct = () => {
1651
- document.querySelectorAll(`[${J}]`).forEach((e) => lt(e));
1652
- }, at = (t) => {
1650
+ const ht = () => {
1651
+ document.querySelectorAll(`[${xe}]`).forEach(U);
1652
+ }, ft = (t) => {
1653
+ const e = t.getAttribute(G);
1654
+ t.removeAttribute(G), e != null && t.setAttribute("class", e);
1655
+ }, dt = () => {
1656
+ document.querySelectorAll(`[${G}]`).forEach((e) => ft(e));
1657
+ }, pt = (t) => {
1653
1658
  const e = t.getAttribute(X);
1654
1659
  t.removeAttribute(X), e != null && (t.innerHTML = e);
1655
- }, ut = () => {
1656
- document.querySelectorAll(`[${X}]`).forEach((e) => at(e));
1657
- }, ht = (t) => {
1660
+ }, gt = () => {
1661
+ document.querySelectorAll(`[${X}]`).forEach((e) => pt(e));
1662
+ }, mt = (t) => {
1658
1663
  const e = t.getAttribute(Y);
1659
1664
  t.removeAttribute(Y), e != null && (t.innerText = e);
1660
- }, dt = () => {
1661
- document.querySelectorAll(`[${Y}]`).forEach((e) => ht(e));
1662
- }, Pe = (t) => JSON.parse(t.replace(/&quot;/g, '"')), ft = (t) => {
1663
- const e = t.getAttribute(G);
1664
- if (t.removeAttribute(G), e != null) {
1665
- const s = Pe(e);
1666
- Object.entries(s).forEach(([r, n]) => {
1667
- t.style.setProperty(r, n);
1665
+ }, yt = () => {
1666
+ document.querySelectorAll(`[${Y}]`).forEach((e) => mt(e));
1667
+ }, Le = (t) => JSON.parse(t.replace(/&quot;/g, '"')), St = (t) => {
1668
+ const e = t.getAttribute(J);
1669
+ if (t.removeAttribute(J), e != null) {
1670
+ const s = Le(e);
1671
+ Object.entries(s).forEach(([n, r]) => {
1672
+ t.style.setProperty(n, r);
1668
1673
  });
1669
1674
  }
1670
- }, pt = () => {
1671
- document.querySelectorAll(`[${G}]`).forEach((e) => ft(e));
1672
- }, gt = (t) => {
1675
+ }, wt = () => {
1676
+ document.querySelectorAll(`[${J}]`).forEach((e) => St(e));
1677
+ }, bt = (t) => {
1673
1678
  const e = t.getAttribute(Q);
1674
1679
  if (t.removeAttribute(Q), e != null) {
1675
- const s = Pe(e);
1676
- Object.entries(s).forEach(([r, n]) => {
1677
- n == null ? t.removeAttribute(r) : t.setAttribute(r, n);
1680
+ const s = Le(e);
1681
+ Object.entries(s).forEach(([n, r]) => {
1682
+ r == null ? t.removeAttribute(n) : t.setAttribute(n, r);
1678
1683
  });
1679
1684
  }
1680
- }, mt = () => {
1681
- document.querySelectorAll(`[${Q}]`).forEach((e) => gt(e));
1682
- }, is = () => {
1683
- ot(), ct(), dt(), ut(), pt(), mt();
1684
- }, I = Symbol("class"), H = Symbol("style"), B = Symbol("handler"), xe = () => Math.random().toString(36).substring(2, 15), yt = (t) => t.replace(/<[^>]*>?/g, "");
1685
- class Le {
1685
+ }, _t = () => {
1686
+ document.querySelectorAll(`[${Q}]`).forEach((e) => bt(e));
1687
+ }, ds = () => {
1688
+ ht(), dt(), yt(), gt(), wt(), _t();
1689
+ }, I = Symbol("class"), H = Symbol("style"), B = Symbol("handler"), Oe = () => Math.random().toString(36).substring(2, 15), vt = (t) => t.replace(/<[^>]*>?/g, "");
1690
+ class Me {
1686
1691
  constructor(e) {
1687
1692
  this.parent = e;
1688
1693
  }
1689
- id = xe();
1694
+ id = Oe();
1690
1695
  properties = {};
1691
1696
  children = [];
1692
1697
  isElement = () => !0;
1693
1698
  isText = () => !1;
1694
- getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? yt(this.properties.innerHTML) : this.children.map((e) => e.getText()).join("");
1699
+ getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? vt(this.properties.innerHTML) : this.children.map((e) => e.getText()).join("");
1695
1700
  removeChild = (e) => {
1696
1701
  const s = this.children.indexOf(e);
1697
1702
  s !== -1 && this.children.splice(s, 1);
@@ -1721,43 +1726,43 @@ class Le {
1721
1726
  if (this.properties.id === e)
1722
1727
  return this;
1723
1728
  for (const s of this.elements()) {
1724
- const r = s.getById(e);
1725
- if (r != null)
1726
- return r;
1729
+ const n = s.getById(e);
1730
+ if (n != null)
1731
+ return n;
1727
1732
  }
1728
1733
  };
1729
1734
  trigger = (e, s) => {
1730
- ((this.properties[B] ?? {})[e] ?? []).forEach((n) => n(s));
1735
+ ((this.properties[B] ?? {})[e] ?? []).forEach((r) => r(s));
1731
1736
  };
1732
1737
  click = () => {
1733
1738
  this.trigger("click", {});
1734
1739
  };
1735
- on = (e, s, r, n) => {
1736
- const i = this.properties[B] ??= {}, o = n?.once ? (c) => {
1737
- l(), s(c, r);
1738
- } : (c) => s(c, r);
1740
+ on = (e, s, n, r) => {
1741
+ const i = this.properties[B] ??= {}, o = r?.once ? (c) => {
1742
+ l(), s(c, n);
1743
+ } : (c) => s(c, n);
1739
1744
  i[e] = [...i[e] ?? [], o];
1740
1745
  const l = () => {
1741
1746
  const c = i[e] ?? [], a = c.indexOf(o);
1742
- a !== -1 && (c.splice(a, 1), c.length === 0 ? (delete i[e], Object.keys(i).length === 0 && delete this.properties[B]) : i[e] = c, n?.signal != null && n.signal.removeEventListener("abort", l));
1747
+ a !== -1 && (c.splice(a, 1), c.length === 0 ? (delete i[e], Object.keys(i).length === 0 && delete this.properties[B]) : i[e] = c, r?.signal != null && r.signal.removeEventListener("abort", l));
1743
1748
  };
1744
- return n?.signal != null && n.signal.addEventListener("abort", l), l;
1749
+ return r?.signal != null && r.signal.addEventListener("abort", l), l;
1745
1750
  };
1746
1751
  addClasses = (e) => {
1747
1752
  if (e.length === 0)
1748
1753
  return;
1749
1754
  const s = this.properties[I] ??= [];
1750
- e.forEach((r) => {
1751
- s.includes(r) || s.push(r);
1755
+ e.forEach((n) => {
1756
+ s.includes(n) || s.push(n);
1752
1757
  });
1753
1758
  };
1754
1759
  removeClasses = (e) => {
1755
1760
  if (e.length === 0)
1756
1761
  return;
1757
1762
  const s = this.properties[I] ??= [];
1758
- e.forEach((r) => {
1759
- const n = s.indexOf(r);
1760
- n !== -1 && s.splice(n, 1);
1763
+ e.forEach((n) => {
1764
+ const r = s.indexOf(n);
1765
+ r !== -1 && s.splice(r, 1);
1761
1766
  }), s.length === 0 && delete this.properties[I];
1762
1767
  };
1763
1768
  getClasses = () => this.properties[I] ?? [];
@@ -1768,8 +1773,8 @@ class Le {
1768
1773
  (e) => e === I ? [["class", this.getClasses()]] : e === H ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
1769
1774
  );
1770
1775
  setStyle = (e, s) => {
1771
- const r = this.properties[H] ??= {};
1772
- r[e] = s, s === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[H]);
1776
+ const n = this.properties[H] ??= {};
1777
+ n[e] = s, s === "" && (delete n[e], Object.keys(n).length === 0 && delete this.properties[H]);
1773
1778
  };
1774
1779
  getStyle = (e) => this.properties[H]?.[e] ?? "";
1775
1780
  getStyles = () => this.properties[H] ?? {};
@@ -1777,24 +1782,24 @@ class Le {
1777
1782
  const s = this.properties;
1778
1783
  return {
1779
1784
  get: () => s[e],
1780
- set: (r) => s[e] = r
1785
+ set: (n) => s[e] = n
1781
1786
  };
1782
1787
  };
1783
1788
  }
1784
- const bt = (t) => t.replace(/"/g, "&quot;"), St = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1785
- class wt extends Le {
1786
- constructor(e, s, r) {
1787
- super(r), this.tagName = e, this.namespace = s;
1789
+ const Tt = (t) => t.replace(/"/g, "&quot;"), At = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1790
+ class Et extends Me {
1791
+ constructor(e, s, n) {
1792
+ super(n), this.tagName = e, this.namespace = s;
1788
1793
  }
1789
1794
  isPortal = () => !1;
1790
1795
  toHTML = (e = !1) => {
1791
- const s = this.children.map((l) => l.toHTML()).join(""), r = this.namespace ? ` xmlns="${this.namespace}"` : "";
1792
- let n = null;
1793
- const i = this.getVisibleAttributes().map(([l, c]) => l === "class" ? ` class="${c.join(" ")}"` : l === "style" ? typeof c == "string" ? ` style="${c}"` : ` style="${Object.entries(c).map(([a, u]) => `${a}: ${u};`).join(" ")}"` : vt.has(l) ? ` ${l}` : l === "innerHTML" ? (n = c, "") : l === "innerText" ? (n = St(c), "") : ` ${l}="${bt(c)}"`).join(""), o = e ? ` ${De}` : "";
1794
- return Tt.has(this.tagName) && s === "" ? `<${this.tagName}${r}${i}${o} />` : `<${this.tagName}${r}${i}${o}>${n ?? s}</${this.tagName}>`;
1796
+ const s = this.children.map((l) => l.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
1797
+ let r = null;
1798
+ const i = this.getVisibleAttributes().map(([l, c]) => l === "class" ? ` class="${c.join(" ")}"` : l === "style" ? typeof c == "string" ? ` style="${c}"` : ` style="${Object.entries(c).map(([a, u]) => `${a}: ${u};`).join(" ")}"` : Dt.has(l) ? ` ${l}` : l === "innerHTML" ? (r = c, "") : l === "innerText" ? (r = At(c), "") : ` ${l}="${Tt(c)}"`).join(""), o = e ? ` ${xe}` : "";
1799
+ return Pt.has(this.tagName) && s === "" ? `<${this.tagName}${n}${i}${o} />` : `<${this.tagName}${n}${i}${o}>${r ?? s}</${this.tagName}>`;
1795
1800
  };
1796
1801
  }
1797
- class Oe extends Le {
1802
+ class ke extends Me {
1798
1803
  constructor(e, s) {
1799
1804
  super(s), this.selector = e;
1800
1805
  }
@@ -1802,19 +1807,19 @@ class Oe extends Le {
1802
1807
  toHTML = () => "";
1803
1808
  contentToHTML = (e = !1) => this.children.map((s) => s.toHTML(e)).join("");
1804
1809
  }
1805
- class _t {
1810
+ class Ct {
1806
1811
  constructor(e) {
1807
1812
  this.text = e;
1808
1813
  }
1809
- id = xe();
1814
+ id = Oe();
1810
1815
  isElement = () => !1;
1811
1816
  isText = () => !0;
1812
1817
  getText = () => this.text;
1813
1818
  toHTML = () => this.text;
1814
1819
  }
1815
1820
  class R {
1816
- constructor(e, s, r, n) {
1817
- this.element = e, this.reference = s, this.container = r, this.providers = n;
1821
+ constructor(e, s, n, r) {
1822
+ this.element = e, this.reference = s, this.container = n, this.providers = r;
1818
1823
  }
1819
1824
  appendOrInsert = (e) => {
1820
1825
  if (this.reference != null) {
@@ -1824,16 +1829,16 @@ class R {
1824
1829
  this.element.children.push(e);
1825
1830
  };
1826
1831
  makeChildElement = (e, s) => {
1827
- const r = new wt(e, s, this.element);
1828
- return this.appendOrInsert(r), new R(
1829
- r,
1832
+ const n = new Et(e, s, this.element);
1833
+ return this.appendOrInsert(n), new R(
1834
+ n,
1830
1835
  void 0,
1831
1836
  this.container,
1832
1837
  this.providers
1833
1838
  );
1834
1839
  };
1835
1840
  makeChildText = (e) => {
1836
- const s = new _t(e);
1841
+ const s = new Ct(e);
1837
1842
  return this.appendOrInsert(s), new R(
1838
1843
  this.element,
1839
1844
  s,
@@ -1847,7 +1852,7 @@ class R {
1847
1852
  getText = () => this.reference?.getText() ?? this.element.getText();
1848
1853
  makeRef = () => this.makeChildText("");
1849
1854
  makePortal = (e) => {
1850
- const s = new Oe(e, this.element);
1855
+ const s = new ke(e, this.element);
1851
1856
  return this.appendOrInsert(s), new R(
1852
1857
  s,
1853
1858
  void 0,
@@ -1862,15 +1867,15 @@ class R {
1862
1867
  * @param value - The provider to set for the given mark.
1863
1868
  * @returns A new `DOMContext` instance with the specified provider.
1864
1869
  */
1865
- setProvider = (e, s, r) => new R(this.element, this.reference, this.container, {
1870
+ setProvider = (e, s, n) => new R(this.element, this.reference, this.container, {
1866
1871
  ...this.providers,
1867
- [e]: [s, r]
1872
+ [e]: [s, n]
1868
1873
  });
1869
1874
  getProvider = (e) => {
1870
1875
  if (this.providers[e] === void 0)
1871
- throw new Ce(e);
1872
- const [s, r] = this.providers[e];
1873
- return { value: s, onUse: r };
1876
+ throw new Pe(e);
1877
+ const [s, n] = this.providers[e];
1878
+ return { value: s, onUse: n };
1874
1879
  };
1875
1880
  clear = (e) => {
1876
1881
  e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
@@ -1887,48 +1892,48 @@ class R {
1887
1892
  getStyle = (e) => this.element.getStyle(e);
1888
1893
  makeAccessors = (e) => this.element.makeAccessors(e);
1889
1894
  }
1890
- const vt = /* @__PURE__ */ new Set([
1895
+ const Dt = /* @__PURE__ */ new Set([
1891
1896
  "checked",
1892
1897
  "disabled",
1893
1898
  "multiple",
1894
1899
  "readonly",
1895
1900
  "required",
1896
1901
  "selected"
1897
- ]), Tt = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), ke = (t) => (e) => e.makeChildText(t).clear, Me = (t) => (e) => {
1898
- const s = e.makeChildText(t.value), r = t.on(s.setText);
1899
- return (n) => {
1900
- r(), s.clear(n);
1901
- };
1902
- }, os = (t) => g.is(t) ? Me(t) : ke(t), E = (...t) => (e) => {
1903
- const s = t.map((r) => d(r)(e));
1902
+ ]), Pt = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Ie = (t) => (e) => e.makeChildText(t).clear, He = (t) => (e) => {
1903
+ const s = e.makeChildText(t.value), n = t.on(s.setText);
1904
1904
  return (r) => {
1905
- s.forEach((n) => n(r));
1905
+ n(), s.clear(r);
1906
+ };
1907
+ }, ps = (t) => g.is(t) ? He(t) : Ie(t), E = (...t) => (e) => {
1908
+ const s = t.map((n) => f(n)(e));
1909
+ return (n) => {
1910
+ s.forEach((r) => r(n));
1906
1911
  };
1907
1912
  }, C = () => () => {
1908
- }, At = (t) => (e) => (e.addClasses(t), (s) => {
1913
+ }, xt = (t) => (e) => (e.addClasses(t), (s) => {
1909
1914
  s && e.removeClasses(t);
1910
- }), Et = (t) => (e) => {
1915
+ }), Lt = (t) => (e) => {
1911
1916
  let s = [];
1912
- const r = t.on((n) => {
1913
- e.removeClasses(s), s = (n ?? "").split(" ").filter((i) => i.length > 0), e.addClasses(s);
1917
+ const n = t.on((r) => {
1918
+ e.removeClasses(s), s = (r ?? "").split(" ").filter((i) => i.length > 0), e.addClasses(s);
1914
1919
  });
1915
- return (n) => {
1916
- r(), n && e.removeClasses(s), s.length = 0;
1920
+ return (r) => {
1921
+ n(), r && e.removeClasses(s), s.length = 0;
1917
1922
  };
1918
- }, Ct = (t, e) => (s) => {
1919
- const { get: r, set: n } = s.makeAccessors(t), i = r();
1920
- return n(e), (o) => {
1921
- o && n(i);
1923
+ }, Ot = (t, e) => (s) => {
1924
+ const { get: n, set: r } = s.makeAccessors(t), i = n();
1925
+ return r(e), (o) => {
1926
+ o && r(i);
1922
1927
  };
1923
- }, Dt = (t, e) => (s) => {
1924
- const { get: r, set: n } = s.makeAccessors(t), i = r(), o = e.on(n);
1928
+ }, Mt = (t, e) => (s) => {
1929
+ const { get: n, set: r } = s.makeAccessors(t), i = n(), o = e.on(r);
1925
1930
  return (l) => {
1926
- o(), l && n(i);
1931
+ o(), l && r(i);
1927
1932
  };
1928
- }, V = (t, e) => g.is(e) ? Dt(t, e) : Ct(t, e), te = (t = "") => (e, s) => {
1929
- const r = t ? `${t}${e}` : e;
1930
- return V(r, s);
1931
- }, j = new Proxy(
1933
+ }, q = (t, e) => g.is(e) ? Mt(t, e) : Ot(t, e), kt = (t, e) => t === "class" ? g.is(e) ? Lt(e) : xt(
1934
+ /* c8 ignore next */
1935
+ (e ?? "").split(" ").filter((s) => s.length > 0)
1936
+ ) : q(t, e), V = new Proxy(
1932
1937
  {},
1933
1938
  {
1934
1939
  /**
@@ -1942,12 +1947,9 @@ const vt = /* @__PURE__ */ new Set([
1942
1947
  * @returns The renderable component for the specified attribute.
1943
1948
  *
1944
1949
  */
1945
- get: (t, e) => e === "class" ? (s) => g.is(s) ? Et(s) : At(
1946
- /* c8 ignore next */
1947
- (s ?? "").split(" ").filter((r) => r.length > 0)
1948
- ) : e === "set" ? te() : (s) => V(e, s)
1950
+ get: (t, e) => (s) => kt(e, s)
1949
1951
  }
1950
- ), ls = new Proxy(
1952
+ ), It = (t, e) => q(`data-${t}`, e), gs = new Proxy(
1951
1953
  {},
1952
1954
  {
1953
1955
  /**
@@ -1958,9 +1960,9 @@ const vt = /* @__PURE__ */ new Set([
1958
1960
  * @returns The renderable component for the specified attribute.
1959
1961
  *
1960
1962
  */
1961
- get: (t, e) => e === "set" ? te("data-") : (s) => V(`data-${e}`, s)
1963
+ get: (t, e) => (s) => It(e, s)
1962
1964
  }
1963
- ), cs = new Proxy(
1965
+ ), Ht = (t, e) => q(`aria-${t}`, e), ms = new Proxy(
1964
1966
  {},
1965
1967
  {
1966
1968
  /**
@@ -1971,9 +1973,9 @@ const vt = /* @__PURE__ */ new Set([
1971
1973
  * @returns The renderable component for the specified attribute.
1972
1974
  *
1973
1975
  */
1974
- get: (t, e) => e === "set" ? te("aria-") : (s) => V(`aria-${e}`, s)
1976
+ get: (t, e) => (s) => Ht(e, s)
1975
1977
  }
1976
- ), as = new Proxy(
1978
+ ), Nt = (t, e) => q(t, e), ys = new Proxy(
1977
1979
  {},
1978
1980
  {
1979
1981
  /**
@@ -1984,9 +1986,9 @@ const vt = /* @__PURE__ */ new Set([
1984
1986
  * @returns The renderable component for the specified attribute.
1985
1987
  *
1986
1988
  */
1987
- get: (t, e) => e === "set" ? te() : (s) => V(e, s)
1989
+ get: (t, e) => (s) => Nt(e, s)
1988
1990
  }
1989
- ), us = new Proxy(
1991
+ ), $t = (t, e) => q(t, e), Ss = new Proxy(
1990
1992
  {},
1991
1993
  {
1992
1994
  /**
@@ -1996,31 +1998,31 @@ const vt = /* @__PURE__ */ new Set([
1996
1998
  * @returns The renderable component for the specified attribute.
1997
1999
  *
1998
2000
  */
1999
- get: (t, e) => (s) => V(e, s)
2001
+ get: (t, e) => (s) => $t(e, s)
2000
2002
  }
2001
- ), d = (t) => {
2003
+ ), f = (t) => {
2002
2004
  if (t == null)
2003
2005
  return C;
2004
2006
  if (Array.isArray(t))
2005
- return E(...t.map(d));
2007
+ return E(...t.map(f));
2006
2008
  if (typeof t == "string")
2007
- return ke(t);
2009
+ return Ie(t);
2008
2010
  if (g.is(t))
2009
- return Me(t);
2011
+ return He(t);
2010
2012
  if (typeof t == "function")
2011
2013
  return t;
2012
2014
  throw new Error(`Unknown type: '${typeof t}' for child: ${t}`);
2013
- }, Ie = (t, ...e) => (s) => {
2014
- const r = s.makeChildElement(t, void 0), n = e.map((i) => d(i)(r));
2015
+ }, Ne = (t, ...e) => (s) => {
2016
+ const n = s.makeChildElement(t, void 0), r = e.map((i) => f(i)(n));
2015
2017
  return (i) => {
2016
- n.forEach((o) => o(!1)), r.clear(i);
2018
+ r.forEach((o) => o(!1)), n.clear(i);
2017
2019
  };
2018
- }, He = (t, e, ...s) => (r) => {
2019
- const n = r.makeChildElement(t, e), i = s.map((o) => d(o)(n));
2020
+ }, te = (t, e, ...s) => (n) => {
2021
+ const r = n.makeChildElement(t, e), i = s.map((o) => f(o)(r));
2020
2022
  return (o) => {
2021
- i.forEach((l) => l(!1)), n.clear(o);
2023
+ i.forEach((l) => l(!1)), r.clear(o);
2022
2024
  };
2023
- }, hs = new Proxy(
2025
+ }, ws = new Proxy(
2024
2026
  {},
2025
2027
  {
2026
2028
  /**
@@ -2028,9 +2030,9 @@ const vt = /* @__PURE__ */ new Set([
2028
2030
  * @param tagName - The HTML tag name.
2029
2031
  * @returns A renderable function that creates and appends the HTML element to the DOM.
2030
2032
  */
2031
- get: (t, e) => (...s) => Ie(e, s.flatMap(d))
2033
+ get: (t, e) => (...s) => Ne(e, s.flatMap(f))
2032
2034
  }
2033
- ), ds = new Proxy(
2035
+ ), bs = new Proxy(
2034
2036
  {},
2035
2037
  {
2036
2038
  /**
@@ -2038,9 +2040,9 @@ const vt = /* @__PURE__ */ new Set([
2038
2040
  * @param type - The input type name.
2039
2041
  * @returns A renderable function that creates and appends the HTMLInput element to the DOM.
2040
2042
  */
2041
- get: (t, e) => (...s) => Ie("input", j.type(e), ...s)
2043
+ get: (t, e) => (...s) => Ne("input", V.type(e), ...s)
2042
2044
  }
2043
- ), Pt = "http://www.w3.org/2000/svg", fs = new Proxy(
2045
+ ), $e = "http://www.w3.org/2000/svg", _s = (t, ...e) => te(t, $e, ...e), vs = new Proxy(
2044
2046
  {},
2045
2047
  {
2046
2048
  /**
@@ -2048,9 +2050,9 @@ const vt = /* @__PURE__ */ new Set([
2048
2050
  * @param tagName - The SVG tag name.
2049
2051
  * @returns A renderable function that creates and appends the SVG element to the DOM.
2050
2052
  */
2051
- get: (t, e) => (...s) => He(e, Pt, s.flatMap(d))
2053
+ get: (t, e) => (...s) => te(e, $e, s.flatMap(f))
2052
2054
  }
2053
- ), xt = "http://www.w3.org/1998/Math/MathML", ps = new Proxy(
2055
+ ), Re = "http://www.w3.org/1998/Math/MathML", Ts = (t, ...e) => te(t, Re, ...e), As = new Proxy(
2054
2056
  {},
2055
2057
  {
2056
2058
  /**
@@ -2058,33 +2060,33 @@ const vt = /* @__PURE__ */ new Set([
2058
2060
  * @param tagName - The Math tag name.
2059
2061
  * @returns A renderable function that creates and appends the Math element to the DOM.
2060
2062
  */
2061
- get: (t, e) => (...s) => He(e, xt, s.flatMap(d))
2063
+ get: (t, e) => (...s) => te(e, Re, s.flatMap(f))
2062
2064
  }
2063
- ), $e = (t, e) => {
2065
+ ), Ve = (t, e) => {
2064
2066
  if (typeof e == "function")
2065
- return $e(t, { then: e });
2066
- const s = e.pending != null ? d(e.pending()) : C, r = e.then, n = e.error != null ? (i) => d(e.error(i)) : () => C;
2067
+ return Ve(t, { then: e });
2068
+ const s = e.pending != null ? f(e.pending()) : C, n = e.then, r = e.error != null ? (i) => f(e.error(i)) : () => C;
2067
2069
  return (i) => {
2068
2070
  let o = !0;
2069
2071
  const l = t(), c = i.makeRef();
2070
- let a = d(s)(c);
2072
+ let a = f(s)(c);
2071
2073
  return l.then(
2072
2074
  (u) => {
2073
- o && (a(!0), a = d(r(u))(c));
2075
+ o && (a(!0), a = f(n(u))(c));
2074
2076
  },
2075
2077
  (u) => {
2076
- o && (a(!0), a = d(n(u))(c));
2078
+ o && (a(!0), a = f(r(u))(c));
2077
2079
  }
2078
2080
  ), (u) => {
2079
2081
  o = !1, a(u), c.clear(u);
2080
2082
  };
2081
2083
  };
2082
- }, gs = (t, e) => $e(() => t, e), Ne = (t, e, s) => (r) => r.on(t, e, s), Lt = (t) => Ne("click", (e, s) => {
2084
+ }, Es = (t, e) => Ve(() => t, e), je = (t, e, s) => (n) => n.on(t, e, s), Rt = (t) => je("click", (e, s) => {
2083
2085
  e.preventDefault();
2084
- const r = e.target;
2086
+ const n = e.target;
2085
2087
  setTimeout(() => {
2086
- const n = r.ownerDocument != null ? r?.checked : void 0;
2087
- n != null && t(!n, s);
2088
+ const r = n.ownerDocument != null ? n?.checked : void 0;
2089
+ r != null && t(!r, s);
2088
2090
  }, 0);
2089
2091
  }), se = new Proxy(
2090
2092
  {},
@@ -2094,91 +2096,91 @@ const vt = /* @__PURE__ */ new Set([
2094
2096
  * @param fn - The function to call when the event is triggered.
2095
2097
  * @returns A `Renderable` function that adds the event listener to the element.
2096
2098
  */
2097
- get: (t, e) => (s) => Ne(e, s)
2099
+ get: (t, e) => (s) => je(e, s)
2098
2100
  }
2099
- ), Ot = (t, e) => (s) => {
2101
+ ), Vt = (t, e) => (s) => {
2100
2102
  e?.preventDefault === !0 && s.preventDefault(), e?.stopPropagation === !0 && s.stopPropagation(), e?.stopImmediatePropagation === !0 && s.stopImmediatePropagation(), t(s);
2101
- }, O = (t, e) => Ot((s) => {
2102
- const r = s.target;
2103
- t(r, s);
2104
- }, e), kt = (t, e) => O(
2105
- (s, r) => t(s.value, r),
2103
+ }, O = (t, e) => Vt((s) => {
2104
+ const n = s.target;
2105
+ t(n, s);
2106
+ }, e), jt = (t, e) => O(
2107
+ (s, n) => t(s.value, n),
2106
2108
  e
2107
- ), Mt = (t, e) => O(
2108
- (s, r) => t(s.valueAsNumber, r),
2109
+ ), qt = (t, e) => O(
2110
+ (s, n) => t(s.valueAsNumber, n),
2109
2111
  e
2110
- ), It = (t, e) => O((s, r) => {
2112
+ ), Ft = (t, e) => O((s, n) => {
2111
2113
  if (s.value === "")
2112
2114
  return;
2113
- const n = s.value.split("-"), i = new Date(
2114
- Number(n[0]),
2115
- Number(n[1]) - 1,
2116
- Number(n[2].substring(0, 2))
2115
+ const r = s.value.split("-"), i = new Date(
2116
+ Number(r[0]),
2117
+ Number(r[1]) - 1,
2118
+ Number(r[2].substring(0, 2))
2117
2119
  );
2118
- t(i, r);
2119
- }, e), ms = (t, e) => O((s, r) => {
2120
+ t(i, n);
2121
+ }, e), Cs = (t, e) => O((s, n) => {
2120
2122
  if (s.value === "") {
2121
- t(null, r);
2123
+ t(null, n);
2122
2124
  return;
2123
2125
  }
2124
- const n = s.value.split("-"), i = new Date(
2125
- Number(n[0]),
2126
- Number(n[1]) - 1,
2127
- Number(n[2].substring(0, 2))
2126
+ const r = s.value.split("-"), i = new Date(
2127
+ Number(r[0]),
2128
+ Number(r[1]) - 1,
2129
+ Number(r[2].substring(0, 2))
2128
2130
  );
2129
- t(i, r);
2130
- }, e), Ht = (t, e) => O((s, r) => {
2131
+ t(i, n);
2132
+ }, e), Bt = (t, e) => O((s, n) => {
2131
2133
  if (s.value === "")
2132
2134
  return;
2133
- const n = s.value.split("T"), i = n[0].split("-"), o = new Date(
2135
+ const r = s.value.split("T"), i = r[0].split("-"), o = new Date(
2134
2136
  Number(i[0]),
2135
2137
  Number(i[1]) - 1,
2136
2138
  Number(i[2])
2137
- ), l = n[1].split(":");
2138
- o.setHours(Number(l[0])), o.setMinutes(Number(l[1])), o.setSeconds(Number(l[2])), t(o, r);
2139
- }, e), ys = (t, e) => O((s, r) => {
2139
+ ), l = r[1].split(":");
2140
+ o.setHours(Number(l[0])), o.setMinutes(Number(l[1])), o.setSeconds(Number(l[2])), t(o, n);
2141
+ }, e), Ds = (t, e) => O((s, n) => {
2140
2142
  if (s.value === "") {
2141
- t(null, r);
2143
+ t(null, n);
2142
2144
  return;
2143
2145
  }
2144
- const n = s.value.split("T");
2145
- if (n.length !== 2) {
2146
- t(null, r);
2146
+ const r = s.value.split("T");
2147
+ if (r.length !== 2) {
2148
+ t(null, n);
2147
2149
  return;
2148
2150
  }
2149
- const i = n[0].split("-"), o = new Date(
2151
+ const i = r[0].split("-"), o = new Date(
2150
2152
  Number(i[0]),
2151
2153
  Number(i[1]) - 1,
2152
2154
  Number(i[2])
2153
- ), l = n[1].split(":");
2154
- o.setHours(Number(l[0] ?? 0)), o.setMinutes(Number(l[1] ?? 0)), o.setSeconds(Number(l[2] ?? 0)), t(o, r);
2155
- }, e), bs = (t, e) => O((s, r) => {
2156
- t(s.checked, r);
2157
- }, e), Ss = (t, e = "input") => E(j.valueAsDate(t), se[e](It(t.set))), ws = (t, e = "input") => E(j.valueAsDate(t), se[e](Ht(t.set))), _s = (t, e = "input") => E(j.valueAsNumber(t), se[e](Mt(t.set))), vs = (t, e = "input") => E(j.value(t), se[e](kt(t.set))), Ts = (t) => E(j.checked(t), Lt(t.set)), ue = (t, e, s) => g.is(t) ? e(t) : s(t), $t = (t, e, s) => {
2158
- const r = t.makeRef();
2159
- let n = () => {
2155
+ ), l = r[1].split(":");
2156
+ o.setHours(Number(l[0] ?? 0)), o.setMinutes(Number(l[1] ?? 0)), o.setSeconds(Number(l[2] ?? 0)), t(o, n);
2157
+ }, e), Ps = (t, e) => O((s, n) => {
2158
+ t(s.checked, n);
2159
+ }, e), xs = (t, e = "input") => E(V.valueAsDate(t), se[e](Ft(t.set))), Ls = (t, e = "input") => E(V.valueAsDate(t), se[e](Bt(t.set))), Os = (t, e = "input") => E(V.valueAsNumber(t), se[e](qt(t.set))), Ms = (t, e = "input") => E(V.value(t), se[e](jt(t.set))), ks = (t) => E(V.checked(t), Rt(t.set)), fe = (t, e, s) => g.is(t) ? e(t) : s(t), Wt = (t, e, s) => {
2160
+ const n = t.makeRef();
2161
+ let r = () => {
2160
2162
  }, i = null;
2161
2163
  const o = e.on((l) => {
2162
- i?.dispose(), n(!0), i = new q(), n = L(
2164
+ i?.dispose(), r(!0), i = new j(), r = L(
2163
2165
  i,
2164
- () => d(s(l))(r)
2166
+ () => f(s(l))(n)
2165
2167
  );
2166
2168
  });
2167
2169
  return (l) => {
2168
- i?.dispose(), n(l), o(), r.clear(l);
2170
+ i?.dispose(), r(l), o(), n.clear(l);
2169
2171
  };
2170
- }, re = (t, e) => {
2171
- function s(n) {
2172
+ }, ne = (t, e) => {
2173
+ function s(r) {
2172
2174
  return (i) => {
2173
2175
  const o = i.makeRef();
2174
2176
  let l, c;
2175
- const a = n.map((p) => Object.keys(p)[0]);
2177
+ const a = r.map((p) => Object.keys(p)[0]);
2176
2178
  let u;
2177
2179
  const h = a.on((p) => {
2178
2180
  if (p !== u) {
2179
- u = p, c?.dispose(), l?.(!0), c = n.map((m) => m[p]);
2180
- const f = e[p](c);
2181
- l = d(f)(o);
2181
+ u = p, c?.dispose(), l?.(!0), c = r.map((m) => m[p]);
2182
+ const d = e[p](c);
2183
+ l = f(d)(o);
2182
2184
  }
2183
2185
  });
2184
2186
  return (p) => {
@@ -2186,41 +2188,41 @@ const vt = /* @__PURE__ */ new Set([
2186
2188
  };
2187
2189
  };
2188
2190
  }
2189
- function r(n) {
2190
- const i = Object.keys(n)[0];
2191
- return d(e[i](K(n[i])));
2191
+ function n(r) {
2192
+ const i = Object.keys(r)[0];
2193
+ return f(e[i](K(r[i])));
2192
2194
  }
2193
- return ue(t, s, r);
2194
- }, Re = (t, e, s) => re(
2195
- y.map(t, (r) => ({ [r[e]]: r })),
2195
+ return fe(t, s, n);
2196
+ }, qe = (t, e, s) => ne(
2197
+ y.map(t, (n) => ({ [n[e]]: n })),
2196
2198
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2197
2199
  s
2198
- ), As = (t, e) => Re(t, "kind", e), Es = (t, e) => {
2199
- const s = y.map(t, ([r, n]) => ({ [r]: n }));
2200
- return re(s, e);
2201
- }, Cs = (t, e) => Re(t, "type", e), Nt = (t, e) => re(
2200
+ ), Is = (t, e) => qe(t, "kind", e), Hs = (t, e) => {
2201
+ const s = y.map(t, ([n, r]) => ({ [n]: r }));
2202
+ return ne(s, e);
2203
+ }, Ns = (t, e) => qe(t, "type", e), Ut = (t, e) => ne(
2202
2204
  y.map(t, (s) => ({ [s]: !0 })),
2203
2205
  e
2204
- ), Ds = (t, e = {}) => (s) => {
2205
- const r = e?.firstSeparator ?? t, n = e?.lastSeparator ?? t;
2206
- return Nt(
2206
+ ), $s = (t, e = {}) => (s) => {
2207
+ const n = e?.firstSeparator ?? t, r = e?.lastSeparator ?? t;
2208
+ return Ut(
2207
2209
  s.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
2208
2210
  {
2209
- first: r,
2210
- last: n,
2211
+ first: n,
2212
+ last: r,
2211
2213
  other: t
2212
2214
  }
2213
2215
  );
2214
- }, Ps = (t) => (e) => (e.appendOrInsert(t), (s) => {
2216
+ }, Rs = (t) => (e) => (e.appendOrInsert(t), (s) => {
2215
2217
  s && U(t);
2216
- }), xs = (t, e, s) => {
2217
- function r(i) {
2218
+ }), Vs = (t, e, s) => {
2219
+ function n(i) {
2218
2220
  return (o) => {
2219
2221
  const l = o.makeRef();
2220
2222
  let c = () => {
2221
2223
  }, a = !1, u = null;
2222
2224
  const h = i.on((p) => {
2223
- p == null ? (c(!0), c = d(s?.())(l), a = !1, u?.dispose(), u = null) : a ? u.set(p) : (u = T(p), c(!0), c = d(e(u))(
2225
+ p == null ? (c(!0), c = f(s?.())(l), a = !1, u?.dispose(), u = null) : a ? u.set(p) : (u = T(p), c(!0), c = f(e(u))(
2224
2226
  l
2225
2227
  ), a = !0);
2226
2228
  });
@@ -2229,196 +2231,196 @@ const vt = /* @__PURE__ */ new Set([
2229
2231
  };
2230
2232
  };
2231
2233
  }
2232
- function n(i) {
2234
+ function r(i) {
2233
2235
  if (i == null) {
2234
2236
  const o = s?.();
2235
- return o != null ? d(o) : C;
2237
+ return o != null ? f(o) : C;
2236
2238
  }
2237
- return d(e(K(i)));
2239
+ return f(e(K(i)));
2238
2240
  }
2239
- return ue(
2241
+ return fe(
2240
2242
  t,
2241
- r,
2242
- n
2243
+ n,
2244
+ r
2243
2245
  );
2244
- }, Ls = (...t) => (e, s) => (r) => {
2245
- const n = r.makeRef();
2246
+ }, js = (...t) => (e, s) => (n) => {
2247
+ const r = n.makeRef();
2246
2248
  if (t.some(
2247
- (f) => !g.is(f) && f == null
2249
+ (d) => !g.is(d) && d == null
2248
2250
  ))
2249
- return (s != null ? d(s?.()) : C)(
2250
- n
2251
+ return (s != null ? f(s?.()) : C)(
2252
+ r
2251
2253
  );
2252
2254
  const o = t.map(() => null), l = t.map(
2253
- (f) => g.is(f) ? f.value != null : f != null
2255
+ (d) => g.is(d) ? d.value != null : d != null
2254
2256
  );
2255
2257
  let c = null;
2256
- const a = T(l.every((f) => f)), u = (f, m) => {
2257
- if (f.value != null) {
2258
+ const a = T(l.every((d) => d)), u = (d, m) => {
2259
+ if (d.value != null) {
2258
2260
  if (o[m] == null) {
2259
- const S = T(f.value);
2260
- o[m] = S;
2261
+ const w = T(d.value);
2262
+ o[m] = w;
2261
2263
  } else
2262
- o[m].value = f.value;
2264
+ o[m].value = d.value;
2263
2265
  l[m] = !0;
2264
2266
  } else
2265
2267
  l[m] = !1;
2266
2268
  };
2267
2269
  let h = t.length - 1;
2268
- const p = t.map((f, m) => {
2269
- if (!g.is(f)) {
2270
- const S = T(f);
2271
- return o[m] = S, () => {
2270
+ const p = t.map((d, m) => {
2271
+ if (!g.is(d)) {
2272
+ const w = T(d);
2273
+ return o[m] = w, () => {
2272
2274
  };
2273
2275
  }
2274
- return f.on(() => {
2275
- u(f, m), h === 0 ? a.value = l.every((S) => S) : h--;
2276
+ return d.on(() => {
2277
+ u(d, m), h === 0 ? a.value = l.every((w) => w) : h--;
2276
2278
  });
2277
2279
  });
2278
- return a.on((f) => {
2279
- c?.(!0), c = null, f ? c = d(e(...o))(n) : c = d(s?.() ?? C)(n);
2280
- }), (f) => {
2281
- o.forEach((m) => m?.dispose()), a.dispose(), p.forEach((m) => m()), c?.(f), n.clear(f);
2280
+ return a.on((d) => {
2281
+ c?.(!0), c = null, d ? c = f(e(...o))(r) : c = f(s?.() ?? C)(r);
2282
+ }), (d) => {
2283
+ o.forEach((m) => m?.dispose()), a.dispose(), p.forEach((m) => m()), c?.(d), r.clear(d);
2282
2284
  };
2283
- }, Ve = (t, e, s) => ue(
2285
+ }, Fe = (t, e, s) => fe(
2284
2286
  t,
2285
- (r) => (n) => $t(
2286
- n,
2287
+ (n) => (r) => Wt(
2287
2288
  r,
2289
+ n,
2288
2290
  (i) => i ? e() : s?.()
2289
2291
  ),
2290
- (r) => {
2291
- if (r) {
2292
- const n = e();
2293
- return n != null ? d(n) : C;
2292
+ (n) => {
2293
+ if (n) {
2294
+ const r = e();
2295
+ return r != null ? f(r) : C;
2294
2296
  }
2295
- return d(s?.());
2297
+ return f(s?.());
2296
2298
  }
2297
- ), Os = (t, e, s) => Ve(
2298
- y.map(t, (r) => !r),
2299
+ ), qs = (t, e, s) => Fe(
2300
+ y.map(t, (n) => !n),
2299
2301
  e,
2300
2302
  s
2301
- ), je = (t, e, s) => {
2303
+ ), Be = (t, e, s) => {
2302
2304
  if (s != null)
2303
- return je(t, (r) => {
2304
- const n = new le(
2305
- r.index,
2306
- r.total.map((i) => i - 1)
2305
+ return Be(t, (n) => {
2306
+ const r = new le(
2307
+ n.index,
2308
+ n.total.map((i) => i - 1)
2307
2309
  );
2308
2310
  return E(
2309
- d(e(r)),
2310
- Ve(
2311
- r.isLast,
2311
+ f(e(n)),
2312
+ Fe(
2313
+ n.isLast,
2312
2314
  () => C,
2313
- () => s(n)
2315
+ () => s(r)
2314
2316
  )
2315
2317
  );
2316
2318
  });
2317
2319
  if (g.is(t))
2318
- return (r) => {
2319
- const n = t.derive(), i = r.makeRef(), o = [], l = [];
2320
- return n.on((c) => {
2320
+ return (n) => {
2321
+ const r = t.derive(), i = n.makeRef(), o = [], l = [];
2322
+ return r.on((c) => {
2321
2323
  const a = o.splice(c), u = l.splice(c);
2322
2324
  for (const h of u)
2323
2325
  h.dispose();
2324
2326
  for (const h of a)
2325
2327
  h(!0);
2326
2328
  for (let h = o.length; h < c; h++) {
2327
- const p = new le(h, n), f = new q();
2328
- l.push(f), o.push(
2329
- L(f, () => d(e(p))(i))
2329
+ const p = new le(h, r), d = new j();
2330
+ l.push(d), o.push(
2331
+ L(d, () => f(e(p))(i))
2330
2332
  );
2331
2333
  }
2332
2334
  }), (c) => {
2333
2335
  for (const a of l)
2334
2336
  a.dispose();
2335
- l.length = 0, n.dispose();
2337
+ l.length = 0, r.dispose();
2336
2338
  for (const a of o)
2337
2339
  a(c);
2338
2340
  o.length = 0, i.clear(c);
2339
2341
  };
2340
2342
  };
2341
2343
  {
2342
- const r = K(t);
2344
+ const n = K(t);
2343
2345
  return E(
2344
- ...Array.from({ length: t }, (n, i) => i).map((n) => {
2345
- const i = new le(n, r);
2346
- return d(e(i));
2346
+ ...Array.from({ length: t }, (r, i) => i).map((r) => {
2347
+ const i = new le(r, n);
2348
+ return f(e(i));
2347
2349
  })
2348
2350
  );
2349
2351
  }
2350
- }, ks = (t, e, s) => {
2351
- const r = y.map(t, (i) => i.length), n = y.toSignal(t);
2352
- return je(
2353
- r,
2352
+ }, Fs = (t, e, s) => {
2353
+ const n = y.map(t, (i) => i.length), r = y.toSignal(t);
2354
+ return Be(
2355
+ n,
2354
2356
  (i) => {
2355
- const o = n.map((l) => l[i.index]);
2356
- return d(e(o, i));
2357
+ const o = r.map((l) => l[i.index]);
2358
+ return f(e(o, i));
2357
2359
  },
2358
2360
  s
2359
2361
  );
2360
- }, Rt = (...t) => (e) => (s) => t.forEach((r) => {
2361
- typeof r == "function" ? r(s, e) : r.dispose(s, e);
2362
- }), Ms = (t, e) => {
2362
+ }, Gt = (...t) => (e) => (s) => t.forEach((n) => {
2363
+ typeof n == "function" ? n(s, e) : n.dispose(s, e);
2364
+ }), Bs = (t, e) => {
2363
2365
  if (g.is(t)) {
2364
2366
  const s = t;
2365
- return (r) => {
2366
- r = r.makeRef();
2367
- const n = s.map((l) => d(e(l)));
2367
+ return (n) => {
2368
+ n = n.makeRef();
2369
+ const r = s.map((l) => f(e(l)));
2368
2370
  let i = () => {
2369
2371
  };
2370
- const o = n.on((l) => {
2371
- i(!0), i = l(r);
2372
+ const o = r.on((l) => {
2373
+ i(!0), i = l(n);
2372
2374
  });
2373
2375
  return (l) => {
2374
2376
  o(), i(l);
2375
2377
  };
2376
2378
  };
2377
2379
  }
2378
- return d(e(t));
2379
- }, Is = (t, e, s = () => C) => re(
2380
+ return f(e(t));
2381
+ }, Ws = (t, e, s = () => C) => ne(
2380
2382
  y.map(
2381
2383
  t,
2382
- (r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
2384
+ (n) => n.length > 0 ? { notEmpty: n } : { whenEmpty: null }
2383
2385
  ),
2384
2386
  {
2385
- notEmpty: (r) => e(r),
2387
+ notEmpty: (n) => e(n),
2386
2388
  whenEmpty: () => s()
2387
2389
  }
2388
- ), Hs = (t, e) => (s) => {
2389
- const r = s.makePortal(t), n = ae(d(e), r);
2390
- return () => n(!0);
2391
- }, W = /* @__PURE__ */ new Map(), Vt = (t) => ({
2392
- mark: nt(`Probe(${t.description})`),
2390
+ ), Us = (t, e) => (s) => {
2391
+ const n = s.makePortal(t), r = he(f(e), n);
2392
+ return () => r(!0);
2393
+ }, W = /* @__PURE__ */ new Map(), Jt = (t) => ({
2394
+ mark: at(`Probe(${t.description})`),
2393
2395
  create: ({ callback: e = () => {
2394
2396
  }, timeout: s = 10 } = {}) => {
2395
- const r = (l) => {
2396
- clearTimeout(n), W.delete(t), e(l);
2397
+ const n = (l) => {
2398
+ clearTimeout(r), W.delete(t), e(l);
2397
2399
  };
2398
2400
  if (W.has(t))
2399
2401
  throw new Error(`Probe already exists: ${t.description}`);
2400
- const n = setTimeout(() => r("timeout"), s), i = { counter: 0, timeoutId: n };
2402
+ const r = setTimeout(() => n("timeout"), s), i = { counter: 0, timeoutId: r };
2401
2403
  return W.set(t, i), {
2402
2404
  value: () => {
2403
- clearTimeout(n);
2405
+ clearTimeout(r);
2404
2406
  const l = W.get(t);
2405
- l != null && --l.counter === 0 && r("resolved");
2407
+ l != null && --l.counter === 0 && n("resolved");
2406
2408
  },
2407
- dispose: () => r("disposed"),
2409
+ dispose: () => n("disposed"),
2408
2410
  onUse: () => i.counter++
2409
2411
  };
2410
2412
  }
2411
- }), $s = Vt(Symbol("GlobalProbe")), jt = (t, e) => (s) => {
2412
- const r = s.getStyle(t);
2413
- return s.setStyle(t, e), (n) => {
2414
- n && s.setStyle(t, r);
2413
+ }), Gs = Jt(Symbol("GlobalProbe")), Xt = (t, e) => (s) => {
2414
+ const n = s.getStyle(t);
2415
+ return s.setStyle(t, e), (r) => {
2416
+ r && s.setStyle(t, n);
2415
2417
  };
2416
- }, qt = (t, e) => (s) => {
2417
- const r = s.getStyle(t), n = e.on((i) => s.setStyle(t, i));
2418
+ }, Yt = (t, e) => (s) => {
2419
+ const n = s.getStyle(t), r = e.on((i) => s.setStyle(t, i));
2418
2420
  return (i) => {
2419
- n(), i && s.setStyle(t, r);
2421
+ r(), i && s.setStyle(t, n);
2420
2422
  };
2421
- }, pe = (t, e) => g.is(e) ? qt(t, e) : jt(t, e), Ns = new Proxy({}, {
2423
+ }, me = (t, e) => g.is(e) ? Yt(t, e) : Xt(t, e), Js = new Proxy({}, {
2422
2424
  /**
2423
2425
  * Creates a renderable component for the specified `style` property.
2424
2426
  *
@@ -2427,184 +2429,191 @@ const vt = /* @__PURE__ */ new Set([
2427
2429
  * @returns The renderable component for the specified attribute.
2428
2430
  *
2429
2431
  */
2430
- get: (t, e) => e === "variable" ? (s, r) => pe(s, r) : (s) => pe(e, s)
2431
- }), Ft = (t) => (e) => {
2432
+ get: (t, e) => e === "variable" ? (s, n) => me(s, n) : (s) => me(e, s)
2433
+ }), Qt = (t) => (e) => {
2432
2434
  if (e.isBrowser()) {
2433
2435
  const s = t(e);
2434
2436
  if (s != null)
2435
- return d(s)(e);
2437
+ return f(s)(e);
2436
2438
  }
2437
2439
  return () => {
2438
2440
  };
2439
- }, Rs = (t) => (e) => {
2441
+ }, Xs = (t) => (e) => {
2440
2442
  const s = t(e);
2441
2443
  return s == null ? () => {
2442
- } : d(s)(e);
2443
- }, Vs = (t) => Ft((e) => t(e.element)), js = (t) => (e) => {
2444
+ } : f(s)(e);
2445
+ }, Ys = (t) => Qt((e) => t(e.element)), Qs = (t) => (e) => {
2444
2446
  if (e.isHeadlessDOM()) {
2445
2447
  const s = t(e);
2446
2448
  if (s)
2447
- return d(s)(e);
2449
+ return f(s)(e);
2448
2450
  }
2449
2451
  return () => {
2450
2452
  };
2451
- }, qs = (t) => (e) => {
2452
- const s = new q(), r = L(s, () => d(t(s))(e));
2453
- return (n) => {
2454
- s.dispose(), r(n);
2453
+ }, Zs = (t) => (e) => {
2454
+ const s = new j(), n = L(s, () => f(t(s))(e));
2455
+ return (r) => {
2456
+ s.dispose(), n(r);
2455
2457
  };
2456
- }, he = (t) => (e) => {
2458
+ }, de = (t) => (e) => {
2457
2459
  let s = e;
2458
- function r() {
2460
+ function n() {
2459
2461
  return s;
2460
2462
  }
2461
- function n(l) {
2463
+ function r(l) {
2462
2464
  s = l;
2463
2465
  }
2464
2466
  const i = [], o = t({
2465
2467
  use: ({ mark: l }) => {
2466
- const { value: c, onUse: a } = r().getProvider(l);
2468
+ const { value: c, onUse: a } = n().getProvider(l);
2467
2469
  return a?.(), c;
2468
2470
  },
2469
2471
  set: ({ mark: l, create: c }, a) => {
2470
- const { value: u, dispose: h, onUse: p } = c(a, r());
2471
- i.push(h), n(r().setProvider(l, u, p));
2472
+ const { value: u, dispose: h, onUse: p } = c(a, n());
2473
+ i.push(h), r(n().setProvider(l, u, p));
2472
2474
  }
2473
2475
  });
2474
2476
  return o == null ? () => {
2475
2477
  } : E(
2476
- d(o),
2477
- Rt(() => i.forEach((l) => l()))
2478
- )(r());
2479
- }, Fs = (t, e, s) => he(({ set: r }) => (r(t, e), s())), Bs = (t, e) => he(({ use: s }) => e(s(t))), Ws = (...t) => (e) => he(({ use: s }) => {
2480
- const r = t.map(s);
2481
- return e(...r);
2478
+ f(o),
2479
+ Gt(() => i.forEach((l) => l()))
2480
+ )(n());
2481
+ }, zs = (t, e, s) => de(({ set: n }) => (n(t, e), s())), Ks = (t, e) => de(({ use: s }) => e(s(t))), en = (...t) => (e) => de(({ use: s }) => {
2482
+ const n = t.map(s);
2483
+ return e(...n);
2482
2484
  });
2483
2485
  export {
2484
- gs as Async,
2485
- Ts as BindChecked,
2486
- Ss as BindDate,
2487
- ws as BindDateTime,
2488
- _s as BindNumber,
2489
- vs as BindText,
2490
- N as BrowserContext,
2491
- J as CLASS_PLACEHOLDER_ATTR,
2492
- $ as Computed,
2493
- Ds as Conjunction,
2494
- Ps as DOMNode,
2495
- q as DisposalScope,
2496
- Ie as El,
2497
- He as ElNS,
2486
+ Ht as Aria,
2487
+ Es as Async,
2488
+ kt as Attr,
2489
+ ks as BindChecked,
2490
+ xs as BindDate,
2491
+ Ls as BindDateTime,
2492
+ Os as BindNumber,
2493
+ Ms as BindText,
2494
+ $ as BrowserContext,
2495
+ G as CLASS_PLACEHOLDER_ATTR,
2496
+ N as Computed,
2497
+ $s as Conjunction,
2498
+ Rs as DOMNode,
2499
+ It as DataAttr,
2500
+ j as DisposalScope,
2501
+ Ne as El,
2502
+ te as ElNS,
2498
2503
  le as ElementPosition,
2499
2504
  C as Empty,
2500
- xs as Ensure,
2501
- Ls as EnsureAll,
2502
- ks as ForEach,
2505
+ Vs as Ensure,
2506
+ js as EnsureAll,
2507
+ Fs as ForEach,
2503
2508
  E as Fragment,
2504
- $s as GlobalProbe,
2505
- ns as HeadlessAdapter,
2509
+ Gs as GlobalProbe,
2510
+ fs as HeadlessAdapter,
2506
2511
  R as HeadlessContext,
2507
- wt as HeadlessElement,
2508
- Oe as HeadlessPortal,
2509
- _t as HeadlessText,
2510
- Ms as MapSignal,
2512
+ Et as HeadlessElement,
2513
+ ke as HeadlessPortal,
2514
+ Ct as HeadlessText,
2515
+ Bs as MapSignal,
2516
+ $t as MathAttr,
2517
+ Ts as MathEl,
2511
2518
  be as MemoryStore,
2512
- Is as NotEmpty,
2513
- Lt as OnChecked,
2514
- Rt as OnDispose,
2515
- re as OneOf,
2516
- Re as OneOfField,
2517
- As as OneOfKind,
2518
- Es as OneOfTuple,
2519
- Cs as OneOfType,
2520
- Nt as OneOfValue,
2521
- Hs as Portal,
2519
+ Ws as NotEmpty,
2520
+ Rt as OnChecked,
2521
+ Gt as OnDispose,
2522
+ ne as OneOf,
2523
+ qe as OneOfField,
2524
+ Is as OneOfKind,
2525
+ Hs as OneOfTuple,
2526
+ Ns as OneOfType,
2527
+ Ut as OneOfValue,
2528
+ Us as Portal,
2522
2529
  Z as Prop,
2523
- Fs as Provide,
2524
- Ce as ProviderNotFoundError,
2525
- it as RenderingError,
2526
- je as Repeat,
2530
+ zs as Provide,
2531
+ Pe as ProviderNotFoundError,
2532
+ ut as RenderingError,
2533
+ Be as Repeat,
2534
+ Nt as SVGAttr,
2535
+ _s as SVGEl,
2527
2536
  g as Signal,
2528
- $e as Task,
2529
- os as TextNode,
2530
- Os as Unless,
2531
- Bs as Use,
2532
- Ws as UseMany,
2537
+ Ve as Task,
2538
+ ps as TextNode,
2539
+ qs as Unless,
2540
+ Ks as Use,
2541
+ en as UseMany,
2533
2542
  y as Value,
2534
- Ve as When,
2535
- Ft as WithBrowserCtx,
2536
- Rs as WithCtx,
2537
- Vs as WithElement,
2538
- js as WithHeadlessCtx,
2539
- he as WithProvider,
2540
- qs as WithScope,
2541
- De as _NODE_PLACEHOLDER_ATTR,
2542
- rt as _getSelfOrParentElement,
2543
- Ee as _isElement,
2544
- st as _makeGetter,
2545
- tt as _makeSetter,
2543
+ Fe as When,
2544
+ Qt as WithBrowserCtx,
2545
+ Xs as WithCtx,
2546
+ Ys as WithElement,
2547
+ Qs as WithHeadlessCtx,
2548
+ de as WithProvider,
2549
+ Zs as WithScope,
2550
+ xe as _NODE_PLACEHOLDER_ATTR,
2551
+ ct as _getSelfOrParentElement,
2552
+ De as _isElement,
2553
+ lt as _makeGetter,
2554
+ ot as _makeSetter,
2546
2555
  U as _removeDOMNode,
2547
- Me as _signalText,
2548
- ke as _staticText,
2549
- Yt as animateSignal,
2550
- Ke as animateSignals,
2551
- cs as aria,
2552
- j as attr,
2553
- es as bind,
2554
- ts as coalesce,
2556
+ He as _signalText,
2557
+ Ie as _staticText,
2558
+ ns as animateSignal,
2559
+ rt as animateSignals,
2560
+ ms as aria,
2561
+ V as attr,
2562
+ cs as bind,
2563
+ as as coalesce,
2555
2564
  z as computed,
2556
2565
  ee as computedOf,
2557
- et as computedRecord,
2558
- ls as dataAttr,
2559
- Zt as delaySignal,
2560
- me as effect,
2561
- Ge as effectOf,
2562
- Ot as emit,
2563
- bs as emitChecked,
2566
+ it as computedRecord,
2567
+ gs as dataAttr,
2568
+ is as delaySignal,
2569
+ Se as effect,
2570
+ Qe as effectOf,
2571
+ Vt as emit,
2572
+ Ps as emitChecked,
2564
2573
  O as emitTarget,
2565
- kt as emitValue,
2566
- It as emitValueAsDate,
2567
- Ht as emitValueAsDateTime,
2568
- ms as emitValueAsNullableDate,
2569
- ys as emitValueAsNullableDateTime,
2570
- Mt as emitValueAsNumber,
2571
- Ze as endInterpolate,
2572
- ge as getCurrentScope,
2573
- Wt as getParentScope,
2574
- Bt as getScopeStack,
2575
- ce as getWindow,
2576
- ze as guessInterpolate,
2577
- hs as html,
2578
- ds as input,
2579
- Qe as interpolateDate,
2580
- Xe as interpolateNumber,
2581
- Ye as interpolateString,
2582
- Jt as joinSignals,
2583
- Gt as localStorageProp,
2584
- Vt as makeProbe,
2585
- nt as makeProviderMark,
2586
- ps as math,
2587
- us as mathAttr,
2588
- Qt as merge,
2574
+ jt as emitValue,
2575
+ Ft as emitValueAsDate,
2576
+ Bt as emitValueAsDateTime,
2577
+ Cs as emitValueAsNullableDate,
2578
+ Ds as emitValueAsNullableDateTime,
2579
+ qt as emitValueAsNumber,
2580
+ et as endInterpolate,
2581
+ ye as getCurrentScope,
2582
+ zt as getParentScope,
2583
+ Zt as getScopeStack,
2584
+ ue as getWindow,
2585
+ tt as guessInterpolate,
2586
+ ws as html,
2587
+ bs as input,
2588
+ Ke as interpolateDate,
2589
+ Ze as interpolateNumber,
2590
+ ze as interpolateString,
2591
+ es as joinSignals,
2592
+ ts as localStorageProp,
2593
+ Jt as makeProbe,
2594
+ at as makeProviderMark,
2595
+ As as math,
2596
+ Ss as mathAttr,
2597
+ rs as merge,
2589
2598
  se as on,
2590
- Fe as popScope,
2591
- zt as previousSignal,
2599
+ Ue as popScope,
2600
+ os as previousSignal,
2592
2601
  T as prop,
2593
- qe as pushScope,
2594
- ss as render,
2595
- ae as renderWithContext,
2596
- d as renderableOfTNode,
2597
- is as restoreTempoPlaceholders,
2598
- rs as runHeadless,
2602
+ We as pushScope,
2603
+ us as render,
2604
+ he as renderWithContext,
2605
+ f as renderableOfTNode,
2606
+ ds as restoreTempoPlaceholders,
2607
+ hs as runHeadless,
2599
2608
  _ as scopeStack,
2600
- Ut as scoped,
2601
- Xt as sessionStorageProp,
2609
+ Kt as scoped,
2610
+ ss as sessionStorageProp,
2602
2611
  K as signal,
2603
- Kt as slidingWindowSignal,
2604
- Se as storedProp,
2605
- Ns as style,
2606
- fs as svg,
2607
- as as svgAttr,
2612
+ ls as slidingWindowSignal,
2613
+ _e as storedProp,
2614
+ Js as style,
2615
+ vs as svg,
2616
+ ys as svgAttr,
2608
2617
  oe as untracked,
2609
2618
  L as withScope
2610
2619
  };