@tempots/dom 31.2.0 → 31.3.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,10 +1,10 @@
1
1
  var Ie = Object.defineProperty;
2
- var ie = (s) => {
2
+ var le = (s) => {
3
3
  throw TypeError(s);
4
4
  };
5
5
  var Re = (s, e, t) => e in s ? Ie(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
- var o = (s, e, t) => Re(s, typeof e != "symbol" ? e + "" : e, t), oe = (s, e, t) => e.has(s) || ie("Cannot " + t);
7
- var R = (s, e, t) => (oe(s, e, "read from private field"), t ? t.call(s) : e.get(s)), le = (s, e, t) => e.has(s) ? ie("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), Z = (s, e, t, r) => (oe(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
6
+ var o = (s, e, t) => Re(s, typeof e != "symbol" ? e + "" : e, t), ce = (s, e, t) => e.has(s) || le("Cannot " + t);
7
+ var V = (s, e, t) => (ce(s, e, "read from private field"), t ? t.call(s) : e.get(s)), ue = (s, e, t) => e.has(s) ? le("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), K = (s, e, t, r) => (ce(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
8
8
  const je = (s, e, t) => s + (e - s) * t;
9
9
  const Ve = (s, e, t) => {
10
10
  const r = Math.max(s.length, e.length);
@@ -17,8 +17,8 @@ const Ve = (s, e, t) => {
17
17
  }
18
18
  return n;
19
19
  }, qe = (s, e, t) => new Date(s.getTime() + (e.getTime() - s.getTime()) * t), Fe = (s, e) => e, Be = (s) => typeof s == "number" ? je : typeof s == "string" ? Ve : s instanceof Date ? qe : Fe;
20
- var w;
21
- class z {
20
+ var x;
21
+ class ee {
22
22
  /**
23
23
  * Creates a new instance of `ElementPosition`.
24
24
  * @param index - The index of the element.
@@ -44,10 +44,10 @@ class z {
44
44
  * @returns `true` if the counter is odd, `false` otherwise.
45
45
  */
46
46
  o(this, "isOdd");
47
- le(this, w);
47
+ ue(this, x);
48
48
  o(this, "dispose", () => {
49
49
  var e;
50
- (e = R(this, w)) == null || e.dispose(), Z(this, w, void 0);
50
+ (e = V(this, x)) == null || e.dispose(), K(this, x, void 0);
51
51
  });
52
52
  this.index = e, this.total = t, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
53
53
  }
@@ -56,11 +56,11 @@ class z {
56
56
  * @returns `true` if the element is the last element, `false` otherwise.
57
57
  */
58
58
  get isLast() {
59
- return R(this, w) == null && Z(this, w, this.total.map((e) => this.counter === e)), R(this, w);
59
+ return V(this, x) == null && K(this, x, this.total.map((e) => this.counter === e)), V(this, x);
60
60
  }
61
61
  }
62
- w = new WeakMap();
63
- const k = class k {
62
+ x = new WeakMap();
63
+ const I = class I {
64
64
  /**
65
65
  * Represents a signal with a value of type T.
66
66
  *
@@ -203,7 +203,7 @@ const k = class k {
203
203
  * @returns A new computed signal with the transformed value
204
204
  */
205
205
  o(this, "map", (e, t = (r, n) => r === n) => {
206
- const r = new L(() => {
206
+ const r = new M(() => {
207
207
  try {
208
208
  return e(this.get());
209
209
  } catch (n) {
@@ -223,7 +223,7 @@ const k = class k {
223
223
  * @returns A new Signal that emits the values of the resulting Signal.
224
224
  */
225
225
  o(this, "flatMap", (e, t = (r, n) => r === n) => {
226
- const r = new L(() => {
226
+ const r = new M(() => {
227
227
  try {
228
228
  return e(this.get()).get();
229
229
  } catch (n) {
@@ -252,7 +252,7 @@ const k = class k {
252
252
  o(this, "_$");
253
253
  o(this, "filter", (e, t) => {
254
254
  let r = t ?? this.get();
255
- const n = new L(() => {
255
+ const n = new M(() => {
256
256
  try {
257
257
  const i = this.get();
258
258
  return r = e(i) ? i : r;
@@ -274,7 +274,7 @@ const k = class k {
274
274
  */
275
275
  o(this, "filterMap", (e, t, r = (n, i) => n === i) => {
276
276
  let n = t;
277
- const i = new L(() => {
277
+ const i = new M(() => {
278
278
  try {
279
279
  const l = this.get(), c = e(l);
280
280
  return n = c ?? n;
@@ -298,7 +298,7 @@ const k = class k {
298
298
  * @returns A property that holds the mapped value and can be observed for changes.
299
299
  */
300
300
  o(this, "mapAsync", (e, t, r, n = (i, l) => i === l) => {
301
- const i = _(t, n);
301
+ const i = E(t, n);
302
302
  let l = 0, c = new AbortController();
303
303
  return i.onDispose(
304
304
  this.on(async (u) => {
@@ -348,7 +348,7 @@ const k = class k {
348
348
  o(this, "deriveProp", ({
349
349
  autoDisposeProp: e = !0,
350
350
  equals: t
351
- } = {}) => this.feedProp(_(this.get(), t), e));
351
+ } = {}) => this.feedProp(E(this.get(), t), e));
352
352
  /**
353
353
  * Derives a new signal from the current signal. Useful to create a new signal that emits the same values as the current signal but can be disposed independently.
354
354
  * @returns A new signal that emits the same values as the current signal.
@@ -436,8 +436,8 @@ const k = class k {
436
436
  * @param equals - Function to compare two values for equality (defaults to strict equality)
437
437
  * @returns A Signal that represents the result of the Promise
438
438
  */
439
- o(k, "ofPromise", (e, t, r, n = (i, l) => i === l) => {
440
- const i = new k(t, n);
439
+ o(I, "ofPromise", (e, t, r, n = (i, l) => i === l) => {
440
+ const i = new I(t, n);
441
441
  return e.then((l) => i._setAndNotify(l)).catch((l) => {
442
442
  r != null ? i._setAndNotify(r(l)) : console.error(
443
443
  "Unhandled promise rejection in Signal.ofPromise:",
@@ -450,13 +450,13 @@ o(k, "ofPromise", (e, t, r, n = (i, l) => i === l) => {
450
450
  * @param value - The value to check.
451
451
  * @returns `true` if the value is a Signal, `false` otherwise.
452
452
  */
453
- o(k, "is", (e) => (
453
+ o(I, "is", (e) => (
454
454
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
455
455
  e != null && e.$__signal__ === !0
456
456
  ));
457
- let d = k;
457
+ let g = I;
458
458
  const We = typeof queueMicrotask == "function" ? queueMicrotask : (s) => Promise.resolve().then(s);
459
- class L extends d {
459
+ class M extends g {
460
460
  /**
461
461
  * Represents a Signal object.
462
462
  * @param _fn - The function that returns the value of the signal.
@@ -513,7 +513,7 @@ class L extends d {
513
513
  return this.get();
514
514
  }
515
515
  }
516
- const G = class G extends d {
516
+ const Y = class Y extends g {
517
517
  constructor() {
518
518
  super(...arguments);
519
519
  /**
@@ -567,7 +567,7 @@ const G = class G extends d {
567
567
  * @returns A Prop object representing the isomorphism.
568
568
  */
569
569
  o(this, "iso", (t, r, n = (i, l) => i === l) => {
570
- const i = new G(t(this.get()), n);
570
+ const i = new Y(t(this.get()), n);
571
571
  return i.onDispose(this.on((l) => i.set(t(l)))), i.on((l) => this._setAndNotify(r(l))), i;
572
572
  });
573
573
  /**
@@ -596,13 +596,13 @@ const G = class G extends d {
596
596
  * @param value - The value to check.
597
597
  * @returns `true` if the value is a Prop, `false` otherwise.
598
598
  */
599
- o(G, "is", (t) => (
599
+ o(Y, "is", (t) => (
600
600
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
601
601
  t != null && t.$__prop__ === !0
602
602
  ));
603
- let V = G;
604
- const K = (s, e, t = (r, n) => r === n) => {
605
- const r = new L(s, t);
603
+ let F = Y;
604
+ const te = (s, e, t = (r, n) => r === n) => {
605
+ const r = new M(s, t);
606
606
  return e.forEach((n) => n.setDerivative(r)), r;
607
607
  }, Ue = (s, e, t = {}) => {
608
608
  let r = t.once ? () => {
@@ -615,19 +615,19 @@ const K = (s, e, t = (r, n) => r === n) => {
615
615
  l ? c() : l = !0;
616
616
  };
617
617
  }
618
- const n = K(r, e), i = () => {
618
+ const n = te(r, e), i = () => {
619
619
  n.dispose(), t.abortSignal != null && t.abortSignal.removeEventListener("abort", i);
620
620
  };
621
621
  return t.abortSignal != null && t.abortSignal.addEventListener("abort", i), i;
622
- }, _ = (s, e = (t, r) => t === r) => new V(s, e), X = (s, e = (t, r) => t === r) => new d(s, e), he = () => (
622
+ }, E = (s, e = (t, r) => t === r) => new F(s, e), Q = (s, e = (t, r) => t === r) => new g(s, e), se = () => (
623
623
  /* c8 ignore next */
624
624
  typeof window < "u" ? window : void 0
625
625
  );
626
- function fe(s) {
626
+ function de(s) {
627
627
  return s != null && s !== !1 && s !== 0 && s !== "";
628
628
  }
629
629
  function Je(s) {
630
- return !fe(s);
630
+ return !de(s);
631
631
  }
632
632
  function Ge(s) {
633
633
  return s == null;
@@ -647,7 +647,7 @@ const y = {
647
647
  * @param fn - The function to map the value.
648
648
  * @returns The mapped value.
649
649
  */
650
- map: (s, e) => d.is(s) ? s.map(e) : e(s),
650
+ map: (s, e) => g.is(s) ? s.map(e) : e(s),
651
651
  /**
652
652
  * Wraps a value or a Signal instance into a Signal.
653
653
  * If the value is already a Signal, it returns the value itself.
@@ -658,7 +658,7 @@ const y = {
658
658
  * @param equals - A function that determines if two values are equal. Defaults to strict equality (===).
659
659
  * @returns A Signal instance.
660
660
  */
661
- toSignal: (s, e) => d.is(s) ? s : X(s, e),
661
+ toSignal: (s, e) => g.is(s) ? s : Q(s, e),
662
662
  /**
663
663
  * Wraps a value in a `Signal` if it is not already a `Signal`.
664
664
  * If the value is `null` or `undefined`, it returns `null` or `undefined` respectively.
@@ -674,14 +674,14 @@ const y = {
674
674
  * @param value - The value or Signal instance to get the value from.
675
675
  * @returns The value.
676
676
  */
677
- get: (s) => d.is(s) ? s.get() : s,
677
+ get: (s) => g.is(s) ? s.get() : s,
678
678
  /**
679
679
  * Adds a listener to a `Signal` or calls the listener immediately if it is not a `Signal`.
680
680
  * @param value - The value or Signal instance to add the listener to.
681
681
  * @param listener - The listener to call when the value changes.
682
682
  * @returns A function to remove the listener.
683
683
  */
684
- on: (s, e) => d.is(s) ? s.on(e) : (e(s), () => {
684
+ on: (s, e) => g.is(s) ? s.on(e) : (e(s), () => {
685
685
  }),
686
686
  /**
687
687
  * Disposes of a value or a Signal.
@@ -690,7 +690,7 @@ const y = {
690
690
  * @param value - The value or Signal instance to dispose of.
691
691
  */
692
692
  dispose: (s) => {
693
- d.is(s) && s.dispose();
693
+ g.is(s) && s.dispose();
694
694
  },
695
695
  /**
696
696
  * Derives a Prop from a Signal.
@@ -705,13 +705,13 @@ const y = {
705
705
  deriveProp: (s, {
706
706
  autoDisposeProp: e = !0,
707
707
  equals: t
708
- } = {}) => d.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : _(s, t),
708
+ } = {}) => g.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : E(s, t),
709
709
  /**
710
710
  * Creates a new signal that emits `true` if the value is truthy, `false` otherwise.
711
711
  * @param value - The value or signal to check.
712
712
  * @returns A signal that emits `true` if the value is truthy, `false` otherwise.
713
713
  */
714
- truthy: (s) => y.map(s, fe),
714
+ truthy: (s) => y.map(s, de),
715
715
  /**
716
716
  * Creates a new signal that emits `true` if the value is falsy, `false` otherwise.
717
717
  * @param value - The value or signal to check.
@@ -730,29 +730,29 @@ const y = {
730
730
  * @returns A signal that emits `true` if the value is not null or undefined, `false` otherwise.
731
731
  */
732
732
  defined: (s) => y.map(s, Xe)
733
- }, ee = (...s) => (e, t) => {
733
+ }, re = (...s) => (e, t) => {
734
734
  if (s.length === 1)
735
735
  return y.toSignal(s[0]).map(e);
736
- const r = s.filter((n) => d.is(n));
737
- return K(
736
+ const r = s.filter((n) => g.is(n));
737
+ return te(
738
738
  () => e(...s.map((n) => y.get(n))),
739
739
  r,
740
740
  t
741
741
  );
742
- }, kt = (s) => {
742
+ }, $t = (s) => {
743
743
  const e = Object.keys(s);
744
- return ee(...Object.values(s))(
744
+ return re(...Object.values(s))(
745
745
  (...t) => Object.fromEntries(e.map((r, n) => [r, t[n]]))
746
746
  );
747
747
  }, Nt = (...s) => (e, t = {}) => {
748
- const r = s.filter((n) => d.is(n));
748
+ const r = s.filter((n) => g.is(n));
749
749
  return Ue(
750
750
  () => e(...s.map(y.get)),
751
751
  r,
752
752
  t
753
753
  );
754
754
  };
755
- class de {
755
+ class pe {
756
756
  constructor() {
757
757
  o(this, "_store", /* @__PURE__ */ new Map());
758
758
  /**
@@ -771,56 +771,83 @@ class de {
771
771
  });
772
772
  }
773
773
  }
774
- const pe = ({
774
+ const ge = ({
775
775
  key: s,
776
776
  defaultValue: e,
777
777
  store: t,
778
778
  serialize: r = JSON.stringify,
779
779
  deserialize: n = JSON.parse,
780
- equals: i = (c, u) => c === u,
781
- onLoad: l = (c) => c
780
+ equals: i = (u, a) => u === a,
781
+ onLoad: l = (u) => u,
782
+ syncTabs: c = !0
782
783
  }) => {
783
- const c = t.getItem(s), u = new V(
784
- c != null ? l(n(c)) : typeof e == "function" ? e() : e,
784
+ const u = t.getItem(s), a = new F(
785
+ u != null ? l(n(u)) : typeof e == "function" ? e() : e,
785
786
  i
786
- );
787
- return u.on((a) => t.setItem(s, r(a))), u;
788
- }, $t = (s) => {
787
+ ), h = se(), m = c && typeof (h == null ? void 0 : h.BroadcastChannel) == "function", T = `tempo:storedProp:${s}`;
788
+ let p = !1, d = null, A = null;
789
+ if (m) {
790
+ d = new h.BroadcastChannel(T), A = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
791
+ const P = (S) => {
792
+ const b = S.data;
793
+ if (!(b == null || typeof b != "object" || b.key !== s || typeof b.value != "string" || b.sourceId != null && b.sourceId === A))
794
+ try {
795
+ p = !0;
796
+ const N = l(n(b.value));
797
+ a.set(N);
798
+ } catch (N) {
799
+ console.warn(
800
+ `Failed to sync storedProp for key "${s}" via BroadcastChannel`,
801
+ N
802
+ );
803
+ } finally {
804
+ p = !1;
805
+ }
806
+ };
807
+ d.addEventListener("message", P), a.onDispose(() => {
808
+ d == null || d.removeEventListener("message", P), d == null || d.close();
809
+ });
810
+ }
811
+ return a.on((P, S) => {
812
+ const b = r(P);
813
+ t.setItem(s, b), d != null && !p && S !== void 0 && A != null && d.postMessage({ key: s, value: b, sourceId: A });
814
+ }), a;
815
+ }, kt = (s) => {
789
816
  var e;
790
- return pe({
817
+ return ge({
791
818
  ...s,
792
819
  /* c8 ignore next 3 */
793
- store: ((e = he()) == null ? void 0 : e.localStorage) ?? new de()
820
+ store: ((e = se()) == null ? void 0 : e.localStorage) ?? new pe()
794
821
  });
795
822
  }, It = (s) => {
796
823
  var e;
797
- return pe({
824
+ return ge({
798
825
  ...s,
799
826
  /* c8 ignore next 3 */
800
- store: ((e = he()) == null ? void 0 : e.sessionStorage) ?? new de()
827
+ store: ((e = se()) == null ? void 0 : e.sessionStorage) ?? new pe()
801
828
  });
802
829
  };
803
- function ce(s) {
830
+ function ae(s) {
804
831
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame(s) : setTimeout(s, 0);
805
832
  }
806
833
  const Ye = (s, e, t, r) => {
807
- const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((A) => A), l = (r == null ? void 0 : r.equals) ?? ((A, I) => A === I);
808
- let c = r == null ? void 0 : r.interpolate, u = s, a = e(), h = performance.now(), g = null, T = !0;
809
- const p = new L(e, l), m = _(s, l);
810
- m.onDispose(() => {
811
- g !== null && cancelAnimationFrame(g);
812
- }), m.onDispose(p.dispose), t.forEach((A) => {
813
- A.setDerivative(p), A.onDispose(m.dispose);
834
+ const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((S) => S), l = (r == null ? void 0 : r.equals) ?? ((S, b) => S === b);
835
+ let c = r == null ? void 0 : r.interpolate, u = s, a = e(), h = performance.now(), m = null, T = !0;
836
+ const p = new M(e, l), d = E(s, l);
837
+ d.onDispose(() => {
838
+ m !== null && cancelAnimationFrame(m);
839
+ }), d.onDispose(p.dispose), t.forEach((S) => {
840
+ S.setDerivative(p), S.onDispose(d.dispose);
814
841
  });
815
- const C = (A) => {
816
- a = A, h = performance.now(), u = m.value, T && (T = !1, g = ce(re));
817
- }, re = () => {
818
- const I = (performance.now() - h) / y.get(n), $e = i(I);
842
+ const A = (S) => {
843
+ a = S, h = performance.now(), u = d.value, T && (T = !1, m = ae(P));
844
+ }, P = () => {
845
+ const b = (performance.now() - h) / y.get(n), N = i(b);
819
846
  c == null && (c = Be(u));
820
- let ne = c(u, a, $e);
821
- I >= 1 ? (T = !0, ne = a) : g = ce(re), m.set(ne);
847
+ let oe = c(u, a, N);
848
+ b >= 1 ? (T = !0, oe = a) : m = ae(P), d.set(oe);
822
849
  };
823
- return p.on(C), m;
850
+ return p.on(A), d;
824
851
  }, Rt = (s, e) => {
825
852
  const { initialValue: t, ...r } = e ?? {};
826
853
  return Ye(
@@ -831,15 +858,15 @@ const Ye = (s, e, t, r) => {
831
858
  r
832
859
  );
833
860
  }, Qe = (s, e) => {
834
- const t = Object.values(s).filter(d.is), r = Object.keys(s);
835
- return K(() => {
861
+ const t = Object.values(s).filter(g.is), r = Object.keys(s);
862
+ return te(() => {
836
863
  const n = {};
837
864
  for (const i of r)
838
865
  n[i] = y.get(s[i]);
839
866
  return e(n);
840
867
  }, t);
841
868
  }, jt = (s) => Qe(s, (e) => e), Vt = (s, e) => {
842
- const t = _(s.get());
869
+ const t = E(s.get());
843
870
  let r = null;
844
871
  const n = s.on((i) => {
845
872
  r != null && clearTimeout(r), r = setTimeout(
@@ -864,21 +891,21 @@ const Ye = (s, e, t, r) => {
864
891
  }) => {
865
892
  const t = [];
866
893
  return e.map((r) => (t.push(r), s != null && t.length > s && t.shift(), t.slice()));
867
- }, Bt = (s) => (...e) => ee(
894
+ }, Bt = (s) => (...e) => re(
868
895
  s,
869
896
  ...e
870
897
  )((t, ...r) => t(...r));
871
898
  function Wt(...s) {
872
- return ee(...s)((...e) => {
899
+ return re(...s)((...e) => {
873
900
  for (const t of e) if (t != null) return t;
874
901
  });
875
902
  }
876
- const ge = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), me = /* @__PURE__ */ new Set(["selected"]), ye = /* @__PURE__ */ new Set([
903
+ const me = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), ye = /* @__PURE__ */ new Set(["selected"]), Te = /* @__PURE__ */ new Set([
877
904
  "rowSpan",
878
905
  "colSpan",
879
906
  "tabIndex",
880
907
  "valueAsNumber"
881
- ]), Te = /* @__PURE__ */ new Set(["valueAsDate"]), be = /* @__PURE__ */ new Set([
908
+ ]), be = /* @__PURE__ */ new Set(["valueAsDate"]), Se = /* @__PURE__ */ new Set([
882
909
  "value",
883
910
  "textContent",
884
911
  "innerText",
@@ -886,28 +913,28 @@ const ge = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), me = /* @
886
913
  "outerHTML",
887
914
  "className",
888
915
  "classList"
889
- ]), Ze = (s, e) => me.has(s) ? (t) => {
916
+ ]), Ze = (s, e) => ye.has(s) ? (t) => {
890
917
  t == null || t !== !0 ? e.removeAttribute(s) : e.setAttribute(s, "");
891
- } : ge.has(s) ? (t) => {
918
+ } : me.has(s) ? (t) => {
892
919
  t == null ? e[s] = null : e[s] = !!t;
893
- } : ye.has(s) ? (t) => {
894
- t == null ? e[s] = null : e[s] = Number(t);
895
920
  } : Te.has(s) ? (t) => {
896
- t == null ? e[s] = null : e[s] = t;
921
+ t == null ? e[s] = null : e[s] = Number(t);
897
922
  } : be.has(s) ? (t) => {
923
+ t == null ? e[s] = null : e[s] = t;
924
+ } : Se.has(s) ? (t) => {
898
925
  t == null ? e[s] = null : e[s] = String(t);
899
926
  } : (t) => {
900
927
  t == null ? e.removeAttribute(s) : e.setAttribute(s, t);
901
- }, ze = (s, e) => me.has(s) ? () => e.hasAttribute(s) : ge.has(s) ? () => !!e[s] : ye.has(s) ? () => Number(e[s]) : Te.has(s) ? () => e[s] : be.has(s) ? () => String(e[s]) : () => e.getAttribute(s), q = (s) => {
928
+ }, ze = (s, e) => ye.has(s) ? () => e.hasAttribute(s) : me.has(s) ? () => !!e[s] : Te.has(s) ? () => Number(e[s]) : be.has(s) ? () => e[s] : Se.has(s) ? () => String(e[s]) : () => e.getAttribute(s), B = (s) => {
902
929
  const e = s;
903
930
  e && e.onblur && (e.onblur = null), !(!s || s.ownerDocument === void 0) && s.parentElement && s.parentElement.removeChild(s);
904
- }, Ke = (s) => Se(s) ? s : s.parentElement, Se = (s) => s.nodeType === 1;
905
- class Ae extends Error {
931
+ }, Ke = (s) => Ae(s) ? s : s.parentElement, Ae = (s) => s.nodeType === 1;
932
+ class ve extends Error {
906
933
  constructor(e) {
907
934
  super(`Provider not found: ${e.description}`);
908
935
  }
909
936
  }
910
- class D {
937
+ class O {
911
938
  /**
912
939
  * Constructs a new `DOMContext` instance.
913
940
  *
@@ -1004,7 +1031,7 @@ class D {
1004
1031
  * @param element - The DOM element to use in the new `DOMContext` instance.
1005
1032
  * @returns A new `DOMContext` instance with the provided `element`.
1006
1033
  */
1007
- o(this, "withElement", (e) => new D(this.document, e, void 0, this.providers));
1034
+ o(this, "withElement", (e) => new O(this.document, e, void 0, this.providers));
1008
1035
  /**
1009
1036
  * Creates a portal to render content in a different part of the DOM tree.
1010
1037
  *
@@ -1061,7 +1088,7 @@ class D {
1061
1088
  * @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
1062
1089
  * @returns A new `DOMContext` instance with the specified reference.
1063
1090
  */
1064
- o(this, "withReference", (e) => new D(this.document, this.element, e, this.providers));
1091
+ o(this, "withReference", (e) => new O(this.document, this.element, e, this.providers));
1065
1092
  /**
1066
1093
  * Sets a provider for the given provider mark.
1067
1094
  *
@@ -1069,7 +1096,7 @@ class D {
1069
1096
  * @param value - The provider to set for the given mark.
1070
1097
  * @returns A new `DOMContext` instance with the specified provider.
1071
1098
  */
1072
- o(this, "setProvider", (e, t, r) => new D(this.document, this.element, this.reference, {
1099
+ o(this, "setProvider", (e, t, r) => new O(this.document, this.element, this.reference, {
1073
1100
  ...this.providers,
1074
1101
  [e]: [t, r]
1075
1102
  }));
@@ -1082,12 +1109,12 @@ class D {
1082
1109
  */
1083
1110
  o(this, "getProvider", (e) => {
1084
1111
  if (this.providers[e] === void 0)
1085
- throw new Ae(e);
1112
+ throw new ve(e);
1086
1113
  const [t, r] = this.providers[e];
1087
1114
  return { value: t, onUse: r };
1088
1115
  });
1089
1116
  o(this, "clear", (e) => {
1090
- e && (this.reference !== void 0 ? q(this.reference) : q(this.element));
1117
+ e && (this.reference !== void 0 ? B(this.reference) : B(this.element));
1091
1118
  });
1092
1119
  /**
1093
1120
  * Adds classes to the element.
@@ -1172,10 +1199,10 @@ class D {
1172
1199
  * @returns A new `DOMContext` instance.
1173
1200
  */
1174
1201
  static of(e, t, r) {
1175
- return new D(e.ownerDocument, e, t, r);
1202
+ return new O(e.ownerDocument, e, t, r);
1176
1203
  }
1177
1204
  }
1178
- const et = (s) => Symbol(s), te = (s, e) => {
1205
+ const et = (s) => Symbol(s), ne = (s, e) => {
1179
1206
  const t = s(e);
1180
1207
  return (r = !0) => t(r);
1181
1208
  }, Ut = (s, e, { doc: t, clear: r, disposeWithParent: n = !0, providers: i = {} } = {}) => {
@@ -1185,19 +1212,19 @@ const et = (s) => Symbol(s), te = (s, e) => {
1185
1212
  `Cannot find element by selector for render: ${e}`
1186
1213
  );
1187
1214
  r !== !1 && (t ?? l.ownerDocument) != null && l.nodeType === 1 && (l.innerHTML = "");
1188
- const c = Ke(l), u = Se(l) ? void 0 : l, a = D.of(c, u, i), h = te(s, a);
1189
- let g;
1190
- return n && (g = new MutationObserver((T) => {
1215
+ const c = Ke(l), u = Ae(l) ? void 0 : l, a = O.of(c, u, i), h = ne(s, a);
1216
+ let m;
1217
+ return n && (m = new MutationObserver((T) => {
1191
1218
  var p;
1192
- (p = T[0]) == null || p.removedNodes.forEach((m) => {
1193
- m === l && (g == null || g.disconnect(), h(l.nodeType !== 1));
1219
+ (p = T[0]) == null || p.removedNodes.forEach((d) => {
1220
+ d === l && (m == null || m.disconnect(), h(l.nodeType !== 1));
1194
1221
  });
1195
- }), g.observe(l.parentElement, {
1222
+ }), m.observe(l.parentElement, {
1196
1223
  childList: !0,
1197
1224
  subtree: !1,
1198
1225
  attributes: !1
1199
1226
  })), () => {
1200
- g == null || g.disconnect(), h(!0);
1227
+ m == null || m.disconnect(), h(!0);
1201
1228
  };
1202
1229
  }, Jt = (s, {
1203
1230
  startUrl: e = "https://example.com",
@@ -1206,9 +1233,9 @@ const et = (s) => Symbol(s), te = (s, e) => {
1206
1233
  } = {
1207
1234
  selector: "body"
1208
1235
  }) => {
1209
- const n = y.toSignal(e).deriveProp(), i = new Ce(t, void 0), l = new O(i, void 0, { currentURL: n }, r);
1236
+ const n = y.toSignal(e).deriveProp(), i = new xe(t, void 0), l = new H(i, void 0, { currentURL: n }, r);
1210
1237
  return {
1211
- clear: te(s(), l),
1238
+ clear: ne(s(), l),
1212
1239
  root: i,
1213
1240
  currentURL: n
1214
1241
  };
@@ -1218,7 +1245,7 @@ class tt extends Error {
1218
1245
  super(e);
1219
1246
  }
1220
1247
  }
1221
- const _e = "data-tts-node", F = "data-tts-class", B = "data-tts-style", W = "data-tts-html", U = "data-tts-text", J = "data-tts-attrs";
1248
+ const _e = "data-tts-node", W = "data-tts-class", U = "data-tts-style", J = "data-tts-html", G = "data-tts-text", X = "data-tts-attrs";
1222
1249
  class Gt {
1223
1250
  constructor({
1224
1251
  select: e,
@@ -1231,7 +1258,7 @@ class Gt {
1231
1258
  appendHTML: u,
1232
1259
  getInnerHTML: a,
1233
1260
  setInnerHTML: h,
1234
- getInnerText: g,
1261
+ getInnerText: m,
1235
1262
  setInnerText: T
1236
1263
  }) {
1237
1264
  /**
@@ -1326,21 +1353,21 @@ class Gt {
1326
1353
  if (n.hasChildren() && this.appendHTML(l, n.contentToHTML(t)), n.hasInnerHTML()) {
1327
1354
  if (t) {
1328
1355
  const c = this.getInnerHTML(l);
1329
- c != null && this.setAttribute(l, W, c);
1356
+ c != null && this.setAttribute(l, J, c);
1330
1357
  }
1331
1358
  this.setInnerHTML(l, n.getInnerHTML());
1332
1359
  }
1333
1360
  if (n.hasInnerText()) {
1334
1361
  if (t) {
1335
1362
  const c = this.getInnerText(l);
1336
- c != null && this.setAttribute(l, U, c);
1363
+ c != null && this.setAttribute(l, G, c);
1337
1364
  }
1338
1365
  this.setInnerText(l, n.getInnerText());
1339
1366
  }
1340
1367
  if (n.hasClasses()) {
1341
1368
  if (t) {
1342
1369
  const c = this.getClass(l);
1343
- c != null && this.setAttribute(l, F, c);
1370
+ c != null && this.setAttribute(l, W, c);
1344
1371
  }
1345
1372
  this.setClass(l, n.getClasses().join(" "));
1346
1373
  }
@@ -1349,7 +1376,7 @@ class Gt {
1349
1376
  const c = this.getStyles(l);
1350
1377
  Object.keys(c).length > 0 && this.setAttribute(
1351
1378
  l,
1352
- B,
1379
+ U,
1353
1380
  JSON.stringify(c)
1354
1381
  );
1355
1382
  }
@@ -1364,7 +1391,7 @@ class Gt {
1364
1391
  h != null && u.push([a, h]);
1365
1392
  }), u.length > 0 && this.setAttribute(
1366
1393
  l,
1367
- J,
1394
+ X,
1368
1395
  JSON.stringify(Object.fromEntries(u))
1369
1396
  );
1370
1397
  }
@@ -1375,52 +1402,52 @@ class Gt {
1375
1402
  }
1376
1403
  });
1377
1404
  });
1378
- this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML = u, this.getInnerHTML = a, this.setInnerHTML = h, this.getInnerText = g, this.setInnerText = T;
1405
+ this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML = u, this.getInnerHTML = a, this.setInnerHTML = h, this.getInnerText = m, this.setInnerText = T;
1379
1406
  }
1380
1407
  }
1381
1408
  const st = () => {
1382
- document.querySelectorAll(`[${_e}]`).forEach(q);
1409
+ document.querySelectorAll(`[${_e}]`).forEach(B);
1383
1410
  }, rt = (s) => {
1384
- const e = s.getAttribute(F);
1385
- s.removeAttribute(F), e != null && s.setAttribute("class", e);
1411
+ const e = s.getAttribute(W);
1412
+ s.removeAttribute(W), e != null && s.setAttribute("class", e);
1386
1413
  }, nt = () => {
1387
- document.querySelectorAll(`[${F}]`).forEach((e) => rt(e));
1414
+ document.querySelectorAll(`[${W}]`).forEach((e) => rt(e));
1388
1415
  }, it = (s) => {
1389
- const e = s.getAttribute(W);
1390
- s.removeAttribute(W), e != null && (s.innerHTML = e);
1416
+ const e = s.getAttribute(J);
1417
+ s.removeAttribute(J), e != null && (s.innerHTML = e);
1391
1418
  }, ot = () => {
1392
- document.querySelectorAll(`[${W}]`).forEach((e) => it(e));
1419
+ document.querySelectorAll(`[${J}]`).forEach((e) => it(e));
1393
1420
  }, lt = (s) => {
1394
- const e = s.getAttribute(U);
1395
- s.removeAttribute(U), e != null && (s.innerText = e);
1421
+ const e = s.getAttribute(G);
1422
+ s.removeAttribute(G), e != null && (s.innerText = e);
1396
1423
  }, ct = () => {
1397
- document.querySelectorAll(`[${U}]`).forEach((e) => lt(e));
1424
+ document.querySelectorAll(`[${G}]`).forEach((e) => lt(e));
1398
1425
  }, Ee = (s) => JSON.parse(s.replace(/&quot;/g, '"')), ut = (s) => {
1399
- const e = s.getAttribute(B);
1400
- if (s.removeAttribute(B), e != null) {
1426
+ const e = s.getAttribute(U);
1427
+ if (s.removeAttribute(U), e != null) {
1401
1428
  const t = Ee(e);
1402
1429
  Object.entries(t).forEach(([r, n]) => {
1403
1430
  s.style.setProperty(r, n);
1404
1431
  });
1405
1432
  }
1406
1433
  }, at = () => {
1407
- document.querySelectorAll(`[${B}]`).forEach((e) => ut(e));
1434
+ document.querySelectorAll(`[${U}]`).forEach((e) => ut(e));
1408
1435
  }, ht = (s) => {
1409
- const e = s.getAttribute(J);
1410
- if (s.removeAttribute(J), e != null) {
1436
+ const e = s.getAttribute(X);
1437
+ if (s.removeAttribute(X), e != null) {
1411
1438
  const t = Ee(e);
1412
1439
  Object.entries(t).forEach(([r, n]) => {
1413
1440
  n == null ? s.removeAttribute(r) : s.setAttribute(r, n);
1414
1441
  });
1415
1442
  }
1416
1443
  }, ft = () => {
1417
- document.querySelectorAll(`[${J}]`).forEach((e) => ht(e));
1444
+ document.querySelectorAll(`[${X}]`).forEach((e) => ht(e));
1418
1445
  }, Xt = () => {
1419
1446
  st(), nt(), ct(), ot(), at(), ft();
1420
- }, S = Symbol("class"), v = Symbol("style"), P = Symbol("handler"), ve = () => Math.random().toString(36).substring(2, 15), dt = (s) => s.replace(/<[^>]*>?/g, "");
1447
+ }, _ = Symbol("class"), w = Symbol("style"), D = Symbol("handler"), Ce = () => Math.random().toString(36).substring(2, 15), dt = (s) => s.replace(/<[^>]*>?/g, "");
1421
1448
  class we {
1422
1449
  constructor(e) {
1423
- o(this, "id", ve());
1450
+ o(this, "id", Ce());
1424
1451
  o(this, "properties", {});
1425
1452
  o(this, "children", []);
1426
1453
  o(this, "isElement", () => !0);
@@ -1446,10 +1473,10 @@ class we {
1446
1473
  o(this, "getInnerText", () => this.properties.innerText ?? "");
1447
1474
  o(this, "hasInnerText", () => this.properties.innerText != null);
1448
1475
  o(this, "hasChildren", () => this.children.length > 0);
1449
- o(this, "hasClasses", () => this.properties[S] != null);
1450
- o(this, "hasStyles", () => this.properties[v] != null);
1476
+ o(this, "hasClasses", () => this.properties[_] != null);
1477
+ o(this, "hasStyles", () => this.properties[w] != null);
1451
1478
  o(this, "hasAttributes", () => Object.keys(this.properties).length > 0);
1452
- o(this, "hasHandlers", () => this.properties[P] != null);
1479
+ o(this, "hasHandlers", () => this.properties[D] != null);
1453
1480
  o(this, "hasRenderableProperties", () => this.hasClasses() || this.hasAttributes() || this.hasStyles());
1454
1481
  o(this, "getById", (e) => {
1455
1482
  if (this.properties.id === e)
@@ -1461,20 +1488,20 @@ class we {
1461
1488
  }
1462
1489
  });
1463
1490
  o(this, "trigger", (e, t) => {
1464
- ((this.properties[P] ?? {})[e] ?? []).forEach((n) => n(t));
1491
+ ((this.properties[D] ?? {})[e] ?? []).forEach((n) => n(t));
1465
1492
  });
1466
1493
  o(this, "click", () => {
1467
1494
  this.trigger("click", {});
1468
1495
  });
1469
1496
  o(this, "on", (e, t, r, n) => {
1470
1497
  var u;
1471
- const i = (u = this.properties)[P] ?? (u[P] = {}), l = n != null && n.once ? (a) => {
1498
+ const i = (u = this.properties)[D] ?? (u[D] = {}), l = n != null && n.once ? (a) => {
1472
1499
  c(), t(a, r);
1473
1500
  } : (a) => t(a, r);
1474
1501
  i[e] = [...i[e] ?? [], l];
1475
1502
  const c = () => {
1476
1503
  const a = i[e] ?? [], h = a.indexOf(l);
1477
- h !== -1 && (a.splice(h, 1), a.length === 0 ? (delete i[e], Object.keys(i).length === 0 && delete this.properties[P]) : i[e] = a, (n == null ? void 0 : n.signal) != null && n.signal.removeEventListener("abort", c));
1504
+ h !== -1 && (a.splice(h, 1), a.length === 0 ? (delete i[e], Object.keys(i).length === 0 && delete this.properties[D]) : i[e] = a, (n == null ? void 0 : n.signal) != null && n.signal.removeEventListener("abort", c));
1478
1505
  };
1479
1506
  return (n == null ? void 0 : n.signal) != null && n.signal.addEventListener("abort", c), c;
1480
1507
  });
@@ -1482,7 +1509,7 @@ class we {
1482
1509
  var r;
1483
1510
  if (e.length === 0)
1484
1511
  return;
1485
- const t = (r = this.properties)[S] ?? (r[S] = []);
1512
+ const t = (r = this.properties)[_] ?? (r[_] = []);
1486
1513
  e.forEach((n) => {
1487
1514
  t.includes(n) || t.push(n);
1488
1515
  });
@@ -1491,29 +1518,29 @@ class we {
1491
1518
  var r;
1492
1519
  if (e.length === 0)
1493
1520
  return;
1494
- const t = (r = this.properties)[S] ?? (r[S] = []);
1521
+ const t = (r = this.properties)[_] ?? (r[_] = []);
1495
1522
  e.forEach((n) => {
1496
1523
  const i = t.indexOf(n);
1497
1524
  i !== -1 && t.splice(i, 1);
1498
- }), t.length === 0 && delete this.properties[S];
1525
+ }), t.length === 0 && delete this.properties[_];
1499
1526
  });
1500
- o(this, "getClasses", () => this.properties[S] ?? []);
1527
+ o(this, "getClasses", () => this.properties[_] ?? []);
1501
1528
  o(this, "getAttributes", () => Object.entries(this.properties).filter(
1502
1529
  ([e]) => !["innerText", "innerHTML"].includes(e)
1503
1530
  ));
1504
1531
  o(this, "getVisibleAttributes", () => Reflect.ownKeys(this.properties).flatMap(
1505
- (e) => e === S ? [["class", this.getClasses()]] : e === v ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
1532
+ (e) => e === _ ? [["class", this.getClasses()]] : e === w ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
1506
1533
  ));
1507
1534
  o(this, "setStyle", (e, t) => {
1508
1535
  var n;
1509
- const r = (n = this.properties)[v] ?? (n[v] = {});
1510
- r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[v]);
1536
+ const r = (n = this.properties)[w] ?? (n[w] = {});
1537
+ r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[w]);
1511
1538
  });
1512
1539
  o(this, "getStyle", (e) => {
1513
1540
  var t;
1514
- return ((t = this.properties[v]) == null ? void 0 : t[e]) ?? "";
1541
+ return ((t = this.properties[w]) == null ? void 0 : t[e]) ?? "";
1515
1542
  });
1516
- o(this, "getStyles", () => this.properties[v] ?? {});
1543
+ o(this, "getStyles", () => this.properties[w] ?? {});
1517
1544
  o(this, "makeAccessors", (e) => {
1518
1545
  const t = this.properties;
1519
1546
  return {
@@ -1532,13 +1559,13 @@ class mt extends we {
1532
1559
  o(this, "toHTML", (t = !1) => {
1533
1560
  const r = this.children.map((u) => u.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
1534
1561
  let i = null;
1535
- const l = this.getVisibleAttributes().map(([u, a]) => u === "class" ? ` class="${a.join(" ")}"` : u === "style" ? typeof a == "string" ? ` style="${a}"` : ` style="${Object.entries(a).map(([h, g]) => `${h}: ${g};`).join(" ")}"` : Tt.has(u) ? ` ${u}` : u === "innerHTML" ? (i = a, "") : u === "innerText" ? (i = gt(a), "") : ` ${u}="${pt(a)}"`).join(""), c = t ? ` ${_e}` : "";
1562
+ const l = this.getVisibleAttributes().map(([u, a]) => u === "class" ? ` class="${a.join(" ")}"` : u === "style" ? typeof a == "string" ? ` style="${a}"` : ` style="${Object.entries(a).map(([h, m]) => `${h}: ${m};`).join(" ")}"` : Tt.has(u) ? ` ${u}` : u === "innerHTML" ? (i = a, "") : u === "innerText" ? (i = gt(a), "") : ` ${u}="${pt(a)}"`).join(""), c = t ? ` ${_e}` : "";
1536
1563
  return bt.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${i ?? r}</${this.tagName}>`;
1537
1564
  });
1538
1565
  this.tagName = t, this.namespace = r;
1539
1566
  }
1540
1567
  }
1541
- class Ce extends we {
1568
+ class xe extends we {
1542
1569
  constructor(t, r) {
1543
1570
  super(r);
1544
1571
  o(this, "isPortal", () => !0);
@@ -1549,7 +1576,7 @@ class Ce extends we {
1549
1576
  }
1550
1577
  class yt {
1551
1578
  constructor(e) {
1552
- o(this, "id", ve());
1579
+ o(this, "id", Ce());
1553
1580
  o(this, "isElement", () => !1);
1554
1581
  o(this, "isText", () => !0);
1555
1582
  o(this, "getText", () => this.text);
@@ -1557,7 +1584,7 @@ class yt {
1557
1584
  this.text = e;
1558
1585
  }
1559
1586
  }
1560
- class O {
1587
+ class H {
1561
1588
  constructor(e, t, r, n) {
1562
1589
  o(this, "appendOrInsert", (e) => {
1563
1590
  if (this.reference != null) {
@@ -1568,7 +1595,7 @@ class O {
1568
1595
  });
1569
1596
  o(this, "makeChildElement", (e, t) => {
1570
1597
  const r = new mt(e, t, this.element);
1571
- return this.appendOrInsert(r), new O(
1598
+ return this.appendOrInsert(r), new H(
1572
1599
  r,
1573
1600
  void 0,
1574
1601
  this.container,
@@ -1577,7 +1604,7 @@ class O {
1577
1604
  });
1578
1605
  o(this, "makeChildText", (e) => {
1579
1606
  const t = new yt(e);
1580
- return this.appendOrInsert(t), new O(
1607
+ return this.appendOrInsert(t), new H(
1581
1608
  this.element,
1582
1609
  t,
1583
1610
  this.container,
@@ -1593,8 +1620,8 @@ class O {
1593
1620
  });
1594
1621
  o(this, "makeRef", () => this.makeChildText(""));
1595
1622
  o(this, "makePortal", (e) => {
1596
- const t = new Ce(e, this.element);
1597
- return this.appendOrInsert(t), new O(
1623
+ const t = new xe(e, this.element);
1624
+ return this.appendOrInsert(t), new H(
1598
1625
  t,
1599
1626
  void 0,
1600
1627
  this.container,
@@ -1608,13 +1635,13 @@ class O {
1608
1635
  * @param value - The provider to set for the given mark.
1609
1636
  * @returns A new `DOMContext` instance with the specified provider.
1610
1637
  */
1611
- o(this, "setProvider", (e, t, r) => new O(this.element, this.reference, this.container, {
1638
+ o(this, "setProvider", (e, t, r) => new H(this.element, this.reference, this.container, {
1612
1639
  ...this.providers,
1613
1640
  [e]: [t, r]
1614
1641
  }));
1615
1642
  o(this, "getProvider", (e) => {
1616
1643
  if (this.providers[e] === void 0)
1617
- throw new Ae(e);
1644
+ throw new ve(e);
1618
1645
  const [t, r] = this.providers[e];
1619
1646
  return { value: t, onUse: r };
1620
1647
  });
@@ -1642,17 +1669,17 @@ const Tt = /* @__PURE__ */ new Set([
1642
1669
  "readonly",
1643
1670
  "required",
1644
1671
  "selected"
1645
- ]), bt = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), xe = (s) => (e) => e.makeChildText(s).clear, Pe = (s) => (e) => {
1672
+ ]), bt = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Pe = (s) => (e) => e.makeChildText(s).clear, Le = (s) => (e) => {
1646
1673
  const t = e.makeChildText(s.value), r = s.on(t.setText);
1647
1674
  return (n) => {
1648
1675
  r(), t.clear(n);
1649
1676
  };
1650
- }, Yt = (s) => d.is(s) ? Pe(s) : xe(s), b = (...s) => (e) => {
1677
+ }, Yt = (s) => g.is(s) ? Le(s) : Pe(s), v = (...s) => (e) => {
1651
1678
  const t = s.map((r) => f(r)(e));
1652
1679
  return (r) => {
1653
1680
  t.forEach((n) => n(r));
1654
1681
  };
1655
- }, E = () => () => {
1682
+ }, C = () => () => {
1656
1683
  }, St = (s) => (e) => (e.addClasses(s), (t) => {
1657
1684
  t && e.removeClasses(s);
1658
1685
  }), At = (s) => (e) => {
@@ -1663,17 +1690,17 @@ const Tt = /* @__PURE__ */ new Set([
1663
1690
  return (n) => {
1664
1691
  r(), n && e.removeClasses(t), t.length = 0;
1665
1692
  };
1666
- }, N = (s, e) => (t) => {
1693
+ }, R = (s, e) => (t) => {
1667
1694
  const { get: r, set: n } = t.makeAccessors(s), i = r();
1668
1695
  return n(e), (l) => {
1669
1696
  l && n(i);
1670
1697
  };
1671
- }, $ = (s, e) => (t) => {
1698
+ }, j = (s, e) => (t) => {
1672
1699
  const { get: r, set: n } = t.makeAccessors(s), i = r(), l = e.on(n);
1673
1700
  return (c) => {
1674
1701
  l(), c && n(i);
1675
1702
  };
1676
- }, M = new Proxy(
1703
+ }, $ = new Proxy(
1677
1704
  {},
1678
1705
  {
1679
1706
  /**
@@ -1687,13 +1714,13 @@ const Tt = /* @__PURE__ */ new Set([
1687
1714
  * @returns The renderable component for the specified attribute.
1688
1715
  *
1689
1716
  */
1690
- get: (s, e) => e === "class" ? (t) => d.is(t) ? At(t) : St(
1717
+ get: (s, e) => e === "class" ? (t) => g.is(t) ? At(t) : St(
1691
1718
  /* c8 ignore next */
1692
1719
  (t ?? "").split(" ").filter((r) => r.length > 0)
1693
- ) : (t) => d.is(t) ? $(
1720
+ ) : (t) => g.is(t) ? j(
1694
1721
  e,
1695
1722
  t
1696
- ) : N(
1723
+ ) : R(
1697
1724
  e,
1698
1725
  t
1699
1726
  )
@@ -1709,10 +1736,10 @@ const Tt = /* @__PURE__ */ new Set([
1709
1736
  * @returns The renderable component for the specified attribute.
1710
1737
  *
1711
1738
  */
1712
- get: (s, e) => (t) => d.is(t) ? $(
1739
+ get: (s, e) => (t) => g.is(t) ? j(
1713
1740
  `data-${e}`,
1714
1741
  t
1715
- ) : N(`data-${e}`, t)
1742
+ ) : R(`data-${e}`, t)
1716
1743
  }
1717
1744
  ), Zt = new Proxy(
1718
1745
  {},
@@ -1725,10 +1752,10 @@ const Tt = /* @__PURE__ */ new Set([
1725
1752
  * @returns The renderable component for the specified attribute.
1726
1753
  *
1727
1754
  */
1728
- get: (s, e) => (t) => d.is(t) ? $(
1755
+ get: (s, e) => (t) => g.is(t) ? j(
1729
1756
  `aria-${e}`,
1730
1757
  t
1731
- ) : N(
1758
+ ) : R(
1732
1759
  `aria-${e}`,
1733
1760
  t
1734
1761
  )
@@ -1744,10 +1771,10 @@ const Tt = /* @__PURE__ */ new Set([
1744
1771
  * @returns The renderable component for the specified attribute.
1745
1772
  *
1746
1773
  */
1747
- get: (s, e) => (t) => d.is(t) ? $(
1774
+ get: (s, e) => (t) => g.is(t) ? j(
1748
1775
  e,
1749
1776
  t
1750
- ) : N(
1777
+ ) : R(
1751
1778
  e,
1752
1779
  t
1753
1780
  )
@@ -1762,32 +1789,32 @@ const Tt = /* @__PURE__ */ new Set([
1762
1789
  * @returns The renderable component for the specified attribute.
1763
1790
  *
1764
1791
  */
1765
- get: (s, e) => (t) => d.is(t) ? $(
1792
+ get: (s, e) => (t) => g.is(t) ? j(
1766
1793
  e,
1767
1794
  t
1768
- ) : N(
1795
+ ) : R(
1769
1796
  e,
1770
1797
  t
1771
1798
  )
1772
1799
  }
1773
1800
  ), f = (s) => {
1774
1801
  if (s == null)
1775
- return E;
1802
+ return C;
1776
1803
  if (Array.isArray(s))
1777
- return b(...s.map(f));
1804
+ return v(...s.map(f));
1778
1805
  if (typeof s == "string")
1779
- return xe(s);
1780
- if (d.is(s))
1781
1806
  return Pe(s);
1807
+ if (g.is(s))
1808
+ return Le(s);
1782
1809
  if (typeof s == "function")
1783
1810
  return s;
1784
1811
  throw new Error(`Unknown type: '${typeof s}' for child: ${s}`);
1785
- }, Le = (s, ...e) => (t) => {
1812
+ }, De = (s, ...e) => (t) => {
1786
1813
  const r = t.makeChildElement(s, void 0), n = e.map((i) => f(i)(r));
1787
1814
  return (i) => {
1788
1815
  n.forEach((l) => l(!1)), r.clear(i);
1789
1816
  };
1790
- }, De = (s, e, ...t) => (r) => {
1817
+ }, Me = (s, e, ...t) => (r) => {
1791
1818
  const n = r.makeChildElement(s, e), i = t.map((l) => f(l)(n));
1792
1819
  return (l) => {
1793
1820
  i.forEach((c) => c(!1)), n.clear(l);
@@ -1800,7 +1827,7 @@ const Tt = /* @__PURE__ */ new Set([
1800
1827
  * @param tagName - The HTML tag name.
1801
1828
  * @returns A renderable function that creates and appends the HTML element to the DOM.
1802
1829
  */
1803
- get: (s, e) => (...t) => Le(e, t.flatMap(f))
1830
+ get: (s, e) => (...t) => De(e, t.flatMap(f))
1804
1831
  }
1805
1832
  ), ts = new Proxy(
1806
1833
  {},
@@ -1810,9 +1837,9 @@ const Tt = /* @__PURE__ */ new Set([
1810
1837
  * @param type - The input type name.
1811
1838
  * @returns A renderable function that creates and appends the HTMLInput element to the DOM.
1812
1839
  */
1813
- get: (s, e) => (...t) => Le("input", M.type(e), ...t)
1840
+ get: (s, e) => (...t) => De("input", $.type(e), ...t)
1814
1841
  }
1815
- ), _t = "http://www.w3.org/2000/svg", ss = new Proxy(
1842
+ ), vt = "http://www.w3.org/2000/svg", ss = new Proxy(
1816
1843
  {},
1817
1844
  {
1818
1845
  /**
@@ -1820,9 +1847,9 @@ const Tt = /* @__PURE__ */ new Set([
1820
1847
  * @param tagName - The SVG tag name.
1821
1848
  * @returns A renderable function that creates and appends the SVG element to the DOM.
1822
1849
  */
1823
- get: (s, e) => (...t) => De(e, _t, t.flatMap(f))
1850
+ get: (s, e) => (...t) => Me(e, vt, t.flatMap(f))
1824
1851
  }
1825
- ), Et = "http://www.w3.org/1998/Math/MathML", rs = new Proxy(
1852
+ ), _t = "http://www.w3.org/1998/Math/MathML", rs = new Proxy(
1826
1853
  {},
1827
1854
  {
1828
1855
  /**
@@ -1830,12 +1857,12 @@ const Tt = /* @__PURE__ */ new Set([
1830
1857
  * @param tagName - The Math tag name.
1831
1858
  * @returns A renderable function that creates and appends the Math element to the DOM.
1832
1859
  */
1833
- get: (s, e) => (...t) => De(e, Et, t.flatMap(f))
1860
+ get: (s, e) => (...t) => Me(e, _t, t.flatMap(f))
1834
1861
  }
1835
1862
  ), Oe = (s, e) => {
1836
1863
  if (typeof e == "function")
1837
1864
  return Oe(s, { then: e });
1838
- const t = e.pending != null ? f(e.pending()) : E, r = e.then, n = e.error != null ? (i) => f(e.error(i)) : () => E;
1865
+ const t = e.pending != null ? f(e.pending()) : C, r = e.then, n = e.error != null ? (i) => f(e.error(i)) : () => C;
1839
1866
  return (i) => {
1840
1867
  let l = !0;
1841
1868
  const c = s(), u = i.makeRef();
@@ -1851,14 +1878,14 @@ const Tt = /* @__PURE__ */ new Set([
1851
1878
  l = !1, a(h), u.clear(h);
1852
1879
  };
1853
1880
  };
1854
- }, ns = (s, e) => Oe(() => s, e), Me = (s, e, t) => (r) => r.on(s, e, t), vt = (s) => Me("click", (e, t) => {
1881
+ }, ns = (s, e) => Oe(() => s, e), He = (s, e, t) => (r) => r.on(s, e, t), Et = (s) => He("click", (e, t) => {
1855
1882
  e.preventDefault();
1856
1883
  const r = e.target;
1857
1884
  setTimeout(() => {
1858
1885
  const n = r.ownerDocument != null ? r == null ? void 0 : r.checked : void 0;
1859
1886
  n != null && s(!n, t);
1860
1887
  }, 0);
1861
- }), Y = new Proxy(
1888
+ }), Z = new Proxy(
1862
1889
  {},
1863
1890
  {
1864
1891
  /**
@@ -1866,20 +1893,20 @@ const Tt = /* @__PURE__ */ new Set([
1866
1893
  * @param fn - The function to call when the event is triggered.
1867
1894
  * @returns A `Renderable` function that adds the event listener to the element.
1868
1895
  */
1869
- get: (s, e) => (t) => Me(e, t)
1896
+ get: (s, e) => (t) => He(e, t)
1870
1897
  }
1871
- ), wt = (s, e) => (t) => {
1898
+ ), Ct = (s, e) => (t) => {
1872
1899
  (e == null ? void 0 : e.preventDefault) === !0 && t.preventDefault(), (e == null ? void 0 : e.stopPropagation) === !0 && t.stopPropagation(), (e == null ? void 0 : e.stopImmediatePropagation) === !0 && t.stopImmediatePropagation(), s(t);
1873
- }, x = (s, e) => wt((t) => {
1900
+ }, L = (s, e) => Ct((t) => {
1874
1901
  const r = t.target;
1875
1902
  s(r, t);
1876
- }, e), Ct = (s, e) => x(
1903
+ }, e), wt = (s, e) => L(
1877
1904
  (t, r) => s(t.value, r),
1878
1905
  e
1879
- ), xt = (s, e) => x(
1906
+ ), xt = (s, e) => L(
1880
1907
  (t, r) => s(t.valueAsNumber, r),
1881
1908
  e
1882
- ), Pt = (s, e) => x((t, r) => {
1909
+ ), Pt = (s, e) => L((t, r) => {
1883
1910
  if (t.value === "")
1884
1911
  return;
1885
1912
  const n = t.value.split("-"), i = new Date(
@@ -1888,7 +1915,7 @@ const Tt = /* @__PURE__ */ new Set([
1888
1915
  Number(n[2].substring(0, 2))
1889
1916
  );
1890
1917
  s(i, r);
1891
- }, e), is = (s, e) => x((t, r) => {
1918
+ }, e), is = (s, e) => L((t, r) => {
1892
1919
  if (t.value === "") {
1893
1920
  s(null, r);
1894
1921
  return;
@@ -1899,7 +1926,7 @@ const Tt = /* @__PURE__ */ new Set([
1899
1926
  Number(n[2].substring(0, 2))
1900
1927
  );
1901
1928
  s(i, r);
1902
- }, e), Lt = (s, e) => x((t, r) => {
1929
+ }, e), Lt = (s, e) => L((t, r) => {
1903
1930
  if (t.value === "")
1904
1931
  return;
1905
1932
  const n = t.value.split("T"), i = n[0].split("-"), l = new Date(
@@ -1908,7 +1935,7 @@ const Tt = /* @__PURE__ */ new Set([
1908
1935
  Number(i[2])
1909
1936
  ), c = n[1].split(":");
1910
1937
  l.setHours(Number(c[0])), l.setMinutes(Number(c[1])), l.setSeconds(Number(c[2])), s(l, r);
1911
- }, e), os = (s, e) => x((t, r) => {
1938
+ }, e), os = (s, e) => L((t, r) => {
1912
1939
  if (t.value === "") {
1913
1940
  s(null, r);
1914
1941
  return;
@@ -1924,10 +1951,10 @@ const Tt = /* @__PURE__ */ new Set([
1924
1951
  Number(i[2])
1925
1952
  ), c = n[1].split(":");
1926
1953
  l.setHours(Number(c[0] ?? 0)), l.setMinutes(Number(c[1] ?? 0)), l.setSeconds(Number(c[2] ?? 0)), s(l, r);
1927
- }, e), ls = (s, e) => x((t, r) => {
1954
+ }, e), ls = (s, e) => L((t, r) => {
1928
1955
  s(t.checked, r);
1929
- }, e), cs = (s, e = "input") => b(M.valueAsDate(s), Y[e](Pt(s.set))), us = (s, e = "input") => b(M.valueAsDate(s), Y[e](Lt(s.set))), as = (s, e = "input") => b(M.valueAsNumber(s), Y[e](xt(s.set))), hs = (s, e = "input") => b(M.value(s), Y[e](Ct(s.set))), fs = (s) => b(M.checked(s), vt(s.set)), Q = (s, e) => {
1930
- if (d.is(s))
1956
+ }, e), cs = (s, e = "input") => v($.valueAsDate(s), Z[e](Pt(s.set))), us = (s, e = "input") => v($.valueAsDate(s), Z[e](Lt(s.set))), as = (s, e = "input") => v($.valueAsNumber(s), Z[e](xt(s.set))), hs = (s, e = "input") => v($.value(s), Z[e](wt(s.set))), fs = (s) => v($.checked(s), Et(s.set)), z = (s, e) => {
1957
+ if (g.is(s))
1931
1958
  return (r) => {
1932
1959
  const n = r.makeRef();
1933
1960
  let i, l;
@@ -1936,8 +1963,8 @@ const Tt = /* @__PURE__ */ new Set([
1936
1963
  const a = c.on((h) => {
1937
1964
  if (h !== u) {
1938
1965
  u = h, l == null || l.dispose(), i == null || i(!0), l = s.map((T) => T[h]);
1939
- const g = e[h](l);
1940
- i = f(g)(n);
1966
+ const m = e[h](l);
1967
+ i = f(m)(n);
1941
1968
  }
1942
1969
  });
1943
1970
  return (h) => {
@@ -1945,15 +1972,15 @@ const Tt = /* @__PURE__ */ new Set([
1945
1972
  };
1946
1973
  };
1947
1974
  const t = Object.keys(s)[0];
1948
- return f(e[t](X(s[t])));
1949
- }, He = (s, e, t) => Q(
1975
+ return f(e[t](Q(s[t])));
1976
+ }, $e = (s, e, t) => z(
1950
1977
  y.map(s, (r) => ({ [r[e]]: r })),
1951
1978
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1952
1979
  t
1953
- ), ds = (s, e) => He(s, "kind", e), ps = (s, e) => {
1980
+ ), ds = (s, e) => $e(s, "kind", e), ps = (s, e) => {
1954
1981
  const t = y.map(s, ([r, n]) => ({ [r]: n }));
1955
- return Q(t, e);
1956
- }, gs = (s, e) => He(s, "type", e), Dt = (s, e) => Q(
1982
+ return z(t, e);
1983
+ }, gs = (s, e) => $e(s, "type", e), Dt = (s, e) => z(
1957
1984
  y.map(s, (t) => ({ [t]: !0 })),
1958
1985
  e
1959
1986
  ), ms = (s, e = {}) => (t) => {
@@ -1967,16 +1994,16 @@ const Tt = /* @__PURE__ */ new Set([
1967
1994
  }
1968
1995
  );
1969
1996
  }, ys = (s) => (e) => (e.appendOrInsert(s), (t) => {
1970
- t && q(s);
1997
+ t && B(s);
1971
1998
  }), Ts = (s, e, t) => {
1972
- if (d.is(s)) {
1999
+ if (g.is(s)) {
1973
2000
  const r = s;
1974
2001
  return (n) => {
1975
2002
  const i = n.makeRef();
1976
2003
  let l = () => {
1977
2004
  }, c = !1, u = null;
1978
2005
  const a = r.on((h) => {
1979
- h == null ? (l(!0), l = f(t == null ? void 0 : t())(i), c = !1, u == null || u.dispose(), u = null) : c ? u.set(h) : (u = _(h), l(!0), l = f(e(u))(
2006
+ h == null ? (l(!0), l = f(t == null ? void 0 : t())(i), c = !1, u == null || u.dispose(), u = null) : c ? u.set(h) : (u = E(h), l(!0), l = f(e(u))(
1980
2007
  i
1981
2008
  ), c = !0);
1982
2009
  });
@@ -1988,51 +2015,51 @@ const Tt = /* @__PURE__ */ new Set([
1988
2015
  const r = s;
1989
2016
  if (r == null) {
1990
2017
  const n = t == null ? void 0 : t();
1991
- return n != null ? f(n) : E;
2018
+ return n != null ? f(n) : C;
1992
2019
  }
1993
- return f(e(X(r)));
2020
+ return f(e(Q(r)));
1994
2021
  }
1995
2022
  }, bs = (...s) => (e, t) => (r) => {
1996
2023
  const n = r.makeRef();
1997
2024
  if (s.some(
1998
- (p) => !d.is(p) && p == null
2025
+ (p) => !g.is(p) && p == null
1999
2026
  ))
2000
- return (t != null ? f(t == null ? void 0 : t()) : E)(
2027
+ return (t != null ? f(t == null ? void 0 : t()) : C)(
2001
2028
  n
2002
2029
  );
2003
2030
  const l = s.map(() => null), c = s.map(
2004
- (p) => d.is(p) ? p.value != null : p != null
2031
+ (p) => g.is(p) ? p.value != null : p != null
2005
2032
  );
2006
2033
  let u = null;
2007
- const a = _(c.every((p) => p)), h = (p, m) => {
2034
+ const a = E(c.every((p) => p)), h = (p, d) => {
2008
2035
  if (p.value != null) {
2009
- if (l[m] == null) {
2010
- const C = _(p.value);
2011
- l[m] = C;
2036
+ if (l[d] == null) {
2037
+ const A = E(p.value);
2038
+ l[d] = A;
2012
2039
  } else
2013
- l[m].value = p.value;
2014
- c[m] = !0;
2040
+ l[d].value = p.value;
2041
+ c[d] = !0;
2015
2042
  } else
2016
- c[m] = !1;
2043
+ c[d] = !1;
2017
2044
  };
2018
- let g = s.length - 1;
2019
- const T = s.map((p, m) => {
2020
- if (!d.is(p)) {
2021
- const C = _(p);
2022
- return l[m] = C, () => {
2045
+ let m = s.length - 1;
2046
+ const T = s.map((p, d) => {
2047
+ if (!g.is(p)) {
2048
+ const A = E(p);
2049
+ return l[d] = A, () => {
2023
2050
  };
2024
2051
  }
2025
2052
  return p.on(() => {
2026
- h(p, m), g === 0 ? a.value = c.every((C) => C) : g--;
2053
+ h(p, d), m === 0 ? a.value = c.every((A) => A) : m--;
2027
2054
  });
2028
2055
  });
2029
2056
  return a.on((p) => {
2030
- u == null || u(!0), u = null, p ? u = f(e(...l))(n) : u = f((t == null ? void 0 : t()) ?? E)(n);
2057
+ u == null || u(!0), u = null, p ? u = f(e(...l))(n) : u = f((t == null ? void 0 : t()) ?? C)(n);
2031
2058
  }), (p) => {
2032
- l.forEach((m) => m == null ? void 0 : m.dispose()), a.dispose(), T.forEach((m) => m()), u == null || u(p), n.clear(p);
2059
+ l.forEach((d) => d == null ? void 0 : d.dispose()), a.dispose(), T.forEach((d) => d()), u == null || u(p), n.clear(p);
2033
2060
  };
2034
- }, H = (...s) => (e) => (t) => s.forEach((r) => r(t, e)), ke = (s, e, t) => {
2035
- if (d.is(s)) {
2061
+ }, k = (...s) => (e) => (t) => s.forEach((r) => r(t, e)), Ne = (s, e, t) => {
2062
+ if (g.is(s)) {
2036
2063
  const r = s;
2037
2064
  return (n) => {
2038
2065
  const i = n.makeRef();
@@ -2048,32 +2075,32 @@ const Tt = /* @__PURE__ */ new Set([
2048
2075
  } else {
2049
2076
  if (s) {
2050
2077
  const n = e();
2051
- return n != null ? f(n) : E;
2078
+ return n != null ? f(n) : C;
2052
2079
  }
2053
2080
  return f(t == null ? void 0 : t());
2054
2081
  }
2055
- }, Ss = (s, e, t) => ke(
2082
+ }, Ss = (s, e, t) => Ne(
2056
2083
  y.map(s, (r) => !r),
2057
2084
  e,
2058
2085
  t
2059
- ), Ne = (s, e, t) => {
2086
+ ), ke = (s, e, t) => {
2060
2087
  if (t != null)
2061
- return Ne(s, (r) => {
2062
- const n = new z(
2088
+ return ke(s, (r) => {
2089
+ const n = new ee(
2063
2090
  r.index,
2064
2091
  r.total.map((i) => i - 1)
2065
2092
  );
2066
- return b(
2067
- H(n.dispose),
2093
+ return v(
2094
+ k(n.dispose),
2068
2095
  f(e(r)),
2069
- ke(
2096
+ Ne(
2070
2097
  r.isLast,
2071
- () => E,
2098
+ () => C,
2072
2099
  () => t(n)
2073
2100
  )
2074
2101
  );
2075
2102
  });
2076
- if (d.is(s))
2103
+ if (g.is(s))
2077
2104
  return (r) => {
2078
2105
  const n = s.derive(), i = r.makeRef(), l = [];
2079
2106
  return n.on((c) => {
@@ -2081,10 +2108,10 @@ const Tt = /* @__PURE__ */ new Set([
2081
2108
  for (const a of u)
2082
2109
  a(!0);
2083
2110
  for (let a = l.length; a < c; a++) {
2084
- const h = new z(a, n);
2111
+ const h = new ee(a, n);
2085
2112
  l.push(
2086
- b(
2087
- H(h.dispose),
2113
+ v(
2114
+ k(h.dispose),
2088
2115
  f(e(h))
2089
2116
  )(i)
2090
2117
  );
@@ -2097,12 +2124,12 @@ const Tt = /* @__PURE__ */ new Set([
2097
2124
  };
2098
2125
  };
2099
2126
  {
2100
- const r = X(s);
2101
- return b(
2127
+ const r = Q(s);
2128
+ return v(
2102
2129
  ...Array.from({ length: s }, (n, i) => i).map((n) => {
2103
- const i = new z(n, r);
2104
- return b(
2105
- H(i.dispose),
2130
+ const i = new ee(n, r);
2131
+ return v(
2132
+ k(i.dispose),
2106
2133
  f(e(i))
2107
2134
  );
2108
2135
  })
@@ -2110,19 +2137,19 @@ const Tt = /* @__PURE__ */ new Set([
2110
2137
  }
2111
2138
  }, As = (s, e, t) => {
2112
2139
  const r = y.map(s, (i) => i.length), n = y.toSignal(s);
2113
- return Ne(
2140
+ return ke(
2114
2141
  r,
2115
2142
  (i) => {
2116
2143
  const l = n.map((c) => c[i.index]);
2117
- return b(
2118
- H(l.dispose),
2144
+ return v(
2145
+ k(l.dispose),
2119
2146
  f(e(l, i))
2120
2147
  );
2121
2148
  },
2122
2149
  t
2123
2150
  );
2124
- }, _s = (s, e) => {
2125
- if (d.is(s)) {
2151
+ }, vs = (s, e) => {
2152
+ if (g.is(s)) {
2126
2153
  const t = s;
2127
2154
  return (r) => {
2128
2155
  r = r.makeRef();
@@ -2138,7 +2165,7 @@ const Tt = /* @__PURE__ */ new Set([
2138
2165
  };
2139
2166
  }
2140
2167
  return f(e(s));
2141
- }, Es = (s, e, t = () => E) => Q(
2168
+ }, _s = (s, e, t = () => C) => z(
2142
2169
  y.map(
2143
2170
  s,
2144
2171
  (r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
@@ -2147,40 +2174,40 @@ const Tt = /* @__PURE__ */ new Set([
2147
2174
  notEmpty: (r) => e(r),
2148
2175
  whenEmpty: () => t()
2149
2176
  }
2150
- ), vs = (s, e) => (t) => {
2151
- const r = t.makePortal(s), n = te(f(e), r);
2177
+ ), Es = (s, e) => (t) => {
2178
+ const r = t.makePortal(s), n = ne(f(e), r);
2152
2179
  return () => n(!0);
2153
- }, j = /* @__PURE__ */ new Map(), Ot = (s) => ({
2180
+ }, q = /* @__PURE__ */ new Map(), Mt = (s) => ({
2154
2181
  mark: et(`Probe(${s.description})`),
2155
2182
  create: ({ callback: e = () => {
2156
2183
  }, timeout: t = 10 } = {}) => {
2157
2184
  const r = (c) => {
2158
- clearTimeout(n), j.delete(s), e(c);
2185
+ clearTimeout(n), q.delete(s), e(c);
2159
2186
  };
2160
- if (j.has(s))
2187
+ if (q.has(s))
2161
2188
  throw new Error(`Probe already exists: ${s.description}`);
2162
2189
  const n = setTimeout(() => r("timeout"), t), i = { counter: 0, timeoutId: n };
2163
- return j.set(s, i), {
2190
+ return q.set(s, i), {
2164
2191
  value: () => {
2165
2192
  clearTimeout(n);
2166
- const c = j.get(s);
2193
+ const c = q.get(s);
2167
2194
  c != null && --c.counter === 0 && r("resolved");
2168
2195
  },
2169
2196
  dispose: () => r("disposed"),
2170
2197
  onUse: () => i.counter++
2171
2198
  };
2172
2199
  }
2173
- }), ws = Ot(Symbol("GlobalProbe")), ue = (s, e) => (t) => {
2200
+ }), Cs = Mt(Symbol("GlobalProbe")), he = (s, e) => (t) => {
2174
2201
  const r = t.getStyle(s);
2175
2202
  return t.setStyle(s, e), (n) => {
2176
2203
  n && t.setStyle(s, r);
2177
2204
  };
2178
- }, ae = (s, e) => (t) => {
2205
+ }, fe = (s, e) => (t) => {
2179
2206
  const r = t.getStyle(s), n = e.on((i) => t.setStyle(s, i));
2180
2207
  return (i) => {
2181
2208
  n(), i && t.setStyle(s, r);
2182
2209
  };
2183
- }, Cs = new Proxy({}, {
2210
+ }, ws = new Proxy({}, {
2184
2211
  /**
2185
2212
  * Creates a renderable component for the specified `style` property.
2186
2213
  *
@@ -2189,8 +2216,8 @@ const Tt = /* @__PURE__ */ new Set([
2189
2216
  * @returns The renderable component for the specified attribute.
2190
2217
  *
2191
2218
  */
2192
- get: (s, e) => e === "variable" ? (t, r) => d.is(r) ? ae(t, r) : ue(t, r) : (t) => d.is(t) ? ae(e, t) : ue(e, t)
2193
- }), Mt = (s) => (e) => {
2219
+ get: (s, e) => e === "variable" ? (t, r) => g.is(r) ? fe(t, r) : he(t, r) : (t) => g.is(t) ? fe(e, t) : he(e, t)
2220
+ }), Ot = (s) => (e) => {
2194
2221
  if (e.isBrowser()) {
2195
2222
  const t = s(e);
2196
2223
  if (t != null)
@@ -2202,7 +2229,7 @@ const Tt = /* @__PURE__ */ new Set([
2202
2229
  const t = s(e);
2203
2230
  return t == null ? () => {
2204
2231
  } : f(t)(e);
2205
- }, Ps = (s) => Mt((e) => s(e.element)), Ls = (s) => (e) => {
2232
+ }, Ps = (s) => Ot((e) => s(e.element)), Ls = (s) => (e) => {
2206
2233
  if (e.isHeadlessDOM()) {
2207
2234
  const t = s(e);
2208
2235
  if (t)
@@ -2210,7 +2237,7 @@ const Tt = /* @__PURE__ */ new Set([
2210
2237
  }
2211
2238
  return () => {
2212
2239
  };
2213
- }, se = (s) => (e) => {
2240
+ }, ie = (s) => (e) => {
2214
2241
  let t = e;
2215
2242
  function r() {
2216
2243
  return t;
@@ -2224,16 +2251,16 @@ const Tt = /* @__PURE__ */ new Set([
2224
2251
  return a == null || a(), u;
2225
2252
  },
2226
2253
  set: ({ mark: c, create: u }, a) => {
2227
- const { value: h, dispose: g, onUse: T } = u(a, r());
2228
- i.push(g), n(r().setProvider(c, h, T));
2254
+ const { value: h, dispose: m, onUse: T } = u(a, r());
2255
+ i.push(m), n(r().setProvider(c, h, T));
2229
2256
  }
2230
2257
  });
2231
2258
  return l == null ? () => {
2232
- } : b(
2259
+ } : v(
2233
2260
  f(l),
2234
- H(() => i.forEach((c) => c()))
2261
+ k(() => i.forEach((c) => c()))
2235
2262
  )(r());
2236
- }, Ds = (s, e, t) => se(({ set: r }) => (r(s, e), t())), Os = (s, e) => se(({ use: t }) => e(t(s))), Ms = (...s) => (e) => se(({ use: t }) => {
2263
+ }, Ds = (s, e, t) => ie(({ set: r }) => (r(s, e), t())), Ms = (s, e) => ie(({ use: t }) => e(t(s))), Os = (...s) => (e) => ie(({ use: t }) => {
2237
2264
  const r = s.map(t);
2238
2265
  return e(...r);
2239
2266
  });
@@ -2244,113 +2271,113 @@ export {
2244
2271
  us as BindDateTime,
2245
2272
  as as BindNumber,
2246
2273
  hs as BindText,
2247
- D as BrowserContext,
2248
- F as CLASS_PLACEHOLDER_ATTR,
2249
- L as Computed,
2274
+ O as BrowserContext,
2275
+ W as CLASS_PLACEHOLDER_ATTR,
2276
+ M as Computed,
2250
2277
  ms as Conjunction,
2251
2278
  ys as DOMNode,
2252
- Le as El,
2253
- De as ElNS,
2254
- z as ElementPosition,
2255
- E as Empty,
2279
+ De as El,
2280
+ Me as ElNS,
2281
+ ee as ElementPosition,
2282
+ C as Empty,
2256
2283
  Ts as Ensure,
2257
2284
  bs as EnsureAll,
2258
2285
  As as ForEach,
2259
- b as Fragment,
2260
- ws as GlobalProbe,
2286
+ v as Fragment,
2287
+ Cs as GlobalProbe,
2261
2288
  Gt as HeadlessAdapter,
2262
- O as HeadlessContext,
2289
+ H as HeadlessContext,
2263
2290
  mt as HeadlessElement,
2264
- Ce as HeadlessPortal,
2291
+ xe as HeadlessPortal,
2265
2292
  yt as HeadlessText,
2266
- _s as MapSignal,
2267
- de as MemoryStore,
2268
- Es as NotEmpty,
2269
- vt as OnChecked,
2270
- H as OnDispose,
2271
- Q as OneOf,
2272
- He as OneOfField,
2293
+ vs as MapSignal,
2294
+ pe as MemoryStore,
2295
+ _s as NotEmpty,
2296
+ Et as OnChecked,
2297
+ k as OnDispose,
2298
+ z as OneOf,
2299
+ $e as OneOfField,
2273
2300
  ds as OneOfKind,
2274
2301
  ps as OneOfTuple,
2275
2302
  gs as OneOfType,
2276
2303
  Dt as OneOfValue,
2277
- vs as Portal,
2278
- V as Prop,
2304
+ Es as Portal,
2305
+ F as Prop,
2279
2306
  Ds as Provide,
2280
- Ae as ProviderNotFoundError,
2307
+ ve as ProviderNotFoundError,
2281
2308
  tt as RenderingError,
2282
- Ne as Repeat,
2283
- d as Signal,
2309
+ ke as Repeat,
2310
+ g as Signal,
2284
2311
  Oe as Task,
2285
2312
  Yt as TextNode,
2286
2313
  Ss as Unless,
2287
- Os as Use,
2288
- Ms as UseMany,
2314
+ Ms as Use,
2315
+ Os as UseMany,
2289
2316
  y as Value,
2290
- ke as When,
2291
- Mt as WithBrowserCtx,
2317
+ Ne as When,
2318
+ Ot as WithBrowserCtx,
2292
2319
  xs as WithCtx,
2293
2320
  Ps as WithElement,
2294
2321
  Ls as WithHeadlessCtx,
2295
- se as WithProvider,
2322
+ ie as WithProvider,
2296
2323
  _e as _NODE_PLACEHOLDER_ATTR,
2297
2324
  Ke as _getSelfOrParentElement,
2298
- Se as _isElement,
2325
+ Ae as _isElement,
2299
2326
  ze as _makeGetter,
2300
2327
  Ze as _makeSetter,
2301
- q as _removeDOMNode,
2302
- Pe as _signalText,
2303
- xe as _staticText,
2328
+ B as _removeDOMNode,
2329
+ Le as _signalText,
2330
+ Pe as _staticText,
2304
2331
  Rt as animateSignal,
2305
2332
  Ye as animateSignals,
2306
2333
  Zt as aria,
2307
- M as attr,
2334
+ $ as attr,
2308
2335
  Bt as bind,
2309
2336
  Wt as coalesce,
2310
- K as computed,
2311
- ee as computedOf,
2337
+ te as computed,
2338
+ re as computedOf,
2312
2339
  Qe as computedRecord,
2313
2340
  Qt as dataAttr,
2314
2341
  Vt as delaySignal,
2315
2342
  Ue as effect,
2316
2343
  Nt as effectOf,
2317
- wt as emit,
2344
+ Ct as emit,
2318
2345
  ls as emitChecked,
2319
- x as emitTarget,
2320
- Ct as emitValue,
2346
+ L as emitTarget,
2347
+ wt as emitValue,
2321
2348
  Pt as emitValueAsDate,
2322
2349
  Lt as emitValueAsDateTime,
2323
2350
  is as emitValueAsNullableDate,
2324
2351
  os as emitValueAsNullableDateTime,
2325
2352
  xt as emitValueAsNumber,
2326
2353
  Fe as endInterpolate,
2327
- he as getWindow,
2354
+ se as getWindow,
2328
2355
  Be as guessInterpolate,
2329
2356
  es as html,
2330
2357
  ts as input,
2331
2358
  qe as interpolateDate,
2332
2359
  je as interpolateNumber,
2333
2360
  Ve as interpolateString,
2334
- kt as joinSignals,
2335
- $t as localStorageProp,
2336
- Ot as makeProbe,
2361
+ $t as joinSignals,
2362
+ kt as localStorageProp,
2363
+ Mt as makeProbe,
2337
2364
  et as makeProviderMark,
2338
2365
  rs as math,
2339
2366
  Kt as mathAttr,
2340
2367
  jt as merge,
2341
- Y as on,
2368
+ Z as on,
2342
2369
  qt as previousSignal,
2343
- _ as prop,
2370
+ E as prop,
2344
2371
  Ut as render,
2345
- te as renderWithContext,
2372
+ ne as renderWithContext,
2346
2373
  f as renderableOfTNode,
2347
2374
  Xt as restoreTempoPlaceholders,
2348
2375
  Jt as runHeadless,
2349
2376
  It as sessionStorageProp,
2350
- X as signal,
2377
+ Q as signal,
2351
2378
  Ft as slidingWindowSignal,
2352
- pe as storedProp,
2353
- Cs as style,
2379
+ ge as storedProp,
2380
+ ws as style,
2354
2381
  ss as svg,
2355
2382
  zt as svgAttr
2356
2383
  };