@tempots/dom 24.0.0-next.6 → 24.0.0-next.8

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,12 +1,12 @@
1
- var He = Object.defineProperty;
1
+ var Ie = Object.defineProperty;
2
2
  var te = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var ke = (t, e, s) => e in t ? He(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
5
+ var ke = (t, e, s) => e in t ? Ie(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
6
6
  var o = (t, e, s) => ke(t, typeof e != "symbol" ? e + "" : e, s), se = (t, e, s) => e.has(t) || te("Cannot " + s);
7
- var D = (t, e, s) => (se(t, e, "read from private field"), s ? s.call(t) : e.get(t)), re = (t, e, s) => e.has(t) ? te("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), Y = (t, e, s, r) => (se(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s);
8
- const Ie = (t, e, s) => t + (e - t) * s;
9
- const Ne = (t, e, s) => {
7
+ var L = (t, e, s) => (se(t, e, "read from private field"), s ? s.call(t) : e.get(t)), re = (t, e, s) => e.has(t) ? te("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), Y = (t, e, s, r) => (se(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s);
8
+ const Ne = (t, e, s) => t + (e - t) * s;
9
+ const Re = (t, e, s) => {
10
10
  const r = Math.max(t.length, e.length);
11
11
  let n = "";
12
12
  for (let i = 0; i < r; i++) {
@@ -16,9 +16,9 @@ const Ne = (t, e, s) => {
16
16
  isNaN(c) && (c = 97), n += String.fromCharCode(l + (c - l) * s);
17
17
  }
18
18
  return n;
19
- }, Re = (t, e, s) => new Date(t.getTime() + (e.getTime() - t.getTime()) * s), Ve = (t, e) => e, je = (t) => typeof t == "number" ? Ie : typeof t == "string" ? Ne : t instanceof Date ? Re : Ve;
19
+ }, je = (t, e, s) => new Date(t.getTime() + (e.getTime() - t.getTime()) * s), qe = (t, e) => e, Ve = (t) => typeof t == "number" ? Ne : typeof t == "string" ? Re : t instanceof Date ? je : qe;
20
20
  var w;
21
- class L {
21
+ class D {
22
22
  /**
23
23
  * Creates a new instance of `ElementPosition`.
24
24
  * @param index - The index of the element.
@@ -46,7 +46,7 @@ class L {
46
46
  o(this, "isOdd");
47
47
  re(this, w);
48
48
  o(this, "dispose", () => {
49
- D(this, w) != null && (D(this, w).dispose(), Y(this, w, void 0));
49
+ L(this, w) != null && (L(this, w).dispose(), Y(this, w, void 0));
50
50
  });
51
51
  this.index = e, this.total = s, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
52
52
  }
@@ -55,7 +55,7 @@ class L {
55
55
  * @returns `true` if the element is the last element, `false` otherwise.
56
56
  */
57
57
  get isLast() {
58
- return D(this, w) == null && Y(this, w, this.total.map((e) => this.counter === e)), D(this, w);
58
+ return L(this, w) == null && Y(this, w, this.total.map((e) => this.counter === e)), L(this, w);
59
59
  }
60
60
  }
61
61
  w = new WeakMap();
@@ -148,7 +148,7 @@ const M = class M {
148
148
  * @returns - A new Computed instance with the mapped value.
149
149
  */
150
150
  o(this, "map", (e, s = (r, n) => r === n) => {
151
- const r = new C(() => {
151
+ const r = new v(() => {
152
152
  try {
153
153
  return e(this.get());
154
154
  } catch (n) {
@@ -168,7 +168,7 @@ const M = class M {
168
168
  * @returns A new Signal that emits the values of the resulting Signal.
169
169
  */
170
170
  o(this, "flatMap", (e, s = (r, n) => r === n) => {
171
- const r = new C(() => {
171
+ const r = new v(() => {
172
172
  try {
173
173
  return e(this.get()).get();
174
174
  } catch (n) {
@@ -197,7 +197,7 @@ const M = class M {
197
197
  o(this, "_$");
198
198
  o(this, "filter", (e, s) => {
199
199
  let r = s ?? this.get();
200
- const n = new C(() => {
200
+ const n = new v(() => {
201
201
  try {
202
202
  const i = this.get();
203
203
  return r = e(i) ? i : r;
@@ -219,7 +219,7 @@ const M = class M {
219
219
  */
220
220
  o(this, "filterMap", (e, s, r = (n, i) => n === i) => {
221
221
  let n = s;
222
- const i = new C(() => {
222
+ const i = new v(() => {
223
223
  try {
224
224
  const l = this.get(), c = e(l);
225
225
  return n = c ?? n;
@@ -359,8 +359,8 @@ o(M, "is", (e) => (
359
359
  e != null && e.$__signal__ === !0
360
360
  ));
361
361
  let d = M;
362
- const qe = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
363
- class C extends d {
362
+ const Be = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
363
+ class v extends d {
364
364
  /**
365
365
  * Represents a Signal object.
366
366
  * @param _fn - The function that returns the value of the signal.
@@ -395,7 +395,7 @@ class C extends d {
395
395
  */
396
396
  o(this, "_scheduleNotify", () => {
397
397
  const s = ++this._scheduleCount;
398
- qe(() => {
398
+ Be(() => {
399
399
  this._scheduleCount !== s || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
400
400
  });
401
401
  });
@@ -504,11 +504,11 @@ o(W, "is", (s) => (
504
504
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
505
505
  s != null && s.$__prop__ === !0
506
506
  ));
507
- let I = W;
507
+ let k = W;
508
508
  const Q = (t, e, s = (r, n) => r === n) => {
509
- const r = new C(t, s);
509
+ const r = new v(t, s);
510
510
  return e.forEach((n) => n.setDerivative(r)), r;
511
- }, Be = (t, e) => Q(t, e).dispose, N = (t, e = (s, r) => s === r) => new I(t, e), J = (t, e = (s, r) => s === r) => new d(t, e), ie = () => typeof window < "u" ? window : void 0, p = {
511
+ }, Fe = (t, e) => Q(t, e).dispose, N = (t, e = (s, r) => s === r) => new k(t, e), J = (t, e = (s, r) => s === r) => new d(t, e), ie = () => typeof window < "u" ? window : void 0, p = {
512
512
  /**
513
513
  * Maps a value or a Signal to a new value.
514
514
  * If the value is a Signal, it returns a new Signal with the mapped value.
@@ -565,7 +565,7 @@ const Q = (t, e, s = (r, n) => r === n) => {
565
565
  dispose: (t) => {
566
566
  d.is(t) && t.dispose();
567
567
  }
568
- }, Ht = (...t) => (e, s) => {
568
+ }, It = (...t) => (e, s) => {
569
569
  const r = t.filter((n) => d.is(n));
570
570
  return Q(
571
571
  () => e(...t.map((n) => p.get(n))),
@@ -574,7 +574,7 @@ const Q = (t, e, s = (r, n) => r === n) => {
574
574
  );
575
575
  }, kt = (...t) => (e) => {
576
576
  const s = t.filter((r) => d.is(r));
577
- Be(() => e(...t.map(p.get)), s);
577
+ Fe(() => e(...t.map(p.get)), s);
578
578
  };
579
579
  class oe {
580
580
  constructor() {
@@ -604,20 +604,20 @@ const le = ({
604
604
  equals: i = (c, a) => c === a,
605
605
  onLoad: l = (c) => c
606
606
  }) => {
607
- const c = s.getItem(t), a = new I(
607
+ const c = s.getItem(t), a = new k(
608
608
  c != null ? l(n(c)) : typeof e == "function" ? e() : e,
609
609
  i
610
610
  );
611
611
  return a.on((u) => {
612
612
  s.setItem(t, r(u));
613
613
  }), a;
614
- }, It = (t) => {
614
+ }, Nt = (t) => {
615
615
  var e;
616
616
  return le({
617
617
  ...t,
618
618
  store: ((e = ie()) == null ? void 0 : e.localStorage) ?? new oe()
619
619
  });
620
- }, Nt = (t) => {
620
+ }, Rt = (t) => {
621
621
  var e;
622
622
  return le({
623
623
  ...t,
@@ -627,33 +627,33 @@ const le = ({
627
627
  function ne(t) {
628
628
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
629
629
  }
630
- const Fe = (t, e, s, r) => {
631
- const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((T) => T), l = (r == null ? void 0 : r.equals) ?? ((T, k) => T === k);
630
+ const Ue = (t, e, s, r) => {
631
+ const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((T) => T), l = (r == null ? void 0 : r.equals) ?? ((T, I) => T === I);
632
632
  let c = r == null ? void 0 : r.interpolate, a = t, u = e(), h = performance.now(), m = null, S = !0;
633
- const X = new C(e, l), b = N(t, l);
633
+ const X = new v(e, l), b = N(t, l);
634
634
  b.onDispose(() => {
635
635
  m !== null && cancelAnimationFrame(m);
636
636
  }), b.onDispose(X.dispose), s.forEach((T) => {
637
637
  T.setDerivative(X), T.onDispose(b.dispose);
638
638
  });
639
- const Me = (T) => {
639
+ const He = (T) => {
640
640
  u = T, h = performance.now(), a = b.value, S && (S = !1, m = ne(K));
641
641
  }, K = () => {
642
- const k = (performance.now() - h) / p.get(n), $e = i(k);
643
- c == null && (c = je(a));
642
+ const I = (performance.now() - h) / p.get(n), $e = i(I);
643
+ c == null && (c = Ve(a));
644
644
  let ee = c(a, u, $e);
645
- k >= 1 ? (S = !0, ee = u) : m = ne(K), b.set(ee);
645
+ I >= 1 ? (S = !0, ee = u) : m = ne(K), b.set(ee);
646
646
  };
647
- return X.on(Me), b;
648
- }, Rt = (t, e) => {
647
+ return X.on(He), b;
648
+ }, jt = (t, e) => {
649
649
  const { initialValue: s, ...r } = e ?? {};
650
- return Fe(
650
+ return Ue(
651
651
  s ?? t.get(),
652
652
  t.get,
653
653
  [t],
654
654
  r
655
655
  );
656
- }, Vt = (t, e) => {
656
+ }, qt = (t, e) => {
657
657
  const { signals: s, literals: r } = Object.entries(t).reduce(
658
658
  ({ signals: i, literals: l }, [c, a]) => (d.is(a) ? i.push([c, a]) : l[c] = a, { signals: i, literals: l }),
659
659
  { signals: [], literals: {} }
@@ -672,7 +672,7 @@ const Fe = (t, e, s, r) => {
672
672
  "outerHTML",
673
673
  "className",
674
674
  "classList"
675
- ]), Ue = (t, e) => ce.has(t) ? (s) => {
675
+ ]), We = (t, e) => ce.has(t) ? (s) => {
676
676
  s == null ? e[t] = null : e[t] = !!s;
677
677
  } : ae.has(t) ? (s) => {
678
678
  s == null ? e[t] = null : e[t] = Number(s);
@@ -682,10 +682,10 @@ const Fe = (t, e, s, r) => {
682
682
  s == null ? e[t] = null : e[t] = String(s);
683
683
  } : (s) => {
684
684
  s == null ? e.removeAttribute(t) : e.setAttribute(t, s);
685
- }, We = (t, e) => ce.has(t) ? () => !!e[t] : ae.has(t) ? () => Number(e[t]) : ue.has(t) ? () => e[t] : he.has(t) ? () => String(e[t]) : () => e.getAttribute(t), R = (t) => {
685
+ }, Je = (t, e) => ce.has(t) ? () => !!e[t] : ae.has(t) ? () => Number(e[t]) : ue.has(t) ? () => e[t] : he.has(t) ? () => String(e[t]) : () => e.getAttribute(t), R = (t) => {
686
686
  const e = t;
687
687
  e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
688
- }, Je = (t) => fe(t) ? t : t.parentElement, fe = (t) => t.nodeType === 1;
688
+ }, Ge = (t) => fe(t) ? t : t.parentElement, fe = (t) => t.nodeType === 1;
689
689
  class de extends Error {
690
690
  constructor(e) {
691
691
  super(`Provider not found: ${e.description}`);
@@ -871,8 +871,8 @@ class P {
871
871
  */
872
872
  o(this, "getStyle", (e) => this.element.style.getPropertyValue(e));
873
873
  o(this, "makeAccessors", (e) => ({
874
- get: We(e, this.element),
875
- set: Ue(e, this.element)
874
+ get: Je(e, this.element),
875
+ set: We(e, this.element)
876
876
  }));
877
877
  this.document = e, this.element = s, this.reference = r, this.providers = n;
878
878
  }
@@ -890,143 +890,169 @@ class P {
890
890
  const Z = (t, e) => {
891
891
  const s = t(e);
892
892
  return () => s(!0);
893
- }, jt = (t, e, { doc: s, clear: r } = {}) => {
893
+ }, Vt = (t, e, { doc: s, clear: r } = {}) => {
894
894
  const n = typeof e == "string" ? (s ?? document).querySelector(e) : e;
895
895
  if (n === null)
896
- throw new Ge(
896
+ throw new ze(
897
897
  `Cannot find element by selector for render: ${e}`
898
898
  );
899
899
  r !== !1 && (s ?? n.ownerDocument) != null && n.nodeType === 1 && (n.innerHTML = "");
900
- const i = Je(n), l = fe(n) ? void 0 : n, c = P.of(i, l);
900
+ const i = Ge(n), l = fe(n) ? void 0 : n, c = P.of(i, l);
901
901
  return Z(t, c);
902
- }, qt = (t, {
902
+ }, Bt = (t, {
903
903
  startUrl: e = "https://example.com",
904
904
  selector: s = ":root"
905
905
  } = {}) => {
906
- const r = p.toSignal(e).deriveProp(), n = new ye(s, void 0), i = new x(n, void 0, { currentURL: r }, {});
906
+ const r = p.toSignal(e).deriveProp(), n = new Te(s, void 0), i = new x(n, void 0, { currentURL: r }, {});
907
907
  return {
908
908
  clear: Z(t(), i),
909
909
  root: n,
910
910
  currentURL: r
911
911
  };
912
912
  };
913
- class Ge extends Error {
913
+ class ze extends Error {
914
914
  constructor(e) {
915
915
  super(e);
916
916
  }
917
917
  }
918
- const pe = "data-tts-node", V = "data-tts-class", j = "data-tts-style", q = "data-tts-html", B = "data-tts-text", F = "data-tts-attrs";
919
- class Bt {
920
- constructor(e, s, r, n, i, l, c, a, u, h, m, S) {
918
+ const pe = "data-tts-node", j = "data-tts-class", q = "data-tts-style", V = "data-tts-html", B = "data-tts-text", F = "data-tts-attrs";
919
+ class Ft {
920
+ constructor({
921
+ select: e,
922
+ getAttribute: s,
923
+ setAttribute: r,
924
+ getClass: n,
925
+ setClass: i,
926
+ getStyles: l,
927
+ setStyles: c,
928
+ appendHTML: a,
929
+ getInnerHTML: u,
930
+ setInnerHTML: h,
931
+ getInnerText: m,
932
+ setInnerText: S
933
+ }) {
934
+ o(this, "select");
935
+ o(this, "getAttribute");
936
+ o(this, "setAttribute");
937
+ o(this, "getClass");
938
+ o(this, "setClass");
939
+ o(this, "getStyles");
940
+ o(this, "setStyles");
941
+ o(this, "appendHTML");
942
+ o(this, "getInnerHTML");
943
+ o(this, "setInnerHTML");
944
+ o(this, "getInnerText");
945
+ o(this, "setInnerText");
921
946
  o(this, "setFromRoot", (e, s) => {
922
947
  e.getPortals().forEach((n) => {
923
- const i = this.select(n.selector)[0];
924
- if (i == null)
925
- throw new Error(
926
- `Cannot find element by selector for render: ${n.selector}`
927
- );
928
- if (n.hasChildren() && this.appendHTML(i, n.contentToHTML(s)), n.hasInnerHTML()) {
929
- if (s) {
930
- const l = this.getInnerHTML(i);
931
- l != null && this.setAttribute(i, q, l);
948
+ for (const i of this.select(n.selector)) {
949
+ if (i == null)
950
+ throw new Error(
951
+ `Cannot find element by selector for render: ${n.selector}`
952
+ );
953
+ if (n.hasChildren() && this.appendHTML(i, n.contentToHTML(s)), n.hasInnerHTML()) {
954
+ if (s) {
955
+ const l = this.getInnerHTML(i);
956
+ l != null && this.setAttribute(i, V, l);
957
+ }
958
+ this.setInnerHTML(i, n.getInnerHTML());
932
959
  }
933
- this.setInnerHTML(i, n.getInnerHTML());
934
- }
935
- if (n.hasInnerText()) {
936
- if (s) {
937
- const l = this.getInnerText(i);
938
- l != null && this.setAttribute(i, B, l);
960
+ if (n.hasInnerText()) {
961
+ if (s) {
962
+ const l = this.getInnerText(i);
963
+ l != null && this.setAttribute(i, B, l);
964
+ }
965
+ this.setInnerText(i, n.getInnerText());
939
966
  }
940
- this.setInnerText(i, n.getInnerText());
941
- }
942
- if (n.hasClasses()) {
943
- if (s) {
944
- const l = this.getClass(i);
945
- l != null && this.setAttribute(i, V, l);
967
+ if (n.hasClasses()) {
968
+ if (s) {
969
+ const l = this.getClass(i);
970
+ l != null && this.setAttribute(i, j, l);
971
+ }
972
+ this.setClass(i, n.getClasses().join(" "));
946
973
  }
947
- this.setClass(i, n.getClasses().join(" "));
948
- }
949
- if (n.hasStyles()) {
950
- if (s) {
951
- const l = this.getStyles(i);
952
- l != null && this.setAttribute(
953
- i,
954
- j,
955
- JSON.stringify(l)
956
- );
974
+ if (n.hasStyles()) {
975
+ if (s) {
976
+ const l = this.getStyles(i);
977
+ Object.keys(l).length > 0 && this.setAttribute(
978
+ i,
979
+ q,
980
+ JSON.stringify(l)
981
+ );
982
+ }
983
+ this.setStyles(i, n.getStyles());
957
984
  }
958
- this.setStyles(i, n.getStyles());
959
- }
960
- if (n.hasAttributes()) {
961
- const l = n.getAttributes();
962
- if (s) {
963
- const c = [];
964
- l.forEach(([a]) => {
965
- const u = this.getAttribute(i, a);
966
- u != null && c.push([a, u]);
967
- }), this.setAttribute(
968
- i,
969
- F,
970
- JSON.stringify(Object.fromEntries(c))
971
- );
985
+ if (n.hasAttributes()) {
986
+ const l = n.getAttributes();
987
+ if (s) {
988
+ const c = [];
989
+ l.forEach(([a]) => {
990
+ const u = this.getAttribute(i, a);
991
+ u != null && c.push([a, u]);
992
+ }), c.length > 0 && this.setAttribute(
993
+ i,
994
+ F,
995
+ JSON.stringify(Object.fromEntries(c))
996
+ );
997
+ }
998
+ l.forEach(([c, a]) => {
999
+ this.setAttribute(i, c, a);
1000
+ });
972
1001
  }
973
- l.forEach(([c, a]) => {
974
- this.setAttribute(i, c, a);
975
- });
976
1002
  }
977
1003
  });
978
1004
  });
979
1005
  this.select = e, this.getAttribute = s, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML = a, this.getInnerHTML = u, this.setInnerHTML = h, this.getInnerText = m, this.setInnerText = S;
980
1006
  }
981
1007
  }
982
- const ze = () => {
1008
+ const Xe = () => {
983
1009
  document.querySelectorAll(`[${pe}]`).forEach(R);
984
- }, Xe = (t) => {
1010
+ }, Ye = (t) => {
1011
+ const e = t.getAttribute(j);
1012
+ t.removeAttribute(j), e != null && t.setAttribute("class", e);
1013
+ }, Qe = () => {
1014
+ document.querySelectorAll(`[${j}]`).forEach((e) => Ye(e));
1015
+ }, Ze = (t) => {
985
1016
  const e = t.getAttribute(V);
986
- t.removeAttribute(V), e != null && t.setAttribute("class", e);
987
- }, Ye = () => {
988
- document.querySelectorAll(`[${V}]`).forEach((e) => Xe(e));
989
- }, Qe = (t) => {
990
- const e = t.getAttribute(q);
991
- t.removeAttribute(q), e != null && (t.innerHTML = e);
992
- }, Ze = () => {
993
- document.querySelectorAll(`[${q}]`).forEach((e) => Qe(e));
994
- }, Ke = (t) => {
1017
+ t.removeAttribute(V), e != null && (t.innerHTML = e);
1018
+ }, Ke = () => {
1019
+ document.querySelectorAll(`[${V}]`).forEach((e) => Ze(e));
1020
+ }, et = (t) => {
995
1021
  const e = t.getAttribute(B);
996
1022
  t.removeAttribute(B), e != null && (t.innerText = e);
997
- }, et = () => {
998
- document.querySelectorAll(`[${B}]`).forEach((e) => Ke(e));
999
- }, tt = (t) => {
1000
- const e = t.getAttribute(j);
1001
- if (t.removeAttribute(j), e != null) {
1002
- const s = JSON.parse(e);
1023
+ }, tt = () => {
1024
+ document.querySelectorAll(`[${B}]`).forEach((e) => et(e));
1025
+ }, ge = (t) => JSON.parse(t.replace(/&quot;/g, '"')), st = (t) => {
1026
+ const e = t.getAttribute(q);
1027
+ if (t.removeAttribute(q), e != null) {
1028
+ const s = ge(e);
1003
1029
  Object.entries(s).forEach(([r, n]) => {
1004
1030
  t.style.setProperty(r, n);
1005
1031
  });
1006
1032
  }
1007
- }, st = () => {
1008
- document.querySelectorAll(`[${j}]`).forEach((e) => tt(e));
1009
- }, rt = (t) => {
1033
+ }, rt = () => {
1034
+ document.querySelectorAll(`[${q}]`).forEach((e) => st(e));
1035
+ }, nt = (t) => {
1010
1036
  const e = t.getAttribute(F);
1011
1037
  if (t.removeAttribute(F), e != null) {
1012
- const s = JSON.parse(e);
1038
+ const s = ge(e);
1013
1039
  Object.entries(s).forEach(([r, n]) => {
1014
1040
  n == null ? t.removeAttribute(r) : t.setAttribute(r, n);
1015
1041
  });
1016
1042
  }
1017
- }, nt = () => {
1018
- document.querySelectorAll(`[${F}]`).forEach((e) => rt(e));
1019
- }, Ft = () => {
1020
- ze(), Ye(), et(), Ze(), st(), nt();
1021
- }, y = Symbol("class"), _ = Symbol("style"), E = Symbol("handler"), ge = () => Math.random().toString(36).substring(2, 15), it = (t) => t.replace(/<[^>]*>?/g, "");
1022
- class me {
1043
+ }, it = () => {
1044
+ document.querySelectorAll(`[${F}]`).forEach((e) => nt(e));
1045
+ }, Ut = () => {
1046
+ Xe(), Qe(), tt(), Ke(), rt(), it();
1047
+ }, y = Symbol("class"), _ = Symbol("style"), E = Symbol("handler"), me = () => Math.random().toString(36).substring(2, 15), ot = (t) => t.replace(/<[^>]*>?/g, "");
1048
+ class ye {
1023
1049
  constructor(e) {
1024
- o(this, "id", ge());
1050
+ o(this, "id", me());
1025
1051
  o(this, "properties", {});
1026
1052
  o(this, "children", []);
1027
1053
  o(this, "isElement", () => !0);
1028
1054
  o(this, "isText", () => !1);
1029
- o(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? it(this.properties.innerHTML) : this.children.map((e) => e.getText()).join(""));
1055
+ o(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? ot(this.properties.innerHTML) : this.children.map((e) => e.getText()).join(""));
1030
1056
  o(this, "removeChild", (e) => {
1031
1057
  const s = this.children.indexOf(e);
1032
1058
  s !== -1 && this.children.splice(s, 1);
@@ -1121,21 +1147,21 @@ class me {
1121
1147
  this.parent = e;
1122
1148
  }
1123
1149
  }
1124
- const ot = (t) => t.replace(/"/g, "&quot;"), lt = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1125
- class ct extends me {
1150
+ const lt = (t) => t.replace(/"/g, "&quot;"), ct = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1151
+ class at extends ye {
1126
1152
  constructor(s, r, n) {
1127
1153
  super(n);
1128
1154
  o(this, "isPortal", () => !1);
1129
1155
  o(this, "toHTML", (s = !1) => {
1130
1156
  const r = this.children.map((a) => a.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
1131
1157
  let i = null;
1132
- const l = this.getVisibleAttributes().map(([a, u]) => a === "class" ? ` class="${u.join(" ")}"` : a === "style" ? typeof u == "string" ? ` style="${u}"` : ` style="${Object.entries(u).map(([h, m]) => `${h}: ${m};`).join(" ")}"` : ut.has(a) ? ` ${a}` : a === "innerHTML" ? (i = u, "") : a === "innerText" ? (i = lt(u), "") : ` ${a}="${ot(u)}"`).join(""), c = s ? ` ${pe}` : "";
1133
- return ht.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${i ?? r}</${this.tagName}>`;
1158
+ const l = this.getVisibleAttributes().map(([a, u]) => a === "class" ? ` class="${u.join(" ")}"` : a === "style" ? typeof u == "string" ? ` style="${u}"` : ` style="${Object.entries(u).map(([h, m]) => `${h}: ${m};`).join(" ")}"` : ht.has(a) ? ` ${a}` : a === "innerHTML" ? (i = u, "") : a === "innerText" ? (i = ct(u), "") : ` ${a}="${lt(u)}"`).join(""), c = s ? ` ${pe}` : "";
1159
+ return ft.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${i ?? r}</${this.tagName}>`;
1134
1160
  });
1135
1161
  this.tagName = s, this.namespace = r;
1136
1162
  }
1137
1163
  }
1138
- class ye extends me {
1164
+ class Te extends ye {
1139
1165
  constructor(s, r) {
1140
1166
  super(r);
1141
1167
  o(this, "isPortal", () => !0);
@@ -1144,9 +1170,9 @@ class ye extends me {
1144
1170
  this.selector = s;
1145
1171
  }
1146
1172
  }
1147
- class at {
1173
+ class ut {
1148
1174
  constructor(e) {
1149
- o(this, "id", ge());
1175
+ o(this, "id", me());
1150
1176
  o(this, "isElement", () => !1);
1151
1177
  o(this, "isText", () => !0);
1152
1178
  o(this, "getText", () => this.text);
@@ -1164,7 +1190,7 @@ class x {
1164
1190
  this.element.children.push(e);
1165
1191
  });
1166
1192
  o(this, "makeChildElement", (e, s) => {
1167
- const r = new ct(e, s, this.element);
1193
+ const r = new at(e, s, this.element);
1168
1194
  return this.appendOrInsert(r), new x(
1169
1195
  r,
1170
1196
  void 0,
@@ -1173,7 +1199,7 @@ class x {
1173
1199
  );
1174
1200
  });
1175
1201
  o(this, "makeChildText", (e) => {
1176
- const s = new at(e);
1202
+ const s = new ut(e);
1177
1203
  return this.appendOrInsert(s), new x(
1178
1204
  this.element,
1179
1205
  s,
@@ -1190,7 +1216,7 @@ class x {
1190
1216
  });
1191
1217
  o(this, "makeRef", () => this.makeChildText(""));
1192
1218
  o(this, "makePortal", (e) => {
1193
- const s = new ye(e, this.element);
1219
+ const s = new Te(e, this.element);
1194
1220
  return this.appendOrInsert(s), new x(
1195
1221
  s,
1196
1222
  void 0,
@@ -1222,30 +1248,30 @@ class x {
1222
1248
  this.element = e, this.reference = s, this.container = r, this.providers = n;
1223
1249
  }
1224
1250
  }
1225
- const ut = /* @__PURE__ */ new Set([
1251
+ const ht = /* @__PURE__ */ new Set([
1226
1252
  "checked",
1227
1253
  "disabled",
1228
1254
  "multiple",
1229
1255
  "readonly",
1230
1256
  "required",
1231
1257
  "selected"
1232
- ]), ht = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Te = (t) => (e) => {
1258
+ ]), ft = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), we = (t) => (e) => {
1233
1259
  const s = e.makeChildText(t);
1234
1260
  return (r) => s.clear(r);
1235
- }, we = (t) => (e) => {
1261
+ }, _e = (t) => (e) => {
1236
1262
  const s = e.makeChildText(t.value), r = t.on((n) => s.setText(n));
1237
1263
  return (n) => {
1238
1264
  r(), s.clear(n);
1239
1265
  };
1240
- }, Ut = (t) => d.is(t) ? we(t) : Te(t), g = (...t) => (e) => {
1266
+ }, Wt = (t) => d.is(t) ? _e(t) : we(t), g = (...t) => (e) => {
1241
1267
  const s = t.map((r) => f(r)(e));
1242
1268
  return (r) => {
1243
1269
  s.forEach((n) => n(r));
1244
1270
  };
1245
1271
  }, A = () => () => {
1246
- }, ft = (t) => (e) => (e.addClasses(t), (s) => {
1272
+ }, dt = (t) => (e) => (e.addClasses(t), (s) => {
1247
1273
  s && e.removeClasses(t);
1248
- }), dt = (t) => (e) => {
1274
+ }), pt = (t) => (e) => {
1249
1275
  let s = [];
1250
1276
  const r = t.on((n) => {
1251
1277
  e.removeClasses(s), s = (n ?? "").split(" ").filter((i) => i.length > 0), e.addClasses(s);
@@ -1253,12 +1279,12 @@ const ut = /* @__PURE__ */ new Set([
1253
1279
  return (n) => {
1254
1280
  r(), n && e.removeClasses(s), s.length = 0;
1255
1281
  };
1256
- }, $ = (t, e) => (s) => {
1282
+ }, H = (t, e) => (s) => {
1257
1283
  const { get: r, set: n } = s.makeAccessors(t), i = r();
1258
1284
  return n(e), (l) => {
1259
1285
  l && n(i);
1260
1286
  };
1261
- }, H = (t, e) => (s) => {
1287
+ }, $ = (t, e) => (s) => {
1262
1288
  const { get: r, set: n } = s.makeAccessors(t), i = r(), l = e.on(n);
1263
1289
  return (c) => {
1264
1290
  l(), c && n(i);
@@ -1277,17 +1303,17 @@ const ut = /* @__PURE__ */ new Set([
1277
1303
  * @returns The renderable component for the specified attribute.
1278
1304
  *
1279
1305
  */
1280
- get: (t, e) => e === "class" ? (s) => d.is(s) ? dt(s) : ft(
1306
+ get: (t, e) => e === "class" ? (s) => d.is(s) ? pt(s) : dt(
1281
1307
  (s ?? "").split(" ").filter((r) => r.length > 0)
1282
- ) : (s) => d.is(s) ? H(
1308
+ ) : (s) => d.is(s) ? $(
1283
1309
  e,
1284
1310
  s
1285
- ) : $(
1311
+ ) : H(
1286
1312
  e,
1287
1313
  s
1288
1314
  )
1289
1315
  }
1290
- ), Wt = new Proxy(
1316
+ ), Jt = new Proxy(
1291
1317
  {},
1292
1318
  {
1293
1319
  /**
@@ -1298,12 +1324,12 @@ const ut = /* @__PURE__ */ new Set([
1298
1324
  * @returns The renderable component for the specified attribute.
1299
1325
  *
1300
1326
  */
1301
- get: (t, e) => (s) => d.is(s) ? H(
1327
+ get: (t, e) => (s) => d.is(s) ? $(
1302
1328
  `data-${e}`,
1303
1329
  s
1304
- ) : $(`data-${e}`, s)
1330
+ ) : H(`data-${e}`, s)
1305
1331
  }
1306
- ), Jt = new Proxy(
1332
+ ), Gt = new Proxy(
1307
1333
  {},
1308
1334
  {
1309
1335
  /**
@@ -1314,15 +1340,15 @@ const ut = /* @__PURE__ */ new Set([
1314
1340
  * @returns The renderable component for the specified attribute.
1315
1341
  *
1316
1342
  */
1317
- get: (t, e) => (s) => d.is(s) ? H(
1343
+ get: (t, e) => (s) => d.is(s) ? $(
1318
1344
  `aria-${e}`,
1319
1345
  s
1320
- ) : $(
1346
+ ) : H(
1321
1347
  `aria-${e}`,
1322
1348
  s
1323
1349
  )
1324
1350
  }
1325
- ), Gt = new Proxy(
1351
+ ), zt = new Proxy(
1326
1352
  {},
1327
1353
  {
1328
1354
  /**
@@ -1333,15 +1359,15 @@ const ut = /* @__PURE__ */ new Set([
1333
1359
  * @returns The renderable component for the specified attribute.
1334
1360
  *
1335
1361
  */
1336
- get: (t, e) => (s) => d.is(s) ? H(
1362
+ get: (t, e) => (s) => d.is(s) ? $(
1337
1363
  e,
1338
1364
  s
1339
- ) : $(
1365
+ ) : H(
1340
1366
  e,
1341
1367
  s
1342
1368
  )
1343
1369
  }
1344
- ), zt = new Proxy(
1370
+ ), Xt = new Proxy(
1345
1371
  {},
1346
1372
  {
1347
1373
  /**
@@ -1351,10 +1377,10 @@ const ut = /* @__PURE__ */ new Set([
1351
1377
  * @returns The renderable component for the specified attribute.
1352
1378
  *
1353
1379
  */
1354
- get: (t, e) => (s) => d.is(s) ? H(
1380
+ get: (t, e) => (s) => d.is(s) ? $(
1355
1381
  e,
1356
1382
  s
1357
- ) : $(
1383
+ ) : H(
1358
1384
  e,
1359
1385
  s
1360
1386
  )
@@ -1365,23 +1391,23 @@ const ut = /* @__PURE__ */ new Set([
1365
1391
  if (Array.isArray(t))
1366
1392
  return g(...t.map(f));
1367
1393
  if (typeof t == "string")
1368
- return Te(t);
1369
- if (d.is(t))
1370
1394
  return we(t);
1395
+ if (d.is(t))
1396
+ return _e(t);
1371
1397
  if (typeof t == "function")
1372
1398
  return t;
1373
1399
  throw new Error(`Unknown type: '${typeof t}' for child: ${t}`);
1374
- }, _e = (t, ...e) => (s) => {
1400
+ }, Ae = (t, ...e) => (s) => {
1375
1401
  const r = s.makeChildElement(t, void 0), n = e.map((i) => f(i)(r));
1376
1402
  return (i) => {
1377
1403
  n.forEach((l) => l(!1)), r.clear(i);
1378
1404
  };
1379
- }, Ae = (t, e, ...s) => (r) => {
1405
+ }, Se = (t, e, ...s) => (r) => {
1380
1406
  const n = r.makeChildElement(t, e), i = s.map((l) => f(l)(n));
1381
1407
  return (l) => {
1382
1408
  i.forEach((c) => c(!1)), n.clear(l);
1383
1409
  };
1384
- }, Xt = new Proxy(
1410
+ }, Yt = new Proxy(
1385
1411
  {},
1386
1412
  {
1387
1413
  /**
@@ -1389,9 +1415,9 @@ const ut = /* @__PURE__ */ new Set([
1389
1415
  * @param tagName - The HTML tag name.
1390
1416
  * @returns A renderable function that creates and appends the HTML element to the DOM.
1391
1417
  */
1392
- get: (t, e) => (...s) => _e(e, s.flatMap(f))
1418
+ get: (t, e) => (...s) => Ae(e, s.flatMap(f))
1393
1419
  }
1394
- ), Yt = new Proxy(
1420
+ ), Qt = new Proxy(
1395
1421
  {},
1396
1422
  {
1397
1423
  /**
@@ -1399,9 +1425,9 @@ const ut = /* @__PURE__ */ new Set([
1399
1425
  * @param type - The input type name.
1400
1426
  * @returns A renderable function that creates and appends the HTMLInput element to the DOM.
1401
1427
  */
1402
- get: (t, e) => (...s) => _e("input", O.type(e), ...s)
1428
+ get: (t, e) => (...s) => Ae("input", O.type(e), ...s)
1403
1429
  }
1404
- ), pt = "http://www.w3.org/2000/svg", Qt = new Proxy(
1430
+ ), gt = "http://www.w3.org/2000/svg", Zt = new Proxy(
1405
1431
  {},
1406
1432
  {
1407
1433
  /**
@@ -1409,9 +1435,9 @@ const ut = /* @__PURE__ */ new Set([
1409
1435
  * @param tagName - The SVG tag name.
1410
1436
  * @returns A renderable function that creates and appends the SVG element to the DOM.
1411
1437
  */
1412
- get: (t, e) => (...s) => Ae(e, pt, s.flatMap(f))
1438
+ get: (t, e) => (...s) => Se(e, gt, s.flatMap(f))
1413
1439
  }
1414
- ), gt = "http://www.w3.org/1998/Math/MathML", Zt = new Proxy(
1440
+ ), mt = "http://www.w3.org/1998/Math/MathML", Kt = new Proxy(
1415
1441
  {},
1416
1442
  {
1417
1443
  /**
@@ -1419,11 +1445,11 @@ const ut = /* @__PURE__ */ new Set([
1419
1445
  * @param tagName - The Math tag name.
1420
1446
  * @returns A renderable function that creates and appends the Math element to the DOM.
1421
1447
  */
1422
- get: (t, e) => (...s) => Ae(e, gt, s.flatMap(f))
1448
+ get: (t, e) => (...s) => Se(e, mt, s.flatMap(f))
1423
1449
  }
1424
- ), Se = (t, e) => {
1450
+ ), be = (t, e) => {
1425
1451
  if (typeof e == "function")
1426
- return Se(t, { then: e });
1452
+ return be(t, { then: e });
1427
1453
  const s = e.pending != null ? f(e.pending) : A, r = e.then, n = e.error != null ? (i) => f(e.error(i)) : () => A;
1428
1454
  return (i) => {
1429
1455
  let l = !0;
@@ -1440,7 +1466,7 @@ const ut = /* @__PURE__ */ new Set([
1440
1466
  l = !1, u(h), a.clear(h);
1441
1467
  };
1442
1468
  };
1443
- }, Kt = (t, e) => Se(() => t, e), be = (t, e) => (s) => s.on(t, e), mt = (t) => be("click", (e) => {
1469
+ }, es = (t, e) => be(() => t, e), Ee = (t, e) => (s) => s.on(t, e), yt = (t) => Ee("click", (e) => {
1444
1470
  e.preventDefault();
1445
1471
  const s = e.target;
1446
1472
  setTimeout(() => {
@@ -1455,15 +1481,15 @@ const ut = /* @__PURE__ */ new Set([
1455
1481
  * @param fn - The function to call when the event is triggered.
1456
1482
  * @returns A `Renderable` function that adds the event listener to the element.
1457
1483
  */
1458
- get: (t, e) => (s) => be(e, s)
1484
+ get: (t, e) => (s) => Ee(e, s)
1459
1485
  }
1460
- ), yt = (t) => (e) => {
1486
+ ), Tt = (t) => (e) => {
1461
1487
  const s = e.target;
1462
1488
  t(s.value);
1463
- }, Tt = (t) => (e) => {
1489
+ }, wt = (t) => (e) => {
1464
1490
  const s = e.target;
1465
1491
  t(s.valueAsNumber);
1466
- }, wt = (t) => (e) => {
1492
+ }, _t = (t) => (e) => {
1467
1493
  const s = e.target;
1468
1494
  if (s.value === "")
1469
1495
  return;
@@ -1473,7 +1499,7 @@ const ut = /* @__PURE__ */ new Set([
1473
1499
  Number(r[2].substring(0, 2))
1474
1500
  );
1475
1501
  t(n);
1476
- }, _t = (t) => (e) => {
1502
+ }, At = (t) => (e) => {
1477
1503
  const s = e.target;
1478
1504
  if (s.value === "")
1479
1505
  return;
@@ -1483,25 +1509,25 @@ const ut = /* @__PURE__ */ new Set([
1483
1509
  Number(n[2])
1484
1510
  ), l = r[1].split(":");
1485
1511
  i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), t(i);
1486
- }, es = (t) => (e) => {
1512
+ }, ts = (t) => (e) => {
1487
1513
  const s = e.target;
1488
1514
  t(s.checked);
1489
- }, ts = (t) => (e) => {
1490
- e.preventDefault(), t();
1491
1515
  }, ss = (t) => (e) => {
1492
- e.stopPropagation(), t();
1516
+ e.preventDefault(), t();
1493
1517
  }, rs = (t) => (e) => {
1518
+ e.stopPropagation(), t();
1519
+ }, ns = (t) => (e) => {
1494
1520
  e.stopImmediatePropagation(), t();
1495
- }, ns = (t, e = "input") => g(
1496
- O.valueAsDate(t),
1497
- G[e](wt(t.set))
1498
- ), is = (t, e = "input") => g(
1521
+ }, is = (t, e = "input") => g(
1499
1522
  O.valueAsDate(t),
1500
1523
  G[e](_t(t.set))
1501
1524
  ), os = (t, e = "input") => g(
1525
+ O.valueAsDate(t),
1526
+ G[e](At(t.set))
1527
+ ), ls = (t, e = "input") => g(
1502
1528
  O.valueAsNumber(t),
1503
- G[e](Tt(t.set))
1504
- ), ls = (t, e = "input") => g(O.value(t), G[e](yt(t.set))), cs = (t) => g(O.checked(t), mt(t.set)), z = (t, e) => {
1529
+ G[e](wt(t.set))
1530
+ ), cs = (t, e = "input") => g(O.value(t), G[e](Tt(t.set))), as = (t) => g(O.checked(t), yt(t.set)), z = (t, e) => {
1505
1531
  if (d.is(t))
1506
1532
  return (r) => {
1507
1533
  const n = r.makeRef();
@@ -1521,19 +1547,19 @@ const ut = /* @__PURE__ */ new Set([
1521
1547
  };
1522
1548
  const s = Object.keys(t)[0];
1523
1549
  return f(e[s](J(t[s])));
1524
- }, Ee = (t, e, s) => z(
1550
+ }, Ce = (t, e, s) => z(
1525
1551
  p.map(t, (r) => ({ [r[e]]: r })),
1526
1552
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1527
1553
  s
1528
- ), as = (t, e) => Ee(t, "kind", e), us = (t, e) => {
1554
+ ), us = (t, e) => Ce(t, "kind", e), hs = (t, e) => {
1529
1555
  const s = p.map(t, ([r, n]) => ({ [r]: n }));
1530
1556
  return z(s, e);
1531
- }, hs = (t, e) => Ee(t, "type", e), At = (t, e) => z(
1557
+ }, fs = (t, e) => Ce(t, "type", e), St = (t, e) => z(
1532
1558
  p.map(t, (s) => ({ [s]: !0 })),
1533
1559
  e
1534
- ), fs = (t, e = {}) => (s) => {
1560
+ ), ds = (t, e = {}) => (s) => {
1535
1561
  const r = (e == null ? void 0 : e.firstSeparator) ?? t, n = (e == null ? void 0 : e.lastSeparator) ?? t;
1536
- return At(
1562
+ return St(
1537
1563
  s.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
1538
1564
  {
1539
1565
  first: () => r,
@@ -1547,7 +1573,7 @@ const ut = /* @__PURE__ */ new Set([
1547
1573
  return n[i] = l, n;
1548
1574
  }, {});
1549
1575
  return f(e(r))(s);
1550
- }, ds = (t, e) => (s) => {
1576
+ }, ps = (t, e) => (s) => {
1551
1577
  const r = [], n = Object.entries(t).reduce(
1552
1578
  (i, [l, c]) => (r.push(
1553
1579
  c((a) => (Reflect.set(i, l, a), null))(s)
@@ -1557,10 +1583,10 @@ const ut = /* @__PURE__ */ new Set([
1557
1583
  return r.push(e(n)(s)), (i) => {
1558
1584
  r.forEach((l) => l(i));
1559
1585
  };
1560
- }, St = (t, e) => ve([t], (s) => f(e(s[t]))), ps = (t, e) => ve(t, (s) => f(e(s))), gs = (t) => (e) => t(e) ?? (() => {
1561
- }), ms = (t) => (e) => (e.appendOrInsert(t), (s) => {
1586
+ }, bt = (t, e) => ve([t], (s) => f(e(s[t]))), gs = (t, e) => ve(t, (s) => f(e(s))), ms = (t) => (e) => t(e) ?? (() => {
1587
+ }), ys = (t) => (e) => (e.appendOrInsert(t), (s) => {
1562
1588
  s && R(t);
1563
- }), bt = (t, e, s) => {
1589
+ }), Et = (t, e, s) => {
1564
1590
  if (d.is(t)) {
1565
1591
  const r = t;
1566
1592
  return (n) => {
@@ -1583,44 +1609,44 @@ const ut = /* @__PURE__ */ new Set([
1583
1609
  }
1584
1610
  return f(e(J(r)));
1585
1611
  }
1586
- }, U = (t) => (e) => (s) => t(s, e), Ce = (t, e, s) => Pe(
1612
+ }, U = (t) => (e) => (s) => t(s, e), Pe = (t, e, s) => xe(
1587
1613
  t,
1588
1614
  () => e,
1589
1615
  () => s
1590
- ), Pe = (t, e, s) => bt(
1616
+ ), xe = (t, e, s) => Et(
1591
1617
  p.map(t, (r) => r ? !0 : null),
1592
1618
  e,
1593
1619
  s ?? void 0
1594
- ), ys = (t, e, s) => Et(
1620
+ ), Ts = (t, e, s) => Ct(
1595
1621
  t,
1596
1622
  () => e,
1597
1623
  () => s
1598
- ), Et = (t, e, s) => Pe(
1624
+ ), Ct = (t, e, s) => xe(
1599
1625
  p.map(t, (r) => !r),
1600
1626
  e,
1601
1627
  s
1602
- ), xe = (t, e, s) => s != null ? xe(t, (r) => {
1603
- const n = new L(
1628
+ ), Oe = (t, e, s) => s != null ? Oe(t, (r) => {
1629
+ const n = new D(
1604
1630
  r.index,
1605
1631
  r.total.map((i) => i - 1)
1606
1632
  );
1607
1633
  return g(
1608
1634
  U(n.dispose),
1609
1635
  f(e(r)),
1610
- Ce(r.isLast, A, s(n))
1636
+ Pe(r.isLast, A, s(n))
1611
1637
  );
1612
1638
  }) : d.is(t) ? (r) => {
1613
1639
  const n = r.makeRef(), i = Array.from(
1614
1640
  { length: t.value },
1615
1641
  (a, u) => u
1616
- ).map((a) => new L(a, t)), l = i.map(
1642
+ ).map((a) => new D(a, t)), l = i.map(
1617
1643
  (a) => f(e(a))(n)
1618
1644
  ), c = t.on((a) => {
1619
1645
  for (; a < l.length; )
1620
1646
  i.pop().dispose(), l.pop()(!0);
1621
1647
  for (let u = 0; u < a; u++)
1622
1648
  if (i[u] == null) {
1623
- i[u] = new L(u, t);
1649
+ i[u] = new D(u, t);
1624
1650
  const h = f(e(i[u]));
1625
1651
  l[u] = h(n);
1626
1652
  }
@@ -1630,24 +1656,24 @@ const ut = /* @__PURE__ */ new Set([
1630
1656
  };
1631
1657
  } : g(
1632
1658
  ...Array.from({ length: t }, (r, n) => n).map(
1633
- (r) => f(e(new L(r, J(t))))
1659
+ (r) => f(e(new D(r, J(t))))
1634
1660
  )
1635
1661
  ), vt = (t, e, s) => {
1636
1662
  if (s != null)
1637
1663
  return vt(t, (r, n) => {
1638
- const i = new L(
1664
+ const i = new D(
1639
1665
  n.index,
1640
1666
  n.total.map((l) => l - 1)
1641
1667
  );
1642
1668
  return g([
1643
1669
  U(i.dispose),
1644
1670
  f(e(r, n)),
1645
- Ce(n.isLast, A, s(i))
1671
+ Pe(n.isLast, A, s(i))
1646
1672
  ]);
1647
1673
  });
1648
1674
  {
1649
1675
  const r = p.map(t, (i) => i.length), n = p.toSignal(t);
1650
- return xe(r, (i) => {
1676
+ return Oe(r, (i) => {
1651
1677
  const l = n.map((c) => c[i.index]);
1652
1678
  return g(
1653
1679
  U(l.dispose),
@@ -1655,12 +1681,12 @@ const ut = /* @__PURE__ */ new Set([
1655
1681
  );
1656
1682
  });
1657
1683
  }
1658
- }, Ct = (t) => (e) => e.isBrowserDOM() ? t(e) ?? (() => {
1684
+ }, Pt = (t) => (e) => e.isBrowserDOM() ? t(e) ?? (() => {
1659
1685
  }) : () => {
1660
- }, Ts = (t) => (e) => e.isHeadlessDOM() ? t(e) ?? (() => {
1686
+ }, ws = (t) => (e) => e.isHeadlessDOM() ? t(e) ?? (() => {
1661
1687
  }) : () => {
1662
- }, ws = (t) => Ct((e) => t(e.element) ?? (() => {
1663
- })), _s = (t, e) => {
1688
+ }, _s = (t) => Pt((e) => t(e.element) ?? (() => {
1689
+ })), As = (t, e) => {
1664
1690
  if (d.is(t)) {
1665
1691
  const s = t;
1666
1692
  return (r) => {
@@ -1677,7 +1703,7 @@ const ut = /* @__PURE__ */ new Set([
1677
1703
  };
1678
1704
  }
1679
1705
  return f(e(t));
1680
- }, As = (t, e, s = () => A) => z(
1706
+ }, Ss = (t, e, s = () => A) => z(
1681
1707
  p.map(
1682
1708
  t,
1683
1709
  (r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
@@ -1686,51 +1712,51 @@ const ut = /* @__PURE__ */ new Set([
1686
1712
  notEmpty: (r) => e(r),
1687
1713
  whenEmpty: () => s()
1688
1714
  }
1689
- ), Ss = (t, e) => (s) => {
1715
+ ), bs = (t, e) => (s) => {
1690
1716
  const r = s.makePortal(t);
1691
1717
  return Z(f(e), r);
1692
- }, Pt = (t) => Symbol(t), Oe = (t, e) => (s) => f(e)(s.withProviders(t)), bs = (...t) => t.length > 0 ? t.reduceRight((e, s) => (r) => e(s(r))) : f, xt = (t, e, s) => Oe({ [t]: e }, f(s)), Es = (t, e) => Oe(t, f(e)), De = Pt("Probe"), v = /* @__PURE__ */ new Map(), Ot = ({
1718
+ }, xt = (t) => Symbol(t), Le = (t, e) => (s) => f(e)(s.withProviders(t)), Es = (...t) => t.length > 0 ? t.reduceRight((e, s) => (r) => e(s(r))) : f, Ot = (t, e, s) => Le({ [t]: e }, f(s)), Cs = (t, e) => Le(t, f(e)), De = xt("Probe"), C = /* @__PURE__ */ new Map(), Lt = ({
1693
1719
  identifier: t,
1694
1720
  callback: e,
1695
1721
  child: s,
1696
1722
  timeout: r = 10
1697
1723
  }) => {
1698
- if (v.has(t))
1724
+ if (C.has(t))
1699
1725
  throw new Error(`Probe already exists: ${t.description}`);
1700
1726
  const n = setTimeout(() => e("timeout"), r);
1701
- v.set(t, {
1727
+ C.set(t, {
1702
1728
  counter: 0,
1703
1729
  timeoutId: n
1704
1730
  });
1705
1731
  const i = (l) => {
1706
1732
  clearTimeout(n);
1707
- const c = v.get(l);
1733
+ const c = C.get(l);
1708
1734
  if (c == null)
1709
1735
  throw new Error(`Probe not found: ${l.description}`);
1710
- --c.counter === 0 ? (e("resolved"), v.delete(l)) : v.set(l, c);
1736
+ --c.counter === 0 ? (e("resolved"), C.delete(l)) : C.set(l, c);
1711
1737
  };
1712
1738
  return g(
1713
1739
  U(() => clearTimeout(n)),
1714
- xt(De, i, s)
1740
+ Ot(De, i, s)
1715
1741
  );
1716
- }, Dt = (t, e) => St(De, (s) => {
1717
- const r = v.get(t);
1742
+ }, Dt = (t, e) => bt(De, (s) => {
1743
+ const r = C.get(t);
1718
1744
  return r == null ? e(() => {
1719
1745
  }) : (clearTimeout(r.timeoutId), r.counter++, e(() => s(t)));
1720
- }), Le = Symbol("globalProbe"), vs = ({
1746
+ }), Me = Symbol("globalProbe"), vs = ({
1721
1747
  callback: t,
1722
1748
  timeout: e
1723
- }, s) => Ot({ identifier: Le, callback: t, child: s, timeout: e }), Cs = (t) => Dt(Le, t), Lt = (t, e) => (s) => {
1749
+ }, s) => Lt({ identifier: Me, callback: t, child: s, timeout: e }), Ps = (t) => Dt(Me, t), Mt = (t, e) => (s) => {
1724
1750
  const r = s.getStyle(t);
1725
1751
  return s.setStyle(t, e), (n) => {
1726
1752
  n && s.setStyle(t, r);
1727
1753
  };
1728
- }, Mt = (t, e) => (s) => {
1754
+ }, Ht = (t, e) => (s) => {
1729
1755
  const r = s.getStyle(t);
1730
1756
  return e.on((n) => s.setStyle(t, n)), (n) => {
1731
1757
  n && s.setStyle(t, r);
1732
1758
  };
1733
- }, Ps = new Proxy(
1759
+ }, xs = new Proxy(
1734
1760
  {},
1735
1761
  {
1736
1762
  /**
@@ -1741,125 +1767,125 @@ const ut = /* @__PURE__ */ new Set([
1741
1767
  * @returns The renderable component for the specified attribute.
1742
1768
  *
1743
1769
  */
1744
- get: (t, e) => (s) => d.is(s) ? Mt(e, s) : Lt(e, s)
1770
+ get: (t, e) => (s) => d.is(s) ? Ht(e, s) : Mt(e, s)
1745
1771
  }
1746
1772
  );
1747
1773
  export {
1748
1774
  F as ATTRS_PLACEHOLDER_ATTR,
1749
- Kt as Async,
1750
- cs as BindChecked,
1751
- ns as BindDate,
1752
- is as BindDateTime,
1753
- os as BindNumber,
1754
- ls as BindText,
1775
+ es as Async,
1776
+ as as BindChecked,
1777
+ is as BindDate,
1778
+ os as BindDateTime,
1779
+ ls as BindNumber,
1780
+ cs as BindText,
1755
1781
  P as BrowserContext,
1756
- V as CLASS_PLACEHOLDER_ATTR,
1757
- C as Computed,
1758
- fs as Conjunction,
1759
- ms as DOMNode,
1760
- _e as El,
1761
- Ae as ElNS,
1762
- L as ElementPosition,
1782
+ j as CLASS_PLACEHOLDER_ATTR,
1783
+ v as Computed,
1784
+ ds as Conjunction,
1785
+ ys as DOMNode,
1786
+ Ae as El,
1787
+ Se as ElNS,
1788
+ D as ElementPosition,
1763
1789
  A as Empty,
1764
- bt as Ensure,
1790
+ Et as Ensure,
1765
1791
  vt as ForEach,
1766
1792
  g as Fragment,
1767
- q as HTML_PLACEHOLDER_ATTR,
1768
- Bt as HeadlessAdapter,
1793
+ V as HTML_PLACEHOLDER_ATTR,
1794
+ Ft as HeadlessAdapter,
1769
1795
  x as HeadlessContext,
1770
- ct as HeadlessElement,
1771
- ye as HeadlessPortal,
1772
- at as HeadlessText,
1773
- Et as LazyUnless,
1774
- Pe as LazyWhen,
1775
- _s as MapSignal,
1796
+ at as HeadlessElement,
1797
+ Te as HeadlessPortal,
1798
+ ut as HeadlessText,
1799
+ Ct as LazyUnless,
1800
+ xe as LazyWhen,
1801
+ As as MapSignal,
1776
1802
  oe as MemoryStore,
1777
1803
  pe as NODE_PLACEHOLDER_ATTR,
1778
- As as NotEmpty,
1779
- Ct as OnBrowserCtx,
1780
- mt as OnChecked,
1781
- gs as OnCtx,
1804
+ Ss as NotEmpty,
1805
+ Pt as OnBrowserCtx,
1806
+ yt as OnChecked,
1807
+ ms as OnCtx,
1782
1808
  U as OnDispose,
1783
- ws as OnElement,
1784
- Ts as OnHeadlessCtx,
1809
+ _s as OnElement,
1810
+ ws as OnHeadlessCtx,
1785
1811
  z as OneOf,
1786
- Ee as OneOfField,
1787
- as as OneOfKind,
1788
- us as OneOfTuple,
1789
- hs as OneOfType,
1790
- At as OneOfValue,
1791
- Ss as Portal,
1792
- I as Prop,
1793
- bs as Provide,
1812
+ Ce as OneOfField,
1813
+ us as OneOfKind,
1814
+ hs as OneOfTuple,
1815
+ fs as OneOfType,
1816
+ St as OneOfValue,
1817
+ bs as Portal,
1818
+ k as Prop,
1819
+ Es as Provide,
1794
1820
  vs as ProvideGlobalProbe,
1795
- Ot as ProvideProbe,
1821
+ Lt as ProvideProbe,
1796
1822
  de as ProviderNotFoundError,
1797
- Ge as RenderingError,
1798
- xe as Repeat,
1799
- j as STYLE_PLACEHOLDER_ATTR,
1823
+ ze as RenderingError,
1824
+ Oe as Repeat,
1825
+ q as STYLE_PLACEHOLDER_ATTR,
1800
1826
  d as Signal,
1801
1827
  B as TEXT_PLACEHOLDER_ATTR,
1802
- Se as Task,
1803
- Ut as TextNode,
1804
- ys as Unless,
1805
- ds as Use,
1806
- Cs as UseGlobalProbe,
1828
+ be as Task,
1829
+ Wt as TextNode,
1830
+ Ts as Unless,
1831
+ ps as Use,
1832
+ Ps as UseGlobalProbe,
1807
1833
  Dt as UseProbe,
1808
- St as UseProvider,
1809
- ps as UseProviders,
1834
+ bt as UseProvider,
1835
+ gs as UseProviders,
1810
1836
  p as Value,
1811
- Ce as When,
1812
- xt as WithProvider,
1813
- Es as WithProviders,
1814
- Je as _getSelfOrParentElement,
1837
+ Pe as When,
1838
+ Ot as WithProvider,
1839
+ Cs as WithProviders,
1840
+ Ge as _getSelfOrParentElement,
1815
1841
  fe as _isElement,
1816
- We as _makeGetter,
1817
- Ue as _makeSetter,
1842
+ Je as _makeGetter,
1843
+ We as _makeSetter,
1818
1844
  R as _removeDOMNode,
1819
- we as _signalText,
1820
- Te as _staticText,
1821
- Rt as animateSignal,
1822
- Fe as animateSignals,
1823
- Jt as aria,
1845
+ _e as _signalText,
1846
+ we as _staticText,
1847
+ jt as animateSignal,
1848
+ Ue as animateSignals,
1849
+ Gt as aria,
1824
1850
  O as attr,
1825
- Wt as dataAttr,
1826
- es as emitChecked,
1827
- ts as emitPreventDefault,
1828
- rs as emitStopImmediatePropagation,
1829
- ss as emitStopPropagation,
1830
- yt as emitValue,
1831
- wt as emitValueAsDate,
1832
- _t as emitValueAsDateTime,
1833
- Tt as emitValueAsNumber,
1834
- Ve as endInterpolate,
1851
+ Jt as dataAttr,
1852
+ ts as emitChecked,
1853
+ ss as emitPreventDefault,
1854
+ ns as emitStopImmediatePropagation,
1855
+ rs as emitStopPropagation,
1856
+ Tt as emitValue,
1857
+ _t as emitValueAsDate,
1858
+ At as emitValueAsDateTime,
1859
+ wt as emitValueAsNumber,
1860
+ qe as endInterpolate,
1835
1861
  ie as getWindow,
1836
- je as guessInterpolate,
1837
- Xt as html,
1838
- Yt as input,
1839
- Re as interpolateDate,
1840
- Ie as interpolateNumber,
1841
- Ne as interpolateString,
1842
- It as localStorageProp,
1862
+ Ve as guessInterpolate,
1863
+ Yt as html,
1864
+ Qt as input,
1865
+ je as interpolateDate,
1866
+ Ne as interpolateNumber,
1867
+ Re as interpolateString,
1868
+ Nt as localStorageProp,
1843
1869
  Q as makeComputed,
1844
- Ht as makeComputedOf,
1845
- Vt as makeComputedRecord,
1846
- Be as makeEffect,
1870
+ It as makeComputedOf,
1871
+ qt as makeComputedRecord,
1872
+ Fe as makeEffect,
1847
1873
  kt as makeEffectOf,
1848
1874
  N as makeProp,
1849
- Pt as makeProviderMark,
1875
+ xt as makeProviderMark,
1850
1876
  J as makeSignal,
1851
- Zt as math,
1852
- zt as mathAttr,
1877
+ Kt as math,
1878
+ Xt as mathAttr,
1853
1879
  G as on,
1854
1880
  De as probeMarker,
1855
- jt as render,
1881
+ Vt as render,
1856
1882
  Z as renderWithContext,
1857
1883
  f as renderableOfTNode,
1858
- Ft as restoreTempoPlaceholders,
1859
- qt as runHeadless,
1860
- Nt as sessionStorageProp,
1884
+ Ut as restoreTempoPlaceholders,
1885
+ Bt as runHeadless,
1886
+ Rt as sessionStorageProp,
1861
1887
  le as storedProp,
1862
- Ps as style,
1863
- Qt as svg,
1864
- Gt as svgAttr
1888
+ xs as style,
1889
+ Zt as svg,
1890
+ zt as svgAttr
1865
1891
  };